[], 'version' => SRFM_VER, ]; $script_dep = array_merge( $script_info['dependencies'], [ 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor' ] ); $script_ver = $script_info['version']; // Register block editor script for backend. wp_enqueue_script( 'srfm-spec-block-js', // Handle. SRFM_URL . 'modules/gutenberg/build/blocks.js', $script_dep, // Dependencies, defined above. $script_ver, // Version: filemtime — Gets file modification time. true // Enqueue the script in the footer. ); wp_set_script_translations( 'srfm-spec-block-js', 'sureforms' ); // Register block editor styles for backend. wp_enqueue_style( 'srfm-block-block-editor-css', // Handle. SRFM_URL . 'modules/gutenberg/build/blocks.style.css', [ 'wp-edit-blocks' ], // Dependency to include the CSS after it. SRFM_VER // Version: File modification time. ); // Common Editor style. wp_enqueue_style( 'srfm-block-common-editor-css', // Handle. SRFM_URL . 'modules/gutenberg/dist/editor.css', [ 'wp-edit-blocks' ], // Dependency to include the CSS after it. SRFM_VER // Version: File modification time. ); } } } /** * Prepare if class 'Spec_Init_Blocks' exist. * Kicking this off by calling 'get_instance()' method */ Spec_Init_Blocks::get_instance();