本文整理汇总了PHP中td_panel_generator::box_start方法的典型用法代码示例。如果您正苦于以下问题:PHP td_panel_generator::box_start方法的具体用法?PHP td_panel_generator::box_start怎么用?PHP td_panel_generator::box_start使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类td_panel_generator
的用法示例。
在下文中一共展示了td_panel_generator::box_start方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render_categories_form
/**
* render the categories forms
*/
static function render_categories_form()
{
//get all categories from database
$categories = get_categories(array('hide_empty' => 0));
$td_category_walker_panel = new td_category_walker_panel();
$td_category_walker_panel->walk($categories, 4);
//print_r($rawalker->td_category_buffer);
//die;
//get_categories(array('hide_empty' => 0));//wordpress way
$categories = td_util::get_category2id_array(false);
//our function
foreach ($td_category_walker_panel->td_category_buffer as $display_category_name => $category_id) {
?>
<!-- LAYOUT SETTINGS -->
<?php
echo td_panel_generator::box_start($display_category_name, false);
?>
<!-- DISPLAY VIEW -->
<div class="td-box-row">
<div class="td-box-description">
<span class="td-box-title">ARTICLE DISPLAY VIEW</span>
<p>Select a module type, this is how your article list will be displayed</p>
</div>
<div class="td-box-control-full td-panel-module">
<?php
echo td_panel_generator::visual_select_o(array('ds' => 'td_category', 'item_id' => $category_id, 'option_id' => 'tdc_layout', 'values' => array(array('text' => '', 'title' => '', 'val' => '', 'img' => get_template_directory_uri() . '/wp-admin/images/panel/module-default.png'), array('text' => '', 'title' => '', 'val' => '1', 'img' => get_template_directory_uri() . '/wp-admin/images/panel/module-1.png'), array('text' => '', 'title' => '', 'val' => '2', 'img' => get_template_directory_uri() . '/wp-admin/images/panel/module-2.png'), array('text' => '', 'title' => '', 'val' => '3', 'img' => get_template_directory_uri() . '/wp-admin/images/panel/module-3.png'), array('text' => '', 'title' => '', 'val' => '4', 'img' => get_template_directory_uri() . '/wp-admin/images/panel/module-4.png'), array('text' => '', 'title' => '', 'val' => '5', 'img' => get_template_directory_uri() . '/wp-admin/images/panel/module-5.png'), array('text' => '', 'title' => '', 'val' => '6', 'img' => get_template_directory_uri() . '/wp-admin/images/panel/module-6.png'), array('text' => '', 'title' => '', 'val' => '7', 'img' => get_template_directory_uri() . '/wp-admin/images/panel/module-7.png'), array('text' => '', 'title' => '', 'val' => '8', 'img' => get_template_directory_uri() . '/wp-admin/images/panel/module-8.png'), array('text' => '', 'title' => '', 'val' => '9', 'img' => get_template_directory_uri() . '/wp-admin/images/panel/module-9.png'), array('text' => '', 'title' => '', 'val' => 'search', 'img' => get_template_directory_uri() . '/wp-admin/images/panel/module-10.png'))));
?>
</div>
</div>
<!-- Custom Sidebar + position -->
<div class="td-box-row">
<div class="td-box-description">
<span class="td-box-title">CUSTOM SIDEBAR + POSITION</span>
<p>Sidebar position and custom sidebars</p>
</div>
<div class="td-box-control-full td-panel-sidebar-pos">
<div class="td-display-inline-block">
<?php
echo td_panel_generator::visual_select_o(array('ds' => 'td_category', 'item_id' => $category_id, 'option_id' => 'tdc_sidebar_pos', 'values' => array(array('text' => '', 'title' => '', 'val' => '', 'img' => get_template_directory_uri() . '/wp-admin/images/panel/sidebar-default.png'), array('text' => '', 'title' => '', 'val' => 'sidebar_left', 'img' => get_template_directory_uri() . '/wp-admin/images/panel/sidebar-left.png'), array('text' => '', 'title' => '', 'val' => 'no_sidebar', 'img' => get_template_directory_uri() . '/wp-admin/images/panel/sidebar-full.png'), array('text' => '', 'title' => '', 'val' => 'sidebar_right', 'img' => get_template_directory_uri() . '/wp-admin/images/panel/sidebar-right.png'))));
?>
<div class="td-panel-control-comment td-text-align-right">Select sidebar position</div>
</div>
<div class="td-display-inline-block td_sidebars_pulldown_align">
<?php
echo td_panel_generator::sidebar_pulldown(array('ds' => 'td_category', 'item_id' => $category_id, 'option_id' => 'tdc_sidebar_name'));
?>
<div class="td-panel-control-comment td-text-align-right">Create or select an existing sidebar</div>
</div>
</div>
</div>
<!-- Show Featured slider -->
<div class="td-box-row">
<div class="td-box-description">
<span class="td-box-title">SHOW FEATURED SLIDER</span>
<p>Enable or disable the featured slider (only posts that are in the Featured category are showed in slider)</p>
</div>
<div class="td-box-control-full">
<?php
echo td_panel_generator::checkbox(array('ds' => 'td_category', 'item_id' => $category_id, 'option_id' => 'tdc_slider', 'true_value' => '', 'false_value' => 'yes'));
?>
</div>
</div>
<!-- Category color -->
<div class="td-box-row">
<div class="td-box-description">
<span class="td-box-title">CATEGORY TAG COLOR ON POST PAGE</span>
<p>Pick a color for this category tag on post page</p>
</div>
<div class="td-box-control-full">
<?php
echo td_panel_generator::color_piker(array('ds' => 'td_category', 'item_id' => $category_id, 'option_id' => 'tdc_color', 'default_color' => ''));
?>
</div>
</div>
<!-- BACKGROUND UPLOAD -->
<div class="td-box-row">
<div class="td-box-description">
<span class="td-box-title">BACKGROUND UPLOAD</span>
<p>Upload your logo (300 x 100px) .png</p>
</div>
<div class="td-box-control-full">
<?php
echo td_panel_generator::upload_image(array('ds' => 'td_category', 'item_id' => $category_id, 'option_id' => 'tdc_image'));
?>
</div>
</div>
<!-- BACKGROUND STYLE -->
<div class="td-box-row">
<div class="td-box-description">
<span class="td-box-title">BACKGROUND STYLE</span>
<p>How the background will be dispalyed</p>
//.........这里部分代码省略.........
示例2:
<!-- CATEGORY page -->
<?php
echo td_panel_generator::box_start('Category global settings', true);
?>
<div class="td-box-description td-box-full">
<p>Set the default layout for all the categories. Note that you can change the layout and settings on each category from Theme panel ⇢ Categories</p>
<ul>
<li>You can view each category page by going to Posts ⇢ Categories ⇢ hover on a category ⇢ select view</li>
<li>This WordPress template is located in <strong>category.php</strong> file.</li>
</ul>
</div>
<!-- Category template -->
<div class="td-box-row">
<div class="td-box-description">
<span class="td-box-title">Category template</span>
<p>
This is the header of the category
<?php
td_util::tooltip_html('
<h3>Category template:</h3>
<p>From here you can change the category header.</p>
<ul>
<li>This setting can be overwritten on a per category basis from the boxes below</li>
<li>Some of the headers also show the category description</li>
<li>For advanced users who want to customize the category header, here is the <a target="_blank" href="http://forum.tagdiv.com/api-category-top-section-template-introduction/">API documentation</a></li>
<li>Have fun finding the header that you like!</li>
</ul>
示例3:
<div class="td-box-control-full">
<?php
echo td_panel_generator::color_picker(array('ds' => 'td_option', 'option_id' => 'tds_footer_text_color', 'default_color' => '#ffffff'));
?>
</div>
</div>
<?php
echo td_panel_generator::box_end();
?>
<!-- SUB FOOTER -->
<?php
echo td_panel_generator::box_start('子页脚', false);
?>
<!-- FOOTER bottom color -->
<div class="td-box-row">
<div class="td-box-description">
<span class="td-box-title">背景颜色</span>
<p>选择子页脚底部背景颜色</p>
</div>
<div class="td-box-control-full">
<?php
echo td_panel_generator::color_picker(array('ds' => 'td_option', 'option_id' => 'tds_footer_bottom_color', 'default_color' => '#0d0d0d'));
?>
</div>
</div>
示例4:
</div>
</div>
</div>
<?php
echo td_panel_generator::box_end();
?>
<!-- bbPress template -->
<?php
echo td_panel_generator::box_start('bbPress template', false);
?>
<div class="td-box-description td-box-full">
<p>Set the bbPress template settings from here</p>
</div>
<!-- Custom Sidebar + position -->
<div class="td-box-row">
<div class="td-box-description">
<span class="td-box-title">CUSTOM SIDEBAR + POSITION</span>
<p>Sidebar position and custom sidebars</p>
</div>
<div class="td-box-control-full td-panel-sidebar-pos">
<div class="td-display-inline-block">
<?php
示例5: array
<!-- RESPONSIVE SETTINGS -->
<?php
echo td_panel_generator::box_start('Responsive settings');
?>
<!-- Responsive -->
<div class="td-box-row">
<div class="td-box-description">
<span class="td-box-title">RESPONSIVE</span>
<p>Set your site dimension</p>
</div>
<div class="td-box-control-full">
<?php
echo td_panel_generator::radio_button_control(array('ds' => 'td_option', 'option_id' => 'tds_responsive', 'values' => array(array('text' => 'Full responsive (1264px)', 'val' => ''), array('text' => 'Full responsive (980px)', 'val' => '980_responsive'), array('text' => '980px fixed layout', 'val' => '980'), array('text' => '1264px fixed layout', 'val' => '1264'))));
?>
</div>
</div>
<?php
echo td_panel_generator::box_end();
示例6:
?>
</div>
</div>
<?php
}
}
echo td_panel_generator::box_end();
?>
<!-- 7 days post sorting -->
<?php
echo td_panel_generator::box_start('7天文章排序', false);
?>
<!-- text -->
<div class="td-box-row">
<div class="td-box-description td-box-full">
<p>当你启用此选项,新的排序选项将工作,它将在每个区块可选择(7天热门)。此排序选项将挑选最后7天热门的文章,按页面查看排序。此选项有一个小缺陷,它不与缓存插件一起工作。当启用缓存插件时,排序将在最后7天成为估计热门。</p>
</div>
<div class="td-box-row-margin-bottom"></div>
</div>
<!-- use 7 days post sorting -->
<div class="td-box-row">
<div class="td-box-description">
<span class="td-box-title">使用7天文章排序</span>
示例7: array
<!-- BACKGROUND SETTINGS -->
<?php
echo td_panel_generator::box_start('Background settings');
?>
<!-- BACKGROUND UPLOAD -->
<div class="td-box-row">
<div class="td-box-description">
<span class="td-box-title">SITE BACKGROUND</span>
<p>Upload a background image, the site will automatically switch to boxed version</p>
</div>
<div class="td-box-control-full">
<?php
echo td_panel_generator::upload_image(array('ds' => 'td_option', 'option_id' => 'tds_site_background_image'));
?>
</div>
</div>
<!-- Background Repeat -->
<div class="td-box-row">
<div class="td-box-description">
<span class="td-box-title">REPEAT</span>
<p>How the site background image will be displayed</p>
</div>
<div class="td-box-control-full">
<?php
echo td_panel_generator::radio_button_control(array('ds' => 'td_option', 'option_id' => 'tds_site_background_repeat', 'values' => array(array('text' => 'No Repeat', 'val' => ''), array('text' => 'Tile', 'val' => 'repeat'), array('text' => 'Tile Horizontally', 'val' => 'repeat-x'), array('text' => 'Tile Vertically', 'val' => 'repeat-y'))));
?>
</div>
</div>
示例8:
<?php
echo td_panel_generator::dropdown(array('ds' => 'td_ads', 'item_id' => 'custom_ad_2', 'option_id' => 'p_size', 'values' => $td_google_ad_list_sizes));
?>
</span>
</div>
</div>
<?php
echo td_panel_generator::box_end();
?>
<?php
echo td_panel_generator::box_start('Custom ad 3', false);
?>
<!-- ad box code -->
<div class="td-box-row">
<div class="td-box-description">
<span class="td-box-title">YOUR CUSTOM AD 3</span>
<p>Paste your ad code here. Google adsense will be made responsive automatically. <br><br> To add non adsense responsive ads, <br> <a target="_blank" href="http://forum.tagdiv.com/ads-system-full-guide/">click here</a> (last paragraph)</p>
</div>
<div class="td-box-control-full">
<?php
echo td_panel_generator::textarea(array('ds' => 'td_ads', 'item_id' => 'custom_ad_3', 'option_id' => 'ad_code'));
?>
</div>
</div>
示例9:
<!-- CATEGORY page -->
<?php
echo td_panel_generator::box_start('分类全局设置', true);
?>
<div class="td-box-description td-box-full">
<p>设置所有分类默认布局。注意,你可以从主题面板 ⇢ 分类 每个分类更改布局和设置</p>
<ul>
<li>你可以通过去 文章 ⇢ 分类 ⇢ 分类悬停 ⇢ 选择视图 查看每个分类页面</li>
<li>此WordPress模板位于 <strong>category.php</strong> 文件.</li>
</ul>
</div>
<!-- Category template -->
<div class="td-box-row">
<div class="td-box-description">
<span class="td-box-title">分类模板</span>
<p>
这是分类页眉
<?php
td_util::tooltip_html('
<h3>分类模板:</h3>
<p>你可以从这里更改分类页眉</p>
<ul>
<li>此设置可以从以下框覆盖每个分类基础</li>
<li>一些页眉也显示分类描述</li>
<li>对于想自定义分类页眉的高级用户,这里是<a target="_blank" href="http://forum.tagdiv.com/api-category-top-section-template-introduction/">API文档</a></li>
<li>玩得开心找到你喜欢的页眉!</li>
</ul>
示例10:
<!-- Analitycs -->
<?php
echo td_panel_generator::box_start('Analitycs');
?>
<!-- GOOGLE ASYNCHRONOUS ADS -->
<div class="td-box-row">
<div class="td-box-description td-box-full">
<span class="td-box-title">GOOGLE ANALYTICS CODE</span>
<p>Google analytics helps track your site traffic</p>
</div>
</div>
<!-- paste your code here -->
<div class="td-box-row">
<div class="td-box-description">
<span class="td-box-title">PASTE YOUR CODE HERE</span>
<p>Google Analytics code</p>
</div>
<div class="td-box-control-full">
<?php
echo td_panel_generator::textarea(array('ds' => 'td_option', 'option_id' => 'td_analytics'));
?>
</div>
</div>
<?php
echo td_panel_generator::box_end();
示例11:
<!-- CUSTOM Javascript -->
<?php
echo td_panel_generator::box_start('自定义Javascript');
?>
<!-- YOUR CUSTOM Javascript -->
<div class="td-box-row td-custom-javascript">
<div class="td-box-description">
<span class="td-box-title">你的自定义JAVASCRIPT</span>
<p>请输入你的自定义Javascript</p>
</div>
<div class="td-box-control-full">
<?php
echo td_panel_generator::textarea(array('ds' => 'td_option', 'option_id' => 'tds_custom_javascript'));
?>
</div>
</div>
<?php
echo td_panel_generator::box_end();
示例12:
<div class="td-box-control-full">
<?php
echo td_panel_generator::color_picker(array('ds' => 'td_block_styles', 'item_id' => 'style_5', 'option_id' => 'tds_block_hover_style', 'default_color' => ''));
?>
</div>
</div>
<?php
echo td_panel_generator::box_end();
?>
<!-- STYLE 6 CSS ------------------------------------------------------------------------->
<?php
echo td_panel_generator::box_start('Style 6 - Pink', false);
?>
<div class="td-box-row td-block-style">
<div class="td-box-description">
<span class="td-box-title">Background color</span>
<p>Choose the background color for the block</p>
</div>
<div class="td-box-control-full">
<?php
echo td_panel_generator::color_picker(array('ds' => 'td_block_styles', 'item_id' => 'style_6', 'option_id' => 'tds_block_background_color', 'default_color' => '#ff0099'));
?>
</div>
</div>
示例13:
<li>
<a data-td-is-back="yes" href="?page=td_theme_panel">
<span class="td-sp-nav-icon td-ico-back"></span>
Back
<span class="td-no-arrow"></span>
</a>
</li>
</ul>
</div>
<div id="td-col-right" class="td-panel-content" style="min-height: 900px">
<!-- Export theme settings -->
<div id="td-panel-welcome" class="td-panel-active td-panel">
<?php
echo td_panel_generator::box_start('Importing / exporting theme settings');
?>
<div class="td-box-row">
<div class="td-box-description td-box-full">
<span class="td-box-title">EXPORT THEME SETTINGS</span>
<p>
This box contains all the panel options encoded as a string so you can easily copy them and move them to another server.
</p>
</div>
<div class="td-box-control-full">
<?php
echo td_panel_generator::textarea(array('ds' => 'td_read_theme_options', 'option_id' => 'tds_read_theme_options', 'value' => base64_encode(serialize(get_option(TD_THEME_OPTIONS_NAME)))));
?>
</div>
<div class="td-box-row-margin-bottom"></div>
示例14: confirm
<li>
<a data-td-is-back="yes" href="?page=td_theme_panel">
<span class="td-sp-nav-icon td-ico-header"></span>
Back
<span class="td-arrow"></span>
</a>
</li>
</ul>
</div>
<div id="td-col-rigth" class="td-panel-content">
<!-- Export theme settings -->
<div id="td-panel-welcome" class="td-panel-active td-panel">
<?php
echo td_panel_generator::box_start('Import predefined styles');
?>
<?php
foreach (td_global::$stacks_list as $stack_file => $stack_name) {
?>
<div class="td-box-row">
<div class="td-box-control-full">
<a onclick="return confirm('Are you sure? This will import our predefined settings for the stack (background, template layouts, fonts, colors etc...). Please backup your settings to be sure that you don`t lose them by accident.')" href="?page=td_theme_panel&td_page=td_view_import_theme_styles&td_option=<?php
echo $stack_file;
?>
" class="td-big-button" style="width: 150px; text-align: center"><?php
echo $stack_name;
?>
示例15:
<li>
<a data-td-is-back="yes" href="?page=td_theme_panel">
<span class="td-sp-nav-icon td-ico-header"></span>
Back
<span class="td-arrow"></span>
</a>
</li>
</ul>
</div>
<div id="td-col-rigth" class="td-panel-content">
<!-- homepage -->
<div id="td-panel-welcome" class="td-panel-active td-panel">
<!-- One click demo install -->
<?php
echo td_panel_generator::box_start('Importing old category data');
?>
<!-- Install demo data -->
<div class="td-box-row">
<div class="td-box-description td-box-full">
<span class="td-box-title">Please wait until all the data is imported</span>
<p>....</p>
<?php
td_global::$td_options = get_option(TD_THEME_OPTIONS_NAME);
$td_categories = get_categories(array('hide_empty' => '0'));
foreach ($td_categories as $td_category) {
echo '<p><strong>Importing: ' . $td_category->name . '</strong><br>';
$td_cat_options = get_option('tax_meta_' . $td_category->cat_ID);