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-includes/ms-default-filters.php

    r41665 r42343  
    2828add_action( 'wpmu_activate_user', 'wpmu_welcome_user_notification', 10, 3 );
    2929add_action( 'after_signup_user', 'wpmu_signup_user_notification', 10, 4 );
    30 add_action( 'network_site_new_created_user',   'wp_send_new_user_notifications' );
     30add_action( 'network_site_new_created_user', 'wp_send_new_user_notifications' );
    3131add_action( 'network_site_users_created_user', 'wp_send_new_user_notifications' );
    32 add_action( 'network_user_new_created_user',   'wp_send_new_user_notifications' );
     32add_action( 'network_user_new_created_user', 'wp_send_new_user_notifications' );
    3333add_filter( 'sanitize_user', 'strtolower' );
    3434
     
    5858
    5959// Counts
    60 add_action( 'admin_init', 'wp_schedule_update_network_counts');
     60add_action( 'admin_init', 'wp_schedule_update_network_counts' );
    6161add_action( 'update_network_counts', 'wp_update_network_counts', 10, 0 );
    62 foreach ( array( 'user_register', 'deleted_user', 'wpmu_new_user', 'make_spam_user', 'make_ham_user' ) as $action )
     62foreach ( array( 'user_register', 'deleted_user', 'wpmu_new_user', 'make_spam_user', 'make_ham_user' ) as $action ) {
    6363    add_action( $action, 'wp_maybe_update_network_user_counts', 10, 0 );
    64 foreach ( array( 'make_spam_blog', 'make_ham_blog', 'archive_blog', 'unarchive_blog', 'make_delete_blog', 'make_undelete_blog' ) as $action )
     64}
     65foreach ( array( 'make_spam_blog', 'make_ham_blog', 'archive_blog', 'unarchive_blog', 'make_delete_blog', 'make_undelete_blog' ) as $action ) {
    6566    add_action( $action, 'wp_maybe_update_network_site_counts', 10, 0 );
     67}
    6668unset( $action );
    6769
     
    7880// Disable somethings by default for multisite
    7981add_filter( 'enable_update_services_configuration', '__return_false' );
    80 if ( ! defined('POST_BY_EMAIL') || ! POST_BY_EMAIL ) // back compat constant.
     82if ( ! defined( 'POST_BY_EMAIL' ) || ! POST_BY_EMAIL ) { // back compat constant.
    8183    add_filter( 'enable_post_by_email_configuration', '__return_false' );
    82 if ( ! defined('EDIT_ANY_USER') || ! EDIT_ANY_USER ) // back compat constant.
     84}
     85if ( ! defined( 'EDIT_ANY_USER' ) || ! EDIT_ANY_USER ) { // back compat constant.
    8386    add_filter( 'enable_edit_any_user_configuration', '__return_false' );
     87}
    8488add_filter( 'force_filtered_html_on_import', '__return_true' );
    8589
    8690// WP_HOME and WP_SITEURL should not have any effect in MS
    8791remove_filter( 'option_siteurl', '_config_wp_siteurl' );
    88 remove_filter( 'option_home',    '_config_wp_home'    );
     92remove_filter( 'option_home', '_config_wp_home' );
    8993
    9094// Some options changes should trigger site details refresh.
    91 add_action( 'update_option_blogname',   'clean_site_details_cache', 10, 0 );
    92 add_action( 'update_option_siteurl',    'clean_site_details_cache', 10, 0 );
     95add_action( 'update_option_blogname', 'clean_site_details_cache', 10, 0 );
     96add_action( 'update_option_siteurl', 'clean_site_details_cache', 10, 0 );
    9397add_action( 'update_option_post_count', 'clean_site_details_cache', 10, 0 );
    94 add_action( 'update_option_home',       'clean_site_details_cache', 10, 0 );
     98add_action( 'update_option_home', 'clean_site_details_cache', 10, 0 );
    9599
    96100// If the network upgrade hasn't run yet, assume ms-files.php rewriting is used.
Note: See TracChangeset for help on using the changeset viewer.