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


PHP genesis_get_option函数代码示例

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


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

示例1: zp_custom_archive_page

function zp_custom_archive_page()
{
    global $post, $paged;
    $include = genesis_get_option('blog_cat');
    $exclude = genesis_get_option('blog_cat_exclude') ? explode(',', str_replace(' ', '', genesis_get_option('blog_cat_exclude'))) : '';
    $paged = get_query_var('paged') ? get_query_var('paged') : 1;
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            do_action('genesis_before_entry');
            printf('<article %s>', genesis_attr('entry'));
            // check post format and call template
            $format = get_post_format();
            get_template_part('content', $format);
            do_action('genesis_after_entry_content');
            //do_action( 'genesis_entry_footer' );
            echo '</article>';
            do_action('genesis_after_entry');
        }
    }
    //* Genesis navigation
    genesis_posts_nav();
    //* Restore original query
    wp_reset_query();
}
开发者ID:lukasalbrecht,项目名称:www.genesis-playground.dev,代码行数:25,代码来源:archive.php

示例2: cuttz_bbpress_layout

function cuttz_bbpress_layout($layout)
{
    if (!is_bbpress()) {
        return $layout;
    }
    //get current layout saved in genesis setting
    $gsettings = get_option(GENESIS_SETTINGS_FIELD, null);
    $layout = isset($gsettings['site_layout']) ? $gsettings['site_layout'] : null;
    $set = genesis_get_option('bbpress-layout', cuttz_get_skin_page_id(), false);
    $set = $set == 'default' ? $layout : $set;
    // if no setting in Cuttz defined then use Genesis setting
    $forum_id = bbp_get_forum_id();
    $forumlayout = false;
    if (!empty($forum_id)) {
        $forumlayout = esc_attr(get_post_meta($forum_id, '_genesis_layout', true));
        if (!empty($forumlayout)) {
            return $forumlayout;
        }
    }
    if (empty($forumlayout)) {
        return $set;
    }
    if (is_user_logged_in()) {
    }
    return $set;
}
开发者ID:garywp,项目名称:cuttz-framework,代码行数:26,代码来源:bbpress-ready.php

示例3: wsm_child_do_footer

function wsm_child_do_footer()
{
    echo '<div class="footer-left">';
    $contact = genesis_get_option('wsm_contact_info', 'patricia-settings');
    if (!empty($contact)) {
        echo '<p class="contact-info">' . genesis_get_option('wsm_contact_info', 'patricia-settings') . '</p>';
    }
    $credit = genesis_get_option('wsm_credit', 'patricia-settings');
    if (!empty($contact)) {
        echo '<p class="credit">' . genesis_get_option('wsm_credit', 'patricia-settings') . '</p>';
    }
    echo '</div><!-- end .footer-left -->';
    echo '<div class="footer-right">';
    if (has_nav_menu('footer')) {
        $args = array('theme_location' => 'footer', 'container' => '', 'menu_class' => genesis_get_option('nav_superfish') ? 'nav genesis-nav-menu superfish' : 'nav genesis-nav-menu', 'echo' => 0);
        $nav = wp_nav_menu($args);
    }
    $nav_output = sprintf('<div class="footer-nav">%2$s%1$s%3$s</div>', $nav, genesis_structural_wrap('nav', '<div class="menu-wrap">', 0), genesis_structural_wrap('nav', '</div><!-- end .wrap -->', 0));
    echo apply_filters('wsm_do_footer_nav', $nav_output, $nav, $args);
    $copyright = genesis_get_option('wsm_copyright', 'patricia-settings');
    if (!empty($copyright)) {
        echo '<p class="copy">' . genesis_get_option('wsm_copyright', 'patricia-settings') . '</p>';
    }
    echo '</div><!-- end .footer-right -->';
}
开发者ID:Bobcatou,项目名称:enhanceworldwide,代码行数:25,代码来源:footer.php

