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


PHP responsive_get_options函数代码示例

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


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

示例1: responsive_update_social_icon_options

function responsive_update_social_icon_options()
{
    $responsive_options = responsive_get_options();
    // If new option does not exist then copy the option
    if (!isset($responsive_options['googleplus_uid'])) {
        $responsive_options['googleplus_uid'] = $responsive_options['google_plus_uid'];
    }
    if (!isset($responsive_options['stumbleupon_uid'])) {
        $responsive_options['stumbleupon_uid'] = $responsive_options['stumble_uid'];
    }
    // Update entire array
    update_option('responsive_theme_options', $responsive_options);
}
开发者ID:dtekcth,项目名称:datateknologer.se,代码行数:13,代码来源:functions-update.php

示例2: responsive_css

 function responsive_css()
 {
     $theme = wp_get_theme();
     $responsive = wp_get_theme('responsive');
     $responsive_options = responsive_get_options();
     if (1 == $responsive_options['minified_css']) {
         wp_enqueue_style('responsive-style', get_template_directory_uri() . '/core/css/style.min.css', false, $responsive['Version']);
     } else {
         wp_enqueue_style('responsive-style', get_template_directory_uri() . '/core/css/style.css', false, $responsive['Version']);
         wp_enqueue_style('responsive-media-queries', get_template_directory_uri() . '/core/css/responsive.css', false, $responsive['Version']);
     }
     if (is_rtl()) {
         wp_enqueue_style('responsive-rtl-style', get_template_directory_uri() . '/rtl.css', false, $responsive['Version']);
     }
     if (is_child_theme()) {
         wp_enqueue_style('responsive-child-style', get_stylesheet_uri(), false, $theme['Version']);
     }
 }
开发者ID:alpual,项目名称:sweekswatercolors,代码行数:18,代码来源:functions.php

示例3: responsive_get_layout

/**
 * Get current layout
 */
function responsive_get_layout()
{
    /* 404 pages */
    if (is_404()) {
        return 'default';
    }
    $layout = '';
    /* Get Theme options */
    global $responsive_options;
    $responsive_options = responsive_get_options();
    /* Get valid layouts */
    $valid_layouts = responsive_get_valid_layouts();
    /* For singular pages, get post meta */
    if (is_singular()) {
        global $post;
        $layout_meta_value = false != get_post_meta($post->ID, '_responsive_layout', true) ? get_post_meta($post->ID, '_responsive_layout', true) : 'default';
        $layout_meta = array_key_exists($layout_meta_value, $valid_layouts) ? $layout_meta_value : 'default';
    }
    /* Static pages */
    if (is_page()) {
        $page_template = get_post_meta($post->ID, '_wp_page_template', true);
        /* If custom page template is defined, use it first */
        if ('default' != $page_template) {
            if (in_array($page_template, array('blog.php', 'blog-excerpt.php'))) {
                $layout = $responsive_options['blog_posts_index_layout_default'];
            } else {
                $layout = $responsive_options['static_page_layout_default'];
            }
        } else {
            if ('default' != $layout_meta) {
                $layout = $layout_meta;
            } else {
                $layout = $responsive_options['static_page_layout_default'];
            }
        }
    } else {
        if (is_single()) {
            /* If post custom meta is set, use it */
            if ('default' != $layout_meta) {
                $layout = $layout_meta;
            } else {
                $layout = $responsive_options['single_post_layout_default'];
            }
        } else {
            if (is_home() || is_archive() || is_search()) {
                $layout = $responsive_options['blog_posts_index_layout_default'];
            } else {
                $layout = 'default';
            }
        }
    }
    return apply_filters('responsive_get_layout', $layout);
}
开发者ID:kristinakarnitskaya,项目名称:larkyonline,代码行数:56,代码来源:post-custom-meta.php

示例4: responsive_front_page_reading_notice

function responsive_front_page_reading_notice()
{
    $screen = get_current_screen();
    $responsive_options = responsive_get_options();
    if ('options-reading' == $screen->id) {
        $html = '<div class="updated">';
        if (1 == $responsive_options['front_page']) {
            $html .= '<p>' . sprintf(__('The Custom Front Page is enabled. You can disable it in the <a href="%1$s">theme settings</a>.', 'responsive'), admin_url('themes.php?page=theme_options')) . '</p>';
        } else {
            $html .= '<p>' . sprintf(__('The Custom Front Page is disabled. You can enable it in the <a href="%1$s">theme settings</a>.', 'responsive'), admin_url('themes.php?page=theme_options')) . '</p>';
        }
        $html .= '</div>';
        echo $html;
    }
}
开发者ID:dtekcth,项目名称:datateknologer.se,代码行数:15,代码来源:functions-admin.php

示例5: responsive_get_social_icons

