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

PHP theme_get_option函数代码示例

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

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



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

示例1: widget

    function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('CWS_Widget_Video', $instance['title']);
        $head = '';
        $gen_sets = theme_get_option('general', 'gen_sets');
        $yt_color = isset($gen_sets['_yt_color']) ? stripslashes($gen_sets['_yt_color']) : '';
        $yt_theme = isset($gen_sets['_yt_theme']) ? stripslashes($gen_sets['_yt_theme']) : '';
        $vim_color = isset($gen_sets['_vim_color']) ? stripslashes($gen_sets['_vim_color']) : '';
        $vim_title = isset($gen_sets['_vim_header']) ? stripslashes($gen_sets['_vim_header']) : '';
        $video_id = isset($instance['video_id']) ? $instance['video_id'] : '';
        $v_type = isset($instance['v_type']) ? $instance['v_type'] : '';
        $v_width = isset($instance['v_width']) ? $instance['v_width'] : 260;
        $v_height = isset($instance['v_height']) ? $instance['v_height'] : 200;
        if ($v_type == 'youtube') {
            $parser_return = theme_youtube_parser($video_id, $v_width, $v_height, null, $yt_color, $yt_theme);
        }
        if ($v_type == 'vimeo') {
            $parser_return = theme_vimeo_parser($video_id, $v_width, $v_height, null, $vim_color, $vim_title);
        }
        if ($title && $title != '') {
            $head = '<h3 class="widget-title">' . $title . '</h3>';
        }
        $rand = rand(1, 200);
        $v_style = 'style="padding-bottom: ' . ceil($v_height / $v_width * 100) . '%";';
        echo $args['before_widget'];
        echo $head;
        echo '<div class="widget-content"><div class="widget_video">';
        echo '<div class="kids_video_wrapper">
						 <figure ' . $v_style . '>' . $parser_return . '</figure>
						 </div>
						<div class="kids_clear"></div>
					</div></div>' . $args['after_widget'];
    }
开发者ID:Makenrro,项目名称:repos,代码行数:34,代码来源:video.php


示例2: get_sidebar

 function get_sidebar($post_id)
 {
     if (is_page()) {
         $sidebar = $this->sidebar_names['page'];
     }
     if (is_front_page() || $post_id == theme_get_option('homepage', 'home_page')) {
         $sidebar = $this->sidebar_names['home'];
     }
     if (is_blog()) {
         $sidebar = $this->sidebar_names['blog'];
     }
     if (is_singular('post')) {
         $sidebar = $this->sidebar_names['single'];
     } elseif (is_singular('portfolio')) {
         $sidebar = $this->sidebar_names['portfolio'];
     }
     if (is_search() || is_archive()) {
         $sidebar = $this->sidebar_names['blog'];
     }
     if (!empty($post_id)) {
         $custom = get_post_meta($post_id, '_sidebar', true);
         if (!empty($custom)) {
             $sidebar = $custom;
         }
     }
     if (isset($sidebar)) {
         dynamic_sidebar($sidebar);
     }
 }
开发者ID:blocher,项目名称:oneholyname,代码行数:29,代码来源:sidebarGenerator.php


示例3: theme_shortcode_image

/**
 * size: small, medium, blog
 * icon:zoom, doc, play
 */
