Make WordPress Core


Ignore:
Timestamp:
09/11/2023 04:51:09 AM (2 years ago)
Author:
SergeyBiryukov
Message:

Code Modernization: Use dirname() with the $levels parameter.

PHP 7.0 introduced the $levels parameter to the dirname() function, which means nested calls to dirname() are no longer needed.

Note: This is enforced by WPCS 3.0.0.

Reference: PHP Manual: dirname().

Follow-up to [56141].

Props jrf.
See #59161, #58831.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/maint/repair.php

    r55645 r56552  
    88define( 'WP_REPAIRING', true );
    99
    10 require_once dirname( dirname( __DIR__ ) ) . '/wp-load.php';
     10require_once dirname( __DIR__, 2 ) . '/wp-load.php';
    1111
    1212header( 'Content-Type: text/html; charset=utf-8' );
Note: See TracChangeset for help on using the changeset viewer.