From 5af905deab830d462987781c3d28c3ca753bacc1 Mon Sep 17 00:00:00 2001 From: Thomas Guillot Date: Tue, 21 Feb 2017 15:32:59 +0000 Subject: [PATCH] Content Options: Always load Featured Images functionality if we are in the Customizer but not on the front end if all the options are ticked. In order to trigger the filtering function on first unclick in the Customizer we need `( 1 === $opts['archive-option'] && 1 === $opts['post-option'] && 1 === $opts['page-option'] )` to return `true`. --- modules/theme-tools/content-options.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/theme-tools/content-options.php b/modules/theme-tools/content-options.php index b8349581d3dca..5a97aee84eaa4 100644 --- a/modules/theme-tools/content-options.php +++ b/modules/theme-tools/content-options.php @@ -85,9 +85,9 @@ function jetpack_featured_images_get_settings() { function jetpack_featured_images_should_load() { $opts = jetpack_featured_images_get_settings(); - // If the theme doesn't support archive, post and page or if all the options are ticked, don't continue. + // If the theme doesn't support archive, post and page or if all the options are ticked and we aren't in the customizer, don't continue. if ( ( true !== $opts['archive'] && true !== $opts['post'] && true !== $opts['page'] ) - || ( 1 === $opts['archive-option'] && 1 === $opts['post-option'] && 1 === $opts['page-option'] ) ) { + || ( 1 === $opts['archive-option'] && 1 === $opts['post-option'] && 1 === $opts['page-option'] && ! is_customize_preview() ) ) { return false; }