WP_Posts_List_Table::get_primary_column_aria_label │ protected │ WP 7.1.0

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

Provides screen readers with just the post title as the row header name, preventing them from computing the name from the full cell content (which includes row action links, post states, and possibly an excerpt).

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

Хуков нет.

Возвращает

string. The post title, or 'no title' if no title.

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

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

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

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

Код WP_Posts_List_Table::get_primary_column_aria_label() WP 7.1.2

protected function get_primary_column_aria_label( $item ) {
	return isset( $item->post_title ) && ! empty( $item->post_title ) ? $item->post_title : __( 'no title' );
}