Definition:
function _wp_kses_decode_entities_chr_hexdec( $match ) {}
Parameters
- array $match: preg match
Source code
function _wp_kses_decode_entities_chr_hexdec( $match ) {
return chr( hexdec( $match[1] ) );
}
4399
Definition:
function _wp_kses_decode_entities_chr_hexdec( $match ) {}
function _wp_kses_decode_entities_chr_hexdec( $match ) {
return chr( hexdec( $match[1] ) );
}
4399
Definition:
function _wp_kses_decode_entities_chr( $match ) {}
function _wp_kses_decode_entities_chr( $match ) {
return chr( $match[1] );
}
4397
Definition:
function _wp_get_post_autosave_hack( $query ) {}
function _wp_get_post_autosave_hack( $query ) {
$query->is_single = false;
}
4395
Definition:
function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) {}
apply_filters( 'comment_row_actions', array_filter($actions)function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) {
$GLOBALS['comment'] =& $comment;
$comment_post_url = get_edit_post_link( $comment->comment_post_ID );
$comment_post_title = strip_tags(get_the_title( $comment->comment_post_ID ));
$comment_post_link = "<a href='$comment_post_url'>$comment_post_title</a>";
$comment_link = '<a class="comment-link" href="' . esc_url(get_comment_link()) . '">#</a>';
$actions_string = '';
if ( current_user_can( 'edit_comment', $comment->comment_ID ) ) {
// preorder it: Approve | Reply | Edit | Spam | Trash
$actions = array(
'approve' => '', 'unapprove' => '',
'reply' => '',
'edit' => '',
'spam' => '',
'trash' => '', 'delete' => ''
);
$del_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "delete-comment_$comment->comment_ID" ) );
$approve_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "approve-comment_$comment->comment_ID" ) );
$approve_url = esc_url( "comment.php?action=approvecomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$approve_nonce" );
$unapprove_url = esc_url( "comment.php?action=unapprovecomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$approve_nonce" );
$spam_url = esc_url( "comment.php?action=spamcomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" );
$trash_url = esc_url( "comment.php?action=trashcomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" );
$delete_url = esc_url( "comment.php?action=deletecomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" );
$actions['approve'] = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved vim-a' title='" . esc_attr__( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';
$actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved vim-u' title='" . esc_attr__( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';
$actions['edit'] = "<a href='comment.php?action=editcomment&c={$comment->comment_ID}' title='" . esc_attr__('Edit comment') . "'>". __('Edit') . '</a>';
$actions['reply'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$comment->comment_post_ID.'\');return false;" class="vim-r hide-if-no-js" title="'.esc_attr__('Reply to this comment').'" href="#">' . __('Reply') . '</a>';
$actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . esc_attr__( 'Mark this comment as spam' ) . "'>" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . '</a>';
if ( !EMPTY_TRASH_DAYS )
$actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID::trash=1 delete vim-d vim-destructive'>" . __('Delete Permanently') . '</a>';
else
$actions['trash'] = "<a href='$trash_url' class='delete:the-comment-list:comment-$comment->comment_ID::trash=1 delete vim-d vim-destructive' title='" . esc_attr__( 'Move this comment to the trash' ) . "'>" . _x('Trash', 'verb') . '</a>';
$actions = apply_filters( 'comment_row_actions', array_filter($actions), $comment );
$i = 0;
foreach ( $actions as $action => $link ) {
++$i;
( ( ('approve' == $action || 'unapprove' == $action) && 2 === $i ) || 1 === $i ) ? $sep = '' : $sep = ' | ';
// Reply and quickedit need a hide-if-no-js span
if ( 'reply' == $action || 'quickedit' == $action )
$action .= ' hide-if-no-js';
$actions_string .= "<span class='$action'>$sep$link</span>";
}
}
4391
_wp_get_comment_list
Definition:
function _wp_get_comment_list( $status = '', $s = false, $start, $num, $post = 0, $type = '' ) {}
Parameters
Return values
returns:[0] contains the comments and [1] contains the total number of comments that match (ignoring $start and $num)
Source code
function _wp_get_comment_list( $status = '', $s = false, $start, $num, $post = 0, $type = '' ) { global $wpdb; $start = abs( (int) $start ); $num = (int) $num; $post = (int) $post; $count = wp_count_comments(); $index = ''; if ( 'moderated' == $status ) { $approved = "c.comment_approved = '0'"; $total = $count->moderated; } elseif ( 'approved' == $status ) { $approved = "c.comment_approved = '1'"; $total = $count->approved; } elseif ( 'spam' == $status ) { $approved = "c.comment_approved = 'spam'"; $total = $count->spam; } elseif ( 'trash' == $status ) { $approved = "c.comment_approved = 'trash'"; $total = $count->trash; } else { $approved = "( c.comment_approved = '0' OR c.comment_approved = '1' )"; $total = $count->moderated + $count->approved; $index = 'USE INDEX (c.comment_date_gmt)'; } if ( $post ) { $total = ''; $post = " AND c.comment_post_ID = '$post'"; } else { $post = ''; } $orderby = "ORDER BY c.comment_date_gmt DESC LIMIT $start, $num"; if ( 'comment' == $type ) $typesql = "AND c.comment_type = ''"; elseif ( 'pings' == $type ) $typesql = "AND ( c.comment_type = 'pingback' OR c.comment_type = 'trackback' )"; elseif ( 'all' == $type ) $typesql = ''; elseif ( !empty($type) ) $typesql = $wpdb->prepare("AND c.comment_type = %s", $type); else $typesql = ''; if ( !empty($type) ) $total = ''; $query = "FROM $wpdb->comments c LEFT JOIN $wpdb->posts p ON c.comment_post_ID = p.ID WHERE p.post_status != 'trash' "; if ( $s ) { $total = ''; $s = $wpdb->escape($s); $query .= "AND (c.comment_author LIKE '%$s%' OR c.comment_author_email LIKE '%$s%' OR c.comment_author_url LIKE ('%$s%') OR c.comment_author_IP LIKE ('%$s%') OR c.comment_content LIKE ('%$s%') ) AND $approved $typesql"; } else { $query .= "AND $approved $post $typesql"; } $comments = $wpdb->get_results("SELECT * $query $orderby"); if ( '' === $total ) $total = $wpdb->get_var("SELECT COUNT(c.comment_ID) $query"); update_comment_cache($comments); return array($comments, $total); }4393