diff --git a/wp-includes/media.php b/wp-includes/media.php index 340ddc3bb4..43795c9084 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -2085,6 +2085,7 @@ add_shortcode( 'caption', 'img_caption_shortcode' ); * @since 2.6.0 * @since 3.9.0 The `class` attribute was added. * @since 5.1.0 The `caption_id` attribute was added. + * @since 5.9.0 The `$content` parameter default value changed from `null` to `''`. * * @param array $attr { * Attributes of the caption shortcode. @@ -2097,10 +2098,10 @@ add_shortcode( 'caption', 'img_caption_shortcode' ); * @type string $caption The caption text. * @type string $class Additional class name(s) added to the caption container. * } - * @param string $content Shortcode content. + * @param string $content Optional. Shortcode content. Default empty string. * @return string HTML content to display the caption. */ -function img_caption_shortcode( $attr, $content = null ) { +function img_caption_shortcode( $attr, $content = '' ) { // New-style shortcode with the caption inside the shortcode with the link and image tags. if ( ! isset( $attr['caption'] ) ) { if ( preg_match( '#((?:]+>\s*)?]+>(?:\s*)?)(.*)#is', $content, $matches ) ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 69b3b9af09..3bfe2fb7ab 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-51815'; +$wp_version = '5.9-alpha-51816'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.