| @@ -46,8 +46,9 @@ | ||
| 46 | 46 | } |
| 47 | 47 | wp_add_inline_script( 'wp-blocks', sprintf( 'wp.blocks.setCategories( %s );', wp_json_encode( $block_categories ) ), 'after' ); |
| 48 | 48 | |
| 49 | 49 | do_action( 'enqueue_block_editor_assets' ); |
| 50 | + do_action( 'enqueue_block_assets' ); | |
| 50 | 51 | wp_dequeue_script( 'block-manager' ); |
| 51 | 52 | |
| 52 | 53 | // -> https://github.com/WordPress/gutenberg/issues/22812 |
| 53 | 54 | wp_add_inline_script( 'wp-blocks', 'wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode( get_block_editor_server_block_settings() ) . ');' ); |
| @@ -86,8 +87,9 @@ | ||
| 86 | 87 | 'gbm_localize', |
| 87 | 88 | [ |
| 88 | 89 | 'root' => esc_url_raw( rest_url() ), |
| 89 | 90 | 'nonce' => wp_create_nonce( 'wp_rest' ), |
| 91 | + 'wpVersion' => get_bloginfo( 'version' ), | |
| 90 | 92 | 'disabledBlocks' => GBM_Blocks::gbm_remove_duplicate_blocks( GBM_Blocks::gbm_get_disabled_blocks(), $filtered_blocks ), |
| 91 | 93 | 'filteredBlocks' => $filtered_blocks, |
| 92 | 94 | 'disabledBlocksAll' => GBM_Blocks::gbm_get_all_disabled_blocks(), |
| 93 | 95 | 'blockCategories' => GBM_Categories::gbm_remove_duplicate_categories( GBM_Categories::gbm_get_block_categories(), $filtered_categories ), |