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

PHP yiw_get_option函数代码示例

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

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



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

示例1: woocommerce_output_related_products

 function woocommerce_output_related_products()
 {
     echo '<div id="related-products">';
     echo '<h3>', apply_filters('yiw_related_products_text', __('Related Products', 'yiw')), '</h3>';
     $cols = $prod = yiw_layout_page() == 'sidebar-no' ? 5 : 4;
     if (yiw_get_option('shop_show_related_single_product')) {
         $prod = yiw_get_option('shop_number_related_single_product');
         $cols = yiw_get_option('shop_columns_related_single_product');
     }
     woocommerce_related_products(apply_filters('related_products_posts_per_page', $prod), apply_filters('related_products_columns', $cols));
     echo '</div>';
 }
开发者ID:GaryJones,项目名称:goombiel,代码行数:12,代码来源:woocommerce.php


示例2: yiw_get_exclude_categories

/**
 * Retrieve the escluded categories, set on Theme Options
 * 
 * @return string String with all id categories excluded, separeted by a comma
 * 
 * @since 1.0                
 */
function yiw_get_exclude_categories()
{
    $cats = yiw_get_option('blog_cats_exclude_1');
    $cats = str_replace(" ", "", $cats);
    // tolgo gli spazi che l'utente inserisce
    $cats = explode(",", $cats);
    // divido le categorie tramite le virgole inserite
    $temp = array();
    foreach ($cats as $cat) {
        $temp[] = $cat;
        // metto tutte le categorie in un array temporaneo
    }
    // genero una nuova stringa con l'esclusione delle categorie passate in parametro, aggiugendo un meno davanti ad ogni numero (-1,-4,-7,ecc...)
    $i = 0;
    $query = '';
    foreach ($temp as $c) {
        if ($i != 0) {
            $query .= ',';
        }
        // aggiunge la virgola, soltanto se non � il primo elemento processato
        $query .= "-{$c}";
        $i++;
    }
    return $query;
}
开发者ID:GaryJones,项目名称:goombiel,代码行数:32,代码来源:functions-core.php


示例3: yiw_get_color

function yiw_get_color($name, $echo = TRUE, $default = FALSE)
{
    global $yiw_colors, $color_theme;
    $color = '';
    // retrieve the default colors
    $default_color = array();
    foreach ($yiw_colors as $section => $the_) {
        foreach ($the_['options'] as $id => $args) {
            $default_color[$id] = $args['default'];
        }
    }
    $color = '';
    if (yiw_get_option('colors_' . $name, '') != '') {
        $color = yiw_get_option('colors_' . $name);
    } else {
        $default = TRUE;
    }
    if ($default && isset($default_color[$name])) {
        $color = $default_color[$name];
    }
    if ($echo) {
        echo $color;
    }
    return $color;
}
开发者ID:GaryJones,项目名称:goombiel,代码行数:25,代码来源:functions-colors.php


示例4: yiw_get_configuration

function yiw_get_configuration($settings)
{
    $fields = array();
    foreach ($settings as $setting => $val) {
        $var = yiw_get_option("slider_flash_{$setting}");
        $var = str_replace('#', '0x', $var);
        if ($var) {
            $fields[] = "{$setting}=\"{$var}\"";
        } else {
            $fields[] = "{$setting}=\"{$val}\"";
        }
    }
    return $fields;
}
开发者ID:GaryJones,项目名称:goombiel,代码行数:14,代码来源:piecemaker.php


示例5: yiw_show_right_sliders_settings

 function yiw_show_right_sliders_settings()
 {
     global $yiw_options;
     if (!isset($yiw_options['sliders'])) {
         return;
     }
     $slider = yiw_get_option('slider_choosen', 'sheeva');
     if ($slider == 'none' || $slider == 'fixed-image' || $slider == 'layers' || $slider == 'minilayers' || $slider == 'carousel') {
         unset($yiw_options['sliders']['slides']);
     }
     foreach ($yiw_options['sliders'] as $section => $options) {
         if (preg_match('/settings-(.*)/', $section) && $section != 'settings-' . $slider) {
             unset($yiw_options['sliders'][$section]);
         }
     }
 }
开发者ID:GaryJones,项目名称:goombiel,代码行数:16,代码来源:sliders-options.php


示例6:

        ?>

                       <li><a href="<?php 
        echo $my_account_url;
        ?>
"><?php 
        echo $label;
        ?>
</a></li>
                        <?php 
    }
}
if (!$yiw_is_woocommerce and !yiw_get_option('topbar_login') and !yiw_get_option('topbar_register')) {
    echo ' | ';
}
if (!$yiw_is_woocommerce && !yiw_get_option('topbar_register')) {
    echo '<li>';
    wp_register('', '');
    echo '</li>';
}
?>

                    </ul>
                </div>
				<?php 
