当前位置: 首页>>代码示例>>PHP>>正文


PHP td_global_blocks::add_instance方法代码示例

本文整理汇总了PHP中td_global_blocks::add_instance方法的典型用法代码示例。如果您正苦于以下问题:PHP td_global_blocks::add_instance方法的具体用法?PHP td_global_blocks::add_instance怎么用?PHP td_global_blocks::add_instance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在td_global_blocks的用法示例。


在下文中一共展示了td_global_blocks::add_instance方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: extract

        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());
开发者ID:Vatia13,项目名称:tofido,代码行数:30,代码来源:td_popular_categories.php

示例2: get_author_posts_url

                }
                $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());
开发者ID:Vatia13,项目名称:wordpress,代码行数:30,代码来源:td_authors.php

示例3: inner

    }
    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());
开发者ID:ryandong82,项目名称:colorfulladysite,代码行数:30,代码来源:td_slide_big.php

示例4: jQuery

        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());
开发者ID:Vatia13,项目名称:tofido,代码行数:30,代码来源:td_slide.php

示例5: get_map

                        $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());
开发者ID:Vatia13,项目名称:wordpress,代码行数:30,代码来源:td_block_4.php

示例6: inner

    }
    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());
开发者ID:Vatia13,项目名称:wordpress,代码行数:30,代码来源:td_block_6.php

示例7: get_categories

        $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());
开发者ID:Vatia13,项目名称:wordpress,代码行数:30,代码来源:td_block_mega_menu.php

示例8: add_shortcode

        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());
开发者ID:Vatia13,项目名称:tofido,代码行数:30,代码来源:td_text_with_title.php

示例9: get_map

                        $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());
开发者ID:Vatia13,项目名称:wordpress,代码行数:30,代码来源:td_block_5.php

示例10: foreach

        $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());
开发者ID:Vatia13,项目名称:wordpress,代码行数:30,代码来源:td_social.php

示例11: get_map

                        $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());
开发者ID:Vatia13,项目名称:tofido,代码行数:30,代码来源:td_block_8.php

示例12: extract

        //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());
}
开发者ID:Vatia13,项目名称:tofido,代码行数:31,代码来源:td_revolution_slider.php

示例13: inner

        $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());
开发者ID:Vatia13,项目名称:wordpress,代码行数:30,代码来源:td_block_9.php

示例14: get_map

                        $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());
开发者ID:Vatia13,项目名称:wordpress,代码行数:30,代码来源:td_block_3.php

示例15: extract

        //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());
开发者ID:Vatia13,项目名称:wordpress,代码行数:30,代码来源:td_ad_box.php


注:本文中的td_global_blocks::add_instance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。