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


PHP ci_setting函数代码示例

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


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

示例1: ci_theme_thick_border_class

 function ci_theme_thick_border_class($classes)
 {
     if (ci_setting('thick_border') != '') {
         $classes[] = ci_setting('thick_border');
     }
     return $classes;
 }
开发者ID:sbhambad,项目名称:TimousDemo,代码行数:7,代码来源:color_options.php

示例2: ci_the_post_thumbnail_full

 function ci_the_post_thumbnail_full($args = array())
 {
     $args = wp_parse_args((array) $args, array('class' => '', 'noalign' => false));
     $attr = array();
     if (ci_setting('featured_full_use_full') == 'full') {
         $attr['class'] = $args['class'];
         //			if($args['noalign'] === false)
         //			{
         //				$attr['class'] .= ' '.ci_setting('featured_single_align').' ';
         //			}
         if (empty($attr['class'])) {
             unset($attr['class']);
         }
         the_post_thumbnail('ci_featured_full', $attr);
     }
     if (ci_setting('featured_full_use_full') == 'single') {
         $attr['class'] = $args['class'];
         if ($args['noalign'] === false) {
             $attr['class'] .= ' ' . ci_setting('featured_single_align') . ' ';
         }
         if (empty($attr['class'])) {
             unset($attr['class']);
         }
         the_post_thumbnail('ci_featured_single', $attr);
     }
     if (ci_setting('featured_full_use_full') == 'disabled') {
         // Do nothing
     }
 }
开发者ID:nickolasnikolic,项目名称:wordpress-heroku-php,代码行数:29,代码来源:featured_image_fullwidth.php

示例3: ci_output_google_analytics_code

 function ci_output_google_analytics_code()
 {
     // Load Google Analytics code, if available.
     if (ci_setting('google_analytics_code')) {
         echo html_entity_decode(ci_setting('google_analytics_code'));
     }
 }
开发者ID:nickolasnikolic,项目名称:wordpress-heroku-php,代码行数:7,代码来源:google_analytics.php

示例4: ci_theme_wc_loop_shop_per_page_view

 function ci_theme_wc_loop_shop_per_page_view($posts_per_page)
 {
     if (empty($_GET['view'])) {
         return $posts_per_page;
     }
     $values = array($posts_per_page);
     if ('all' === $_GET['view']) {
         $view = -1;
     } else {
         $view = intval($_GET['view']);
     }
     if (ci_setting('eshop_products_view_first') != '') {
         $values[] = ci_setting('eshop_products_view_first');
     }
     if (ci_setting('eshop_products_view_second') != '') {
         $values[] = ci_setting('eshop_products_view_second');
     }
     if (ci_setting('eshop_products_view_all') == 'enabled') {
         $values[] = -1;
     }
     if (in_array($view, $values)) {
         return $view;
     }
     return $posts_per_page;
 }
开发者ID:sbhambad,项目名称:TimousDemo,代码行数:25,代码来源:ecommerce_options.php

示例5: ci_touch_favicon

        function ci_touch_favicon()
        {
            if (ci_setting('touch_favicon')) {
                ?>
<link rel="apple-touch-icon<?php 
                echo ci_setting('touch_favicon_pre') == 'enabled' ? '-precomposed' : '';
                ?>
" href="<?php 
                echo esc_attr(ci_setting('touch_favicon'));
                ?>
" /><?php 
            }
            if (ci_setting('touch_favicon_72')) {
                ?>
<link rel="apple-touch-icon<?php 
                echo ci_setting('touch_favicon_72_pre') == 'enabled' ? '-precomposed' : '';
                ?>
" sizes="72x72" href="<?php 
                echo esc_attr(ci_setting('touch_favicon_72'));
                ?>
" /><?php 
            }
            if (ci_setting('touch_favicon_114')) {
                ?>
<link rel="apple-touch-icon<?php 
                echo ci_setting('touch_favicon_114_pre') == 'enabled' ? '-precomposed' : '';
                ?>
" sizes="114x114" href="<?php 
                echo esc_attr(ci_setting('touch_favicon_72'));
                ?>
" /><?php 
            }
        }
开发者ID:sbhambad,项目名称:TimousDemo,代码行数:33,代码来源:touch_favicon.php

