Definition:
function edit_term_link( $link = '', $before = '', $after = '', $term = null, $echo = true ) {}
Parameters
- string $link: Optional. Anchor text.
- string $before: Optional. Display before edit link.
- string $after: Optional. Display after edit link.
- object $term: Term object
- $echo
Return values
returns:HTML content.
Defined filters
- edit_term_link
apply_filters( 'edit_term_link', $link, $term->term_id )
Source code
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;
}
9269

February 24, 2011 


akismet_update_comment_history
Definition:
function akismet_update_comment_history( $comment_id, $message, $event=null ) {}
Parameters
Source code
function akismet_update_comment_history( $comment_id, $message, $event=null ) { global $current_user; // failsafe for old WP versions if ( !function_exists('add_comment_meta') ) return false; $user = ''; if ( is_object($current_user) && isset($current_user->user_login) ) $user = $current_user->user_login; $event = array( 'time' => akismet_microtime(), 'message' => $message, 'event' => $event, 'user' => $user, ); // $unique = false so as to allow multiple values per comment $r = add_comment_meta( $comment_id, 'akismet_history', $event, false ); }9061