Changeset 50132 for trunk/src/wp-includes/capabilities.php
- Timestamp:
- 02/02/2021 12:38:40 AM (5 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/capabilities.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/capabilities.php
r50131 r50132 246 246 } 247 247 248 $status_obj = get_post_status_object( $post->post_status);248 $status_obj = get_post_status_object( get_post_status( $post ) ); 249 249 if ( ! $status_obj ) { 250 250 /* translators: 1: Post status, 2: Capability name. */ 251 _doing_it_wrong( __FUNCTION__, sprintf( __( 'The post status %1$s is not registered, so it may not be reliable to check the capability "%2$s" against a post with that status.' ), $post->post_status, $cap ), '5.4.0' );251 _doing_it_wrong( __FUNCTION__, sprintf( __( 'The post status %1$s is not registered, so it may not be reliable to check the capability "%2$s" against a post with that status.' ), get_post_status( $post ), $cap ), '5.4.0' ); 252 252 $caps[] = 'edit_others_posts'; 253 253 break;
Note: See TracChangeset
for help on using the changeset viewer.