function surbma_divi_gravity_forms_enqueue_scripts()
{
    if (wp_basename(get_bloginfo('template_directory')) == 'Divi' && class_exists('GFForms')) {
        wp_enqueue_style('surbma-divi-gravity-forms-styles', plugins_url('', __FILE__) . '/css/surbma-divi-gravity-forms.css');
        $accent_color = esc_html(et_get_option('accent_color', '#2ea3f2'));
        $all_buttons_font_size = esc_html(et_get_option('all_buttons_font_size', '20'));
        $all_buttons_text_color = esc_html(et_get_option('all_buttons_text_color', $accent_color));
        $all_buttons_text_color_hover = esc_html(et_get_option('all_buttons_text_color_hover', $accent_color));
        $all_buttons_bg_color = esc_html(et_get_option('all_buttons_bg_color', '#fff'));
        $all_buttons_bg_color_hover = esc_html(et_get_option('all_buttons_bg_color_hover', 'rgba(0,0,0,.05)'));
        $all_buttons_border_width = esc_html(et_get_option('all_buttons_border_width', '2'));
        $all_buttons_border_color = esc_html(et_get_option('all_buttons_border_color', $accent_color));
        $all_buttons_border_color_hover = esc_html(et_get_option('all_buttons_border_color_hover', 'transparent'));
        $all_buttons_border_radius = esc_html(et_get_option('all_buttons_border_radius', '3'));
        $all_buttons_border_radius_hover = esc_html(et_get_option('all_buttons_border_radius_hover', '3'));
        $all_buttons_spacing = esc_html(et_get_option('all_buttons_spacing', '0'));
        $all_buttons_spacing_hover = esc_html(et_get_option('all_buttons_spacing_hover', '0'));
        $all_buttons_font_style = esc_html(et_get_option('all_buttons_font_style', '', '', true));
        $button_text_style = '';
        if ($all_buttons_font_style !== '') {
            $button_text_style = et_pb_print_font_style($all_buttons_font_style);
        }
        $all_buttons_font = esc_html(et_get_option('all_buttons_font', 'inherit'));
        $custom_css = "body .gform_wrapper .gform_footer input.button,body .gform_wrapper .gform_page_footer input.button{background-color:{$all_buttons_bg_color};color:{$accent_color};border-width:{$all_buttons_border_width}px;border-color:{$all_buttons_border_color};border-radius:{$all_buttons_border_radius}px;font-family:{$all_buttons_font};font-size:{$all_buttons_font_size}px;letter-spacing:{$all_buttons_spacing}px;{$button_text_style}}body .gform_wrapper .gform_footer input.button:hover,body .gform_wrapper .gform_page_footer input.button:hover{background-color:{$all_buttons_bg_color_hover};color:{$all_buttons_text_color_hover};border-color:{$all_buttons_border_color_hover};border-radius:{$all_buttons_border_radius_hover}px;letter-spacing:{$all_buttons_spacing_hover}px;}}";
        wp_add_inline_style('surbma-divi-gravity-forms-styles', $custom_css);
    }
}
Esempio n. 2
0
 protected function content($atts, $content = null)
 {
     $atts = shortcode_atts(array('element_id' => '', 'source' => '', 'cell_height' => 120, 'space' => 20, 'template' => '', 'class' => ''), $atts);
     /**
      * Enqueue script
      */
     LemonGrid::include_script();
     $templateParams = json_decode($atts['template'], true);
     $atts['class_id'] = 'lemon_grid_id_' . $atts['element_id'];
     $atts['template'] = $templateParams['template'];
     $atts['template_params'] = $templateParams;
     /**
      * wp_query
      */
     list($args, $wp_query) = vc_build_loop_query($atts['source']);
     $paged = get_query_var('paged') ? intval(get_query_var('paged')) : 1;
     if ($paged > 1) {
         $args['paged'] = $paged;
         $wp_query = new WP_Query($args);
     }
     $atts['posts'] = $wp_query;
     wp_enqueue_style('tb-lemongrid-custom-script', TB_CSS . 'lemongrid-custom-script.css');
     wp_add_inline_style('tb-lemongrid-custom-script', renderGridCustomSpaceCss($atts['class_id'], $atts['space']));
     return lgLoadTemplate($atts, $content);
 }
Esempio n. 3
0
 function coll_enqueue_styles()
 {
     global $coll_is_mobile;
     if (!$coll_is_mobile) {
         wp_register_style('scrollbar', get_template_directory_uri() . '/css/perfect-scrollbar.css');
         wp_enqueue_style('scrollbar');
     }
     wp_register_style('googlefonts', '//fonts.googleapis.com/css?family=Bentham|Pinyon+Script|Bitter:400,700|Raleway:300,400,500,600|Sacramento|Lato:300,400,900|Open+Sans:400,700,800|Pacifico|Lobster|Roboto:400,900,700|Oswald:400,700');
     wp_register_style('normalize', get_template_directory_uri() . '/css/normalize.css');
     wp_register_style('foundation', get_template_directory_uri() . '/css/foundation.css', null, null);
     wp_register_style('magicpopup', get_template_directory_uri() . '/css/magnific-popup.css');
     wp_register_style('icons', get_template_directory_uri() . '/css/font-awesome.min.css');
     wp_register_style('superfish', get_template_directory_uri() . '/css/superfish.css');
     wp_register_style('flexslider', get_template_directory_uri() . '/css/flexslider.css', null, null);
     wp_register_style('plugin', get_template_directory_uri() . '/css/plugin.css', null, null);
     wp_register_style('public', get_template_directory_uri() . '/css/public.css', null, null);
     wp_register_style('morpheus', get_stylesheet_uri(), null, null);
     wp_enqueue_style('googlefonts');
     wp_enqueue_style('foundation');
     wp_enqueue_style('magicpopup');
     wp_enqueue_style('icons');
     wp_enqueue_style('superfish');
     wp_enqueue_style('flexslider');
     wp_enqueue_style('plugin');
     wp_enqueue_style('public');
     wp_enqueue_style('morpheus');
     // add custom css
     $custom_css = ot_get_option('coll_custom_css');
     if (!empty($custom_css)) {
         wp_add_inline_style('morpheus', $custom_css);
     }
 }
/**
 * Enqueue styles
 * Inline styles with admin-bar dependency
 *
 * @return void
 */
