Plugin Directory

Changeset 3143308


Ignore:
Timestamp:
08/29/2024 04:04:16 AM (18 months ago)
Author:
nexablock
Message:

1.0.4 : some warning solved

Location:
nexa-blocks
Files:
190 added
3 edited

Legend:

Unmodified
Added
Removed
  • nexa-blocks/trunk/inc/classes/register-blocks.php

    r3143053 r3143308  
    4949        public function register_blocks() {
    5050            $blocks = get_option( 'nexa_blocks', Nexa_Blocks_Helpers::get_nexa_blocks() );
    51 
     51       
    5252            if ( ! empty( $blocks ) && is_array( $blocks ) ) {
    5353                foreach ( $blocks as $block ) {
    54 
     54       
    5555                    $path = NEXA_PLUGIN_DIR;
    56 
     56       
    5757                    if( isset( $block['is_pro'] ) && $block['is_pro'] === true && defined( 'NEXA_BLOCKS_PRO_PATH' ) ) {
    5858                        $path = NEXA_BLOCKS_PRO_PATH;
    5959                    }
    60 
     60       
    6161                    $block_name = trailingslashit( $path ) . 'build/blocks/' . $block['name'];
    62 
     62       
    6363                    if ( isset( $block['active'] ) && $block['active'] === false ) {
    64                         unregister_block_type( $block_name );
     64       
     65                        // Check if the block type is registered before trying to unregister it
     66                        if( WP_Block_Type_Registry::get_instance()->is_registered( $block_name ) ) {
     67                            unregister_block_type( $block_name );
     68                        }
     69       
    6570                    } else {
    66                         register_block_type( $block_name );
     71                        if( file_exists( $block_name ) ) {
     72                            register_block_type( $block_name );
     73                        }
    6774                    }
    6875                }
  • nexa-blocks/trunk/nexa-blocks.php

    r3143053 r3143308  
    66 * Plugin URI: https://www.nexablocks.com/
    77 * Author URI: https://www.nexablocks.com
    8  * Version: 1.0.3
     8 * Version: 1.0.4
    99 * Text Domain: nexa-blocks
    1010 * Domain Path: /lang
  • nexa-blocks/trunk/readme.txt

    r3143053 r3143308  
    44Requires at least: 6.0
    55Tested up to: 6.6
    6 Stable tag: 1.0.3
     6Stable tag: 1.0.4
    77Requires PHP: 7.4
    88License: GPLv2 or later
     
    9696== Changelog ==
    9797
     98= 1.0.4 =
     99* some warning solved.
     100
    98101= 1.0.3 =
    99102* Dashboard Added.
Note: See TracChangeset for help on using the changeset viewer.