function theme_shortcode_image($atts, $content = null, $code)
{
    extract(shortcode_atts(array('size' => 'medium', 'link' => '#', 'icon' => false, 'lightbox' => 'false', 'title' => '', 'align' => false, 'group' => '', 'width' => false, 'height' => false, 'autoheight' => 'false', 'quality' => false), $atts));
    if (!$width || !$height) {
        $width = theme_get_option('image', $size . '_width');
        $height = theme_get_option('image', $size . '_height');
        if (!$width) {
            $width = '150';
        }
        if (!$height) {
            $height = '150';
        }
    }
    if ($autoheight == 'true') {
        $height = '';
    }
    $src = trim($content);
    $no_link = '';
    if ($lightbox == 'true') {
        if ($link == '#') {
            $link = $src;
        }
    } else {
        if ($link == '#') {
            $no_link = ' image_no_link';
        }
    }
    $content = '<img width="' . $width . '" ' . (empty($height) ? '' : 'height="' . $height . '"') . 'alt="' . $title . '" src="' . THEME_INCLUDES . '/timthumb.php?src=' . get_image_src($src) . (empty($height) ? '' : '&amp;h=' . $height) . '&amp;w=' . $width . '&amp;zc=1' . ($quality ? '&q=' . $quality : '') . '" />';
    return '[raw]<span class="image_styled' . ($align ? ' align' . $align : '') . '"><span class="image_frame" style="width:' . $width . 'px;' . (empty($height) ? '' : 'height:' . $height . 'px') . '"><a' . ($group ? ' rel="' . $group . '"' : '') . ' class="image_size_' . $size . $no_link . ($icon ? ' image_icon_' . $icon : '') . ($lightbox == 'true' ? ' lightbox' : '') . '" title="' . $title . '" href="' . $link . '">' . $content . '</a></span><img class="image_shadow" width="' . ($width + 2) . '" src="' . THEME_IMAGES . '/image_shadow.png"/></span>[/raw]';
}
开发者ID:blocher,项目名称:oneholyname,代码行数:34,代码来源:images.php


示例4: geo_mashup_locations_exclude_the_categorys

function geo_mashup_locations_exclude_the_categorys($json_object, $object)
{
    $exclude = theme_get_option('blog', 'exclude_categorys');
    foreach ($json_object['categories'] as $key => $id) {
        if (!in_array($id, $exclude)) {
            unset($json_object['categories'][$key]);
        }
    }
    return $json_object;
}
开发者ID:blocher,项目名称:oneholyname,代码行数:10,代码来源:travel.php


示例5: theme_vmenu_widget

function theme_vmenu_widget($args)
{
    // for wp < 3.0
    extract($args);
    $source = theme_get_option('theme_vmenu_source');
    echo $before_widget;
    echo $before_title . __($source, THEME_NS) . $after_title;
    echo theme_get_menu(array('source' => $source, 'depth' => theme_get_option('theme_vmenu_depth'), 'class' => 'art-vmenu'));
    echo $after_widget;
}
开发者ID:dreamteam111,项目名称:dreamteam,代码行数:10,代码来源:legacy.php


示例6: theme_add_cufon_script

 function theme_add_cufon_script()
 {
     $fonts = theme_get_option('font', 'fonts');
     if (is_array($fonts)) {
         foreach ($fonts as $font) {
             wp_register_script($font, THEME_FONT_URI . '/' . $font, array('cufon-yui'));
             wp_print_scripts($font);
         }
     }
     wp_print_scripts('cufon-yui');
 }
开发者ID:blocher,项目名称:oneholyname,代码行数:11,代码来源:head.php


示例7: theme_get_image_size

function theme_get_image_size()
{
    $customs = theme_get_option('image', 'customs');
    $sizes = array("small" => __("Small", 'striking_admin'), "medium" => __("Medium", 'striking_admin'), "large" => __("Large", 'striking_admin'));
    if (!empty($customs)) {
        $customs = explode(',', $customs);
        foreach ($customs as $custom) {
            $sizes[$custom] = ucfirst(strtolower($custom));
        }
    }
    return $sizes;
}
开发者ID:blocher,项目名称:oneholyname,代码行数:12,代码来源:shortcode.php


示例8: theme_advertisement

