From 69c6b7fdcd07a6b0cbc15487415e0ed652ca7b92 Mon Sep 17 00:00:00 2001 From: SirLouen Date: Thu, 27 Nov 2025 16:34:49 +0100 Subject: [PATCH 1/2] Improve checks for deprecation notice from get_the_excerpt --- src/wp-includes/post-template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php index 3d82ba81b641b..423d34dae0082 100644 --- a/src/wp-includes/post-template.php +++ b/src/wp-includes/post-template.php @@ -411,7 +411,7 @@ function the_excerpt() { * @return string Post excerpt. */ function get_the_excerpt( $post = null ) { - if ( is_bool( $post ) ) { + if ( ! is_null( $post ) && ! is_numeric( $post ) && ! ( $post instanceof WP_Post ) ) { _deprecated_argument( __FUNCTION__, '2.3.0' ); } From 6527f31ced21a398a092549676de92ded20727f2 Mon Sep 17 00:00:00 2001 From: SirLouen Date: Thu, 4 Dec 2025 00:49:52 +0100 Subject: [PATCH 2/2] feat: Improve deprecation notice in get_the_excerpt function to clarify argument changes --- src/wp-includes/post-template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php index 423d34dae0082..b2711b7c3c11a 100644 --- a/src/wp-includes/post-template.php +++ b/src/wp-includes/post-template.php @@ -412,7 +412,7 @@ function the_excerpt() { */ function get_the_excerpt( $post = null ) { if ( ! is_null( $post ) && ! is_numeric( $post ) && ! ( $post instanceof WP_Post ) ) { - _deprecated_argument( __FUNCTION__, '2.3.0' ); + _deprecated_argument( __FUNCTION__, '2.3.0', __( 'The bool $fakeit argument has been replaced with an int|WP_Post $post argument.' ) ); } $post = get_post( $post );