- Timestamp:
- 03/17/2025 06:52:12 PM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-posts-list-table.php
r59000 r60032 1278 1278 * 1279 1279 * @since 4.3.0 1280 * @since 6.8.0 Added fallback text when author's name is unknown. 1280 1281 * 1281 1282 * @param WP_Post $post The current WP_Post object. 1282 1283 */ 1283 1284 public function column_author( $post ) { 1284 $args = array( 1285 'post_type' => $post->post_type, 1286 'author' => get_the_author_meta( 'ID' ), 1287 ); 1288 echo $this->get_edit_link( $args, get_the_author() ); 1285 $author = get_the_author(); 1286 1287 if ( ! empty( $author ) ) { 1288 $args = array( 1289 'post_type' => $post->post_type, 1290 'author' => get_the_author_meta( 'ID' ), 1291 ); 1292 echo $this->get_edit_link( $args, esc_html( $author ) ); 1293 } else { 1294 echo '<span aria-hidden="true">—</span><span class="screen-reader-text">' . __( '(no author)' ) . '</span>'; 1295 } 1289 1296 } 1290 1297
Note: See TracChangeset
for help on using the changeset viewer.