// 删除评论中的链接
function mytheme_remove_url($arg) {
    $arg['url'] = '';
    return $arg;
}
add_filter('comment_form_default_fields', 'mytheme_remove_url');
// remove comment date && time 删除评论日期时间
function wpb_remove_comment_date($date, $d, $comment) { 
    if ( !is_admin() ) {
        return;
    } else { 
        return $date;
    }
}
add_filter( 'get_comment_date', 'wpb_remove_comment_date', 10, 3);
 
// remove comment time
function wpb_remove_comment_time($date, $d, $comment) { 
    if ( !is_admin() ) {
            return;
    } else { 
            return $date;
    }
}
// remove comment's edit button 删除评论编辑按钮
add_filter( 'get_comment_time', 'wpb_remove_comment_time', 10, 3);
add_filter( 'sce_comment_time', 'edit_sce_comment_time' );
function edit_sce_comment_time( $time_in_minutes ) {
    return 10;
}
//remove author link on comments 删除评论者的website url
function disable_comment_author_links( $author_link ){
return strip_tags( $author_link );
}
add_filter( 'get_comment_author_link', 'disable_comment_author_links' );


WordPress网站

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。