Make WordPress Core

Changeset 32865


Ignore:
Timestamp:
06/19/2015 09:17:20 PM (9 years ago)
Author:
wonderboymusic
Message:

Cleanup (ms-)?admin-filters.php

Props johnjamesjacoby.
Fixes #32529.

Location:
trunk/src/wp-admin/includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/admin-filters.php

    r32671 r32865  
    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' );
    21 
    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 );
    24 
    25 add_action( 'post-plupload-upload-ui', 'media_upload_flash_bypass' );
    26 add_action( 'post-html-upload-ui', 'media_upload_html_bypass' );
    27 add_filter( 'async_upload_image', 'get_media_item', 10, 2 );
    28 add_filter( 'async_upload_audio', 'get_media_item', 10, 2 );
    29 add_filter( 'async_upload_video', 'get_media_item', 10, 2 );
    30 add_filter( 'async_upload_file',  'get_media_item', 10, 2 );
    3121
    3222add_action( 'media_upload_image', 'wp_media_upload_handler' );
     
    3525add_action( 'media_upload_file',  'wp_media_upload_handler' );
    3626
     27add_action( 'post-plupload-upload-ui', 'media_upload_flash_bypass' );
     28
     29add_action( 'post-html-upload-ui', 'media_upload_html_bypass'  );
     30
     31add_filter( 'async_upload_image', 'get_media_item', 10, 2 );
     32add_filter( 'async_upload_audio', 'get_media_item', 10, 2 );
     33add_filter( 'async_upload_video', 'get_media_item', 10, 2 );
     34add_filter( 'async_upload_file',  'get_media_item', 10, 2 );
     35
     36add_filter( 'attachment_fields_to_save', 'image_attachment_fields_to_save', 10, 2 );
     37
     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
    4247// Misc hooks.
    43 add_action( 'update_option_home', 'update_home_siteurl', 10, 2 );
    44 add_action( 'update_option_siteurl', 'update_home_siteurl', 10, 2 );
     48add_action( 'admin_head', 'wp_admin_canonical_url'   );
     49add_action( 'admin_head', 'wp_color_scheme_settings' );
     50add_action( 'admin_head', '_ipad_meta'               );
     51
     52add_action( 'post_edit_form_tag', 'post_form_autocomplete_off' );
     53
     54add_action( 'update_option_home',          'update_home_siteurl', 10, 2 );
     55add_action( 'update_option_siteurl',       'update_home_siteurl', 10, 2 );
    4556add_action( 'update_option_page_on_front', 'update_home_siteurl', 10, 2 );
    46 add_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 );
     57
     58add_filter( 'heartbeat_received', 'wp_check_locked_posts',  10,  3 );
     59add_filter( 'heartbeat_received', 'wp_refresh_post_lock',   10,  3 );
     60add_filter( 'heartbeat_received', 'wp_refresh_post_nonces', 10,  3 );
     61add_filter( 'heartbeat_received', 'heartbeat_autosave',     500, 2 );
     62
    5163add_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 );
    54 add_action( 'post_edit_form_tag', 'post_form_autocomplete_off' );
    55 add_action( 'admin_head', 'wp_admin_canonical_url' );
    5664
    5765// Nav Menu hooks.
     
    9098// User hooks.
    9199add_action( 'admin_init', 'default_password_nag_handler' );
    92 add_action( 'profile_update', 'default_password_nag_edit_user', 10, 2 );
     100
    93101add_action( 'admin_notices', 'default_password_nag' );
    94102
     103add_action( 'profile_update', 'default_password_nag_edit_user', 10, 2 );
     104
    95105// Update hooks.
     106add_action( 'admin_init', 'wp_plugin_update_rows' );
     107add_action( 'admin_init', 'wp_theme_update_rows'  );
     108
     109add_action( 'admin_notices', 'update_nag',      3  );
     110add_action( 'admin_notices', 'maintenance_nag', 10 );
     111
    96112add_filter( 'update_footer', 'core_update_footer' );
    97 add_action( 'admin_notices', 'update_nag', 3 );
    98 add_action( 'network_admin_notices', 'update_nag', 3 );
    99 add_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' );
    103113
    104114// Update Core hooks.
  • trunk/src/wp-admin/includes/ms-admin-filters.php

    r32653 r32865  
    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// Site Hooks.
    1925add_action( 'wpmueditblogaction', 'upload_space_setting' );
    2026
     27// Taxonomy Hooks
    2128add_filter( 'get_term', 'sync_category_tag_slugs', 10, 2 );
    2229
    23 add_action( 'admin_page_access_denied', '_access_denied_splash', 99 );
     30// Post Hooks.
     31add_filter( 'wp_insert_post_data', 'avoid_blog_page_permalink_collision', 10, 2 );
    2432
     33// Tools Hooks.
    2534add_filter( 'import_allow_create_users', 'check_import_new_users' );
    2635
    27 add_action( 'admin_notices', 'site_admin_notice' );
     36// Notices Hooks
     37add_action( 'admin_notices',         'site_admin_notice' );
    2838add_action( 'network_admin_notices', 'site_admin_notice' );
    2939
    30 add_filter( 'wp_insert_post_data', 'avoid_blog_page_permalink_collision', 10, 2 );
     40// Update Hooks
     41add_action( 'network_admin_notices', 'update_nag',      3  );
     42add_action( 'network_admin_notices', 'maintenance_nag', 10 );
Note: See TracChangeset for help on using the changeset viewer.