Changeset 16535 for trunk/wp-admin/includes/taxonomy.php
- Timestamp:
- 11/22/2010 05:17:26 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/taxonomy.php
r15690 r16535 200 200 * @since unknown 201 201 * 202 * @param unknown_type $post_id 203 * @return unknown 204 */ 205 function get_tags_to_edit( $post_id, $taxonomy = 'post_tag' ) { 206 return get_terms_to_edit( $post_id, $taxonomy); 207 } 208 209 /** 210 * {@internal Missing Short Description}} 211 * 212 * @since unknown 213 * 214 * @param unknown_type $post_id 215 * @return unknown 216 */ 217 function get_terms_to_edit( $post_id, $taxonomy = 'post_tag' ) { 218 $post_id = (int) $post_id; 219 if ( !$post_id ) 220 return false; 221 222 $tags = wp_get_post_terms($post_id, $taxonomy, array()); 223 224 if ( !$tags ) 225 return false; 226 227 if ( is_wp_error($tags) ) 228 return $tags; 229 230 foreach ( $tags as $tag ) 231 $tag_names[] = $tag->name; 232 $tags_to_edit = join( ',', $tag_names ); 233 $tags_to_edit = esc_attr( $tags_to_edit ); 234 $tags_to_edit = apply_filters( 'terms_to_edit', $tags_to_edit, $taxonomy ); 235 236 return $tags_to_edit; 237 } 238 239 /** 240 * {@internal Missing Short Description}} 241 * 242 * @since unknown 243 * 202 244 * @param unknown_type $tag_name 203 245 * @return unknown
Note: See TracChangeset
for help on using the changeset viewer.