Plugin Directory

Changeset 2641549


Ignore:
Timestamp:
12/09/2021 12:43:28 AM (4 years ago)
Author:
themejason
Message:

Update to 1.0.2

Location:
theme-jason
Files:
23 added
4 edited

Legend:

Unmodified
Added
Removed
  • theme-jason/trunk/classes/admin/Admin.php

    r2640772 r2641549  
    4444        }
    4545
    46         if ( class_exists( '\WP_Theme_JSON_Gutenberg' ) ) {
    47             $schema = \WP_Theme_JSON_Gutenberg::LATEST_SCHEMA;
     46        if ( empty( $content ) ) {
     47            return;
     48        }
     49
     50        if ( class_exists( '\WP_Theme_JSON' ) ) {
     51            $schema = new \WP_Theme_JSON( $content, 'user' );
    4852        } else {
    49             $schema = \WP_Theme_JSON::LATEST_SCHEMA;
     53            $schema = new \WP_Theme_JSON_Gutenberg( $content, 'user' );
    5054        }
    5155
     
    6872
    6973        // Creates a \WP_Theme_JSON_Gutenberg class to use its constants.
    70         if ( class_exists( '\WP_Theme_JSON_Gutenberg' ) ) {
     74        if ( class_exists( '\WP_Theme_JSON' ) ) {
     75            $theme_gutenberg = new \WP_Theme_JSON( $content, 'user' );
     76        } else {
    7177            $theme_gutenberg = new \WP_Theme_JSON_Gutenberg( $content, 'user' );
    72         } else {
    73             $theme_gutenberg = new \WP_Theme_JSON( $content, 'user' );
    74         }
    75        
     78        }
     79
    7680        $valid_block_names   = array_keys( $this->get_blocks_metadata( $theme_gutenberg::ELEMENTS ) );
    7781        $valid_element_names = array_keys( $theme_gutenberg::ELEMENTS );
  • theme-jason/trunk/classes/front/Front.php

    r2640691 r2641549  
    1717    public function enqueue_scripts() {
    1818
    19         if ( class_exists( '\WP_Theme_JSON_Resolver_Gutenberg' ) ) {
     19        if ( class_exists( '\WP_Theme_JSON_Resolver' ) ) {
     20            $data = \WP_Theme_JSON_Resolver::get_merged_data();
     21        } else {
    2022            $data = \WP_Theme_JSON_Resolver_Gutenberg::get_merged_data();
    21         } else {
    22             $data = \WP_Theme_JSON_Resolver::get_merged_data();
    2323        }
    2424
  • theme-jason/trunk/readme.txt

    r2640772 r2641549  
    55Tested up to: 5.8.2
    66Requires PHP: 7.0
    7 Stable tag: 1.0.1
     7Stable tag: 1.0.2
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
  • theme-jason/trunk/theme-jason.php

    r2640772 r2641549  
    2424define( 'THEME_JASON_DIRECTORY_ROOT', __DIR__ );
    2525define( 'THEME_JASON_DIRECTORY_URL', plugin_dir_url( __FILE__ ) );
    26 define( 'THEME_JASON_PLUGIN_VERSION', '1.0.1' );
     26define( 'THEME_JASON_PLUGIN_VERSION', '1.0.2' );
    2727
    2828/**
Note: See TracChangeset for help on using the changeset viewer.