function mss_enqueue_styles()
{
    ob_start();
    ?>
#wp-admin-bar-my-sites-search.hide-if-no-js {
	display: none;
}
#wp-admin-bar-my-sites-search label[for="my-sites-search-text"] {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
}
#wp-admin-bar-my-sites-search {
	height: 38px;
}
#wp-admin-bar-my-sites-search .ab-item {
	height: 34px;
}
#wp-admin-bar-my-sites-search input {
	padding: 0 2px;
	width: 95%;
	width: calc( 100% - 4px );
}
	<?php 
    $style = ob_get_clean();
    wp_enqueue_style('admin-bar');
    wp_add_inline_style('admin-bar', $style);
}
Esempio n. 5
0
/**
 * Custom logo
 */
function fastnews_light_customize_logo()
{
    $custom_styles = '';
    /* Logo */
    $logo_margin_top = get_theme_mod('logo_margin_top', '');
    $logo_margin_left = get_theme_mod('logo_margin_left', '');
    $logo_margin = '';
    if ($logo_margin_top) {
        $logo_margin .= "margin-top:{$logo_margin_top}px;";
    }
    if ($logo_margin_left) {
        $logo_margin .= "margin-left:{$logo_margin_left}px;";
    }
    if ($logo_margin) {
        $custom_styles .= ".kopa-logo { {$logo_margin} }";
    }
    /* Logo navigation */
    $logo_nav_margin_top = get_theme_mod('logo_nav_margin_top', '');
    $logo_nav_margin_left = get_theme_mod('logo_nav_margin_left', '');
    $logo_nav_margin = '';
    if ($logo_nav_margin_top) {
        $logo_nav_margin .= "margin-top:{$logo_nav_margin_top}px;";
    }
    if ($logo_nav_margin_left) {
        $logo_nav_margin .= "margin-left:{$logo_nav_margin_left}px;";
    }
    if ($logo_nav_margin) {
        $custom_styles .= ".nav-bar .kopa-logo { {$logo_nav_margin} }";
    }
    /* ==================================================================================================
     * Theme Options custom styles
     * ================================================================================================= */
    wp_add_inline_style('kopa-style', $custom_styles);
}
 /**
  * Extra CSS needed for the footer if text needs to be white.
  */
 public function footer_css()
 {
     if ('#ffffff' == Daphnee_Customizer::max_readability(get_theme_mod('footer_background_color', '#333333'))) {
         $style = '#colophon.site-footer{color:#fff;}#colophon.site-footer a{color:rgba(255,255,255,.8);}';
         wp_add_inline_style('daphnee-style', $style);
     }
 }
Esempio n. 7
0
 /**
  * 
  * a must function. you can not use it, but the function must stay there!
  */
 public static function onAddScripts()
 {
     global $wp_version;
     $slver = apply_filters('revslider_remove_version', RevSliderGlobals::SLIDER_REVISION);
     $style_pre = '';
     $style_post = '';
     if ($wp_version < 3.7) {
         $style_pre = '<style type="text/css">';
         $style_post = '</style>';
     }
     $operations = new RevSliderOperations();
     $arrValues = $operations->getGeneralSettingsValues();
     $includesGlobally = RevSliderFunctions::getVal($arrValues, "includes_globally", "on");
     $includesFooter = RevSliderFunctions::getVal($arrValues, "js_to_footer", "off");
     $strPutIn = RevSliderFunctions::getVal($arrValues, "pages_for_includes");
     $isPutIn = RevSliderOutput::isPutIn($strPutIn, true);
     //put the includes only on pages with active widget or shortcode
     // if the put in match, then include them always (ignore this if)
     if ($isPutIn == false && $includesGlobally == "off") {
         $isWidgetActive = is_active_widget(false, false, "rev-slider-widget", true);
         $hasShortcode = RevSliderFunctionsWP::hasShortcode("rev_slider");
         if ($isWidgetActive == false && $hasShortcode == false) {
             return false;
         }
     }
     wp_enqueue_style('rs-plugin-settings', RS_PLUGIN_URL . 'public/assets/css/settings.css', array(), $slver);
     $custom_css = RevSliderOperations::getStaticCss();
     $custom_css = RevSliderCssParser::compress_css($custom_css);
     if (trim($custom_css) == '') {
         $custom_css = '#rs-demo-id {}';
     }
     wp_add_inline_style('rs-plugin-settings', $style_pre . $custom_css . $style_post);
     $setBase = is_ssl() ? "https://" : "http://";
     wp_enqueue_script(array('jquery'));
     //add icon sets
     //wp_register_style('rs-icon-set-fa-icon-', RS_PLUGIN_URL .'public/assets/fonts/font-awesome/css/font-awesome.css', array(), $slver);
     //wp_register_style('rs-icon-set-pe-7s-', RS_PLUGIN_URL .'public/assets/fonts/pe-icon-7-stroke/css/pe-icon-7-stroke.css', array(), $slver);
     if ($includesFooter == "off") {
         $waitfor = array('jquery');
         $enable_logs = RevSliderFunctions::getVal($arrValues, "enable_logs", 'off');
         if ($enable_logs == 'on') {
             wp_enqueue_script('enable-logs', RS_PLUGIN_URL . 'public/assets/js/jquery.themepunch.enablelog.js', $waitfor, $slver);
             $waitfor[] = 'enable-logs';
         }
         wp_enqueue_script('tp-tools', RS_PLUGIN_URL . 'public/assets/js/jquery.themepunch.tools.min.js', $waitfor, $slver);
         wp_enqueue_script('revmin', RS_PLUGIN_URL . 'public/assets/js/jquery.themepunch.revolution.min.js', 'tp-tools', $slver);
     } else {
         //put javascript to footer
         add_action('wp_footer', array('RevSliderFront', 'putJavascript'));
     }
     add_action('wp_head', array('RevSliderFront', 'add_meta_generator'));
     add_action("wp_footer", array('RevSliderFront', "load_icon_fonts"));
     // Async JS Loading
     $js_defer = RevSliderBase::getVar($arrValues, 'js_defer', 'off');
     if ($js_defer != 'off') {
         add_filter('clean_url', array('RevSliderFront', 'add_defer_forscript'), 11, 1);
     }
     add_action('wp_before_admin_bar_render', array('RevSliderFront', 'add_admin_menu_nodes'));
     add_action('wp_footer', array('RevSliderFront', 'putAdminBarMenus'));
 }
