Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (6 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve inline comments per the documentation standards.

Includes minor code layout fixes for better readability.

See #48303.

File:
1 edited

Legend:

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

    r44468 r47122  
    1616add_action( 'init', 'ms_subdomain_constants' );
    1717
    18 // Functions
     18// Functions.
    1919add_action( 'update_option_blog_public', 'update_blog_public', 10, 2 );
    2020add_filter( 'option_users_can_register', 'users_can_register_signup_filter' );
    2121add_filter( 'site_option_welcome_user_email', 'welcome_user_msg_filter' );
    2222
    23 // Users
     23// Users.
    2424add_filter( 'wpmu_validate_user_signup', 'signup_nonce_check' );
    2525add_action( 'init', 'maybe_add_existing_user_to_blog' );
     
    3333add_filter( 'sanitize_user', 'strtolower' );
    3434
    35 // Roles
     35// Roles.
    3636add_action( 'switch_blog', 'wp_switch_roles_and_user', 1, 2 );
    3737
    38 // Blogs
     38// Blogs.
    3939add_filter( 'wpmu_validate_blog_signup', 'signup_nonce_check' );
    4040add_action( 'wpmu_activate_blog', 'wpmu_welcome_notification', 10, 5 );
     
    5454add_action( 'update_blog_public', 'wp_update_blog_public_option_on_site_update', 1, 2 );
    5555
    56 // Site meta
     56// Site meta.
    5757add_action( 'added_blog_meta', 'wp_cache_set_sites_last_changed' );
    5858add_action( 'updated_blog_meta', 'wp_cache_set_sites_last_changed' );
     
    6767add_filter( 'update_blog_metadata_cache', 'wp_check_site_meta_support_prefilter' );
    6868
    69 // Register Nonce
     69// Register nonce.
    7070add_action( 'signup_hidden_fields', 'signup_nonce_fields' );
    7171
    72 // Template
     72// Template.
    7373add_action( 'template_redirect', 'maybe_redirect_404' );
    7474add_filter( 'allowed_redirect_hosts', 'redirect_this_site' );
    7575
    76 // Administration
     76// Administration.
    7777add_filter( 'term_id_filter', 'global_terms', 10, 2 );
    7878add_action( 'delete_post', '_update_posts_count_on_delete' );
     
    8181add_action( 'transition_post_status', '_update_posts_count_on_transition_post_status', 10, 3 );
    8282
    83 // Counts
     83// Counts.
    8484add_action( 'admin_init', 'wp_schedule_update_network_counts' );
    8585add_action( 'update_network_counts', 'wp_update_network_counts', 10, 0 );
     
    9292unset( $action );
    9393
    94 // Files
     94// Files.
    9595add_filter( 'wp_upload_bits', 'upload_is_file_too_big' );
    9696add_filter( 'import_upload_size_limit', 'fix_import_form_size' );
     
    9999add_action( 'upload_ui_over_quota', 'multisite_over_quota_message' );
    100100
    101 // Mail
     101// Mail.
    102102add_action( 'phpmailer_init', 'fix_phpmailer_messageid' );
    103103
    104 // Disable somethings by default for multisite
     104// Disable somethings by default for multisite.
    105105add_filter( 'enable_update_services_configuration', '__return_false' );
    106 if ( ! defined( 'POST_BY_EMAIL' ) || ! POST_BY_EMAIL ) { // back compat constant.
     106if ( ! defined( 'POST_BY_EMAIL' ) || ! POST_BY_EMAIL ) { // Back compat constant.
    107107    add_filter( 'enable_post_by_email_configuration', '__return_false' );
    108108}
    109 if ( ! defined( 'EDIT_ANY_USER' ) || ! EDIT_ANY_USER ) { // back compat constant.
     109if ( ! defined( 'EDIT_ANY_USER' ) || ! EDIT_ANY_USER ) { // Back compat constant.
    110110    add_filter( 'enable_edit_any_user_configuration', '__return_false' );
    111111}
    112112add_filter( 'force_filtered_html_on_import', '__return_true' );
    113113
    114 // WP_HOME and WP_SITEURL should not have any effect in MS
     114// WP_HOME and WP_SITEURL should not have any effect in MS.
    115115remove_filter( 'option_siteurl', '_config_wp_siteurl' );
    116116remove_filter( 'option_home', '_config_wp_home' );
     
    125125add_filter( 'default_site_option_ms_files_rewriting', '__return_true' );
    126126
    127 // Whitelist multisite domains for HTTP requests
     127// Whitelist multisite domains for HTTP requests.
    128128add_filter( 'http_request_host_is_external', 'ms_allowed_http_request_hosts', 20, 2 );
Note: See TracChangeset for help on using the changeset viewer.