summaryrefslogtreecommitdiffstats
path: root/wp-includes/shortcodes.php
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:51:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:51:18 +0000
commit0e41b5d52fdc6af6442816b5f465c9db9f84e126 (patch)
treee139a90049b158d4eed892d1662ee7f5c358fa31 /wp-includes/shortcodes.php
parentAdding upstream version 6.5.5+dfsg1. (diff)
downloadwordpress-0e41b5d52fdc6af6442816b5f465c9db9f84e126.tar.xz
wordpress-0e41b5d52fdc6af6442816b5f465c9db9f84e126.zip
Adding upstream version 6.6.1+dfsg1.upstream/6.6.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'wp-includes/shortcodes.php')
-rw-r--r--wp-includes/shortcodes.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/wp-includes/shortcodes.php b/wp-includes/shortcodes.php
index 75e489f..bddf63a 100644
--- a/wp-includes/shortcodes.php
+++ b/wp-includes/shortcodes.php
@@ -417,10 +417,11 @@ function do_shortcode_tag( $m ) {
* shortcode generation process, returning that value instead.
*
* @since 4.7.0
+ * @since 6.5.0 The `$attr` parameter is always an array.
*
* @param false|string $output Short-circuit return value. Either false or the value to replace the shortcode with.
* @param string $tag Shortcode name.
- * @param array|string $attr Shortcode attributes array or the original arguments string if it cannot be parsed.
+ * @param array $attr Shortcode attributes array, can be empty if the original arguments string cannot be parsed.
* @param array $m Regular expression match array.
*/
$return = apply_filters( 'pre_do_shortcode_tag', false, $tag, $attr, $m );
@@ -436,11 +437,12 @@ function do_shortcode_tag( $m ) {
* Filters the output created by a shortcode callback.
*
* @since 4.7.0
+ * @since 6.5.0 The `$attr` parameter is always an array.
*
- * @param string $output Shortcode output.
- * @param string $tag Shortcode name.
- * @param array|string $attr Shortcode attributes array or the original arguments string if it cannot be parsed.
- * @param array $m Regular expression match array.
+ * @param string $output Shortcode output.
+ * @param string $tag Shortcode name.
+ * @param array $attr Shortcode attributes array, can be empty if the original arguments string cannot be parsed.
+ * @param array $m Regular expression match array.
*/
return apply_filters( 'do_shortcode_tag', $output, $tag, $attr, $m );
}
@@ -600,7 +602,7 @@ function get_shortcode_atts_regex() {
* retrieval of the attributes, since all attributes have to be known.
*
* @since 2.5.0
- * @since 6.5.0 The function now always returns an empty array,
+ * @since 6.5.0 The function now always returns an array,
* even if the original arguments string cannot be parsed or is empty.
*
* @param string $text Shortcode arguments list.