Esempio n. 8
0
 function supermag_dynamic_css()
 {
     global $supermag_customizer_all_values;
     /*Color options */
     $supermag_primary_color = $supermag_customizer_all_values['supermag-primary-color'];
     $custom_css = '';
     /*background*/
     $custom_css .= "\r\n            mark,\r\n            .comment-form .form-submit input,\r\n            .read-more,\r\n            .bn-title,\r\n            .home-icon.front_page_on,\r\n            .header-wrapper .menu li:hover > a,\r\n            .header-wrapper .menu > li.current-menu-item a,\r\n            .header-wrapper .menu > li.current-menu-parent a,\r\n            .header-wrapper .menu > li.current_page_parent a,\r\n            .header-wrapper .menu > li.current_page_ancestor a,\r\n            .header-wrapper .menu > li.current-menu-item > a:before,\r\n            .header-wrapper .menu > li.current-menu-parent > a:before,\r\n            .header-wrapper .menu > li.current_page_parent > a:before,\r\n            .header-wrapper .menu > li.current_page_ancestor > a:before,\r\n            .header-wrapper .main-navigation ul ul.sub-menu li:hover > a,\r\n            .slider-section .cat-links a,\r\n            .featured-desc .below-entry-meta .cat-links a,\r\n            #calendar_wrap #wp-calendar #today,\r\n            #calendar_wrap #wp-calendar #today a,\r\n            .wpcf7-form input.wpcf7-submit:hover,\r\n            .breadcrumb{\r\n                background: {$supermag_primary_color};\r\n            }\r\n        ";
     $custom_css .= "\r\n            a:hover,\r\n            .screen-reader-text:focus,\r\n            .bn-content a:hover,\r\n            .socials a:hover,\r\n            .site-title a,\r\n            .search-block input#menu-search,\r\n            .widget_search input#s,\r\n            .search-block #searchsubmit,\r\n            .widget_search #searchsubmit,\r\n            .footer-sidebar .featured-desc .above-entry-meta a:hover,\r\n            .slider-section .slide-title:hover,\r\n            .besides-slider .post-title a:hover,\r\n            .slider-feature-wrap a:hover,\r\n            .slider-section .bx-controls-direction a,\r\n            .besides-slider .beside-post:hover .beside-caption,\r\n            .besides-slider .beside-post:hover .beside-caption a:hover,\r\n            .featured-desc .above-entry-meta span:hover,\r\n            .posted-on a:hover,\r\n            .cat-links a:hover,\r\n            .comments-link a:hover,\r\n            .edit-link a:hover,\r\n            .tags-links a:hover,\r\n            .byline a:hover,\r\n            .nav-links a:hover,\r\n            #supermag-breadcrumbs a:hover,\r\n            .wpcf7-form input.wpcf7-submit {\r\n                color: {$supermag_primary_color};\r\n            }";
     /*border*/
     $custom_css .= "\r\n             .search-block input#menu-search,\r\n            .widget_search input#s,\r\n            .tagcloud a{\r\n                border: 1px solid {$supermag_primary_color};\r\n            }";
     $custom_css .= "\r\n            .footer-wrapper .border,\r\n            .nav-links .nav-previous a:hover,\r\n            .nav-links .nav-next a:hover{\r\n                border-top: 1px solid {$supermag_primary_color};\r\n            }";
     $custom_css .= "\r\n             .besides-slider .beside-post{\r\n                border-bottom: 3px solid {$supermag_primary_color};\r\n            }";
     $custom_css .= "\r\n            .widget-title,\r\n            .footer-wrapper,\r\n            .page-header .page-title,\r\n            .single .entry-header .entry-title{\r\n                border-bottom: 1px solid {$supermag_primary_color};\r\n            }";
     $custom_css .= "\r\n            .widget-title:before,\r\n            .page-header .page-title:before,\r\n            .single .entry-header .entry-title:before{\r\n                border-bottom: 7px solid {$supermag_primary_color};\r\n            }";
     $custom_css .= "\r\n           .wpcf7-form input.wpcf7-submit,\r\n            article.post.sticky{\r\n                border: 2px solid {$supermag_primary_color};\r\n            }";
     $custom_css .= "\r\n           .breadcrumb::after {\r\n                border-left: 5px solid {$supermag_primary_color};\r\n            }";
     $custom_css .= "\r\n           .header-wrapper #site-navigation{\r\n                border-bottom: 5px solid {$supermag_primary_color};\r\n            }";
     /*media width*/
     $custom_css .= "\r\n           @media screen and (max-width:992px){\r\n                .slicknav_btn.slicknav_open{\r\n                    border: 1px solid {$supermag_primary_color};\r\n                }\r\n                .slicknav_btn.slicknav_open:before{\r\n                    background: { {$supermag_primary_color} };\r\n                    box-shadow: 0 6px 0 0 {$supermag_primary_color}, 0 12px 0 0 {$supermag_primary_color};\r\n                }\r\n                .slicknav_nav li:hover > a,\r\n                .slicknav_nav li.current-menu-ancestor a,\r\n                .slicknav_nav li.current-menu-item  > a,\r\n                .slicknav_nav li.current_page_item a,\r\n                .slicknav_nav li.current_page_item .slicknav_item span,\r\n                .slicknav_nav li .slicknav_item:hover a{\r\n                    color: {$supermag_primary_color};\r\n                }\r\n            }";
     /*custom css*/
     $supermag_custom_css = wp_filter_nohtml_kses($supermag_customizer_all_values['supermag-custom-css']);
     if (!empty($supermag_custom_css)) {
         $custom_css .= $supermag_custom_css;
     }
     wp_add_inline_style('supermag-style', $custom_css);
 }
Esempio n. 9
0
/**
 * Enqueues styles for front-end.
 */
