post_row_actions WordPress Action Hook

The post_row_actions hook is a great way to add custom actions to your posts in the WordPress admin. This hook is called after the default actions have been added, so you can use it to add your own custom actions before or after the default actions.

apply_filters( 'post_row_actions', string[] $actions, WP_Post $post ) #

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


Description

The filter is evaluated only for non-hierarchical post types.


Top ↑

Parameters

$actions

(string[])An array of row action links. Defaults are 'Edit', 'Quick Edit', 'Restore', 'Trash', 'Delete Permanently', 'Preview', and 'View'.

$post

(WP_Post)The post object.


Top ↑

Source

File: wp-admin/includes/class-wp-posts-list-table.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.