WP_Media_List_Table::column_author() WordPress Method

The WP_Media_List_Table::column_author() method is used to display the author column in the media list table. This method takes a single argument, which is the WP_Post object for the current row. The column is populated by the post_author field of the WP_Post object. If the author is a registered user, their user_login name is displayed. If the author is not a registered user, the author field is displayed.

WP_Media_List_Table::column_author( WP_Post $post ) #

Handles the author column output.


Parameters

$post

(WP_Post)(Required)The current WP_Post object.


Top ↑

Source

File: wp-admin/includes/class-wp-media-list-table.php

	public function column_author( $post ) {
		printf(
			'<a href="%s">%s</a>',
			esc_url( add_query_arg( array( 'author' => get_the_author_meta( 'ID' ) ), 'upload.php' ) ),
			get_the_author()
		);
	}


Top ↑

Changelog

Changelog
VersionDescription
4.3.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.