function ht_theme_styles()
{
    global $wp_styles;
    /*
     * Loads our main stylesheet.
     */
    wp_enqueue_style('theme-style', get_stylesheet_uri());
    /*
     * Loads our Google Font.
     */
    $subsets = 'latin,latin-ext';
    $protocol = is_ssl() ? 'https' : 'http';
    $query_args = array('family' => 'Open+Sans:400,400italic,600,600italic', 'subset' => $subsets);
    wp_enqueue_style('theme-font', esc_url(add_query_arg($query_args, "{$protocol}://fonts.useso.com/css")), array(), null);
    /*
     * Add font awesome CSS
     */
    wp_enqueue_style('font-awesome', get_template_directory_uri() . '/css/font-awesome.min.css', array('theme-style'));
    /*
     * Add Lightbox CSS
     */
    wp_enqueue_style('magnific-popup', get_template_directory_uri() . '/css/magnific-popup.css', array('theme-style'));
    /*
     * Load theme custom colors
     */
    //Theme variables from theme customizer
    $ht_styling_themecolor = get_theme_mod('ht_styling_themecolor', '#EC4B36');
    // Convert theme colors from hex to rgb
    $ht_styling_themecolor_rgb = hex2rgb($ht_styling_themecolor);
    // Add custom styles
    $custom_css = "\r\r\n\ta, a:visited, a:hover, \r\r\n\t.comment-action i {color: {$ht_styling_themecolor};}\r\r\n\tinput[type='submit'], \r\r\n\tinput[type='button'], \r\r\n\t.paging-navigation li a:hover, \r\r\n\t.hentry .entry-header:after, \r\r\n\t.hentry .entry-footer:before, \r\r\n\t.hentry .hentry-box > .entry-quote, \r\r\n\t.hentry .entry-link, \r\r\n\t.hentry .entry-status,\r\r\n\t#site-header #logo,\r\r\n\t.hentry .entry-date,\r\r\n\t.paging-navigation:after,\r\r\n\t#timeline > li .hentry:before {\r\r\n\t\tbackground: {$ht_styling_themecolor};\r\r\n\t}\r\r\n\t.entry-content a:hover, \r\r\n\t.entry-content blockquote, \r\r\n\tp.pullquote-left, \r\r\n\tp.pullquote-right,\r\r\n\t#social-icons li a:hover,\r\r\n\t#nav-primary > ul > li:hover > a {\r\r\n\t\tborder-color: {$ht_styling_themecolor};\r\r\n\t}\r\r\n\t#social-icons li a:hover,\r\r\n\t#nav-primary > ul > li:hover > a,\r\r\n\t#nav-primary ul ul li a:hover {\r\r\n\t\tcolor: {$ht_styling_themecolor};\r\r\n\t}\r\r\n\t.hentry .entry-thumb-caption, .gallery .gallery-item-caption {\r\r\n\tbackground: {$ht_styling_themecolor};\r\r\n\tbackground: rgba({$ht_styling_themecolor_rgb[0]},{$ht_styling_themecolor_rgb[1]},{$ht_styling_themecolor_rgb[2]},0.8);\r\r\n\t}\r\r\n\t";
    wp_add_inline_style('theme-style', $custom_css);
}
Esempio n. 10
0
function yit_revslider_slider()
{
    $operations = new RevOperations();
    $arrValues = $operations->getGeneralSettingsValues();

    $includesGlobally = UniteFunctionsRev::getVal($arrValues, "includes_globally","on");

    $isWidgetActive = is_active_widget( false, false, "rev-slider-widget", true );
    $hasShortcode = UniteFunctionsWPRev::hasShortcode("rev_slider");

    if ( yit_slider_get_setting('slider_type',yit_slider_name()) != 'revolution-slider' || $includesGlobally == "on" || $isWidgetActive || $hasShortcode ) {
        return;
    }

    wp_enqueue_style('rs-plugin-settings', RS_PLUGIN_URL .'public/assets/css/settings.css', array(), RevSliderGlobals::SLIDER_REVISION);

    $custom_css = RevOperations::getStaticCss();
    $custom_css = UniteCssParserRev::compress_css($custom_css);
    wp_add_inline_style('rs-plugin-settings', $custom_css);

    $setBase = (is_ssl()) ? "https://" : "http://";

    $url_jquery = $setBase . "ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js?app=revolution";
    wp_enqueue_script("jquery", $url_jquery);

    // put javascript to footer
    add_action('wp_footer', array($GLOBALS['productFront'], 'putJavascript'));
}
Esempio n. 11
0
 /**
  * Enqueue scripts and styles
  */
 function add_scripts()
 {
     if (empty($GLOBALS['posts']) || !is_array($GLOBALS['posts'])) {
         return;
     }
     foreach ($GLOBALS['posts'] as $p) {
         if (has_shortcode($p->post_content, 'recipe')) {
             $this->scripts_and_style_included = true;
             break;
         }
     }
     if (!$this->scripts_and_style_included) {
         return;
     }
     if (is_rtl()) {
         wp_enqueue_style('jetpack-recipes-style', plugins_url('/css/rtl/recipes-rtl.css', __FILE__), array(), '20130919');
     } else {
         wp_enqueue_style('jetpack-recipes-style', plugins_url('/css/recipes.css', __FILE__), array(), '20130919');
     }
     wp_add_inline_style('jetpack-recipes-style', self::themecolor_styles());
     // add $themecolors-defined styles
     wp_enqueue_script('jetpack-recipes-printthis', plugins_url('/js/recipes-printthis.js', __FILE__), array('jquery'), '20131230');
     wp_enqueue_script('jetpack-recipes-js', plugins_url('/js/recipes.js', __FILE__), array('jquery', 'jetpack-recipes-printthis'), '20131230');
     $title_var = wp_title('|', false, 'right');
     $print_css_var = plugins_url('/css/recipes-print.css', __FILE__);
     wp_localize_script('jetpack-recipes-js', 'jetpack_recipes_vars', array('pageTitle' => $title_var, 'loadCSS' => $print_css_var));
 }
function foundation_google_fonts_init()
{
    $settings = wptouch_get_settings('foundation');
    if ($settings->typography_sets != 'default') {
        wp_enqueue_script('foundation_google_fonts', foundation_get_base_module_url() . '/google-fonts/google-fonts.js', false, md5(FOUNDATION_VERSION), true);
        add_filter('wptouch_body_classes', 'foundation_add_google_font_classes');
    }
    $selected_font_info = foundation_google_fonts_get_selected_info();
    if ($selected_font_info) {
        $family_string = '';
        $inline_style_data = '';
        if (is_array($selected_font_info) && count($selected_font_info)) {
            $new_families = array();
            foreach ($selected_font_info as $font_info) {
                $font_string = htmlentities($font_info->name);
                if (isset($font_info->variants) && is_array($font_info->variants)) {
                    $font_string .= ':' . implode(',', $font_info->variants);
                }
                $new_families[] = $font_string;
                $inline_style_data .= "." . $font_info->selector . "-font" . " {\n";
                $inline_style_data .= "\tfont-family: '" . $font_info->name . "', " . $font_info->fallback . ";\n";
                $inline_style_data .= "}\n";
            }
            $family_string = implode('|', $new_families);
        }
        if ($family_string) {
            wp_enqueue_style('foundation_google_fonts', 'http://fonts.googleapis.com/css?family=' . $family_string, false, FOUNDATION_VERSION, false);
            if ($inline_style_data) {
                wp_add_inline_style('foundation_google_fonts', $inline_style_data);
            }
        }
    }
}
Esempio n. 13
0
 /**
  * Append our customizer styles to the <head> whenever our main stylesheet is called.
  */
 public function front_end_styles()
 {
     // Grab the styles that pertain to the front end, but don't wrap them in a style tag.
     $styles = $this->get_inline_styles('unwrapped', 'front_end');
     // Attach our customizer styles to our stylesheet.  When it gets called, so do our customizer styles.
     wp_add_inline_style(CSST_TMD, $styles);
 }
 function shoestrap_user_css()
 {
     $header_scripts = shoestrap_getVariable('user_css');
     if (trim($header_scripts) != '') {
         wp_add_inline_style('ac-theme', $header_scripts);
     }
 }
