equal
deleted
inserted
replaced
501 |
501 |
502 /** |
502 /** |
503 * Handles the author column output. |
503 * Handles the author column output. |
504 * |
504 * |
505 * @since 4.3.0 |
505 * @since 4.3.0 |
|
506 * @since 6.8.0 Added fallback text when author's name is unknown. |
506 * |
507 * |
507 * @param WP_Post $post The current WP_Post object. |
508 * @param WP_Post $post The current WP_Post object. |
508 */ |
509 */ |
509 public function column_author( $post ) { |
510 public function column_author( $post ) { |
510 printf( |
511 $author = get_the_author(); |
511 '<a href="%s">%s</a>', |
512 |
512 esc_url( add_query_arg( array( 'author' => get_the_author_meta( 'ID' ) ), 'upload.php' ) ), |
513 if ( ! empty( $author ) ) { |
513 get_the_author() |
514 printf( |
514 ); |
515 '<a href="%s">%s</a>', |
|
516 esc_url( add_query_arg( array( 'author' => get_the_author_meta( 'ID' ) ), 'upload.php' ) ), |
|
517 esc_html( $author ) |
|
518 ); |
|
519 } else { |
|
520 echo '<span aria-hidden="true">—</span><span class="screen-reader-text">' . __( '(no author)' ) . '</span>'; |
|
521 } |
515 } |
522 } |
516 |
523 |
517 /** |
524 /** |
518 * Handles the description column output. |
525 * Handles the description column output. |
519 * |
526 * |
706 */ |
713 */ |
707 do_action( 'manage_media_custom_column', $column_name, $post->ID ); |
714 do_action( 'manage_media_custom_column', $column_name, $post->ID ); |
708 } |
715 } |
709 |
716 |
710 /** |
717 /** |
|
718 * Generates the list table rows. |
|
719 * |
|
720 * @since 3.1.0 |
|
721 * |
711 * @global WP_Post $post Global post object. |
722 * @global WP_Post $post Global post object. |
712 * @global WP_Query $wp_query WordPress Query object. |
723 * @global WP_Query $wp_query WordPress Query object. |
713 */ |
724 */ |
714 public function display_rows() { |
725 public function display_rows() { |
715 global $post, $wp_query; |
726 global $post, $wp_query; |