Changeset 54501
- Timestamp:
- 10/11/2022 08:06:16 PM (2 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-theme-json-resolver.php
r54493 r54501 181 181 * @param WP_Theme_JSON_Data Class to access and update the underlying data. 182 182 */ 183 $theme_json = apply_filters( ' theme_json_default', new WP_Theme_JSON_Data( $config, 'default' ) );183 $theme_json = apply_filters( 'wp_theme_json_data_default', new WP_Theme_JSON_Data( $config, 'default' ) ); 184 184 $config = $theme_json->get_data(); 185 185 static::$core = new WP_Theme_JSON( $config, 'default' ); … … 257 257 * @param WP_Theme_JSON_Data Class to access and update the underlying data. 258 258 */ 259 $theme_json = apply_filters( ' theme_json_theme', new WP_Theme_JSON_Data( $theme_json_data, 'theme' ) );259 $theme_json = apply_filters( 'wp_theme_json_data_theme', new WP_Theme_JSON_Data( $theme_json_data, 'theme' ) ); 260 260 $theme_json_data = $theme_json->get_data(); 261 261 static::$theme = new WP_Theme_JSON( $theme_json_data ); … … 358 358 * @param WP_Theme_JSON_Data Class to access and update the underlying data. 359 359 */ 360 $theme_json = apply_filters( ' theme_json_blocks', new WP_Theme_JSON_Data( $config, 'blocks' ) );360 $theme_json = apply_filters( 'wp_theme_json_data_blocks', new WP_Theme_JSON_Data( $config, 'blocks' ) ); 361 361 $config = $theme_json->get_data(); 362 362 … … 491 491 * @param WP_Theme_JSON_Data Class to access and update the underlying data. 492 492 */ 493 $theme_json = apply_filters( ' theme_json_user', new WP_Theme_JSON_Data( $config, 'custom' ) );493 $theme_json = apply_filters( 'wp_theme_json_data_user', new WP_Theme_JSON_Data( $config, 'custom' ) ); 494 494 $config = $theme_json->get_data(); 495 495 return new WP_Theme_JSON( $config, 'custom' ); … … 509 509 510 510 /** This filter is documented in wp-includes/class-wp-theme-json-resolver.php */ 511 $theme_json = apply_filters( ' theme_json_user', new WP_Theme_JSON_Data( $config, 'custom' ) );511 $theme_json = apply_filters( 'wp_theme_json_data_user', new WP_Theme_JSON_Data( $config, 'custom' ) ); 512 512 $config = $theme_json->get_data(); 513 513 static::$user = new WP_Theme_JSON( $config, 'custom' ); -
trunk/src/wp-includes/class-wp-theme-json.php
r54497 r54501 1912 1912 * @param array $nodes Style nodes with metadata. 1913 1913 */ 1914 return apply_filters( ' theme_json_get_style_nodes', $nodes );1914 return apply_filters( 'wp_theme_json_get_style_nodes', $nodes ); 1915 1915 } 1916 1916 -
trunk/src/wp-includes/script-loader.php
r54485 r54501 2430 2430 * This filter must be registered before calling wp_get_global_stylesheet(); 2431 2431 */ 2432 add_filter( ' theme_json_get_style_nodes', 'wp_filter_out_block_nodes' );2432 add_filter( 'wp_theme_json_get_style_nodes', 'wp_filter_out_block_nodes' ); 2433 2433 2434 2434 $stylesheet = wp_get_global_stylesheet(); -
trunk/tests/phpunit/tests/theme/wpThemeJsonResolver.php
r54493 r54501 391 391 } 392 392 393 $expected_filter_count = did_filter( ' theme_json_default' );393 $expected_filter_count = did_filter( 'wp_theme_json_data_default' ); 394 394 $actual = WP_Theme_JSON_Resolver::get_core_data(); 395 395 if ( $should_fire_filter ) { … … 397 397 } 398 398 399 $this->assertSame( $expected_filter_count, did_filter( ' theme_json_default' ), 'The filter "theme_json_default" should fire the given number of times' );399 $this->assertSame( $expected_filter_count, did_filter( 'wp_theme_json_data_default' ), 'The filter "theme_json_default" should fire the given number of times' ); 400 400 $this->assertInstanceOf( WP_Theme_JSON::class, $actual, 'WP_Theme_JSON_Resolver::get_core_data() should return instance of WP_Theme_JSON' ); 401 401 $this->assertSame( static::$property_core->getValue(), $actual, 'WP_Theme_JSON_Resolver::$core property should be the same object as returned from WP_Theme_JSON_Resolver::get_core_data()' );
Note: See TracChangeset
for help on using the changeset viewer.