Esempio n. 15
0
function onetone_custom_scripts()
{
    wp_enqueue_style('onetone-font-awesome', get_template_directory_uri() . '/css/font-awesome.min.css', false, '4.0.3', false);
    wp_enqueue_style('onetone-main', get_stylesheet_uri(), array(), '1.2.8');
    wp_enqueue_style('Yanone-Kaffeesatz', esc_url('//fonts.googleapis.com/css?family=Yanone+Kaffeesatz|Lustria|Raleway|Open+Sans:400,300'), false, '', false);
    $background_array = onetone_options_array("page_background");
    $background = onetone_get_background($background_array);
    $header_image = get_header_image();
    $onetone_custom_css = "";
    if (isset($header_image) && !empty($header_image)) {
        $onetone_custom_css .= ".home-header{background:url(" . $header_image . ") repeat;}\n";
    }
    if ('blank' != get_header_textcolor() && '' != get_header_textcolor()) {
        $header_color = ' color:#' . get_header_textcolor() . ';';
        $onetone_custom_css .= '.home-header,.site-name,.site-description{' . $header_color . '}';
    }
    $custom_css = onetone_options_array("custom_css");
    $onetone_custom_css .= '.site{' . $background . '}';
    $top_menu_font_color = onetone_options_array('font_color');
    if ($top_menu_font_color != "" && $top_menu_font_color != null) {
        $onetone_custom_css .= 'header #menu-main > li > a span,header .top-nav > ul > li > a span{color:' . $top_menu_font_color . '}';
    }
    $onetone_custom_css .= $custom_css;
    wp_add_inline_style('onetone-main', $onetone_custom_css);
    if (is_home()) {
        wp_enqueue_script('onetone-bigvideo', get_template_directory_uri() . '/js/jquery.tubular.1.0.js', array('jquery'), '1.0', true);
    }
    wp_enqueue_script('onetone-modernizr', get_template_directory_uri() . '/js/modernizr.custom.js', array('jquery'), '2.8.2 ', false);
    wp_enqueue_script('onetone-unslider', get_template_directory_uri() . '/js/unslider.js', array('jquery'), '1.0.0 ', true);
    wp_enqueue_script('onetone-default', get_template_directory_uri() . '/js/onetone.js', array('jquery'), '1.2.8', true);
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    wp_localize_script('onetone-default', 'onetone_params', array('ajaxurl' => admin_url('admin-ajax.php'), 'themeurl' => get_template_directory_uri()));
}
Esempio n. 16
0
 protected function _register_actions()
 {
     // render
     add_action("{$this->_taxonomy}_add_form_fields", function ($tag) {
         echo $this->render_new();
     });
     add_action("{$this->_taxonomy}_edit_form_fields", function ($tag) {
         echo $this->render_edit($tag->term_id);
     });
     // save
     $save_custom_fields_function = function ($term_id) {
         $this->_save($term_id);
     };
     add_action("create_{$this->_taxonomy}", $save_custom_fields_function);
     add_action("edited_{$this->_taxonomy}", $save_custom_fields_function);
     // load assets
     $enqueue_scripts_function = function () {
         $this->get_field()->enqueue_javascript();
     };
     add_action('admin_print_scripts-edit-tags.php', $enqueue_scripts_function, 10);
     add_action('admin_print_scripts-term.php', $enqueue_scripts_function, 10);
     $enqueue_styles_function = function () {
         $this->get_field()->enqueue_style();
         wp_add_inline_style('wp-admin', $this->_style_fix());
     };
     add_action('admin_print_styles-edit-tags.php', $enqueue_styles_function);
     add_action('admin_print_styles-term.php', $enqueue_styles_function);
 }
 /**
  * Include the custom CSS
  * Activate the custom CSS module.
  */
 function custom_css()
 {
     $css = get_theme_mod('css', '');
     if (!empty($css)) {
         wp_add_inline_style('maera', $css);
     }
 }
Esempio n. 18
0
    /**
     * 
     * @since 1.247
     */
    function raindrops_jetpack_css()
    {
        $raindrops_css = '	.jetpack-image-container img,
	.jetpack-display-remote-posts img{
	max-width:100%;
	height:auto;
	}
	.embed-youtube{
	position: relative;
    padding-bottom: 56.25%;
    padding-top: 30px;
    height: 0;
	}
	.embed-youtube iframe,
	.embed-youtube object,
	.embed-youtube embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-width:160px;
    }';
        wp_add_inline_style('jetpack-widgets', $raindrops_css);
    }
Esempio n. 19
0
 /**
  *
  *	Function: ptshortcode.
  *  @return Shortcode main output in html
  *
  */
 public function ptshortcode($atts, $content = null)
 {
     extract(shortcode_atts(array("id" => "", "font_color" => "", "class" => ""), $atts));
     $class_id = $style = $op = '';
     /*** Class ID ***/
     if (!empty($id)) {
         $class_id = 'ts-ptshortcode-' . $id;
     } else {
         $rand = rand(1000, 9999);
         $class_id = 'ts-ptshortcode-' . $rand;
     }
     /*** Content ***/
     if (class_exists('TS_funcs')) {
         $ts_funcs = new TS_funcs();
         $content = $ts_funcs->removeautowrap($content);
     }
     do_shortcode($content);
     /*** Custom Class ***/
     $style = 'color: ' . $font_color . ';';
     if (!empty($style)) {
         $styleblock = '.' . $class_id . '{' . $style . '}';
         if (class_exists('TS_funcs') && $ts_funcs->tste_settings['gn_theme_ajax'] === 'true') {
             echo '<style id="style-' . $class_id . '" type="text/css">' . $styleblock . '</style>';
         } else {
             wp_enqueue_style($this->parent->_token . '-dummystyle');
             wp_add_inline_style($this->parent->_token . '-dummystyle', $styleblock);
         }
     }
     /*** Output ***/
     $op = '<div class="' . $class_id . ' ' . $class . '">' . $content . '</div>';
     return $op;
 }
/**
 * Add featured image as background image to post navigation elements.
 *
 * @since Foundation Theme 0.5.0
 *
 * @see wp_add_inline_style()
 */
