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


PHP ct_get_option函数代码示例

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


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

示例1: handle

 /**
  * Handles shortcode
  * @param $atts
  * @param null $content
  * @return string
  */
 public function handle($atts, $content = null)
 {
     extract(shortcode_atts($this->extractShortcodeAttributes($atts), $atts));
     $preLink = $link ? '<a href="' . $link . '">' : '';
     $postLink = $link ? '</a>' : '';
     $title = $title ? do_shortcode('[header level="4" style="' . $title_style . '"]' . $title . '[/header]') : '';
     $subtitle = $subtitle ? do_shortcode('[header level="5" style="' . $subtitle_style . '"]' . $subtitle . '[/header]') : '';
     $line = $title_line ? do_shortcode('[line style="none"]') : '';
     if (ct_get_option('products_currency_position', 'before_price') == 'before_price' || ct_get_option('products_currency_position', 'before_price') == '') {
         $priceHtml = '<span class="price"><em>' . $currency . '</em>' . $price . '<span>' . $subprice . '</span></span>';
     } else {
         $priceHtml = '<span class="price">' . $price . '<span>' . $subprice . '</span><em>' . $currency . '</em></span>';
     }
     if ($type == '2') {
         $imageShortcode = $imgsrc ? '<div class="frameImg type2">[rounded_img  size="260" src ="' . $imgsrc . '"][/rounded_img]</div>' : '';
     } else {
         $imageShortcode = $imgsrc ? '[rounded_img  size="320" src ="' . $imgsrc . '"][/rounded_img]' : '';
     }
     $content = '[paragraph]' . $content . '[/paragraph]';
     $mainContainerAtts = array('class' => array($class));
     $mainContainerAtts = array();
     $item = '
                 <li ' . $this->buildContainerAttributes($mainContainerAtts, $atts) . '>
                     ' . $preLink . '
                     <div class="descArea">
                        ' . $title . $line . $subtitle . $content . $priceHtml . '
                     </div>
                     ' . $imageShortcode . $postLink . '
                 </li>
             ';
     return do_shortcode($item);
 }
开发者ID:clevervaughn,项目名称:dottiesbiscuitbarn,代码行数:38,代码来源:ctCircleSliderItemShortcode.class.php

示例2: render

 /**
  * Field Render Function.
  *
  * Takes the vars and outputs the HTML for the field in the settings
  *
  * @since NHP_Options 1.0
  */
 function render()
 {
     $class = isset($this->field['class']) ? $this->field['class'] : 'regular-text';
     echo '<input type="hidden" id="' . $this->field['id'] . '" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . ']" value="' . $this->value . '" class="' . $class . '" />';
     //add dimensions - either with style or hidden
     //if($this->value != ''){
     echo '<img class="nhp-opts-screenshot" id="nhp-to-upload nhp-opts-screenshot-' . $this->field['id'] . '" src="' . $this->value . '" />';
     //}
     if ($this->value == '') {
         $remove = ' style="display:none;"';
         $upload = '';
     } else {
         $remove = '';
         $upload = ' style="display:none;"';
     }
     echo ' <a href="javascript:void(0);" class="nhp-to-upload nhp-opts-upload button-secondary"' . $upload . ' rel-id="' . $this->field['id'] . '">' . __('Browse', 'nhp-opts') . '</a>';
     if (isset($this->field['show_dimensions']) && $this->field['show_dimensions']) {
         $style = $this->value != '' ? '' : ' style="display:none"';
         echo '<br/><label' . $style . ' class="dimensions nhp-uploaded">' . __("Width:", 'ct_theme') . ' <input type="text" id="' . $this->field['id'] . '_width" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '_width]" value="' . ct_get_option($this->field['id'] . '_width') . '" class="short ' . $class . '" /></label>';
         echo ' <label' . $style . ' class="dimensions nhp-uploaded">' . __("Height:", 'ct_theme') . ' <input type="text" id="' . $this->field['id'] . '_height" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '_height]" value="' . ct_get_option($this->field['id'] . '_height') . '" class="short ' . $class . '" /></label>';
     } else {
         echo '<input type="hidden" id="' . $this->field['id'] . '_width" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '_width]" value="' . ct_get_option($this->field['id'] . '_width') . '" class="' . $class . '" />';
         echo '<input type="hidden" id="' . $this->field['id'] . '_height" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '_height]" value="' . ct_get_option($this->field['id'] . '_height') . '" class="' . $class . '" />';
     }
     echo ' <a href="javascript:void(0);" class="nhp-opts-upload-remove nhp-uploaded"' . $remove . ' rel-id="' . $this->field['id'] . '">' . __('Remove Upload', 'nhp-opts') . '</a>';
     echo isset($this->field['desc']) && !empty($this->field['desc']) ? '<br/><br/><span class="description">' . $this->field['desc'] . '</span>' : '';
 }
