]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/includes/admin-filters.php
WordPress 4.7.1-scripts
[autoinstalls/wordpress.git] / wp-admin / includes / admin-filters.php
index d0709f4f8a7f3c44cea09659f9d4788e4ce418e6..141e8aa08efb289f0697e26f0644a946b07f3f71 100644 (file)
@@ -1,10 +1,9 @@
 <?php
 /**
- * Administration hooks
+ * Administration API: Default admin hooks
  *
  * @package WordPress
- * @subpackage Hooks
- *
+ * @subpackage Administration
  * @since 4.3.0
  */
 
@@ -44,7 +43,13 @@ add_action( 'admin_head', 'wp_color_scheme_settings' );
 add_action( 'admin_head', 'wp_site_icon'             );
 add_action( 'admin_head', '_ipad_meta'               );
 
-add_action( 'post_edit_form_tag', 'post_form_autocomplete_off' );
+// Prerendering.
+if ( ! is_customize_preview() ) {
+       add_filter( 'admin_print_styles', 'wp_resource_hints', 1 );
+}
+
+add_action( 'admin_print_scripts-post.php',     'wp_page_reload_on_back_button_js' );
+add_action( 'admin_print_scripts-post-new.php', 'wp_page_reload_on_back_button_js' );
 
 add_action( 'update_option_home',          'update_home_siteurl', 10, 2 );
 add_action( 'update_option_siteurl',       'update_home_siteurl', 10, 2 );
@@ -98,8 +103,8 @@ add_action( 'admin_notices', 'default_password_nag' );
 add_action( 'profile_update', 'default_password_nag_edit_user', 10, 2 );
 
 // Update hooks.
-add_action( 'admin_init', 'wp_plugin_update_rows' );
-add_action( 'admin_init', 'wp_theme_update_rows'  );
+add_action( 'load-plugins.php', 'wp_plugin_update_rows', 20 ); // After wp_update_plugins() is called.
+add_action( 'load-themes.php', 'wp_theme_update_rows', 20 ); // After wp_update_themes() is called.
 
 add_action( 'admin_notices', 'update_nag',      3  );
 add_action( 'admin_notices', 'maintenance_nag', 10 );
@@ -111,3 +116,6 @@ add_action( '_core_updated_successfully', '_redirect_to_about_wordpress' );
 
 // Upgrade hooks.
 add_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
+add_action( 'upgrader_process_complete', 'wp_version_check', 10, 0 );
+add_action( 'upgrader_process_complete', 'wp_update_plugins', 10, 0 );
+add_action( 'upgrader_process_complete', 'wp_update_themes', 10, 0 );