WP_Media_List_Table::handle_row_actions()protectedWP 4.3.0

Generates and displays row action links.

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

Хуков нет.

Возвращает

Строку. Row actions output for media attachments, or an empty string if the current column is not the primary column.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->handle_row_actions( $item, $column_name, $primary );
$item(WP_Post) (обязательный)
Attachment being acted upon.
$column_name(строка) (обязательный)
Current column name.
$primary(строка) (обязательный)
Primary column name.

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

С версии 4.3.0 Введена.
С версии 5.9.0 Renamed $post to $item to match parent class for PHP 8 named parameter support.

Код WP_Media_List_Table::handle_row_actions() WP 6.4.3

protected function handle_row_actions( $item, $column_name, $primary ) {
	if ( $primary !== $column_name ) {
		return '';
	}

	// Restores the more descriptive, specific name for use within this method.
	$post = $item;

	$att_title = _draft_or_post_title();
	$actions   = $this->_get_row_actions( $post, $att_title );

	return $this->row_actions( $actions );
}