[wp-trac] [WordPress Trac] #39407: Couldn't call method 'is_customize_preview()' in Widget.php

WordPress Trac noreply at wordpress.org
Wed Dec 28 14:29:42 UTC 2016

#39407: Couldn't call method 'is_customize_preview()' in Widget.php
 Reporter:  n247s         |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.8
Component:  Themes        |     Version:  4.5
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
Changes (by adamsilverstein):

 * keywords:   => needs-patch
 * version:  3.8.1 => 4.5
 * milestone:  Awaiting Review => 4.8


 @n247s Thanks for the bug report. What version of WordPress are you

 The line of code throwing the error was introduced in WordPress 4.5 in
 [37040] "Customize: Require opt-in for selective refresh of widgets.".
 Since `is_customize_preview()` was introduced in 4.0.0 and Twentyfourteen
 works from WordPress 3.6 and up, this is a problem. Introducing a shim for
 this function directly in the theme is probably a safe fix.

Ticket URL: <https://core.trac.wordpress.org/ticket/39407#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list