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; } function inner($posts, $td_column_number = '') { } function get_map() { return array("name" => __("Popular category", TD_THEME_NAME), "base" => "td_popular_categories", "class" => "td_popular_categories", "controls" => "full", "category" => __('Blocks', TD_THEME_NAME), 'icon' => 'icon-pagebuilder-popular_categories', "params" => array(array("param_name" => "limit", "type" => "textfield", "value" => "6", "heading" => __("Limit the number of categories shown):", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Header color", TD_THEME_NAME), "param_name" => "header_color", "value" => '', "description" => __("Choose a custom header color for this block", TD_THEME_NAME)), array("param_name" => "custom_title", "type" => "textfield", "value" => "", "heading" => __("Optional - custom title for this block:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "custom_url", "type" => "textfield", "value" => "", "heading" => __("Optional - custom url for this block (when the module title is clicked):", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "title_style", "type" => "dropdown", "value" => array('- default style -' => '', 'Style 1' => 'td_title_style_1'), "heading" => __("Title style:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "hide_title", "type" => "dropdown", "value" => array('- Show title -' => '', 'Hide title' => 'hide_title'), "heading" => __("Hide block title:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""))); } } td_global_blocks::add_instance('td_popular_categories', new td_popular_categories());
} $buffy .= '<div class="td-fake-click td_mod_wrap' . $current_author_class . '" data-fake-click="' . get_author_posts_url($td_author->ID) . '">'; $buffy .= '<a href="' . get_author_posts_url($td_author->ID) . '">' . get_avatar($td_author->user_email, '70') . '</a>'; $buffy .= '<div class="item-details">'; $buffy .= '<div class="td-authors-name">'; $buffy .= '<a href="' . get_author_posts_url($td_author->ID) . '">' . $td_author->display_name . '</a>'; $buffy .= '</div>'; $buffy .= '<span class="td-author-post-count">'; $buffy .= count_user_posts($td_author->ID) . ' ' . __td('POSTS'); $buffy .= '</span>'; $buffy .= '<span class="td-author-comments-count">'; $comment_count = $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) AS total FROM {$wpdb->comments} WHERE comment_approved = 1 AND user_id = %s", $td_author->ID)); $buffy .= $comment_count . ' ' . __td('COMMENTS'); $buffy .= '</span>'; $buffy .= '<div class="td-authors-url">'; $buffy .= '<a href="' . $td_author->user_url . '">' . $td_author->user_url . '</a>'; $buffy .= '</div>'; $buffy .= '</div>'; $buffy .= '</div>'; } } $buffy .= '</div>'; return $buffy; } function get_map() { return array("name" => __("Authors box", TD_THEME_NAME), "base" => "td_authors", "class" => "", "controls" => "full", "category" => __('Content', TD_THEME_NAME), 'icon' => 'icon-pagebuilder-td_authors', "params" => array(array("param_name" => "title", "type" => "textfield", "value" => '', "heading" => "Block title", "description" => "", "holder" => "div", "class" => ""), array("param_name" => "sort", "type" => "dropdown", "value" => array('- Sort by name -' => '', 'Sort by post count' => 'post_count'), "heading" => __("Sort authors by:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "exclude", "type" => "textfield", "value" => '', "heading" => "Exclude authors id (, separated)", "description" => "", "holder" => "div", "class" => ""), array("param_name" => "include", "type" => "textfield", "value" => '', "heading" => "Include authors id (, separated) - do not use with exclude", "description" => "", "holder" => "div", "class" => ""), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Header color", TD_THEME_NAME), "param_name" => "header_color", "value" => '', "description" => __("Choose a custom header color for this block", TD_THEME_NAME)))); } } td_global_blocks::add_instance('Authors box', new td_authors());
} function inner($posts, $td_column_number = '') { //global $post; $buffy = ''; $td_block_layout = new td_block_layout(); if (empty($td_column_number)) { $td_column_number = $td_block_layout->get_column_number(); // get the column width of the block } //echo $td_column_number; if ($td_column_number == 3 and !empty($posts)) { //$td_module_big_grid = new td_module_big_grid(); $td_module_big_grid = new td_module_slide_big(); $buffy .= $td_module_big_grid->render(array($posts, $this->td_create_slider, 'iosSlider_' . $this->block_uid)); } $buffy .= $td_block_layout->close_all_tags(); return $buffy; } function get_map() { //get the generic filter array $generic_filter_array = td_generic_filter_array::get_array(); unset($generic_filter_array[5]); //add custom filter fields to generic filter array array_push($generic_filter_array, array("param_name" => "autoplay", "type" => "textfield", "value" => '', "heading" => '自动播放幻灯片 (在 x 秒)', "description" => "留空禁用自动播放", "holder" => "div", "class" => ""), array("param_name" => "limit", "type" => "textfield", "value" => __("4", TD_THEME_NAME), "heading" => __("限制文章数量:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "offset", "type" => "textfield", "value" => __("", TD_THEME_NAME), "heading" => __("偏移文章:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => "")); return array("name" => __("大幻灯片", TD_THEME_NAME), "base" => "td_slide_big", "class" => "td_slide_big", "controls" => "full", "category" => __('区块', TD_THEME_NAME), 'icon' => 'icon-pagebuilder-slide_big', "params" => $generic_filter_array); } } td_global_blocks::add_instance('Slide big', new td_slide_big());
snapToChildren: true, desktopClickDrag: true, keyboardControls: false, ' . $autoplay_string . ' infiniteSlider: true, navPrevSelector: jQuery("#' . $td_unique_id_slide . ' .prevButton"), navNextSelector: jQuery("#' . $td_unique_id_slide . ' .nextButton"), onSlideComplete: slideContentComplete, onSlideStart: slideStartedMoving }); }); '; if ($is_ajax) { $buffy .= '<script>' . $slide_js . '</script>'; } else { td_js_buffer::add_to_footer($slide_js); } return $buffy; } function get_map() { //get the generic filter array $generic_filter_array = td_generic_filter_array::get_array(); //add custom filter fields to generic filter array array_push($generic_filter_array, array("param_name" => "autoplay", "type" => "textfield", "value" => '', "heading" => 'Autoplay slider (at x seconds)', "description" => "Leave empty do disable autoplay", "holder" => "div", "class" => ""), array("param_name" => "limit", "type" => "textfield", "value" => __("5", TD_THEME_NAME), "heading" => __("Limit post number:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "offset", "type" => "textfield", "value" => __("", TD_THEME_NAME), "heading" => __("Offset posts:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Header color", TD_THEME_NAME), "param_name" => "header_color", "value" => '', "description" => __("Choose a custom header color for this block", TD_THEME_NAME)), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Header text color", TD_THEME_NAME), "param_name" => "header_text_color", "value" => '', "description" => __("Choose a custom header color for this block", TD_THEME_NAME)), array("param_name" => "custom_title", "type" => "textfield", "value" => "", "heading" => __("Optional - custom title for this block:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "custom_url", "type" => "textfield", "value" => "", "heading" => __("Optional - custom url for this block (when the module title is clicked):", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "title_style", "type" => "dropdown", "value" => array('- default style -' => '', 'Style 1' => 'td_title_style_1'), "heading" => __("Title style:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "show_child_cat", "type" => "dropdown", "value" => array('- Hide -' => '', 'Show 1 category' => '1', 'Show 2 categories' => '2', 'Show 3 categories' => '3', 'Show 4 categories' => '4', 'Show 5 categories' => '5', 'Show 6 categories' => '6', 'Show 7 categories' => '7', 'Show 8 categories' => '8', 'Show all' => 'all'), "heading" => __("Show child categories menu:", TD_THEME_NAME), "description" => "This will show a menu at the top of the block that contains the child categories of the selected category. It only works when you're using a single category filter form the dropdown. It doss't work with multiple categories IDs", "holder" => "div", "class" => "")); return array("name" => __("Slide", TD_THEME_NAME), "base" => "td_slide", "class" => "td_slide", "controls" => "full", "category" => __('Blocks', TD_THEME_NAME), 'icon' => 'icon-pagebuilder-slide', "params" => $generic_filter_array); } } td_global_blocks::add_instance('Slide', new td_slide());
$buffy .= $td_block_layout->open4(); $buffy .= $td_module_3->render($post); $buffy .= $td_block_layout->close4(); if ($td_current_column == 3) { $buffy .= $td_block_layout->close_row(); } break; } //current column if ($td_current_column == $td_column_number) { $td_current_column = 1; } else { $td_current_column++; } $td_post_count++; } } $buffy .= $td_block_layout->close_all_tags(); return $buffy; } function get_map() { //get the generic filter array $generic_filter_array = td_generic_filter_array::get_array(); //add custom filter fields to generic filter array array_push($generic_filter_array, array("param_name" => "limit", "type" => "textfield", "value" => __("5", TD_THEME_NAME), "heading" => __("Limit post number:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "offset", "type" => "textfield", "value" => __("", TD_THEME_NAME), "heading" => __("Offset posts:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Header color", TD_THEME_NAME), "param_name" => "header_color", "value" => '', "description" => __("Choose a custom header color for this block", TD_THEME_NAME)), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Header text color", TD_THEME_NAME), "param_name" => "header_text_color", "value" => '', "description" => __("Choose a custom header color for this block", TD_THEME_NAME)), array("param_name" => "custom_title", "type" => "textfield", "value" => "", "heading" => __("Optional - custom title for this block:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "custom_url", "type" => "textfield", "value" => "", "heading" => __("Optional - custom url for this block (when the module title is clicked):", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "title_style", "type" => "dropdown", "value" => array('- default style -' => '', 'Style 1' => 'td_title_style_1'), "heading" => __("Title style:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "show_child_cat", "type" => "dropdown", "value" => array('- Hide -' => '', 'Show 1 category' => '1', 'Show 2 categories' => '2', 'Show 3 categories' => '3', 'Show 4 categories' => '4', 'Show 5 categories' => '5', 'Show 6 categories' => '6', 'Show 7 categories' => '7', 'Show 8 categories' => '8', 'Show all' => 'all'), "heading" => __("Show child categories menu:", TD_THEME_NAME), "description" => "This will show a menu at the top of the block that contains the child categories of the selected category. It only works when you're using a single category filter form the dropdown. It doss't work with multiple categories IDs", "holder" => "div", "class" => ""), array("param_name" => "sub_cat_ajax", "type" => "dropdown", "value" => array('- Use ajax -' => '', 'Do not use ajax' => 'n'), "heading" => __("Use ajax in child categories menu:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "ajax_pagination", "type" => "dropdown", "value" => array('- No pagination -' => '', 'Next Prev ajax' => 'next_prev', 'Load More button' => 'load_more', 'Infinite load' => 'infinite'), "heading" => __("Pagination:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => "")); return array("name" => __("Block 4", TD_THEME_NAME), "base" => "td_block4", "class" => "td_block4", "controls" => "full", "category" => __('Blocks', TD_THEME_NAME), 'icon' => 'icon-pagebuilder-block4', "params" => $generic_filter_array); } } td_global_blocks::add_instance('Block 4', new td_block_4());
} function inner($posts, $td_column_number = '') { $buffy = ''; $td_block_layout = new td_block_layout(); if (empty($td_column_number)) { $td_column_number = $td_block_layout->get_column_number(); // get the column width of the block } $td_current_column = 1; //the current column if (!empty($posts)) { foreach ($posts as $post) { $td_module_9 = new td_module_9($post); $buffy .= $td_module_9->render($post); } } $buffy .= $td_block_layout->close_all_tags(); return $buffy; } function get_map() { //get the generic filter array $generic_filter_array = td_generic_filter_array::get_array(); //add custom filter fields to generic filter array array_push($generic_filter_array, array("param_name" => "limit", "type" => "textfield", "value" => __("5", TD_THEME_NAME), "heading" => __("Limit post number:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "offset", "type" => "textfield", "value" => __("", TD_THEME_NAME), "heading" => __("Offset posts:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Header color", TD_THEME_NAME), "param_name" => "header_color", "value" => '', "description" => __("Choose a custom header color for this block", TD_THEME_NAME)), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Header text color", TD_THEME_NAME), "param_name" => "header_text_color", "value" => '', "description" => __("Choose a custom header color for this block", TD_THEME_NAME)), array("param_name" => "custom_title", "type" => "textfield", "value" => "", "heading" => __("Optional - custom title for this block:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "custom_url", "type" => "textfield", "value" => "", "heading" => __("Optional - custom url for this block (when the module title is clicked):", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "title_style", "type" => "dropdown", "value" => array('- default style -' => '', 'Style 1' => 'td_title_style_1'), "heading" => __("Title style:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "show_child_cat", "type" => "dropdown", "value" => array('- Hide -' => '', 'Show 1 category' => '1', 'Show 2 categories' => '2', 'Show 3 categories' => '3', 'Show 4 categories' => '4', 'Show 5 categories' => '5', 'Show 6 categories' => '6', 'Show 7 categories' => '7', 'Show 8 categories' => '8', 'Show all' => 'all'), "heading" => __("Show child categories menu:", TD_THEME_NAME), "description" => "This will show a menu at the top of the block that contains the child categories of the selected category. It only works when you're using a single category filter form the dropdown. It doss't work with multiple categories IDs", "holder" => "div", "class" => ""), array("param_name" => "sub_cat_ajax", "type" => "dropdown", "value" => array('- Use ajax -' => '', 'Do not use ajax' => 'n'), "heading" => __("Use ajax in child categories menu:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "ajax_pagination", "type" => "dropdown", "value" => array('- No pagination -' => '', 'Next Prev ajax' => 'next_prev', 'Load More button' => 'load_more', 'Infinite load' => 'infinite'), "heading" => __("Pagination:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => "")); return array("name" => __("Block 6", TD_THEME_NAME), "base" => "td_block6", "class" => "td_block6", "controls" => "full", "category" => __('Blocks', TD_THEME_NAME), 'icon' => 'icon-pagebuilder-block6', "params" => $generic_filter_array); } } td_global_blocks::add_instance('Block 6', new td_block_6());
$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 .= '<div><a class="cur-sub-cat ajax-sub-cat-mega sub-cat-' . $this->block_uid . '" id="sub-cat-' . $this->block_uid . '-' . $category_id . '" data-cat_id="' . $category_id . '" data-td_block_id="' . $this->block_uid . '" href="' . get_category_link($category_id) . '">' . __td('All') . '</a></div>'; } foreach ($td_subcategories as $td_category) { if (empty($sub_cat_ajax)) { $buffy .= '<div><a class="ajax-sub-cat-mega sub-cat-' . $this->block_uid . '" id="sub-cat-' . $this->block_uid . '-' . $td_category->cat_ID . '" data-cat_id="' . $td_category->cat_ID . '" data-td_block_id="' . $this->block_uid . '" href="' . get_category_link($td_category->cat_ID) . '">' . $td_category->name . '</a></div>'; } else { $buffy .= '<div><a href="' . get_category_link($td_category->cat_ID) . '">' . $td_category->name . '</a></div>'; } } $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; } } td_global_blocks::add_instance('td_mega_menu', new td_mega_menu());
add_shortcode('td_text_with_title', array($this, 'render')); } function render($atts, $content = null) { extract(shortcode_atts(array('image_pos' => ''), $atts)); $td_img_first_class = ''; if ($image_pos == 'img_first') { $td_img_first_class = ' td_img_first'; } $buffy = ''; $buffy .= '<div class="td_block_wrap td_text_with_title' . $td_img_first_class . '">'; $buffy .= $this->get_block_title_raw($atts, 'Please select a title'); $buffy .= '<div class="td_mod_wrap">'; //only run the filter if we have visual composer if (function_exists('wpb_js_remove_wpautop')) { $buffy .= wpb_js_remove_wpautop($content); } else { $buffy .= $content; //no visual composer } $buffy .= '</div>'; $buffy .= '</div>'; return $buffy; } function get_map() { return array("name" => __("Text with title", TD_THEME_NAME), "base" => "td_text_with_title", "class" => "", "controls" => "full", "category" => __('Content', TD_THEME_NAME), 'icon' => 'icon-pagebuilder-title', "params" => array(array("param_name" => "custom_title", "type" => "textfield", "value" => '', "heading" => "Block title", "description" => "", "holder" => "div", "class" => ""), array("param_name" => "content", "type" => "textarea_html", "holder" => "div", "class" => "", "heading" => __("Text", TD_THEME_NAME), "value" => "", "description" => __("Enter your content.", TD_THEME_NAME)), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Header color", TD_THEME_NAME), "param_name" => "header_color", "value" => '', "description" => __("Choose a custom header color for this block", TD_THEME_NAME)), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Header text color", TD_THEME_NAME), "param_name" => "header_text_color", "value" => '', "description" => __("Choose a custom header color for this block", TD_THEME_NAME)), array("param_name" => "title_style", "type" => "dropdown", "value" => array('- default style -' => '', 'Style 1' => 'td_title_style_1'), "heading" => __("Title style:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "image_pos", "type" => "dropdown", "value" => array('- text first -' => '', 'image first' => 'img_first'), "heading" => __("Alignment:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""))); } } td_global_blocks::add_instance('Text with title', new td_text_with_title());
$buffy .= $td_block_layout->open4(); $buffy .= $td_module_4->render($post); $buffy .= $td_block_layout->close4(); if ($td_current_column == 3) { $buffy .= $td_block_layout->close_row(); } break; } //current column if ($td_current_column == $td_column_number) { $td_current_column = 1; } else { $td_current_column++; } $td_post_count++; } } $buffy .= $td_block_layout->close_all_tags(); return $buffy; } function get_map() { //get the generic filter array $generic_filter_array = td_generic_filter_array::get_array(); //add custom filter fields to generic filter array array_push($generic_filter_array, array("param_name" => "limit", "type" => "textfield", "value" => __("5", TD_THEME_NAME), "heading" => __("Limit post number:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "offset", "type" => "textfield", "value" => __("", TD_THEME_NAME), "heading" => __("Offset posts:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Header color", TD_THEME_NAME), "param_name" => "header_color", "value" => '', "description" => __("Choose a custom header color for this block", TD_THEME_NAME)), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Header text color", TD_THEME_NAME), "param_name" => "header_text_color", "value" => '', "description" => __("Choose a custom header color for this block", TD_THEME_NAME)), array("param_name" => "custom_title", "type" => "textfield", "value" => "", "heading" => __("Optional - custom title for this block:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "custom_url", "type" => "textfield", "value" => "", "heading" => __("Optional - custom url for this block (when the module title is clicked):", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "title_style", "type" => "dropdown", "value" => array('- default style -' => '', 'Style 1' => 'td_title_style_1'), "heading" => __("Title style:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "show_child_cat", "type" => "dropdown", "value" => array('- Hide -' => '', 'Show 1 category' => '1', 'Show 2 categories' => '2', 'Show 3 categories' => '3', 'Show 4 categories' => '4', 'Show 5 categories' => '5', 'Show 6 categories' => '6', 'Show 7 categories' => '7', 'Show 8 categories' => '8', 'Show all' => 'all'), "heading" => __("Show child categories menu:", TD_THEME_NAME), "description" => "This will show a menu at the top of the block that contains the child categories of the selected category. It only works when you're using a single category filter form the dropdown. It doss't work with multiple categories IDs", "holder" => "div", "class" => ""), array("param_name" => "sub_cat_ajax", "type" => "dropdown", "value" => array('- Use ajax -' => '', 'Do not use ajax' => 'n'), "heading" => __("Use ajax in child categories menu:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "ajax_pagination", "type" => "dropdown", "value" => array('- No pagination -' => '', 'Next Prev ajax' => 'next_prev', 'Load More button' => 'load_more', 'Infinite load' => 'infinite'), "heading" => __("Pagination:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => "")); return array("name" => __("Block 5", TD_THEME_NAME), "base" => "td_block5", "class" => "td_block5", "controls" => "full", "category" => __('Blocks', TD_THEME_NAME), 'icon' => 'icon-pagebuilder-block5', "params" => $generic_filter_array); } } td_global_blocks::add_instance('Block 5', new td_block_5());
$buffy = ''; $buffy .= '<div class="td_block_wrap td-social-wrap td-social-wrap-' . $icon_size . '">'; $buffy .= $this->get_block_title_raw($atts); $buffy .= '<div class="td_mod_wrap">'; foreach (td_social_icons::$td_social_icons_array as $td_social_id => $td_social_name) { if (!empty($atts[$td_social_id])) { $buffy .= td_social_icons::get_icon($atts[$td_social_id], $td_social_id, $icon_style, $icon_size, $open_in_new_window); //echo $td_social_name . ' - ' . $td_social_id; } } $buffy .= '</div>'; $buffy .= '</div>'; return $buffy; } function get_map() { $td_pb_social_fields = array(); $td_pb_social_fields[] = array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Header color", TD_THEME_NAME), "param_name" => "header_color", "value" => '', "description" => __("Choose a custom header color for this block", TD_THEME_NAME)); $td_pb_social_fields[] = array("param_name" => "custom_title", "type" => "textfield", "value" => "", "heading" => __("Optional - custom title for this block:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""); $td_pb_social_fields[] = array("param_name" => "title_style", "type" => "dropdown", "value" => array('- default style -' => '', 'Style 1' => 'td_title_style_1'), "heading" => __("Title style:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""); $td_pb_social_fields[] = array("param_name" => "icon_style", "type" => "dropdown", "value" => array('- Style 1 -' => '1', 'Style 2' => '2', 'Style 3' => '3', 'Style 4' => '4'), "heading" => __("Icon style:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""); $td_pb_social_fields[] = array("param_name" => "icon_size", "type" => "dropdown", "value" => array('- 32 px -' => '32', '16 px' => '16', '64 px' => '64'), "heading" => __("Icon size:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""); $td_pb_social_fields[] = array("param_name" => "open_in_new_window", "type" => "dropdown", "value" => array('- Same window -' => '', 'New window' => 'y'), "heading" => __("Open in:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""); foreach (td_social_icons::$td_social_icons_array as $td_social_id => $td_social_name) { $td_pb_social_fields[] = array("param_name" => $td_social_id, "type" => "textfield", "value" => "", "heading" => $td_social_name . ' profile URL:', "description" => "", "holder" => "div", "class" => ""); } return array("name" => __("Social icons", TD_THEME_NAME), "base" => "td_social", "class" => "", "controls" => "full", "category" => __('Social', TD_THEME_NAME), 'icon' => 'icon-pagebuilder-social', "params" => $td_pb_social_fields); } } td_global_blocks::add_instance('Social', new td_social());
$buffy .= $td_block_layout->open4(); $buffy .= $td_module_5->render($post); $buffy .= $td_block_layout->close4(); if ($td_current_column == 3) { $buffy .= $td_block_layout->close_row(); } break; } //current column if ($td_current_column == $td_column_number) { $td_current_column = 1; } else { $td_current_column++; } $td_post_count++; } } $buffy .= $td_block_layout->close_all_tags(); return $buffy; } function get_map() { //get the generic filter array $generic_filter_array = td_generic_filter_array::get_array(); //add custom filter fields to generic filter array array_push($generic_filter_array, array("param_name" => "limit", "type" => "textfield", "value" => __("5", TD_THEME_NAME), "heading" => __("Limit post number:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "offset", "type" => "textfield", "value" => __("", TD_THEME_NAME), "heading" => __("Offset posts:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Header color", TD_THEME_NAME), "param_name" => "header_color", "value" => '', "description" => __("Choose a custom header color for this block", TD_THEME_NAME)), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Header text color", TD_THEME_NAME), "param_name" => "header_text_color", "value" => '', "description" => __("Choose a custom header color for this block", TD_THEME_NAME)), array("param_name" => "custom_title", "type" => "textfield", "value" => "", "heading" => __("Optional - custom title for this block:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "custom_url", "type" => "textfield", "value" => "", "heading" => __("Optional - custom url for this block (when the module title is clicked):", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "title_style", "type" => "dropdown", "value" => array('- default style -' => '', 'Style 1' => 'td_title_style_1'), "heading" => __("Title style:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "show_child_cat", "type" => "dropdown", "value" => array('- Hide -' => '', 'Show 1 category' => '1', 'Show 2 categories' => '2', 'Show 3 categories' => '3', 'Show 4 categories' => '4', 'Show 5 categories' => '5', 'Show 6 categories' => '6', 'Show 7 categories' => '7', 'Show 8 categories' => '8', 'Show all' => 'all'), "heading" => __("Show child categories menu:", TD_THEME_NAME), "description" => "This will show a menu at the top of the block that contains the child categories of the selected category. It only works when you're using a single category filter form the dropdown. It doss't work with multiple categories IDs", "holder" => "div", "class" => ""), array("param_name" => "sub_cat_ajax", "type" => "dropdown", "value" => array('- Use ajax -' => '', 'Do not use ajax' => 'n'), "heading" => __("Use ajax in child categories menu:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "ajax_pagination", "type" => "dropdown", "value" => array('- No pagination -' => '', 'Next Prev ajax' => 'next_prev', 'Load More button' => 'load_more', 'Infinite load' => 'infinite'), "heading" => __("Pagination:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => "")); return array("name" => __("Block 8", TD_THEME_NAME), "base" => "td_block8", "class" => "td_block8", "controls" => "full", "category" => __('Blocks', TD_THEME_NAME), 'icon' => 'icon-pagebuilder-block8', "params" => $generic_filter_array); } } td_global_blocks::add_instance('Block 8', new td_block_8());
//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; } function get_map() { global $wpdb; $rs = $wpdb->get_results("\n SELECT id, title, alias\n FROM " . $wpdb->prefix . "revslider_sliders\n \tORDER BY id ASC LIMIT 100\n \t"); $revsliders = array(); if ($rs) { foreach ($rs as $slider) { $revsliders[$slider->title] = $slider->alias; } } else { $revsliders["No sliders found"] = 0; } return array("name" => __("Revolution slider", TD_THEME_NAME), "base" => "td_revolution_slider", "class" => "td_revolution_slider", "controls" => "full", "category" => __('Blocks', TD_THEME_NAME), 'icon' => 'icon-pagebuilder-slide', "params" => array(array("type" => "dropdown", "heading" => __("Revolution Slider", "js_composer"), "param_name" => "alias", "admin_label" => true, "value" => $revsliders, "description" => __("Select your Revolution Slider.", "js_composer")), array("param_name" => "custom_title", "type" => "textfield", "value" => "", "heading" => __("Optional - custom title for this block:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "custom_url", "type" => "textfield", "value" => "", "heading" => __("Optional - custom url for this block (when the module title is clicked):", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "title_style", "type" => "dropdown", "value" => array('- default style -' => '', 'Style 1' => 'td_title_style_1'), "heading" => __("Title style:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "hide_title", "type" => "dropdown", "value" => array('- Show title -' => '', 'Hide title' => 'hide_title'), "heading" => __("Hide block title:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Header color", TD_THEME_NAME), "param_name" => "header_color", "value" => '', "description" => __("Choose a custom header color for this block", TD_THEME_NAME)), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Header text color", TD_THEME_NAME), "param_name" => "header_text_color", "value" => '', "description" => __("Choose a custom header color for this block", TD_THEME_NAME)))); } } //detect the slider if (isset($revSliderVersion)) { //add this shortcode only when rev slider is active td_global_blocks::add_instance('Revolution slider', new td_revolution_slider()); }
$buffy .= '</div> <!-- ./block1 -->'; return $buffy; } function inner($posts, $td_column_number = '') { $buffy = ''; $td_block_layout = new td_block_layout(); if (empty($td_column_number)) { $td_column_number = $td_block_layout->get_column_number(); // get the column width of the block } if (!empty($posts)) { foreach ($posts as $post) { $td_module_8 = new td_module_8($post); $buffy .= $td_module_8->render($post); } } $buffy .= $td_block_layout->close_all_tags(); return $buffy; } function get_map() { //get the generic filter array $generic_filter_array = td_generic_filter_array::get_array(); //add custom filter fields to generic filter array array_push($generic_filter_array, array("param_name" => "limit", "type" => "textfield", "value" => __("5", TD_THEME_NAME), "heading" => __("Limit post number:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "offset", "type" => "textfield", "value" => __("", TD_THEME_NAME), "heading" => __("Offset posts:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Header color", TD_THEME_NAME), "param_name" => "header_color", "value" => '', "description" => __("Choose a custom header color for this block", TD_THEME_NAME)), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Header text color", TD_THEME_NAME), "param_name" => "header_text_color", "value" => '', "description" => __("Choose a custom header color for this block", TD_THEME_NAME)), array("param_name" => "custom_title", "type" => "textfield", "value" => "", "heading" => __("Optional - custom title for this block:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "custom_url", "type" => "textfield", "value" => "", "heading" => __("Optional - custom url for this block (when the module title is clicked):", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "title_style", "type" => "dropdown", "value" => array('- default style -' => '', 'Style 1' => 'td_title_style_1'), "heading" => __("Title style:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "show_child_cat", "type" => "dropdown", "value" => array('- Hide -' => '', 'Show 1 category' => '1', 'Show 2 categories' => '2', 'Show 3 categories' => '3', 'Show 4 categories' => '4', 'Show 5 categories' => '5', 'Show 6 categories' => '6', 'Show 7 categories' => '7', 'Show 8 categories' => '8', 'Show all' => 'all'), "heading" => __("Show child categories menu:", TD_THEME_NAME), "description" => "This will show a menu at the top of the block that contains the child categories of the selected category. It only works when you're using a single category filter form the dropdown. It doss't work with multiple categories IDs", "holder" => "div", "class" => ""), array("param_name" => "sub_cat_ajax", "type" => "dropdown", "value" => array('- Use ajax -' => '', 'Do not use ajax' => 'n'), "heading" => __("Use ajax in child categories menu:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "ajax_pagination", "type" => "dropdown", "value" => array('- No pagination -' => '', 'Next Prev ajax' => 'next_prev', 'Load More button' => 'load_more', 'Infinite load' => 'infinite'), "heading" => __("Pagination:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => "")); return array("name" => __("Block 9", TD_THEME_NAME), "base" => "td_block9", "class" => "td_block9", "controls" => "full", "category" => __('Blocks', TD_THEME_NAME), 'icon' => 'icon-pagebuilder-block9', "params" => $generic_filter_array); } } td_global_blocks::add_instance('Block 9', new td_block_9());
$buffy .= $td_block_layout->open4(); $buffy .= $td_module_6->render($post); $buffy .= $td_block_layout->close4(); if ($td_current_column == 3) { $buffy .= $td_block_layout->close_row(); } break; } //current column if ($td_current_column == $td_column_number) { $td_current_column = 1; } else { $td_current_column++; } $td_post_count++; } } $buffy .= $td_block_layout->close_all_tags(); return $buffy; } function get_map() { //get the generic filter array $generic_filter_array = td_generic_filter_array::get_array(); //add custom filter fields to generic filter array array_push($generic_filter_array, array("param_name" => "limit", "type" => "textfield", "value" => __("5", TD_THEME_NAME), "heading" => __("Limit post number:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "offset", "type" => "textfield", "value" => __("", TD_THEME_NAME), "heading" => __("Offset posts:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Header color", TD_THEME_NAME), "param_name" => "header_color", "value" => '', "description" => __("Choose a custom header color for this block", TD_THEME_NAME)), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Header text color", TD_THEME_NAME), "param_name" => "header_text_color", "value" => '', "description" => __("Choose a custom header color for this block", TD_THEME_NAME)), array("param_name" => "custom_title", "type" => "textfield", "value" => "", "heading" => __("Optional - custom title for this block:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "custom_url", "type" => "textfield", "value" => "", "heading" => __("Optional - custom url for this block (when the module title is clicked):", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "title_style", "type" => "dropdown", "value" => array('- default style -' => '', 'Style 1' => 'td_title_style_1'), "heading" => __("Title style:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "show_child_cat", "type" => "dropdown", "value" => array('- Hide -' => '', 'Show 1 category' => '1', 'Show 2 categories' => '2', 'Show 3 categories' => '3', 'Show 4 categories' => '4', 'Show 5 categories' => '5', 'Show 6 categories' => '6', 'Show 7 categories' => '7', 'Show 8 categories' => '8', 'Show all' => 'all'), "heading" => __("Show child categories menu:", TD_THEME_NAME), "description" => "This will show a menu at the top of the block that contains the child categories of the selected category. It only works when you're using a single category filter form the dropdown. It doss't work with multiple categories IDs", "holder" => "div", "class" => ""), array("param_name" => "sub_cat_ajax", "type" => "dropdown", "value" => array('- Use ajax -' => '', 'Do not use ajax' => 'n'), "heading" => __("Use ajax in child categories menu:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "ajax_pagination", "type" => "dropdown", "value" => array('- No pagination -' => '', 'Next Prev ajax' => 'next_prev', 'Load More button' => 'load_more', 'Infinite load' => 'infinite'), "heading" => __("Pagination:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => "")); return array("name" => __("Block 3", TD_THEME_NAME), "base" => "td_block3", "class" => "td_block3", "controls" => "full", "category" => __('Blocks', TD_THEME_NAME), 'icon' => 'icon-pagebuilder-block3', "params" => $generic_filter_array); } } td_global_blocks::add_instance('Block 3', new td_block_3());
//the spot id header / sidebar etc we read it from shortcode extract(shortcode_atts(array('spot_id' => '', 'align' => ''), $atts)); $buffy = ''; $buffy .= '<div class="td-a-rec td-a-rec-id-' . $spot_id . $align . ' ' . (!empty($ad_array['disable_m']) ? ' td-rec-hide-on-m' : '') . (!empty($ad_array['disable_tl']) ? ' td-rec-hide-on-tl' : '') . (!empty($ad_array['disable_tp']) ? ' td-rec-hide-on-tp' : '') . (!empty($ad_array['disable_p']) ? ' td-rec-hide-on-p' : '') . '">'; $buffy .= do_shortcode(stripslashes($ad_array['ad_code'])); $buffy .= '</div>'; //print_r($ad_array); return $buffy; } function get_map() { //read the adspots $td_ad_spots = td_util::get_option('td_ad_spots'); $td_pb_ad_spots = array(); if (!empty($td_ad_spots)) { foreach ($td_ad_spots as $td_ad_spot) { $td_pb_ad_spots['Ad spot -- ' . $td_ad_spot['name']] = 'Ad spot -- ' . $td_ad_spot['name']; } } //read the google adspots $td_adsense_spots = td_util::get_option('td_adsense_spots'); if (!empty($td_adsense_spots)) { foreach ($td_adsense_spots as $td_ad_spot) { $td_pb_ad_spots['Adsense spot -- ' . $td_ad_spot['name']] = 'Adsense spot -- ' . $td_ad_spot['name']; } } return array("name" => __("Ad box", TD_THEME_NAME), "base" => "td_ad_box", "class" => "", "controls" => "full", "category" => __('Content', TD_THEME_NAME), 'icon' => 'icon-pagebuilder-ads', "params" => array(array("param_name" => "spot_id", "type" => "dropdown", "value" => array('sidebar' => 'sidebar', 'content_inline' => 'content_inline', 'content_top' => 'content_top', 'content_bottom' => 'content_bottom', 'header' => 'header', 'custom_ad_1' => 'custom_ad_1', 'custom_ad_2' => 'custom_ad_2', 'custom_ad_3' => 'custom_ad_3'), "heading" => __("Use adspot :", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""))); } } td_global_blocks::add_instance('Ad box', new td_ad_box());
$buffy .= $td_block_layout->close4(); if ($td_current_column == 3) { // column 3 $buffy .= $td_block_layout->close_row(); } } break; } //current column if ($td_current_column == $td_column_number) { $td_current_column = 1; } else { $td_current_column++; } $td_post_count++; } } $buffy .= $td_block_layout->close_all_tags(); return $buffy; } function get_map() { //get the generic filter array $generic_filter_array = td_generic_filter_array::get_array(); //add custom filter fields to generic filter array array_push($generic_filter_array, array("param_name" => "limit", "type" => "textfield", "value" => __("5", TD_THEME_NAME), "heading" => __("Limit post number:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "offset", "type" => "textfield", "value" => __("", TD_THEME_NAME), "heading" => __("Offset posts:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Header color", TD_THEME_NAME), "param_name" => "header_color", "value" => '', "description" => __("Choose a custom header color for this block", TD_THEME_NAME)), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Header text color", TD_THEME_NAME), "param_name" => "header_text_color", "value" => '', "description" => __("Choose a custom header color for this block", TD_THEME_NAME)), array("param_name" => "custom_title", "type" => "textfield", "value" => "", "heading" => __("Optional - custom title for this block:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "custom_url", "type" => "textfield", "value" => "", "heading" => __("Optional - custom url for this block (when the module title is clicked):", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "title_style", "type" => "dropdown", "value" => array('- default style -' => '', 'Style 1' => 'td_title_style_1'), "heading" => __("Title style:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "show_child_cat", "type" => "dropdown", "value" => array('- Hide -' => '', 'Show 1 category' => '1', 'Show 2 categories' => '2', 'Show 3 categories' => '3', 'Show 4 categories' => '4', 'Show 5 categories' => '5', 'Show 6 categories' => '6', 'Show 7 categories' => '7', 'Show 8 categories' => '8', 'Show all' => 'all'), "heading" => __("Show child categories menu:", TD_THEME_NAME), "description" => "This will show a menu at the top of the block that contains the child categories of the selected category. It only works when you're using a single category filter form the dropdown. It doss't work with multiple categories IDs", "holder" => "div", "class" => ""), array("param_name" => "sub_cat_ajax", "type" => "dropdown", "value" => array('- Use ajax -' => '', 'Do not use ajax' => 'n'), "heading" => __("Use ajax in child categories menu:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "ajax_pagination", "type" => "dropdown", "value" => array('- No pagination -' => '', 'Next Prev ajax' => 'next_prev', 'Load More button' => 'load_more', 'Infinite load' => 'infinite'), "heading" => __("Pagination:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => "")); return array("name" => __("Block 2", TD_THEME_NAME), "base" => "td_block2", "class" => "td_block2", "controls" => "full", "category" => __('Blocks', TD_THEME_NAME), 'icon' => 'icon-pagebuilder-block2', "params" => $generic_filter_array); } } td_global_blocks::add_instance('Block 2', new td_block_2());
$buffy .= $td_block_layout->open4(); $buffy .= $td_module_2->render($post); $buffy .= $td_block_layout->close4(); if ($td_current_column == 3) { $buffy .= $td_block_layout->close_row(); } break; } //current column if ($td_current_column == $td_column_number) { $td_current_column = 1; } else { $td_current_column++; } $td_post_count++; } } $buffy .= $td_block_layout->close_all_tags(); return $buffy; } function get_map() { //get the generic filter array $generic_filter_array = td_generic_filter_array::get_array(); //add custom filter fields to generic filter array array_push($generic_filter_array, array("param_name" => "limit", "type" => "textfield", "value" => __("5", TD_THEME_NAME), "heading" => __("Limit post number:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "offset", "type" => "textfield", "value" => __("", TD_THEME_NAME), "heading" => __("Offset posts:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Header color", TD_THEME_NAME), "param_name" => "header_color", "value" => '', "description" => __("Choose a custom header color for this block", TD_THEME_NAME)), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Header text color", TD_THEME_NAME), "param_name" => "header_text_color", "value" => '', "description" => __("Choose a custom header color for this block", TD_THEME_NAME)), array("param_name" => "custom_title", "type" => "textfield", "value" => "", "heading" => __("Optional - custom title for this block:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "custom_url", "type" => "textfield", "value" => "", "heading" => __("Optional - custom url for this block (when the module title is clicked):", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "title_style", "type" => "dropdown", "value" => array('- default style -' => '', 'Style 1' => 'td_title_style_1'), "heading" => __("Title style:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "show_child_cat", "type" => "dropdown", "value" => array('- Hide -' => '', 'Show 1 category' => '1', 'Show 2 categories' => '2', 'Show 3 categories' => '3', 'Show 4 categories' => '4', 'Show 5 categories' => '5', 'Show 6 categories' => '6', 'Show 7 categories' => '7', 'Show 8 categories' => '8', 'Show all' => 'all'), "heading" => __("Show child categories menu:", TD_THEME_NAME), "description" => "This will show a menu at the top of the block that contains the child categories of the selected category. It only works when you're using a single category filter form the dropdown. It doss't work with multiple categories IDs", "holder" => "div", "class" => ""), array("param_name" => "sub_cat_ajax", "type" => "dropdown", "value" => array('- Use ajax -' => '', 'Do not use ajax' => 'n'), "heading" => __("Use ajax in child categories menu:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "ajax_pagination", "type" => "dropdown", "value" => array('- No pagination -' => '', 'Next Prev ajax' => 'next_prev', 'Load More button' => 'load_more', 'Infinite load' => 'infinite'), "heading" => __("Pagination:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => "")); return array("name" => __("Block 7", TD_THEME_NAME), "base" => "td_block7", "class" => "td_block7", "controls" => "full", "category" => __('Blocks', TD_THEME_NAME), 'icon' => 'icon-pagebuilder-block7', "params" => $generic_filter_array); } } td_global_blocks::add_instance('Block 7', new td_block_7());
$buffy .= $td_block_layout->open4(); $buffy .= $td_module_2->render(); $buffy .= $td_block_layout->close4(); } else { //2-3 cols $buffy .= $td_block_layout->open4(); $buffy .= $td_module_3->render(); if ($td_post_count == 4) { //make new column $buffy .= $td_block_layout->close4(); } } break; } $td_post_count++; } } $buffy .= $td_block_layout->close_all_tags(); return $buffy; } function get_map() { //get the generic filter array $generic_filter_array = td_generic_filter_array::get_array(); //add custom filter fields to generic filter array array_push($generic_filter_array, array("param_name" => "limit", "type" => "textfield", "value" => __("5", TD_THEME_NAME), "heading" => __("Limit post number:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "offset", "type" => "textfield", "value" => __("", TD_THEME_NAME), "heading" => __("Offset posts:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Header color", TD_THEME_NAME), "param_name" => "header_color", "value" => '', "description" => __("Choose a custom header color for this block", TD_THEME_NAME)), array("type" => "colorpicker", "holder" => "div", "class" => "", "heading" => __("Header text color", TD_THEME_NAME), "param_name" => "header_text_color", "value" => '', "description" => __("Choose a custom header color for this block", TD_THEME_NAME)), array("param_name" => "custom_title", "type" => "textfield", "value" => "", "heading" => __("Optional - custom title for this block:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "custom_url", "type" => "textfield", "value" => "", "heading" => __("Optional - custom url for this block (when the module title is clicked):", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "title_style", "type" => "dropdown", "value" => array('- default style -' => '', 'Style 1' => 'td_title_style_1'), "heading" => __("Title style:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "show_child_cat", "type" => "dropdown", "value" => array('- Hide -' => '', 'Show 1 category' => '1', 'Show 2 categories' => '2', 'Show 3 categories' => '3', 'Show 4 categories' => '4', 'Show 5 categories' => '5', 'Show 6 categories' => '6', 'Show 7 categories' => '7', 'Show 8 categories' => '8', 'Show all' => 'all'), "heading" => __("Show child categories menu:", TD_THEME_NAME), "description" => "This will show a menu at the top of the block that contains the child categories of the selected category. It only works when you're using a single category filter form the dropdown. It doss't work with multiple categories IDs", "holder" => "div", "class" => ""), array("param_name" => "sub_cat_ajax", "type" => "dropdown", "value" => array('- Use ajax -' => '', 'Do not use ajax' => 'n'), "heading" => __("Use ajax in child categories menu:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "ajax_pagination", "type" => "dropdown", "value" => array('- No pagination -' => '', 'Next Prev ajax' => 'next_prev', 'Load More button' => 'load_more', 'Infinite load' => 'infinite'), "heading" => __("Pagination:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => "")); return array("name" => __("Block 1", TD_THEME_NAME), "base" => "td_block1", "class" => "td_block1", "controls" => "full", "category" => __('Blocks', TD_THEME_NAME), 'icon' => 'icon-pagebuilder-block1', "params" => $generic_filter_array); } } td_global_blocks::add_instance('Block 1', new td_block_1());