我有这段代码,试图定义这些属性(ptid、ptle、pge)在代码运行后的行为。我希望能够定义它们,以便在输出结果之前让它们执行函数。
// Add Shortcode
function formatage( $atts , $content = null ) {
// Attributes
extract( shortcode_atts(
array(
\'ptid\' => \'\',
\'ptle\' => \'\',
‘page’ => \'\',
), $atts )
);
// Code
return X
}
add_shortcode( \'p-fmt\', \'formatage\' );
有人知道关于短代码的好维基吗?