function theme_advertisement($atts)
{
    extract(shortcode_atts(array('code' => 1, 'align' => 'left', 'inline' => 0), $atts));
    $ad = theme_get_option('theme_ad_code_' . $code);
    if (!empty($ad)) {
        $ad = '<div class="ad align' . esc_attr($align) . '">' . $ad . '</div>';
        if (!$inline) {
            $ad .= '<div class="cleared"></div>';
        }
        return $ad;
    } else {
        return '<p class="error"><strong>[ad]</strong> ' . sprintf(__("Empty ad slot (#%s)!", THEME_NS), esc_attr($code)) . '</p>';
    }
}
开发者ID:dreamteam111,项目名称:dreamteam,代码行数:14,代码来源:shortcodes.php


示例9: get_sidebar_options

function get_sidebar_options()
{
    $sidebars = theme_get_option('sidebar', 'sidebars');
    if (!empty($sidebars)) {
        $sidebars_array = explode(',', $sidebars);
        $options = array();
        foreach ($sidebars_array as $sidebar) {
            $options[$sidebar] = $sidebar;
        }
        return $options;
    } else {
        return array();
    }
}
开发者ID:blocher,项目名称:oneholyname,代码行数:14,代码来源:page_general.php


示例10: theme_get_dynamic_sidebar_data

function theme_get_dynamic_sidebar_data($sidebar_id)
{
    global $theme_widget_args, $theme_sidebars;
    $sidebar_style = theme_get_option('theme_sidebars_style_' . $theme_sidebars[$sidebar_id]['group']);
    theme_ob_start();
    $success = dynamic_sidebar($sidebar_id);
    $content = theme_ob_get_clean();
    if (!$success) {
        return false;
    }
    extract($theme_widget_args);
    $data = explode($after_widget, $content);
    $widgets = array();
    $heading = theme_get_option('theme_' . (is_home() ? 'posts' : 'single') . '_widget_title_tag');
    for ($i = 0; $i < count($data); $i++) {
        $widget = $data[$i];
        if (theme_is_empty_html($widget)) {
            continue;
        }
        $id = null;
        $name = null;
        $class = null;
        $style = $sidebar_style;
        $title = null;
        if (preg_match('/<widget(.*?)>/', $widget, $matches)) {
            if (preg_match('/id="(.*?)"/', $matches[1], $ids)) {
                $id = $ids[1];
            }
            if (preg_match('/name="(.*?)"/', $matches[1], $names)) {
                $name = $names[1];
            }
            if (preg_match('/class="(.*?)"/', $matches[1], $classes)) {
                $class = $classes[1];
            }
            if ($name) {
                $style = theme_get_widget_style($name, $style);
            }
            $widget = preg_replace('/<widget[^>]+>/', '', $widget);
            if (preg_match('/<title>(.*)<\\/title>/', $widget, $matches)) {
                $title = $matches[1];
                $widget = preg_replace('/<title>.*?<\\/title>/', '', $widget);
            }
        }
        $widgets[] = array('id' => $id, 'name' => $name, 'class' => $class, 'style' => $style, 'title' => $title, 'heading' => $heading, 'content' => $widget);
    }
    return array_filter($widgets, 'theme_is_displayed_widget');
}
开发者ID:Wickwood-LLC,项目名称:trlf-artisteer,代码行数:47,代码来源:sidebars.php


示例11: cws_register_sidebars

/**
 * Sidebar Generator.
 *
 * @package WordPress
 * @subpackage Happy Kids
 * @since Happy Kids 1.0
 * @version     3.2.9
 */
