WordPress.org

Make WordPress Core

Ticket #32529: 32529.02.patch

File 32529.02.patch, 7.6 KB (added by johnjamesjacoby, 6 years ago)
  • src/wp-admin/includes/admin-filters.php

     
    1515add_action( 'activity_box_end', 'wp_dashboard_quota' );
    1616
    1717// Media hooks.
    18 add_filter( 'media_upload_tabs', 'update_gallery_tab' );
    19 add_filter( 'image_send_to_editor', 'image_add_caption', 20, 8 );
     18add_action( 'attachment_submitbox_misc_actions', 'attachment_submitbox_metadata' );
     19
    2020add_action( 'media_buttons', 'media_buttons' );
    2121
    22 add_filter( 'attachment_fields_to_save', 'image_attachment_fields_to_save', 10, 2 );
    23 add_filter( 'media_send_to_editor', 'image_media_send_to_editor', 10, 3 );
     22add_action( 'media_upload_image', 'wp_media_upload_handler' );
     23add_action( 'media_upload_audio', 'wp_media_upload_handler' );
     24add_action( 'media_upload_video', 'wp_media_upload_handler' );
     25add_action( 'media_upload_file',  'wp_media_upload_handler' );
    2426
    2527add_action( 'post-plupload-upload-ui', 'media_upload_flash_bypass' );
    26 add_action( 'post-html-upload-ui', 'media_upload_html_bypass' );
     28
     29add_action( 'post-html-upload-ui', 'media_upload_html_bypass'  );
     30
    2731add_filter( 'async_upload_image', 'get_media_item', 10, 2 );
    2832add_filter( 'async_upload_audio', 'get_media_item', 10, 2 );
    2933add_filter( 'async_upload_video', 'get_media_item', 10, 2 );
    3034add_filter( 'async_upload_file',  'get_media_item', 10, 2 );
    3135
    32 add_action( 'media_upload_image', 'wp_media_upload_handler' );
    33 add_action( 'media_upload_audio', 'wp_media_upload_handler' );
    34 add_action( 'media_upload_video', 'wp_media_upload_handler' );
    35 add_action( 'media_upload_file',  'wp_media_upload_handler' );
     36add_filter( 'attachment_fields_to_save', 'image_attachment_fields_to_save', 10, 2 );
    3637
     38add_filter( 'image_send_to_editor', 'image_add_caption', 20, 8 );
     39
     40add_filter( 'media_send_to_editor',      'image_media_send_to_editor',      10, 3 );
     41
    3742add_filter( 'media_upload_gallery', 'media_upload_gallery' );
    3843add_filter( 'media_upload_library', 'media_upload_library' );
    3944
    40 add_action( 'attachment_submitbox_misc_actions', 'attachment_submitbox_metadata' );
     45add_filter( 'media_upload_tabs', 'update_gallery_tab' );
    4146
     47
    4248// Misc hooks.
    43 add_action( 'update_option_home', 'update_home_siteurl', 10, 2 );
    44 add_action( 'update_option_siteurl', 'update_home_siteurl', 10, 2 );
    45 add_action( 'update_option_page_on_front', 'update_home_siteurl', 10, 2 );
     49add_action( 'admin_head', 'wp_admin_canonical_url'   );
    4650add_action( 'admin_head', 'wp_color_scheme_settings' );
    47 add_action( 'admin_head', '_ipad_meta' );
    48 add_filter( 'heartbeat_received', 'wp_check_locked_posts', 10, 3 );
    49 add_filter( 'heartbeat_received', 'wp_refresh_post_lock', 10, 3 );
    50 add_filter( 'heartbeat_received', 'wp_refresh_post_nonces', 10, 3 );
    51 add_filter( 'heartbeat_settings', 'wp_heartbeat_set_suspension' );
    52 // Run later as we have to set DOING_AUTOSAVE for back-compat
    53 add_filter( 'heartbeat_received', 'heartbeat_autosave', 500, 2 );
     51add_action( 'admin_head', '_ipad_meta'               );
     52
    5453add_action( 'post_edit_form_tag', 'post_form_autocomplete_off' );
    55 add_action( 'admin_head', 'wp_admin_canonical_url' );
    5654
     55add_action( 'update_option_home',          'update_home_siteurl', 10, 2 );
     56add_action( 'update_option_siteurl',       'update_home_siteurl', 10, 2 );
     57add_action( 'update_option_page_on_front', 'update_home_siteurl', 10, 2 );
     58
     59add_filter( 'heartbeat_received', 'wp_check_locked_posts',  10,  3 );
     60add_filter( 'heartbeat_received', 'wp_refresh_post_lock',   10,  3 );
     61add_filter( 'heartbeat_received', 'wp_refresh_post_nonces', 10,  3 );
     62add_filter( 'heartbeat_received', 'heartbeat_autosave',     500, 2 );
     63
     64add_filter( 'heartbeat_settings', 'wp_heartbeat_set_suspension' );
     65
     66
    5767// Nav Menu hooks.
    5868add_action( 'admin_head-nav-menus.php', '_wp_delete_orphaned_draft_menu_items' );
    5969
     70
    6071// Plugin hooks.
    6172add_filter( 'whitelist_options', 'option_update_filter' );
    6273
     74
    6375// Plugin Install hooks.
    6476add_action( 'install_plugins_featured',               'install_dashboard' );
    6577add_action( 'install_plugins_upload',                 'install_plugins_upload' );
     
    7183add_action( 'install_plugins_favorites',              'display_plugins_table' );
    7284add_action( 'install_plugins_pre_plugin-information', 'install_plugin_information' );
    7385
     86
    7487// Template hooks.
    7588add_action( 'admin_enqueue_scripts', array( 'WP_Internal_Pointers', 'enqueue_scripts'                ) );
    7689add_action( 'user_register',         array( 'WP_Internal_Pointers', 'dismiss_pointers_for_new_users' ) );
    7790
     91
    7892// Theme hooks.
    7993add_action( 'customize_controls_print_footer_scripts', 'customize_themes_print_templates' );
    8094
     95
    8196// Theme Install hooks.
    8297// add_action('install_themes_dashboard', 'install_themes_dashboard');
    8398// add_action('install_themes_upload', 'install_themes_upload', 10, 0);
     
    87102// add_action('install_themes_updated', 'display_themes');
    88103add_action( 'install_themes_pre_theme-information', 'install_theme_information' );
    89104
     105
    90106// User hooks.
    91107add_action( 'admin_init', 'default_password_nag_handler' );
    92 add_action( 'profile_update', 'default_password_nag_edit_user', 10, 2 );
     108
    93109add_action( 'admin_notices', 'default_password_nag' );
    94110
     111add_action( 'profile_update', 'default_password_nag_edit_user', 10, 2 );
     112
     113
    95114// Update hooks.
    96 add_filter( 'update_footer', 'core_update_footer' );
    97 add_action( 'admin_notices', 'update_nag', 3 );
    98 add_action( 'network_admin_notices', 'update_nag', 3 );
    99115add_action( 'admin_init', 'wp_plugin_update_rows' );
    100 add_action( 'admin_init', 'wp_theme_update_rows' );
    101 add_action( 'admin_notices', 'maintenance_nag' );
    102 add_action( 'network_admin_notices', 'maintenance_nag' );
     116add_action( 'admin_init', 'wp_theme_update_rows'  );
    103117
     118add_action( 'admin_notices', 'update_nag',      3  );
     119add_action( 'admin_notices', 'maintenance_nag', 10 );
     120
     121add_filter( 'update_footer', 'core_update_footer' );
     122
     123
    104124// Update Core hooks.
    105125add_action( '_core_updated_successfully', '_redirect_to_about_wordpress' );
    106126
     127
    107128// Upgrade hooks.
    108129add_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
  • src/wp-admin/includes/ms-admin-filters.php

     
    77 * @since 4.3.0
    88 */
    99
     10// Media Hooks.
    1011add_filter( 'wp_handle_upload_prefilter', 'check_upload_size' );
    1112
    12 add_action( 'update_option_new_admin_email', 'update_option_new_admin_email', 10, 2 );
     13// User Hooks
     14add_action( 'admin_notices', 'new_user_email_admin_notice' );
     15
     16add_action( 'admin_page_access_denied', '_access_denied_splash', 99 );
     17
    1318add_action( 'add_option_new_admin_email', 'update_option_new_admin_email', 10, 2 );
    1419
    1520add_action( 'personal_options_update', 'send_confirmation_on_profile_email' );
    1621
    17 add_action( 'admin_notices', 'new_user_email_admin_notice' );
     22add_action( 'update_option_new_admin_email', 'update_option_new_admin_email', 10, 2 );
    1823
     24
     25// Site Hooks.
    1926add_action( 'wpmueditblogaction', 'upload_space_setting' );
    2027
     28
     29// Taxonomy Hooks
    2130add_filter( 'get_term', 'sync_category_tag_slugs', 10, 2 );
    2231
    23 add_action( 'admin_page_access_denied', '_access_denied_splash', 99 );
    2432
     33// Post Hooks.
     34add_filter( 'wp_insert_post_data', 'avoid_blog_page_permalink_collision', 10, 2 );
     35
     36
     37// Tools Hooks.
    2538add_filter( 'import_allow_create_users', 'check_import_new_users' );
    2639
    27 add_action( 'admin_notices', 'site_admin_notice' );
     40
     41// Notices Hooks
     42add_action( 'admin_notices',         'site_admin_notice' );
    2843add_action( 'network_admin_notices', 'site_admin_notice' );
    2944
    30 add_filter( 'wp_insert_post_data', 'avoid_blog_page_permalink_collision', 10, 2 );
     45
     46// Update Hooks
     47add_action( 'network_admin_notices', 'update_nag',      3  );
     48add_action( 'network_admin_notices', 'maintenance_nag', 10 );