WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WP_Media_List_Table::column_parent() public WP 4.3.0

Handles the parent column output.

Это метод класса: WP_Media_List_Table{}

Хуков нет.

Возвращает

Null. Ничего.

Использование

$WP_Media_List_Table = new WP_Media_List_Table();
$WP_Media_List_Table->column_parent( $post );
$post(WP_Post) (обязательный)
The current WP_Post object.

Список изменений

С версии 4.3.0 Введена.

Код WP_Media_List_Table::column_parent() WP 5.5.1

wp-admin/includes/class-wp-media-list-table.php
<?php
public function column_parent( $post ) {
	$user_can_edit = current_user_can( 'edit_post', $post->ID );

	if ( $post->post_parent > 0 ) {
		$parent = get_post( $post->post_parent );
	} else {
		$parent = false;
	}

	if ( $parent ) {
		$title       = _draft_or_post_title( $post->post_parent );
		$parent_type = get_post_type_object( $parent->post_type );

		if ( $parent_type && $parent_type->show_ui && current_user_can( 'edit_post', $post->post_parent ) ) {
			?>
			<strong><a href="<?php echo get_edit_post_link( $post->post_parent ); ?>">
				<?php echo $title; ?></a></strong>
							<?php
		} elseif ( $parent_type && current_user_can( 'read_post', $post->post_parent ) ) {
			?>
			<strong><?php echo $title; ?></strong>
								<?php
		} else {
			_e( '(Private post)' );
		}

		if ( $user_can_edit ) :
			$detach_url = add_query_arg(
				array(
					'parent_post_id' => $post->post_parent,
					'media[]'        => $post->ID,
					'_wpnonce'       => wp_create_nonce( 'bulk-' . $this->_args['plural'] ),
				),
				'upload.php'
			);
			printf(
				'<br /><a href="%s" class="hide-if-no-js detach-from-parent" aria-label="%s">%s</a>',
				$detach_url,
				/* translators: %s: Title of the post the attachment is attached to. */
				esc_attr( sprintf( __( 'Detach from &#8220;%s&#8221;' ), $title ) ),
				__( 'Detach' )
			);
		endif;
	} else {
		_e( '(Unattached)' );
		?>
		<?php
		if ( $user_can_edit ) {
			$title = _draft_or_post_title( $post->post_parent );
			printf(
				'<br /><a href="#the-list" onclick="findPosts.open( \'media[]\', \'%s\' ); return false;" class="hide-if-no-js aria-button-if-js" aria-label="%s">%s</a>',
				$post->ID,
				/* translators: %s: Attachment title. */
				esc_attr( sprintf( __( 'Attach &#8220;%s&#8221; to existing content' ), $title ) ),
				__( 'Attach' )
			);
		}
	}
}