WordPress.org

Make WordPress Core

Changeset 37424


Ignore:
Timestamp:
05/12/2016 03:43:48 PM (3 years ago)
Author:
ocean90
Message:

Posts: Fire a post_action_{$action} action for a custom post action request.

Props jfarthing84, Mte90, brianvan, sudar, DrewAPicture.
Fixes #27056.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/post.php

    r35282 r37424  
    276276
    277277default:
     278    /**
     279     * Fires for a given custom post action request.
     280     *
     281     * The dynamic portion of the hook name, `$action`, refers to the custom post action.
     282     *
     283     * @since 4.6.0
     284     *
     285     * @param int $post_id Post ID sent with the request.
     286     */
     287    do_action( "post_action_{$action}", $post_id );
     288
    278289    wp_redirect( admin_url('edit.php') );
    279290    exit();
Note: See TracChangeset for help on using the changeset viewer.