beans_widget_shortcodes

Search content for shortcodes and filter shortcodes through their hooks.

Shortcodes must be delimited with curly brackets (e.g. {key}) and correspond to the searched array key from the widget global.

beans_widget_shortcodes( string $content )

Return: (string) Content with shortcodes filtered out.

Parameters

NameTypeRequiredDefaultDescription
$contentstringtrue-Content containing the shortcode(s) delimited with curly brackets (e.g. {key}). Shortcode(s) correspond to the searched array key and will be replaced by the array value if found.

Source

function beans_widget_shortcodes( $content ) {

	if ( is_array( $content ) ) {
		$content = build_query( $content );
	}

	return beans_array_shortcodes( $content, $GLOBALS['_beans_widget'] );

}