• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP of_get_option函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: setup

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


示例17: widget

    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;
    }
开发者ID:NathanLawrence,项目名称:Largo,代码行数:32,代码来源:largo-about.php


示例18: mtheme_generate_sidebarlist

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;
}
开发者ID:rongandat,项目名称:scalaprj,代码行数:34,代码来源:metaboxgen.php


示例19: description

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);
    }
}
开发者ID:carpliyz,项目名称:9IPHP,代码行数:30,代码来源:header.php


示例20: presscore_theme_update

/**
 * 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');
        }
    }
}
开发者ID:noman90rauf,项目名称:wp-content,代码行数:34,代码来源:mod-theme-update.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP of_get_options函数代码示例发布时间:2022-05-15
下一篇:
PHP of_get_header_classes_array函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap