WordPress 4.3
[autoinstalls/wordpress.git] / wp-admin / includes / admin-filters.php
1 <?php
2 /**
3  * Administration hooks
4  *
5  * @package WordPress
6  * @subpackage Hooks
7  *
8  * @since 4.3.0
9  */
10
11 // Bookmark hooks.
12 add_action( 'admin_page_access_denied', 'wp_link_manager_disabled_message' );
13
14 // Dashboard hooks.
15 add_action( 'activity_box_end', 'wp_dashboard_quota' );
16
17 // Media hooks.
18 add_action( 'attachment_submitbox_misc_actions', 'attachment_submitbox_metadata' );
19
20 add_action( 'media_upload_image', 'wp_media_upload_handler' );
21 add_action( 'media_upload_audio', 'wp_media_upload_handler' );
22 add_action( 'media_upload_video', 'wp_media_upload_handler' );
23 add_action( 'media_upload_file',  'wp_media_upload_handler' );
24
25 add_action( 'post-plupload-upload-ui', 'media_upload_flash_bypass' );
26
27 add_action( 'post-html-upload-ui', 'media_upload_html_bypass'  );
28
29 add_filter( 'async_upload_image', 'get_media_item', 10, 2 );
30 add_filter( 'async_upload_audio', 'get_media_item', 10, 2 );
31 add_filter( 'async_upload_video', 'get_media_item', 10, 2 );
32 add_filter( 'async_upload_file',  'get_media_item', 10, 2 );
33
34 add_filter( 'attachment_fields_to_save', 'image_attachment_fields_to_save', 10, 2 );
35
36 add_filter( 'media_upload_gallery', 'media_upload_gallery' );
37 add_filter( 'media_upload_library', 'media_upload_library' );
38
39 add_filter( 'media_upload_tabs', 'update_gallery_tab' );
40
41 // Misc hooks.
42 add_action( 'admin_head', 'wp_admin_canonical_url'   );
43 add_action( 'admin_head', 'wp_color_scheme_settings' );
44 add_action( 'admin_head', 'wp_site_icon'             );
45 add_action( 'admin_head', '_ipad_meta'               );
46
47 add_action( 'post_edit_form_tag', 'post_form_autocomplete_off' );
48
49 add_action( 'update_option_home',          'update_home_siteurl', 10, 2 );
50 add_action( 'update_option_siteurl',       'update_home_siteurl', 10, 2 );
51 add_action( 'update_option_page_on_front', 'update_home_siteurl', 10, 2 );
52
53 add_filter( 'heartbeat_received', 'wp_check_locked_posts',  10,  3 );
54 add_filter( 'heartbeat_received', 'wp_refresh_post_lock',   10,  3 );
55 add_filter( 'wp_refresh_nonces', 'wp_refresh_post_nonces', 10,  3 );
56 add_filter( 'heartbeat_received', 'heartbeat_autosave',     500, 2 );
57
58 add_filter( 'heartbeat_settings', 'wp_heartbeat_set_suspension' );
59
60 // Nav Menu hooks.
61 add_action( 'admin_head-nav-menus.php', '_wp_delete_orphaned_draft_menu_items' );
62
63 // Plugin hooks.
64 add_filter( 'whitelist_options', 'option_update_filter' );
65
66 // Plugin Install hooks.
67 add_action( 'install_plugins_featured',               'install_dashboard' );
68 add_action( 'install_plugins_upload',                 'install_plugins_upload' );
69 add_action( 'install_plugins_search',                 'display_plugins_table' );
70 add_action( 'install_plugins_popular',                'display_plugins_table' );
71 add_action( 'install_plugins_recommended',            'display_plugins_table' );
72 add_action( 'install_plugins_new',                    'display_plugins_table' );
73 add_action( 'install_plugins_beta',                   'display_plugins_table' );
74 add_action( 'install_plugins_favorites',              'display_plugins_table' );
75 add_action( 'install_plugins_pre_plugin-information', 'install_plugin_information' );
76
77 // Template hooks.
78 add_action( 'admin_enqueue_scripts', array( 'WP_Internal_Pointers', 'enqueue_scripts'                ) );
79 add_action( 'user_register',         array( 'WP_Internal_Pointers', 'dismiss_pointers_for_new_users' ) );
80
81 // Theme hooks.
82 add_action( 'customize_controls_print_footer_scripts', 'customize_themes_print_templates' );
83
84 // Theme Install hooks.
85 // add_action('install_themes_dashboard', 'install_themes_dashboard');
86 // add_action('install_themes_upload', 'install_themes_upload', 10, 0);
87 // add_action('install_themes_search', 'display_themes');
88 // add_action('install_themes_featured', 'display_themes');
89 // add_action('install_themes_new', 'display_themes');
90 // add_action('install_themes_updated', 'display_themes');
91 add_action( 'install_themes_pre_theme-information', 'install_theme_information' );
92
93 // User hooks.
94 add_action( 'admin_init', 'default_password_nag_handler' );
95
96 add_action( 'admin_notices', 'default_password_nag' );
97
98 add_action( 'profile_update', 'default_password_nag_edit_user', 10, 2 );
99
100 // Update hooks.
101 add_action( 'admin_init', 'wp_plugin_update_rows' );
102 add_action( 'admin_init', 'wp_theme_update_rows'  );
103
104 add_action( 'admin_notices', 'update_nag',      3  );
105 add_action( 'admin_notices', 'maintenance_nag', 10 );
106
107 add_filter( 'update_footer', 'core_update_footer' );
108
109 // Update Core hooks.
110 add_action( '_core_updated_successfully', '_redirect_to_about_wordpress' );
111
112 // Upgrade hooks.
113 add_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );