WPDev.one
Core Function
View Source on Trac ↗

has_shortcode()

has_shortcode( mixed $content, mixed $tag )

Determines whether the passed content contains the specified shortcode.

Parameters 2 required

Name / Type Description
$content
string

Content to search for shortcodes.

Required
$tag
string

Shortcode tag to check.

Required

Return Value

(bool)
Whether the passed content contains the given shortcode.

Function Information

Since Version
3.6.0
Source File
wp-includes/shortcodes.php
Advertisement