Definition:
function get_terms_to_edit( $post_id, $taxonomy = 'post_tag' ) {}
Parameters
- unknown_type $post_id
- $taxonomy
Defined filters
- terms_to_edit
apply_filters( 'terms_to_edit', $tags_to_edit, $taxonomy )
Source code
function get_terms_to_edit( $post_id, $taxonomy = 'post_tag' ) { $post_id = (int) $post_id; if ( !$post_id ) return false; $tags = wp_get_post_terms($post_id, $taxonomy, array()); if ( !$tags ) return false; if ( is_wp_error($tags) ) return $tags; foreach ( $tags as $tag ) $tag_names[] = $tag->name; $tags_to_edit = join( ',', $tag_names ); $tags_to_edit = esc_attr( $tags_to_edit ); $tags_to_edit = apply_filters( 'terms_to_edit', $tags_to_edit, $taxonomy ); return $tags_to_edit; }
1751
No comments yet... Be the first to leave a reply!