Closed heldervilela closed 5 years ago
Hi,
So you are talking about Customizer. I could confirm the problem. Thanks for the report.
I remembered it was working a while back so just tried it with different WordPress versions. And It seems the problem occurs in WordPress 4.6, 4.5, and 4.4 and does not occur in WordPress 4.3. (edited)
Since you say widgets, can you check whether it occurs in widgets.php (Dashboard -> Appearance -> Widgets)?
Hello This just happens in the customizer, on the widgets.php page works fine. Can you give me some direction to try fix it?
For widgets to support the Selective Refresh mechanism of Customizer, its handling logic must be introduced.
Admin Page Framework lets each field type define what scripts and styles to load. The image
field type in particular defines its script in the getScripts()
method.
Also, although this is rather a user-side approach, when you instantiate an APF widget class, you may want to set the customize_selective_refresh
argument.
new APF_Widget_Example(
'Widget Title', // widget tite
array(
'description' => 'This is a widget description.', // description
'customize_selective_refresh' => true, // <--- this one
),
);
Thank you. I'll give it a try.
Hello, I want to report 2 bugs.
They are both related to widgets on customizer.
Thanks for the fantastic framework.