8889841cPKa[5)vvPostsAllTaxonomies.phpnu[options['0'] = n2_('All'); $terms = get_terms('post_tag'); if (count($terms)) { foreach ($terms as $term) { $this->options[$term->term_id] = '- ' . $term->name; } } } } PKa[M6O0PostsTaxonomies.phpnu[options['0'] = n2_('All'); $taxonomyNames = get_object_taxonomies($this->postType); if ($this->skip) { $skip = array( 'category', 'post_tag' ); } else { $skip = array(); } foreach ($taxonomyNames as $taxonomyName) { if (!in_array($taxonomyName, $skip)) { $terms = get_terms(array( 'taxonomy' => $taxonomyName )); if (count($terms)) { $taxonomy = get_taxonomy($taxonomyName); $options = array(); foreach ($terms as $term) { $options[$taxonomy->name . $this->postSeparator . $term->term_id] = '- ' . $term->name; } $this->optgroup[$taxonomy->label] = $options; } } } } /** * @param string $postType */ public function setPostType($postType) { $this->postType = $postType; } public function setPostSeparator($postSeparator) { $this->postSeparator = $postSeparator; } public function setSkip($skip) { $this->skip = $skip; } } PKa[BJ~~PostsCustomFields.phpnu[options['0'] = n2_('Nothing'); $metaKeys = $this->generate_meta_keys(); foreach ($metaKeys as $metaKey) { $this->options[$metaKey] = $metaKey; } } function generate_meta_keys() { global $wpdb; $query = "SELECT DISTINCT($wpdb->postmeta.meta_key) FROM $wpdb->posts LEFT JOIN $wpdb->postmeta ON $wpdb->posts.ID = $wpdb->postmeta.post_id WHERE $wpdb->posts.post_type = '%s' ORDER BY $wpdb->postmeta.meta_key ASC"; $meta_keys = $wpdb->get_col($wpdb->prepare($query, $this->postType)); return $meta_keys; } /** * @param string $postType */ public function setPostType($postType) { $this->postType = $postType; } }PKa[cJ((PostsOptions.phpnu[options['0'] = n2_('Nothing'); foreach ($options as $option => $value) { $this->options[$option] = $option; } } }PKa[NFQQPostsMetaKeys.phpnu[options['0'] = n2_('Nothing'); $metaKeys = $this->generate_meta_keys(); foreach ($metaKeys as $metaKey) { $this->options[$metaKey] = $metaKey; } } function generate_meta_keys() { global $wpdb; $query = "SELECT DISTINCT($wpdb->postmeta.meta_key) FROM $wpdb->posts LEFT JOIN $wpdb->postmeta ON $wpdb->posts.ID = $wpdb->postmeta.post_id ORDER BY $wpdb->postmeta.meta_key ASC"; $meta_keys = $wpdb->get_results($query, ARRAY_A); $return = array(); foreach ($meta_keys as $num => $array) { if (!empty($array['meta_key'])) { $return[] = $array['meta_key']; } } return $return; } }PKa[`aPostsPostTypes.phpnu[options['0'] = n2_('All'); $postTypes = get_post_types(); foreach ($postTypes as $postType) { $this->options[$postType] = $postType; } } }PKa[zRRPostsCategories.phpnu[ 'post', 'child_of' => 0, 'parent' => '', 'orderby' => 'name', 'order' => 'ASC', 'hide_empty' => 0, 'hierarchical' => 1, 'exclude' => '', 'include' => '', 'number' => '', 'taxonomy' => 'category', 'pad_counts' => false ); $categories = get_categories($args); $new = array(); foreach ($categories as $a) { $new[$a->category_parent][] = $a; } $list = array(); $options = $this->createTree($list, $new, 0); $this->options['0'] = n2_('All'); if (count($options)) { foreach ($options as $option) { $this->options[$option->cat_ID] = ' - ' . $option->treename; } } } } PKa[5)vvPostsAllTaxonomies.phpnu[PKa[#;U PostsTags.phpnu[PKa[M6O0PostsTaxonomies.phpnu[PKa[BJ~~ PostsCustomFields.phpnu[PKa[cJ((PostsOptions.phpnu[PKa[NFQQPostsMetaKeys.phpnu[PKa[`aPostsPostTypes.phpnu[PKa[zRRPostsCategories.phpnu[PKt