クラス
WishlistPage
Wishlist page HTML and JS
ソース ソース
ファイル: src/React/WishlistPage/WishlistPage.php
class WishlistPage extends WishlistPageBase { const SCRIPT_HANDLE = 'wcexwl-wishlist-react'; /** * Loads CSS/JS for wishlist page * * @author Evan D Shaw <evandanielshaw@gmail.com> * @global bool $usces_gp * @return void */ 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, ] ) ); } }
- loadImplementationAssets — Loads CSS/JS for wishlist page