开发者ID:clevervaughn,项目名称:dottiesbiscuitbarn,代码行数:34,代码来源:field_upload.php

示例3: ct_use_blog_post_sidebar

function ct_use_blog_post_sidebar()
{
    if (ct_get_option('posts_single_sidebar', 1) == 0) {
        return false;
    }
    return true;
}
开发者ID:clevervaughn,项目名称:dottiesbiscuitbarn,代码行数:7,代码来源:config.php

示例4: __construct

 /**
  * Creates object
  * @param string $theme
  * @param string $metadataUrl
  * @param bool $enableAutomaticChecking
  */
 public function __construct($theme, $metadataUrl = null, $enableAutomaticChecking = true)
 {
     $metadataUrl = $metadataUrl ? $metadataUrl : 'http://update.themeforest.createit.pl';
     parent::__construct($theme, $metadataUrl, $enableAutomaticChecking);
     $this->addQueryArgFilter(array($this, 'filterQuery'));
     $this->license = ct_get_option(self::LICENSE_KEY);
     add_filter('update_theme_complete_actions', array($this, 'themeUpdate'));
 }
开发者ID:clevervaughn,项目名称:dottiesbiscuitbarn,代码行数:14,代码来源:ctThemeUpdater.class.php

示例5: getPermalinkSlug

 /**
  * Returns permalink slug
  * @return string
  */
 protected function getPermalinkSlug()
 {
     // Rewriting Permalink Slug
     $permalink_slug = ct_get_option('event', 'event');
     if (empty($permalink_slug)) {
         $permalink_slug = 'event';
     }
     return $permalink_slug;
 }
开发者ID:clevervaughn,项目名称:dottiesbiscuitbarn,代码行数:13,代码来源:event.php

示例6: render

 /**
  * Field Render Function.
  *
  * Takes the vars and outputs the HTML for the field in the settings
  *
  * @since NHP_Options 1.0
  */
 function render()
 {
     $size = isset($this->field['size']) ? $this->field['size'] : 120;
     $align = isset($this->field['align']) ? $this->field['align'] : 'center';
     $class = isset($this->field['class']) ? ' ' . $this->field['class'] : '';
     $content = isset($this->field['option']) ? ct_get_option($this->field['option']) : '';
     $content = strtr(isset($this->field['option_template']) ? $this->field['option_template'] : '%option%', array('%option%' => $content));
     if ($content == '' && isset($this->field['desc'])) {
         $content = $this->field['desc'];
     }
     $imgUrl = 'https://chart.googleapis.com/chart?chs=' . $size . 'x' . $size . '&cht=qr&chld=H|1&chl=' . urlencode($content);
     echo '</td></tr></table><div class="nhp-opts-info-field' . $class . '"' . ($align ? 'style="text-align:' . $align . '"' : '') . '>' . '<img src="' . $imgUrl . '" alt="qrcode">' . '</div><table class="form-table no-border"><tbody><tr><th></th><td>';
 }
开发者ID:clevervaughn,项目名称:dottiesbiscuitbarn,代码行数:20,代码来源:field_qrcode.php

示例7: theme_comments

