Make WordPress Core


Ignore:
Timestamp:
09/03/2018 09:11:38 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Posts, Post Types: Introduce edit_post_{$post->post_type} hook.

The hook fires before the general edit_post hook and has the same parameters.

It also complements the save_post_{$post->post_type} hook added in [25050].

Props Mte90, garrett-eclipse.
Merges [43535] and [43616] to the 4.9 branch.
Fixes #34706.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-includes/class-wp-customize-manager.php

    r42811 r43617  
    29642964        $post->post_status = $new_status;
    29652965        wp_transition_post_status( $new_status, $old_status, $post );
     2966
     2967        /** This action is documented in wp-includes/post.php */
     2968        do_action( "edit_post_{$post->post_type}", $post->ID, $post );
    29662969
    29672970        /** This action is documented in wp-includes/post.php */
Note: See TracChangeset for help on using the changeset viewer.