apply_shortcodes()WP 5.4.0

Search content for shortcodes and filter shortcodes through their hooks.

This function is an alias for do_shortcode().

1 time — 0.0004201 sec (fast) | 50000 times — 0.67 sec (very fast)

No Hooks.

Return

String. Content with shortcodes filtered out.

Usage

apply_shortcodes( $content, $ignore_html );
$content(string) (required)
Content to search for shortcodes.
$ignore_html(true|false)
When true, shortcodes inside HTML elements will be skipped.
Default: false

Notes

Changelog

Since 5.4.0 Introduced.

Code of apply_shortcodes() WP 6.0

function apply_shortcodes( $content, $ignore_html = false ) {
	return do_shortcode( $content, $ignore_html );
}