本文整理汇总了PHP中wp_style_is函数的典型用法代码示例。如果您正苦于以下问题:PHP wp_style_is函数的具体用法?PHP wp_style_is怎么用?PHP wp_style_is使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wp_style_is函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: siteorigin_widget_get_icon
/**
* @param $icon_value
* @param bool $icon_styles
*
* @return bool|string
*/
function siteorigin_widget_get_icon($icon_value, $icon_styles = false)
{
if (empty($icon_value)) {
return false;
}
list($family, $icon) = explode('-', $icon_value, 2);
if (empty($family) || empty($icon)) {
return false;
}
static $widget_icon_families;
static $widget_icons_enqueued = array();
if (empty($widget_icon_families)) {
$widget_icon_families = apply_filters('siteorigin_widgets_icon_families', array());
}
if (empty($widget_icon_families[$family]) || empty($widget_icon_families[$family]['icons'][$icon])) {
return false;
}
if (empty($widget_icons_enqueued[$family]) && !empty($widget_icon_families[$family]['style_uri'])) {
if (!wp_style_is('siteorigin-widget-icon-font-' . $family)) {
wp_enqueue_style('siteorigin-widget-icon-font-' . $family, $widget_icon_families[$family]['style_uri']);
}
return '<span class="sow-icon-' . esc_attr($family) . '" data-sow-icon="' . $widget_icon_families[$family]['icons'][$icon] . '" ' . (!empty($icon_styles) ? 'style="' . implode('; ', $icon_styles) . '"' : '') . '></span>';
} else {
return false;
}
}
开发者ID:spielhoelle,项目名称:amnesty,代码行数:32,代码来源:base.php
示例2: cr_styles_scripts
function cr_styles_scripts()
{
if (is_singular('reports')) {
wp_register_style('cap-reports-theme-compat', plugin_dir_url(__FILE__) . 'css/cap-reports-theme-support.css');
wp_register_style('cap-reports-full', plugin_dir_url(__FILE__) . 'css/cap-reports-full.css');
// Check to see if the current theme has support for cap-reports
// This can be delcared on a theme by declaring add_theme_support('cap-reports'); in functions.php
if (current_theme_supports('cap-reports')) {
wp_enqueue_style('cap-reports-theme-compat');
} else {
wp_enqueue_style('cap-reports-full');
}
if (!wp_style_is('mdi', 'enqueued')) {
wp_enqueue_style('mdi', plugin_dir_url(__FILE__) . 'bower_components/mdi/css/materialdesignicons.min.css');
}
// We need to check for enquire js and vide before enqueuing
wp_enqueue_script('cap-reports', plugin_dir_url(__FILE__) . 'js/cap-reports.js', array('jquery'), '20150210', true);
if (!wp_script_is('vide', 'enqueued')) {
wp_enqueue_script('vide', plugin_dir_url(__FILE__) . 'bower_components/vide/dist/jquery.vide.min.js', array('jquery'), '20150210', true);
}
if (!wp_script_is('enquire.js', 'enqueued')) {
wp_enqueue_script('enquire.js', plugin_dir_url(__FILE__) . 'bower_components/enquire/dist/enquire.min.js', array('jquery'), '20150210', true);
}
}
}
开发者ID:amprog,项目名称:cap-reports,代码行数:25,代码来源:cap-reports.php
示例3: test_it_can_enqueue_style
function test_it_can_enqueue_style()
{
$this->stylesheet->slug = 'foo';
$this->stylesheet->register();
$this->stylesheet->enqueue();
$this->assertTrue(wp_style_is('foo', 'enqueued'));
}
开发者ID:dsawardekar,项目名称:wp-asset-manager,代码行数:7,代码来源:StylesheetTest.php
示例4: jetpack_register_social_logos
function jetpack_register_social_logos()
{
if (!wp_style_is('social-logos', 'registered')) {
$post_fix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
wp_register_style('social-logos', plugins_url('social-logos/social-logos' . $post_fix . '.css', __FILE__), false, '1');
}
}
开发者ID:kanei,项目名称:vantuch.cz,代码行数:7,代码来源:social-logos.php
示例5: settings_assets
/**
* Load settings JS & CSS
* @return void
*/
public function settings_assets()
{
// Scripts & Styles for Color Picker
$cpscript = 'farbtastic';
$cpstyle = 'farbtastic';
$list = 'enqueued';
if (wp_script_is($cpscript, $list)) {
return;
} else {
wp_enqueue_script('farbtastic');
}
if (wp_style_is($cpstyle, $list)) {
return;
} else {
wp_enqueue_style('farbtastic');
}
// Custom AMD Scripts
$amdadminjs = 'wfm-admin-js';
if (wp_script_is($amdadminjs, $list)) {
return;
} else {
wp_register_script('wfm-admin-js', $this->plugin_url . '/am-wcslider-admin-scripts.js', array('farbtastic', 'jquery'), '1.0.0');
wp_enqueue_script('wfm-admin-js');
}
}
开发者ID:alexmustin,项目名称:AM-WCSlider,代码行数:29,代码来源:config.php
示例6: zerowp_customizer_enqueue_font
function zerowp_customizer_enqueue_font($option)
{
$font_name = get_theme_mod($option);
if (empty($font_name)) {
$font_name = 'Arial';
}
if (!in_array($font_name, zerowp_customizer_standard_fonts())) {
$font_weight = get_theme_mod($option . '_weight', 400);
$font_weight = !empty($font_weight) ? $font_weight : 400;
$font_weight_in_url = !in_array(absint($font_weight), array(400, 700)) ? '400,700,' . $font_weight : '400,700';
$font_name = trim($font_name);
$handle = 'google_font_' . str_ireplace(' ', '_', $font_name);
if (!wp_style_is($handle, 'enqueued')) {
wp_register_style($handle, "//fonts.googleapis.com/css?family=" . str_ireplace(' ', '+', $font_name) . ":" . $font_weight_in_url);
wp_enqueue_style($handle);
} else {
$registered_link = wp_styles()->query($handle)->src;
if (strpos($registered_link, (string) $font_weight) === false) {
wp_deregister_style($handle);
wp_register_style($handle, $registered_link . ',' . $font_weight);
wp_enqueue_style($handle);
}
}
}
}
开发者ID:ZeroWP,项目名称:Customizer,代码行数:25,代码来源:functions.php
示例7: bigboom_enqueue_scripts
/**
* Enqueue scripts and styles.
*
* @since 1.0
*/
function bigboom_enqueue_scripts()
{
/* Register and enqueue styles */
wp_register_style('bb-icons', THEME_URL . '/css/icons.min.css', array(), THEME_VERSION);
wp_register_style('bootstrap', THEME_URL . '/css/bootstrap.min.css', array(), '3.3.2');
wp_register_style('google-fonts', '//fonts.googleapis.com/css?family=Montserrat:400,700|Raleway:300,500,600,700,400');
if (!wp_style_is('js_composer_front', 'enqueued') && wp_style_is('js_composer_front', 'registered')) {
wp_enqueue_style('js_composer_front');
}
wp_enqueue_style('bigboom', get_stylesheet_uri(), array('google-fonts', 'bootstrap', 'bb-icons'), THEME_VERSION);
// Load custom color scheme file
if (intval(bigboom_theme_option('custom_color_scheme')) && bigboom_theme_option('custom_color_1')) {
$upload_dir = wp_upload_dir();
$dir = path_join($upload_dir['baseurl'], 'custom-css');
$file = $dir . '/color-scheme.css';
wp_enqueue_style('bigboom-color-scheme', $file, THEME_VERSION);
}
/** Register and enqueue scripts */
$min = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
wp_register_script('jquery-tabs', THEME_URL . '/js/jquery.tabs.js', array('jquery'), '1.0.0', true);
wp_register_script('bigboom-plugins', THEME_URL . "/js/plugins{$min}.js", array('jquery'), THEME_VERSION, true);
wp_enqueue_script('bigboom', THEME_URL . "/js/scripts{$min}.js", array('bigboom-plugins'), THEME_VERSION, true);
wp_localize_script('bigboom', 'bigboom', array('ajax_url' => admin_url('admin-ajax.php'), 'nonce' => wp_create_nonce('_bigboom_nonce'), 'direction' => is_rtl() ? 'rtl' : ''));
if (is_singular() && comments_open() && get_option('thread_comments')) {
wp_enqueue_script('comment-reply');
}
}
开发者ID:Qualitair,项目名称:ecommerce,代码行数:32,代码来源:header.php
示例8: test_enqueue_scripts_styles
/**
* @since 4.3.0
* @depends test_valid_constructor
*/
public function test_enqueue_scripts_styles()
{
$this->_eeAdminHookMock->enqueue_scripts_styles();
$this->assertTrue(wp_style_is('test-css', 'registered'));
$this->assertTrue(wp_style_is('test-css'));
$this->assertFalse(wp_style_is('event-editor-css', 'registered'));
$this->assertTrue(wp_script_is('test-js', 'registered'));
$this->assertTrue(wp_script_is('test-js'));
//test exception if no registers index in _scripts_styles property.
$scripts_styles_cache = $this->_eeAdminHookMock->get_property('_scripts_styles');
//let's set a scripts styles array with no registers.
$new_scripts_styles['something'] = 'fail';
$this->_eeAdminHookMock->set_property('_scripts_styles', $new_scripts_styles);
$this->setExpectedException('EE_Error');
$this->_eeAdminHookMock->enqueue_scripts_styles();
//test for exception with missing params
$this->_eeAdminHookMock->set_property('_scripts_styles', $scripts_styles_cache);
$new_scripts_styles = $scripts_styles_cache;
unset($new_scripts_styles['registers']['test-css']['url']);
$this->_eeAdminHookMock->set_property('_scripts_styles', $new_scripts_styles);
$this->setExpectedException('EE_Error');
$this->_eeAdminHookMock->enqueue_scripts_styles();
//restore correct scripts styles
$this->_eeAdminHookMock->set_property('_scripts_styles', $scripts_styles_cache);
}
开发者ID:DavidSteinbauer,项目名称:event-espresso-core,代码行数:29,代码来源:EE_Admin_Hooks_Tests.php
示例9: registration
public function registration($params)
{
// Loading scripts and styles only when required
/* Password Stregth Checker Script */
if (!wp_script_is('form-validate')) {
wp_register_script('form-validate', upme_url . 'js/form-validate.js', array('jquery'));
wp_enqueue_script('form-validate');
$validate_strings = upme_form_validate_setting();
wp_localize_script('form-validate', 'Validate', $validate_strings);
}
// Include password strength meter from WordPress core
wp_enqueue_script('password-strength-meter');
if (!wp_style_is('upme_password_meter')) {
wp_register_style('upme_password_meter', upme_url . 'css/password-meter.css');
wp_enqueue_style('upme_password_meter');
}
if (!wp_style_is('upme_date_picker')) {
wp_register_style('upme_date_picker', upme_url . 'css/upme-datepicker.css');
wp_enqueue_style('upme_date_picker');
}
if (!wp_script_is('upme_date_picker_js')) {
wp_register_script('upme_date_picker_js', upme_url . 'js/upme-datepicker.js', array('jquery'));
wp_enqueue_script('upme_date_picker_js');
// Set date picker default settings
$date_picker_array = upme_date_picker_setting();
wp_localize_script('upme_date_picker_js', 'UPMEDatePicker', $date_picker_array);
}
do_action('upme_add_registration_scripts');
}
开发者ID:nikwin333,项目名称:pcu_project,代码行数:29,代码来源:class-upme-scripts-styles.php
示例10: enqueue
public static function enqueue()
{
$image_util_support = get_theme_support('pls-image-util');
if (!wp_script_is('pls-image-util-fancybox', 'registered')) {
wp_register_script('pls-image-util-fancybox', trailingslashit(PLS_EXT_URL) . 'image-util/fancybox/jquery.fancybox-1.3.4.pack.js', array('jquery'), NULL, true);
}
if (!wp_script_is('pls-image-util-fancybox-default-settings', 'registered')) {
wp_register_script('pls-image-util-fancybox-default-settings', trailingslashit(PLS_EXT_URL) . 'image-util/fancybox/default-settings.js', array('jquery'), NULL, true);
}
if (!wp_style_is('pls-image-util-fancybox-style', 'registered')) {
wp_register_style('pls-image-util-fancybox-style', trailingslashit(PLS_EXT_URL) . 'image-util/fancybox/jquery.fancybox-1.3.4.css');
}
if (is_array($image_util_support)) {
if (in_array('fancybox', $image_util_support[0])) {
if (!wp_script_is('pls-image-util-fancybox', 'queue')) {
wp_enqueue_script('pls-image-util-fancybox');
}
if (!wp_script_is('pls-image-util-fancybox-default-settings', 'queue')) {
wp_enqueue_script('pls-image-util-fancybox-default-settings');
}
if (!wp_style_is('pls-image-util-fancybox-style', 'queue')) {
wp_enqueue_style('pls-image-util-fancybox-style');
}
}
return;
}
}
开发者ID:lytranuit,项目名称:wordpress,代码行数:27,代码来源:image-util.php
示例11: enqueue_pro_lightbox_resources
function enqueue_pro_lightbox_resources($displayed_gallery = FALSE)
{
$settings = C_NextGen_Settings::get_instance();
if ($settings->thumbEffect == NGG_PRO_LIGHTBOX) {
$router = C_Router::get_instance();
if (!self::$run_once) {
// ensure the gallery exists
if ($displayed_gallery && $displayed_gallery->id()) {
$this->object->_add_script_data('ngg_common', 'galleries.gallery_' . $displayed_gallery->id() . '.wordpress_page_root', get_permalink(), FALSE);
}
wp_enqueue_script('underscore');
wp_enqueue_script('backbone');
wp_enqueue_script('velocity', $router->get_static_url('photocrati-nextgen_pro_lightbox_legacy#velocity.min.js'));
wp_enqueue_script('galleria', $router->get_static_url('photocrati-galleria#galleria-1.4.2.min.js'));
wp_enqueue_style('ngg_pro_lightbox_theme_css', $router->get_static_url('photocrati-nextgen_pro_lightbox_legacy#theme/galleria.nextgen_pro_lightbox.css'));
wp_enqueue_script('ngg_pro_lightbox_theme_js', $router->get_static_url('photocrati-nextgen_pro_lightbox_legacy#theme/galleria.nextgen_pro_lightbox.js'), 'galleria');
if (!wp_style_is('fontawesome', 'registered')) {
C_Display_Type_Controller::get_instance()->enqueue_displayed_gallery_trigger_buttons_resources();
}
wp_enqueue_style('fontawesome');
// retrieve the lightbox so we can examine its settings
$mapper = C_Lightbox_Library_Mapper::get_instance();
$library = $mapper->find_by_name(NGG_PRO_LIGHTBOX, TRUE);
$library->display_settings += array('is_front_page' => is_front_page() ? 1 : 0, 'share_url' => $router->get_url('/nextgen-share/{gallery_id}/{image_id}/{named_size}', TRUE, 'root'), 'protect_images' => !empty($settings->protect_images) ? TRUE : FALSE, 'style' => str_replace('.css', '', $library->display_settings['style']), 'i18n' => array('toggle_social_sidebar' => __('Toggle social sidebar', 'nextgen-gallery-pro'), 'play_pause' => __('Play / Pause', 'nextgen-gallery-pro'), 'toggle_fullscreen' => __('Toggle fullscreen', 'nextgen-gallery-pro'), 'toggle_image_info' => __('Toggle image info', 'nextgen-gallery-pro'), 'close_window' => __('Close window', 'nextgen-gallery-pro'), 'share' => array('twitter' => __('Share on Twitter', 'nextgen-gallery-pro'), 'googlep' => __('Share on Google+', 'nextgen-gallery-pro'), 'facebook' => __('Share on Facebook', 'nextgen-gallery-pro'), 'pinterest' => __('Share on Pinterest', 'nextgen-gallery-pro'))));
// provide the current language so ajax requests can request translations in the same locale
if (defined('ICL_LANGUAGE_CODE')) {
$library->display_settings['lang'] = $router->param('lang', NULL, FALSE) ? $router->param('lang') : ICL_LANGUAGE_CODE;
}
wp_localize_script('photocrati_ajax', 'nplModalSettings', $library->display_settings);
}
self::$run_once = TRUE;
}
}
开发者ID:CodeNoEvil,项目名称:mbp_web_infrastructure,代码行数:33,代码来源:adapter.nextgen_pro_lightbox_resources.php
示例12: enqueue
/**
* Enqueue scripts and styles.
*/
public static function enqueue($element = null)
{
global $groups_version;
switch ($element) {
case 'select':
switch (self::$select) {
case 'chosen':
if (!wp_script_is('chosen')) {
wp_enqueue_script('chosen', GROUPS_PLUGIN_URL . 'js/chosen/chosen.jquery.min.js', array('jquery'), $groups_version, false);
}
if (!wp_style_is('chosen')) {
wp_enqueue_style('chosen', GROUPS_PLUGIN_URL . 'css/chosen/chosen.min.css', array(), $groups_version);
}
break;
case 'selectize':
if (!wp_script_is('selectize')) {
wp_enqueue_script('selectize', GROUPS_PLUGIN_URL . 'js/selectize/selectize.min.js', array('jquery'), $groups_version, false);
}
if (!wp_style_is('selectize')) {
wp_enqueue_style('selectize', GROUPS_PLUGIN_URL . 'css/selectize/selectize.bootstrap2.css', array(), $groups_version);
}
break;
}
break;
}
}
开发者ID:ericmulder,项目名称:groups,代码行数:29,代码来源:class-groups-uie.php
示例13: enqueueStyles
public function enqueueStyles()
{
if (wp_style_is('wptoolset-field-date', 'enqueued')) {
return;
}
wp_enqueue_style('wptoolset-field-date');
}
开发者ID:javierdlahoz,项目名称:paella-development,代码行数:7,代码来源:class.date.php
示例14: enqueueScripts
public function enqueueScripts()
{
foreach ($this->getScripts() as $script) {
$script = is_array($script) ? $script : ['file' => $script];
if ($script['file'] = $this->getScriptPath($script['file'])) {
$info = pathinfo($script['file']);
$extension = !empty($info['extension']) ? $info['extension'] : (!empty($script['type']) ? $script['type'] : false);
switch ($extension) {
case 'css':
$script = array_merge(array('dependencies' => array(), 'version' => '1.0.0', 'media' => 'all', 'enqueue' => true), $script, array('handle' => !empty($script['handle']) ? $script['handle'] : $info['filename']));
if (wp_style_is($script['handle'], 'registered')) {
wp_deregister_style($script['handle']);
}
wp_register_style($script['handle'], $script['file'], $script['dependencies'], $script['version'], $script['media']);
if ($script['enqueue']) {
wp_enqueue_style($script['handle']);
}
break;
default:
$script = array_merge(array('dependencies' => array(), 'version' => '1.0.0', 'in_footer' => true, 'localize' => false, 'enqueue' => true), $script, array('handle' => !empty($script['handle']) ? $script['handle'] : $info['filename']));
if (wp_script_is($script['handle'], 'registered')) {
wp_deregister_script($script['handle']);
}
wp_register_script($script['handle'], $script['file'], $script['dependencies'], $script['version'], $script['in_footer']);
if ($script['localize']) {
wp_localize_script($script['handle'], $script['localize']['name'], $script['localize']['data']);
}
if ($script['enqueue']) {
wp_enqueue_script($script['handle']);
}
break;
}
}
}
}
开发者ID:darbymanning,项目名称:Family-Church,代码行数:35,代码来源:Controller.php
示例15: enqueue
/**
* Enqueue all scripts and styles needed when viewing the backend.
*
* @see http://codex.wordpress.org/Function_Reference/wp_style_is
* @see http://make.wordpress.org/core/2012/11/30/new-color-picker-in-wp-3-5/
* @see http://ottopress.com/2010/passing-parameters-from-php-to-javascripts-in-plugins/
* @see http://codex.wordpress.org/Function_Reference/wp_localize_script
* @since 1.0
*/
public function enqueue($hook_suffix)
{
$min = SCRIPT_DEBUG ? '' : '.min';
// just required on options-media.php and would produce errors pre WordPress 3.1
if ($hook_suffix == 'options-media.php' && get_bloginfo('version') >= 3.1) {
if (wp_style_is('wp-color-picker', 'registered')) {
// >=WP3.5
wp_enqueue_style('wp-color-picker');
wp_enqueue_script('fvp_backend_35', FVP_URL . 'js/backend_35.js', array('wp-color-picker', 'jquery'), FVP_VERSION);
} else {
// <WP3.5, fallback for the new WordPress Color Picker which was added in 3.5
wp_enqueue_style('farbtastic');
wp_enqueue_script('farbtastic');
wp_enqueue_script('fvp_backend_pre35', FVP_URL . 'js/backend_pre35.js', array('jquery'), FVP_VERSION);
}
wp_enqueue_script('fvp_settings', FVP_URL . 'js/settings.js', array('jquery'), FVP_VERSION);
}
// just required on post.php and post-new.php
if ($hook_suffix == 'post.php' && isset($_GET['post']) || $hook_suffix == 'post-new.php') {
wp_enqueue_script('jquery.autosize', FVP_URL . "js/jquery.autosize{$min}.js", array('jquery'), FVP_VERSION);
wp_enqueue_script('fvp_backend', FVP_URL . "js/backend{$min}.js", array('jquery', 'jquery.autosize'), FVP_VERSION);
wp_enqueue_style('wp-mediaelement');
wp_enqueue_script('wp-mediaelement');
$options = get_option('fvp-settings');
$upload_dir = wp_upload_dir();
wp_localize_script('fvp_backend', 'fvp_backend_data', array('wp_upload_dir' => $upload_dir['baseurl'], 'loading_gif' => get_admin_url(null, 'images/loading.gif'), 'default_value' => $this->default_value, 'default_value_sec' => $this->default_value_sec, 'wp_35' => get_bloginfo('version') >= 3.5));
}
if ($hook_suffix == 'options-media.php' || ($hook_suffix == 'post.php' && isset($_GET['post']) || $hook_suffix == 'post-new.php')) {
wp_enqueue_style('fvp_backend', FVP_URL . "css/backend{$min}.css", array(), FVP_VERSION);
}
}
开发者ID:bensethro,项目名称:runcyb,代码行数:40,代码来源:backend.php
示例16: add_twitter_link_to_bio
/**
* adds user's twitter profile link to their bio, wherever it is displayed
*
* @since 0.0.1
* @param string $description
* @return string $description + twitter link
*/
function add_twitter_link_to_bio($description)
{
// this should normalize most instances of full or partial url, @username, etc., to username only
$username = preg_replace('#https?://|twitter.com/|@#', '', get_the_author_meta('twitter'));
if (!$username) {
// return early if no twitter username
return $description;
}
// build twitter URL from username
$href = 'https://twitter.com/' . $username;
// link title, translated: 'Follow (Author Name) on Twitter'
$title = esc_attr(sprintf(__('Follow %s on Twitter'), get_the_author()));
/**
* if genericons is enqueued, let's add a twitter icon! for fun.
*
* trying to be as design-agnostic as possible here, but genericons are by
* default given font-size: 16px; i'd rather make that 1em, since this use
* is inline w text, at different sizes throughout the theme
*/
$icon = wp_style_is('genericons') ? '<i class="genericon genericon-twitter" style="font-size:inherit;line-height:inherit"></i>' : '';
// that WAS fun
/**
* build output.
* still trying to be unopinionated but also would like for it to look good
* out of the box, and inserting a couple of spaces matches the output of
* twentyfifteen's other author links looks p good to me
*/
$twitter_link = sprintf(' <a class="author-link twitter-link" href="%s" title="%s">%s @%s </a>', $href, $title, $icon, $username);
// finally, return
return $description . $twitter_link;
}
开发者ID:buffler,项目名称:author-twitter-link,代码行数:38,代码来源:class-author-twitter-link-public.php
示例17: _actionScriptsAndStyles
public function _actionScriptsAndStyles()
{
if (!wp_script_is('views-shortcodes-gui-script')) {
wp_enqueue_script('views-shortcodes-gui-script');
}
if (!wp_script_is('jquery-ui-resizable')) {
wp_enqueue_script('jquery-ui-resizable');
}
if (!wp_style_is('views-admin-css')) {
wp_enqueue_style('views-admin-css');
}
if (!wp_script_is('views-codemirror-conf-script')) {
wp_enqueue_script('views-codemirror-conf-script');
}
if (!wp_style_is('toolset-meta-html-codemirror-css')) {
wp_enqueue_style('toolset-meta-html-codemirror-css');
}
if (!wp_script_is('views-embedded-script')) {
wp_enqueue_script('views-embedded-script');
}
if (!wp_script_is('views-utils-script')) {
wp_enqueue_script('views-utils-script');
}
wp_enqueue_style('toolset-user-editors-ressource-views-dialog', TOOLSET_COMMON_URL . '/user-editors/resource/views/dialog/dialog.css', array(), TOOLSET_COMMON_VERSION);
}
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:25,代码来源:dialog.php
示例18: testEnqueueAdminScripts
/**
* @covers Dynamic_Featured_Image::enqueue_admin_scripts
*/
public function testEnqueueAdminScripts()
{
$this->_dfi->enqueue_admin_scripts();
$this->assertTrue(wp_script_is('scripts-dfi'));
$this->assertTrue(wp_style_is('style-dfi'));
$this->assertTrue(wp_style_is('dashicons'));
}
开发者ID:wearescouting,项目名称:Dynamic-Featured-Image,代码行数:10,代码来源:test-dynamic-featured-image.php
示例19: __construct
public function __construct()
{
include_once 'gam-event-manager-cpt.php';
include_once 'gam-event-manager-settings.php';
include_once 'gam-event-manager-writepanels.php';
include_once 'gam-event-manager-setup.php';
$this->settings_page = new GAM_Event_Manager_Settings();
add_action('admin_menu', array($this, 'admin_menu'), 12);
add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_scripts'));
}
/**
* admin_enqueue_scripts function.
*
* @access public
* @return void
*/
public function admin_enqueue_scripts()
{
global $wp_scripts;
$screen = get_current_screen();
//main frontend, bootstrap & bootstrap calendar style
wp_register_style('bootstrap-main-css', EVENT_MANAGER_PLUGIN_URL . '/assets/js/bootstrap/css/bootstrap.min.css');
wp_register_style('bootstrap-datetime-picker-css', EVENT_MANAGER_PLUGIN_URL . '/assets/js/bootstrap-datetime-picker/bootstrap-datetimepicker.min.css');
if (!wp_style_is('bootstrap.min.css', 'enqueued')) {
wp_enqueue_style('bootstrap-main-css');
}
if (!wp_script_is('bootstrap-datetimepicker.min.css', 'enqueued')) {
wp_enqueue_style('bootstrap-datetime-picker-css');
}
wp_enqueue_style('event_manager_admin_css', EVENT_MANAGER_PLUGIN_URL . '/assets/css/backend.css');
//bootstrap, moment and bootstrap calendar js
wp_register_script('bootstrap-main-js', EVENT_MANAGER_PLUGIN_URL . '/assets/js/bootstrap/js/bootstrap.min.js', array('jquery'), EVENT_MANAGER_VERSION, true);
wp_register_script('moment', EVENT_MANAGER_PLUGIN_URL . '/assets/js/bootstrap-datetime-picker/moment-with-locales.min.js', array('bootstrap-main-js'), EVENT_MANAGER_VERSION, true);
wp_register_script('bootstrap-datetime-picker-js', EVENT_MANAGER_PLUGIN_URL . '/assets/js/bootstrap-datetime-picker/bootstrap-datetimepicker.min.js', array('moment'), EVENT_MANAGER_VERSION, true);
开发者ID:gamthemes,项目名称:gam-event-manager,代码行数:34,代码来源:gam-event-manager-admin.php
示例20: test_subscription_style_not_enqueued
function test_subscription_style_not_enqueued()
{
update_option('webpush_subscription_button', false);
$main = new WebPush_Main();
do_action('wp_enqueue_scripts');
$this->assertFalse(wp_style_is('subscription-button-style'));
}
开发者ID:mozilla,项目名称:wp-web-push,代码行数:7,代码来源:test-subscription-button.php
注:本文中的wp_style_is函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论