function foundation_post_nav_background()
{
    if (!is_single()) {
        return;
    }
    $previous = is_attachment() ? get_post(get_post()->post_parent) : get_adjacent_post(false, '', true);
    $next = get_adjacent_post(false, '', false);
    $css = '';
    if (is_attachment() && 'attachment' == $previous->post_type) {
        return;
    }
    if ($previous && has_post_thumbnail($previous->ID)) {
        $prevthumb = wp_get_attachment_image_src(get_post_thumbnail_id($previous->ID), 'post-thumbnail');
        $css .= '
                        .post-navigation .nav-previous { background-image: url(' . esc_url($prevthumb[0]) . '); }
                        .post-navigation .nav-previous .post-title, .post-navigation .nav-previous a:hover .post-title, .post-navigation .nav-previous .meta-nav { color: #fff; }
                        .post-navigation .nav-previous a:before { background-color: rgba(0, 0, 0, 0.4); }
                ';
    }
    if ($next && has_post_thumbnail($next->ID)) {
        $nextthumb = wp_get_attachment_image_src(get_post_thumbnail_id($next->ID), 'post-thumbnail');
        $css .= '
                        .post-navigation .nav-next { background-image: url(' . esc_url($nextthumb[0]) . '); border-top: 0; }
                        .post-navigation .nav-next .post-title, .post-navigation .nav-next a:hover .post-title, .post-navigation .nav-next .meta-nav { color: #fff; }
                        .post-navigation .nav-next a:before { background-color: rgba(0, 0, 0, 0.4); }
                ';
    }
    wp_add_inline_style('main-stylesheet', $css);
}
Esempio n. 21
0
function wpbs_styles_scripts()
{
    global $redux_demo;
    if (!empty($redux_demo['stylesheet']) && $redux_demo['stylesheet'] != 'bootstrap') {
        wp_enqueue_style('bootstrap', '//netdna.bootstrapcdn.com/bootswatch/latest/' . $redux_demo['stylesheet'] . '/bootstrap.min.css');
    } else {
        wp_enqueue_style('bootstrap', '//maxcdn.bootstrapcdn.com/bootstrap/latest/css/bootstrap.min.css');
    }
    wp_enqueue_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css');
    wp_enqueue_style('mmenu', get_template_directory_uri() . '/assets/css/jquery.mmenu.css');
    wp_enqueue_style('theme-style', get_stylesheet_uri());
    if (!empty($redux_demo['css-code'])) {
        wp_add_inline_style('theme-style', $redux_demo['css-code']);
    }
    // Enqueue JS scripts globally
    wp_enqueue_script('jquery');
    wp_enqueue_script('bootstrap', '//maxcdn.bootstrapcdn.com/bootstrap/latest/js/bootstrap.min.js', array('jquery'), false, true);
    wp_enqueue_script('mmenu', get_template_directory_uri() . '/assets/js/jquery.mmenu.min.js', array('jquery'), '4.7.5', true);
    // Enqueue JS scipts for all pages except the front_page(home page)
    if (!is_front_page()) {
        wp_enqueue_script('share', get_template_directory_uri() . '/assets/js/share.min.js', array(), '0.5.0', true);
        wp_enqueue_script('scroll-nav', get_template_directory_uri() . '/assets/js/jquery.scrollNav.min.js', array('jquery'), '2.4.0', true);
        wp_enqueue_script('scroll-to-fixed', get_template_directory_uri() . '/assets/js/jquery-scrolltofixed-min.js', array('jquery'), '1.0.6', true);
        wp_enqueue_script('validate', get_template_directory_uri() . '/assets/js/jquery.validate.min.js', array('jquery'), '1.13.1', true);
    }
    wp_enqueue_script('wpbs', get_template_directory_uri() . '/assets/js/wpbs.js', array('jquery'), '1.1.0', true);
}
Esempio n. 22
0
 function skeleton_customizer_styles()
 {
     $theme = wp_get_theme();
     if (is_child_theme()) {
         $parent = $theme->parent();
         $version = $parent['Version'];
     } else {
         $version = $theme['Version'];
     }
     // Custom stylesheet overrides
     wp_enqueue_style('skeleton-custom', get_stylesheet_directory_uri() . '/custom.css', array(), $version, 'screen, projection');
     // Get Typography Options
     $body_font = str_replace("+", " ", skeleton_options('body_font', 'Sans-Serif'));
     $heading_font = str_replace("+", " ", skeleton_options('heading_font', 'Sans-Serif'));
     $protocol = is_ssl() ? 'https' : 'http';
     $body_query_args = array('family' => skeleton_options('body_font') . ':400,700');
     $heading_query_args = array('family' => skeleton_options('heading_font') . ':400,700');
     if ($body_font != 'Sans-Serif' && $body_font != 'Serif') {
         wp_enqueue_style('skeleton-body-fonts', add_query_arg($body_query_args, "{$protocol}://fonts.googleapis.com/css"), array(), null);
     }
     if ($heading_font != 'Sans-Serif' && $body_font != 'Serif') {
         wp_enqueue_style('skeleton-heading-fonts', add_query_arg($heading_query_args, "{$protocol}://fonts.googleapis.com/css"), array(), null);
     }
     $secondary_color = skeleton_options('secondary_color', '#BE3243');
     $primary_color = skeleton_options('primary_color', '#375199');
     $body_bg_color = skeleton_options('body_bg_color', '#f9f9f9');
     $body_text_color = skeleton_options('body_text_color', '#333333');
     $link_color = skeleton_options('link_color', '#3376ea');
     $link_hover_color = skeleton_options('link_hover_color', '#3376ea');
     $css = "\n\t\t\tbody {\n\t\t\t\tcolor: {$body_text_color};\n\t\t\t\tfont-family: {$body_font};\n\t\t\t\tbackground-color: {$body_bg_color};\n\t\t\t}\n\t\t\th1,h2,h3,h4,h5 {\n\t\t\t\tfont-family: {$heading_font};\n\t\t\t}\n\t\t\ta,a:visited {\n\t\t\t\tcolor: {$link_color};\n\t\t\t}\n\t\t\ta:hover, a:focus, a:active {\n\t\t\t\tcolor: {$link_hover_color};\n\t\t\t}\n\t\t\t#header h1#site-title a {\n\t\t\t\tcolor:{$primary_color};\n\t\t\t}\n\t\t\th3.widget-title,\n\t\t\t#header span.site-desc {\n\t\t\t\tcolor:{$secondary_color};\n\t\t\t}\n\t\t";
     wp_add_inline_style('skeleton-custom', $css);
 }
Esempio n. 23
0
 /**
  * Create stylesheet for the actual switcher bar
  *
  * @package jptb
  * @since 0.0.2
  *
  * @return  string  $style  The styles for the actual switcher bar.
  */
 function inline_style()
 {
     $colours = $this->options();
     $position = "\n            #jptb-theme-bar {\n                bottom:0px;\n                position:fixed;\n                left:0px;\n                z-index:9999;\n            }\n        ";
     /**
      * Change the CSS for the position of the bar.
      *
      * @param   string  $positioning    The CSS, including selector (#jptb-themebar), to position theme bar.
      *
      * @since 0.0.2
      */
     $position = apply_filters('jptb_bar_position', $position);
     $main_inline_style = "\n                #jptb-theme-bar {\n                    background-color: " . $colours['bg_colour'] . ";\n                    color: " . $colours['text_colour'] . ";\n                }\n\n                #jptb-theme-bar a, #jptb-theme-bar p {\n                    color: " . $colours['text_colour'] . ";\n                }\n\n                #jptb-theme-bar a:hover {\n                    color: " . $colours['text_colour'] . ";\n                }\n\n                p#jptb_label {\n                    background-color: " . $colours['label_bg_colour'] . ";\n                    color: " . $colours['label_text_colour'] . ";\n                }\n            ";
     $inline_style = $position . $main_inline_style;
     /**
      * Filter the styles.
      *
      * Use this filter to completely overide the styles being used or add to the inline styles
      *
      * @param   string  $inline_style A style sheet (with no <style></style>
      *
      * @since 0.0.2
      */
     $inline_style = apply_filters('jptb_bar_inline_style', $inline_style);
     //add these styles inline
     wp_add_inline_style('jptb', $inline_style);
 }
 /**
  * Add the inline stylesheet to the plugin stylesheet.
  */
 protected function add_inline_style()
 {
     $buttons = $this->make_buttons();
     $table_width = 'auto' === $this->setting['table_width'] ? 'auto' : '100%';
     $inline_style = sprintf('.scriptlesssocialsharing-buttons { width: %s }', $table_width);
     $button_width = 100 / count($buttons) . '%;';
     $inline_style .= sprintf('.scriptlesssocialsharing-buttons a.button { padding: %spx; width: %s }', (int) $this->setting['button_padding'], esc_attr($button_width));
     if ($this->setting['button_style']) {
         $inline_style .= '@media only screen and (min-width: 800px) { .scriptlesssocialsharing-buttons .sss-name { position: relative; height: auto; width: auto; } }';
     }
     foreach ($buttons as $button) {
         if (isset($button['icon'])) {
             $inline_style .= sprintf('.scriptlesssocialsharing-buttons .%s:before { content: "\\%s"; }', $button['name'], $button['icon']);
         }
         if (isset($button['color']) && isset($button['name'])) {
             $rgb = $this->hex2rgb($button['color']);
             $rgba = $rgb ? sprintf(' background-color:rgba(%s,.8);', $rgb) : '';
             $inline_style .= sprintf('.scriptlesssocialsharing-buttons .button.%3$s{ background-color:%1$s;%2$s } .scriptlesssocialsharing-buttons .button.%3$s:hover{ background-color:%1$s }', $button['color'], $rgba, $button['name']);
         }
     }
     /**
      * Allows user to filter/modify the inline style.
      */
     $inline_style = apply_filters('scriptlesssocialsharing_inline_style', $inline_style);
     wp_add_inline_style('scriptlesssocialsharing', sanitize_text_field($inline_style));
 }
Esempio n. 25
0
 protected static function registerStyles()
 {
     if (empty(self::$styles['head'])) {
         return;
     }
     krsort(self::$styles['head'], SORT_NUMERIC);
     foreach (self::$styles['head'] as $styles) {
         foreach ($styles as $style) {
             switch ($style[':type']) {
                 case 'file':
                     $href = preg_replace('/(\\?.*)$/', '', $style['href']);
                     \wp_register_style(basename($href, '.css'), $href, array(), false, $style['media']);
                     \wp_enqueue_style(basename($href, '.css'));
                     break;
                 case 'inline':
                     if (is_admin()) {
                         $type = !empty($style['type']) ? $style['type'] : 'text/css';
                         self::$wp_styles[] = "<style type=\"{$type}\">{$style['content']}</style>";
                     } else {
                         \wp_add_inline_style(md5($style['content']), $style['content']);
                     }
                     break;
             }
         }
     }
     self::$styles['head'] = [];
 }
Esempio n. 26
0
function ap_scripts_front()
{
    wp_enqueue_script('jquery');
    wp_enqueue_script('jquery-form', array('jquery'), false);
    wp_enqueue_script('ap-functions-js', ANSPRESS_URL . 'assets/prod/ap-functions.min.js', array('jquery', 'jquery-form'));
    wp_enqueue_script('ap-anspress_script', ANSPRESS_URL . 'assets/prod/anspress_site.min.js', array('jquery', 'jquery-form'), AP_VERSION);
    wp_enqueue_script('peity-js', ap_get_theme_url('js/jquery.peity.min.js'), 'jquery', AP_VERSION);
    wp_enqueue_script('ap-initial.js', ap_get_theme_url('js/initial.min.js'), 'jquery', AP_VERSION);
    wp_enqueue_script('ap-scrollbar.js', ap_get_theme_url('js/jquery.scrollbar.min.js'), 'jquery', AP_VERSION);
    wp_enqueue_script('ap-js', ap_get_theme_url('prod/ap.min.js'), array('jquery', 'jquery-form'), AP_VERSION);
    wp_enqueue_style('ap-style', ap_get_theme_url('css/main.css'), array(), AP_VERSION);
    $custom_css = '
        #anspress .ap-q-cells{
                margin-left: ' . (ap_opt('avatar_size_qquestion') + 10) . 'px;
        }
        #anspress .ap-a-cells{
                margin-left: ' . (ap_opt('avatar_size_qanswer') + 10) . 'px;
        }#anspress .ap-comment-content{
                margin-left: ' . (ap_opt('avatar_size_qcomment') + 15) . 'px;
        }';
    wp_add_inline_style('ap-style', $custom_css);
    wp_enqueue_style('ap-fonts', ap_get_theme_url('fonts/style.css'), array(), AP_VERSION);
    do_action('ap_enqueue');
    wp_enqueue_style('ap-responsive', ap_get_theme_url('css/responsive.css'), array(), AP_VERSION);
    wp_enqueue_style('ap-overrides', ap_get_theme_url('css/overrides.css'), array(), AP_VERSION);
    echo '<script type="text/javascript">';
    echo 'var ajaxurl = "' . admin_url('admin-ajax.php') . '",';
    echo 'ap_nonce 	= "' . wp_create_nonce('ap_ajax_nonce') . '",';
    echo 'ap_max_tags = "' . ap_opt('max_tags') . '",';
    echo 'disable_hover_card = "' . (ap_opt('disable_hover_card') ? true : false) . '"';
    echo '</script>';
    wp_localize_script('ap-anspress_script', 'aplang', array('password_field_not_macthing' => __('Password not matching', 'ap'), 'password_length_less' => __('Password length must be 6 or higher', 'ap'), 'not_valid_email' => __('Not a valid email', 'ap'), 'username_less' => __('Username length must be 4 or higher', 'ap'), 'username_not_avilable' => __('Username not available', 'ap'), 'email_already_in_use' => sprintf(__('Email already in use. %sDo you want to reset your password?%s', 'ap'), '<a href="' . wp_lostpassword_url() . '">', '</a>'), 'loading' => __('Loading', 'ap'), 'sending' => __('Sending request', 'ap'), 'adding_to_fav' => __('Adding question to your favorites', 'ap'), 'voting_on_post' => __('Sending your vote', 'ap'), 'requesting_for_closing' => __('Requesting for closing this question', 'ap'), 'sending_request' => __('Submitting request', 'ap'), 'loading_comment_form' => __('Loading comment form', 'ap'), 'submitting_your_question' => __('Sending your question', 'ap'), 'submitting_your_answer' => __('Sending your answer', 'ap'), 'submitting_your_comment' => __('Sending your comment', 'ap'), 'deleting_comment' => __('Deleting comment', 'ap'), 'updating_comment' => __('Updating comment', 'ap'), 'loading_form' => __('Loading form', 'ap'), 'saving_labels' => __('Saving labels', 'ap'), 'loading_suggestions' => __('Loading suggestions', 'ap'), 'uploading_cover' => __('Uploading cover', 'ap'), 'saving_profile' => __('Saving profile', 'ap'), 'sending_message' => __('Sending message', 'ap'), 'loading_conversation' => __('Loading conversation', 'ap'), 'loading_new_message_form' => __('Loading new message form', 'ap'), 'loading_more_conversations' => __('Loading more conversations', 'ap'), 'searching_conversations' => __('Searching conversations', 'ap'), 'loading_message_edit_form' => __('Loading message form', 'ap'), 'updating_message' => __('Updating message', 'ap'), 'deleting_message' => __('Deleting message', 'ap'), 'uploading' => __('Uploading', 'ap'), 'error' => ap_icon('error'), 'warning' => ap_icon('warning'), 'success' => ap_icon('success'), 'not_valid_response' => __('Something went wrong in server side, not a valid response.', 'ap')));
    wp_localize_script('ap-site-js', 'apoptions', array('ajaxlogin' => ap_opt('ajax_login')));
}
/**
 * Add custom header image to header area
 */
