本文整理汇总了PHP中td_global::td_generate_unique_id方法的典型用法代码示例。如果您正苦于以下问题:PHP td_global::td_generate_unique_id方法的具体用法?PHP td_global::td_generate_unique_id怎么用?PHP td_global::td_generate_unique_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类td_global
的用法示例。
在下文中一共展示了td_global::td_generate_unique_id方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
function render($atts)
{
$this->block_uid = td_global::td_generate_unique_id();
//update unique id on each render
extract(shortcode_atts(array('limit' => 3, 'sort' => '', 'category_id' => '', 'category_ids' => '', 'custom_title' => '', 'custom_url' => '', 'hide_title' => '', 'show_child_cat' => '', 'tag_slug' => '', 'header_color' => ''), $atts));
$buffy = '';
//output buffer
$td_unique_id = td_global::td_generate_unique_id();
$td_query =& td_data_source::get_wp_query($atts);
//by ref do the query
//get the js for this block
$buffy .= $this->get_block_js($atts, $td_query);
$buffy .= '<div class="td_block_wrap td_block7">';
//get the block title
$buffy .= $this->get_block_title($atts);
//get the sub category filter for this block
$buffy .= $this->get_block_sub_cats($atts, $td_unique_id);
$buffy .= '<div id=' . $this->block_uid . ' class="td_block_inner">';
//inner content of the block
$buffy .= $this->inner($td_query->posts);
$buffy .= '</div>';
//get the ajax pagination for this block
$buffy .= $this->get_block_pagination($atts, $td_unique_id);
$buffy .= '</div> <!-- ./block1 -->';
return $buffy;
}
示例2: get_pull_down_filter
/**
* @todo mega menu subcats - folosim functia asta pentru ca e necesar sa avem alt output
* @return bool|string
*/
function get_pull_down_filter()
{
extract(shortcode_atts(array('limit' => 5, 'sort' => '', 'category_id' => '', 'category_ids' => '', 'custom_title' => '', 'custom_url' => '', 'show_child_cat' => '', 'sub_cat_ajax' => ''), $this->atts));
$buffy = '';
if (!empty($show_child_cat) and !empty($category_id)) {
$td_subcategories = get_categories(array('child_of' => $category_id));
if (!empty($td_subcategories)) {
if ($show_child_cat != 'all') {
$td_subcategories = array_slice($td_subcategories, 0, $show_child_cat);
}
$buffy .= '<div class="block-mega-child-cats">';
//show all categories only on ajax
if (empty($sub_cat_ajax)) {
$buffy .= '<a class="cur-sub-cat mega-menu-sub-cat-' . $this->block_uid . '" id="' . td_global::td_generate_unique_id() . '" data-td_block_id="' . $this->block_uid . '" data-td_filter_value="" href="' . get_category_link($category_id) . '">' . __td('All') . '</a>';
}
foreach ($td_subcategories as $td_category) {
$buffy .= '<a class="mega-menu-sub-cat-' . $this->block_uid . '" id="' . td_global::td_generate_unique_id() . '" data-td_block_id="' . $this->block_uid . '" data-td_filter_value="' . $td_category->cat_ID . '" href="' . get_category_link($td_category->cat_ID) . '">' . $td_category->name . '</a>';
}
$buffy .= '</div>';
} else {
//there are no subcategories, return false - this is used by the mega menu block to alter it's structure
return false;
}
}
return $buffy;
}
示例3: render
function render($atts, $content = null)
{
parent::render($atts);
// sets the live atts, $this->atts, $this->block_uid, $this->td_query (it runs the query)
// we have no related posts to display
if ($this->td_query->post_count == 0) {
return;
}
$buffy = '';
//output buffer
//get the js for this block
$buffy .= $this->get_block_js();
$buffy .= '<div class="' . $this->get_block_classes() . '">';
//get the filter for this block
$buffy .= '<h4 class="td-related-title">';
$buffy .= '<a id="' . td_global::td_generate_unique_id() . '" class="td-related-left td-cur-simple-item" data-td_filter_value="" data-td_block_id="' . $this->block_uid . '" href="#">' . __td('RELATED ARTICLES') . '</a>';
$buffy .= '<a id="' . td_global::td_generate_unique_id() . '" class="td-related-right" data-td_filter_value="td_related_more_from_author" data-td_block_id="' . $this->block_uid . '" href="#">' . __td('MORE FROM AUTHOR') . '</a>';
$buffy .= '</h4>';
$buffy .= '<div id=' . $this->block_uid . ' class="td_block_inner">';
$buffy .= $this->inner($this->td_query->posts);
//inner content of the block
$buffy .= '</div>';
//get the ajax pagination for this block
$buffy .= $this->get_block_pagination();
$buffy .= '</div> <!-- ./block -->';
return $buffy;
}
示例4: render
function render($atts)
{
$this->block_uid = td_global::td_generate_unique_id();
//update unique id on each render
extract(shortcode_atts(array('limit' => '6', 'custom_title' => '', 'custom_url' => '', 'hide_title' => '', 'header_color' => ''), $atts));
$cat_args = array('show_count' => true, 'orderby' => 'count', 'hide_empty' => false, 'order' => 'DESC', 'number' => $limit, 'exclude' => get_cat_ID(TD_FEATURED_CAT));
if (TD_DEPLOY_MODE == 'demo' or TD_DEPLOY_MODE == 'dev') {
$cat_args['exclude'] = '251, 252, 253, 254, 255, 256, 257, 258, 305, 306, ' . get_cat_ID(TD_FEATURED_CAT);
}
$categories = get_categories($cat_args);
$buffy = '';
$buffy .= '<div class="td_block_wrap td_popular_categories widget widget_categories">';
$buffy .= $this->get_block_title_raw($atts, 'Popular category');
if (!empty($categories)) {
$buffy .= '<ul>';
foreach ($categories as $category) {
if (strtolower($category->cat_name) != 'uncategorized') {
$buffy .= '<li><a href="' . get_category_link($category->cat_ID) . '">' . $category->name . '<span class="td-cat-no">' . $category->count . '</span></a></li>';
}
}
$buffy .= '</ul>';
}
$buffy .= '</div> <!-- ./block -->';
return $buffy;
}
示例5: get_pull_down_filter
/**
* renders the filter of the block
* @return string
*/
function get_pull_down_filter()
{
$buffy = '';
if (empty($this->template_data_array['td_pull_down_items'])) {
return '';
}
//generate unique id for this pull down filter control
$pull_down_wrapper_id = "td_pulldown_" . $this->template_data_array['block_uid'];
// wrapper
$buffy .= '<div class="td-subcat-filter" id="' . $pull_down_wrapper_id . '">';
// subcategory list
$buffy .= '<ul class="td-subcat-list" id="' . $pull_down_wrapper_id . '_list">';
foreach ($this->template_data_array['td_pull_down_items'] as $item) {
$buffy .= '<li class="td-subcat-item"><a class="td-subcat-link" id="' . td_global::td_generate_unique_id() . '" data-td_filter_value="' . $item['id'] . '" data-td_block_id="' . $this->template_data_array['block_uid'] . '" href="#">' . $item['name'] . '</a></li>';
}
$buffy .= '</ul>';
// subcategory dropdown list
$buffy .= '<div class="td-subcat-dropdown">';
$buffy .= '<div class="td-subcat-more" aria-haspopup="true"><span>' . __td('More', TD_THEME_NAME) . '</span><i class="td-icon-read-down"></i></div>';
// the dropdown list
$buffy .= '<ul class="td-pulldown-filter-list">';
$buffy .= '</ul>';
$buffy .= '</div>';
$buffy .= '</div>';
return $buffy;
}
示例6: render
function render($atts, $content = null)
{
parent::render($atts);
// sets the live atts, $this->atts, $this->block_uid, $this->td_query (it runs the query)
// this block need td_column_number to add rows if more posts are displayed on a post.
/// the td_column_number is not standard here, it's 5 for full width / 3 for content + sidebar
extract(shortcode_atts(array('td_column_number' => ''), $atts));
// we have no related posts to display
if ($this->td_query->post_count == 0) {
return;
}
$buffy = '';
//output buffer
//get the js for this block
$buffy .= $this->get_block_js();
$buffy .= '<div class="' . $this->get_block_classes() . '">';
//get the filter for this block
$buffy .= '<h4 class="td-related-title">';
$buffy .= '<a id="' . td_global::td_generate_unique_id() . '" class="td-related-left td-cur-simple-item" data-td_filter_value="" data-td_block_id="' . $this->block_uid . '" href="#">' . __td('RELATED ARTICLES', TD_THEME_NAME) . '</a>';
$buffy .= '<a id="' . td_global::td_generate_unique_id() . '" class="td-related-right" data-td_filter_value="td_related_more_from_author" data-td_block_id="' . $this->block_uid . '" href="#">' . __td('MORE FROM AUTHOR', TD_THEME_NAME) . '</a>';
$buffy .= '</h4>';
$buffy .= '<div id=' . $this->block_uid . ' class="td_block_inner">';
$buffy .= $this->inner($this->td_query->posts, $td_column_number);
//inner content of the block
$buffy .= '</div>';
//get the ajax pagination for this block
$buffy .= $this->get_block_pagination();
$buffy .= '</div> <!-- ./block -->';
return $buffy;
}
示例7: render
function render($atts, $content = null)
{
$this->block_uid = td_global::td_generate_unique_id();
//update unique id on each render
$buffy = '';
//output buffer
extract(shortcode_atts(array('limit' => 4, 'sort' => '', 'category_id' => '', 'category_ids' => '', 'tag_slug' => '', 'force_columns' => '', 'autoplay' => '', 'offset' => 0), $atts));
if (empty($td_column_number)) {
$td_column_number = td_util::vc_get_column_number();
// get the column width of the block
}
if ($td_column_number == 3) {
$current_limit = intval($limit);
$post_limit = constant(get_class($this->internal_block_instance) . '::POST_LIMIT');
$td_query = td_data_source::get_wp_query($atts);
if (!empty($td_query->posts)) {
if ($current_limit > $post_limit and count($td_query->posts) > $post_limit) {
$buffy .= '<div class="td-big-grid-slide td_block_wrap" id="iosSlider_' . $this->block_uid . '">';
$buffy .= '<div class="td-theme-slider td_block_inner" id="' . $this->block_uid . '">';
$current_offset = 0;
$atts['class'] = 'item';
while ($current_limit > 0) {
$atts['offset'] = $offset + $current_offset;
$buffy .= $this->internal_block_instance->render($atts);
$current_offset += $post_limit;
$current_limit -= $post_limit;
}
$buffy .= '</div>';
//end slider (if slider)
$buffy .= '<i class = "td-icon-left"></i>';
$buffy .= '<i class = "td-icon-right"></i>';
$buffy .= '</div>';
//end iosSlider (if slider)
$autoplay_settings = '';
$current_autoplay = filter_var($autoplay, FILTER_VALIDATE_INT);
if ($current_autoplay !== false) {
$autoplay_settings = 'autoSlide: true, autoSlideTimer: ' . $current_autoplay * 1000 . ',';
}
$slide_javascript = ';jQuery(document).ready(function() {
jQuery("#iosSlider_' . $this->block_uid . '").iosSlider({
snapToChildren: true,
desktopClickDrag: true,
keyboardControls: true,
responsiveSlides: true,
infiniteSlider: true,
' . $autoplay_settings . '
navPrevSelector: jQuery("#iosSlider_' . $this->block_uid . ' .td-icon-left"),
navNextSelector: jQuery("#iosSlider_' . $this->block_uid . ' .td-icon-right")
});
});';
td_js_buffer::add_to_footer($slide_javascript);
} else {
$buffy .= $this->internal_block_instance->render($atts);
}
}
}
return $buffy;
}
示例8: render_generic
static function render_generic($atts, $list_type)
{
$block_uid = td_global::td_generate_unique_id();
//update unique id on each render
$buffy = '';
//output buffer
$buffy .= '<div class="td_block_wrap td_block_video_playlist">';
$buffy .= '<div id=' . $block_uid . ' class="td_block_inner">';
//inner content of the block
$buffy .= self::inner($list_type);
$buffy .= '</div>';
$buffy .= '</div> <!-- ./block_video_playlist -->';
return $buffy;
}
示例9: render
function render($atts)
{
$this->block_uid = td_global::td_generate_unique_id();
//update unique id on each render
extract(shortcode_atts(array('alias' => ''), $atts));
$buffy = '';
$buffy .= '<div class="td_block_wrap td_revolution_slider">';
$buffy .= $this->get_block_title_raw($atts, '');
$buffy .= '<div class="td_mod_wrap">';
$buffy .= do_shortcode('[rev_slider ' . $alias . ']');
$buffy .= '</div>';
$buffy .= '</div>';
return $buffy;
}
示例10: render_before_list_wrap
function render_before_list_wrap()
{
if (td_global::$cur_single_template_sidebar_pos == 'no_sidebar') {
$td_class_nr_of_columns = ' td-3-columns ';
} else {
$td_class_nr_of_columns = ' td-2-columns ';
}
$buffy = '';
//generate unique gallery slider id
$this->smart_list_tip_1_unique_id = 'smart_list_tip1_' . td_global::td_generate_unique_id();
//wrapper with id for smart list wrapper type 1
$buffy .= '<div class="td_smart_list_1' . $td_class_nr_of_columns . '">';
$buffy .= '<div class="td-controls"><a class="td-left-smart-list doubleSliderPrevButton" href="#" onclick="return false;"><i class = "td-icon-left"></i>' . __td('Prev', TD_THEME_NAME) . '</a><a class="td-right-smart-list doubleSliderNextButton" href="#" onclick="return false;">' . __td('Next', TD_THEME_NAME) . '<i class = "td-icon-right"></i></a></div>';
$buffy .= '<div class="td-iosSlider td-smart-list-slider" id="' . $this->smart_list_tip_1_unique_id . '">';
$buffy .= '<div class ="td-slider">';
return $buffy;
}
示例11: render
function render($atts)
{
$this->block_uid = td_global::td_generate_unique_id();
//update unique id on each render
extract(shortcode_atts(array('limit' => 5, 'sort' => '', 'category_id' => '', 'category_ids' => '', 'custom_title' => '', 'custom_url' => '', 'hide_title' => '', 'show_child_cat' => '', 'tag_slug' => '', 'header_color' => ''), $atts));
$buffy = '';
//output buffer
$td_unique_id = td_global::td_generate_unique_id();
//custom categories
//get subcategories, it returns false if there are no categories
$get_block_sub_cats = $this->get_block_sub_cats($atts, $td_unique_id);
$buffy_categories = '';
$td_no_subcats_class = '';
//we have subcategories
if ($get_block_sub_cats !== false) {
$buffy_categories .= '<div class="td_mega_menu_sub_cats">';
//get the sub category filter for this block
$buffy_categories .= $get_block_sub_cats;
$buffy_categories .= '</div>';
$atts['limit'] = 4;
//alter the loop because we don't have space now with the categories
} else {
$td_no_subcats_class = ' td-no-subcats';
}
//end custom categories
$td_query =& td_data_source::get_wp_query($atts);
//by ref do the query
//get the js for this block
$buffy .= $this->get_block_js($atts, $td_query);
$buffy .= '<div class="td_block_wrap td_block_mega_menu' . $td_no_subcats_class . '">';
//get the block title
//$buffy .= $this->get_block_title($atts);
//add the categories IF we have some
$buffy .= $buffy_categories;
$buffy .= '<div id=' . $this->block_uid . ' class="td_block_inner animated fadeInDown">';
//inner content of the block
$buffy .= $this->inner($td_query->posts);
$buffy .= '</div>';
$buffy .= $this->get_block_pagination($atts, $td_unique_id);
//get the ajax pagination for this block
$buffy .= '<div class="clearfix"></div>';
$buffy .= '</div> <!-- ./block1 -->';
return $buffy;
}
示例12: render
function render($atts, $content = null)
{
parent::render($atts);
// sets the live atts, $this->atts, $this->block_uid, $this->td_query (it runs the query)
// this block need td_column_number to add rows if more posts are displayed on a post.
/// the td_column_number is not standard here, it's 5 for full width / 3 for content + sidebar
extract(shortcode_atts(array('td_column_number' => ''), $atts));
// we have no related posts to display
if ($this->td_query->post_count == 0) {
return;
}
$buffy = '';
//output buffer
//get the js for this block
$buffy .= $this->get_block_js();
$buffy .= '<div class="' . $this->get_block_classes() . '">';
//get the filter for this block
$buffy .= '<h4 class="td-related-title">';
// $buffy .= '<a id="' . td_global::td_generate_unique_id() . '" class="td-related-left td-cur-simple-item" data-td_filter_value="" data-td_block_id="' . $this->block_uid . '" href="#">' . __td('RELATED ARTICLES', TD_THEME_NAME) . '</a>';
$buffy .= '<span class="title-inner">' . __td('RELATED ARTICLES', TD_THEME_NAME) . '</span>';
// ZA Custom
$buffy .= '<div id="related-filter">Filter <img src="/wp-content/uploads/2015/12/icon-caret-down_white.png" alt=""></div>';
$buffy .= '<div class="td-related-mobile">';
$buffy .= '<a id="' . td_global::td_generate_unique_id() . '" class="td-related-right " data-td_filter_value="td_related_more_from_author" data-td_block_id="' . $this->block_uid . '" href="#"><div class="td-related-mobile-inner"><div class="icon-title"><img class="NEUTRAL" src="/wp-content/uploads/2015/12/icon-articleNeutual.png" alt=""><img class="NEUTRAL-hover" src="/wp-content/uploads/2015/12/icon-articleNeutual-selected.png" alt=""><span> NEUTRAL</span></div></div></a>';
$buffy .= '<a id="' . td_global::td_generate_unique_id() . '" class="td-related-right" data-td_filter_value="td_tag_slug_filter_happy" data-td_block_id="' . $this->block_uid . '" href="#"><div class="td-related-mobile-inner"><div class="icon-title"><img class="HAPPY" src="/wp-content/uploads/2015/12/icon-articleHappy.png" alt=""><img class="HAPPY-hover" src="/wp-content/uploads/2015/12/icon-articleHappy-selected.png" alt=""><span> HAPPY</span></div></div></a>';
$buffy .= '<a id="' . td_global::td_generate_unique_id() . '" class="td-related-right" data-td_filter_value="td_tag_slug_filter_funny" data-td_block_id="' . $this->block_uid . '" href="#"><div class="td-related-mobile-inner"><div class="icon-title"><img class="HAPPY" src="/wp-content/uploads/2015/12/icon-articleFunny.png" alt=""><img class="HAPPY-hover" src="/wp-content/uploads/2015/12/icon-articleFunny-selected.png" alt=""><span> FUNNY</span></div></div></a>';
$buffy .= '<a id="' . td_global::td_generate_unique_id() . '" class="td-related-right" data-td_filter_value="td_tag_slug_filter_romantic" data-td_block_id="' . $this->block_uid . '" href="#"><div class="td-related-mobile-inner"><div class="icon-title"><img class="HAPPY" src="/wp-content/uploads/2015/12/icon-articleRomantic.png" alt=""><img class="HAPPY-hover" src="/wp-content/uploads/2015/12/icon-articleRomantic-selected.png" alt=""><span> ROMANTIC</span></div></div></a>';
$buffy .= '<a id="' . td_global::td_generate_unique_id() . '" class="td-related-right" data-td_filter_value="td_tag_slug_filter_surprised" data-td_block_id="' . $this->block_uid . '" href="#"><div class="td-related-mobile-inner"><div class="icon-title"><img class="HAPPY" src="/wp-content/uploads/2015/12/icon-articleSurprised.png" alt=""><img class="HAPPY-hover" src="/wp-content/uploads/2015/12/icon-articleSurprised-selected.png" alt=""><span> SURPRISED</span></div></div></a>';
$buffy .= '<a id="' . td_global::td_generate_unique_id() . '" class="td-related-right" data-td_filter_value="td_tag_slug_filter_sad" data-td_block_id="' . $this->block_uid . '" href="#"><div class="td-related-mobile-inner"><div class="icon-title"><img class="HAPPY" src="/wp-content/uploads/2015/12/icon-articleSad.png" alt=""><img class="HAPPY-hover" src="/wp-content/uploads/2015/12/icon-articleSad-selected.png" alt=""><span> SAD</span></div></div></a>';
$buffy .= '</div>';
// End ZA Custom
$buffy .= '</h4>';
$buffy .= '<div id=' . $this->block_uid . ' class="td_block_inner">';
$buffy .= $this->inner($this->td_query->posts, $td_column_number);
//inner content of the block
$buffy .= '</div>';
//get the ajax pagination for this block
$buffy .= $this->get_block_pagination();
$buffy .= '</div> <!-- ./block -->';
return $buffy;
}
示例13: inner
function inner($posts, $td_column_number = '')
{
$buffy = '';
$navigation = '';
if (!empty($this->atts['navigation'])) {
$navigation = $this->atts['navigation'];
}
$td_block_layout = new td_block_layout();
if (!empty($posts)) {
$buffy .= $td_block_layout->open_row();
$trending_now_unique_id = td_global::td_generate_unique_id();
//generate unique id for this object
$buffy .= '<div class="td-trending-now-wrapper" id="' . $trending_now_unique_id . '" data-start="' . esc_attr($navigation) . '">';
$buffy .= '<div class="td-trending-now-title">' . __td('Trending Now', TD_THEME_NAME) . '</div><div class="td-trending-now-display-area">';
foreach ($posts as $post_count => $post) {
$td_module_trending_now = new td_module_trending_now($post);
$buffy .= $td_module_trending_now->render($post_count);
}
$buffy .= '</div>';
// ZA Cutom
// $buffy .= '<div class="td-next-prev-wrap">';
// $buffy .= '<a href="#"
// class="td_ajax-prev-pagex td-trending-now-nav-left"
// data-wrapper-id="' . $trending_now_unique_id . '"
// data-moving="left"
// data-control-start="' . $navigation . '"><i class="td-icon-menu-left"></i></a>';
// $buffy .= '<a href="#"
// class="td_ajax-next-pagex td-trending-now-nav-right"
// data-wrapper-id="' . $trending_now_unique_id . '"
// data-moving="right"
// data-control-start="' . $navigation . '"><i class="td-icon-menu-right"></i></a>';
// $buffy .= '</div>';
$buffy .= '</div>';
$buffy .= $td_block_layout->close_row();
}
$buffy .= $td_block_layout->close_all_tags();
return $buffy;
}
示例14: render
function render($atts)
{
$this->block_uid = td_global::td_generate_unique_id();
//update unique id on each render
}
示例15: td_gallery_shortcode
/**
* @param string $output - is empty !!!
* @param $atts
* @param bool $content
* @return mixed
*/
function td_gallery_shortcode($output = '', $atts, $content = false)
{
$buffy = '';
//check for gallery = slide
if (!empty($atts) and !empty($atts['td_select_gallery_slide']) and $atts['td_select_gallery_slide'] == 'slide') {
$td_double_slider2_no_js_limit = 7;
$td_nr_columns_slide = 'td-slide-on-2-columns';
$nr_title_chars = 95;
//check to see if we have or not sidebar on the page, to set the small images when need to show them on center
if (td_global::$cur_single_template_sidebar_pos == 'no_sidebar') {
$td_double_slider2_no_js_limit = 11;
$td_nr_columns_slide = 'td-slide-on-3-columns';
$nr_title_chars = 170;
}
$title_slide = '';
//check for the title
if (!empty($atts['td_gallery_title_input'])) {
$title_slide = $atts['td_gallery_title_input'];
//check how many chars the tile have, if more then 84 then that cut it and add ... after
if (mb_strlen($title_slide, 'UTF-8') > $nr_title_chars) {
$title_slide = mb_substr($title_slide, 0, $nr_title_chars, 'UTF-8') . '...';
}
}
$slide_images_thumbs_css = '';
$slide_display_html = '';
$slide_cursor_html = '';
$image_ids = explode(',', $atts['ids']);
//check to make sure we have images
if (count($image_ids) == 1 and !is_numeric($image_ids[0])) {
return;
}
$image_ids = array_map('trim', $image_ids);
//trim elements of the $ids_gallery array
//generate unique gallery slider id
$gallery_slider_unique_id = td_global::td_generate_unique_id();
$cur_item_nr = 1;
foreach ($image_ids as $image_id) {
//get the info about attachment
$image_attachment = td_util::attachment_get_full_info($image_id);
//get images url
$td_temp_image_url_80x60 = wp_get_attachment_image_src($image_id, 'td_80x60');
//for the slide - for small images slide popup
$td_temp_image_url_full = $image_attachment['src'];
//default big image - for magnific popup
//if we are on full wight (3 columns use the default images not the resize ones)
if (td_global::$cur_single_template_sidebar_pos == 'no_sidebar') {
$td_temp_image_url = wp_get_attachment_image_src($image_id, 'td_1021x580');
//1021x580 images - for big slide
} else {
$td_temp_image_url = wp_get_attachment_image_src($image_id, 'td_0x420');
//0x420 image sizes - for big slide
}
//check if we have all the images
if (!empty($td_temp_image_url[0]) and !empty($td_temp_image_url_80x60[0]) and !empty($td_temp_image_url_full)) {
//css for display the small cursor image
$slide_images_thumbs_css .= '
#' . $gallery_slider_unique_id . ' .td-doubleSlider-2 .td-item' . $cur_item_nr . ' {
background: url(' . $td_temp_image_url_80x60[0] . ') 0 0 no-repeat;
}';
//html for display the big image
$class_post_content = '';
if (!empty($image_attachment['description']) or !empty($image_attachment['caption'])) {
$class_post_content = 'td-gallery-slide-content';
}
//if picture has caption & description
$figcaption = '';
if (!empty($image_attachment['caption']) or !empty($image_attachment['description'])) {
$figcaption = '<figcaption class = "td-slide-caption ' . $class_post_content . '">';
if (!empty($image_attachment['caption'])) {
$figcaption .= '<div class = "td-gallery-slide-copywrite">' . $image_attachment['caption'] . '</div>';
}
if (!empty($image_attachment['description'])) {
$figcaption .= '<span>' . $image_attachment['description'] . '</span>';
}
$figcaption .= '</figcaption>';
}
$slide_display_html .= '
<div class = "td-slide-item td-item' . $cur_item_nr . '">
<figure class="td-slide-galery-figure td-slide-popup-gallery">
<a class="slide-gallery-image-link" href="' . $td_temp_image_url_full . '" title="' . $image_attachment['title'] . '" data-caption="' . esc_attr($image_attachment['caption'], ENT_QUOTES) . '" data-description="' . htmlentities($image_attachment['description'], ENT_QUOTES) . '">
<img src="' . $td_temp_image_url[0] . '" alt="' . htmlentities($image_attachment['alt'], ENT_QUOTES) . '">
</a>
' . $figcaption . '
</figure>
</div>';
//html for display the small cursor image
$slide_cursor_html .= '
<div class = "td-button td-item' . $cur_item_nr . '">
<div class = "td-border"></div>
</div>';
$cur_item_nr++;
}
//end check for images
}
//.........这里部分代码省略.........