Uma área de pesquisa sobre o WordPress para devs e autores do tema



strip_shortcode_tag ›

Desde3.3.0
Obsoleton/a
strip_shortcode_tag ( $m )
Parâmetros:
  • (array) $m RegEx matches against post content.
    Required: Yes
Retorna:
  • (string|false) The content stripped of the tag, otherwise false.
Definido em:
Codex:

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



Fonte

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];
}