Meta Boxes: add an action, post_submitbox_minor_actions
. post_submitbox_misc_actions
already exists. Pass $post
to both for context - avoids having to check for a global post.
Props jonathanbardo, chriscct7, DrewAPicture. Fixes #26267. git-svn-id: https://develop.svn.wordpress.org/trunk@34895 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
aac08d7735
commit
7665377058
@ -51,6 +51,16 @@ if ( 'publish' == $post->post_status ) {
|
|||||||
<input type="hidden" name="wp-preview" id="wp-preview" value="" />
|
<input type="hidden" name="wp-preview" id="wp-preview" value="" />
|
||||||
</div>
|
</div>
|
||||||
<?php endif; // public post type ?>
|
<?php endif; // public post type ?>
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Fires before the post time/date setting in the Publish meta box.
|
||||||
|
*
|
||||||
|
* @since 4.4.0
|
||||||
|
*
|
||||||
|
* @param WP_Post $post WP_Post object for the current post.
|
||||||
|
*/
|
||||||
|
do_action( 'post_submitbox_minor_actions', $post );
|
||||||
|
?>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div><!-- #minor-publishing-actions -->
|
</div><!-- #minor-publishing-actions -->
|
||||||
|
|
||||||
@ -207,8 +217,11 @@ if ( $can_publish ) : // Contributors don't get to choose the date of publish ?>
|
|||||||
* Fires after the post time/date setting in the Publish meta box.
|
* Fires after the post time/date setting in the Publish meta box.
|
||||||
*
|
*
|
||||||
* @since 2.9.0
|
* @since 2.9.0
|
||||||
|
* @since 4.4.0 Added the `$post` parameter.
|
||||||
|
*
|
||||||
|
* @param WP_Post $post WP_Post object for the current post.
|
||||||
*/
|
*/
|
||||||
do_action( 'post_submitbox_misc_actions' );
|
do_action( 'post_submitbox_misc_actions', $post );
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
|
Loading…
Reference in New Issue
Block a user