page_row_actions filter-hookWP 2.8.0

Filters the array of row action links on the Pages list table.

The filter is evaluated only for hierarchical post types.

Usage

add_filter( 'page_row_actions', 'wp_kama_page_row_actions_filter', 10, 2 );

/**
 * Function for `page_row_actions` filter-hook.
 * 
 * @param string[] $actions An array of row action links.
 * @param WP_Post  $post    The post object.
 *
 * @return string[]
 */
function wp_kama_page_row_actions_filter( $actions, $post ){

	// filter...
	return $actions;
}
$actions(string[])
An array of row action links.
Default: are 'Edit', 'Quick Edit', 'Restore', 'Trash', 'Delete Permanently', 'Preview', and 'View'
$post(WP_Post)
The post object.

Changelog

Since 2.8.0 Introduced.

Where the hook is called

WP_Posts_List_Table::handle_row_actions()
page_row_actions
wp-admin/includes/class-wp-posts-list-table.php 1520
$actions = apply_filters( 'page_row_actions', $actions, $post );

Where the hook is used in WordPress

Usage not found.