Fix widget count on dashboard to account for orphaned widgets. see #19553 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@19653 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8fd2ce80b6
commit
64a967b0f0
@ -395,7 +395,7 @@ function wp_dashboard_right_now() {
|
||||
$sidebars_widgets = wp_get_sidebars_widgets();
|
||||
$num_widgets = 0;
|
||||
foreach ( (array) $sidebars_widgets as $k => $v ) {
|
||||
if ( 'wp_inactive_widgets' == $k )
|
||||
if ( 'wp_inactive_widgets' == $k || 'orphaned_widgets' == substr( $k, 0, 16 ) )
|
||||
continue;
|
||||
if ( is_array($v) )
|
||||
$num_widgets = $num_widgets + count($v);
|
||||
|
Loading…
Reference in New Issue
Block a user