関数
WishlistPage::loadEssentialAssets()
お気に入りリストページのCSS/JSを読み込む
戻り値 戻り値
ファイル: src/Views/WishlistPage/WishlistPage.php
public function loadEssentialAssets() { if (!Utils::isWishlistPage($_SERVER['REQUEST_URI'])) { return; } /** * Return `false` with this hook to prevent wishlist page CSS from being loaded * * @important * @param bool $flag Default: `true` */ if (apply_filters('wcexwl_filter_wishlist_page_load_css', true)) { // load semantic-ui and common css Utils::loadCommonCss(); Semantic::loadButtonCss(); Semantic::loadLoaderCss(); Semantic::loadDividerCss(); Semantic::loadIconCss(); Semantic::loadImageCss(); Semantic::loadCheckboxCss(); // load css for page wp_enqueue_style( 'wcexwl-wishlist-page', WCEXWL_PLUGIN_URL . '/src/Styles/wishlist.css', [], WCEXWL_VERSION ); } // load JS client SDK $this->master->loadClientSdk(); wp_enqueue_script( 'wishlist-bootstrap', WCEXWL_PLUGIN_URL . '/src/Views/WishlistPage/bootstrap.js', [], WCEXWL_VERSION, true ); wp_localize_script('wishlist-bootstrap', 'wlbootstrap', ['theme' => Master::getThemeConfig()['name']]); /** * Fires after all wishlist page common/default JS/CSS has been enqueued * * Use this hook to enqueue your own JS/CSS on the wishlist page if necessary. * * @important */ do_action('wcexwl_wishlist_page_on_load_assets'); if (!usces_is_login()) { return; } $this->loadImplementationAssets(); }