示例4: zp_custom_blog_page

function zp_custom_blog_page()
{
    global $post, $paged;
    $include = genesis_get_option('blog_cat');
    $exclude = genesis_get_option('blog_cat_exclude') ? explode(',', str_replace(' ', '', genesis_get_option('blog_cat_exclude'))) : '';
    if (get_query_var('paged')) {
        $paged = get_query_var('paged');
    } elseif (get_query_var('page')) {
        $paged = get_query_var('page');
    } else {
        $paged = 1;
    }
    //* Arguments
    $args = array('cat' => $include, 'category__not_in' => $exclude, 'posts_per_page' => genesis_get_option('blog_cat_num'), 'paged' => $paged);
    query_posts($args);
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            do_action('genesis_before_entry');
            printf('<article %s>', genesis_attr('entry'));
            // check post format and call template
            $format = get_post_format();
            get_template_part('content', $format);
            do_action('genesis_after_entry_content');
            //do_action( 'genesis_entry_footer' );
            echo '</article>';
            do_action('genesis_after_entry');
        }
    }
    //* Genesis navigation
    genesis_posts_nav();
    //* Restore original query
    wp_reset_query();
}
开发者ID:lukasalbrecht,项目名称:www.genesis-playground.dev,代码行数:34,代码来源:home.php

示例5: associate_style_body_class

/**
 * Filters the body classes to add the proper style-specific class.
 *
 */
function associate_style_body_class($classes)
{
    if ($style = genesis_get_option('style_selection')) {
        $classes[] = esc_attr(sanitize_html_class($style));
    }
    return $classes;
}
开发者ID:nmrugg,项目名称:studiopress-premum-wp-themes,代码行数:11,代码来源:style.php

示例6: genesis_upgrade

function genesis_upgrade()
{
    // Don't do anything if we're on the latest version
    if (version_compare(genesis_get_option('theme_version'), PARENT_THEME_VERSION, '>=')) {
        return;
    }
    #########################
    #	UPGRADE TO VERSION 1.0.1
    #########################
    // Check to see if we need to upgrade to 1.0.1
    if (version_compare(genesis_get_option('theme_version'), '1.0.1', '<')) {
        $theme_settings = get_option(GENESIS_SETTINGS_FIELD);
        $new_settings = array('nav_home' => 1, 'nav_twitter_text' => 'Follow me on Twitter', 'subnav_home' => 1, 'theme_version' => '1.0.1');
        $settings = wp_parse_args($new_settings, $theme_settings);
        update_option(GENESIS_SETTINGS_FIELD, $settings);
    }
    #########################
    #	UPGRADE TO VERSION 1.0.2
    #########################
    // Check to see if we need to upgrade to 1.0.2
    if (version_compare(genesis_get_option('theme_version'), '1.0.2', '<')) {
        $theme_settings = get_option(GENESIS_SETTINGS_FIELD);
        $new_settings = array('theme_version' => '1.0.2');
        $settings = wp_parse_args($new_settings, $theme_settings);
        update_option(GENESIS_SETTINGS_FIELD, $settings);
    }
}
开发者ID:Weissenberger13,项目名称:web.portugalrentalcottages,代码行数:27,代码来源:compatibility_functions.php

示例7: bsg_genesis_next_link_text_numeric

function bsg_genesis_next_link_text_numeric($text)
{
    if ('numeric' === genesis_get_option('posts_nav')) {
        return '<span class="sr-only">' . __('Next Page', 'genesis') . '</span>' . '<span aria-hidden="true">&raquo;</span>';
    }
    return $text;
}
开发者ID:tonyaedmonds,项目名称:bootstrap-genesis,代码行数:7,代码来源:pagination-numeric.php

示例8: custom_genesis_do_author_box

function custom_genesis_do_author_box()
{
    if (is_single() && genesis_get_option('author_box_single')) {
        genesis_author_box();
        return;
    }
}
开发者ID:Weissenberger13,项目名称:web.portugalrentalcottages,代码行数:7,代码来源:functions.php

