Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_theme_json_data_blocks

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
351           }
352
353           /**
354            * Filters the data provided by the blocks for global styles & settings.
355            *
356            * @since 6.1.0
357            *
358            * @param WP_Theme_JSON_Data Class to access and update the underlying data.
359            */
360           $theme_json = apply_filters( 'wp_theme_json_data_blocks', new WP_Theme_JSON_Data( $config, 'blocks' ) );
361           $config     = $theme_json->get_data();
362
363           static::$blocks = new WP_Theme_JSON( $config, 'blocks' );
364           return static::$blocks;
365      }
366
367      /**
368       * When given an array, this will remove any keys with the name `//`.
369       *