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/comment.php

    r43468 r43617  
    24042404     */
    24052405    do_action( 'wp_update_comment_count', $post_id, $new, $old );
     2406
     2407    /** This action is documented in wp-includes/post.php */
     2408    do_action( "edit_post_{$post->post_type}", $post_id, $post );
     2409
    24062410    /** This action is documented in wp-includes/post.php */
    24072411    do_action( 'edit_post', $post_id, $post );
Note: See TracChangeset for help on using the changeset viewer.