function theme_comments($comment, $args, $depth)
{
    $GLOBALS['comment'] = $comment;
    ?>

<li>
	<div class="oneComment" id="comment-<?php 
    comment_ID();
    ?>
">
		<div class="media">
                <span class="pull-left roundedImg">
	                <?php 
    echo get_avatar($comment, $size = '55', $default = 'mystery');
    ?>
                </span>

			<div class="media-body">
				<?php 
    echo get_comment_author_link();
    ?>
<br>
				<?php 
    echo get_comment_date();
    if (get_comment_time()) {
        ?>
 <?php 
        _e('at', 'ct_theme');
        ?>
 <?php 
        echo get_comment_time();
    }
    ?>
				<?php 
    if (ct_get_option("posts_single_show_comment_form", 1)) {
        ?>
					<div class="pull-right"><?php 
        comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth'])));
        ?>
</div><?php 
    }
    ?>
			</div>
			<?php 
    comment_text();
    ?>
		</div>

	</div>
	<?php 
}
开发者ID:clevervaughn,项目名称:dottiesbiscuitbarn,代码行数:51,代码来源:comments.php

示例8: handle

    /**
     * Handles shortcode
     * @param $atts
     * @param null $content
     * @return string
     */
    public function handle($atts, $content = null)
    {
        extract(shortcode_atts($this->extractShortcodeAttributes($atts), $atts));
        $mainContainerAtts = array('class' => array('priceHeader', $class));
        $html = '
		<div ' . $this->buildContainerAttributes($mainContainerAtts, $atts) . '">
                    <span class="lft">' . $left_header . '</span>
                    <span class="price">
                      <span class="el_1">' . $above_price_text . '</span>
                      ' . (ct_get_option('products_currency_position', 'before_price') == 'before_price' || ct_get_option('products_currency_position', 'before_price') == '' ? '<span class="el_2">' . $currency . '</span>' : '<span class="el_3">' . $price . '</span> <span class="el_4">' . $sub_price . '</span>') . '
                      ' . (ct_get_option('products_currency_position', 'before_price') == 'before_price' || ct_get_option('products_currency_position', 'before_price') == '' ? '<span class="el_3">' . $price . '</span> <span class="el_4">' . $sub_price . '</span>' : '<span class="el_2">' . $currency . '</span>') . '

                    </span>
                    <span class="rt">' . $right_header . '</span>
        </div>';
        return do_shortcode($html);
    }
开发者ID:clevervaughn,项目名称:dottiesbiscuitbarn,代码行数:23,代码来源:ctPriceTag.class.php

示例9: handleGoogleAnalytics

    /**
     * Adds Google Analytics
     */
    function handleGoogleAnalytics()
    {
        if ($num = ct_get_option('code_google_analytics_account')) {
            echo '<script type="text/javascript">';
            echo <<<EOF
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', '{$num}']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
EOF;
            echo '</script>';
        }
    }
开发者ID:clevervaughn,项目名称:dottiesbiscuitbarn,代码行数:21,代码来源:ctFrontendOptionsHandler.class.php

示例10: get_template_part

<?php

get_template_part('templates/header');
$faqData = get_post() && ct_get_option('faq_index_page') == get_the_ID() ? 'data-spy="scroll" data-target="#faq1" data-offset="5"' : '';
?>
<body <?php 
body_class((ct_get_option('general_show_preloader', 0) ? 'preloader ' : '') . (function_exists('icl_object_id') ? ICL_LANGUAGE_CODE . ' ' : '') . (ct_add_menu_shadow() ? 'menuShadow ' : ''));
?>
 <?php 
echo $faqData;
?>
>
<div id="ct_preloader"></div>
<?php 
get_template_part('templates/head-top-navbar');
?>

<div class="container">
	<?php 
include roots_template_path();
?>
</div>

<?php 
get_template_part('templates/footer');
?>

<!--footer-->
<?php 
wp_footer();
?>
开发者ID:clevervaughn,项目名称:dottiesbiscuitbarn,代码行数:31,代码来源:base.php

示例11:

<!--container!--></div>
<div class="bg-2 section" id="blogBgImage">
    <div class="inner"
         data-scroll="scroll"
         data-topspace="75">
        <div class="container">
            <?php 
