要使用可单击的链接呈现短代码输出,而它看起来仍然像一个短代码,您必须替换内置的短代码:
add_shortcode( \'video\', \'wpse_96840_literal_video\' );
function wpse_96840_literal_video( $atts )
{
$url = $atts[\'url\'];
return \'<code>\'
. sprintf( \'[video url="<a href=\\"%1$s\\">%1$s</a>"][/video]\', $url )
. \'</code>\';
}
结果
