Searches content for shortcodes and filter shortcodes through their hooks.
Description
This function is an alias for do_shortcode() .
See also
Parameters
$content
stringrequired- Content to search for shortcodes.
$ignore_html
booloptional- When true, shortcodes inside HTML elements will be skipped.
Default:
false
Source
function apply_shortcodes( $content, $ignore_html = false ) {
return do_shortcode( $content, $ignore_html );
}
Changelog
Version | Description |
---|---|
5.4.0 | Introduced. |
Here is the implementation by current method –
And here is the usage which new WordPress 5.4 Introduces
Old method –
WordPress 5.4 Introduces apply_shortcodes()
// Displays the result of the shortcode