Changeset 16535 for trunk/wp-includes/taxonomy.php
- Timestamp:
- 11/22/2010 05:17:26 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/taxonomy.php
r16523 r16535 2947 2947 } 2948 2948 2949 2950 /**2951 * {@internal Missing Short Description}}2952 *2953 * @since unknown2954 *2955 * @param unknown_type $post_id2956 * @return unknown2957 */2958 function get_tags_to_edit( $post_id, $taxonomy = 'post_tag' ) {2959 return get_terms_to_edit( $post_id, $taxonomy);2960 }2961 2962 /**2963 * {@internal Missing Short Description}}2964 *2965 * @since unknown2966 *2967 * @param unknown_type $post_id2968 * @return unknown2969 */2970 function get_terms_to_edit( $post_id, $taxonomy = 'post_tag' ) {2971 $post_id = (int) $post_id;2972 if ( !$post_id )2973 return false;2974 2975 $tags = wp_get_post_terms($post_id, $taxonomy, array());2976 2977 if ( !$tags )2978 return false;2979 2980 if ( is_wp_error($tags) )2981 return $tags;2982 2983 foreach ( $tags as $tag )2984 $tag_names[] = $tag->name;2985 $tags_to_edit = join( ',', $tag_names );2986 $tags_to_edit = esc_attr( $tags_to_edit );2987 $tags_to_edit = apply_filters( 'terms_to_edit', $tags_to_edit, $taxonomy );2988 2989 return $tags_to_edit;2990 }2991 2992 2949 /** 2993 2950 * Returns the term's parent's term_ID
Note: See TracChangeset
for help on using the changeset viewer.