wpseek.com
WordPress开发者和主题制作者的搜索引擎



strip_shortcode_tag › WordPress Function

Since3.3.0
已弃用n/a
strip_shortcode_tag ( $m )
参数:
  • (array) $m RegEx matches against post content.
    Required: Yes
返回:
  • (string|false) The content stripped of the tag, otherwise false.
定义在:
文档:

Strips a shortcode tag based on RegEx matches against post content.



源码

function strip_shortcode_tag( $m ) {
	// Allow [[foo]] syntax for escaping a tag.
	if ( '[' === $m[1] && ']' === $m[6] ) {
		return substr( $m[0], 1, -1 );
	}

	return $m[1] . $m[6];
}