29 add_filter( 'async_upload_image', 'get_media_item', 10, 2 ); |
30 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_audio', 'get_media_item', 10, 2 ); |
31 add_filter( 'async_upload_video', 'get_media_item', 10, 2 ); |
32 add_filter( 'async_upload_video', 'get_media_item', 10, 2 ); |
32 add_filter( 'async_upload_file', 'get_media_item', 10, 2 ); |
33 add_filter( 'async_upload_file', 'get_media_item', 10, 2 ); |
33 |
34 |
34 add_filter( 'attachment_fields_to_save', 'image_attachment_fields_to_save', 10, 2 ); |
|
35 |
|
36 add_filter( 'media_upload_gallery', 'media_upload_gallery' ); |
35 add_filter( 'media_upload_gallery', 'media_upload_gallery' ); |
37 add_filter( 'media_upload_library', 'media_upload_library' ); |
36 add_filter( 'media_upload_library', 'media_upload_library' ); |
38 |
37 |
39 add_filter( 'media_upload_tabs', 'update_gallery_tab' ); |
38 add_filter( 'media_upload_tabs', 'update_gallery_tab' ); |
40 |
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 |
41 // Misc hooks. |
45 // Misc hooks. |
42 add_action( 'admin_init', 'wp_admin_headers' ); |
46 add_action( 'admin_init', 'wp_admin_headers' ); |
43 add_action( 'login_init', 'wp_admin_headers' ); |
47 add_action( 'login_init', 'wp_admin_headers' ); |
|
48 add_action( 'admin_init', 'send_frame_options_header', 10, 0 ); |
44 add_action( 'admin_head', 'wp_admin_canonical_url' ); |
49 add_action( 'admin_head', 'wp_admin_canonical_url' ); |
45 add_action( 'admin_head', 'wp_color_scheme_settings' ); |
|
46 add_action( 'admin_head', 'wp_site_icon' ); |
50 add_action( 'admin_head', 'wp_site_icon' ); |
47 add_action( 'admin_head', 'wp_admin_viewport_meta' ); |
51 add_action( 'admin_head', 'wp_admin_viewport_meta' ); |
48 add_action( 'customize_controls_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' ); |
49 |
54 |
50 // Prerendering. |
55 // Prerendering. |
51 if ( ! is_customize_preview() ) { |
56 if ( ! is_customize_preview() ) { |
52 add_filter( 'admin_print_styles', 'wp_resource_hints', 1 ); |
57 add_filter( 'admin_print_styles', 'wp_resource_hints', 1 ); |
53 } |
58 } |
54 |
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_print_styles', 'print_emoji_styles' ); |
|
64 add_action( 'admin_print_styles', 'print_admin_styles', 20 ); |
|
65 |
|
66 add_action( 'admin_print_scripts-index.php', 'wp_localize_community_events' ); |
55 add_action( 'admin_print_scripts-post.php', 'wp_page_reload_on_back_button_js' ); |
67 add_action( 'admin_print_scripts-post.php', 'wp_page_reload_on_back_button_js' ); |
56 add_action( 'admin_print_scripts-post-new.php', 'wp_page_reload_on_back_button_js' ); |
68 add_action( 'admin_print_scripts-post-new.php', 'wp_page_reload_on_back_button_js' ); |
57 |
69 |
58 add_action( 'update_option_home', 'update_home_siteurl', 10, 2 ); |
70 add_action( 'update_option_home', 'update_home_siteurl', 10, 2 ); |
59 add_action( 'update_option_siteurl', 'update_home_siteurl', 10, 2 ); |
71 add_action( 'update_option_siteurl', 'update_home_siteurl', 10, 2 ); |
69 |
81 |
70 add_filter( 'wp_refresh_nonces', 'wp_refresh_post_nonces', 10, 3 ); |
82 add_filter( 'wp_refresh_nonces', 'wp_refresh_post_nonces', 10, 3 ); |
71 add_filter( 'wp_refresh_nonces', 'wp_refresh_heartbeat_nonces' ); |
83 add_filter( 'wp_refresh_nonces', 'wp_refresh_heartbeat_nonces' ); |
72 |
84 |
73 add_filter( 'heartbeat_settings', 'wp_heartbeat_set_suspension' ); |
85 add_filter( 'heartbeat_settings', 'wp_heartbeat_set_suspension' ); |
|
86 |
|
87 add_action( 'use_block_editor_for_post_type', '_disable_block_editor_for_navigation_post_type', 10, 2 ); |
|
88 add_action( 'edit_form_after_title', '_disable_content_editor_for_navigation_post_type' ); |
|
89 add_action( 'edit_form_after_editor', '_enable_content_editor_for_navigation_post_type' ); |
74 |
90 |
75 // Nav Menu hooks. |
91 // Nav Menu hooks. |
76 add_action( 'admin_head-nav-menus.php', '_wp_delete_orphaned_draft_menu_items' ); |
92 add_action( 'admin_head-nav-menus.php', '_wp_delete_orphaned_draft_menu_items' ); |
77 |
93 |
78 // Plugin hooks. |
94 // Plugin hooks. |