Plugin Directory

Changeset 1986962


Ignore:
Timestamp:
12/06/2018 04:18:59 PM (7 years ago)
Author:
editorblocks
Message:

1.0.5

Location:
disable-gutenberg-blocks/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • disable-gutenberg-blocks/trunk/class-dgb-admin-page.php

    r1986701 r1986962  
    2323        add_action( 'load-settings_page_disable-blocks', array( $this, 'process_bulk_action' ) );
    2424        add_action( 'admin_menu', array( $this, 'register_sub_menu' ), 50 );
    25         add_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ), 10 );
     25        add_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ) );
    2626    }
    2727
     
    6060        );
    6161
    62         wp_enqueue_script( 'dgf-admin', plugins_url( 'js/admin.js', __FILE__ ), array( 'jquery', 'wp-blocks', 'wp-element', 'wp-data', 'wp-components', 'wp-block-library', 'wp-editor' ), '1.1.0' );
     62        $block_registry = WP_Block_Type_Registry::get_instance();
     63        foreach ( $block_registry->get_all_registered() as $block_name => $block_type ) {
     64            // Front-end script.
     65            if ( ! empty( $block_type->editor_script ) ) {
     66                wp_enqueue_script( $block_type->editor_script );
     67            }
     68        }
     69
     70        wp_enqueue_script( 'dgf-admin', plugins_url( 'js/admin.js', __FILE__ ), array( 'jquery', 'wp-blocks', 'wp-element', 'wp-data', 'wp-components', 'wp-block-library' ), '1.1.0' );
    6371        wp_localize_script( 'dgf-admin', 'dgb_object', $local_arr );
    6472    }
  • disable-gutenberg-blocks/trunk/class-disable-gutenberg-blocks.php

    r1986701 r1986962  
    66 * Plugin URI:  https://wordpress.org/plugins/disable-gutenberg-blocks/
    77 * Description: Remove unwanted blocks from the Gutenberg Block Inserter.
    8  * Version:     1.0.4
     8 * Version:     1.0.5
    99 * Author:      Danny Cooper
    1010 * Author URI:  https://editorblocks.com
  • disable-gutenberg-blocks/trunk/readme.txt

    r1986701 r1986962  
    5757== Changelog ==
    5858
     59= 1.0.5 =
     60*Release Date - December 6 2018*
     61
     62* Fix issue with blocks registered using register_block_type()
     63
    5964= 1.0.4 =
    6065*Release Date - December 6 2018*
Note: See TracChangeset for help on using the changeset viewer.