function responsive_get_social_icons()
{
    $responsive_options = responsive_get_options();
    $sites = array('twitter' => __('Twitter', 'responsive'), 'facebook' => __('Facebook', 'responsive'), 'linkedin' => __('LinkedIn', 'responsive'), 'youtube' => __('YouTube', 'responsive'), 'stumbleupon' => __('StumbleUpon', 'responsive'), 'rss' => __('RSS Feed', 'responsive'), 'googleplus' => __('Google+', 'responsive'), 'instagram' => __('Instagram', 'responsive'), 'pinterest' => __('Pinterest', 'responsive'), 'yelp' => __('Yelp!', 'responsive'), 'vimeo' => __('Vimeo', 'responsive'), 'foursquare' => __('foursquare', 'responsive'));
    $html = '<ul class="social-icons">';
    foreach ($sites as $key => $value) {
        if (!empty($responsive_options[$key . '_uid'])) {
            $html .= '<li class="' . esc_attr($key) . '-icon"><a href="' . $responsive_options[$key . '_uid'] . '">' . '<img src="' . responsive_child_uri('/core/icons/' . esc_attr($key) . '-icon.png') . '" width="24" height="24" alt="' . esc_html($value) . '">' . '</a></li>';
        }
    }
    $html .= '</ul><!-- .social-icons -->';
    return $html;
}
开发者ID:paulmedwal,项目名称:edxforumspublic,代码行数:13,代码来源:functions.php

示例6: responsive_customize_styles

function responsive_customize_styles()
{
    // get the options
    $responsive_options = responsive_get_options();
    // set the variables
    $font_size = get_theme_mod('responsive_font_size');
    $heading_color = get_theme_mod('responsive_heading_colorpicker');
    $text_color = get_theme_mod('responsive_text_colorpicker');
    $link_color = get_theme_mod('responsive_link_colorpicker');
    $link_hover_color = get_theme_mod('responsive_link_hover_colorpicker');
    $menu_gradients_checkbox = get_theme_mod('responsive_menu_gradients_checkbox');
    $menu_background_color = get_theme_mod('responsive_menu_background_colorpicker');
    $menu_background_color_2 = get_theme_mod('responsive_menu_background_colorpicker_2');
    $menu_background_color_2 = $menu_gradients_checkbox == 1 & $menu_background_color_2 != '' ? $menu_background_color_2 : $menu_background_color;
    $menu_text_color = get_theme_mod('responsive_menu_text_colorpicker');
    $menu_text_hover_color = get_theme_mod('responsive_menu_text_hover_colorpicker');
    $menu_item_color = get_theme_mod('responsive_menu_item_colorpicker');
    $menu_item_hover_color = get_theme_mod('responsive_menu_item_hover_colorpicker');
    $font_heading = get_theme_mod('responsive_font_heading');
    $google_font_heading = get_theme_mod('responsive_google_font_heading') != '' ? responsive_google_font(get_theme_mod('responsive_google_font_heading')) : '';
    $font_text = get_theme_mod('responsive_font_text');
    $google_font_text = get_theme_mod('responsive_google_font_text') != '' ? responsive_google_font(get_theme_mod('responsive_google_font_text')) : '';
    // create a string to add to the google font stylesheet call
    $google_param = $google_font_heading != '' ? $google_font_heading['param'] : '';
    $google_param .= $google_font_heading != '' && $google_font_text != '' ? '|' : '';
    $google_param .= $google_font_text != '' ? $google_font_text['param'] : '';
    if ($google_font_heading != '' && $font_heading == 'google' || $google_font_text != '' && $font_text == 'google') {
        ?>
		<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=<?php 
        echo $google_param;
        ?>
">
	<?php 
    }
    ?>
	<style type="text/css" id="customizer_styles">
		<?php 
    /**
     * Body styles
     */
    ?>
		body {
		<?php 
    if ($text_color != '') {
        ?>
 color: <?php 
        echo esc_html($text_color);
        ?>
;
		<?php 
    }
    if ($font_text != 'google') {
        ?>
 font-family: <?php 
        echo esc_html($font_text);
        ?>
;
		<?php 
    } elseif ($google_font_text != '') {
        ?>
 font-family: '<?php 
        echo esc_html($google_font_text['font']);
        ?>
';
		<?php 
    }
    if ($font_size != '') {
        ?>
 font-size: <?php 
        echo absint($font_size);
        ?>
px;
		<?php 
    }
    ?>
		}

		<?php 
    /**
     * Heading styles
     */
    if ($heading_color != '' || $google_font_heading != '' || $font_heading != '') {
        ?>
		h1, h2, h3, h4, h5, h6, .widget-title h3 {
		<?php 
        if ($heading_color != '') {
            ?>
 color: <?php 
            echo esc_html($heading_color);
            ?>
;
		<?php 
        }
        if ($font_heading != 'google') {
            ?>
 font-family: <?php 
            echo esc_html($font_heading);
            ?>
;
		<?php 
//.........这里部分代码省略.........
开发者ID:jimdough,项目名称:Roadmaster,代码行数:101,代码来源:functions.php

示例7: responsive_get_options

<?php

// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}
$responsive_options = responsive_get_options();
//test for first install no database
$db = get_option('responsive_theme_options');
//test if all options are empty so we can display default text if they are
$empty = empty($responsive_options['home_headline']) && empty($responsive_options['home_subheadline']) && empty($responsive_options['home_content_area']) ? false : true;
$emtpy_cta = empty($responsive_options['cta_text']) ? false : true;
?>

<div id="featured" class="grid col-940">

	<div id="featured-content" class="grid col-460">

		<h1 class="featured-title">
			<?php 
if (isset($responsive_options['home_headline']) && $db && $empty) {
    echo $responsive_options['home_headline'];
} else {
    _e('Hello, World!', 'responsive');
}
?>
		</h1>

		<h2 class="featured-subtitle">
			<?php 
if (isset($responsive_options['home_subheadline']) && $db && $empty) {
开发者ID:shingo-sasaki,项目名称:cajon-wp,代码行数:31,代码来源:featured-area.php


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