WP_Theme_JSON_Data example

$config = static::read_json_file( __DIR__ . '/theme.json' );
        $config = static::translate( $config );

        /** * Filters the default data provided by WordPress for global styles & settings. * * @since 6.1.0 * * @param WP_Theme_JSON_Data $theme_json Class to access and update the underlying data. */
        $theme_json   = apply_filters( 'wp_theme_json_data_default', new WP_Theme_JSON_Data( $config, 'default' ) );
        $config       = $theme_json->get_data();
        static::$core = new WP_Theme_JSON( $config, 'default' );

        return static::$core;
    }

    /** * Checks whether the registered blocks were already processed for this origin. * * @since 6.1.0 * * @param string $origin Data source for which to cache the blocks. * Valid values are 'core', 'blocks', 'theme', and 'user'. * @return bool True on success, false otherwise. */
Home | Imprint | This part of the site doesn't use cookies.