本文整理汇总了PHP中td_panel_generator::upload_image方法的典型用法代码示例。如果您正苦于以下问题:PHP td_panel_generator::upload_image方法的具体用法?PHP td_panel_generator::upload_image怎么用?PHP td_panel_generator::upload_image使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类td_panel_generator
的用法示例。
在下文中一共展示了td_panel_generator::upload_image方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: td_category_form_ajax
function td_category_form_ajax($category_id)
{
ob_start();
?>
<!-- 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' => td_panel_generator::helper_display_modules('default+enabled_on_loops')));
?>
</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() . '/includes/wp_booster/wp-admin/images/panel/sidebar-default.png'), array('text' => '', 'title' => '', 'val' => 'sidebar_left', 'img' => get_template_directory_uri() . '/includes/wp_booster/wp-admin/images/panel/sidebar-left.png'), array('text' => '', 'title' => '', 'val' => 'no_sidebar', 'img' => get_template_directory_uri() . '/includes/wp_booster/wp-admin/images/panel/sidebar-full.png'), array('text' => '', 'title' => '', 'val' => 'sidebar_right', 'img' => get_template_directory_uri() . '/includes/wp_booster/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 CATEGORY BIG GRID</span>
<p>Enable or disable the category big grid</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_picker(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 background image.</br> You can use:</p>
<ul>
<li>Single Image</li>
<li>Pattern</li>
</ul>
</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 displayed</p>
<ul>
<li><b>Stretch:</b> use this option when you are using a Single Image for you background and you want this image to fill the entire background.</li>
<li><b>Tiled:</b> use this option when you are using a Pattern for you background.</li>
</ul>
</div>
<div class="td-box-control-full">
<?php
echo td_panel_generator::radio_button_control(array('ds' => 'td_category', 'item_id' => $category_id, 'option_id' => 'tdc_bg_repeat', 'values' => array(array('text' => 'Default', 'val' => ''), array('text' => 'Stretch', 'val' => 'stretch'), array('text' => 'Tiled', 'val' => 'tile'))));
?>
</div>
</div>
//.........这里部分代码省略.........
示例2: icon
<p>Upload your icon (144 x 144px) .png</p>
</div>
<div class="td-box-control-full">
<?php
// ipad retina ios6
echo td_panel_generator::upload_image(array('ds' => 'td_option', 'option_id' => 'tds_ios_icon_144'));
?>
</div>
</div>
<!-- iOS bookmarklet 152x152 -->
<div class="td-box-row">
<div class="td-box-description">
<span class="td-box-title">IMAGE 152 x 152</span>
<p>Upload your icon (152 x 152px) .png</p>
</div>
<div class="td-box-control-full">
<?php
// ipad retina ios7
echo td_panel_generator::upload_image(array('ds' => 'td_option', 'option_id' => 'tds_ios_icon_152'));
?>
</div>
</div>
<?php
echo td_panel_generator::box_end();
?>
示例3: 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>
示例4: logo
<div class="td-box-control-full">
<?php
echo td_panel_generator::upload_image(array('ds' => 'td_option', 'option_id' => 'tds_footer_logo_upload'));
?>
</div>
</div>
<!-- logo retina -->
<div class="td-box-row">
<div class="td-box-description">
<span class="td-box-title">FOOTER RETINA LOGO</span>
<p>Upload your retina logo (double size)</p>
</div>
<div class="td-box-control-full">
<?php
echo td_panel_generator::upload_image(array('ds' => 'td_option', 'option_id' => 'tds_footer_retina_logo_upload'));
?>
</div>
</div>
<!-- footer text -->
<div class="td-box-row td-custom-css">
<div class="td-box-description">
<span class="td-box-title">FOOTER TEXT</span>
<p>Write here your footer text</p>
</div>
<div class="td-box-control-full">
<?php
echo td_panel_generator::textarea(array('ds' => 'td_option', 'option_id' => 'tds_footer_text'));
?>
</div>
示例5:
</div>
</div>
<!-- BACKGROUND UPLOAD -->
<div class="td-box-row">
<div class="td-box-description">
<span class="td-box-title">背景上传</span>
<p>上传你的背景图片。</br>你可以使用:</p>
<ul>
<li>单张图片</li>
<li>图案</li>
</ul>
</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">背景风格</span>
<p>背景如何显示</p>
<ul>
<li><b>伸展:</b> 当你为你的背景使用单张图片,且你想此图片填充整个背景时使用此选项</li>
<li><b>切片:</b> 当你为你的背景使用图案时使用此选项.</li>
</ul>
</div>
<div class="td-box-control-full">
示例6: 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>
//.........这里部分代码省略.........