Make WordPress Core


Ignore:
Timestamp:
07/17/2023 02:48:48 PM (22 months ago)
Author:
joemcgill
Message:

General: Rename wp_in_development_mode() to wp_is_development_mode().

This changes the function name for the helper function to check whether the current environment is running with the WP_DEVELOPMENT_MODE constant set to be more consistent with similar functions in core, like wp_is_maintenance_mode() and wp_is_recover_mode().

Props flixos90, swissspidy, costdev, peterwilson, robinwpdeveloper, SergeyBiryukov, joemcgill.
See 57487.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/load/wpGetDevelopmentMode.php

    r56223 r56249  
    99 * @group load.php
    1010 * @covers ::wp_get_development_mode
    11  * @covers ::wp_in_development_mode
     11 * @covers ::wp_is_development_mode
    1212 */
    1313class Test_WP_Get_Development_Mode extends WP_UnitTestCase {
     
    4747
    4848    /**
    49      * Tests that `wp_in_development_mode()` returns expected results.
     49     * Tests that `wp_is_development_mode()` returns expected results.
    5050     *
    5151     * @ticket 57487
    52      * @dataProvider data_wp_in_development_mode
     52     * @dataProvider data_wp_is_development_mode
    5353     */
    54     public function test_wp_in_development_mode( $current, $given, $expected ) {
     54    public function test_wp_is_development_mode( $current, $given, $expected ) {
    5555        global $_wp_tests_development_mode;
    5656
     
    5858
    5959        if ( $expected ) {
    60             $this->assertTrue( wp_in_development_mode( $given ), "{$given} is expected to pass in {$current} mode" );
     60            $this->assertTrue( wp_is_development_mode( $given ), "{$given} is expected to pass in {$current} mode" );
    6161        } else {
    62             $this->assertFalse( wp_in_development_mode( $given ), "{$given} is expected to fail in {$current} mode" );
     62            $this->assertFalse( wp_is_development_mode( $given ), "{$given} is expected to fail in {$current} mode" );
    6363        }
    6464    }
    6565
    6666    /**
    67      * Data provider that returns test scenarios for the `test_wp_in_development_mode()` method.
     67     * Data provider that returns test scenarios for the `test_wp_is_development_mode()` method.
    6868     *
    6969     * @return array[]
    7070     */
    71     public function data_wp_in_development_mode() {
     71    public function data_wp_is_development_mode() {
    7272        return array(
    7373            'core mode, testing for core'              => array(
Note: See TracChangeset for help on using the changeset viewer.