function babysitter_styles()
{
    $responsive = of_get_option('responsive_design', 'yes');
    // Normalize default styles
    wp_register_style('normalize', get_template_directory_uri() . '/css/normalize.css', array(), '2.0.1', 'all');
    wp_enqueue_style('normalize');
    // Skeleton grid system
    wp_register_style('skeleton', get_template_directory_uri() . '/css/skeleton.css', array(), '1.2', 'all');
    wp_enqueue_style('skeleton');
    if ($responsive != 'no') {
        // Skeleton Responsive Part
        wp_register_style('skeleton_media', get_template_directory_uri() . '/css/skeleton_media.css', array(), '1.2', 'all');
        wp_enqueue_style('skeleton_media');
    }
    // FontAwesome (icon fonts)
    wp_register_style('fontawesome', get_template_directory_uri() . '/css/font-awesome.min.css', array(), '3.2.1', 'all');
    wp_enqueue_style('fontawesome');
    //Base Template Styles
    wp_register_style('base', get_template_directory_uri() . '/css/base.css', array(), '1.0', 'all');
    wp_enqueue_style('base');
    // Template Styles
    wp_register_style('babysitter_style', get_stylesheet_directory_uri() . '/style.css', array(), '1.0', 'all');
    wp_enqueue_style('babysitter_style');
    // Superfish Menu
    wp_register_style('superfish', get_template_directory_uri() . '/css/superfish.css', array(), '1.0', 'all');
    wp_enqueue_style('superfish');
    // Flexslider
    wp_register_style('flexslider', get_template_directory_uri() . '/css/flexslider.css', array(), '2.1', 'all');
    wp_enqueue_style('flexslider');
    if ($responsive != 'no') {
        // Responsive Layout and Media Queries
        wp_register_style('layout', get_template_directory_uri() . '/css/responsive.css', array(), '1.0', 'all');
        wp_enqueue_style('layout');
    }
}
function jbst_layout()
{
    global $jbst_layout;
    global $jbstecommerce;
    global $post;
    if ($jbst_layout) {
        return;
    }
    /* get the page layout */
    $jbst_layout = jbst_default_page_layout;
    if (is_singular(array('page', 'post'))) {
        if (!($jbst_layout = get_post_meta($post->ID, '_cmb_page_layout', true))) {
            $jbst_layout = of_get_option('default_page_layout', jbst_default_page_layout);
        }
    } else {
        if (is_page() || is_home()) {
            $jbst_layout = of_get_option('default_page_layout', jbst_default_page_layout);
        } elseif (is_search()) {
            $jbst_layout = of_get_option('default_search_layout', jbst_default_page_layout);
        } elseif (is_archive()) {
            $jbst_layout = of_get_option('default_archive_layout', jbst_default_page_layout);
        } else {
            $jbst_layout = of_get_option('default_blog_layout', jbst_default_page_layout);
        }
        if ($jbstecommerce == true) {
            if (is_shop()) {
                $jbst_layout = of_get_option('default_shop_layout', jbst_default_page_layout);
            }
            if (is_product()) {
                $jbst_layout = of_get_option('default_product_layout', jbst_default_page_layout);
            }
        }
    }
}
 protected function __construct()
 {
     $this->enable_nutritional_elements = of_get_option('enable_nutritional_elements', 1);
     // our parent class might
     // contain shared code in its constructor
     parent::__construct();
 }
 /**
  * Helper that returns array of accent less vars.
  *
  * @since 3.0.0
  * 
  * @param  Presscore_Lib_LessVars_Manager $less_vars
  * @return array Returns array like array( 'first-color', 'seconf-color' )
  */
 function presscore_less_get_accent_colors(Presscore_Lib_LessVars_Manager $less_vars)
 {
     // less vars
     $_color_vars = array('accent-bg-color', 'accent-bg-color-2');
     // options ids
     $_test_id = 'general-accent_color_mode';
     $_color_id = 'general-accent_bg_color';
     $_gradient_id = 'general-accent_bg_color_gradient';
     // options defaults
     $_color_def = '#D73B37';
     $_gradient_def = array('#ffffff', '#000000');
     $accent_colors = $less_vars->get_var($_color_vars);
     if (!array_product($accent_colors)) {
         switch (of_get_option($_test_id)) {
             case 'gradient':
                 $colors = of_get_option($_gradient_id, $_gradient_def);
                 break;
             case 'color':
             default:
                 $colors = array(of_get_option($_color_id, $_color_def), null);
         }
         $less_vars->add_hex_color($_color_vars, $colors);
         $accent_colors = $less_vars->get_var($_color_vars);
     }
     return $accent_colors;
 }
