関数
ItemPage::loadEssentialAssets()
商品ページにCSS/JSを読み込む
戻り値 戻り値
ファイル: src/Views/ItemPage/ItemPage.php
public function loadEssentialAssets() {
/**
* Return `false` with this hook to prevent item page CSS from being loaded
*
* @important
* @param bool $flag Default: `true`
*/
if (apply_filters('wcexwl_filter_item_page_load_css', true)) {
// load semantic-ui and common css
Utils::loadCommonCss();
Semantic::loadButtonCss();
Semantic::loadLoaderCss();
// load css for page
wp_enqueue_style(
'wcexwl-item-page',
WCEXWL_PLUGIN_URL . '/src/Styles/item.css',
[],
WCEXWL_VERSION,
false
);
}
// load JS client SDK
$this->master->loadClientSdk();
/**
* Fires after all item page common/default JS/CSS has been enqueued
*
* Use this hook to enqueue your own JS/CSS on the item page if necessary.
*
* @important
*/
do_action('wcexwl_item_page_on_load_assets');
$this->loadImplementationAssets();
}