WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Plugin API/Action Reference/post submitbox misc actions

Contents

Description

Runs when an editing page gets generated to add some content (eg. fields) to the submit box (where the publish button is shown).

Example

Below is a basic example that will add a select box right before the submit button.

<?php

add_action( 'post_submitbox_misc_actions', 'my_post_submitbox_misc_actions' );

function my_post_submitbox_misc_actions(){
?>
<div class="misc-pub-section my-options">
	<label for="my_custom_post_action">My Option</label><br />
	<select id="my_custom_post_action" name="my_custom_post_action">
		<option value="1">First Option goes here</option>
		<option value="2">Second Option goes here</option>
	</select>
</div>
<?php
}

?>

Source File

Triggered in wp-admin/includes/meta-boxes.php

Related

Actions

This page is marked as incomplete. You can help Codex by expanding it.