Editor Filters (Experimental) Edit

To modify the behavior of the editor experience, the following Filters are exposed:

editor.PostFeaturedImage.imageSize editor.PostFeaturedImage.imageSize

Used to modify the image size displayed in the Post Featured Image component. It defaults to 'post-thumbnail', and will fail back to the full image size when the specified image size doesn’t exist in the media object. It’s modeled after the admin_post_thumbnail_size filter in the classic editor.


var withImageSize = function( size, mediaId, postId ) {
    return 'large';

wp.hooks.addFilter( 'editor.PostFeaturedImage.imageSize', 'my-plugin/with-image-size', withImageSize );

Top ↑

editor.PostPreview.interstitialMarkup editor.PostPreview.interstitialMarkup

Filters the interstitial message shown when generating previews.


var customPreviewMessage = function() {
    return '<b>Post preview is being generated!</b>';

wp.hooks.addFilter( 'editor.PostPreview.interstitialMarkup', 'my-plugin/custom-preview-message', customPreviewMessage );
Skip to toolbar