function argent_header_background()
{
    if (get_header_image()) {
        $css = '.site-branding { background-image: url(' . esc_url(get_header_image()) . '); }';
        wp_add_inline_style('argent-style', $css);
    }
}
 /**
  * Any Jumbotron-specific CSS that can't be added in the .less stylesheet is calculated here.
  */
 function jumbotron_css()
 {
     global $ss_settings;
     $center = $ss_settings['jumbotron_center'];
     $border = $ss_settings['jumbotron_border'];
     $opacity = intval($ss_settings['jumbotron_bg_opacity']) / 100;
     if (is_array($ss_settings['jumbo_bg'])) {
         $bg = Shoestrap_Color::sanitize_hex($ss_settings['jumbo_bg']['background-color']);
     } else {
         $bg = Shoestrap_Color::sanitize_hex($ss_settings['jumbo_bg']);
     }
     $rgb = Shoestrap_Color::get_rgb($bg, true);
     $style = '';
     if ($center == 1) {
         $style .= 'text-align: center;';
     }
     if (!empty($border) && $border['border-bottom'] > 0 && !empty($border['border-color'])) {
         $style .= 'border-bottom:' . $border['border-bottom'] . ' ' . $border['border-style'] . ' ' . $border['border-color'] . ';';
     }
     if ($opacity < 1 && !$ss_settings['jumbo_bg']['background-image']) {
         $style .= 'background: rgb(' . $rgb . '); background: rgba(' . $rgb . ', ' . $opacity . ') !important;';
     }
     $style .= 'margin-bottom: 0px;';
     $theCSS = '.jumbotron {' . trim($style) . '}';
     wp_add_inline_style('shoestrap_css', $theCSS);
 }
