Action hook 'submitpost_box'

in WP Core File wp-admin/edit-form-advanced.php at line 710

View Source

submitpost_box

Action Hook
Description
Fires before meta boxes with 'side' context are output for all post types other than 'page'. The submitpost box is a meta box with 'side' context, so this hook fires just before it is output.

Hook Information

File Location wp-admin/edit-form-advanced.php View on GitHub
Hook Type Action
Line Number 710

Hook Parameters

Type Name Description
WP_Post $post Post object.

Usage Examples

Basic Usage
<?php
// Hook into submitpost_box
add_action('submitpost_box', 'my_custom_function', 10, 1);

function my_custom_function($post) {
    // Your custom code here
}

Source Code Context

wp-admin/edit-form-advanced.php:710 - How this hook is used in WordPress core
<?php
 705  	 *
 706  	 * @since 2.5.0
 707  	 *
 708  	 * @param WP_Post $post Post object.
 709  	 */
 710  	do_action( 'submitpost_box', $post );
 711  }
 712  
 713  
 714  do_meta_boxes( $post_type, 'side', $post );
 715  

PHP Documentation

<?php
/**
	 * Fires before meta boxes with 'side' context are output for all post types other than 'page'.
	 *
	 * The submitpost box is a meta box with 'side' context, so this hook fires just before it is output.
	 *
	 * @since 2.5.0
	 *
	 * @param WP_Post $post Post object.
	 */
Quick Info
  • Hook Type: Action
  • Parameters: 1
  • File: wp-admin/edit-form-advanced.php
Related Hooks

Related hooks will be displayed here in future updates.