Example #5
0
function dcs_load_scripts()
{
    // load WP's included jQuery library
    wp_enqueue_script('jquery');
    // global scripts
    wp_enqueue_script('jquery-slabtext', get_template_directory_uri() . '/includes/js/jquery.slabtext.min.js');
    wp_enqueue_script('jquery-easing', get_template_directory_uri() . '/includes/js/jquery.easing.1.3.js');
    wp_enqueue_script('jquery-fancybox', get_template_directory_uri() . '/includes/fancybox/jquery.fancybox.js');
    wp_enqueue_script('jquery-mobilemenu', get_template_directory_uri() . '/includes/js/jquery.mobilemenu.js');
    wp_enqueue_script('jquery-fitvids', get_template_directory_uri() . '/includes/js/jquery.fitvids.js');
    // front page scripts
    if (is_front_page()) {
        wp_enqueue_script('jquery-slides', get_template_directory_uri() . '/includes/js/flexslider/jquery.flexslider.js');
        wp_enqueue_style('css-flexslider', get_template_directory_uri() . '/includes/js/flexslider/flexslider.css');
    }
    // sticky header
    if (of_get_option('sticky_header') == 'yes' && of_get_option('body_display') == 'body_span') {
        wp_enqueue_script('jquery-sticky', get_template_directory_uri() . '/includes/js/jquery.sticky.js');
    }
    // load singular (posts and pages) scripts
    if (is_singular()) {
        wp_enqueue_script('comment-reply');
        //enable nested comments
    }
    // global styles
    wp_enqueue_style('css-fancybox', get_template_directory_uri() . '/includes/fancybox/jquery.fancybox.css');
    wp_enqueue_style('heading-font', get_template_directory_uri() . '/fonts/style-' . stripslashes(of_get_option('heading_font')) . '.css');
    // load in footer
    function dcs_add_footer_js()
    {
        get_template_part('includes/js/campaignjs');
    }
    add_action('wp_footer', 'dcs_add_footer_js');
}
 public function archive_page_id($page_id)
 {
     if (is_tax('dt_portfolio_category')) {
         $page_id = of_get_option('template_page_id_portfolio_category', null);
     }
     return $page_id;
 }