Esempio n. 29
0
function coffeepot_bbch_enqueue()
{
    wp_enqueue_style('core', get_stylesheet_uri(), false);
    wp_enqueue_style('override', get_template_directory_uri() . '/override.css', false);
    wp_enqueue_style('dashicons');
    wp_add_inline_style('core', '#banner .container-fluid{height:' . get_theme_mod('banner_height', 400) . 'px}');
}
function yasr_add_scripts()
{
    //if visitors stats are enabled
    if (YASR_VISITORS_STATS === 'yes') {
        wp_enqueue_style('jquery-ui', '//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css', FALSE, NULL, 'all');
        wp_enqueue_style('dashicons');
        //dashicons
    }
    wp_enqueue_style('yasrcss', YASR_CSS_DIR . 'yasr.css', FALSE, NULL, 'all');
    //If choosen is light or not dark (force to be default)
    if (YASR_SCHEME_COLOR === 'light' || YASR_SCHEME_COLOR != 'dark') {
        wp_enqueue_style('yasrcsslightscheme', YASR_CSS_DIR . 'yasr-table-light.css', array('yasrcss'), NULL, 'all');
    } elseif (YASR_SCHEME_COLOR === 'dark') {
        wp_enqueue_style('yasrcssdarkscheme', YASR_CSS_DIR . 'yasr-table-dark.css', array('yasrcss'), NULL, 'all');
    }
    if (YASR_CUSTOM_CSS_RULES) {
        wp_add_inline_style('yasrcss', YASR_CUSTOM_CSS_RULES);
    }
    wp_enqueue_script('rateit', YASR_JS_DIR . 'jquery.rateit.min.js', array('jquery'), '1.0.22', TRUE);
    //if visitors stats are enabled
    if (YASR_VISITORS_STATS === 'yes') {
        wp_enqueue_script('jquery-ui-progressbar');
        //script
        wp_enqueue_script('jquery-ui-tooltip');
        //script
    }
    wp_enqueue_script('yasrfront', YASR_JS_DIR . 'yasr-front.js', array('jquery', 'rateit'), '1.0.0', TRUE);
}