edit_term_link [ WordPress Function ]
edit_term_link ( $link = '', $before = '', $after = '', $term = null, $echo = true )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Display or retrieve edit term link with formatting.
Source
<?php
function edit_term_link( $link = '', $before = '', $after = '', $term = null, $echo = true ) {
if ( is_null( $term ) ) {
$term = 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_term_link( $term->term_id, $term->taxonomy ) . '" title="' . $link . '">' . $link . '</a>';
$link = $before . apply_filters( 'edit_term_link', $link, $term->term_id ) . $after;
if ( $echo )
echo $link;
else
return $link;
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- Function Reference/edit term link « WordPress Codex
Description. Display or retrieve edit term link with formatting. Usage. <?php edit_term_link( $link, $before, $after, $term, $echo ) ?> ...
codex.wordpress.org - Quick WP Tip: edit_term_link() • Yoast
Oct 14, 2010 ... So I made an edit_term_link function, created a patch and attached that to an already existing issue 9702 in the WordPress Trac that asked for ...
yoast.com - edit_term_link() WordPress function reference, arguments and ...
Display or retrieve edit term link with formatting. ... edit_term_link( $link = '', $ before = '', $after = '', $term = null, $echo = true ). link: (string) Optional. Anchor text.
queryposts.com - WordPress tip: How to make term edition easier
if ( !function_exists('edit_term_link') ) { function edit_term_link( $link = '', $before ... '</a>'; echo $before . apply_filters( 'edit_term_link', $link, $term->term_id ) .
www.wprecipes.com