本文整理汇总了PHP中get_option_tree函数的典型用法代码示例。如果您正苦于以下问题:PHP get_option_tree函数的具体用法?PHP get_option_tree怎么用?PHP get_option_tree使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_option_tree函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: option_tree_color_scheme
/**
* Color Scheme
*
* @since Lambda 2.0
*
* @param array $value
* @param array $settings
* @param int $int
*
* @return string
*/
function option_tree_color_scheme($value, $settings, $int)
{
?>
<div class="option">
<div class="lambda-opttitle">
<div class="lambda-opttitle-pad">
<?php
echo htmlspecialchars_decode($value->item_title);
?>
<span class="infoButton right">
<img class="infoImage" src="<?php
echo OT_PLUGIN_URL;
?>
/assets/images/info.png" width="40px" height="20px" alt="Info" style="left: 0px;">
</span>
</div>
</div>
<div class="section">
<fieldset id="choosecolor">
<?php
global $theme_path;
$count = 1;
foreach (recognized_color_schemes() as $key => $singlecolor) {
$checked = '';
if ($settings[$value->item_id] == $singlecolor) {
$checked = ' checked="checked"';
}
if ($key == 'Custom' && $value->item_id . '_' . $count == 'color_scheme_1') {
$singlecolor = get_option_tree('themecolor');
$singlecolor = $singlecolor['hex'];
$checked = ' checked="checked"';
}
$datascheme = str_replace(' ', '', $key);
echo '<div class="color-scheme-box" data-scheme="' . trim(strtolower($datascheme)) . '">
<input class="check-with-label" name="' . $value->item_id . '" id="' . $value->item_id . '_' . $count . '" type="radio" value="' . $singlecolor . '"' . $checked . ' />
<label class="label-for-color" for="' . $value->item_id . '_' . $count . '"><div class="color color_scheme_' . $count . '" style="background-color: ' . $singlecolor . ';"><img src="' . $theme_path . '/lambda/assets/images/colorlayer.png"></div></label>
<span class="colorbadge">' . $key . '</span>
</div>';
$count++;
}
?>
</fieldset>
<?php
if ($value->item_desc) {
?>
<div class="desc alert alert-neutral"><?php
echo htmlspecialchars_decode($value->item_desc);
?>
</div>
<div class="clear"></div>
<?php
}
?>
</div>
</div>
<?php
}
开发者ID:venkimithu,项目名称:npmgroups,代码行数:71,代码来源:color_scheme.php
示例2: handle_slider_shortcode
function handle_slider_shortcode($atts)
{
extract(shortcode_atts(array("id" => ''), $atts));
global $wpdb, $theme_path, $lambda_meta_data;
$sitelayout = $lambda_meta_data->get_the_value('sitelayout');
$table_name = $wpdb->base_prefix . "lambda_sliders";
$slider_result = $wpdb->get_row('SELECT * FROM ' . $table_name . ' WHERE id =' . $id);
if (!$slider_result) {
return;
}
switch ($slider_result->slidertype) {
case 'flexslider':
//Flexslider CSS
wp_enqueue_style('flexslider', get_template_directory_uri() . '/css/flexslider.css', 'theme', '1.8');
//JS
wp_enqueue_script('flexslider', get_template_directory_uri() . "/javascripts/jquery.flexslider.min.js", array('jquery'), '1.8', true);
//dynamic JS
wp_register_script('lambda_script_' . $id . '.js', $theme_path . '/javascripts/slider.init.php?id=' . $id, array('jquery'));
wp_enqueue_script('lambda_script_' . $id . '.js');
//Return Flexslider's HTML
return getFlexHTML($slider_result);
break;
case 'cameraslider':
//CameraSlider CSS
wp_enqueue_style('cameraslider', get_template_directory_uri() . '/css/cameraslider.css', 'theme', '1.0');
//JS
wp_register_script('cameraslider', get_template_directory_uri() . '/javascripts/camera.min.js', array('jquery'));
wp_print_scripts('cameraslider');
wp_register_script('cameraslidermob', get_template_directory_uri() . '/javascripts/jquery.mobile.customized.min.js', array('jquery'));
wp_print_scripts('cameraslidermob');
//dynamic JS
wp_register_script('lambda_script_' . $id . '.js', $theme_path . '/javascripts/slider.init.php?id=' . $id, array('jquery'));
wp_enqueue_script('lambda_script_' . $id . '.js');
//Return Cycle's HTML
return getCameraHTML($slider_result);
break;
case 'supersized':
if (get_option_tree('sitelayout') == 'boxed' || $sitelayout == 'boxed') {
//Supersized's CSS
wp_enqueue_style('supersized-css', get_template_directory_uri() . '/css/supersized.css', 'theme', '3.2.7', 'screen, projection');
wp_enqueue_style('supersized-shutter-css', get_template_directory_uri() . '/css/supersized.shutter.css', 'theme', '3.2.7', 'screen, projection');
//JS
wp_register_script('supersized.3.2.6.min.js', get_template_directory_uri() . '/javascripts/supersized.3.2.7.min.js', array('jquery'));
wp_print_scripts('supersized.3.2.6.min.js');
wp_register_script('supersized.shutter.min.js', get_template_directory_uri() . '/javascripts/supersized.shutter.min.js', array('jquery'));
wp_print_scripts('supersized.shutter.min.js');
//dynamic JS
wp_register_script('lambda_script_' . $id . '.js', $theme_path . '/javascripts/slider.init.php?id=' . $id, array('jquery'));
wp_print_scripts('lambda_script_' . $id . '.js');
//Return supersized into global
return getSupersizedHTML($slider_result);
}
break;
}
}
开发者ID:venkimithu,项目名称:npmgroups,代码行数:55,代码来源:theme-slider-shortcodes.php
示例3: get_sidebars_array
function get_sidebars_array()
{
$sidebars = get_option_tree('sidebars', '', false, true, -1);
$_sidebars = array('default' => __('Default Sidebar', UT_THEME_NAME), 'none' => __('No Sidebar', UT_THEME_NAME));
if (is_array($sidebars)) {
foreach ($sidebars as $num => $sidebar) {
$_sidebars[$num] = $sidebar['title'];
}
return $_sidebars;
}
}
开发者ID:venkimithu,项目名称:npmgroups,代码行数:11,代码来源:lambda.admin.functions.php
示例4: before_sidebar
function before_sidebar($columns)
{
global $lambda_meta_data;
if (is_home()) {
//get the meta data from the blog page
$homeid = get_option('page_for_posts');
$sidebar_align = get_post_meta($homeid, $lambda_meta_data->get_the_id(), TRUE);
} else {
$sidebar_align = $lambda_meta_data->the_meta();
}
$sidebar_align = isset($sidebar_align['sidebar_align']) ? $sidebar_align['sidebar_align'] : get_option_tree('sidebar_alignement');
if (empty($columns) && $sidebar_align != 'both') {
//one sidebar
$columns = 'five columns';
} elseif (empty($columns) && $sidebar_align == 'both') {
//two sidebars
$columns = 'four columns';
} else {
// Check the function for a returned variable
$columns = $columns;
}
$sID = $columns == 'widget-sidebar' ? '_' . rand(1, 100) : '';
echo '<aside id="sidebar' . $sID . '" class="' . $columns . '" role="complementary">';
}
开发者ID:venkimithu,项目名称:npmgroups,代码行数:24,代码来源:theme-layout-functions.php
示例5: get_option_tree
</p>
</div>
<div class="grid_6 social-icon"></div>
</div>
</div>
<div style="clear:both;"></div>
<div style="margin-bottom:112px;"></div>
<!-- Social End -->
<!-- Advert Start -->
<div class="container_16">
<div class="grid_16" style="width:970px;">
<?php
$category = get_option_tree('app_shopcategories');
$number = get_option_tree('app_shopshow');
?>
<?php
$paged = get_query_var('paged') ? get_query_var('paged') : 1;
query_posts("cat={$category}&showposts={$number}&somecat&paged={$paged}");
?>
<?php
while (have_posts()) {
the_post();
?>
<?php
if (get_post_meta($post->ID, 'icon', true)) {
?>
开发者ID:Nightgunner5,项目名称:Pubcomp-CMS,代码行数:31,代码来源:shop.php
示例6:
echo '</div></div></div>';
}
?>
<div class="entry-content clearfix">
<div class="entry-summary">
<?php
if (is_archive() || is_search() || get_option_tree('excerpt_blog') == 'yes') {
the_excerpt();
} else {
the_content(__('Read more', UT_THEME_NAME));
}
?>
</div><!-- .entry-summary -->
</div><!-- .entry-content -->
<footer class="entry-footer clearfix">
开发者ID:venkimithu,项目名称:npmgroups,代码行数:28,代码来源:loop.php
示例7: get_option_tree
<?php
}
?>
</a><p>© 2015 Evergreen Tap House | <a href="http://www.evergreenwebdesign.com" target="_blank">Evergreen Web Design</a></p></div>
<?php
}
?>
</div>
</div>
</div>
</div>
</footer>
<?php
$boxed = get_option_tree('boxed', $theme_options);
if ($boxed == "Yes") {
?>
</div><?php
}
?>
</div>
<?php
wp_footer();
?>
</body>
</html>
开发者ID:robertmeans,项目名称:evergreentaphouse,代码行数:31,代码来源:footer.php
示例8: get_option
/**
* The template for displaying Category Archive pages.
*
* lambda framework v 2.1
* by www.unitedthemes.com
* since lambda framework v 1.0
* based on skeleton
*/
global $lambda_meta_data;
if (is_home() || is_category()) {
$homeid = get_option('page_for_posts');
$meta_sidebar = get_post_meta($homeid, $lambda_meta_data->get_the_id(), TRUE);
} else {
$meta_sidebar = $lambda_meta_data->the_meta();
}
$meta_sidebar = isset($meta_sidebar['sidebar']) ? $meta_sidebar['sidebar'] : get_option_tree('select_sidebar');
get_header();
//includes the template-part-slider.php
get_template_part('template-part', 'slider');
//includes the template-part-teaser.php
get_template_part('template-part', 'teaser');
//set column layout depending if user wants to display a sidebar
if ($meta_sidebar != UT_THEME_INITIAL . 'sidebar_none') {
lambda_before_content($columns = '');
} elseif ($meta_sidebar == UT_THEME_INITIAL . 'sidebar_none') {
lambda_before_content($columns = 'sixteen');
}
?>
<?php
$category_description = category_description();
开发者ID:venkimithu,项目名称:npmgroups,代码行数:31,代码来源:category.php
示例9: get_option_tree
<a href="<?php
echo get_option_tree('twitter_link');
?>
" target="_blank"><img src="<?php
echo get_template_directory_uri();
?>
/img/socail_icon_2.png" alt=""></a>
<a href="<?php
echo get_option_tree('google_plus_link');
?>
" target="_blank"><img src="<?php
echo get_template_directory_uri();
?>
/img/socail_icon_3.png" alt=""></a>
<a href="<?php
echo get_option_tree('linkedin_link');
?>
" target="_blank"><img src="<?php
echo get_template_directory_uri();
?>
/img/socail_icon_4.png" alt=""></a>
</div>
</div>
<div class="col-md-12 trainer_call_ul_right">
<h2><span>About</span> training Your Body</h2>
<?php
$args = array('page_id' => 38);
// The Query
$the_query = new WP_Query($args);
// The Loop
while ($the_query->have_posts()) {
开发者ID:abhishek6986,项目名称:trainingyourbody,代码行数:31,代码来源:home.php
示例10: function_exists
<div class="wrapper wrapper-navbar" id="wrapper-navbar">
<nav class="site-navigation" itemscope="itemscope" itemtype="http://schema.org/SiteNavigationElement">
<div class="navbar">
<div class="container">
<div class="col-xs-12">
<div class="navbar-header">
<!-- .navbar-toggle is used as the toggle for collapsed navbar content -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!-- Your site title as branding in the menu -->
<?php
$logo = function_exists('get_option_tree') ? get_option_tree('vn_logo') : '';
?>
<a class="navbar-brand" href="<?php
echo esc_url(home_url('/'));
?>
" title="<?php
echo esc_attr(get_bloginfo('name', 'display'));
?>
" rel="home"><?php
if (!empty($logo)) {
echo '<img src="' . $logo . '" alt="' . esc_attr(get_bloginfo('name', 'display')) . '" class="brand-logo" />';
} else {
bloginfo('name');
}
?>
开发者ID:david-ievents,项目名称:iEvents.com-Dev,代码行数:31,代码来源:header.php
示例11: the_time
<!-- Start of post details -->
<div class="cr3ativcareer_post_details">
<!-- Start of post date -->
<div class="cr3ativcareer_post_date">
<?php
the_time(get_option('date_format'));
?>
</div><!-- End of post date -->
<!-- Start of post read more -->
<div class="cr3ativcareer_post_read_more">
<?php
if (function_exists('get_option_tree')) {
$readmoretext = get_option_tree('vn_readmore_button_text');
}
?>
<a href="<?php
the_permalink();
?>
"><?php
echo $readmoretext;
?>
</a>
</div><!-- End of post read more -->
</div><!-- End of post details -->
</div><!-- End of blog wrapper -->
开发者ID:SelaInc,项目名称:eassignment,代码行数:31,代码来源:template-cr3ativcareers.php
示例12: get_option_tree
<?php
if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('dropdown-widget-4')) {
}
?>
</div>
</div>
</div>
<div class="container">
<div class="sixteen columns">
<!-- Banner -->
<div class="fp_banner" >
<div class="show_hide flag_toggle" >
<img width="92px" height="auto" src="<?php
echo get_option_tree('fp_banner');
?>
" />
</div>
</div>
<!-- /End Banner -->
</div>
</div>
</div>
<?php
}
?>
<!-- /Flag Dropdown -->
开发者ID:estrategasdigitales,项目名称:Golone,代码行数:31,代码来源:header4.php
示例13: bliccaThemes_after_main_content
function bliccaThemes_after_main_content()
{
if (function_exists('get_option_tree')) {
$theme_options = get_option('option_tree');
}
$woocommerce_style = get_option_tree('woocommerce_style', $theme_options);
if (!isset($woocommerce_style) || $woocommerce_style == "") {
$woocommerce_style == "col-md-8";
}
if (is_single()) {
$woocommerce_style = "col-md-12";
}
?>
</div>
<?php
if (!is_single() && $woocommerce_style != "col-md-12") {
get_sidebar('shop');
}
?>
</div></div>
</section>
<?php
}
开发者ID:robertmeans,项目名称:evergreentaphouse,代码行数:23,代码来源:pronto-shop.php
示例14: lambda_before_content
function lambda_before_content()
{
global $content_width;
$metadata = lambda_return_meta('page');
// check if user has set an individual sidebar for this page / post if not, load default values from option tree
$sidebar_align = $GLOBALS['sidebar_align'] = isset($metadata['sidebar_align']) ? $metadata['sidebar_align'] : get_option_tree('sidebar_alignement');
$sidebar = !empty($metadata['sidebar']) ? $metadata['sidebar'] : get_option_tree('select_sidebar');
if (is_page_template('template-portfolio.php')) {
$sidebar = UT_THEME_INITIAL . 'sidebar_none';
}
if ($sidebar != UT_THEME_INITIAL . 'sidebar_none') {
# sidebar has been set
$columns = '';
$GLOBALS['lambda_content_width'] = $columns;
} elseif ($sidebar == UT_THEME_INITIAL . 'sidebar_none') {
# no sidebars
$columns = 'span12';
$GLOBALS['lambda_content_width'] = $columns;
}
#-----------------------------------------------------------------
# No Sidebar for following templates
# - template-home.php
#-----------------------------------------------------------------
if (is_page_template('template-home.php')) {
# no sidebars
$columns = 'span12';
$GLOBALS['lambda_content_width'] = $columns;
}
#-----------------------------------------------------------------
# Standard Column Set
#-----------------------------------------------------------------
if (empty($columns) && $sidebar_align != 'both') {
# one sidebar
$columns = 'span9';
$GLOBALS['lambda_content_column'] = $columns;
$content_width = 870;
} elseif (empty($columns) && $sidebar_align == 'both') {
# two sidebars
$columns = 'span6';
$GLOBALS['lambda_content_column'] = $columns;
$content_width = 570;
} else {
// Check the function for a returned variable
$columns = $columns;
$GLOBALS['lambda_content_column'] = $columns;
$content_width = 1170;
}
#----------------------------------------------------------------
# Markup
#----------------------------------------------------------------
lambda_before_content_hook();
// action hook, see functions/theme-hooks.php
# start content wrap and content
echo '<div id="content-wrap" class="clearfix" data-content="content"><!-- content-wrap -->';
echo !is_page_template('template-home.php') ? '<div class="container"><div class="row">' : '';
# call second sidebar
if ($columns == 'span6' && $sidebar_align == 'both') {
get_sidebar('second');
}
echo !is_page_template('template-home.php') ? '<section id="content" class="' . $columns . ' site-content clearfix" role="main">' : '<section id="content" class="ut-home-template site-content clearfix" role="main">';
}
开发者ID:sebfabiani,项目名称:vcv,代码行数:61,代码来源:theme-layout-functions.php
示例15: lambda_login_head
function lambda_login_head()
{
if (get_option_tree('login_logo')) {
echo "<style>\n body.login #login h1 a {\n background: url('" . get_option_tree('login_logo') . "') no-repeat scroll center top transparent;\n }\n .login #nav a, .login #backtoblog a {\n color: " . get_option_tree('color_scheme') . " !important;\n }\n </style>";
}
}
开发者ID:sebfabiani,项目名称:vcv,代码行数:6,代码来源:theme-functions.php
示例16: lambda_needed_js
//.........这里部分代码省略.........
}, { offset: "85%" });';
}
}
}
?>
<?php
}
?>
<?php
}
?>
<?php
#-----------------------------------------------------------------
# fixed header animation
#-----------------------------------------------------------------
?>
<?php
if (isset($theme_options['fixed_header']) && $theme_options['fixed_header'] == 'on') {
?>
<?php
$fontsizelarge = !empty($theme_options['logo_font']['font-size']) ? $theme_options['logo_font']['font-size'] : 28;
$fontsizelarge = preg_replace('/px/', '', $fontsizelarge);
?>
<?php
if (get_option_tree('textorlogo') == 'Logo') {
?>
var large_logo_height = '',
header_scrollable = false;
<?php
} else {
?>
var large_logo_height = '',
fontsize_large = '<?php
echo $fontsizelarge;
?>
',
header_scrollable = false;
<?php
}
?>
$(window).load(function(){
<?php
if (get_option_tree('textorlogo') == 'Logo') {
?>
large_logo_height = $('#logo').find("img").outerHeight();
<?php
} else {
?>
large_logo_height = $('#logo').find("h1").outerHeight();
fontsize_large = $('#logo').find('h1, h1 a').css('font-size');
<?php
}
开发者ID:sebfabiani,项目名称:vcv,代码行数:67,代码来源:theme-java-functions.php
示例17: get_option_tree
<!-- Social Start -->
<!--
<div class="container_16">
<div class="grid_16" id="social-back-two">
<div id="sociallike"></div>
<div class="grid_10 social-area">
<h1><?php
get_option_tree('social_title', '', 'true');
?>
</h1>
<p><?php
get_option_tree('social_subtitle', '', 'true');
?>
</p>
</div>
<div class="grid_6 social-icon">
<ul>
<?php
get_option_tree('social_list', '', 'true');
?>
</ul>
</div>
</div>
</div>
<div style="clear:both;"></div>
<div style="margin-bottom:160px;"></div>
-->
<!-- Social End -->
<?php
get_footer();
开发者ID:Nightgunner5,项目名称:Pubcomp-CMS,代码行数:31,代码来源:index.php
示例18: body_class
</script>
</head>
<body <?php
body_class();
?>
>
<div id="top">
<div id="title">
<?php
if (function_exists('get_option_tree') && get_option_tree('berlin_logo') != '') {
?>
<a href="<?php
echo home_url();
?>
/" title="Return to the frontpage"><img src="<?php
get_option_tree('berlin_logo', '', true);
?>
" id="logo-image" alt="logo image" /></a>
<?php
} else {
?>
<h1> <a href="<?php
echo home_url();
?>
" title="<?php
bloginfo('name');
?>
" class="logo">
<img src="http://829media.com/scc/wp-content/themes/berlin/images/logo.png" alt="Second-Class Citizens" />
</a> </h1>
开发者ID:Ashleyotero,项目名称:oldest-old,代码行数:31,代码来源:header.php
示例19: get_header
<?php
/* Template Name: Home Page Template */
get_header();
if (function_exists('get_option_tree')) {
$theme_options = get_option('option_tree');
}
$header_style = get_option_tree('header_style', $theme_options);
if ($header_style == "") {
$header_style == "bt-header-classic";
}
?>
<?php
while (have_posts()) {
the_post();
?>
<section class="bliccaThemes-waypoint" data-animate-down="on-sticky" data-animate-up="off-sticky">
<!-- Page Content Start -->
<?php
the_content();
?>
</section>
<?php
}
// end of the loop.
get_footer();
开发者ID:robertmeans,项目名称:evergreentaphouse,代码行数:28,代码来源:home-page-template.php
示例20: isset
<?php
/**
* The Sidebar containing the primary blog sidebar
*
* lambda framework v 2.1
* by www.unitedthemes.com
* since lambda framework v 1.0
* based on skeleton
*/
global $lambda_meta_data, $wp_query;
$page_id = isset($wp_query->post) ? $wp_query->post->ID : null;
if (is_home()) {
$homeid = get_option('page_for_posts');
$sidebar = get_post_meta($homeid, $lambda_meta_data->get_the_id(), TRUE);
} else {
$sidebar = get_post_meta($page_id, $lambda_meta_data->get_the_id(), TRUE);
}
do_action('st_before_sidebar');
echo '<ul class="sidebar">';
if (!isset($sidebar['sidebar']) || isset($sidebar['sidebar']) && $sidebar['sidebar'] == UT_THEME_INITIAL . "sidebar_default") {
dynamic_sidebar(get_option_tree('select_sidebar'));
} elseif (isset($sidebar['sidebar'])) {
dynamic_sidebar($sidebar['sidebar']);
}
echo '</ul>';
do_action('st_after_sidebar');
?>
开发者ID:venkimithu,项目名称:npmgroups,代码行数:28,代码来源:sidebar.php
注:本文中的get_option_tree函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论