post_submitbox_startaction-hookWP 2.7.0

Fires immediately before the “Publish” (“Update”) button in the admin panel's “Publish” box. This hook can be used to add custom text before the button.

To add text slightly above the button, use the post_submitbox_misc_actions hook.

Usage

add_action( 'post_submitbox_start', 'wp_kama_post_submitbox_start_action' );

/**
 * Function for `post_submitbox_start` action-hook.
 * 
 * @param WP_Post|null $post WP_Post object for the current post on Edit Post screen, null on Edit
 *                           Link screen.
 *
 * @return void
 */
function wp_kama_post_submitbox_start_action( $post ){
	// action...
}
$post(WP_Post) (since version 4.9.0)
The current post object on the editing screen.

Examples

#1 Add some text before the “Publish” button:

add_action( 'post_submitbox_start', 'action_function_name_11' );
function action_function_name_11(){
	echo "<p>Text before the button. Instead of this text, we can, for example,
	add another button that performs some special processing
	when publishing.</p>";
}

Changelog

Since 2.7.0 Introduced.
Since 4.9.0 Added the $post parameter.

Where the hook is called

post_submit_meta_box()
post_submitbox_start
link_submit_meta_box()
post_submitbox_start
wp-admin/includes/meta-boxes.php 359
do_action( 'post_submitbox_start', $post );
wp-admin/includes/meta-boxes.php 1131
do_action( 'post_submitbox_start', null );

Where the hook is used in WordPress

Usage not found.