if (ct_get_option("posts_index_show_p_title", 1)) {
    ?>
                <h3 class="hdr1"><?php 
    echo __('Posts in', 'ct_theme') . ' ' . single_cat_title('', false);
    ?>
</h3>
            <?php 
}
?>
            <div class="divider-triangle"></div>
            <div id="pageWithSidebar" class="">

                <div class="blog-list">
                    <div class="row">
                        <div class="col-md-8 blog-main">
                            <?php 
get_template_part('templates/content');
?>
                        </div>


                        <?php 
if (ct_use_blog_index_sidebar()) {
    ?>
开发者ID:clevervaughn,项目名称:dottiesbiscuitbarn,代码行数:31,代码来源:category.php

示例12: handle

    /**
     * Handles shortcode
     * @param $atts
     * @param null $content
     * @return string
     */
    public function handle($atts, $content = null)
    {
        $image = '';
        extract(shortcode_atts($this->extractShortcodeAttributes($atts), $atts));
        $args = array('name' => $slug, 'post_type' => 'event', 'post_status' => 'publish', 'numberposts' => 1);
        $my_posts = get_posts($args);
        if ($my_posts) {
            $id = $my_posts[0]->ID;
            $title = $my_posts[0]->post_title;
            $content = get_post_field('post_content', $id);
            if ($id) {
                $custom = get_post_custom($id);
                $permalink = get_permalink($id);
                $date = $custom['date'][0];
                $subtitle = $custom['subtitle'][0];
                $amap = $custom['amap'][0];
                $date = $date ? strtotime($date) : '';
                if ($date != '') {
                    $timestamp = mktime(0, 0, 0, date('m', $date), 1);
                    $month = __(strtoupper(strftime('%b', $timestamp)), 'ct_theme');
                    $day = date('d', $date);
                } else {
                    $month = '';
                    $day = '';
                }
            }
            wp_reset_postdata();
            /*is amap iframe?*/
            preg_match('/src="([^"]+)"/', $amap, $match);
            if ($match == null) {
                $amap .= '&output=embed?iframe=true&width=640&height=480';
            } else {
                $amap = $match[1] . '?iframe=true&width=640&height=480';
            }
            $image = ct_get_option('event_show_featured_image', 0) && ct_get_feature_image_src($id, 'large') ? '<span class="date featureImg"><a target="_blank" data-rel="prettyPhoto" href="' . ct_get_feature_image_src($id, 'large') . '" ><img src="' . ct_get_feature_image_src($id, 'thumb_square') . '" alt=""></a></span>' : '';
            $type2 = $style == '2' ? 'type2' : '';
            $mainContainerAtts = array('class' => array('eventBox', $type2, $class));
            $html = '

        <div ' . $this->buildContainerAttributes($mainContainerAtts, $atts) . '>
        <span class="date">' . $month . '<span>' . $day . '</span></span>

        <h4 class="hdr2">' . $title . '

          <span class="place">' . $content . '</span>
          <span class="time">' . $subtitle . '</span>
        </h4>
        <hr>



        <div class="clearfix"></div>
        <!-- go to http://amap.to/ and create your own map -->
        ' . $image . '<a href="' . htmlentities($amap) . '" data-rel="prettyPhoto" class="mapit"><i></i>' . __('Map it', 'ct_theme') . '</a>
        <a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=' . $permalink . '" class="shareit"><i></i>' . __('Share it', 'ct_theme') . '</a>

      </div>
		';
            return do_shortcode($html);
        } else {
            return '';
        }
    }
开发者ID:clevervaughn,项目名称:dottiesbiscuitbarn,代码行数:69,代码来源:ctEventBoxShortcode.class.php

示例13: ct_get_blog_item_title

 function ct_get_blog_item_title()
 {
     $postTitle = get_the_title();
     $custom = get_post_custom(get_the_ID());
     if (!isset($custom['show_title']) || $custom['show_title'][0] == 'global') {
         if (ct_get_option("posts_single_show_title", 1)) {
             return $postTitle;
         } else {
             return '';
         }
     }
     if ($custom['show_title'][0] == 'yes') {
         return $postTitle;
     } else {
         if ($custom['show_title'][0] == 'no') {
             return '';
         }
     }
     return '';
 }
开发者ID:clevervaughn,项目名称:dottiesbiscuitbarn,代码行数:20,代码来源:theme_functions.php

示例14: wp_nav_menu

?>


			</div>

			<!-- Collect the nav links, forms, and other content for toggling -->
			<div class="collapse navbar-collapse navbar-ex1-collapse">
				<?php 
if (ct_get_option('navbar_type') == 'standard') {
    if (ct_is_location_contains_menu('nav_standard')) {
        wp_nav_menu(array('items_wrap' => '<ul data-type="margin-top" data-pos="' . ct_get_option('navbar_margin_top', 135) . '" id="%1$s" class="%2$s">%3$s</ul>', 'theme_location' => 'nav_standard', 'menu_class' => 'nav navbar-nav text-center', 'menu_id' => 'menu_' . ct_get_option('navbar_standard_menu')));
    }
}
if (ct_get_option('navbar_type') == 'sticky') {
    if (ct_is_location_contains_menu('nav_sticky_left')) {
        wp_nav_menu(array('items_wrap' => '<ul data-type="margin-top" data-pos="' . ct_get_option('navbar_margin_top', 145) . '" id="%1$s" class="%2$s">%3$s</ul>', 'theme_location' => 'nav_sticky_left', 'menu_class' => 'nav navbar-nav pull-left', 'menu_id' => 'menu_2'));
    }
    if (ct_is_location_contains_menu('nav_sticky_right')) {
        wp_nav_menu(array('items_wrap' => '<ul data-type="margin-top" data-pos="' . ct_get_option('navbar_margin_top', 145) . '" id="%1$s" class="%2$s">%3$s</ul>', 'theme_location' => 'nav_sticky_right', 'menu_class' => 'nav navbar-nav pull-right', 'menu_id' => 'menu_3'));
    }
}
?>
			</div>
			<!-- /.navbar-collapse -->
		</div>
		<!-- / container -->

		<div class="btm"></div>
	</div>

</nav>
开发者ID:clevervaughn,项目名称:dottiesbiscuitbarn,代码行数:31,代码来源:head-top-navbar.php

示例15: productMeta

    /**
     * Draw s product meta
     */
    public function productMeta()
    {
        global $post;
        $custom = get_post_custom($post->ID);
        $price = isset($custom["price"][0]) ? $custom["price"][0] : "";
        $currency = isset($custom["currency"][0]) ? $custom["currency"][0] : ct_get_option('products_index_currency', '$');
        $postscript = isset($custom["postscript"][0]) ? $custom["postscript"][0] : "";
        ?>
        <p>
            <label for="price"><?php 
        _e('Price', 'ct_theme');
        ?>
: </label>
            <input id="price" class="regular-text" name="price" value="<?php 
        echo $price;
        ?>
"/>
        <p class="howto"><?php 
        _e("Product price", 'ct_theme');
        ?>
</p>

        <p>
            <label for="currency"><?php 
        _e('Currency', 'ct_theme');
        ?>
: </label>
            <input id="currency" class="regular-text" name="currency" value="<?php 
        echo $currency;
        ?>
"/>
        <p class="howto"><?php 
        _e("Product currency. Default value can be changed in Appearance - Theme Options - Products tab", 'ct_theme');
        ?>
</p>

        <p>
            <label for="postscript"><?php 
        _e('Postscript', 'ct_theme');
        ?>
: </label>
            <input id="postscript" class="regular-text" name="postscript" value="<?php 
        echo $postscript;
        ?>
"/>
        <p class="howto"><?php 
        _e("Smaller text below product description", 'ct_theme');
        ?>
</p>


    <?php 
    }
开发者ID:clevervaughn,项目名称:dottiesbiscuitbarn,代码行数:56,代码来源:product.php


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