In the style of #30947 and default-filters.php, add 2 new files to wp-admin/includes:

`admin-filters.php`
`ms-admin-filters.php`

There are random actions and filters littered among files like `misc.php`. These files contain functions that won't work outside of admin context and are typically only loaded in files that have already loaded the admin bootstrap.

See #32529.


git-svn-id: https://develop.svn.wordpress.org/trunk@32653 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2015-05-29 17:03:13 +00:00
parent d5e9f8770a
commit d55800a4f2
18 changed files with 141 additions and 91 deletions

View File

@@ -188,7 +188,6 @@ function core_update_footer( $msg = '' ) {
return sprintf( __( 'Version %s' ), get_bloginfo( 'version', 'display' ) );
}
}
add_filter( 'update_footer', 'core_update_footer' );
/**
*
@@ -216,8 +215,6 @@ function update_nag() {
}
echo "<div class='update-nag'>$msg</div>";
}
add_action( 'admin_notices', 'update_nag', 3 );
add_action( 'network_admin_notices', 'update_nag', 3 );
// Called directly from dashboard
function update_right_now_message() {
@@ -266,7 +263,6 @@ function wp_plugin_update_rows() {
}
}
}
add_action( 'admin_init', 'wp_plugin_update_rows' );
function wp_plugin_update_row( $file, $plugin_data ) {
$current = get_site_transient( 'update_plugins' );
@@ -362,7 +358,6 @@ function wp_theme_update_rows() {
}
}
}
add_action( 'admin_init', 'wp_theme_update_rows' );
function wp_theme_update_row( $theme_key, $theme ) {
$current = get_site_transient( 'update_themes' );
@@ -441,5 +436,3 @@ function maintenance_nag() {
echo "<div class='update-nag'>$msg</div>";
}
add_action( 'admin_notices', 'maintenance_nag' );
add_action( 'network_admin_notices', 'maintenance_nag' );