diff --git a/src/wp-admin/includes/admin-filters.php b/src/wp-admin/includes/admin-filters.php new file mode 100644 index 0000000000..fb4f5dd7de --- /dev/null +++ b/src/wp-admin/includes/admin-filters.php @@ -0,0 +1,107 @@ + 'ids') ); - return array_unique( $cats ); } @@ -308,4 +306,3 @@ function wp_link_manager_disabled_message() { wp_die( __( 'You do not have sufficient permissions to edit the links for this site.' ) ); } -add_action( 'admin_page_access_denied', 'wp_link_manager_disabled_message' ); diff --git a/src/wp-admin/includes/class-wp-upgrader.php b/src/wp-admin/includes/class-wp-upgrader.php index 577cbce67d..1f2b1f740f 100644 --- a/src/wp-admin/includes/class-wp-upgrader.php +++ b/src/wp-admin/includes/class-wp-upgrader.php @@ -1624,8 +1624,6 @@ class Theme_Upgrader extends WP_Upgrader { } -add_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 ); - /** * Language pack upgrader, for updating translations of plugins, themes, and core. * diff --git a/src/wp-admin/includes/dashboard.php b/src/wp-admin/includes/dashboard.php index f52baff2c7..80255bb6a8 100644 --- a/src/wp-admin/includes/dashboard.php +++ b/src/wp-admin/includes/dashboard.php @@ -1197,7 +1197,6 @@ function wp_dashboard_quota() { var _wpColorScheme = ' . wp_json_encode( array( 'icons' => $icon_colors ) ) . ";\n"; } -add_action( 'admin_head', 'wp_color_scheme_settings' ); function _ipad_meta() { if ( wp_is_mobile() ) { @@ -688,7 +683,6 @@ function _ipad_meta() { user_email; } } -add_action( 'personal_options_update', 'send_confirmation_on_profile_email' ); /** * Adds an admin notice alerting the user to check for confirmation email @@ -395,7 +391,6 @@ function new_user_email_admin_notice() { if ( strpos( $_SERVER['PHP_SELF'], 'profile.php' ) && isset( $_GET['updated'] ) && $email = get_option( get_current_user_id() . '_new_email' ) ) echo "
" . sprintf( __( "Your email address has not been updated yet. Please check your inbox at %s for a confirmation email." ), $email['newemail'] ) . "
"; } -add_action( 'admin_notices', 'new_user_email_admin_notice' ); /** * Check whether a blog has used its allotted upload space. @@ -490,7 +485,6 @@ function upload_space_setting( $id ) { " . sprintf( __( 'Thank you for Updating! Please visit the Upgrade Network page to update all your sites.' ), esc_url( network_admin_url( 'upgrade.php' ) ) ) . ""; } -add_action( 'admin_notices', 'site_admin_notice' ); -add_action( 'network_admin_notices', 'site_admin_notice' ); /** * Avoids a collision between a site slug and a permalink slug. @@ -782,7 +771,6 @@ function avoid_blog_page_permalink_collision( $data, $postarr ) { } return $data; } -add_filter( 'wp_insert_post_data', 'avoid_blog_page_permalink_collision', 10, 2 ); /** * Handles the display of choosing a user's primary site. diff --git a/src/wp-admin/includes/nav-menu.php b/src/wp-admin/includes/nav-menu.php index a12181ee71..78ef95f3a6 100644 --- a/src/wp-admin/includes/nav-menu.php +++ b/src/wp-admin/includes/nav-menu.php @@ -1254,7 +1254,6 @@ function _wp_delete_orphaned_draft_menu_items() { foreach( (array) $menu_items_to_delete as $menu_item_id ) wp_delete_post( $menu_item_id, true ); } -add_action('admin_head-nav-menus.php', '_wp_delete_orphaned_draft_menu_items'); /** * Saves nav menu items diff --git a/src/wp-admin/includes/plugin-install.php b/src/wp-admin/includes/plugin-install.php index ac3f5b69ba..f27acf2c23 100644 --- a/src/wp-admin/includes/plugin-install.php +++ b/src/wp-admin/includes/plugin-install.php @@ -158,7 +158,6 @@ function install_dashboard() { } echo '


'; } -add_action( 'install_plugins_featured', 'install_dashboard' ); /** * Display search form for searching plugins. @@ -209,7 +208,6 @@ function install_plugins_upload() { @@ -144,7 +143,6 @@ function install_themes_upload() { display(); } -// add_action('install_themes_search', 'display_themes'); -// add_action('install_themes_featured', 'display_themes'); -// add_action('install_themes_new', 'display_themes'); -// add_action('install_themes_updated', 'display_themes'); /** * Display theme information in dialog box form. @@ -208,4 +202,3 @@ function install_theme_information() { iframe_footer(); exit; } -add_action('install_themes_pre_theme-information', 'install_theme_information'); diff --git a/src/wp-admin/includes/theme.php b/src/wp-admin/includes/theme.php index fe35006dcc..608c865055 100644 --- a/src/wp-admin/includes/theme.php +++ b/src/wp-admin/includes/theme.php @@ -565,4 +565,3 @@ function customize_themes_print_templates() { $msg"; } -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 "
$msg
"; } -add_action( 'admin_notices', 'maintenance_nag' ); -add_action( 'network_admin_notices', 'maintenance_nag' ); diff --git a/src/wp-admin/includes/user.php b/src/wp-admin/includes/user.php index 0928392a8a..65949a0278 100644 --- a/src/wp-admin/includes/user.php +++ b/src/wp-admin/includes/user.php @@ -386,7 +386,6 @@ function wp_revoke_user($id) { $user->remove_all_caps(); } -add_action('admin_init', 'default_password_nag_handler'); /** * @since 2.8.0 */ @@ -409,8 +408,6 @@ function default_password_nag_handler($errors = false) { } } -add_action('profile_update', 'default_password_nag_edit_user', 10, 2); - /** * @since 2.8.0 */ @@ -428,8 +425,6 @@ function default_password_nag_edit_user($user_ID, $old_data) { } } -add_action('admin_notices', 'default_password_nag'); - /** * @since 2.8.0 *