/** * Register and enqueue admin-specific style sheet. * @return null Return early if no settings page is registered. */ public function enqueue_admin_styles() { if (!isset($this->plugin_screen_hook_suffix)) { return; } $screen = get_current_screen(); if (in_array($screen->id, $this->plugin_screen_hook_suffix)) { wp_enqueue_style(array('wp-jquery-ui', 'wp-jquery-ui-core', 'wp-jquery-ui-dialog', 'wp-color-picker')); wp_enqueue_style($this->plugin_slug . '-admin-styles', EG_PLUGIN_URL . 'admin/assets/css/admin.css', array(), Essential_Grid::VERSION); wp_enqueue_style($this->plugin_slug . '-codemirror-styles', EG_PLUGIN_URL . 'admin/assets/css/codemirror.css', array(), Essential_Grid::VERSION); wp_enqueue_style($this->plugin_slug . '-tooltipser-styles', EG_PLUGIN_URL . 'admin/assets/css/tooltipster.css', array(), Essential_Grid::VERSION); wp_register_style($this->plugin_slug . '-plugin-settings', EG_PLUGIN_URL . 'public/assets/css/settings.css', array(), Essential_Grid::VERSION); wp_enqueue_style($this->plugin_slug . '-plugin-settings'); wp_register_style('themepunchboxextcss', EG_PLUGIN_URL . 'public/assets/css/lightbox.css', array(), Essential_Grid::VERSION); $font = new ThemePunch_Fonts(); $font->register_fonts(); } wp_enqueue_style($this->plugin_slug . '-global-styles', EG_PLUGIN_URL . 'admin/assets/css/global.css', array(), Essential_Grid::VERSION); //enqueue in all pages / posts in backend $post_types = get_post_types('', 'names'); foreach ($post_types as $post_type) { if ($post_type == $screen->id) { wp_enqueue_style('wp-jquery-ui-dialog'); } if ($post_type == $screen->id) { wp_enqueue_style('wp-color-picker'); } } }
/** * Register and enqueue public-facing style sheet. */ public function enqueue_styles() { wp_register_style($this->plugin_slug . '-plugin-settings', EG_PLUGIN_URL . 'public/assets/css/settings.css', array(), self::VERSION); wp_enqueue_style($this->plugin_slug . '-plugin-settings'); $font = new ThemePunch_Fonts(); $font->register_fonts(); wp_register_style('themepunchboxextcss', EG_PLUGIN_URL . 'public/assets/css/lightbox.css', array(), self::VERSION); }
public static function enqueue_styles() { $font = new ThemePunch_Fonts(); $font->register_fonts(); }
public function hookdisplayHeader() { $this->context->controller->addCSS($this->_path . 'rs-plugin/css/settings.css'); $this->context->controller->addCSS($this->_path . 'rs-plugin/css/static-captions.css'); $this->context->controller->addCSS($this->_path . 'rs-plugin/css/dynamic-captions.css'); $this->context->controller->addCSS($this->_path . 'css/front.css'); $this->context->controller->addJS($this->_path . 'rs-plugin/js/jquery.themepunch.tools.min.js'); $this->context->controller->addJS($this->_path . 'rs-plugin/js/jquery.themepunch.revolution.min.js'); $pf = new ThemePunch_Fonts(); $pf->register_fonts(); }