Using the following snippet, you will be able to make term edition easier in WordPress.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | if ( !function_exists('edit_term_link') ) { function edit_term_link( $link = '', $before = '', $after = '', $term = null ) { if ( $term == null ) { global $wp_query; $term = $wp_query->get_queried_object(); } $tax = get_taxonomy( $term->taxonomy ); if ( !current_user_can($tax->cap->edit_terms) ) return; if ( empty($link) ) $link = __('Edit This'); $link = '<a href="' . get_edit_tag_link( $term->term_id, $term->taxonomy ) . '" title="' . $link . '">' . $link . '</a>'; echo $before . apply_filters( 'edit_term_link', $link, $term->term_id ) . $after; } } Once saved, add the following line of snippet on any category, tag or taxonomy template: <?php edit_term_link(); ?> |
Snippet Source/Credit: Joost de Valk