Example #7
0
function tm_live_chat_code()
{
    $chat_id = of_get_option('live_chat_id');
    if (!$chat_id) {
        return;
    }
    ?>
	<!-- begin olark code -->
	<script data-cfasync="false" type='text/javascript'>/*<![CDATA[*/window.olark||(function(c){var f=window,d=document,l=f.location.protocol=="https:"?"https:":"http:",z=c.name,r="load";var nt=function(){
	f[z]=function(){
	(a.s=a.s||[]).push(arguments)};var a=f[z]._={
	},q=c.methods.length;while(q--){(function(n){f[z][n]=function(){
	f[z]("call",n,arguments)}})(c.methods[q])}a.l=c.loader;a.i=nt;a.p={
	0:+new Date};a.P=function(u){
	a.p[u]=new Date-a.p[0]};function s(){
	a.P(r);f[z](r)}f.addEventListener?f.addEventListener(r,s,false):f.attachEvent("on"+r,s);var ld=function(){function p(hd){
	hd="head";return["<",hd,"></",hd,"><",i,' onl' + 'oad="var d=',g,";d.getElementsByTagName('head')[0].",j,"(d.",h,"('script')).",k,"='",l,"//",a.l,"'",'"',"></",i,">"].join("")}var i="body",m=d[i];if(!m){
	return setTimeout(ld,100)}a.P(1);var j="appendChild",h="createElement",k="src",n=d[h]("div"),v=n[j](d[h](z)),b=d[h]("iframe"),g="document",e="domain",o;n.style.display="none";m.insertBefore(n,m.firstChild).id=z;b.frameBorder="0";b.id=z+"-loader";if(/MSIE[ ]+6/.test(navigator.userAgent)){
	b.src="javascript:false"}b.allowTransparency="true";v[j](b);try{
	b.contentWindow[g].open()}catch(w){
	c[e]=d[e];o="javascript:var d="+g+".open();d.domain='"+d.domain+"';";b[k]=o+"void(0);"}try{
	var t=b.contentWindow[g];t.write(p());t.close()}catch(x){
	b[k]=o+'d.write("'+p().replace(/"/g,String.fromCharCode(92)+'"')+'");d.close();'}a.P(2)};ld()};nt()})({
	loader: "static.olark.com/jsclient/loader0.js",name:"olark",methods:["configure","extend","declare","identify"]});
	/* custom configuration goes here (www.olark.com/documentation) */
	olark.identify('<?php 
    echo $chat_id;
    ?>
');/*]]>*/</script><noscript><a href="https://www.olark.com/site/<?php 
    echo $chat_id;
    ?>
/contact" title="Contact us" target="_blank">Questions? Feedback?</a> powered by <a href="http://www.olark.com?welcome" title="Olark live chat software">Olark live chat software</a></noscript>
	<!-- end olark code -->
	<?php 
}
Example #8
0
function wpex_load_scripts()
{
    /*******
     *** CSS
     *******************/
    // Main style.css
    wp_enqueue_style('font-awesome1', get_template_directory_uri() . '/css/font-awesome.css', false, filemtime(get_stylesheet_directory() . '/css/font-awesome.css'));
    wp_enqueue_style('wpex-style', get_stylesheet_uri(), false, filemtime(get_stylesheet_directory()));
    // Responsive CSS
    if (of_get_option('responsive')) {
        wp_enqueue_style('responsive', get_template_directory_uri() . '/css/responsive.css', false, filemtime(get_stylesheet_directory() . '/css/font-awesome.css'));
    }
    /*******
     *** Javascript
     *******************/
    // Enqueue jQuery
    wp_enqueue_script('jquery');
    // Retina.js
    if (of_get_option('retina', '1') == '1') {
        wp_enqueue_script('retina', WPEX_JS_DIR . '/retina.js', array('jquery'), '0.0.2', true);
    }
    // Required js Plugins
    wp_enqueue_script('wpex-plugins', WPEX_JS_DIR . '/plugins.js', array('jquery'), '', true);
    wp_enqueue_script('isotope-plugins', WPEX_JS_DIR . '/isotope.pkgd.min.js', array('jquery'), '2.2.2', true);
    wp_enqueue_script('isotope-script', WPEX_JS_DIR . '/isotope-script.js', array('jquery'), '', true);
    //initialize
    wp_enqueue_script('wpex-global', WPEX_JS_DIR . '/global.js', array('jquery', 'wpex-plugins'), '1.0', true);
    //localize hovers/ajax
    $wpex_param = array('ajaxurl' => admin_url('admin-ajax.php'), 'loading' => __('loading...', 'wpex'), 'loadmore' => __('load more', 'wpex'));
    wp_localize_script('wpex-global', 'wpexvars', $wpex_param);
    //threaded comments
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
}
Example #9
0
 function generate_dynamic_css()
 {
     $theme_color_light = '';
     $theme_color_light_10 = '';
     $theme_color_dark = '';
     $theme_white = '';
     $theme_color = of_get_option('custom_theme_color');
     if (!empty($theme_color)) {
         $theme_color_light = ascent_adjust_color_brightness($theme_color, 190);
         $theme_color_light_10 = ascent_adjust_color_brightness($theme_color, 220);
         $theme_color_dark = ascent_adjust_color_brightness($theme_color, -60);
         $theme_white = '#FFF';
     }
     $dynamic_css = array(array('elements' => '::selection', 'property' => 'background', 'value' => $theme_color), array('elements' => '::selection', 'property' => 'color', 'value' => $theme_white), array('elements' => '::-moz-selection', 'property' => 'background', 'value' => $theme_color), array('elements' => '::-moz-selection', 'property' => 'color', 'value' => $theme_white), array('elements' => 'h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover, a, .header-top a:hover, .site-branding h1.site-title a, #colophon .widget_calendar table a:hover', 'property' => 'color', 'value' => $theme_color), array('elements' => '.read-more, .read-more.black:hover, .pager li > a:hover, .pager li > a:focus, #home-slider .slide-content .btn, table thead, a#scroll-top, .post-meta-info .entry-meta .comments_count, body input[type="submit"]:hover, body input[type="submit"]:focus, .mean-container .mean-bar, .mean-container .mean-bar .mean-nav ul li a.meanmenu-reveal, .mean-container .mean-bar .mean-nav ul li a.mean-expand:hover', 'property' => 'background-color', 'value' => $theme_color), array('elements' => 'nav.main-menu ul > li:hover > a, nav.main-menu ul > .current-menu-item > a, nav.main-menu ul .current_page_item > a, nav.main-menu ul > li:hover > a, nav.main-menu ul > .current-menu-item > a, .mean-container a.meanmenu-reveal, .comment a.btn, .error-404, .mean-container .mean-bar .meanmenu-reveal ', 'property' => 'background', 'value' => $theme_color), array('elements' => '.wp-caption, .header-top, nav.main-menu ul > li ul, .pager li > a:hover, .pager li > a:focus, #colophon, .entry-content blockquote, .post-meta-info .entry-meta, .comment a.btn, body input[type="text"]:focus, body input[type="email"]:focus, body input[type="url"]:focus, body input[type="tel"]:focus, body input[type="number"]:focus, body input[type="date"]:focus, body input[type="range"]:focus, body input[type="password"]:focus, body input[type="text"]:focus, body textarea:focus, body .form-control:focus, select:focus ', 'property' => 'border-color', 'value' => $theme_color), array('elements' => '.nav > li > a:hover, .nav > li > a:focus, .post-meta-info .entry-meta, .comment-form .alert-info', 'property' => 'background-color', 'value' => $theme_color_light), array('elements' => '.entry-content blockquote', 'property' => 'background', 'value' => $theme_color_light), array('elements' => '.error-404 a', 'property' => 'color', 'value' => $theme_color_light), array('elements' => '.comment-form .alert-info', 'property' => 'border-color', 'value' => $theme_color_light), array('elements' => '.comment-form .alert-info', 'property' => 'border-color', 'value' => $theme_color_light), array('elements' => '.comment-form .alert-info', 'property' => 'color', 'value' => $theme_color_dark));
     $prop_count = count($dynamic_css);
     if ($prop_count > 0) {
         echo "<style type='text/css' id='dynamic-css'>\n\n";
         foreach ($dynamic_css as $css_unit) {
             if (!empty($css_unit['value'])) {
                 echo $css_unit['elements'] . "{\n";
                 echo $css_unit['property'] . ":" . $css_unit['value'] . ";\n";
                 echo "}\n\n";
             }
         }
         if (!empty($theme_color)) {
             echo "@media (max-width: 991px) and (min-width: 0px) {\n                    .post-meta-info .entry-meta .comments_count,\n                    .post-meta-info .entry-meta {\n                        background: none;\n                        border-color: transparent;\n                        background-color: transparent;\n                    }\n                    .post-meta-info .entry-meta .comments_count a  {\n                        background: none;\n                    }\n                }";
         }
         echo '</style>';
     }
 }
/**
 * Add live search JavaScript to the footer
 */
function st_add_live_search()
{
    if (of_get_option('st_live_search') == '0') {
        if (class_exists('bbPress')) {
            if (get_post_type() == 'forum' || get_post_type() == 'topic' || get_post_type() == 'reply' || bbp_is_search()) {
                // If BBPRess
                ?>
		<script type="text/javascript">
		jQuery(document).ready(function() {
		jQuery('#live-search #s').liveSearch({url: '<?php 
                bbp_search_url();
                ?>
/?ajax=on&bbp_search='});
		});
		</script>
   <?php 
            }
        } else {
            // If KB
            ?>
   		<script type="text/javascript">
		jQuery(document).ready(function() {
		jQuery('#live-search #s').liveSearch({url: '<?php 
            echo home_url();
            ?>
/?ajax=on&post_type=st_kb&s='});
		});
		</script>
	<?php 
        }
    }
}
function st_register_sidebars()
{
    register_sidebar(array('name' => __('Default Sidebar', 'framework'), 'id' => 'st_sidebar_primary', 'before_widget' => '<div id="%1$s" class="widget %2$s clearfix">', 'after_widget' => '</div>', 'before_title' => '<h4 class="widget-title">', 'after_title' => '</h4>'));
    // Setup footer widget column option variable
    $footer_widget_layout = get_theme_mod('st_style_footerwidgets');
    if ($footer_widget_layout == '2col') {
        $footer_widget_col = 'col-half';
        $footer_widget_col_descirption = 'Two Columns';
    } elseif ($footer_widget_layout == '3col') {
        $footer_widget_col = 'col-third';
        $footer_widget_col_descirption = 'Three Columns';
    } elseif ($footer_widget_layout == '4col') {
        $footer_widget_col = 'col-fourth';
        $footer_widget_col_descirption = 'Fours Columns';
    } else {
        $footer_widget_col = 'col-third';
        $footer_widget_col_descirption = 'Three Columns';
    }
    register_sidebar(array('name' => __('Footer Widgets', 'framework'), 'description' => 'The footer widget area is currently set to: ' . $footer_widget_col_descirption . '. To change it go to the theme options panel.', 'id' => 'st_sidebar_footer', 'before_widget' => '<div id="%1$s" class="column ' . $footer_widget_col . ' widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h4 class="widget-title"><span>', 'after_title' => '</span></h4>'));
    register_sidebar(array('name' => __('BBPress Sidebar', 'framework'), 'id' => 'st_sidebar_bbpress', 'before_widget' => '<div id="%1$s" class="widget %2$s clearfix">', 'after_widget' => '</div>', 'before_title' => '<h4 class="widget-title">', 'after_title' => '</h4>'));
    register_sidebar(array('name' => __('Knowledge Base Sidebar', 'framework'), 'id' => 'st_sidebar_kb', 'before_widget' => '<div id="%1$s" class="widget %2$s clearfix">', 'after_widget' => '</div>', 'before_title' => '<h4 class="widget-title">', 'after_title' => '</h4>'));
    // Setup footer widget column option variable
    $st_hp_sidebar_position = of_get_option('st_hp_sidebar');
    if ($st_hp_sidebar_position == 'left') {
        $st_hp_sidebar_descirption = 'Left';
    } elseif ($st_hp_sidebar_position == 'right') {
        $st_hp_sidebar_descirption = 'Right';
    } elseif ($st_hp_sidebar_position == 'off') {
        $st_hp_sidebar_descirption = 'Off (no sidebar will be displayed)';
    } else {
        $st_hp_sidebar_descirption = 'Left';
    }
    register_sidebar(array('name' => __('Homepage Sidebar', 'framework'), 'id' => 'st_sidebar_homepage', 'description' => 'The homepage sidebar is currently set to: ' . $st_hp_sidebar_descirption . '. To change it go to the theme options panel.', 'before_widget' => '<div id="%1$s" class="widget %2$s clearfix">', 'after_widget' => '</div>', 'before_title' => '<h4 class="widget-title">', 'after_title' => '</h4>'));
    register_sidebar(array('name' => __('Homepage Widgets', 'framework'), 'id' => 'st_sidebar_homepage_widgets', 'before_widget' => '<div id="%1$s" class="column col-half widget %2$s clearfix">', 'after_widget' => '</div>', 'before_title' => '<h4 class="widget-title"><span>', 'after_title' => '</span></h4>'));
}
 function pesscore_config_get_utility_page_id()
 {
     $page_id = null;
     if (is_search()) {
         $page_id = of_get_option('template_page_id_search', null);
     } else {
         if (is_category()) {
             $page_id = of_get_option('template_page_id_blog_category', null);
         } else {
             if (is_tag()) {
                 $page_id = of_get_option('template_page_id_blog_tags', null);
             } else {
                 if (is_author()) {
                     $page_id = of_get_option('template_page_id_author', null);
                 } else {
                     if (is_date() || is_day() || is_month() || is_year()) {
                         $page_id = of_get_option('template_page_id_date', null);
                     } else {
                         if (is_tax('dt_portfolio_category')) {
                             $page_id = of_get_option('template_page_id_portfolio_category', null);
                         } else {
                             if (is_tax('dt_gallery_category')) {
                                 $page_id = of_get_option('template_page_id_gallery_category', null);
                             }
                         }
                     }
                 }
             }
         }
     }
     return apply_filters('pesscore_config_get_utility_page_id', $page_id);
 }
Example #13
0
 /**
  * Renders markup for a page of posts and sends it back over the wire.
  * @global $opt
  * @global $_POST
  * @see largo_load_more_posts_choose_partial
  */
 function largo_load_more_posts()
 {
     global $opt;
     $paged = isset($_POST['paged']) ? $_POST['paged'] : 1;
     $context = isset($_POST['query']) ? json_decode(stripslashes($_POST['query']), true) : array();
     $args = array_merge(array('paged' => (int) $paged, 'post_status' => 'publish', 'posts_per_page' => intval(get_option('posts_per_page')), 'ignore_sticky_posts' => true), $context);
     // Making sure that this query isn't for the homepage
     if (isset($_POST['is_home'])) {
         $is_home = $_POST['is_home'] == 'false' ? false : true;
     } else {
         $is_home = true;
     }
     // num_posts_home is only relevant on the homepage
     if (of_get_option('num_posts_home') && $is_home) {
         $args['posts_per_page'] = of_get_option('num_posts_home');
     }
     if ($is_home) {
         $args['paged'] = $args['paged'] - 1;
         if (of_get_option('cats_home')) {
             $args['cat'] = of_get_option('cats_home');
         }
     }
     $args = apply_filters('largo_lmp_args', $args);
     $query = new WP_Query($args);
     if ($query->have_posts()) {
         // Choose the correct partial to load here
         $partial = largo_load_more_posts_choose_partial($query);
         // Render all the posts
         while ($query->have_posts()) {
             $query->the_post();
             get_template_part('partials/content', $partial);
         }
     }
     wp_die();
 }
function babysitter_scripts()
{
    if (!is_admin()) {
        $responsive = of_get_option('responsive_design', 'yes');
        // Modernizr with version Number at the end
        wp_register_script('modernizr', get_template_directory_uri() . '/js/modernizr.custom.14583.js', array('jquery'), '2.6.2', true);
        wp_enqueue_script('modernizr');
        // Easing Plugin
        wp_register_script('easing', get_template_directory_uri() . '/js/jquery.easing.min.js', array('jquery'), '1.3', true);
        wp_enqueue_script('easing');
        if ($responsive != 'no') {
            // Mobile Select Menu
            wp_register_script('mobilemenu', get_template_directory_uri() . '/js/jquery.mobilemenu.js', array('jquery'), '1.0', true);
            wp_enqueue_script('mobilemenu');
        }
        // Superfish Menu
        wp_register_script('superfish', get_template_directory_uri() . '/js/jquery.superfish.js', array('jquery'), '1.7.2', true);
        wp_enqueue_script('superfish');
        // Flexslider
        wp_register_script('flexslider', get_template_directory_uri() . '/js/jquery.flexslider-min.js', array('jquery'), '2.1', true);
        wp_enqueue_script('flexslider');
        // Flickr Feed
        wp_register_script('flickr', get_template_directory_uri() . '/js/jflickrfeed.js', array('jquery'), '1.0', true);
        wp_enqueue_script('flickr', true);
        // Elastislide
        wp_register_script('caroufredsel', get_template_directory_uri() . '/js/jquery.carouFredSel-6.2.1-packed.js', array('jquery'), '6.2.1', true);
        wp_enqueue_script('caroufredsel');
        // Fitvids
        wp_register_script('fitvids', get_template_directory_uri() . '/js/jquery.fitvids.js', array('jquery'), '1.1', true);
        wp_enqueue_script('fitvids');
        // Script for inits
        wp_register_script('babysitterscripts', get_template_directory_uri() . '/js/custom.js', array('jquery'), '1.0', true);
        wp_enqueue_script('babysitterscripts');
    }
}
Example #15
0
function retina_styles()
{
    ?>

        <style type="text/css">

                /* RETINA IMAGES */
                
                @media only screen and (-webkit-min-device-pixel-ratio: 2), 
                only screen and (min-device-pixel-ratio: 2) {
                
                
                        <?php 
    if (of_get_option('gg_logo_retina')) {
        ?>

                                .logo-retina{
                                        display: block;
                                        }
                                        
                                .logo-regular {
                                        display: none;
                                        }                

                        <?php 
    }
    ?>
                
                
                }

        </style>
        
<?php 
}
 public function setup()
 {
     global $woocommerce_loop;
     $this->backup_config();
     $config = $this->config;
     $config->set('post.preview.description.style', of_get_option('woocommerce_display_product_info', 'under_image'), 'under_image');
     $config->set('layout', of_get_option('woocommerce_shop_template_layout', 'masonry'), 'masonry');
     $config->set('justified_grid', false);
     $config->set('all_the_same_width', true);
     $config->set('image_layout', 'original');
     $config->set('load_style', 'default');
     $config->set('post.preview.load.effect', 'fade_in');
     $config->set('post.preview.background.enabled', false);
     $config->set('post.preview.background.style', false);
     $config->set('post.preview.description.alignment', 'left');
     $config->set('full_width', false);
     $config->set('item_padding', of_get_option('woocommerce_shop_template_gap', 20), 20);
     if ($woocommerce_loop && !empty($woocommerce_loop['columns'])) {
         $config->set('template.columns.number', absint($woocommerce_loop['columns']));
     } else {
         $config->set('template.columns.number', of_get_option('woocommerce_shop_template_columns', 3), 3);
     }
     $config->set('post.preview.width.min', of_get_option('woocommerce_shop_template_column_min_width', 370), 370);
     $config->set('show_titles', of_get_option('woocommerce_show_product_titles', true), true);
     $config->set('product.preview.show_price', of_get_option('woocommerce_show_product_price', true), true);
     $config->set('product.preview.show_rating', of_get_option('woocommerce_show_product_rating', true), true);
     $config->set('product.preview.icons.show_cart', of_get_option('woocommerce_show_cart_icon', true), true);
     $config->set('product.preview.add_to_cart.position', of_get_option('woocommerce_add_to_cart_position', 'on_image'));
     $config->set('post.preview.load.effect', of_get_option('woocommerce_shop_template_loading_effect', 'fade_in'), 'fade_in');
     $config->set('post.preview.content.visible', $this->product_content_visible());
 }
Example #17
0
    function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', empty($instance['title']) ? sprintf(__('About %s', 'largo'), get_bloginfo('name')) : $instance['title'], $instance, $this->id_base);
        echo $before_widget;
        if ($title) {
            echo $before_title . $title . $after_title;
        }
        ?>

			<?php 
        if (of_get_option('site_blurb')) {
            ?>
                <p><?php 
            echo of_get_option('site_blurb');
            ?>
</p>
			<?php 
        } else {
            ?>
    			<p class="error"><strong><?php 
            _e('You have not set a description for your site.</strong> Add a site description by visiting the Largo Theme Options page.', 'largo');
            ?>
</p>
        	<?php 
        }
        // end about site
        ?>

		<?php 
        echo $after_widget;
    }
Example #18
0
function mtheme_generate_sidebarlist($sidebarlist_type)
{
    if ($sidebarlist_type == "portfolio") {
        $sidebar_options = array('Default Portfolio Sidebar');
        array_push($sidebar_options, 'Default Sidebar');
        for ($sidebar_count = 1; $sidebar_count <= MTHEME_MAX_SIDEBARS; $sidebar_count++) {
            if (of_get_option('theme_sidebar' . $sidebar_count) != "") {
                $active_sidebar = of_get_option('theme_sidebar' . $sidebar_count);
                array_push($sidebar_options, $active_sidebar);
            }
        }
    }
    if ($sidebarlist_type == "post" || $sidebarlist_type == "page") {
        $sidebar_options = array('Default Sidebar');
        for ($sidebar_count = 1; $sidebar_count <= MTHEME_MAX_SIDEBARS; $sidebar_count++) {
            if (of_get_option('theme_sidebar' . $sidebar_count) != "") {
                $active_sidebar = of_get_option('theme_sidebar' . $sidebar_count);
                array_push($sidebar_options, $active_sidebar);
            }
        }
    }
    if ($sidebarlist_type == "mini") {
        $sidebar_options = array('Default Portfolio Mini Sidebar');
        array_push($sidebar_options, 'Default Portfolio Sidebar');
        array_push($sidebar_options, 'Default Sidebar');
        for ($sidebar_count = 1; $sidebar_count <= MTHEME_MAX_SIDEBARS; $sidebar_count++) {
            if (of_get_option('theme_sidebar' . $sidebar_count) != "") {
                $active_sidebar = of_get_option('theme_sidebar' . $sidebar_count);
                array_push($sidebar_options, $active_sidebar);
            }
        }
    }
    return $sidebar_options;
}
Example #19
0
function description()
{
    if (is_home() || is_front_page()) {
        echo trim(of_get_option('site_description'));
    } elseif (is_category()) {
        $description = strip_tags(category_description());
        echo trim($description);
    } elseif (is_single()) {
        if (get_the_excerpt()) {
            echo get_the_excerpt();
        } else {
            global $post;
            $description = trim(str_replace(array("\r\n", "\r", "\n", " ", " "), " ", str_replace("\"", "'", strip_tags($post->post_content))));
            echo mb_substr($description, 0, 220, 'utf-8');
        }
    } elseif (is_search()) {
        echo '“';
        the_search_query();
        echo '”为您找到结果 ';
        global $wp_query;
        echo $wp_query->found_posts;
        echo ' 个';
    } elseif (is_tag()) {
        $description = strip_tags(tag_description());
        echo trim($description);
    } else {
        $description = strip_tags(term_description());
        echo trim($description);
    }
}
/**
 * Update theme.
 *
 */
function presscore_theme_update()
{
    if (isset($_GET['theme-updater']) && 'update' == $_GET['theme-updater']) {
        // global timestamp
        global $dt_lang_backup_dir_timestamp;
        $user = of_get_option('theme_update-user_name', '');
        $api_key = of_get_option('theme_update-api_key', '');
        $dt_lang_backup_dir_timestamp = time();
        // backup lang files
        add_filter('upgrader_pre_install', 'presscore_before_theme_update', 10, 2);
        // restore lang files
        add_filter('upgrader_post_install', 'presscore_after_theme_update', 10, 3);
        $upgrader = new Envato_WordPress_Theme_Upgrader($user, $api_key);
        $responce = $upgrader->upgrade_theme();
        remove_filter('upgrader_pre_install', 'presscore_before_theme_update', 10, 2);
        remove_filter('upgrader_post_install', 'presscore_after_theme_update', 10, 3);
        unset($dt_lang_backup_dir_timestamp);
        set_transient('presscore_update_result', $responce, 10);
        if ($responce) {
            wp_safe_redirect(add_query_arg('theme-updater', 'updated', remove_query_arg('theme-updater')));
        } else {
            wp_safe_redirect(remove_query_arg('theme-updater'));
        }
        // regenrate stylesheets after succesful update
    } else {
        if (isset($_GET['theme-updater']) && 'updated' == $_GET['theme-updater'] && get_transient('presscore_update_result')) {
            add_settings_error('options-framework', 'theme_updated', _x('Stylesheets regenerated.', 'backend', LANGUAGE_ZONE), 'updated fade');
        }
    }
}
Example #21
0
function site5framework_analytics()
{
    $output = of_get_option('stats');
    if ($output != "") {
        echo stripslashes($output) . "\n";
    }
}
Example #22
0
 function wpex_custom_css()
 {
     $custom_css = '';
     //custom css field
     if (of_get_option('custom_css')) {
         $custom_css .= of_get_option('custom_css');
     }
     //sidebar location
     if (of_get_option('sidebar_layout') == 'left') {
         $custom_css .= '#sidebar {float: left} #post{float: right}';
     }
     //opacity hovers
     $hover_color = of_get_option('entry_hover_color', '#000000');
     $hover_opacity = of_get_option('entry_hover_opacity', '0.5');
     if ($hover_color) {
         $custom_css .= '.entry-overlay { background: ' . $hover_color . '; }';
     }
     if ($hover_opacity) {
         $custom_css .= '.loop-entry-img-link:hover .entry-overlay{ opacity: ' . $hover_opacity . '; -moz-opacity: ' . $hover_opacity . '; -webkit-opacity: ' . $hover_opacity . '; }';
     }
     //background
     if (of_get_option('bg_img', '') == '1') {
         $custom_css .= 'body { background-image: none; }';
     }
     /**echo all css**/
     $css_output = "<!-- Custom CSS -->\n<style type=\"text/css\">\n" . $custom_css . "\n</style>";
     if (!empty($custom_css)) {
         echo $css_output;
     }
 }
    function widget($args, $instance)
    {
        if (!is_single()) {
            return;
        }
        extract($args);
        echo $before_widget;
        ?>
			<?php 
        if (get_post_meta(get_the_ID(), 'disclaimer', true)) {
            ?>
				<?php 
            echo get_post_meta(get_the_ID(), 'disclaimer', true);
            ?>
			<?php 
        } elseif (of_get_option('default_disclaimer')) {
            ?>
        <?php 
            echo of_get_option('default_disclaimer');
            ?>
			<?php 
        } else {
            ?>
    			<p class="error"><strong><?php 
            _e('You have not set a disclaimer for your site.</strong> Add a site disclaimer by visiting the Largo Theme Options page.', 'largo');
            ?>
</p>
      <?php 
        }
        ?>

		<?php 
        echo $after_widget;
    }
Example #24
0
function dcs_load_scripts()
{
    // load WP's included jQuery library
    wp_enqueue_script('jquery');
    wp_enqueue_script('jquery-masonry');
    // global scripts
    wp_enqueue_script('jquery-fancybox', get_template_directory_uri() . '/includes/fancybox/jquery.fancybox.pack.js');
    wp_enqueue_script('jquery-stellar', get_template_directory_uri() . '/includes/js/jquery.stellar.js');
    wp_enqueue_script('jquery-mobilemenu', get_template_directory_uri() . '/includes/js/jquery.mobilemenu.js');
    wp_enqueue_script('jquery-fitvids', get_template_directory_uri() . '/includes/js/jquery.fitvids.js');
    // sticky header
    if (of_get_option('sticky_header') == 'yes') {
        wp_enqueue_script('jquery-sticky', get_template_directory_uri() . '/includes/js/jquery.sticky.js');
    }
    // load singular (posts and pages) scripts
    if (is_singular()) {
        wp_enqueue_script('comment-reply');
        //enable nested comments
    }
    // global styles
    wp_enqueue_style('css-stocky', get_stylesheet_directory_uri() . '/style.css');
    wp_enqueue_style('jquery-fancybox', get_template_directory_uri() . '/includes/fancybox/jquery.fancybox.css');
    wp_enqueue_style('font-Roboto', '//fonts.googleapis.com/css?family=Roboto:300,400,400italic,700,700italic');
    wp_enqueue_style('font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css');
}
function get_classification_color($classification)
{
    $classification = $classification . '-class-color';
    print_r($classification);
    $program_color = of_get_option($program_slug);
    return $program_color;
}
Example #26
0
    /**
     * Post Meta
     * @since 1.7.0 
     */
    function kouki_post_meta()
    {
        ?>

    <p class="meta">
      <?php 
        /**
         * Check for theme-options and echo the right meta-data for posts.
         */
        $post_show_author = of_get_option('kouki_post_show_author');
        $post_show_category = of_get_option('kouki_post_show_category');
        $post_show_date = of_get_option('kouki_post_show_date');
        $post_show_comments = of_get_option('kouki_post_show_comments');
        if ($post_show_author || $post_show_date || $post_show_category) {
            _e('Posted ', 'kouki');
        }
        if ($post_show_author) {
            _e('by ', 'kouki');
            ?>
 <?php 
            the_author_posts_link();
            _e(' ', 'kouki');
        }
        if ($post_show_date) {
            _e('on', 'kouki');
            ?>
 <a href="<?php 
            the_permalink();
            ?>
"><?php 
            the_time('M j, Y ');
            ?>
</a> <?php 
        }
        if ($post_show_category && get_the_category()) {
            _e('in', 'kouki');
            ?>
 <?php 
            the_category(', ');
        }
        if (($post_show_author || $post_show_date || $post_show_category) && $post_show_comments) {
            echo "<br>";
        }
        if ($post_show_comments) {
            ?>
        <a href="<?php 
            comments_link();
            ?>
"><?php 
            comments_number(__('No Comments', 'kouki'), __('One Comment', 'kouki'), __('% Comments', 'kouki'));
            ?>
</a>
      <?php 
        }
        ?>
    </p>

  <?php 
    }
function cherry_scripts()
{
    if (!is_admin()) {
        // CherryFramework Scripts
        wp_deregister_script('jquery');
        wp_register_script('jquery', PARENT_URL . '/js/jquery-1.7.2.min.js', false, '1.7.2');
        wp_enqueue_script('jquery');
        wp_register_script('modernizr', PARENT_URL . '/js/modernizr.js', array('jquery'), '2.0.6');
        wp_register_script('elastislide', PARENT_URL . '/js/jquery.elastislide.js', array('jquery'), '1.0');
        wp_register_script('jflickrfeed', PARENT_URL . '/js/jflickrfeed.js', array('jquery'), '1.0');
        wp_register_script('superfish', PARENT_URL . '/js/superfish.js', array('jquery'), '1.5.3', true);
        wp_register_script('mobilemenu', PARENT_URL . '/js/jquery.mobilemenu.js', array('jquery'), '1.0', true);
        wp_register_script('easing', PARENT_URL . '/js/jquery.easing.1.3.js', array('jquery'), '1.3', true);
        wp_register_script('magnific-popup', PARENT_URL . '/js/jquery.magnific-popup.min.js', array('jquery'), '0.9.3', true);
        wp_register_script('flexslider', PARENT_URL . '/js/jquery.flexslider.js', array('jquery'), '2.1', true);
        wp_register_script('playlist', PARENT_URL . '/js/jplayer.playlist.min.js', array('jquery'), '2.3.0', true);
        wp_register_script('jplayer', PARENT_URL . '/js/jquery.jplayer.min.js', array('jquery'), '2.4.0', true);
        wp_register_script('custom', PARENT_URL . '/js/custom.js', array('jquery'), '1.0');
        wp_enqueue_script('swfobject');
        wp_enqueue_script('modernizr');
        wp_enqueue_script('elastislide');
        wp_enqueue_script('jflickrfeed');
        wp_enqueue_script('superfish');
        wp_enqueue_script('mobilemenu');
        wp_enqueue_script('easing');
        wp_enqueue_script('magnific-popup');
        wp_enqueue_script('flexslider');
        wp_enqueue_script('playlist');
        wp_enqueue_script('jplayer');
        wp_enqueue_script('custom');
        switch (of_get_option('slider_type')) {
            case 'none_slider':
                break;
            case 'accordion_slider':
                wp_register_script('zaccordion', PARENT_URL . '/js/jquery.zaccordion.min.js', array('jquery'), '2.1.0', true);
                wp_enqueue_script('zaccordion');
                break;
            default:
                wp_register_script('camera', PARENT_URL . '/js/camera.min.js', array('jquery'), '1.3.4', true);
                wp_enqueue_script('camera');
                break;
        }
        // only Portfolio (2-*, 3-*, 4-Columns), Home and Front Pages
        if (is_page_template('page-Portfolio2Cols-filterable.php') || is_page_template('page-Portfolio3Cols-filterable.php') || is_page_template('page-Portfolio4Cols-filterable.php') || is_home() || is_front_page()) {
            wp_register_script('debouncedresize', PARENT_URL . '/js/jquery.debouncedresize.js', array('jquery'), '1.0', true);
            wp_register_script('isotope', PARENT_URL . '/js/jquery.isotope.js', array('jquery'), '1.5.25', true);
            wp_enqueue_script('debouncedresize');
            wp_enqueue_script('isotope');
        }
        // only child theme's where overwrite flickr widget
        if (CURRENT_THEME != 'cherry' && file_exists(CHILD_DIR . '/includes/widgets/my-flickr-widget.php')) {
            wp_register_script('prettyPhoto', PARENT_URL . '/js/jquery.prettyPhoto.js', array('jquery'), '3.1.5');
            wp_enqueue_script('prettyPhoto');
        }
        // Bootstrap Scripts
        wp_register_script('bootstrap', PARENT_URL . '/bootstrap/js/bootstrap.min.js', array('jquery'), '2.3.0');
        wp_enqueue_script('bootstrap');
    }
}
Example #28
0
 function organizedthemes_staff_register()
 {
     $staff_slug = of_get_option('staff_slug', 'staff');
     register_post_type('staff', array('labels' => array('name' => __('Staff', 'organizedthemes'), 'singular_name' => __('Staff', 'organizedthemes'), 'add_new' => __('Add New Staff Member', 'organizedthemes'), 'add_new_item' => __('Add New Staff Member', 'organizedthemes'), 'edit' => __('Edit', 'organizedthemes'), 'edit_item' => __('Edit Staff Member', 'organizedthemes'), 'view' => __('View Staff', 'organizedthemes'), 'view_item' => __('View Staff Member', 'organizedthemes'), 'not_found' => __('No staff members', 'organizedthemes'), 'not_found_in_trash' => __('Your staff is not in the trash', 'organizedthemes')), 'public' => true, 'show_ui' => true, 'hierarchical' => true, 'publicly_queryable' => true, 'exclude_from_search' => false, 'show_in_nav_menus' => false, 'rewrite' => array('slug' => $staff_slug), 'supports' => array('title', 'editor', 'thumbnail', 'page-attributes')));
     // Register Staff Group Taxonomy
     $staff_group_slug = of_get_option('staff_group_slug', 'staff-group');
     register_taxonomy('staff-group', 'staff', array('hierarchical' => true, 'labels' => array('name' => __('Staff Group', 'organizedthemes'), 'singular_name' => __('Staff Group', 'organizedthemes'), 'search_items' => __('Search Staff Groups', 'organizedthemes'), 'popular_items' => __('Popular Staff Groups', 'organizedthemes'), 'all_items' => __('All Staff Types', 'organizedthemes'), 'parent_item' => __('Parent Staff Groups', 'organizedthemes'), 'parent_item_colon' => __('Parent Staff Groups:', 'organizedthemes'), 'edit_item' => __('Edit Staff Group', 'organizedthemes'), 'update_item' => __('Update Staff Group', 'organizedthemes'), 'add_new_item' => __('Add New Staff Group', 'organizedthemes'), 'new_item_name' => __('New Staff Group Name', 'organizedthemes')), 'query_var' => true, 'show_in_nav_menus' => true, 'show_admin_column' => true, 'rewrite' => array('slug' => $staff_group_slug, 'with_front' => false)));
 }
Example #29
0
function tm_product_per_page()
{
    $prod_number = of_get_option('prod_per_page');
    if (!$prod_number) {
        $prod_number = 8;
    }
    return $prod_number;
}
Example #30
0
 function chester_font_awesome_icon_style($name, $style = 1)
 {
     $imp = ' ';
     $imp .= 'class="' . of_get_option('fwi_icon_' . $name) . '" ';
     $style = of_get_option('fwi_type_' . $name);
     $imp .= 'style="color: ' . $style['color'] . '; font-size: ' . $style['size'] . ';" ';
     return $imp;
 }