replace_editor filter-hookWP 4.9.0

Allows replacement of the editor.

Usage

add_filter( 'replace_editor', 'wp_kama_replace_editor_filter', 10, 2 );

/**
 * Function for `replace_editor` filter-hook.
 * 
 * @param bool    $replace Whether to replace the editor.
 * @param WP_Post $post    Post object.
 *
 * @return bool
 */
function wp_kama_replace_editor_filter( $replace, $post ){

	// filter...
	return $replace;
}
$replace(true|false)
Whether to replace the editor.
Default: false
$post(WP_Post)
Post object.

Changelog

Since 4.9.0 Introduced.

Where the hook is called

In file: /wp-admin/post.php
replace_editor
wp-admin/post.php 182
if ( true === apply_filters( 'replace_editor', false, $post ) ) {
wp-admin/includes/class-wp-screen.php 312
$replace_editor = apply_filters( 'replace_editor', false, $post );
wp-admin/post-new.php 70
if ( apply_filters( 'replace_editor', false, $post ) !== true ) {

Where the hook is used in WordPress

Usage not found.