本文整理汇总了PHP中td_util::create_array_authors方法的典型用法代码示例。如果您正苦于以下问题:PHP td_util::create_array_authors方法的具体用法?PHP td_util::create_array_authors怎么用?PHP td_util::create_array_authors使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类td_util
的用法示例。
在下文中一共展示了td_util::create_array_authors方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_array
static function get_array()
{
return array(array("param_name" => "category_id", "type" => "dropdown", "value" => td_util::get_category2id_array(), "heading" => __("Category filter:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "category_ids", "type" => "textfield", "value" => '', "heading" => __("Multiple categories filter:", TD_THEME_NAME), "description" => "To filter multiple categories, enter here the category IDs separated by commas (example: 13,23,18)", "holder" => "div", "class" => ""), array("param_name" => "tag_slug", "type" => "textfield", "value" => '', "heading" => __("Filter by tag slug:", TD_THEME_NAME), "description" => "To filter multiple tag slug, enter here the tag slugs separated by commas (example: tag1,tag2,tag3)", "holder" => "div", "class" => ""), array("param_name" => "sort", "type" => "dropdown", "value" => array('- Latest -' => '', 'Random posts Today' => 'random_today', 'Random posts from last 7 Day' => 'random_7_day', 'Alphabetical A -> Z' => 'alphabetical_order', 'Popular (all time)' => 'popular', 'Popular (last 7 days; enable first from ' . TD_THEME_NAME . ' Panel -> Post Settings -> Use 7 days post sorting)' => 'popular7', 'Featured' => 'featured', 'Highest rated (reviews)' => 'review_high', 'Random Posts' => 'random_posts', 'Most Commented' => 'comment_count'), "heading" => __("Sort order:", TD_THEME_NAME), "description" => "", "holder" => "div", "class" => ""), array("param_name" => "autors_id", "type" => "dropdown", "value" => td_util::create_array_authors(), "heading" => "Autors Filter:", "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("param_name" => "installed_post_types", "type" => "textfield", "value" => '', "heading" => __("Post Type:", TD_THEME_NAME), "description" => "Usage: post OR post,events,pages ; write 1 or more post types delimited by comas", "holder" => "div", "class" => ""));
//end generic array
}
示例2: get_map_filter_array
/**
* the filter array (used by blocks and by the loop filters)
* @return array
*/
static function get_map_filter_array()
{
return array(array("param_name" => "category_id", "type" => "dropdown", "value" => td_util::get_category2id_array(), "heading" => 'Category filter:', "description" => "A single category filter. If you want to filter multiple categories, use the 'Multiple categories filter' and leave this to default", "holder" => "div", "class" => ""), array("param_name" => "category_ids", "type" => "textfield", "value" => '', "heading" => 'Multiple categories filter:', "description" => "Filter multiple categories by ID. Enter here the category IDs separated by commas (ex: 13,23,18). To exclude categories from this block add them with '-' (ex: -9, -10)", "holder" => "div", "class" => ""), array("param_name" => "tag_slug", "type" => "textfield", "value" => '', "heading" => 'Filter by tag slug:', "description" => "To filter multiple tag slugs, enter here the tag slugs separated by commas (ex: tag1,tag2,tag3)", "holder" => "div", "class" => ""), array("param_name" => "autors_id", "type" => "dropdown", "value" => td_util::create_array_authors(), "heading" => "Authors Filter:", "description" => "Filter by author. Shows only posts made by this author", "holder" => "div", "class" => ""), array("param_name" => "sort", "type" => "dropdown", "value" => array('- Latest -' => '', 'Random posts Today' => 'random_today', 'Random posts from last 7 Day' => 'random_7_day', 'Alphabetical A -> Z' => 'alphabetical_order', 'Popular (all time)' => 'popular', 'Popular (last 7 days; enable first from ' . TD_THEME_NAME . ' Panel -> Block settings -> 7 days post sorting)' => 'popular7', 'Featured' => 'featured', 'Highest rated (reviews)' => 'review_high', 'Random Posts' => 'random_posts', 'Most Commented' => 'comment_count'), "heading" => 'Sort order:', "description" => "How to sort the posts.", "holder" => "div", "class" => ""), array("param_name" => "installed_post_types", "type" => "textfield", "value" => '', "heading" => 'Post Type:', "description" => "Filter by post types. Usage: post OR post,events,pages ; write 1 or more post types delimited by commas", "holder" => "div", "class" => ""), array("param_name" => "limit", "type" => "textfield", "value" => '5', "heading" => 'Limit post number:', "description" => "If the field is empty the limit post number will be the number from Wordpress settings -> Reading", "holder" => "div", "class" => ""), array("param_name" => "offset", "type" => "textfield", "value" => '', "heading" => 'Offset posts:', "description" => "Start the count with an offset. If you have a block that shows 5 posts before this one, you can make this one start from the 6'th post (by using offset 5)", "holder" => "div", "class" => ""));
//end generic array
}