author | ymh <ymh.work@gmail.com> |
Fri, 05 Sep 2025 18:52:52 +0200 | |
changeset 22 | 8c2e4d02f4ef |
parent 21 | 48c4eec2b7e6 |
permissions | -rw-r--r-- |
0 | 1 |
<?php |
2 |
/** |
|
3 |
* WordPress Widgets Administration API |
|
4 |
* |
|
5 |
* @package WordPress |
|
6 |
* @subpackage Administration |
|
7 |
*/ |
|
8 |
||
9 |
/** |
|
10 |
* Display list of the available widgets. |
|
11 |
* |
|
12 |
* @since 2.5.0 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
13 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
14 |
* @global array $wp_registered_widgets |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
15 |
* @global array $wp_registered_widget_controls |
0 | 16 |
*/ |
17 |
function wp_list_widgets() { |
|
5 | 18 |
global $wp_registered_widgets, $wp_registered_widget_controls; |
0 | 19 |
|
20 |
$sort = $wp_registered_widgets; |
|
21 |
usort( $sort, '_sort_name_callback' ); |
|
22 |
$done = array(); |
|
23 |
||
24 |
foreach ( $sort as $widget ) { |
|
16 | 25 |
if ( in_array( $widget['callback'], $done, true ) ) { // We already showed this multi-widget. |
0 | 26 |
continue; |
9 | 27 |
} |
0 | 28 |
|
29 |
$sidebar = is_active_widget( $widget['callback'], $widget['id'], false, false ); |
|
9 | 30 |
$done[] = $widget['callback']; |
0 | 31 |
|
9 | 32 |
if ( ! isset( $widget['params'][0] ) ) { |
0 | 33 |
$widget['params'][0] = array(); |
9 | 34 |
} |
0 | 35 |
|
9 | 36 |
$args = array( |
37 |
'widget_id' => $widget['id'], |
|
38 |
'widget_name' => $widget['name'], |
|
39 |
'_display' => 'template', |
|
40 |
); |
|
0 | 41 |
|
9 | 42 |
if ( isset( $wp_registered_widget_controls[ $widget['id'] ]['id_base'] ) && isset( $widget['params'][0]['number'] ) ) { |
43 |
$id_base = $wp_registered_widget_controls[ $widget['id'] ]['id_base']; |
|
44 |
$args['_temp_id'] = "$id_base-__i__"; |
|
45 |
$args['_multi_num'] = next_widget_id_number( $id_base ); |
|
46 |
$args['_add'] = 'multi'; |
|
0 | 47 |
} else { |
48 |
$args['_add'] = 'single'; |
|
9 | 49 |
if ( $sidebar ) { |
0 | 50 |
$args['_hide'] = '1'; |
9 | 51 |
} |
0 | 52 |
} |
53 |
||
16 | 54 |
$control_args = array( |
55 |
0 => $args, |
|
56 |
1 => $widget['params'][0], |
|
9 | 57 |
); |
16 | 58 |
$sidebar_args = wp_list_widget_controls_dynamic_sidebar( $control_args ); |
59 |
||
60 |
wp_widget_control( ...$sidebar_args ); |
|
0 | 61 |
} |
62 |
} |
|
63 |
||
64 |
/** |
|
65 |
* Callback to sort array by a 'name' key. |
|
66 |
* |
|
67 |
* @since 3.1.0 |
|
68 |
* @access private |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
69 |
* |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
70 |
* @param array $a First array. |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
71 |
* @param array $b Second array. |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
72 |
* @return int |
0 | 73 |
*/ |
74 |
function _sort_name_callback( $a, $b ) { |
|
75 |
return strnatcasecmp( $a['name'], $b['name'] ); |
|
76 |
} |
|
77 |
||
78 |
/** |
|
79 |
* Show the widgets and their settings for a sidebar. |
|
80 |
* Used in the admin widget config screen. |
|
81 |
* |
|
82 |
* @since 2.5.0 |
|
83 |
* |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
84 |
* @param string $sidebar Sidebar ID. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
85 |
* @param string $sidebar_name Optional. Sidebar name. Default empty. |
0 | 86 |
*/ |
5 | 87 |
function wp_list_widget_controls( $sidebar, $sidebar_name = '' ) { |
0 | 88 |
add_filter( 'dynamic_sidebar_params', 'wp_list_widget_controls_dynamic_sidebar' ); |
89 |
||
90 |
$description = wp_sidebar_description( $sidebar ); |
|
91 |
||
5 | 92 |
echo '<div id="' . esc_attr( $sidebar ) . '" class="widgets-sortables">'; |
93 |
||
94 |
if ( $sidebar_name ) { |
|
9 | 95 |
$add_to = sprintf( |
16 | 96 |
/* translators: %s: Widgets sidebar name. */ |
9 | 97 |
__( 'Add to: %s' ), |
98 |
$sidebar_name |
|
99 |
); |
|
5 | 100 |
?> |
9 | 101 |
<div class="sidebar-name" data-add-to="<?php echo esc_attr( $add_to ); ?>"> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
102 |
<button type="button" class="handlediv hide-if-no-js" aria-expanded="true"> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
103 |
<span class="screen-reader-text"><?php echo esc_html( $sidebar_name ); ?></span> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
104 |
<span class="toggle-indicator" aria-hidden="true"></span> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
105 |
</button> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
106 |
<h2><?php echo esc_html( $sidebar_name ); ?> <span class="spinner"></span></h2> |
5 | 107 |
</div> |
108 |
<?php |
|
0 | 109 |
} |
110 |
||
5 | 111 |
if ( ! empty( $description ) ) { |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
112 |
?> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
113 |
<div class="sidebar-description"> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
114 |
<p class="description"><?php echo $description; ?></p> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
115 |
</div> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
116 |
<?php |
5 | 117 |
} |
118 |
||
0 | 119 |
dynamic_sidebar( $sidebar ); |
5 | 120 |
|
121 |
echo '</div>'; |
|
0 | 122 |
} |
123 |
||
124 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
125 |
* Retrieves the widget control arguments. |
0 | 126 |
* |
127 |
* @since 2.5.0 |
|
128 |
* |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
129 |
* @global array $wp_registered_widgets |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
130 |
* |
0 | 131 |
* @param array $params |
132 |
* @return array |
|
133 |
*/ |
|
134 |
function wp_list_widget_controls_dynamic_sidebar( $params ) { |
|
135 |
global $wp_registered_widgets; |
|
136 |
static $i = 0; |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
137 |
++$i; |
0 | 138 |
|
139 |
$widget_id = $params[0]['widget_id']; |
|
9 | 140 |
$id = isset( $params[0]['_temp_id'] ) ? $params[0]['_temp_id'] : $widget_id; |
141 |
$hidden = isset( $params[0]['_hide'] ) ? ' style="display:none;"' : ''; |
|
0 | 142 |
|
143 |
$params[0]['before_widget'] = "<div id='widget-{$i}_{$id}' class='widget'$hidden>"; |
|
9 | 144 |
$params[0]['after_widget'] = '</div>'; |
16 | 145 |
$params[0]['before_title'] = '%BEG_OF_TITLE%'; // Deprecated. |
146 |
$params[0]['after_title'] = '%END_OF_TITLE%'; // Deprecated. |
|
147 |
||
9 | 148 |
if ( is_callable( $wp_registered_widgets[ $widget_id ]['callback'] ) ) { |
149 |
$wp_registered_widgets[ $widget_id ]['_callback'] = $wp_registered_widgets[ $widget_id ]['callback']; |
|
150 |
$wp_registered_widgets[ $widget_id ]['callback'] = 'wp_widget_control'; |
|
0 | 151 |
} |
152 |
||
153 |
return $params; |
|
154 |
} |
|
155 |
||
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
156 |
/** |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
157 |
* @global array $wp_registered_widgets |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
158 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
159 |
* @param string $id_base |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
160 |
* @return int |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
161 |
*/ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
162 |
function next_widget_id_number( $id_base ) { |
0 | 163 |
global $wp_registered_widgets; |
164 |
$number = 1; |
|
165 |
||
166 |
foreach ( $wp_registered_widgets as $widget_id => $widget ) { |
|
18 | 167 |
if ( preg_match( '/' . preg_quote( $id_base, '/' ) . '-([0-9]+)$/', $widget_id, $matches ) ) { |
9 | 168 |
$number = max( $number, $matches[1] ); |
169 |
} |
|
0 | 170 |
} |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
171 |
++$number; |
0 | 172 |
|
173 |
return $number; |
|
174 |
} |
|
175 |
||
176 |
/** |
|
177 |
* Meta widget used to display the control form for a widget. |
|
178 |
* |
|
179 |
* Called from dynamic_sidebar(). |
|
180 |
* |
|
181 |
* @since 2.5.0 |
|
182 |
* |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
183 |
* @global array $wp_registered_widgets |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
184 |
* @global array $wp_registered_widget_controls |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
185 |
* @global array $sidebars_widgets |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
186 |
* |
0 | 187 |
* @param array $sidebar_args |
188 |
* @return array |
|
189 |
*/ |
|
190 |
function wp_widget_control( $sidebar_args ) { |
|
191 |
global $wp_registered_widgets, $wp_registered_widget_controls, $sidebars_widgets; |
|
192 |
||
9 | 193 |
$widget_id = $sidebar_args['widget_id']; |
194 |
$sidebar_id = isset( $sidebar_args['id'] ) ? $sidebar_args['id'] : false; |
|
16 | 195 |
$key = $sidebar_id ? array_search( $widget_id, $sidebars_widgets[ $sidebar_id ], true ) : '-1'; // Position of widget in sidebar. |
9 | 196 |
$control = isset( $wp_registered_widget_controls[ $widget_id ] ) ? $wp_registered_widget_controls[ $widget_id ] : array(); |
197 |
$widget = $wp_registered_widgets[ $widget_id ]; |
|
0 | 198 |
|
9 | 199 |
$id_format = $widget['id']; |
200 |
$widget_number = isset( $control['params'][0]['number'] ) ? $control['params'][0]['number'] : ''; |
|
201 |
$id_base = isset( $control['id_base'] ) ? $control['id_base'] : $widget_id; |
|
202 |
$width = isset( $control['width'] ) ? $control['width'] : ''; |
|
203 |
$height = isset( $control['height'] ) ? $control['height'] : ''; |
|
204 |
$multi_number = isset( $sidebar_args['_multi_num'] ) ? $sidebar_args['_multi_num'] : ''; |
|
205 |
$add_new = isset( $sidebar_args['_add'] ) ? $sidebar_args['_add'] : ''; |
|
0 | 206 |
|
9 | 207 |
$before_form = isset( $sidebar_args['before_form'] ) ? $sidebar_args['before_form'] : '<form method="post">'; |
208 |
$after_form = isset( $sidebar_args['after_form'] ) ? $sidebar_args['after_form'] : '</form>'; |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
209 |
$before_widget_content = isset( $sidebar_args['before_widget_content'] ) ? $sidebar_args['before_widget_content'] : '<div class="widget-content">'; |
9 | 210 |
$after_widget_content = isset( $sidebar_args['after_widget_content'] ) ? $sidebar_args['after_widget_content'] : '</div>'; |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
211 |
|
0 | 212 |
$query_arg = array( 'editwidget' => $widget['id'] ); |
213 |
if ( $add_new ) { |
|
214 |
$query_arg['addnew'] = 1; |
|
215 |
if ( $multi_number ) { |
|
9 | 216 |
$query_arg['num'] = $multi_number; |
0 | 217 |
$query_arg['base'] = $id_base; |
218 |
} |
|
219 |
} else { |
|
220 |
$query_arg['sidebar'] = $sidebar_id; |
|
9 | 221 |
$query_arg['key'] = $key; |
0 | 222 |
} |
223 |
||
5 | 224 |
/* |
225 |
* We aren't showing a widget control, we're outputting a template |
|
226 |
* for a multi-widget control. |
|
227 |
*/ |
|
16 | 228 |
if ( isset( $sidebar_args['_display'] ) && 'template' === $sidebar_args['_display'] && $widget_number ) { |
229 |
// number == -1 implies a template where id numbers are replaced by a generic '__i__'. |
|
0 | 230 |
$control['params'][0]['number'] = -1; |
19 | 231 |
// With id_base widget ID's are constructed like {$id_base}-{$id_number}. |
9 | 232 |
if ( isset( $control['id_base'] ) ) { |
0 | 233 |
$id_format = $control['id_base'] . '-__i__'; |
9 | 234 |
} |
0 | 235 |
} |
236 |
||
9 | 237 |
$wp_registered_widgets[ $widget_id ]['callback'] = $wp_registered_widgets[ $widget_id ]['_callback']; |
238 |
unset( $wp_registered_widgets[ $widget_id ]['_callback'] ); |
|
0 | 239 |
|
240 |
$widget_title = esc_html( strip_tags( $sidebar_args['widget_name'] ) ); |
|
9 | 241 |
$has_form = 'noform'; |
0 | 242 |
|
9 | 243 |
echo $sidebar_args['before_widget']; |
244 |
?> |
|
0 | 245 |
<div class="widget-top"> |
246 |
<div class="widget-title-action"> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
247 |
<button type="button" class="widget-action hide-if-no-js" aria-expanded="false"> |
16 | 248 |
<span class="screen-reader-text edit"> |
249 |
<?php |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
250 |
/* translators: Hidden accessibility text. %s: Widget title. */ |
16 | 251 |
printf( __( 'Edit widget: %s' ), $widget_title ); |
252 |
?> |
|
253 |
</span> |
|
254 |
<span class="screen-reader-text add"> |
|
255 |
<?php |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
256 |
/* translators: Hidden accessibility text. %s: Widget title. */ |
16 | 257 |
printf( __( 'Add widget: %s' ), $widget_title ); |
258 |
?> |
|
259 |
</span> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
260 |
<span class="toggle-indicator" aria-hidden="true"></span> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
261 |
</button> |
0 | 262 |
<a class="widget-control-edit hide-if-js" href="<?php echo esc_url( add_query_arg( $query_arg ) ); ?>"> |
263 |
<span class="edit"><?php _ex( 'Edit', 'widget' ); ?></span> |
|
264 |
<span class="add"><?php _ex( 'Add', 'widget' ); ?></span> |
|
265 |
<span class="screen-reader-text"><?php echo $widget_title; ?></span> |
|
266 |
</a> |
|
267 |
</div> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
268 |
<div class="widget-title"><h3><?php echo $widget_title; ?><span class="in-widget-title"></span></h3></div> |
0 | 269 |
</div> |
270 |
||
271 |
<div class="widget-inside"> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
272 |
<?php echo $before_form; ?> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
273 |
<?php echo $before_widget_content; ?> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
274 |
<?php |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
275 |
if ( isset( $control['callback'] ) ) { |
0 | 276 |
$has_form = call_user_func_array( $control['callback'], $control['params'] ); |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
277 |
} else { |
9 | 278 |
echo "\t\t<p>" . __( 'There are no options for this widget.' ) . "</p>\n"; |
279 |
} |
|
280 |
||
281 |
$noform_class = ''; |
|
282 |
if ( 'noform' === $has_form ) { |
|
283 |
$noform_class = ' widget-control-noform'; |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
284 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
285 |
?> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
286 |
<?php echo $after_widget_content; ?> |
9 | 287 |
<input type="hidden" name="widget-id" class="widget-id" value="<?php echo esc_attr( $id_format ); ?>" /> |
288 |
<input type="hidden" name="id_base" class="id_base" value="<?php echo esc_attr( $id_base ); ?>" /> |
|
289 |
<input type="hidden" name="widget-width" class="widget-width" value="<?php echo esc_attr( $width ); ?>" /> |
|
290 |
<input type="hidden" name="widget-height" class="widget-height" value="<?php echo esc_attr( $height ); ?>" /> |
|
291 |
<input type="hidden" name="widget_number" class="widget_number" value="<?php echo esc_attr( $widget_number ); ?>" /> |
|
292 |
<input type="hidden" name="multi_number" class="multi_number" value="<?php echo esc_attr( $multi_number ); ?>" /> |
|
293 |
<input type="hidden" name="add_new" class="add_new" value="<?php echo esc_attr( $add_new ); ?>" /> |
|
0 | 294 |
|
295 |
<div class="widget-control-actions"> |
|
296 |
<div class="alignleft"> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
297 |
<button type="button" class="button-link button-link-delete widget-control-remove"><?php _e( 'Delete' ); ?></button> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
298 |
<span class="widget-control-close-wrapper"> |
18 | 299 |
| <button type="button" class="button-link widget-control-close"><?php _e( 'Done' ); ?></button> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
300 |
</span> |
0 | 301 |
</div> |
9 | 302 |
<div class="alignright<?php echo $noform_class; ?>"> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
303 |
<?php submit_button( __( 'Save' ), 'primary widget-control-save right', 'savewidget', false, array( 'id' => 'widget-' . esc_attr( $id_format ) . '-savewidget' ) ); ?> |
0 | 304 |
<span class="spinner"></span> |
305 |
</div> |
|
306 |
<br class="clear" /> |
|
307 |
</div> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
308 |
<?php echo $after_form; ?> |
0 | 309 |
</div> |
310 |
||
311 |
<div class="widget-description"> |
|
16 | 312 |
<?php |
313 |
$widget_description = wp_widget_description( $widget_id ); |
|
314 |
echo ( $widget_description ) ? "$widget_description\n" : "$widget_title\n"; |
|
315 |
?> |
|
0 | 316 |
</div> |
9 | 317 |
<?php |
0 | 318 |
echo $sidebar_args['after_widget']; |
5 | 319 |
|
0 | 320 |
return $sidebar_args; |
321 |
} |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
322 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
323 |
/** |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
324 |
* @param string $classes |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
325 |
* @return string |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
326 |
*/ |
9 | 327 |
function wp_widgets_access_body_class( $classes ) { |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
328 |
return "$classes widgets_access "; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
329 |
} |