Skip to content

Commit 14dadd1

Browse files
committed
Improve checks for deprecation notice from get_the_excerpt
1 parent 6b7adc0 commit 14dadd1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp-includes/post-template.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ function the_excerpt() {
411411
* @return string Post excerpt.
412412
*/
413413
function get_the_excerpt( $post = null ) {
414-
if ( is_bool( $post ) ) {
414+
if ( ! is_null( $post ) && ! is_numeric( $post ) && ! ( $post instanceof WP_Post ) ) {
415415
_deprecated_argument( __FUNCTION__, '2.3.0' );
416416
}
417417

0 commit comments

Comments
 (0)