function cws_register_sidebars()
{
    $gen_sets = theme_get_option('general', 'gen_sets');
    $custom_sidebars = isset($gen_sets['_sidebars_list']) ? $gen_sets['_sidebars_list'] : '';
    if (function_exists('register_sidebars')) {
        register_sidebar(array('name' => 'Right Sidebar', 'id' => 'sidebar-1', 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>'));
        register_sidebar(array('name' => 'Left Sidebar', 'id' => 'sidebar-2', 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>'));
        register_sidebar(array('name' => 'Footer', 'id' => 'sidebar-3', 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>'));
        if (!empty($custom_sidebars)) {
            $sidebars_arr = explode("|", $custom_sidebars);
            $i = 3;
            foreach ($sidebars_arr as $sidebar) {
                $i++;
                if (function_exists('register_sidebar')) {
                    register_sidebar(array('name' => $sidebar, 'id' => 'sidebar-' . $i, 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>'));
                }
            }
        }
    }
}
开发者ID:emaxees,项目名称:elpandecadadia,代码行数:28,代码来源:sidebar_gen.php


示例12: multitranslate

function multitranslate($text = null, $id = null, $echo = true)
{
    $gen_sets = theme_get_option('general', 'gen_sets');
    if ($text && $id) {
        $option = isset($gen_sets[$id]) ? $gen_sets[$id] : '';
        if ($option) {
            if (!$echo) {
                return $option;
            } else {
                echo $option;
            }
        } else {
            if (!$echo) {
                return $text;
            } else {
                echo $text;
            }
        }
    }
}
开发者ID:emaxees,项目名称:elpandecadadia,代码行数:20,代码来源:multitranslate.php


示例13: theme_exclude_the_categorys

function theme_exclude_the_categorys($thelist, $separator = ' ')
{
    if (!defined('WP_ADMIN') && !isset($_GET['geo_mashup_content'])) {
        //Category IDs to exclude
        $exclude = theme_get_option('blog', 'exclude_categorys');
        $exclude2 = array();
        foreach ($exclude as $c) {
            $exclude2[] = get_cat_name($c);
        }
        $cats = explode($separator, $thelist);
        $newlist = array();
        foreach ($cats as $cat) {
            $catname = trim(strip_tags($cat));
            if (!in_array($catname, $exclude2)) {
                $newlist[] = $cat;
            }
        }
        return implode($separator, $newlist);
    } else {
        return $thelist;
    }
}
开发者ID:blocher,项目名称:oneholyname,代码行数:22,代码来源:filter.php


示例14: sitemap_portfolios

function sitemap_portfolios($atts)
{
    extract(shortcode_atts(array('show_comment' => false, 'number' => '0', 'cat' => ''), $atts));
    if ($number == 0) {
        $number = 1000;
    }
    if ($show_comment === 'true' && theme_get_option('portfolio', 'enable_comment')) {
        $show_comment = true;
    }
    $query = array('showposts' => (int) $number, 'post_type' => 'portfolio');
    if ($cat) {
        $query['taxonomy'] = 'portfolio_category';
        $query['term'] = $cat;
    }
    query_posts($query);
    $output = '';
    while (have_posts()) {
        the_post();
        $output .= '<li><a href="' . get_permalink() . '" rel="bookmark" title="' . sprintf(__("Permanent Link to %s", 'striking_front'), get_the_title()) . '">' . get_the_title() . '</a>' . ($show_comment ? ' (' . get_comments_number() . ')' : '') . '</li>';
    }
    wp_reset_query();
    return '<ul>' . $output . '</ul>';
}
开发者ID:blocher,项目名称:oneholyname,代码行数:23,代码来源:sitemap.php


示例15: get_header

/**
 * The Template for displaying product archives, including the main shop page which is a post type archive.
 *
 * Override this template by copying it to yourtheme/woocommerce/archive-product.php
 *
 * @author 		WooThemes
 * @package 	WooCommerce/Templates
 * @version     2.0.0
 */
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
get_header();
$gen_sets = theme_get_option('general', 'gen_sets');
$woo_template = isset($gen_sets['_gen_woo_template_select']) ? $gen_sets['_gen_woo_template_select'] : '';
$gen_side_r = isset($gen_sets['_sidebar_main_woo_r']) ? $gen_sets['_sidebar_main_woo_r'] : false;
$gen_side_l = isset($gen_sets['_sidebar_main_woo_l']) ? $gen_sets['_sidebar_main_woo_l'] : false;
$show_slider = isset($gen_sets['_gen_slider_select']) ? $gen_sets['_gen_slider_select'] : '';
$slogan_sidebar = isset($gen_sets['slogan-area']) ? $gen_sets['slogan-area'] : '';
$benefits_sidebar = isset($gen_sets['benefits-area']) ? $gen_sets['benefits-area'] : '';
$page_custom = theme_get_post_custom();
$page_crumbs = isset($gen_sets['_gen_breadcrumbs']) ? $gen_sets['_gen_breadcrumbs'] : 'show';
switch ($woo_template) {
    case 'sb_right':
    case 'sb_left':
        $woo_style = "single-sidebar";
        break;
    case 'sb_double':
        $woo_style = "double-sidebar";
开发者ID:Makenrro,项目名称:repos,代码行数:30,代码来源:archive-product.php


示例16: paginate_comments_links

    paginate_comments_links();
    $pagination = theme_stylize_pagination(theme_ob_get_clean());
    echo $pagination;
    ?>
        <ul id="comments-list">
            <?php 
    wp_list_comments('type=all&callback=theme_comment');
    ?>
        </ul>
<?php 
    echo $pagination;
    ?>
    </div>
<?php 
}
if (!comments_open()) {
    return;
}
/* comment form */
theme_ob_start();
$args = array();
if (theme_get_option('theme_comment_use_smilies')) {
    function theme_comment_form_field_comment($form_field)
    {
        theme_include_lib('smiley.php');
        return theme_get_smilies_js() . '<p class="smilies">' . theme_get_smilies() . '</p>' . $form_field;
    }
    add_filter('comment_form_field_comment', 'theme_comment_form_field_comment');
}
comment_form();
echo str_replace(array('id="respond"', '<h3', 'id="reply-title"', '</h3>', 'logged-in-as', 'type="submit"'), array('id="respond" class="cleantheme-commentsform"', '<h2', 'id="reply-title" class="cleantheme-postheader"', '</h2>', 'cleantheme-postcontent logged-in-as', 'class="cleantheme-button" type="submit"'), theme_ob_get_clean());
开发者ID:epiii,项目名称:Clean-Wordpress-theme,代码行数:31,代码来源:comments.php


示例17: theme_get_menu

</h2>

                <?php 
}
?>

                </div>



 <div class="art-nav">

                <div class="art-nav-outer">

            	<?php 
echo theme_get_menu(array('source' => theme_get_option('theme_menu_source'), 'depth' => theme_get_option('theme_menu_depth'), 'menu' => 'primary-menu', 'class' => 'art-hmenu'));
?>

                </div>

            </div>

            <div class="cleared reset-box"></div>



<?php 
if (is_home()) {
}
?>
开发者ID:uniquegel,项目名称:Feminnova,代码行数:30,代码来源:header.php


示例18: slideShow_anything

    function slideShow_anything()
    {
        echo <<<HTML
<div id="feature_box" class="anything">
\t<div class="inner">
\t\t<div id="anything_slider_wrap">
\t\t\t<ul id="anything_slider">
HTML;
        $images = $this->slideShow_getPosts('-1', 'full');
        $height = theme_get_option('slideshow', 'anything_height');
        foreach ($images as $image) {
            $stop = get_post_meta($image['id'], '_anything_stop', true);
            if ($stop === '1') {
                echo "\n<li class='panel stoped'>\n";
            } else {
                echo "\n<li class='panel'>\n";
            }
            switch (get_post_meta($image['id'], '_anything_type', true)) {
                case 'sidebar':
                    echo '<div class="anything_sidebar_' . get_post_meta($image['id'], '_sidebar_position', true) . '">';
                    echo '<div class="anything_sidebar_content">';
                    $page_data = get_page($image['id']);
                    $content = $page_data->post_content;
                    echo apply_filters('the_content', stripslashes($content));
                    echo '</div>';
                    echo '<div class="anything_sidebar_image">';
                    if ($image['link'] != '') {
                        echo '<a href="' . $image['link'] . '"><img src="' . THEME_INCLUDES . '/timthumb.php?src=' . get_image_src($image['src']) . '&amp;h=' . $height . '&amp;w=660&amp;zc=1" alt="" /></a>';
                    } else {
                        echo '<img src="' . THEME_INCLUDES . '/timthumb.php?src=' . get_image_src($image['src']) . '&amp;h=' . $height . '&amp;w=660&amp;zc=1" alt="" />';
                    }
                    echo '</div>';
                    echo '</div>';
                    break;
                case 'html':
                    $page_data = get_page($image['id']);
                    $content = $page_data->post_content;
                    echo apply_filters('the_content', stripslashes($content));
                    break;
                case 'image':
                default:
                    $caption_position = get_post_meta($image['id'], '_image_caption_position', true);
                    if ($caption_position != '' && $caption_position != 'disable') {
                        echo '<div class="anything_caption caption_' . $caption_position . '">';
                        echo '<h3>' . $image['title'] . '</h3>';
                        if ($image['desc']) {
                            echo '<p>' . $image['desc'] . '</p>';
                        }
                        echo '</div>';
                    }
                    if ($image['link'] != '') {
                        echo '<a href="' . $image['link'] . '"><img src="' . THEME_INCLUDES . '/timthumb.php?src=' . get_image_src($image['src']) . '&amp;h=' . $height . '&amp;w=960&amp;zc=1" alt="" /></a>';
                    } else {
                        echo '<img src="' . THEME_INCLUDES . '/timthumb.php?src=' . get_image_src($image['src']) . '&amp;h=' . $height . '&amp;w=960&amp;zc=1" alt="" />';
                    }
                    break;
            }
            echo "\n</li>\n";
        }
        echo <<<HTML
\t\t\t</ul>
\t\t</div>
\t</div>
</div>
HTML;
        $options = array('height' => theme_get_option('slideshow', 'anything_height'), 'buildArrows' => theme_get_option('slideshow', 'anything_buildArrows'), 'toggleArrows' => theme_get_option('slideshow', 'anything_toggleArrows'), 'buildNavigation' => theme_get_option('slideshow', 'anything_buildNavigation'), 'toggleControls' => theme_get_option('slideshow', 'anything_toggleControls'), 'autoPlay' => theme_get_option('slideshow', 'anything_autoPlay'), 'pauseOnHover' => theme_get_option('slideshow', 'anything_pauseOnHover'), 'resumeOnVideoEnd' => theme_get_option('slideshow', 'anything_resumeOnVideoEnd'), 'stopAtEnd' => theme_get_option('slideshow', 'anything_stopAtEnd'), 'playRtl' => theme_get_option('slideshow', 'anything_playRtl'), 'delay' => theme_get_option('slideshow', 'anything_delay'), 'animationTime' => theme_get_option('slideshow', 'anything_animationTime'), 'easing' => theme_get_option('slideshow', 'anything_easing'));
        echo "\n<script type=\"text/javascript\">\n";
        echo "var slideShow = []; \n";
        foreach ($options as $key => $value) {
            if (is_bool($value)) {
                $value = $value ? "true" : "false";
            } elseif ($value != "true" && $value != "false") {
                $value = "'" . $value . "'";
            }
            echo "slideShow['" . $key . "'] = " . $value . "; \n";
        }
        echo "</script>\n";
    }
开发者ID:blocher,项目名称:oneholyname,代码行数:78,代码来源:themeGenerator.php


示例19: __

\tfont-weight:bold;
}
.custom-item {
\tpadding-left:10px;
}
.custom-item span {
\tmargin-right:10px;
}
</style>
HTML;
        echo '<input type="text" id="add_custom" name="add_custom" pattern="([a-zA-Z\\x7f-\\xff][ a-zA-Z0-9_\\x7f-\\xff]*){0,1}" data-message="' . __('Please input a valid name which starts with a letter, followed by letters, numbers, spaces, or underscores.') . '" maxlength="20" /><span class="validator-error"></span>';
        if (!empty($customs)) {
            echo '<div class="custom-title">' . __('Below are the Sizes you have created', 'striking_admin') . '</div>';
            foreach ($customs as $custom) {
                echo '<div class="custom-item"><span>' . $custom . '</span><input type="hidden" class="custom-item-value" value="' . $custom . '"/><input type="button" class="button" value="' . __('Delete', 'striking_admin') . '"/></div>';
            }
        }
        echo '<input type="hidden" value="' . $default . '" name="' . $value['id'] . '" id="customs"/>';
    }
}
$options = array(array("name" => __("Image Sizes", 'striking_admin'), "desc" => __("The options listed below determine the dimensions in pixels to use in the shortcode of image.", 'striking_admin'), "type" => "title"), array("name" => __("Custom Sizes", 'striking_admin'), "type" => "start"), array("name" => __("Custom Sizes", 'striking_admin'), "desc" => __("Enter the name of custom you'd like to create.", 'striking_admin'), "id" => "customs", "function" => "theme_add_custom_option", "default" => "", "type" => "custom"), array("type" => "end"), array("name" => __("Small", 'striking_admin'), "type" => "start"), array("name" => __("Width", 'striking_admin'), "desc" => "", "id" => "small_width", "default" => 220, "min" => 0, "max" => 960, "unit" => 'px', "type" => "range"), array("name" => __("Height", 'striking_admin'), "desc" => "", "id" => "small_height", "default" => 150, "min" => 0, "max" => 960, "unit" => 'px', "type" => "range"), array("type" => "end"), array("name" => __("Medium", 'striking_admin'), "type" => "start"), array("name" => __("Width", 'striking_admin'), "desc" => "", "id" => "medium_width", "default" => 292, "min" => 0, "max" => 960, "unit" => 'px', "type" => "range"), array("name" => __("Height", 'striking_admin'), "desc" => "", "id" => "medium_height", "default" => 190, "min" => 0, "max" => 960, "unit" => 'px', "type" => "range"), array("type" => "end"), array("name" => __("Large", 'striking_admin'), "type" => "start"), array("name" => __("Width", 'striking_admin'), "desc" => "", "id" => "large_width", "default" => 459, "min" => 0, "max" => 960, "unit" => 'px', "type" => "range"), array("name" => __("Height", 'striking_admin'), "desc" => "", "id" => "large_height", "default" => 240, "min" => 0, "max" => 960, "unit" => 'px', "type" => "range"), array("type" => "end"));
if ($customs = theme_get_option('image', 'customs')) {
    $custom_array = explode(',', $customs);
    foreach ($custom_array as $custom) {
        $options[] = array("name" => $custom . " Sizes", "type" => "start");
        $options[] = array("name" => __("Width", 'striking_admin'), "desc" => "", "id" => $custom . "_width", "default" => 150, "min" => 0, "max" => 960, "unit" => 'px', "type" => "range");
        $options[] = array("name" => __("Height", 'striking_admin'), "desc" => "", "id" => $custom . "_height", "default" => 150, "min" => 0, "max" => 960, "unit" => 'px', "type" => "range");
        $options[] = array("type" => "end");
    }
}
return array('auto' => true, 'name' => 'image', 'options' => $options);
开发者ID:blocher,项目名称:oneholyname,代码行数:31,代码来源:theme_image.php


示例20: theme_get_option

<?php

if (!theme_dynamic_sidebar('top')) {
    $style = theme_get_option('theme_sidebars_style_top');
    ?>



<?php 
}
开发者ID:uniquegel,项目名称:Feminnova,代码行数:10,代码来源:sidebar-top.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP theme_get_post_class函数代码示例发布时间:2022-05-23
下一篇:
PHP theme_get_metadata_icons函数代码示例发布时间: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