WP_Media_List_Table::get_primary_column_aria_label │ protected │ WP 7.1.0

Returns a clean label for the primary (File) column's row header aria-label.

Provides screen readers with just the attachment title as the row header name, preventing them from computing the name from the full cell content.

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

Хуков нет.

Возвращает

string. The attachment title.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_primary_column_aria_label( $post );
$post(WP_Post) (обязательный)
The current WP_Post object.

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

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

Код WP_Media_List_Table::get_primary_column_aria_label() WP 7.1.5

protected function get_primary_column_aria_label( $post ) {
	// The title may contain HTML. The printed aria-label uses esc_attr() later.
	$attachment_title = html_entity_decode( _draft_or_post_title( $post ), ENT_QUOTES, get_bloginfo( 'charset' ) );
	$attachment_title = wp_strip_all_tags( $attachment_title );

	return $attachment_title;
}