Changeset 56249
- Timestamp:
- 07/17/2023 02:48:48 PM (17 months ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/index.php
r56223 r56249 45 45 * the core developer's workflow. 46 46 */ 47 if ( ! wp_i n_development_mode( 'core' ) ) {47 if ( ! wp_is_development_mode( 'core' ) ) { 48 48 $transient_name = 'wp_core_block_css_files'; 49 49 $files = get_transient( $transient_name ); -
trunk/src/wp-includes/deprecated.php
r56226 r56249 5235 5235 * developer's workflow. 5236 5236 */ 5237 $can_use_cached = ! wp_i n_development_mode( 'theme' );5237 $can_use_cached = ! wp_is_development_mode( 'theme' ); 5238 5238 $cache_group = 'theme_json'; 5239 5239 $cache_key = 'wp_get_global_styles_svg_filters'; -
trunk/src/wp-includes/global-styles-and-settings.php
r56223 r56249 70 70 * developer's workflow. 71 71 */ 72 $can_use_cached = ! wp_i n_development_mode( 'theme' );72 $can_use_cached = ! wp_is_development_mode( 'theme' ); 73 73 74 74 $settings = false; … … 153 153 * developer's workflow. 154 154 */ 155 $can_use_cached = empty( $types ) && ! wp_i n_development_mode( 'theme' );155 $can_use_cached = empty( $types ) && ! wp_is_development_mode( 'theme' ); 156 156 157 157 /* … … 252 252 * developer's workflow. 253 253 */ 254 $can_use_cached = ! wp_i n_development_mode( 'theme' );254 $can_use_cached = ! wp_is_development_mode( 'theme' ); 255 255 256 256 /* … … 361 361 * the theme developer's workflow. 362 362 */ 363 ! wp_i n_development_mode( 'theme' )363 ! wp_is_development_mode( 'theme' ) 364 364 ) { 365 365 return $theme_has_support[ $stylesheet ]; -
trunk/src/wp-includes/load.php
r56245 r56249 281 281 * 282 282 * This function retrieves the currently set development mode value. To check whether 283 * a specific development mode is enabled, use wp_i n_development_mode().283 * a specific development mode is enabled, use wp_is_development_mode(). 284 284 * 285 285 * @since 6.3.0 … … 326 326 * @return bool True if the given mode is covered by the current development mode, false otherwise. 327 327 */ 328 function wp_i n_development_mode( $mode ) {328 function wp_is_development_mode( $mode ) { 329 329 $current_mode = wp_get_development_mode(); 330 330 if ( empty( $current_mode ) ) { -
trunk/tests/phpunit/tests/load/wpGetDevelopmentMode.php
r56223 r56249 9 9 * @group load.php 10 10 * @covers ::wp_get_development_mode 11 * @covers ::wp_i n_development_mode11 * @covers ::wp_is_development_mode 12 12 */ 13 13 class Test_WP_Get_Development_Mode extends WP_UnitTestCase { … … 47 47 48 48 /** 49 * Tests that `wp_i n_development_mode()` returns expected results.49 * Tests that `wp_is_development_mode()` returns expected results. 50 50 * 51 51 * @ticket 57487 52 * @dataProvider data_wp_i n_development_mode52 * @dataProvider data_wp_is_development_mode 53 53 */ 54 public function test_wp_i n_development_mode( $current, $given, $expected ) {54 public function test_wp_is_development_mode( $current, $given, $expected ) { 55 55 global $_wp_tests_development_mode; 56 56 … … 58 58 59 59 if ( $expected ) { 60 $this->assertTrue( wp_i n_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" ); 61 61 } else { 62 $this->assertFalse( wp_i n_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" ); 63 63 } 64 64 } 65 65 66 66 /** 67 * Data provider that returns test scenarios for the `test_wp_i n_development_mode()` method.67 * Data provider that returns test scenarios for the `test_wp_is_development_mode()` method. 68 68 * 69 69 * @return array[] 70 70 */ 71 public function data_wp_i n_development_mode() {71 public function data_wp_is_development_mode() { 72 72 return array( 73 73 'core mode, testing for core' => array(
Note: See TracChangeset
for help on using the changeset viewer.