page_row_actions
Filters the array of row action links on the Pages list table.
The filter is evaluated only for hierarchical post types.
Использование
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.
По умолчанию: are 'Edit', 'Quick Edit', 'Restore', 'Trash', 'Delete Permanently', 'Preview', and 'View' - $post(WP_Post)
- The post object.
Список изменений
С версии 2.8.0 | Введена. |
Где вызывается хук
wp-admin/includes/class-wp-posts-list-table.php 1580
$actions = apply_filters( 'page_row_actions', $actions, $post );