Changeset 12515
- Timestamp:
- 12/23/2009 03:31:02 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/import/opml.php
r11380 r12515 56 56 <?php _e('Category:') ?> <select name="cat_id" id="cat_id"> 57 57 <?php 58 $categories = get_terms('link_category', 'get=all');58 $categories = get_terms('link_category', array('get' => 'all')); 59 59 foreach ($categories as $category) { 60 60 ?> -
trunk/wp-admin/import/wordpress.php
r12513 r12515 303 303 global $wpdb; 304 304 305 $cat_names = (array) get_terms('category', 'fields=names');305 $cat_names = (array) get_terms('category', array('fields' => 'names')); 306 306 307 307 while ( $c = array_shift($this->categories) ) { … … 333 333 global $wpdb; 334 334 335 $tag_names = (array) get_terms('post_tag', 'fields=names');335 $tag_names = (array) get_terms('post_tag', array('fields' => 'names')); 336 336 337 337 while ( $c = array_shift($this->tags) ) { -
trunk/wp-admin/import/wp-cat2tag.php
r11204 r12515 40 40 function populate_cats() { 41 41 42 $categories = get_categories( 'get=all');42 $categories = get_categories(array('get' => 'all')); 43 43 foreach ( $categories as $category ) { 44 44 $this->all_categories[] = $category; … … 50 50 function populate_tags() { 51 51 52 $tags = get_terms( array('post_tag'), 'get=all');52 $tags = get_terms( array('post_tag'), array('get' => 'all') ); 53 53 foreach ( $tags as $tag ) { 54 54 $this->all_tags[] = $tag; -
trunk/wp-admin/includes/bookmark.php
r11383 r12515 103 103 function wp_get_link_cats( $link_id = 0 ) { 104 104 105 $cats = wp_get_object_terms( $link_id, 'link_category', 'fields=ids');105 $cats = wp_get_object_terms( $link_id, 'link_category', array('fields' => 'ids') ); 106 106 107 107 return array_unique( $cats ); -
trunk/wp-admin/includes/export.php
r12506 r12515 44 44 $post_ids = $wpdb->get_col("SELECT ID FROM $wpdb->posts $where ORDER BY post_date_gmt ASC"); 45 45 46 $categories = (array) get_categories( 'get=all');47 $tags = (array) get_tags( 'get=all');46 $categories = (array) get_categories(array('get' => 'all')); 47 $tags = (array) get_tags(array('get' => 'all')); 48 48 49 49 $custom_taxonomies = $wp_taxonomies; … … 77 77 78 78 while ( $parents = wxr_missing_parents($categories) ) { 79 $found_parents = get_categories( "include=" . join(', ', $parents));79 $found_parents = get_categories(array('include' => join(', ', $parents))); 80 80 if ( is_array($found_parents) && count($found_parents) ) 81 81 $categories = array_merge($categories, $found_parents); -
trunk/wp-admin/includes/template.php
r12493 r12515 509 509 510 510 if ( $descendants_and_self ) { 511 $categories = get_categories( "child_of=$descendants_and_self&hierarchical=0&hide_empty=0");511 $categories = get_categories(array('child_of' => $descendants_and_self, 'hierarchical' => 0, 'hide_empty' => 0)); 512 512 $self = get_category( $descendants_and_self ); 513 513 array_unshift( $categories, $self ); 514 514 } else { 515 $categories = get_categories( 'get=all');515 $categories = get_categories(array('get' => 'all')); 516 516 } 517 517 … … 613 613 } 614 614 615 $categories = get_terms('link_category', 'orderby=count&hide_empty=0');615 $categories = get_terms('link_category', array('orderby' => 'count', 'hide_empty' => 0)); 616 616 617 617 if ( empty($categories) ) -
trunk/wp-admin/link-manager.php
r12317 r12515 108 108 109 109 <?php 110 $categories = get_terms('link_category', "hide_empty=1");110 $categories = get_terms('link_category', array("hide_empty" => 1)); 111 111 $select_cat = "<select name=\"cat_id\">\n"; 112 112 $select_cat .= '<option value="all"' . (($cat_id == 'all') ? " selected='selected'" : '') . '>' . __('View all Categories') . "</option>\n"; -
trunk/wp-app.php
r12488 r12515 375 375 376 376 $categories = ""; 377 $cats = get_categories( "hierarchical=0&hide_empty=0");377 $cats = get_categories(array('hierarchical' => 0, 'hide_empty' => 0)); 378 378 foreach ((array) $cats as $cat) { 379 379 $categories .= " <category term=\"" . esc_attr($cat->name) . "\" />\n"; -
trunk/wp-includes/bookmark.php
r12306 r12515 34 34 } elseif ( ! $_bookmark = wp_cache_get($bookmark, 'bookmark') ) { 35 35 $_bookmark = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->links WHERE link_id = %d LIMIT 1", $bookmark)); 36 $_bookmark->link_category = array_unique( wp_get_object_terms($_bookmark->link_id, 'link_category', 'fields=ids') );36 $_bookmark->link_category = array_unique( wp_get_object_terms($_bookmark->link_id, 'link_category', array('fields' => 'ids')) ); 37 37 wp_cache_add($_bookmark->link_id, $_bookmark, 'bookmark'); 38 38 } -
trunk/wp-includes/category.php
r11031 r12515 16 16 function get_all_category_ids() { 17 17 if ( ! $cat_ids = wp_cache_get( 'all_category_ids', 'category' ) ) { 18 $cat_ids = get_terms( 'category', 'fields=ids&get=all');18 $cat_ids = get_terms( 'category', array('fields' => 'ids', 'get' => 'all') ); 19 19 wp_cache_add( 'all_category_ids', $cat_ids, 'category' ); 20 20 } … … 114 114 $full_path .= ( $pathdir != '' ? '/' : '' ) . sanitize_title( $pathdir ); 115 115 116 $categories = get_terms( 'category', "get=all&slug=$leaf_path");116 $categories = get_terms( 'category', array('get' => 'all', 'slug' => $leaf_path) ); 117 117 118 118 if ( empty( $categories ) ) -
trunk/wp-includes/deprecated.php
r12459 r12515 987 987 $category = ''; 988 988 989 $results = get_bookmarks( "category=$category&orderby=$orderby&order=$order&show_updated=$show_updated&limit=$limit");989 $results = get_bookmarks(array('category' => $category, 'orderby' => $orderby, 'order' => $order, 'show_updated' => $show_updated, 'limit' => $limit)); 990 990 991 991 if ( !$results ) … … 1084 1084 $direction = ''; 1085 1085 1086 $cats = get_categories( "type=link&orderby=$order&order=$direction&hierarchical=0");1086 $cats = get_categories(array('type' => 'link', 'orderby' => $order, 'order' => $direction, 'hierarchical' => 0)); 1087 1087 1088 1088 // Display each category -
trunk/wp-includes/link-template.php
r12513 r12515 934 934 935 935 if ( $in_same_cat ) { 936 $cat_array = wp_get_object_terms($post->ID, 'category', 'fields=ids');936 $cat_array = wp_get_object_terms($post->ID, 'category', array('fields' => 'ids')); 937 937 $join .= " AND tt.taxonomy = 'category' AND tt.term_id IN (" . implode(',', $cat_array) . ")"; 938 938 } … … 1076 1076 if ( !empty($in_same_cat) || !empty($excluded_categories) ) { 1077 1077 if ( !empty($in_same_cat) ) { 1078 $cat_array = wp_get_object_terms($post->ID, 'category', 'fields=ids');1078 $cat_array = wp_get_object_terms($post->ID, 'category', array('fields' => 'ids')); 1079 1079 } 1080 1080 -
trunk/wp-includes/post.php
r12509 r12515 1896 1896 // Update counts for the post's terms. 1897 1897 foreach ( (array) get_object_taxonomies('post') as $taxonomy ) { 1898 $tt_ids = wp_get_object_terms($post_id, $taxonomy, 'fields=tt_ids');1898 $tt_ids = wp_get_object_terms($post_id, $taxonomy, array('fields' => 'tt_ids')); 1899 1899 wp_update_term_count($tt_ids, $taxonomy); 1900 1900 } -
trunk/wp-includes/taxonomy.php
r12510 r12515 1080 1080 1081 1081 foreach ( (array) $taxonomies as $taxonomy ) { 1082 $tt_ids = wp_get_object_terms($object_id, $taxonomy, 'fields=tt_ids');1082 $tt_ids = wp_get_object_terms($object_id, $taxonomy, array('fields' => 'tt_ids')); 1083 1083 $in_tt_ids = "'" . implode("', '", $tt_ids) . "'"; 1084 1084 do_action( 'delete_term_relationships', $object_id, $tt_ids ); … … 1511 1511 $values = array(); 1512 1512 $term_order = 0; 1513 $final_tt_ids = wp_get_object_terms($object_id, $taxonomy, 'fields=tt_ids');1513 $final_tt_ids = wp_get_object_terms($object_id, $taxonomy, array('fields' => 'tt_ids')); 1514 1514 foreach ( $tt_ids as $tt_id ) 1515 1515 if ( in_array($tt_id, $final_tt_ids) ) … … 1959 1959 return false; 1960 1960 1961 $terms = wp_get_object_terms($ids, $taxonomies, 'fields=all_with_object_id');1961 $terms = wp_get_object_terms($ids, $taxonomies, array('fields' => 'all_with_object_id')); 1962 1962 1963 1963 $object_terms = array(); … … 2030 2030 2031 2031 $children = array(); 2032 $terms = get_terms($taxonomy, 'get=all');2032 $terms = get_terms($taxonomy, array('get' => 'all')); 2033 2033 foreach ( $terms as $term ) { 2034 2034 if ( $term->parent > 0 ) -
trunk/wp-links-opml.php
r11204 r12515 37 37 38 38 if (empty ($link_cat)) 39 $cats = get_categories( "type=link&hierarchical=0");39 $cats = get_categories(array('type' => 'link', 'hierarchical' => 0)); 40 40 else 41 $cats = get_categories( 'type=link&hierarchical=0&include='.$link_cat);41 $cats = get_categories(array('type' => 'link', 'hierarchical' => 0, 'include' => $link_cat)); 42 42 43 43 foreach ((array) $cats as $cat) { … … 48 48 <?php 49 49 50 $bookmarks = get_bookmarks( "category={$cat->term_id}");50 $bookmarks = get_bookmarks(array("category" => $cat->term_id)); 51 51 foreach ((array) $bookmarks as $bookmark) { 52 52 $title = esc_attr(apply_filters('link_title', $bookmark->link_name)); -
trunk/xmlrpc.php
r12303 r12515 2807 2807 $categories_struct = array(); 2808 2808 2809 if ( $cats = get_categories( 'get=all') ) {2809 if ( $cats = get_categories(array('get' => 'all')) ) { 2810 2810 foreach ( $cats as $cat ) { 2811 2811 $struct['categoryId'] = $cat->term_id; … … 2999 2999 $categories_struct = array(); 3000 3000 3001 if ( $cats = get_categories( 'hide_empty=0&hierarchical=0') ) {3001 if ( $cats = get_categories(array('hide_empty' => 0, 'hierarchical' => 0)) ) { 3002 3002 foreach ($cats as $cat) { 3003 3003 $struct['categoryId'] = $cat->term_id;
Note: See TracChangeset
for help on using the changeset viewer.