Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/wp-includes/post-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great to add a $message argument to _deprecated_argument(), maybe something like:

Suggested change
_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.' ) );

}

Expand Down
Loading