関数
WishlistPage::loadImplementationAssets()
お気に入りリストページにCSS/JSを読み込む
戻り値 戻り値
ファイル: src/React/WishlistPage/WishlistPage.php
protected function loadImplementationAssets() { $wishlist = CRUD::getAndBuildWishlistItems(); global $usces_gp; $assetsmap = include(WCEXWL_PLUGIN_DIR . '/dist/js/React/WishlistPage/App.asset.php'); wp_enqueue_script( self::SCRIPT_HANDLE, WCEXWL_PLUGIN_URL . '/dist/js/React/WishlistPage/App.js', $assetsmap['dependencies'], $assetsmap['version'], true ); wp_localize_script( self::SCRIPT_HANDLE, 'wcexwl', array_merge( $this->master->getScriptInjectionVariables(), [ 'uscesgp' => $usces_gp, 'currencylabel' => __('Currency', 'usces'), 'currencysymbol' => __(usces_crcode('return'), 'usces'), // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText 'btnprimary' => Master::getFilterableValues()['btnprimary'], 'gpgif' => file_exists(get_template_directory() . '/images/gp.gif') ? get_template_directory_uri() . '/images/gp.gif' : USCES_PLUGIN_URL . '/images/gp.gif', 'gpalt' => __('Business package discount', 'usces'), 'gptext' => __('The price with this mark applys to Business pack discount.', 'usces'), 'theme' => Master::getThemeConfig()['name'], 'wishlist' => $wishlist, ] ) ); }