[], 'version' => TCEX_VERSION ]; wp_enqueue_script( 'rich-table-cells-editor', TCEX_PLUGIN_URL . 'build/index.js', array_merge( $asset['dependencies'], [ 'wp-blocks', 'wp-element', 'wp-editor', 'wp-components', 'wp-rich-text', 'wp-hooks', 'wp-i18n', ] ), $asset['version'], true ); } if ( file_exists( $css_file ) ) { wp_enqueue_style( 'rich-table-cells-editor', TCEX_PLUGIN_URL . 'build/index.css', [ 'wp-edit-blocks' ], TCEX_VERSION ); } // フロントエンド共通スタイルもエディターに読み込む wp_enqueue_style( 'rich-table-cells-frontend', TCEX_PLUGIN_URL . 'assets/css/frontend.css', [], TCEX_VERSION ); // JS の翻訳ファイルを登録 wp_set_script_translations( 'rich-table-cells-editor', '16deza-table-cell-extras', TCEX_PLUGIN_DIR . 'languages' ); } /** * フロントエンド用スタイルの読み込み */ add_action( 'wp_enqueue_scripts', 'tcex_enqueue_frontend_assets' ); function tcex_enqueue_frontend_assets() { wp_enqueue_style( 'rich-table-cells-frontend', TCEX_PLUGIN_URL . 'assets/css/frontend.css', [], TCEX_VERSION ); }