本文整理汇总了PHP中yiw_get_option函数的典型用法代码示例。如果您正苦于以下问题:PHP yiw_get_option函数的具体用法?PHP yiw_get_option怎么用?PHP yiw_get_option使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了yiw_get_option函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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>';
}
示例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;
}
示例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;
}
示例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;
}
示例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]);
}
}
}
示例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();
示例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>
示例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>
示例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>');
}
?>
示例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');
示例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
}
?>
示例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>
示例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') {
?>
示例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>
示例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>';
}
}