クラス
Semantic
Enqueues global scripts and provides injection helper method(s)
ソース ソース
ファイル: src/Scripts/Semantic.php
class Semantic { const BASE_URL = WCEXAAP_PLUGIN_URL . '/dist/semantic-ui/components'; const SLUG_PREFIX = 'semantic-'; const JS_SLUG = 'semantic-ui'; const CSS_SLUG = 'semantic-ui'; /** * Enqueues bundled semantic JS * * @author Evan D Shaw <evandanielshaw@gmail.com> * @return void */ public function loadSemanticJS() { wp_enqueue_script( self::JS_SLUG, WCEXAAP_PLUGIN_URL . '/dist/semantic-ui/semantic.min.js', [], WCEXAAP_VERSION, false ); } /** * Enqueues minified bundle CSS * * @author Evan D Shaw <evandanielshaw@gmail.com> * @return void */ public function loadAllCss() { wp_enqueue_style( self::CSS_SLUG, WCEXAAP_PLUGIN_URL . '/dist/semantic-ui/semantic.min.css', [], WCEXAAP_VERSION ); } /** * Enqueues modal CSS * * @author Evan D Shaw <evandanielshaw@gmail.com> * @return void */ public function loadModalCss() { wp_enqueue_style( self::SLUG_PREFIX . 'modal', self::BASE_URL . '/modal.min.css', [], WCEXAAP_VERSION ); } /** * Enqueues button CSS * * @author Evan D Shaw <evandanielshaw@gmail.com> * @return void */ public function loadButtonCss() { wp_enqueue_style( self::SLUG_PREFIX . 'button', self::BASE_URL . '/button.min.css', [], WCEXAAP_VERSION ); } /** * Enqueues loader CSS * * @author Evan D Shaw <evandanielshaw@gmail.com> * @return void */ public function loadLoaderCss() { wp_enqueue_style( self::SLUG_PREFIX . 'loader', self::BASE_URL . '/loader.min.css', [], WCEXAAP_VERSION ); } /** * Enqueues segment CSS * * @author Evan D Shaw <evandanielshaw@gmail.com> * @return void */ public function loadSegmentCss() { wp_enqueue_style( self::SLUG_PREFIX . 'segment', self::BASE_URL . '/segment.min.css', [], WCEXAAP_VERSION ); } /** * Enqueues dimmer CSS * * @author Evan D Shaw <evandanielshaw@gmail.com> * @return void */ public function loadDimmerCss() { wp_enqueue_style( self::SLUG_PREFIX . 'dimmer', self::BASE_URL . '/dimmer.min.css', [], WCEXAAP_VERSION ); } /** * Enqueues input CSS * * @author Evan D Shaw <evandanielshaw@gmail.com> * @return void */ public function loadInputCss() { wp_enqueue_style( self::SLUG_PREFIX . 'input', self::BASE_URL . '/input.min.css', [], WCEXAAP_VERSION ); } /** * Enqueues form CSS * * @author Evan D Shaw <evandanielshaw@gmail.com> * @return void */ public function loadFormCss() { wp_enqueue_style( self::SLUG_PREFIX . 'form', self::BASE_URL . '/form.min.css', [], WCEXAAP_VERSION ); } /** * Enqueues icon CSS * * @author Evan D Shaw <evandanielshaw@gmail.com> * @return void */ public function loadIconCss() { wp_enqueue_style( self::SLUG_PREFIX . 'icon', self::BASE_URL . '/icon.min.css', [], WCEXAAP_VERSION ); } /** * Enqueues checkbox CSS * * @author Evan D Shaw <evandanielshaw@gmail.com> * @return void */ public function loadCheckboxCss() { wp_enqueue_style( self::SLUG_PREFIX . 'checkbox', self::BASE_URL . '/checkbox.min.css', [], WCEXAAP_VERSION ); } /** * Enqueues dropdown CSS * * @author Evan D Shaw <evandanielshaw@gmail.com> * @return void */ public function loadDropdownCss() { wp_enqueue_style( self::SLUG_PREFIX . 'dropdown', self::BASE_URL . '/dropdown.min.css', [], WCEXAAP_VERSION ); } /** * Enqueues header CSS * * @author Evan D Shaw <evandanielshaw@gmail.com> * @return void */ public function loadHeaderCss() { wp_enqueue_style( self::SLUG_PREFIX . 'header', self::BASE_URL . '/header.min.css', [], WCEXAAP_VERSION ); } /** * Enqueues transition CSS * * @author Evan D Shaw <evandanielshaw@gmail.com> * @return void */ public function loadTransitionCss() { wp_enqueue_style( self::SLUG_PREFIX . 'transition', self::BASE_URL . '/transition.min.css', [], WCEXAAP_VERSION ); } /** * Enqueues toast CSS * * @author Evan D Shaw <evandanielshaw@gmail.com> * @return void */ public function loadToastCss() { wp_enqueue_style( self::SLUG_PREFIX . 'toast', self::BASE_URL . '/toast.min.css', [], WCEXAAP_VERSION ); } /** * Enqueues message CSS * * @author Evan D Shaw <evandanielshaw@gmail.com> * @return void */ public function loadMessageCss() { wp_enqueue_style( self::SLUG_PREFIX . 'message', self::BASE_URL . '/message.min.css', [], WCEXAAP_VERSION ); } /** * Enqueues popup CSS * * @author Evan D Shaw <evandanielshaw@gmail.com> * @return void */ public function loadPopupCss() { wp_enqueue_style( self::SLUG_PREFIX . 'popup', self::BASE_URL . '/popup.min.css', [], WCEXAAP_VERSION ); } }
- loadAllCss — Enqueues minified bundle CSS
- loadButtonCss — Enqueues button CSS
- loadCheckboxCss — Enqueues checkbox CSS
- loadDimmerCss — Enqueues dimmer CSS
- loadDropdownCss — Enqueues dropdown CSS
- loadFormCss — Enqueues form CSS
- loadHeaderCss — Enqueues header CSS
- loadIconCss — Enqueues icon CSS
- loadInputCss — Enqueues input CSS
- loadLoaderCss — Enqueues loader CSS
- loadMessageCss — Enqueues message CSS
- loadModalCss — Enqueues modal CSS
- loadPopupCss — Enqueues popup CSS
- loadSegmentCss — Enqueues segment CSS
- loadSemanticJS — Enqueues bundled semantic JS
- loadToastCss — Enqueues toast CSS
- loadTransitionCss — Enqueues transition CSS