This repository was archived by the owner on Dec 16, 2022. It is now read-only.
Description If I click “Preview changes” in:
I am then opened in the Customizer where I can then select a featured image to preview:
However, upon clicking to go Back out of the Customizer, the featured image is not set in the metabox:
This used to work, so it may be a regression introduced in 4.8 or due to a change in the plugin itself.
This is the code in question:
// Handle syncing settings from Customizer to edit post admin page.
wp . customize . bind ( 'settings-from-customizer' , function ( settings ) {
var value , nonce , settingId = EditPostPreviewAdmin . getPostMetaSettingId ( metaKey ) ;
if ( 'undefined' === typeof settings [ settingId ] ) {
return ;
}
value = settings [ settingId ] ;
nonce = $ ( '#set_post_thumbnail_nonce' ) . val ( ) ;
$ ( inputSelector ) . val ( value ) . trigger ( 'change' ) ;
if ( value > 0 ) {
wp . media . featuredImage . set ( value ) ;
} else {
window . WPRemoveThumbnail ( nonce ) ;
}
} ) ;
Reactions are currently unavailable
If I click “Preview changes” in:
I am then opened in the Customizer where I can then select a featured image to preview:
However, upon clicking to go Back out of the Customizer, the featured image is not set in the metabox:
This used to work, so it may be a regression introduced in 4.8 or due to a change in the plugin itself.
This is the code in question:
wp-customize-posts/js/edit-post-preview-admin-featured-image.js
Lines 19 to 34 in 936b25e