wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



strip_shortcode_tag › WordPress Function

Depuis3.3.0
Dépréciéen/a
strip_shortcode_tag ( $m )
Paramètres:
  • (array) $m RegEx matches against post content.
    Requis: Oui
Retourne:
  • (string|false) The content stripped of the tag, otherwise false.
Défini(e) dans:
Codex:

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



Source

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