Changeset 5419
- Timestamp:
- 04/28/2017 08:01:19 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-author-card.php
r5332 r5419 23 23 ), 10, 6 ); 24 24 25 if ( is_ int( $post_or_user_id ) ) {25 if ( is_numeric( $post_or_user_id ) ) { 26 26 $post = ''; 27 27 $author = get_user_by( 'id', $post_or_user_id ); 28 28 } else { 29 29 $post = $post_or_user_id ?: get_post(); 30 $author = get_user_by( 'id', $post->post_author );30 $author = is_object( $post ) ? get_user_by( 'id', $post->post_author ) : ''; 31 31 } 32 32
Note: See TracChangeset
for help on using the changeset viewer.