edit_form_after_editoraction-hookWP 3.5.0

Fires after the visual editor, allowing the displayed content to be controlled. Outputs nothing by default.

Example block with a blue background

Usage

add_action( 'edit_form_after_editor', 'wp_kama_edit_form_after_editor_action' );

/**
 * Function for `edit_form_after_editor` action-hook.
 * 
 * @param WP_Post $post Post object.
 *
 * @return void
 */
function wp_kama_edit_form_after_editor_action( $post ){

	// action...
}
$post(WP_Post)
The post object. See get_post() for the object structure.

Examples

#1 Add a block after the content editor for all post types

add_action( 'edit_form_after_editor', 'post_edit_form_after_editor' );
function post_edit_form_after_editor( $post ) {
	?>
	<div style="margin-top: 10px;padding: 15px;color: #fff;background: #0085ba;">
		Anything can be displayed here!
	</div>
	<?php
}


The visual editor height was reduced for the screenshot; it is actually 300px.

#2 Add a block selectively after the content editor

add_action( 'edit_form_after_editor', 'post_edit_form_after_editor' );
function post_edit_form_after_editor( $post ) {

	// For posts
	if ( $post->post_type === 'post' ) {
		echo '<p>You are editing a Post, so you see this block.</p>';
	}

	// For pages
	if ( $post->post_type === 'page' ) {
		echo '<p>You are editing a Page, so you see this block.</p>';
	}

	// For a custom post type, for example, "Employees"
	if ( $post->post_type === 'workers' ) {
		echo '<p>You are editing an Employee card, so you see this block.</p>';
	}
}

Changelog

Since 3.5.0 Introduced.

Where the hook is called

In file: /wp-admin/edit-form-advanced.php
edit_form_after_editor
wp-admin/edit-form-advanced.php 682
do_action( 'edit_form_after_editor', $post );

Where the hook is used in WordPress

wp-admin/includes/admin-filters.php 90
add_action( 'edit_form_after_editor', '_enable_content_editor_for_navigation_post_type' );