From 1eb7fadef41493b93fff75e45e5ad7d05abd6210 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Sun, 20 Aug 2017 19:55:24 +0000 Subject: [PATCH] Docs: Clarify that the second parameter passed to a shortcode callback is the shortcode content or null, rather than the content the shortcode was found in. See #37222. git-svn-id: https://develop.svn.wordpress.org/trunk@41283 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/shortcodes.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/shortcodes.php b/src/wp-includes/shortcodes.php index 3f6d77206a..710291041b 100644 --- a/src/wp-includes/shortcodes.php +++ b/src/wp-includes/shortcodes.php @@ -56,9 +56,9 @@ $shortcode_tags = array(); * @param string $tag Shortcode tag to be searched in post content. * @param callable $callback The callback function to run when the shortcode is found. * Every shortcode callback is passed three parameters by default, - * including an array of attributes (`$atts`), the content - * the shortcode was found in (`$content`), and finally - * the shortcode tag itself (`$shortcode_tag`), in that order. + * including an array of attributes (`$atts`), the shortcode content + * or null if not set (`$content`), and finally the shortcode tag + * itself (`$shortcode_tag`), in that order. */ function add_shortcode( $tag, $callback ) { global $shortcode_tags;