'Acepress Blocks', 'title' => __('Acepress Blocks', 'acepress-blocks' ), ), ) ); } /** * Enqueue Gutenberg block assets for both frontend + backend. * * @uses {wp-editor} for WP editor styles. * @since 0.1.0 */ function frontend_assets() { // phpcs:ignore // Styles. wp_enqueue_style( 'acepress-blocks-style-css', // Handle. plugins_url( 'dist/blocks.style.build.css', dirname(__FILE__) ), //plugin_dir_url( __FILE__ ) . 'dist/blocks.style.build.css', // plugins_url( 'dist/blocks.style.build.css',acepress_ROOT_FILE), // Block style CSS. array( 'wp-editor' ), // Dependency to include the CSS after it. // plugin_dir_path( __DIR__ ) . 'dist/blocks.style.build.css', null, false ); } /** * Enqueue Gutenberg block assets for backend editor. * * @uses {wp-blocks} for block type registration & related functions. * @uses {wp-element} for WP Element abstraction — structure of blocks. * @uses {wp-i18n} to internationalize the block's text. * @uses {wp-editor} for WP editor styles. * * @since 0.1.0 */ function editor_assets() { // phpcs:ignore // Scripts. wp_enqueue_script( 'acepress-blocks-js', // Handle. plugins_url( '/dist/blocks.build.js',acepress_ROOT_FILE), array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor' ), // plugin_dir_path( __DIR__ ) . 'dist/blocks.build.js', null, true ); // Styles. wp_enqueue_style( 'acepress-blocks-editor-css', plugins_url( 'dist/blocks.editor.build.css', dirname(__FILE__) ), // plugin_dir_url( __FILE__ ) . 'dist/blocks.editor.build.css', //plugins_url( 'dist/blocks.editor.build.css', acepress_ROOT_PATH ), array( 'wp-edit-blocks' ), // plugin_dir_path( __DIR__ ) . 'dist/blocks.editor.build.css', null, true ); wp_enqueue_style( 'acepress-blocks-style-css', // Handle. plugins_url( 'dist/blocks.style.build.css', dirname(__FILE__) ), //plugin_dir_url( __FILE__ ) . 'dist/blocks.style.build.css', // plugins_url( 'dist/blocks.style.build.css',acepress_ROOT_FILE), // Block style CSS. array( 'wp-editor' ), // Dependency to include the CSS after it. // plugin_dir_path( __DIR__ ) . 'dist/blocks.style.build.css', null, false ); } function enqueue_scripts(){ } // enqueue_scripts }