示例9: post_format_image_featured

function post_format_image_featured()
{
    if (has_post_format('image') && has_post_thumbnail() && is_singular('post')) {
        $img = genesis_get_image(array('format' => 'html', 'size' => genesis_get_option('image_size'), 'attr' => array('class' => 'post-image')));
        printf('<a href="%s" id="featured-post-image" title="%s">%s</a>', get_permalink(), the_title_attribute('echo=0'), $img);
    }
}
开发者ID:MarioGiancini,项目名称:thedbz-theme,代码行数:7,代码来源:functions.php

示例10: decor_add_nav_body_class

function decor_add_nav_body_class($classes)
{
    if (genesis_get_option('nav')) {
        $classes[] = 'primary-nav';
    }
    return $classes;
}
开发者ID:hscale,项目名称:webento,代码行数:7,代码来源:functions.php

示例11: uci_genesis_set_logo

function uci_genesis_set_logo()
{
    $uci_logo_path = get_theme_mod('uci_custom_logo');
    if (genesis_get_option('blog_title') == 'image' && get_theme_mod('uci_custom_logo')) {
        echo '<div class="site-logo"><a href="' . site_url() . '"><img src="' . $uci_logo_path . '" alt="' . get_bloginfo('name') . '" /></a></div>';
    }
}
开发者ID:quantegy,项目名称:wp-genesis-child-theme,代码行数:7,代码来源:functions_logo.php

示例12: socialeyes_style_body_class

function socialeyes_style_body_class($classes)
{
    if ($style = genesis_get_option('style_selection')) {
        $classes[] = $style;
    }
    return $classes;
}
开发者ID:nmrugg,项目名称:studiopress-premum-wp-themes,代码行数:7,代码来源:style.php

示例13: bsg_genesis_posts_nav

/**
 * Replacement for genesis_posts_nav() that replaces the call to
 * genesis_prev_next_posts_nav() with
 * bsg_genesis_prev_next_posts_nav()
 *
 * @since 0.7.0
 */
function bsg_genesis_posts_nav()
{
    if ('numeric' === genesis_get_option('posts_nav')) {
        bsg_genesis_numeric_posts_nav();
    } else {
        bsg_genesis_prev_next_posts_nav();
    }
}
开发者ID:Wordpress-Development,项目名称:genesis-bootstrap,代码行数:15,代码来源:pagination.php

示例14: render_metabox

 /**
  * Render the Metabox
  *
  * @since 1.0.3
  *
  * @author Bill Erickson
  * @link http://www.billerickson.net/genesis-theme-options/
  * @return null
  */
 public function render_metabox()
 {
     $number_of_widgets = genesis_get_option('footer_widgets');
     $number_of_widgets = is_numeric($number_of_widgets) ? intval($number_of_widgets) : 0;
     if (is_readable($this->config['views']['metabox'])) {
         include $this->config['views']['metabox'];
     }
 }
开发者ID:jonpetersen,项目名称:PHTC,代码行数:17,代码来源:class-metabox.php

示例15: ygf_post_nav

/**
 * Conditionally echo archive pagination in a format dependent on chosen setting.
 *
 * This is shown at the end of archives to get to another page of entries.
 *
 * @since 0.2.3
 *
 * @uses genesis_get_option()            Get theme setting value.
 * @uses genesis_prev_next_posts_nav()   Prev and Next links.
 * @uses genesis_numeric_posts_nav()     Numbered links.
 */
function ygf_post_nav()
{
    if ('numeric' === genesis_get_option('posts_nav')) {
        ygf_numeric_posts_nav();
    } else {
        genesis_prev_next_posts_nav();
    }
}
开发者ID:g-kanoufi,项目名称:genesis-foundation6-child-theme,代码行数:19,代码来源:pagination.php


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