示例6: ci_custom_background

        function ci_custom_background()
        {
            if (ci_setting('bg_custom_disabled') != 'enabled' or ci_setting('bg_h_custom_disabled') != 'enabled' and get_ci_theme_support('custom_header_background') or ci_setting('bg_f_custom_disabled') != 'enabled' and get_ci_theme_support('custom_footer_background')) {
                ?>
				<style type="text/css">
					<?php 
                if (ci_setting('bg_h_custom_disabled') != 'enabled' and get_ci_theme_support('custom_header_background')) {
                    $custom_bg_h = array('bg_h_color' => apply_filters('ci_background_color_value', ci_setting('bg_h_color')), 'bg_h_image' => ci_setting('bg_h_image'), 'bg_h_image_horizontal' => ci_setting('bg_h_image_horizontal'), 'bg_h_image_vertical' => ci_setting('bg_h_image_vertical'), 'bg_h_image_attachment' => ci_setting('bg_h_image_attachment'), 'bg_h_image_repeat' => ci_setting('bg_h_image_repeat'), 'bg_h_image_disable' => ci_setting('bg_h_image_disable'), 'bg_h_image_size' => ci_setting('bg_h_image_size') != 'custom' ? ci_setting('bg_h_image_size') : ci_setting('bg_h_image_size_value'));
                    do_action('ci_custom_header_background', apply_filters('ci_custom_header_background_options', $custom_bg_h));
                }
                if (ci_setting('bg_custom_disabled') != 'enabled') {
                    $custom_bg = array('bg_color' => apply_filters('ci_background_color_value', ci_setting('bg_color')), 'bg_image' => ci_setting('bg_image'), 'bg_image_horizontal' => ci_setting('bg_image_horizontal'), 'bg_image_vertical' => ci_setting('bg_image_vertical'), 'bg_image_attachment' => ci_setting('bg_image_attachment'), 'bg_image_repeat' => ci_setting('bg_image_repeat'), 'bg_image_disable' => ci_setting('bg_image_disable'), 'bg_image_size' => ci_setting('bg_image_size') != 'custom' ? ci_setting('bg_image_size') : ci_setting('bg_image_size_value'));
                    do_action('ci_custom_background', apply_filters('ci_custom_background_options', $custom_bg));
                }
                if (ci_setting('bg_f_custom_disabled') != 'enabled' and get_ci_theme_support('custom_footer_background')) {
                    $custom_bg_f = array('bg_f_color' => apply_filters('ci_background_color_value', ci_setting('bg_f_color')), 'bg_f_image' => ci_setting('bg_f_image'), 'bg_f_image_horizontal' => ci_setting('bg_f_image_horizontal'), 'bg_f_image_vertical' => ci_setting('bg_f_image_vertical'), 'bg_f_image_attachment' => ci_setting('bg_f_image_attachment'), 'bg_f_image_repeat' => ci_setting('bg_f_image_repeat'), 'bg_f_image_disable' => ci_setting('bg_f_image_disable'), 'bg_f_image_size' => ci_setting('bg_f_image_size') != 'custom' ? ci_setting('bg_f_image_size') : ci_setting('bg_f_image_size_value'));
                    do_action('ci_custom_footer_background', apply_filters('ci_custom_footer_background_options', $custom_bg_f));
                }
                ?>
				</style>
			<?php 
            }
            ?>
			<?php 
        }
开发者ID:sbhambad,项目名称:TimousDemo,代码行数:25,代码来源:custom_background.php

示例7: ci_cpt_taxonomy_paging_request

 function ci_cpt_taxonomy_paging_request($query)
 {
     //We don't want to mess other templates/post types or with the admin panel.
     if (!is_tax() || is_admin()) {
         return $query;
     }
     // Make sure we don't override any explicitly set posts_per_page
     if (isset($query->query_vars['posts_per_page'])) {
         return $query;
     }
     $num_of_pages = false;
     if (is_tax('artists-category')) {
         $num_of_pages = intval(ci_setting('artists_per_page'));
     } elseif (is_tax('video-category')) {
         $num_of_pages = intval(ci_setting('videos_per_page'));
     } elseif (is_tax('event-category')) {
         $num_of_pages = intval(ci_setting('events_per_page'));
     } elseif (is_tax('gallery-category')) {
         $num_of_pages = intval(ci_setting('galleries_per_page'));
     } elseif (is_tax('section')) {
         $num_of_pages = intval(ci_setting('discography_per_page'));
     }
     // Assign a number only if a number was found;
     if ($num_of_pages !== false && $num_of_pages > 0) {
         $query->set('posts_per_page', $num_of_pages);
     }
     return $query;
 }
开发者ID:sbhambad,项目名称:TimousDemo,代码行数:28,代码来源:archive_options.php

示例8: ci_register_bsa_script

 function ci_register_bsa_script()
 {
     // Load Buy Sell Ads code, if available.
     if (ci_setting('buysellads_code')) {
         echo html_entity_decode(ci_setting('buysellads_code'));
     }
 }
开发者ID:nickolasnikolic,项目名称:wordpress-heroku-php,代码行数:7,代码来源:buysellads.php

