WP_Posts_List_Table::column_author() WordPress Method
The WP_Posts_List_Table::column_author() method is used to display the author column in the Posts list table. This method takes a single argument, $post, which is the WP_Post object for the current row. The method first checks if the post has an author assigned. If not, it displays "Guest" in the author column. Otherwise, it fetches the author data from the database and displays the author's name in the column.
WP_Posts_List_Table::column_author( WP_Post $post ) #
Handles the post author column output.
Parameters
Source
File: wp-admin/includes/class-wp-posts-list-table.php
public function column_author( $post ) { $args = array( 'post_type' => $post->post_type, 'author' => get_the_author_meta( 'ID' ), ); echo $this->get_edit_link( $args, get_the_author() ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.3.0 | Introduced. |