strip_shortcode_tag

Advertisement

Summery Summery

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

Syntax Syntax

strip_shortcode_tag( array $m )

Parameters Parameters

$m

(Required) RegEx matches against post content.

Return Return

(string|false) The content stripped of the tag, otherwise false.

Source Source

File: wp-includes/shortcodes.php

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

Advertisement

Changelog Changelog

Changelog
Version Description
3.3.0 Introduced.

Advertisement

Leave a Reply