Changeset 6121
- Timestamp:
- 09/16/2007 02:36:23 AM (18 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r6120 r6121 582 582 $post = get_post($postid, $mode); 583 583 584 // Set categories 584 // Set categories and tags 585 585 if($mode == OBJECT) { 586 586 $post->post_category = wp_get_post_categories($postid); 587 $post->tags_input = wp_get_post_tags($postid, array('fields' => 'names')); 587 588 } 588 589 else { 589 590 $post['post_category'] = wp_get_post_categories($postid); 591 $post['tags_input'] = wp_get_post_tags($postid, array('fields' => 'names')); 590 592 } 591 593 -
trunk/wp-includes/taxonomy.php
r6118 r6121 869 869 else if ( 'ids' == $fields ) 870 870 $select_this = 't.term_id'; 871 else if ( 'names' == $fields ) 872 $select_this = 't.name'; 871 873 else if ( 'all_with_object_id' == $fields ) 872 874 $select_this = 't.*, tt.*, tr.object_id'; … … 877 879 $terms = $wpdb->get_results($query); 878 880 update_term_cache($terms); 879 } else if ( 'ids' == $fields ) {881 } else if ( 'ids' == $fields || 'names' == $fields ) { 880 882 $terms = $wpdb->get_col($query); 881 883 } else if ( 'tt_ids' == $fields ) {
Note: See TracChangeset
for help on using the changeset viewer.