当前位置: 首页>>代码示例>>PHP>>正文


PHP of_get_option函数代码示例

本文整理汇总了PHP中of_get_option函数的典型用法代码示例。如果您正苦于以下问题:PHP of_get_option函数的具体用法?PHP of_get_option怎么用?PHP of_get_option使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了of_get_option函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: babysitter_styles

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');
    }
}
开发者ID:azeemgolive,项目名称:thefunkidsgame,代码行数:35,代码来源:theme-styles.php

示例2: jbst_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);
            }
        }
    }
}
开发者ID:WildCodeSchool,项目名称:projet-hopital_static,代码行数:34,代码来源:template-functions.php

示例3: __construct

 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();
 }
开发者ID:boutitinizar,项目名称:bati-men,代码行数:7,代码来源:recipes_post_type.php

示例4: presscore_less_get_accent_colors

 /**
  * 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;
 }
开发者ID:10asfar,项目名称:WordPress-the7-theme-demo-,代码行数:34,代码来源:less-functions.php

示例5: dcs_load_scripts

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');
}
开发者ID:JPBetley,项目名称:cirofordelaware,代码行数:34,代码来源:scripts.php

示例6: archive_page_id

 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;
 }
开发者ID:10asfar,项目名称:WordPress-the7-theme-demo-,代码行数:7,代码来源:class-mod-portfolio-public.php

示例7: tm_live_chat_code

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 
}
开发者ID:vanie3,项目名称:tint-my-ride,代码行数:35,代码来源:live-chat.php

示例8: wpex_load_scripts

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');
    }
}
开发者ID:peternem,项目名称:vlt-wp,代码行数:35,代码来源:scripts.php

示例9: generate_dynamic_css

 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>';
     }
 }
开发者ID:ksan5835,项目名称:outlooknew,代码行数:30,代码来源:dynamic-css.php

示例10: st_add_live_search

/**
 * 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 
        }
    }
}
开发者ID:philtrimble,项目名称:GCFB-Portal-Theme---Main,代码行数:35,代码来源:scripts.php

示例11: st_register_sidebars

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>'));
}
开发者ID:philtrimble,项目名称:GCFB-Portal-Theme---Main,代码行数:35,代码来源:register-sidebars.php

示例12: pesscore_config_get_utility_page_id

 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);
 }
开发者ID:RDePoppe,项目名称:luminaterealestate,代码行数:32,代码来源:mod-archives-templates.php

示例13: largo_load_more_posts

 /**
  * 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();
 }
开发者ID:NathanLawrence,项目名称:Largo,代码行数:41,代码来源:ajax-functions.php

示例14: babysitter_scripts

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');
    }
}
开发者ID:azeemgolive,项目名称:thefunkidsgame,代码行数:35,代码来源:theme-scripts.php

示例15: retina_styles

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 
}
开发者ID:m-godefroid76,项目名称:devrestofactory,代码行数:35,代码来源:retina.php


注:本文中的of_get_option函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。