wphooks.info - replace_editor

replace_editor

(trunk - 5.1-alpha-44286)

The hook occurs in the following 2 files

wp-admin/post-new.php:
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
		'<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
		'<p>' . __( 'Sorry, you are not allowed to create posts as this user.' ) . '</p>',
		403
	);
}

$post    = get_default_post_to_edit( $post_type, true );
$post_ID = $post->ID;

/** This filter is documented in wp-admin/post.php */
if ( apply_filters( 'replace_editor', false, $post ) !== true ) {
	if ( use_block_editor_for_post( $post ) ) {
		include( ABSPATH . 'wp-admin/edit-form-blocks.php' );
	} else {
		wp_enqueue_script( 'autosave' );
		include( ABSPATH . 'wp-admin/edit-form-advanced.php' );
	}
}

include( ABSPATH . 'wp-admin/admin-footer.php' );
wp-admin/post.php:
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
		}

		/**
		 * Allows replacement of the editor.
		 *
		 * @since 4.9.0
		 *
		 * @param boolean      Whether to replace the editor. Default false.
		 * @param object $post Post object.
		 */
		if ( apply_filters( 'replace_editor', false, $post ) === true ) {
			break;
		}

		if ( use_block_editor_for_post( $post ) ) {
			include( ABSPATH . 'wp-admin/edit-form-blocks.php' );
			break;
		}

		if ( ! wp_check_post_lock( $post->ID ) ) {