if ($show_ribbon) {
    ?>

                <div id="cart">
					<?php 
    yiw_minicart();
开发者ID:GaryJones,项目名称:goombiel,代码行数:31,代码来源:topbar.php


示例7: yiw_breadcrumb

                <?php 
}
?>

            
    
                <!-- START CONTENT -->
                <div id="content" class="group">
                    <?php 
if (yiw_get_option('show_breadcrumb_single_blog')) {
    yiw_breadcrumb();
}
?>

                    <?php 
$blog_type = yiw_get_option('blog_type');
?>

                    
                    <?php 
switch ($post_type) {
    case TYPE_GALLERY:
        get_template_part('loop', 'internal');
        break;
    default:
        get_template_part('loop', 'index');
}
?>

    
                </div>                       
开发者ID:GaryJones,项目名称:goombiel,代码行数:31,代码来源:single.php


示例8: the_title

        ?>

                        </div>

                        <?php 
    }
    ?>
  

                        <div class="work-description">
                            <h3><?php 
    the_title();
    ?>
</h3>
                            <?php 
    $read_more_button = yiw_get_option('portfolio_show_view_project') ? $yiw_portfolio[$post_type]['read_more'] : '';
    ?>

                            <?php 
    echo yiw_content('content', 25, $read_more_button);
    ?>

                        </div>
                        <div class="clear"></div>
                    </div>                         
                    <?php 
}
?>
        

                </div>                          
开发者ID:GaryJones,项目名称:goombiel,代码行数:31,代码来源:portfolio-big_image.php


示例9: the_title

        ?>

                                </div>
                                
                                <?php 
        if ($video) {
            ?>
<h2><?php 
            the_title();
            ?>
</h2><?php 
        }
        ?>

                                <?php 
        the_content(__(yiw_get_option('blog_read_more_text')));
        ?>

                            </div>
                            
                        <div class="post_ group">
                            <?php 
        wp_link_pages();
        ?>

    
                            <?php 
        if (is_single()) {
            edit_post_link(__('Edit', 'yiw'), '<span class="edit-link">', '</span>');
        }
        ?>
开发者ID:GaryJones,项目名称:goombiel,代码行数:31,代码来源:loop-portfolio.php


示例10: wp_get_archives

    wp_get_archives('type=monthly&show_post_count=1');
    ?>

                </ul>
            </div>
            
            <div class="widget">
                <h3><?php 
    _e('Categories');
    ?>
</h3>
                <ul>
                    <?php 
    $cat_params = array('hide_empty' => FALSE, 'title_li' => '');
    if (strlen(trim(yiw_get_option('blog_cats_exclude_2'))) > 0) {
        $cat_params['exclude'] = trim(yiw_get_option('blog_cats_exclude_2'));
    }
    wp_list_categories($cat_params);
    ?>

                </ul>
            </div>
            
            <div class="widget">
                <h3><?php 
    _e('Blogroll');
    ?>
</h3>
                <ul>
                    <?php 
    wp_list_bookmarks('title_li=&categorize=0');
开发者ID:GaryJones,项目名称:goombiel,代码行数:31,代码来源:sidebar-default.php


示例11: yiw_get_option

<?php

/**
 * @package WordPress
 * @since 1.0
 */
$layout_type = yiw_get_option('portfolio_layout_page', 'sidebar-right');
get_header();
?>
           
        <div id="primary" class="layout-<?php 
echo $layout_type;
?>
">   
		    <div class="inner group">
                <?php 
if (get_post_meta(get_the_ID(), '_slogan_page', true)) {
    ?>
                <div id="slogan">
                    <h2><?php 
    echo get_post_meta(get_the_ID(), '_slogan_page', true);
    ?>
</h2>
                    <h3><?php 
    echo get_post_meta(get_the_ID(), '_subslogan_page', true);
    ?>
</h3>
                </div>
                <?php 
}
?>
开发者ID:GaryJones,项目名称:goombiel,代码行数:31,代码来源:single-portfolio.php


示例12: yiw_layout_page

<div id="footer" class="<?php 
if ($layout_page_type) {
    echo $layout_page_type;
} else {
    echo yiw_layout_page();
}
?>
">
    <?php 
for ($i = 1; $i <= yiw_get_option('footer_rows', 1); $i++) {
    ?>

    <div class="group inner footer_row_<?php 
    echo $i;
    ?>
 footer_cols_<?php 
    echo yiw_get_option('footer_columns', 1);
    ?>
">            
                <?php 
    dynamic_sidebar("Footer Row {$i}");
    ?>

    </div>
    <?php 
}
?>
         
</div>
开发者ID:GaryJones,项目名称:goombiel,代码行数:29,代码来源:footer-big.php


