関数 edit_term_link()
2015/01/14
関数 edit_term_link()
定義ファイル :/blog/wp-includes/link-template.php 2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | function edit_term_link( $link = '', $before = '', $after = '', $term = null, $echo = true ) { if ( is_null( $term ) ) $term = get_queried_object(); if ( ! $term ) return; $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_term_link( $term->term_id, $term->taxonomy ) . '">' . $link . '</a>'; $link = $before . apply_filters( 'edit_term_link', $link, $term->term_id ) . $after; if ( $echo ) echo $link; else return $link; } |