Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (8 years ago)
Author:
pento
Message:

Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.

File:
1 edited

Legend:

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

    r41741 r42343  
    2020add_action( 'media_upload_audio', 'wp_media_upload_handler' );
    2121add_action( 'media_upload_video', 'wp_media_upload_handler' );
    22 add_action( 'media_upload_file',  'wp_media_upload_handler' );
     22add_action( 'media_upload_file', 'wp_media_upload_handler' );
    2323
    2424add_action( 'post-plupload-upload-ui', 'media_upload_flash_bypass' );
    2525
    26 add_action( 'post-html-upload-ui', 'media_upload_html_bypass'  );
     26add_action( 'post-html-upload-ui', 'media_upload_html_bypass' );
    2727
    2828add_filter( 'async_upload_image', 'get_media_item', 10, 2 );
    2929add_filter( 'async_upload_audio', 'get_media_item', 10, 2 );
    3030add_filter( 'async_upload_video', 'get_media_item', 10, 2 );
    31 add_filter( 'async_upload_file',  'get_media_item', 10, 2 );
     31add_filter( 'async_upload_file', 'get_media_item', 10, 2 );
    3232
    3333add_filter( 'attachment_fields_to_save', 'image_attachment_fields_to_save', 10, 2 );
     
    3939
    4040// Misc hooks.
    41 add_action( 'admin_init', 'wp_admin_headers'         );
    42 add_action( 'login_init', 'wp_admin_headers'         );
    43 add_action( 'admin_head', 'wp_admin_canonical_url'   );
     41add_action( 'admin_init', 'wp_admin_headers' );
     42add_action( 'login_init', 'wp_admin_headers' );
     43add_action( 'admin_head', 'wp_admin_canonical_url' );
    4444add_action( 'admin_head', 'wp_color_scheme_settings' );
    45 add_action( 'admin_head', 'wp_site_icon'             );
    46 add_action( 'admin_head', '_ipad_meta'               );
     45add_action( 'admin_head', 'wp_site_icon' );
     46add_action( 'admin_head', '_ipad_meta' );
    4747
    4848// Prerendering.
     
    5151}
    5252
    53 add_action( 'admin_print_scripts-post.php',     'wp_page_reload_on_back_button_js' );
     53add_action( 'admin_print_scripts-post.php', 'wp_page_reload_on_back_button_js' );
    5454add_action( 'admin_print_scripts-post-new.php', 'wp_page_reload_on_back_button_js' );
    5555
    56 add_action( 'update_option_home',          'update_home_siteurl', 10, 2 );
    57 add_action( 'update_option_siteurl',       'update_home_siteurl', 10, 2 );
     56add_action( 'update_option_home', 'update_home_siteurl', 10, 2 );
     57add_action( 'update_option_siteurl', 'update_home_siteurl', 10, 2 );
    5858add_action( 'update_option_page_on_front', 'update_home_siteurl', 10, 2 );
    59 add_action( 'update_option_admin_email',   'wp_site_admin_email_change_notification', 10, 3 );
     59add_action( 'update_option_admin_email', 'wp_site_admin_email_change_notification', 10, 3 );
    6060
    61 add_action( 'add_option_new_admin_email',    'update_option_new_admin_email', 10, 2 );
     61add_action( 'add_option_new_admin_email', 'update_option_new_admin_email', 10, 2 );
    6262add_action( 'update_option_new_admin_email', 'update_option_new_admin_email', 10, 2 );
    6363
    64 add_filter( 'heartbeat_received', 'wp_check_locked_posts',  10, 3 );
    65 add_filter( 'heartbeat_received', 'wp_refresh_post_lock',   10, 3 );
    66 add_filter( 'wp_refresh_nonces', 'wp_refresh_post_nonces', 10,  3 );
    67 add_filter( 'heartbeat_received', 'heartbeat_autosave',     500, 2 );
     64add_filter( 'heartbeat_received', 'wp_check_locked_posts', 10, 3 );
     65add_filter( 'heartbeat_received', 'wp_refresh_post_lock', 10, 3 );
     66add_filter( 'wp_refresh_nonces', 'wp_refresh_post_nonces', 10, 3 );
     67add_filter( 'heartbeat_received', 'heartbeat_autosave', 500, 2 );
    6868
    6969add_filter( 'heartbeat_settings', 'wp_heartbeat_set_suspension' );
     
    7676
    7777// Plugin Install hooks.
    78 add_action( 'install_plugins_featured',               'install_dashboard' );
    79 add_action( 'install_plugins_upload',                 'install_plugins_upload' );
    80 add_action( 'install_plugins_search',                 'display_plugins_table' );
    81 add_action( 'install_plugins_popular',                'display_plugins_table' );
    82 add_action( 'install_plugins_recommended',            'display_plugins_table' );
    83 add_action( 'install_plugins_new',                    'display_plugins_table' );
    84 add_action( 'install_plugins_beta',                   'display_plugins_table' );
    85 add_action( 'install_plugins_favorites',              'display_plugins_table' );
     78add_action( 'install_plugins_featured', 'install_dashboard' );
     79add_action( 'install_plugins_upload', 'install_plugins_upload' );
     80add_action( 'install_plugins_search', 'display_plugins_table' );
     81add_action( 'install_plugins_popular', 'display_plugins_table' );
     82add_action( 'install_plugins_recommended', 'display_plugins_table' );
     83add_action( 'install_plugins_new', 'display_plugins_table' );
     84add_action( 'install_plugins_beta', 'display_plugins_table' );
     85add_action( 'install_plugins_favorites', 'display_plugins_table' );
    8686add_action( 'install_plugins_pre_plugin-information', 'install_plugin_information' );
    8787
    8888// Template hooks.
    89 add_action( 'admin_enqueue_scripts', array( 'WP_Internal_Pointers', 'enqueue_scripts'                ) );
    90 add_action( 'user_register',         array( 'WP_Internal_Pointers', 'dismiss_pointers_for_new_users' ) );
     89add_action( 'admin_enqueue_scripts', array( 'WP_Internal_Pointers', 'enqueue_scripts' ) );
     90add_action( 'user_register', array( 'WP_Internal_Pointers', 'dismiss_pointers_for_new_users' ) );
    9191
    9292// Theme hooks.
     
    116116add_action( 'load-themes.php', 'wp_theme_update_rows', 20 ); // After wp_update_themes() is called.
    117117
    118 add_action( 'admin_notices', 'update_nag',      3 );
     118add_action( 'admin_notices', 'update_nag', 3 );
    119119add_action( 'admin_notices', 'maintenance_nag', 10 );
    120120
Note: See TracChangeset for help on using the changeset viewer.