Filter hook 'page_row_actions'

in WP Core File wp-admin/includes/class-wp-posts-list-table.php at line 1592

View Source

page_row_actions

Filter Hook
Description
Filters the array of row action links on the Pages list table. The filter is evaluated only for hierarchical post types.

Hook Information

File Location wp-admin/includes/class-wp-posts-list-table.php View on GitHub
Hook Type Filter
Line Number 1592

Hook Parameters

Type Name Description
string[] $actions An array of row action links. Defaults are 'Edit', 'Quick Edit', 'Restore', 'Trash', 'Delete Permanently', 'Preview', and 'View'.
WP_Post $post The post object.

Usage Examples

Basic Usage
<?php
// Hook into page_row_actions
add_filter('page_row_actions', 'my_custom_filter', 10, 2);

function my_custom_filter($actions, $post) {
    // Your custom filtering logic here
    return $actions;
}

Source Code Context

wp-admin/includes/class-wp-posts-list-table.php:1592 - How this hook is used in WordPress core
<?php
1587  			 * @param string[] $actions An array of row action links. Defaults are
1588  			 *                          'Edit', 'Quick Edit', 'Restore', 'Trash',
1589  			 *                          'Delete Permanently', 'Preview', and 'View'.
1590  			 * @param WP_Post  $post    The post object.
1591  			 */
1592  			$actions = apply_filters( 'page_row_actions', $actions, $post );
1593  		} else {
1594  
1595  			/**
1596  			 * Filters the array of row action links on the Posts list table.
1597  			 *

PHP Documentation

<?php
/**
			 * Filters the array of row action links on the Pages list table.
			 *
			 * The filter is evaluated only for hierarchical post types.
			 *
			 * @since 2.8.0
			 *
			 * @param string[] $actions An array of row action links. Defaults are
			 *                          'Edit', 'Quick Edit', 'Restore', 'Trash',
			 *                          'Delete Permanently', 'Preview', and 'View'.
			 * @param WP_Post  $post    The post object.
			 */
Quick Info
  • Hook Type: Filter
  • Parameters: 2
  • File: wp-admin/includes/class-wp-posts-list-table.php
Related Hooks

Related hooks will be displayed here in future updates.