Make WordPress Core


Ignore:
Timestamp:
02/06/2020 06:31:22 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Code Modernization: Replace dirname( __FILE__ ) calls with __DIR__ magic constant.

This avoids the performance overhead of the function call every time dirname( __FILE__ ) was used instead of __DIR__.

This commit also includes:

  • Removing unnecessary parentheses from include/require statements. These are language constructs, not function calls.
  • Replacing include statements for several files with require_once, for consistency:
    • wp-admin/admin-header.php
    • wp-admin/admin-footer.php
    • wp-includes/version.php

Props ayeshrajans, desrosj, valentinbora, jrf, joostdevalk, netweb.
Fixes #48082.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-settings.php

    r47176 r47198  
    2222 */
    2323global $wp_version, $wp_db_version, $tinymce_version, $required_php_version, $required_mysql_version, $wp_local_package;
    24 require( ABSPATH . WPINC . '/version.php' );
    25 require( ABSPATH . WPINC . '/load.php' );
     24require ABSPATH . WPINC . '/version.php';
     25require ABSPATH . WPINC . '/load.php';
    2626
    2727// Check for the required PHP version and for the MySQL extension or a database drop-in.
     
    2929
    3030// Include files required for initialization.
    31 require( ABSPATH . WPINC . '/class-wp-paused-extensions-storage.php' );
    32 require( ABSPATH . WPINC . '/class-wp-fatal-error-handler.php' );
    33 require( ABSPATH . WPINC . '/class-wp-recovery-mode-cookie-service.php' );
    34 require( ABSPATH . WPINC . '/class-wp-recovery-mode-key-service.php' );
    35 require( ABSPATH . WPINC . '/class-wp-recovery-mode-link-service.php' );
    36 require( ABSPATH . WPINC . '/class-wp-recovery-mode-email-service.php' );
    37 require( ABSPATH . WPINC . '/class-wp-recovery-mode.php' );
    38 require( ABSPATH . WPINC . '/error-protection.php' );
    39 require( ABSPATH . WPINC . '/default-constants.php' );
    40 require_once( ABSPATH . WPINC . '/plugin.php' );
     31require ABSPATH . WPINC . '/class-wp-paused-extensions-storage.php';
     32require ABSPATH . WPINC . '/class-wp-fatal-error-handler.php';
     33require ABSPATH . WPINC . '/class-wp-recovery-mode-cookie-service.php';
     34require ABSPATH . WPINC . '/class-wp-recovery-mode-key-service.php';
     35require ABSPATH . WPINC . '/class-wp-recovery-mode-link-service.php';
     36require ABSPATH . WPINC . '/class-wp-recovery-mode-email-service.php';
     37require ABSPATH . WPINC . '/class-wp-recovery-mode.php';
     38require ABSPATH . WPINC . '/error-protection.php';
     39require ABSPATH . WPINC . '/default-constants.php';
     40require_once ABSPATH . WPINC . '/plugin.php';
    4141
    4242/**
     
    8686if ( WP_CACHE && apply_filters( 'enable_loading_advanced_cache_dropin', true ) && file_exists( WP_CONTENT_DIR . '/advanced-cache.php' ) ) {
    8787    // For an advanced caching plugin to use. Uses a static drop-in because you would only want one.
    88     include( WP_CONTENT_DIR . '/advanced-cache.php' );
     88    include WP_CONTENT_DIR . '/advanced-cache.php';
    8989
    9090    // Re-initialize any hooks added manually by advanced-cache.php.
     
    9898
    9999// Load early WordPress files.
    100 require( ABSPATH . WPINC . '/compat.php' );
    101 require( ABSPATH . WPINC . '/class-wp-list-util.php' );
    102 require( ABSPATH . WPINC . '/formatting.php' );
    103 require( ABSPATH . WPINC . '/meta.php' );
    104 require( ABSPATH . WPINC . '/functions.php' );
    105 require( ABSPATH . WPINC . '/class-wp-meta-query.php' );
    106 require( ABSPATH . WPINC . '/class-wp-matchesmapregex.php' );
    107 require( ABSPATH . WPINC . '/class-wp.php' );
    108 require( ABSPATH . WPINC . '/class-wp-error.php' );
    109 require( ABSPATH . WPINC . '/pomo/mo.php' );
     100require ABSPATH . WPINC . '/compat.php';
     101require ABSPATH . WPINC . '/class-wp-list-util.php';
     102require ABSPATH . WPINC . '/formatting.php';
     103require ABSPATH . WPINC . '/meta.php';
     104require ABSPATH . WPINC . '/functions.php';
     105require ABSPATH . WPINC . '/class-wp-meta-query.php';
     106require ABSPATH . WPINC . '/class-wp-matchesmapregex.php';
     107require ABSPATH . WPINC . '/class-wp.php';
     108require ABSPATH . WPINC . '/class-wp-error.php';
     109require ABSPATH . WPINC . '/pomo/mo.php';
    110110
    111111// Include the wpdb class and, if present, a db.php database drop-in.
     
    121121
    122122// Attach the default filters.
    123 require( ABSPATH . WPINC . '/default-filters.php' );
     123require ABSPATH . WPINC . '/default-filters.php';
    124124
    125125// Initialize multisite if enabled.
    126126if ( is_multisite() ) {
    127     require( ABSPATH . WPINC . '/class-wp-site-query.php' );
    128     require( ABSPATH . WPINC . '/class-wp-network-query.php' );
    129     require( ABSPATH . WPINC . '/ms-blogs.php' );
    130     require( ABSPATH . WPINC . '/ms-settings.php' );
     127    require ABSPATH . WPINC . '/class-wp-site-query.php';
     128    require ABSPATH . WPINC . '/class-wp-network-query.php';
     129    require ABSPATH . WPINC . '/ms-blogs.php';
     130    require ABSPATH . WPINC . '/ms-settings.php';
    131131} elseif ( ! defined( 'MULTISITE' ) ) {
    132132    define( 'MULTISITE', false );
     
    141141
    142142// Load the L10n library.
    143 require_once( ABSPATH . WPINC . '/l10n.php' );
    144 require_once( ABSPATH . WPINC . '/class-wp-locale.php' );
    145 require_once( ABSPATH . WPINC . '/class-wp-locale-switcher.php' );
     143require_once ABSPATH . WPINC . '/l10n.php';
     144require_once ABSPATH . WPINC . '/class-wp-locale.php';
     145require_once ABSPATH . WPINC . '/class-wp-locale-switcher.php';
    146146
    147147// Run the installer if WordPress is not installed.
     
    149149
    150150// Load most of WordPress.
    151 require( ABSPATH . WPINC . '/class-wp-walker.php' );
    152 require( ABSPATH . WPINC . '/class-wp-ajax-response.php' );
    153 require( ABSPATH . WPINC . '/capabilities.php' );
    154 require( ABSPATH . WPINC . '/class-wp-roles.php' );
    155 require( ABSPATH . WPINC . '/class-wp-role.php' );
    156 require( ABSPATH . WPINC . '/class-wp-user.php' );
    157 require( ABSPATH . WPINC . '/class-wp-query.php' );
    158 require( ABSPATH . WPINC . '/query.php' );
    159 require( ABSPATH . WPINC . '/class-wp-date-query.php' );
    160 require( ABSPATH . WPINC . '/theme.php' );
    161 require( ABSPATH . WPINC . '/class-wp-theme.php' );
    162 require( ABSPATH . WPINC . '/template.php' );
    163 require( ABSPATH . WPINC . '/class-wp-user-request.php' );
    164 require( ABSPATH . WPINC . '/user.php' );
    165 require( ABSPATH . WPINC . '/class-wp-user-query.php' );
    166 require( ABSPATH . WPINC . '/class-wp-session-tokens.php' );
    167 require( ABSPATH . WPINC . '/class-wp-user-meta-session-tokens.php' );
    168 require( ABSPATH . WPINC . '/class-wp-metadata-lazyloader.php' );
    169 require( ABSPATH . WPINC . '/general-template.php' );
    170 require( ABSPATH . WPINC . '/link-template.php' );
    171 require( ABSPATH . WPINC . '/author-template.php' );
    172 require( ABSPATH . WPINC . '/post.php' );
    173 require( ABSPATH . WPINC . '/class-walker-page.php' );
    174 require( ABSPATH . WPINC . '/class-walker-page-dropdown.php' );
    175 require( ABSPATH . WPINC . '/class-wp-post-type.php' );
    176 require( ABSPATH . WPINC . '/class-wp-post.php' );
    177 require( ABSPATH . WPINC . '/post-template.php' );
    178 require( ABSPATH . WPINC . '/revision.php' );
    179 require( ABSPATH . WPINC . '/post-formats.php' );
    180 require( ABSPATH . WPINC . '/post-thumbnail-template.php' );
    181 require( ABSPATH . WPINC . '/category.php' );
    182 require( ABSPATH . WPINC . '/class-walker-category.php' );
    183 require( ABSPATH . WPINC . '/class-walker-category-dropdown.php' );
    184 require( ABSPATH . WPINC . '/category-template.php' );
    185 require( ABSPATH . WPINC . '/comment.php' );
    186 require( ABSPATH . WPINC . '/class-wp-comment.php' );
    187 require( ABSPATH . WPINC . '/class-wp-comment-query.php' );
    188 require( ABSPATH . WPINC . '/class-walker-comment.php' );
    189 require( ABSPATH . WPINC . '/comment-template.php' );
    190 require( ABSPATH . WPINC . '/rewrite.php' );
    191 require( ABSPATH . WPINC . '/class-wp-rewrite.php' );
    192 require( ABSPATH . WPINC . '/feed.php' );
    193 require( ABSPATH . WPINC . '/bookmark.php' );
    194 require( ABSPATH . WPINC . '/bookmark-template.php' );
    195 require( ABSPATH . WPINC . '/kses.php' );
    196 require( ABSPATH . WPINC . '/cron.php' );
    197 require( ABSPATH . WPINC . '/deprecated.php' );
    198 require( ABSPATH . WPINC . '/script-loader.php' );
    199 require( ABSPATH . WPINC . '/taxonomy.php' );
    200 require( ABSPATH . WPINC . '/class-wp-taxonomy.php' );
    201 require( ABSPATH . WPINC . '/class-wp-term.php' );
    202 require( ABSPATH . WPINC . '/class-wp-term-query.php' );
    203 require( ABSPATH . WPINC . '/class-wp-tax-query.php' );
    204 require( ABSPATH . WPINC . '/update.php' );
    205 require( ABSPATH . WPINC . '/canonical.php' );
    206 require( ABSPATH . WPINC . '/shortcodes.php' );
    207 require( ABSPATH . WPINC . '/embed.php' );
    208 require( ABSPATH . WPINC . '/class-wp-embed.php' );
    209 require( ABSPATH . WPINC . '/class-wp-oembed.php' );
    210 require( ABSPATH . WPINC . '/class-wp-oembed-controller.php' );
    211 require( ABSPATH . WPINC . '/media.php' );
    212 require( ABSPATH . WPINC . '/http.php' );
    213 require( ABSPATH . WPINC . '/class-http.php' );
    214 require( ABSPATH . WPINC . '/class-wp-http-streams.php' );
    215 require( ABSPATH . WPINC . '/class-wp-http-curl.php' );
    216 require( ABSPATH . WPINC . '/class-wp-http-proxy.php' );
    217 require( ABSPATH . WPINC . '/class-wp-http-cookie.php' );
    218 require( ABSPATH . WPINC . '/class-wp-http-encoding.php' );
    219 require( ABSPATH . WPINC . '/class-wp-http-response.php' );
    220 require( ABSPATH . WPINC . '/class-wp-http-requests-response.php' );
    221 require( ABSPATH . WPINC . '/class-wp-http-requests-hooks.php' );
    222 require( ABSPATH . WPINC . '/widgets.php' );
    223 require( ABSPATH . WPINC . '/class-wp-widget.php' );
    224 require( ABSPATH . WPINC . '/class-wp-widget-factory.php' );
    225 require( ABSPATH . WPINC . '/nav-menu.php' );
    226 require( ABSPATH . WPINC . '/nav-menu-template.php' );
    227 require( ABSPATH . WPINC . '/admin-bar.php' );
    228 require( ABSPATH . WPINC . '/rest-api.php' );
    229 require( ABSPATH . WPINC . '/rest-api/class-wp-rest-server.php' );
    230 require( ABSPATH . WPINC . '/rest-api/class-wp-rest-response.php' );
    231 require( ABSPATH . WPINC . '/rest-api/class-wp-rest-request.php' );
    232 require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-controller.php' );
    233 require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-posts-controller.php' );
    234 require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-attachments-controller.php' );
    235 require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-post-types-controller.php' );
    236 require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-post-statuses-controller.php' );
    237 require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-revisions-controller.php' );
    238 require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-autosaves-controller.php' );
    239 require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-taxonomies-controller.php' );
    240 require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-terms-controller.php' );
    241 require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-users-controller.php' );
    242 require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-comments-controller.php' );
    243 require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-search-controller.php' );
    244 require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-blocks-controller.php' );
    245 require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-block-renderer-controller.php' );
    246 require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-settings-controller.php' );
    247 require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-themes-controller.php' );
    248 require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-meta-fields.php' );
    249 require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-comment-meta-fields.php' );
    250 require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-post-meta-fields.php' );
    251 require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-term-meta-fields.php' );
    252 require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-user-meta-fields.php' );
    253 require( ABSPATH . WPINC . '/rest-api/search/class-wp-rest-search-handler.php' );
    254 require( ABSPATH . WPINC . '/rest-api/search/class-wp-rest-post-search-handler.php' );
    255 require( ABSPATH . WPINC . '/class-wp-block-type.php' );
    256 require( ABSPATH . WPINC . '/class-wp-block-styles-registry.php' );
    257 require( ABSPATH . WPINC . '/class-wp-block-type-registry.php' );
    258 require( ABSPATH . WPINC . '/class-wp-block-parser.php' );
    259 require( ABSPATH . WPINC . '/blocks.php' );
    260 require( ABSPATH . WPINC . '/blocks/archives.php' );
    261 require( ABSPATH . WPINC . '/blocks/block.php' );
    262 require( ABSPATH . WPINC . '/blocks/calendar.php' );
    263 require( ABSPATH . WPINC . '/blocks/categories.php' );
    264 require( ABSPATH . WPINC . '/blocks/latest-comments.php' );
    265 require( ABSPATH . WPINC . '/blocks/latest-posts.php' );
    266 require( ABSPATH . WPINC . '/blocks/navigation.php' );
    267 require( ABSPATH . WPINC . '/blocks/rss.php' );
    268 require( ABSPATH . WPINC . '/blocks/search.php' );
    269 require( ABSPATH . WPINC . '/blocks/shortcode.php' );
    270 require( ABSPATH . WPINC . '/blocks/tag-cloud.php' );
     151require ABSPATH . WPINC . '/class-wp-walker.php';
     152require ABSPATH . WPINC . '/class-wp-ajax-response.php';
     153require ABSPATH . WPINC . '/capabilities.php';
     154require ABSPATH . WPINC . '/class-wp-roles.php';
     155require ABSPATH . WPINC . '/class-wp-role.php';
     156require ABSPATH . WPINC . '/class-wp-user.php';
     157require ABSPATH . WPINC . '/class-wp-query.php';
     158require ABSPATH . WPINC . '/query.php';
     159require ABSPATH . WPINC . '/class-wp-date-query.php';
     160require ABSPATH . WPINC . '/theme.php';
     161require ABSPATH . WPINC . '/class-wp-theme.php';
     162require ABSPATH . WPINC . '/template.php';
     163require ABSPATH . WPINC . '/class-wp-user-request.php';
     164require ABSPATH . WPINC . '/user.php';
     165require ABSPATH . WPINC . '/class-wp-user-query.php';
     166require ABSPATH . WPINC . '/class-wp-session-tokens.php';
     167require ABSPATH . WPINC . '/class-wp-user-meta-session-tokens.php';
     168require ABSPATH . WPINC . '/class-wp-metadata-lazyloader.php';
     169require ABSPATH . WPINC . '/general-template.php';
     170require ABSPATH . WPINC . '/link-template.php';
     171require ABSPATH . WPINC . '/author-template.php';
     172require ABSPATH . WPINC . '/post.php';
     173require ABSPATH . WPINC . '/class-walker-page.php';
     174require ABSPATH . WPINC . '/class-walker-page-dropdown.php';
     175require ABSPATH . WPINC . '/class-wp-post-type.php';
     176require ABSPATH . WPINC . '/class-wp-post.php';
     177require ABSPATH . WPINC . '/post-template.php';
     178require ABSPATH . WPINC . '/revision.php';
     179require ABSPATH . WPINC . '/post-formats.php';
     180require ABSPATH . WPINC . '/post-thumbnail-template.php';
     181require ABSPATH . WPINC . '/category.php';
     182require ABSPATH . WPINC . '/class-walker-category.php';
     183require ABSPATH . WPINC . '/class-walker-category-dropdown.php';
     184require ABSPATH . WPINC . '/category-template.php';
     185require ABSPATH . WPINC . '/comment.php';
     186require ABSPATH . WPINC . '/class-wp-comment.php';
     187require ABSPATH . WPINC . '/class-wp-comment-query.php';
     188require ABSPATH . WPINC . '/class-walker-comment.php';
     189require ABSPATH . WPINC . '/comment-template.php';
     190require ABSPATH . WPINC . '/rewrite.php';
     191require ABSPATH . WPINC . '/class-wp-rewrite.php';
     192require ABSPATH . WPINC . '/feed.php';
     193require ABSPATH . WPINC . '/bookmark.php';
     194require ABSPATH . WPINC . '/bookmark-template.php';
     195require ABSPATH . WPINC . '/kses.php';
     196require ABSPATH . WPINC . '/cron.php';
     197require ABSPATH . WPINC . '/deprecated.php';
     198require ABSPATH . WPINC . '/script-loader.php';
     199require ABSPATH . WPINC . '/taxonomy.php';
     200require ABSPATH . WPINC . '/class-wp-taxonomy.php';
     201require ABSPATH . WPINC . '/class-wp-term.php';
     202require ABSPATH . WPINC . '/class-wp-term-query.php';
     203require ABSPATH . WPINC . '/class-wp-tax-query.php';
     204require ABSPATH . WPINC . '/update.php';
     205require ABSPATH . WPINC . '/canonical.php';
     206require ABSPATH . WPINC . '/shortcodes.php';
     207require ABSPATH . WPINC . '/embed.php';
     208require ABSPATH . WPINC . '/class-wp-embed.php';
     209require ABSPATH . WPINC . '/class-wp-oembed.php';
     210require ABSPATH . WPINC . '/class-wp-oembed-controller.php';
     211require ABSPATH . WPINC . '/media.php';
     212require ABSPATH . WPINC . '/http.php';
     213require ABSPATH . WPINC . '/class-http.php';
     214require ABSPATH . WPINC . '/class-wp-http-streams.php';
     215require ABSPATH . WPINC . '/class-wp-http-curl.php';
     216require ABSPATH . WPINC . '/class-wp-http-proxy.php';
     217require ABSPATH . WPINC . '/class-wp-http-cookie.php';
     218require ABSPATH . WPINC . '/class-wp-http-encoding.php';
     219require ABSPATH . WPINC . '/class-wp-http-response.php';
     220require ABSPATH . WPINC . '/class-wp-http-requests-response.php';
     221require ABSPATH . WPINC . '/class-wp-http-requests-hooks.php';
     222require ABSPATH . WPINC . '/widgets.php';
     223require ABSPATH . WPINC . '/class-wp-widget.php';
     224require ABSPATH . WPINC . '/class-wp-widget-factory.php';
     225require ABSPATH . WPINC . '/nav-menu.php';
     226require ABSPATH . WPINC . '/nav-menu-template.php';
     227require ABSPATH . WPINC . '/admin-bar.php';
     228require ABSPATH . WPINC . '/rest-api.php';
     229require ABSPATH . WPINC . '/rest-api/class-wp-rest-server.php';
     230require ABSPATH . WPINC . '/rest-api/class-wp-rest-response.php';
     231require ABSPATH . WPINC . '/rest-api/class-wp-rest-request.php';
     232require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-controller.php';
     233require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-posts-controller.php';
     234require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-attachments-controller.php';
     235require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-post-types-controller.php';
     236require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-post-statuses-controller.php';
     237require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-revisions-controller.php';
     238require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-autosaves-controller.php';
     239require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-taxonomies-controller.php';
     240require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-terms-controller.php';
     241require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-users-controller.php';
     242require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-comments-controller.php';
     243require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-search-controller.php';
     244require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-blocks-controller.php';
     245require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-block-renderer-controller.php';
     246require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-settings-controller.php';
     247require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-themes-controller.php';
     248require ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-meta-fields.php';
     249require ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-comment-meta-fields.php';
     250require ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-post-meta-fields.php';
     251require ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-term-meta-fields.php';
     252require ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-user-meta-fields.php';
     253require ABSPATH . WPINC . '/rest-api/search/class-wp-rest-search-handler.php';
     254require ABSPATH . WPINC . '/rest-api/search/class-wp-rest-post-search-handler.php';
     255require ABSPATH . WPINC . '/class-wp-block-type.php';
     256require ABSPATH . WPINC . '/class-wp-block-styles-registry.php';
     257require ABSPATH . WPINC . '/class-wp-block-type-registry.php';
     258require ABSPATH . WPINC . '/class-wp-block-parser.php';
     259require ABSPATH . WPINC . '/blocks.php';
     260require ABSPATH . WPINC . '/blocks/archives.php';
     261require ABSPATH . WPINC . '/blocks/block.php';
     262require ABSPATH . WPINC . '/blocks/calendar.php';
     263require ABSPATH . WPINC . '/blocks/categories.php';
     264require ABSPATH . WPINC . '/blocks/latest-comments.php';
     265require ABSPATH . WPINC . '/blocks/latest-posts.php';
     266require ABSPATH . WPINC . '/blocks/navigation.php';
     267require ABSPATH . WPINC . '/blocks/rss.php';
     268require ABSPATH . WPINC . '/blocks/search.php';
     269require ABSPATH . WPINC . '/blocks/shortcode.php';
     270require ABSPATH . WPINC . '/blocks/tag-cloud.php';
    271271
    272272$GLOBALS['wp_embed'] = new WP_Embed();
     
    274274// Load multisite-specific files.
    275275if ( is_multisite() ) {
    276     require( ABSPATH . WPINC . '/ms-functions.php' );
    277     require( ABSPATH . WPINC . '/ms-default-filters.php' );
    278     require( ABSPATH . WPINC . '/ms-deprecated.php' );
     276    require ABSPATH . WPINC . '/ms-functions.php';
     277    require ABSPATH . WPINC . '/ms-default-filters.php';
     278    require ABSPATH . WPINC . '/ms-deprecated.php';
    279279}
    280280
     
    287287// Load must-use plugins.
    288288foreach ( wp_get_mu_plugins() as $mu_plugin ) {
    289     include_once( $mu_plugin );
     289    include_once $mu_plugin;
    290290
    291291    /**
     
    304304    foreach ( wp_get_active_network_plugins() as $network_plugin ) {
    305305        wp_register_plugin_realpath( $network_plugin );
    306         include_once( $network_plugin );
     306        include_once $network_plugin;
    307307
    308308        /**
     
    336336
    337337// Create common globals.
    338 require( ABSPATH . WPINC . '/vars.php' );
     338require ABSPATH . WPINC . '/vars.php';
    339339
    340340// Make taxonomies and posts available to plugins and themes.
     
    355355// Create an instance of WP_Site_Health so that Cron events may fire.
    356356if ( ! class_exists( 'WP_Site_Health' ) ) {
    357     require_once( ABSPATH . 'wp-admin/includes/class-wp-site-health.php' );
     357    require_once ABSPATH . 'wp-admin/includes/class-wp-site-health.php';
    358358}
    359359WP_Site_Health::get_instance();
     
    362362foreach ( wp_get_active_and_valid_plugins() as $plugin ) {
    363363    wp_register_plugin_realpath( $plugin );
    364     include_once( $plugin );
     364    include_once $plugin;
    365365
    366366    /**
     
    376376
    377377// Load pluggable functions.
    378 require( ABSPATH . WPINC . '/pluggable.php' );
    379 require( ABSPATH . WPINC . '/pluggable-deprecated.php' );
     378require ABSPATH . WPINC . '/pluggable.php';
     379require ABSPATH . WPINC . '/pluggable-deprecated.php';
    380380
    381381// Set internal encoding.
     
    474474$locale_file = WP_LANG_DIR . "/$locale.php";
    475475if ( ( 0 === validate_file( $locale ) ) && is_readable( $locale_file ) ) {
    476     require( $locale_file );
     476    require $locale_file;
    477477}
    478478unset( $locale_file );
     
    531531    $file = ms_site_check();
    532532    if ( true !== $file ) {
    533         require( $file );
     533        require $file;
    534534        die();
    535535    }
Note: See TracChangeset for help on using the changeset viewer.