wp-includes/link-template.php:1136Displays or retrieves the edit term link with formatting.
$linkstringoptional''$beforestringoptional''$afterstringoptional''$termint|WP_Term|nulloptionalnull$displaybooloptionaltruestring|nullOne hook fires while edit_term_link() runs, in this order:
Filters the anchor tag for the edit link of a term.
function edit_term_link( $link = '', $before = '', $after = '', $term = null, $display = true ) { if ( is_null( $term ) ) { $term = get_queried_object(); } else { $term = get_term( $term ); } if ( ! $term ) { return null; } if ( ! current_user_can( 'edit_term', $term->term_id ) ) { return null; } if ( empty( $link ) ) { $link = __( 'Edit This' ); } $link = '<a href="' . get_edit_term_link( $term->term_id, $term->taxonomy ) . '">' . $link . '</a>'; /** * Filters the anchor tag for the edit link of a term. * * @since 3.1.0 * * @param string $link The anchor tag for the edit link. * @param int $term_id Term ID. */ $link = $before . apply_filters( 'edit_term_link', $link, $term->term_id ) . $after; if ( $display ) { echo $link; } else { return $link; }}Introduced in 3.1.0. One change between 6.7.7 and 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
string|void to string|null.verified against sourcesrc/wp-includes/link-template.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.