Make WordPress Core

Changeset 53518


Ignore:
Timestamp:
06/17/2022 11:18:37 AM (23 months ago)
Author:
SergeyBiryukov
Message:

General: Use WPINC as a shorter reference to wp-includes in some files.

This brings more consistency with similar require_once statements and _deprecated_file() calls in other files.

Follow-up to [601], [628], [36693], [44359], [45663], [45678], [52026],

Props malthert.
See #54233.

Location:
trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/index.php

    r47198 r53518  
    1212}
    1313
    14 if ( file_exists( ABSPATH . 'wp-includes/js/dist/edit-post.js' ) ) {
     14define( 'WPINC', 'wp-includes' );
     15
     16if ( file_exists( ABSPATH . WPINC .'/js/dist/edit-post.js' ) ) {
    1517    require_once ABSPATH . '_index.php';
    1618    return;
    1719}
    1820
    19 define( 'WPINC', 'wp-includes' );
    2021require_once ABSPATH . WPINC . '/load.php';
    2122
  • trunk/src/wp-includes/class-http.php

    r52026 r53518  
    99 */
    1010
    11 _deprecated_file( basename( __FILE__ ), '5.9.0', 'wp-includes/class-wp-http.php' );
     11_deprecated_file( basename( __FILE__ ), '5.9.0', WPINC . '/class-wp-http.php' );
    1212
    1313/** WP_Http class */
    14 require_once ABSPATH . 'wp-includes/class-wp-http.php';
     14require_once ABSPATH . WPINC . '/class-wp-http.php';
  • trunk/src/wp-includes/class-oembed.php

    r47198 r53518  
    1010 */
    1111
    12 _deprecated_file( basename( __FILE__ ), '5.3.0', 'wp-includes/class-wp-oembed.php' );
     12_deprecated_file( basename( __FILE__ ), '5.3.0', WPINC . '/class-wp-oembed.php' );
    1313
    1414/** WP_oEmbed class */
    15 require_once ABSPATH . 'wp-includes/class-wp-oembed.php';
     15require_once ABSPATH . WPINC . '/class-wp-oembed.php';
  • trunk/src/wp-includes/date.php

    r47198 r53518  
    99 */
    1010
    11 _deprecated_file( basename( __FILE__ ), '5.3.0', 'wp-includes/class-wp-date-query.php' );
     11_deprecated_file( basename( __FILE__ ), '5.3.0', WPINC . '/class-wp-date-query.php' );
    1212
    1313/** WP_Date_Query class */
    14 require_once ABSPATH . 'wp-includes/class-wp-date-query.php';
     14require_once ABSPATH . WPINC . '/class-wp-date-query.php';
  • trunk/src/wp-includes/embed-template.php

    r47198 r53518  
    99 */
    1010
    11 _deprecated_file( basename( __FILE__ ), '4.5.0', 'wp-includes/theme-compat/embed.php' );
     11_deprecated_file( basename( __FILE__ ), '4.5.0', WPINC . '/theme-compat/embed.php' );
    1212
    1313require ABSPATH . WPINC . '/theme-compat/embed.php';
Note: See TracChangeset for help on using the changeset viewer.