<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[36842] trunk/src/wp-includes/class-wp-customize-widgets.php: Docs: Improve syntax and correct documentation throughout a variety of methods in `WP_Customize_Widgets`.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/36842">36842</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/36842","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>DrewAPicture</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2016-03-04 02:01:15 +0000 (Fri, 04 Mar 2016)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Docs: Improve syntax and correct documentation throughout a variety of methods in `WP_Customize_Widgets`.
See <a href="https://core.trac.wordpress.org/ticket/32246">#32246</a>. See <a href="https://core.trac.wordpress.org/ticket/35986">#35986</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpincludesclasswpcustomizewidgetsphp">trunk/src/wp-includes/class-wp-customize-widgets.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpincludesclasswpcustomizewidgetsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-customize-widgets.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-customize-widgets.php 2016-03-04 01:44:19 UTC (rev 36841)
+++ trunk/src/wp-includes/class-wp-customize-widgets.php 2016-03-04 02:01:15 UTC (rev 36842)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -112,7 +112,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Get the widget setting type given a setting ID.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Retrieves the widget setting type given a setting ID.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.2.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access protected
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -136,7 +136,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Inspect the incoming customized data for any widget settings, and dynamically add them up-front so widgets will be initialized properly.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Inspects the incoming customized data for any widget settings, and dynamically adds
+ * them up-front so widgets will be initialized properly.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.2.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -168,7 +169,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Determine the arguments for a dynamically-created setting.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Determines the arguments for a dynamically-created setting.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.2.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -185,10 +186,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Get an unslashed post value or return a default.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Retrieves an unslashed post value or return a default.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- *
</del><span class="cx" style="display: block; padding: 0 10px"> * @access protected
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $name Post value.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -237,18 +237,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Filter old_sidebars_widgets_data Customizer setting.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Filters old_sidebars_widgets_data Customizer setting.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * When switching themes, filter the Customizer setting
- * old_sidebars_widgets_data to supply initial $sidebars_widgets before they
- * were overridden by retrieve_widgets(). The value for
- * old_sidebars_widgets_data gets set in the old theme's sidebars_widgets
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * When switching themes, filter the Customizer setting old_sidebars_widgets_data
+ * to supply initial $sidebars_widgets before they were overridden by retrieve_widgets().
+ * The value for old_sidebars_widgets_data gets set in the old theme's sidebars_widgets
</ins><span class="cx" style="display: block; padding: 0 10px"> * theme_mod.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @see WP_Customize_Widgets::handle_theme_switch()
</del><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @see WP_Customize_Widgets::handle_theme_switch()
+ *
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param array $old_sidebars_widgets
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -257,16 +257,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Filter sidebars_widgets option for theme switch.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Filters sidebars_widgets option for theme switch.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * When switching themes, the retrieve_widgets() function is run when the
- * Customizer initializes, and then the new sidebars_widgets here get
- * supplied as the default value for the sidebars_widgets option.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * When switching themes, the retrieve_widgets() function is run when the Customizer initializes,
+ * and then the new sidebars_widgets here get supplied as the default value for the sidebars_widgets
+ * option.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @see WP_Customize_Widgets::handle_theme_switch()
</del><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @see WP_Customize_Widgets::handle_theme_switch()
</ins><span class="cx" style="display: block; padding: 0 10px"> * @global array $sidebars_widgets
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $sidebars_widgets
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -279,7 +279,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Make sure all widgets get loaded into the Customizer.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Ensures all widgets get loaded into the Customizer.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * Note: these actions are also fired in wp_ajax_update_widget().
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -298,11 +298,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Ensure widgets are available for all types of previews.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Ensures widgets are available for all types of previews.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * When in preview, hook to 'customize_register' for settings
- * after WordPress is loaded so that all filters have been
- * initialized (e.g. Widget Visibility).
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * When in preview, hook to 'customize_register' for settings after WordPress is loaded
+ * so that all filters have been initialized (e.g. Widget Visibility).
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -316,7 +315,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Register Customizer settings and controls for all sidebars and widgets.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Registers Customizer settings and controls for all sidebars and widgets.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -466,7 +465,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Return whether the widgets panel is active, based on whether there are sidebars registered.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Determines whether the widgets panel is active, based on whether there are sidebars registered.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.4.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -482,7 +481,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Covert a widget_id into its corresponding Customizer setting ID (option name).
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Converts a widget_id into its corresponding Customizer setting ID (option name).
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -501,13 +500,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Determine whether the widget is considered "wide".
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Determines whether the widget is considered "wide".
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Core widgets which may have controls wider than 250, but can
- * still be shown in the narrow Customizer panel. The RSS and Text
- * widgets in Core, for example, have widths of 400 and yet they
- * still render fine in the Customizer panel. This method will
- * return all Core widgets as being not wide, but this can be
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Core widgets which may have controls wider than 250, but can still be shown
+ * in the narrow Customizer panel. The RSS and Text widgets in Core, for example,
+ * have widths of 400 and yet they still render fine in the Customizer panel.
+ *
+ * This method will return all Core widgets as being not wide, but this can be
</ins><span class="cx" style="display: block; padding: 0 10px"> * overridden with the is_wide_widget_in_customizer filter.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -538,7 +537,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Covert a widget ID into its id_base and number components.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Converts a widget ID into its id_base and number components.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -563,7 +562,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Convert a widget setting ID (option path) to its id_base and number components.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Converts a widget setting ID (option path) to its id_base and number components.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -584,7 +583,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Call admin_print_styles-widgets.php and admin_print_styles hooks to
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Calls admin_print_styles-widgets.php and admin_print_styles hooks to
</ins><span class="cx" style="display: block; padding: 0 10px"> * allow custom styles from plugins.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -599,7 +598,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Call admin_print_scripts-widgets.php and admin_print_scripts hooks to
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Calls admin_print_scripts-widgets.php and admin_print_scripts hooks to
</ins><span class="cx" style="display: block; padding: 0 10px"> * allow custom scripts from plugins.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -614,7 +613,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Enqueue scripts and styles for Customizer panel and export data to JavaScript.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Enqueues scripts and styles for Customizer panel and export data to JavaScript.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -706,7 +705,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Render the widget form control templates into the DOM.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Renders the widget form control templates into the DOM.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -744,7 +743,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Call admin_print_footer_scripts and admin_print_scripts hooks to
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Calls admin_print_footer_scripts and admin_print_scripts hooks to
</ins><span class="cx" style="display: block; padding: 0 10px"> * allow custom scripts from plugins.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -759,7 +758,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Get common arguments to supply when constructing a Customizer setting.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Retrieves common arguments to supply when constructing a Customizer setting.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -800,7 +799,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Make sure that sidebar widget arrays only ever contain widget IDS.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Ensures sidebar widget arrays only ever contain widget IDS.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * Used as the 'sanitize_callback' for each $sidebars_widgets setting.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -820,7 +819,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Build up an index of all available widgets for use in Backbone models.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Builds up an index of all available widgets for use in Backbone models.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -907,7 +906,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Naturally order available widgets by name.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Naturally orders available widgets by name.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access protected
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -921,7 +920,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Get the widget control markup.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Retrieves the widget control markup.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -941,15 +940,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Get the widget control markup parts.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Retrieves the widget control markup parts.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.4.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $args Widget control arguments.
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @type string $control Markup for widget control wrapping form.
- * @type string $content The contents of the widget form itself.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @type string $control Markup for widget control wrapping form.
+ * @type string $content The contents of the widget form itself.
</ins><span class="cx" style="display: block; padding: 0 10px"> * }
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function get_widget_control_parts( $args ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -972,7 +971,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Add hooks for the Customizer preview.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Adds hooks for the Customizer preview.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -984,7 +983,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Refresh nonce for widget updates.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Refreshes the nonce for widget updates.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.2.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -998,13 +997,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * When previewing, make sure the proper previewing widgets are used.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * When previewing, ensures the proper previewing widgets are used.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Because wp_get_sidebars_widgets() gets called early at init
- * (via wp_convert_widget_settings()) and can set global variable
- * $_wp_sidebars_widgets to the value of get_option( 'sidebars_widgets' )
- * before the Customizer preview filter is added, we have to reset
- * it after the filter has been added.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Because wp_get_sidebars_widgets() gets called early at {@see 'init' } (via
+ * wp_convert_widget_settings()) and can set global variable `$_wp_sidebars_widgets`
+ * to the value of `get_option( 'sidebars_widgets' )` before the Customizer preview
+ * filter is added, it has to be reset after the filter has been added.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1020,7 +1018,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Enqueue scripts for the Customizer preview.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Enqueues scripts for the Customizer preview.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1030,13 +1028,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Insert default style for highlighted widget at early point so theme
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Inserts default style for highlighted widget at early point so theme
</ins><span class="cx" style="display: block; padding: 0 10px"> * stylesheet can override.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- *
- * @action wp_print_styles
</del><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function print_preview_css() {
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1053,8 +1049,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * At the very end of the page, at the very end of the wp_footer,
- * communicate the sidebars that appeared on the page.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Communicates the sidebars that appeared on the page at the very end of the page,
+ * and at the very end of the wp_footer,
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1087,7 +1083,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Keep track of the widgets that were rendered.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Tracks the widgets that were rendered.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1112,7 +1108,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Determine if a sidebar is rendered on the page.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Determines if a sidebar is rendered on the page.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.0.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1125,19 +1121,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Tally the sidebars rendered via is_active_sidebar().
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Tallies the sidebars rendered via is_active_sidebar().
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Keep track of the times that is_active_sidebar() is called
- * in the template, and assume that this means that the sidebar
- * would be rendered on the template if there were widgets
- * populating it.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Keep track of the times that is_active_sidebar() is called in the template,
+ * and assume that this means that the sidebar would be rendered on the template
+ * if there were widgets populating it.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param bool $is_active Whether the sidebar is active.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $sidebar_id Sidebar ID.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return bool
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return bool Whether the sidebar is active.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function tally_sidebars_via_is_active_sidebar_calls( $is_active, $sidebar_id ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_registered_sidebar( $sidebar_id ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1152,7 +1147,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Tally the sidebars rendered via dynamic_sidebar().
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Tallies the sidebars rendered via dynamic_sidebar().
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * Keep track of the times that dynamic_sidebar() is called in the template,
</span><span class="cx" style="display: block; padding: 0 10px"> * and assume this means the sidebar would be rendered on the template if
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1163,7 +1158,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param bool $has_widgets Whether the current sidebar has widgets.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $sidebar_id Sidebar ID.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return bool
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return bool Whether the current sidebar has widgets.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function tally_sidebars_via_dynamic_sidebar_calls( $has_widgets, $sidebar_id ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_registered_sidebar( $sidebar_id ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1179,7 +1174,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Get MAC for a serialized widget instance string.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Retrieves MAC for a serialized widget instance string.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * Allows values posted back from JS to be rejected if any tampering of the
</span><span class="cx" style="display: block; padding: 0 10px"> * data has occurred.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1195,10 +1190,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Sanitize a widget instance.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Sanitizes a widget instance.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Unserialize the JS-instance for storing in the options. It's important
- * that this filter only get applied to an instance once.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Unserialize the JS-instance for storing in the options. It's important that this filter
+ * only get applied to an instance *once*.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1236,7 +1231,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Convert widget instance into JSON-representable format.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Converts a widget instance into JSON-representable format.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1259,7 +1254,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Strip out widget IDs for widgets which are no longer registered.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Strips out widget IDs for widgets which are no longer registered.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * One example where this might happen is when a plugin orphans a widget
</span><span class="cx" style="display: block; padding: 0 10px"> * in a sidebar upon deactivation.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1279,9 +1274,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Find and invoke the widget update and control callbacks.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Finds and invokes the widget update and control callbacks.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Requires that $_POST be populated with the instance data.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Requires that `$_POST` be populated with the instance data.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1406,18 +1401,17 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Update widget settings asynchronously.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Updates widget settings asynchronously.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * Allows the Customizer to update a widget using its form, but return the new
</span><span class="cx" style="display: block; padding: 0 10px"> * instance info via Ajax instead of saving it to the options table.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Most code here copied from wp_ajax_save_widget()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Most code here copied from wp_ajax_save_widget().
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @see wp_ajax_save_widget()
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- *
</del><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function wp_ajax_update_widget() {
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1506,7 +1500,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Add hooks for selective refresh.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Adds hooks for selective refresh.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.5.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1524,7 +1518,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Enqueue scripts for the Customizer preview.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Enqueues scripts for the Customizer preview.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.5.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1599,25 +1593,25 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * List of the tag names seen for before_widget strings.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * This is used in the filter_wp_kses_allowed_html filter to ensure that the
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * This is used in the {@see 'filter_wp_kses_allowed_html'} filter to ensure that the
</ins><span class="cx" style="display: block; padding: 0 10px"> * data-* attributes can be whitelisted.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.5.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @access private
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @access protected
</ins><span class="cx" style="display: block; padding: 0 10px"> * @var array
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> protected $before_widget_tags_seen = array();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Ensure that the HTML data-* attributes for selective refresh are allowed by kses.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Ensures the HTML data-* attributes for selective refresh are allowed by kses.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * This is needed in case the $before_widget is run through wp_kses() when printed.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * This is needed in case the `$before_widget` is run through wp_kses() when printed.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.5.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $allowed_html Allowed HTML.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return array Allowed HTML.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return array (Maybe) modified allowed HTML.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function filter_wp_kses_allowed_data_attributes( $allowed_html ) {
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( array_keys( $this->before_widget_tags_seen ) as $tag_name ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1644,7 +1638,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * This helps facilitate the uncommon scenario where a single sidebar is rendered multiple times on a template.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.5.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @access private
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @access protected
</ins><span class="cx" style="display: block; padding: 0 10px"> * @var array
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> protected $sidebar_instance_count = array();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1653,7 +1647,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * The current request's sidebar_instance_number context.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.5.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @access private
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @access protected
</ins><span class="cx" style="display: block; padding: 0 10px"> * @var int
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> protected $context_sidebar_instance_number;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1662,17 +1656,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Current sidebar ID being rendered.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.5.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @access private
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @access protected
</ins><span class="cx" style="display: block; padding: 0 10px"> * @var array
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> protected $current_dynamic_sidebar_id_stack = array();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Start keeping track of the current sidebar being rendered.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Begins keeping track of the current sidebar being rendered.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * Insert marker before widgets are rendered in a dynamic sidebar.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.5.0
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @access public
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int|string $index Index, name, or ID of the dynamic sidebar.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1688,11 +1683,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Finish keeping track of the current sidebar being rendered.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Finishes keeping track of the current sidebar being rendered.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Insert marker after widgets are rendered in a dynamic sidebar.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Inserts a marker after widgets are rendered in a dynamic sidebar.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.5.0
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @access public
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int|string $index Index, name, or ID of the dynamic sidebar.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1707,7 +1703,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Current sidebar being rendered.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.5.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @access private
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @access protected
</ins><span class="cx" style="display: block; padding: 0 10px"> * @var string
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> protected $rendering_widget_id;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1716,19 +1712,19 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Current widget being rendered.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.5.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @access private
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @access protected
</ins><span class="cx" style="display: block; padding: 0 10px"> * @var string
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> protected $rendering_sidebar_id;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Filter sidebars_widgets to ensure the currently-rendered widget is the only widget in the current sidebar.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Filters sidebars_widgets to ensure the currently-rendered widget is the only widget in the current sidebar.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.5.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @access private
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @access protected
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $sidebars_widgets Sidebars widgets.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return array Sidebars widgets.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return array Filtered sidebars widgets.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function filter_sidebars_widgets_for_rendering_widget( $sidebars_widgets ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $sidebars_widgets[ $this->rendering_sidebar_id ] = array( $this->rendering_widget_id );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1736,19 +1732,19 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Render a specific widget using the supplied sidebar arguments.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Renders a specific widget using the supplied sidebar arguments.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.5.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @see dynamic_sidebar()
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param WP_Customize_Partial $partial Partial.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param WP_Customize_Partial $partial Partial.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param array $context {
</span><span class="cx" style="display: block; padding: 0 10px"> * Sidebar args supplied as container context.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @type string $sidebar_id ID for sidebar for widget to render into.
- * @type int [$sidebar_instance_number] Disambiguating instance number.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @type string $sidebar_id ID for sidebar for widget to render into.
+ * @type int $sidebar_instance_number Disambiguating instance number.
</ins><span class="cx" style="display: block; padding: 0 10px"> * }
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string|false
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1813,7 +1809,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> protected $_is_capturing_option_updates = false;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Determine whether the captured option update should be ignored.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Determines whether the captured option update should be ignored.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access protected
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1826,7 +1822,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Retrieve captured widget option updates.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Retrieves captured widget option updates.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access protected
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1838,13 +1834,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Get the option that was captured from being saved.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Retrieves the option that was captured from being saved.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.2.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access protected
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $option_name Option name.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param mixed $default Optional. Default value to return if the option does not exist.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param mixed $default Optional. Default value to return if the option does not exist. Default false.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @return mixed Value set for the option.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> protected function get_captured_option( $option_name, $default = false ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1857,7 +1853,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Get the number of captured widget option updates.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Retrieves the number of captured widget option updates.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access protected
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1869,7 +1865,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Start keeping track of changes to widget options, caching new values.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Begins keeping track of changes to widget options, caching new values.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access protected
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1885,7 +1881,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Pre-filter captured option values before updating.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Pre-filters captured option values before updating.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1910,7 +1906,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Pre-filter captured option values before retrieving.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Pre-filters captured option values before retrieving.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1932,7 +1928,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Undo any changes to the options since options capture began.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Undoes any changes to the options since options capture began.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access protected
</span></span></pre>
</div>
</div>
</body>
</html>