More hooks on the edit screen: edit_form_after_title and edit_form_after_editor

In 3.5, we’ve introduced two new hooksHooks In WordPress theme and development, hooks are functions that can be applied to an action or a Filter in WordPress. Actions are functions performed when a certain event occurs in WordPress. Filters allow you to modify certain functions. Arguments used to hook both filters and actions look the same. for the add/edit post screen: edit_form_after_title and edit_form_after_editor. Previously, there was the edit_form_advanced hook (or edit_page_form for pages), which appeared between the normal and advanced sections of metaboxes below the editor. Now you’ll be able to use edit_form_after_title and edit_form_after_editor, both of which are available even if the post type doesn’t support the title or editor.

While lots of things are appropriate in the various metaboxMetabox A post metabox is a draggable box shown on the post editing screen. Its purpose is to allow the user to select or enter information in addition to the main post content. This information should be related to the post in some way. areas, sometimes your customizations to the screen might need to go elsewhere. TinyMCE is a prime example, as it doesn’t like being moved in the DOM, such as in a draggable metabox. CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. itself is now using edit_form_after_title on attachment editing to display the image and some fields for editing.

Example Code:

add_action( 'edit_form_after_title', 'myprefix_edit_form_after_title' );
function myprefix_edit_form_after_title() {
	echo '<h2>This is edit_form_after_title!</h2>';
}

add_action( 'edit_form_after_editor', 'myprefix_edit_form_after_editor' );
function myprefix_edit_form_after_editor() {
	echo '<h2>This is edit_form_after_editor!</h2>';
}

add_action( 'edit_form_advanced', 'myprefix_edit_form_advanced' );
function myprefix_edit_form_advanced() {
	echo '<h2>This is ye olde edit_form_advanced!</h2>';
}

Result:

Edit Form Hooks in 3.5

#3-5, #dev-notes