我不确定我是否没有完全理解php中函数的基础知识,或者我不确定的是WP惯例。我的问题是,为什么在函数中使用参数,而不使用它?
以下面的代码为例。
add_shortcode( \'tf\', \'ch2ts_twitter_feed_shortcode\' );
function ch2ts_twitter_feed_shortcode( $atts ) {$output = \'<a href="http://twitter.com/ylefebvre">Twitter Feed</a>\';
return $output; }
$attr甚至没有使用,但仍然作为参数传递?请解释一下。