示例13: array

        $args = array('post_type' => $post_type, sanitize_title($yiw_portfolio[$post_type]['tax']) => $cat_slug, 'paged' => $paged, 'posts_per_page' => -1);
        //wp_reset_query();
        $portfolio_items = new WP_Query($args);
        echo "<h3>{$cat_name}</h3>\n";
        echo '<div class="portfolio-slider">';
        echo '<ul>' . "\n";
        while ($portfolio_items->have_posts()) {
            $portfolio_items->the_post();
            if ($thumb = get_post_meta(get_the_ID(), '_portfolio_video', true)) {
                $class = 'video';
            } else {
                $thumb = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full');
                $thumb = $thumb[0];
                $class = 'img';
            }
            $click_event = yiw_get_option('portfolio_thumbnail_click', 'lightbox');
            ?>
                                                   

                <li class="post-<?php 
            echo get_the_ID();
            ?>
">
                    <?php 
            if (has_post_thumbnail()) {
                ?>

                        <?php 
                if ($click_event == 'lightbox') {
                    ?>
开发者ID:GaryJones,项目名称:goombiel,代码行数:30,代码来源:portfolio-slider.php


示例14: yiw_slide_the

    ?>

                    <li class="group">
                        <div class="slider-featured group">
                        <?php 
    yiw_slide_the('featured-content', array('container' => false, 'video_width' => 439, 'video_height' => 245));
    ?>
 
                        </div>
                        
                        <?php 
    if (yiw_slide_get('content')) {
        ?>

                        <div class="slider-caption caption-<?php 
        echo yiw_get_option('slider_elegant_caption_position');
        ?>
">
                                <h2><?php 
        yiw_slide_the('title');
        ?>
</h2>
                                <h4><?php 
        yiw_slide_the('subtitle');
        ?>
</h4>
                                <?php 
        yiw_slide_the('content');
        ?>

                        </div>
开发者ID:GaryJones,项目名称:goombiel,代码行数:31,代码来源:slider-elegant.php


示例15: yiw_get_icon

/**
 * Retrive the icon from the database and return it in a <i> tag.
 * 
 * @param $icon_name
 * @param $return_tag
 * @return string
 */
function yiw_get_icon($icon_name, $default = false, $return_tag = false)
{
    $icon = maybe_unserialize(yiw_get_option($icon_name, $default));
    if (!$return_tag) {
        return $icon['icon'];
    }
    if (!empty($icon['custom'])) {
        return '<img src="' . $icon['custom'] . '" alt="' . $icon['icon'] . '" />';
    } else {
        return '<i class="' . $icon['icon'] . '"></i>';
    }
}
开发者ID:GaryJones,项目名称:goombiel,代码行数:19,代码来源:functions-template.php


示例16: widget

    function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', $instance['title']);
        echo $before_widget;
        echo $before_title . $title . $after_title;
        echo '<div class="list-tweets' . '-' . $this->number . '">';
        $access_token = isset($instance['access_token']) && $instance['access_token'] != '' ? $instance['access_token'] : yiw_get_option('twitter_access_token');
        $access_token_secret = isset($instance['access_token_secret']) && $instance['access_token_secret'] != '' ? $instance['access_token_secret'] : yiw_get_option('twitter_access_token_secret');
        $consumer_key = isset($instance['consumer_key']) && $instance['consumer_key'] != '' ? $instance['consumer_key'] : yiw_get_option('twitter_consumer_key');
        $consumer_secret = isset($instance['consumer_secret']) && $instance['consumer_secret'] != '' ? $instance['consumer_secret'] : yiw_get_option('twitter_consumer_secret');
        $twitter_data = yit_get_tweets($access_token, $access_token_secret, $consumer_key, $consumer_secret, $instance['limit']);
        if (!isset($twitter_data->errors)) {
            echo '<ul class="last-tweets">';
            $i = 1;
            foreach ($twitter_data as $tweet) {
                if (!empty($tweet)) {
                    $text = $tweet->text;
                    $text_in_tooltip = str_replace('"', '', $text);
                    // replace " to avoid conflicts with title="" opening tags
                    $id = $tweet->id;
                    $time = strftime('%d/%m/%Y %H:%M:%S', strtotime($tweet->created_at));
                    $username = $tweet->user->name;
                }
                echo '<li class="tweet_' . $i . '"><p><span class="text">' . $text . '</span><br />';
                if ($instance['time']) {
                    echo '<span class="meta">' . $time . '</span>';
                }
                echo '</p></li>';
                ?>

                <script type="text/javascript">
                    jQuery(function($){
                        var test = twttr.txt.autoLink("<?php 
                echo addslashes(str_replace("\n", " ", $text));
                ?>
");
                        $('ul.last-tweets li.tweet_<?php 
                echo $i;
                ?>
 span.text').replaceWith(test);
                    });
                </script>
                <?php 
                $i++;
            }
            echo '</ul>';
        }
        echo '</div>';
        echo $after_widget;
    }
开发者ID:GaryJones,项目名称:goombiel,代码行数:51,代码来源:last_tweets.php


示例17: wp_reset_query

//if ( !yiw_can_show_slider() )
//    return;
global $post, $wp_query, $woocommerce;
wp_reset_query();
$responsive = array('unoslider', 'elastic', 'layers', 'minilayers');
ob_start();
$post_id = yiw_post_id();
if ($slider = get_post_meta($post_id, 'slider_type', true)) {
    if (is_string($slider) && $slider != 'none' && !empty($slider)) {
        get_template_part('slider', $slider);
    }
} elseif (is_home() || is_front_page() || is_page_template('home.php')) {
    if (($slider = yiw_get_option('slider_type', 'none')) && $slider != 'none' && !empty($slider)) {
        get_template_part('slider', $slider);
    }
} else {
    return;
}
$slider_html = ob_get_clean();
if ($slider != 'none' && !in_array($slider, $responsive) && yiw_get_option('slider_responsive') == 'fixed-image' && $slider != 'fixed-image') {
    ?>
   
        <div class="slider-mobile">
           <?php 
    get_template_part('slider', 'fixed-image');
    ?>
    
        </div>   
    <?php 
}
echo $slider_html;
开发者ID:GaryJones,项目名称:goombiel,代码行数:31,代码来源:slider.php


示例18: yiw_admin


//.........这里部分代码省略.........

                
                    <div <?php 
                    echo $id_container;
                    ?>
class="rm_option rm_input rm_text<?php 
                    echo $class_dep;
                    ?>
">
                        <label for="<?php 
                    yiw_option_id($value['id']);
                    ?>
"><?php 
                    _e($value['name'], 'yiw');
                    ?>
</label>
                        <input name="<?php 
                    yiw_option_name($value['id']);
                    ?>
" 
							   id="<?php 
                    yiw_option_id($value['id']);
                    ?>
" 
							   type="<?php 
                    echo $value['type'];
                    ?>
" 
							   <?php 
                    if (!isset($value['show_value']) or $value['show_value']) {
                        ?>

							   value="<?php 
                        echo str_replace('"', "'", stripslashes_deep(yiw_get_option($value['id'], $value['std'])));
                        ?>
"
							   <?php 
                    }
                    ?>

							   <?php 
                    if (isset($value['button'])) {
                        ?>
style="width:240px;" <?php 
                    }
                    ?>
/>
                        
						<?php 
                    if (isset($value['button'])) {
                        ?>

						<input type="submit" value="<?php 
                        echo $value['button'];
                        ?>
" class="button" name="button_save" id="<?php 
                        yiw_option_id($value['id']);
                        ?>
_save">
						<?php 
                    }
                    ?>

                        
						<?php 
                    if (isset($value['action'])) {
开发者ID:GaryJones,项目名称:goombiel,代码行数:67,代码来源:panel.php


示例19: the_post_thumbnail

    ?>
">
        
            <div class="internal_page_item internal_page_item_gallery">
                <?php 
    the_post_thumbnail('thumb_gallery', array('class' => 'picture'));
    ?>
                <div class="overlay">                            
                    <h5><a href="<?php 
    the_permalink();
    ?>
"><?php 
    the_title();
    ?>
</a></h5>
                    <?php 
    echo yiw_excerpt(12);
    ?>
                    <div class="controls">
                        <a class="icon-zoom" href="<?php 
    echo $image[0];
    ?>
" rel="prettyPhoto" title="<?php 
    the_title();
    ?>
">Zoom</a>
                        <?php 
    if (yiw_get_option('portfolio_details_icon')) {
        ?>
    					<a class="icon-more" href="<?php 
        the_permalink();
开发者ID:GaryJones,项目名称:goombiel,代码行数:31,代码来源:portfolio-filterable.php


示例20: do_action

 class="shadow"<?php 
}
?>
>
				
		<?php 
/** 
 * woocommerce_before_subcategory_title hook
 *
 * @hooked woocommerce_subcategory_thumbnail - 10
 */
do_action('woocommerce_before_subcategory_title', $category);
?>
		
		<h3 class="<?php 
echo yiw_get_option('shop_title_position_categories_page');
?>
">
			<?php 
echo $category->name;
?>
 
			<?php 
if ($category->count > 0) {
    ?>
				<mark class="count">(<?php 
    echo $category->count;
    ?>
)</mark>
			<?php 
}
开发者ID:GaryJones,项目名称:goombiel,代码行数:31,代码来源:content-product_cat.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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