[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * Administration API: Default admin hooks 4 * 5 * @package WordPress 6 * @subpackage Administration 7 * @since 4.3.0 8 */ 9 10 // Bookmark hooks. 11 add_action( 'admin_page_access_denied', 'wp_link_manager_disabled_message' ); 12 13 // Dashboard hooks. 14 add_action( 'activity_box_end', 'wp_dashboard_quota' ); 15 add_action( 'welcome_panel', 'wp_welcome_panel' ); 16 17 // Media hooks. 18 add_action( 'attachment_submitbox_misc_actions', 'attachment_submitbox_metadata' ); 19 add_filter( 'plupload_init', 'wp_show_heic_upload_error' ); 20 21 add_action( 'media_upload_image', 'wp_media_upload_handler' ); 22 add_action( 'media_upload_audio', 'wp_media_upload_handler' ); 23 add_action( 'media_upload_video', 'wp_media_upload_handler' ); 24 add_action( 'media_upload_file', 'wp_media_upload_handler' ); 25 26 add_action( 'post-plupload-upload-ui', 'media_upload_flash_bypass' ); 27 28 add_action( 'post-html-upload-ui', 'media_upload_html_bypass' ); 29 30 add_filter( 'async_upload_image', 'get_media_item', 10, 2 ); 31 add_filter( 'async_upload_audio', 'get_media_item', 10, 2 ); 32 add_filter( 'async_upload_video', 'get_media_item', 10, 2 ); 33 add_filter( 'async_upload_file', 'get_media_item', 10, 2 ); 34 35 add_filter( 'media_upload_gallery', 'media_upload_gallery' ); 36 add_filter( 'media_upload_library', 'media_upload_library' ); 37 38 add_filter( 'media_upload_tabs', 'update_gallery_tab' ); 39 40 // Admin color schemes. 41 add_action( 'admin_init', 'register_admin_color_schemes', 1 ); 42 add_action( 'admin_head', 'wp_color_scheme_settings' ); 43 add_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' ); 44 45 // Misc hooks. 46 add_action( 'admin_init', 'wp_admin_headers' ); 47 add_action( 'login_init', 'wp_admin_headers' ); 48 add_action( 'admin_init', 'send_frame_options_header', 10, 0 ); 49 add_action( 'admin_head', 'wp_admin_canonical_url' ); 50 add_action( 'admin_head', 'wp_site_icon' ); 51 add_action( 'admin_head', 'wp_admin_viewport_meta' ); 52 add_action( 'customize_controls_head', 'wp_admin_viewport_meta' ); 53 add_filter( 'nav_menu_meta_box_object', '_wp_nav_menu_meta_box_object' ); 54 55 // Prerendering. 56 if ( ! is_customize_preview() ) { 57 add_filter( 'admin_print_styles', 'wp_resource_hints', 1 ); 58 } 59 60 add_action( 'admin_print_scripts', 'print_emoji_detection_script' ); 61 add_action( 'admin_print_scripts', 'print_head_scripts', 20 ); 62 add_action( 'admin_print_footer_scripts', '_wp_footer_scripts' ); 63 add_action( 'admin_enqueue_scripts', 'wp_enqueue_emoji_styles' ); 64 add_action( 'admin_print_styles', 'print_emoji_styles' ); // Retained for backwards-compatibility. Unhooked by wp_enqueue_emoji_styles(). 65 add_action( 'admin_print_styles', 'print_admin_styles', 20 ); 66 67 add_action( 'admin_print_scripts-index.php', 'wp_localize_community_events' ); 68 add_action( 'admin_print_scripts-post.php', 'wp_page_reload_on_back_button_js' ); 69 add_action( 'admin_print_scripts-post-new.php', 'wp_page_reload_on_back_button_js' ); 70 71 add_action( 'update_option_home', 'update_home_siteurl', 10, 2 ); 72 add_action( 'update_option_siteurl', 'update_home_siteurl', 10, 2 ); 73 add_action( 'update_option_page_on_front', 'update_home_siteurl', 10, 2 ); 74 add_action( 'update_option_admin_email', 'wp_site_admin_email_change_notification', 10, 3 ); 75 76 add_action( 'add_option_new_admin_email', 'update_option_new_admin_email', 10, 2 ); 77 add_action( 'update_option_new_admin_email', 'update_option_new_admin_email', 10, 2 ); 78 79 add_filter( 'heartbeat_received', 'wp_check_locked_posts', 10, 3 ); 80 add_filter( 'heartbeat_received', 'wp_refresh_post_lock', 10, 3 ); 81 add_filter( 'heartbeat_received', 'heartbeat_autosave', 500, 2 ); 82 83 add_filter( 'wp_refresh_nonces', 'wp_refresh_post_nonces', 10, 3 ); 84 add_filter( 'wp_refresh_nonces', 'wp_refresh_metabox_loader_nonces', 10, 2 ); 85 add_filter( 'wp_refresh_nonces', 'wp_refresh_heartbeat_nonces' ); 86 87 add_filter( 'heartbeat_settings', 'wp_heartbeat_set_suspension' ); 88 89 add_action( 'use_block_editor_for_post_type', '_disable_block_editor_for_navigation_post_type', 10, 2 ); 90 add_action( 'edit_form_after_title', '_disable_content_editor_for_navigation_post_type' ); 91 add_action( 'edit_form_after_editor', '_enable_content_editor_for_navigation_post_type' ); 92 93 // Nav Menu hooks. 94 add_action( 'admin_head-nav-menus.php', '_wp_delete_orphaned_draft_menu_items' ); 95 96 // Plugin hooks. 97 add_filter( 'allowed_options', 'option_update_filter' ); 98 99 // Plugin Install hooks. 100 add_action( 'install_plugins_featured', 'install_dashboard' ); 101 add_action( 'install_plugins_upload', 'install_plugins_upload' ); 102 add_action( 'install_plugins_search', 'display_plugins_table' ); 103 add_action( 'install_plugins_popular', 'display_plugins_table' ); 104 add_action( 'install_plugins_recommended', 'display_plugins_table' ); 105 add_action( 'install_plugins_new', 'display_plugins_table' ); 106 add_action( 'install_plugins_beta', 'display_plugins_table' ); 107 add_action( 'install_plugins_favorites', 'display_plugins_table' ); 108 add_action( 'install_plugins_pre_plugin-information', 'install_plugin_information' ); 109 110 // Template hooks. 111 add_action( 'admin_enqueue_scripts', array( 'WP_Internal_Pointers', 'enqueue_scripts' ) ); 112 add_action( 'user_register', array( 'WP_Internal_Pointers', 'dismiss_pointers_for_new_users' ) ); 113 114 // Theme hooks. 115 add_action( 'customize_controls_print_footer_scripts', 'customize_themes_print_templates' ); 116 117 // Theme Install hooks. 118 add_action( 'install_themes_pre_theme-information', 'install_theme_information' ); 119 120 // User hooks. 121 add_action( 'admin_init', 'default_password_nag_handler' ); 122 123 add_action( 'admin_notices', 'default_password_nag' ); 124 add_action( 'admin_notices', 'new_user_email_admin_notice' ); 125 126 add_action( 'profile_update', 'default_password_nag_edit_user', 10, 2 ); 127 128 add_action( 'personal_options_update', 'send_confirmation_on_profile_email' ); 129 130 // Update hooks. 131 add_action( 'load-plugins.php', 'wp_plugin_update_rows', 20 ); // After wp_update_plugins() is called. 132 add_action( 'load-themes.php', 'wp_theme_update_rows', 20 ); // After wp_update_themes() is called. 133 134 add_action( 'admin_notices', 'update_nag', 3 ); 135 add_action( 'admin_notices', 'deactivated_plugins_notice', 5 ); 136 add_action( 'admin_notices', 'paused_plugins_notice', 5 ); 137 add_action( 'admin_notices', 'paused_themes_notice', 5 ); 138 add_action( 'admin_notices', 'maintenance_nag', 10 ); 139 add_action( 'admin_notices', 'wp_recovery_mode_nag', 1 ); 140 141 add_filter( 'update_footer', 'core_update_footer' ); 142 143 // Update Core hooks. 144 add_action( '_core_updated_successfully', '_redirect_to_about_wordpress' ); 145 146 // Upgrade hooks. 147 add_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 ); 148 add_action( 'upgrader_process_complete', 'wp_version_check', 10, 0 ); 149 add_action( 'upgrader_process_complete', 'wp_update_plugins', 10, 0 ); 150 add_action( 'upgrader_process_complete', 'wp_update_themes', 10, 0 ); 151 152 // Privacy hooks. 153 add_filter( 'wp_privacy_personal_data_erasure_page', 'wp_privacy_process_personal_data_erasure_page', 10, 5 ); 154 add_filter( 'wp_privacy_personal_data_export_page', 'wp_privacy_process_personal_data_export_page', 10, 7 ); 155 add_action( 'wp_privacy_personal_data_export_file', 'wp_privacy_generate_personal_data_export_file', 10 ); 156 add_action( 'wp_privacy_personal_data_erased', '_wp_privacy_send_erasure_fulfillment_notification', 10 ); 157 158 // Privacy policy text changes check. 159 add_action( 'admin_init', array( 'WP_Privacy_Policy_Content', 'text_change_check' ), 100 ); 160 161 // Show a "postbox" with the text suggestions for a privacy policy. 162 add_action( 'admin_notices', array( 'WP_Privacy_Policy_Content', 'notice' ) ); 163 164 // Add the suggested policy text from WordPress. 165 add_action( 'admin_init', array( 'WP_Privacy_Policy_Content', 'add_suggested_content' ), 1 ); 166 167 // Update the cached policy info when the policy page is updated. 168 add_action( 'post_updated', array( 'WP_Privacy_Policy_Content', '_policy_page_updated' ) ); 169 170 // Append '(Draft)' to draft page titles in the privacy page dropdown. 171 add_filter( 'list_pages', '_wp_privacy_settings_filter_draft_page_titles', 10, 2 ); 172 173 // Font management. 174 add_action( 'admin_print_styles', 'wp_print_font_faces', 50 ); 175 add_action( 'admin_print_styles', 'wp_print_font_faces_from_style_variations', 50 );
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated : Thu Nov 21 08:20:01 2024 | Cross-referenced by PHPXref |