示例9: ci_register_theme_styles

 function ci_register_theme_styles()
 {
     //
     // Register all front-end and admin styles here.
     // There is no need to register them conditionally, as the enqueueing can be conditional.
     //
     $font_url = '';
     /* translators: If there are characters in your language that are not supported by Source Sans Pro, translate this to 'off'. Do not translate into your own language. */
     if ('off' !== _x('on', 'Source Sans Pro font: on or off', 'ci_theme')) {
         $font_url = add_query_arg('family', urlencode('Source Sans Pro:300,400,700,900,400italic'), "//fonts.googleapis.com/css");
     }
     wp_register_style('ci-google-font', $font_url, array());
     wp_register_style('ci-base', get_child_or_parent_file_uri('/css/base.css'));
     wp_register_style('ci-flexslider', get_child_or_parent_file_uri('/css/flexslider.css'));
     wp_register_style('mmenu', get_child_or_parent_file_uri('/css/mmenu.css'));
     wp_register_style('woocommerce_prettyPhoto_css', get_child_or_parent_file_uri('/css/prettyPhoto.css'));
     wp_register_style('jquery-ui-style', get_child_or_parent_file_uri('/css/admin/jquery-ui.css'), array(), '1.10.4');
     wp_register_style('stapel', get_child_or_parent_file_uri('/css/stapel.css'), array(), '1.10.4');
     wp_register_style('jquery-ui-timepicker', get_child_or_parent_file_uri('/css/admin/jquery-ui-timepicker-addon.css'));
     wp_register_style('ci-repeating-fields', get_child_or_parent_file_uri('/css/admin/repeating-fields.css'));
     wp_register_style('ci-admin-widgets', get_child_or_parent_file_uri('/css/admin/admin-widgets.css'), array('ci-repeating-fields'));
     wp_register_style('ci-post-edit-screens', get_child_or_parent_file_uri('/css/admin/post_edit_screens.css'), array('ci-repeating-fields'));
     wp_register_style('ci-color-scheme', get_child_or_parent_file_uri('/colors/' . ci_setting('stylesheet')));
     wp_register_style('ci-style', get_stylesheet_uri(), array('ci-google-font', 'ci-base', 'ci-flexslider', 'font-awesome', 'mmenu', 'stapel'), CI_THEME_VERSION, 'screen');
 }
开发者ID:sbhambad,项目名称:TimousDemo,代码行数:25,代码来源:styles.php

示例10: ci_is_featured_enabled

 function ci_is_featured_enabled()
 {
     $post_type = get_post_type();
     if (ci_setting('featured_single_' . $post_type . '_show') == 'enabled') {
         return true;
     }
     return false;
 }
开发者ID:nickolasnikolic,项目名称:wordpress-heroku-php,代码行数:8,代码来源:featured_image_single.php

示例11: ci_register_google_maps_api

 function ci_register_google_maps_api()
 {
     $key = '';
     if (ci_setting('google_maps_api_key')) {
         $key = 'key=' . ci_setting('google_maps_api_key') . '&';
     }
     $google_url = "//maps.googleapis.com/maps/api/js?" . $key . "v=3.5&sensor=false";
     wp_register_script('google-maps', $google_url, array(), null, false);
 }
开发者ID:nickolasnikolic,项目名称:wordpress-heroku-php,代码行数:9,代码来源:google_maps_api.php

示例12: ci_favicon

        function ci_favicon()
        {
            if (ci_setting('favicon')) {
                ?>
<link rel="shortcut icon" type="image/x-icon" href="<?php 
                echo esc_attr(ci_setting('favicon'));
                ?>
" /><?php 
            }
        }
开发者ID:sbhambad,项目名称:TimousDemo,代码行数:10,代码来源:favicon.php

示例13: ci_disable_pages_comments

 function ci_disable_pages_comments($comments_open, $post_id)
 {
     if (is_page($post_id)) {
         if (ci_setting('pages_comments_off') == 'enabled') {
             return false;
         } else {
             return $comments_open;
         }
     } else {
         return $comments_open;
     }
 }
开发者ID:nickolasnikolic,项目名称:wordpress-heroku-php,代码行数:12,代码来源:comments.php

示例14: ci_favicon

        function ci_favicon()
        {
            if (function_exists('has_site_icon') && has_site_icon()) {
                return;
            }
            if (ci_setting('favicon')) {
                ?>
<link rel="shortcut icon" type="image/x-icon" href="<?php 
                echo esc_attr(ci_setting('favicon'));
                ?>
" /><?php 
            }
        }
开发者ID:nickolasnikolic,项目名称:wordpress-heroku-php,代码行数:13,代码来源:favicon.php

示例15: ci_register_theme_styles

 function ci_register_theme_styles()
 {
     //
     // Register all front-end and admin styles here.
     // There is no need to register them conditionally, as the enqueueing can be conditional.
     //
     wp_register_style('google-font-lato-lora', '//fonts.googleapis.com/css?family=Lato:700,900|Lora:400,700,400italic,700italic');
     wp_register_style('ci-base', get_child_or_parent_file_uri('/css/base.css'));
     wp_register_style('ci-flexslider', get_child_or_parent_file_uri('/css/flexslider.css'));
     wp_register_style('ci-mmenu', get_child_or_parent_file_uri('/css/mmenu.css'));
     wp_register_style('ci-ilightbox', get_child_or_parent_file_uri('/css/ilightbox.css'));
     wp_register_style('ci-style', get_stylesheet_uri(), array(), CI_THEME_VERSION, 'screen');
     wp_register_style('ci-color-scheme', get_child_or_parent_file_uri('/colors/' . ci_setting('stylesheet')));
 }
开发者ID:nickolasnikolic,项目名称:wordpress-heroku-php,代码行数:14,代码来源:styles.php


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