Move wp_widgets_access_body_class()
(a hook callback) from wp-admin/widgets.php
to wp-admin/includes/widgets.php
.
See #33813. git-svn-id: https://develop.svn.wordpress.org/trunk@34017 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a55b56c3d2
commit
8af9ff0e56
@ -263,3 +263,12 @@ function wp_widget_control( $sidebar_args ) {
|
|||||||
|
|
||||||
return $sidebar_args;
|
return $sidebar_args;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param string $classes
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function wp_widgets_access_body_class($classes) {
|
||||||
|
return "$classes widgets_access ";
|
||||||
|
}
|
@ -26,15 +26,6 @@ if ( isset($_GET['widgets-access']) ) {
|
|||||||
set_user_setting( 'widgets_access', $widgets_access );
|
set_user_setting( 'widgets_access', $widgets_access );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param string $classes
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
function wp_widgets_access_body_class($classes) {
|
|
||||||
return "$classes widgets_access ";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( 'on' == $widgets_access ) {
|
if ( 'on' == $widgets_access ) {
|
||||||
add_filter( 'admin_body_class', 'wp_widgets_access_body_class' );
|
add_filter( 'admin_body_class', 'wp_widgets_access_body_class' );
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user