has_shortcode

SummerySummery

Whether the passed content contains the specified shortcode

Syntax

has_shortcode( string $content, string $tag )

ParametersParameters

$content

(string) (Required) Content to search for shortcodes.

$tag

(string) (Required) Shortcode tag to check.

ReturnReturn

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

SourceSource

File: wp-includes/shortcodes.php


			

ChangelogChangelog

Changelog
Version Description
3.6.0 Introduced.
Scroll to Top