Presenting capabilities that develop since WordPress 3.4 of the theme customization screen. In addition to the standard features, there will be also presented more unique functions available, including the use of the changes introduced in the newest WordPress versions. The main aim of the lecture is to convince theme developers that the theme customization screen may completely replace additional subpages of the dashboard with theme options.
78. Problems with
active_callback
is_front_page will work fine as:
“active_callback” => “is_front_page”
but is_single or is_singular won’t, because they
take an argument which in this case is a handler to
the panel/section/control
96. Results
BEFORE
• potentially thousands
of DOM operations
• manipulations with
style attributes
AFTER
• maximum 2 DOM
operations
• no manipulations
with style attributes
100. Possibilities
• Access to all elements
• Re-render of existing elements
• Modification of existing elements
101. Possibilities
• Access to all elements
• Re-render of existing elements
• Modification of existing elements
• Event tracking and control over the preview area