admin管理员组

文章数量:1302417

I need to edit the comments fields.

1 - The metadata should be only date; 2 - The comment itself should be trimmed; 3 - the word 'says' next to the name should be gone;

I believe I can manage the logics, however I do not know how to get these fields, apply the logic, and return them.

<article id="div-comment-5" class="comment-body">
    <footer class="comment-meta">
        <div class="comment-author vcard">
            <img alt="" src=";amp;d=mm&amp;r=g" srcset=";amp;d=mm&amp;r=g 2x" class="avatar avatar-50 photo" height="50" width="50" loading="lazy" />                      
            <b class="fn">
                <a href="; rel="external nofollow ugc" class="url">
                    Stefano Monteiro
                </a>
            </b> 
            <span class="says">says:</span>                 
        </div><!-- ment-author -->
        <div class="comment-metadata">
            <a href="/videos/music-classic-canada-37/#comment-5">
                <time datetime="2021-01-21T17:59:16+00:00">January 21, 2021 at 5:59 pm</time>
            </a> 
            <span class="edit-link">
                <a class="comment-edit-link" href="/wp-admin/comment.php?action=editcomment&amp;c=5">Edit</a>
            </span>                 
        </div><!-- ment-metadata -->
    </footer><!-- ment-meta -->
    <div class="comment-content">
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod 
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. </p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
    </div><!-- ment-content -->
    <div class="reply">
        <a rel="nofollow" class="comment-reply-link" href="/videos/music-classic-canada-37/?replytocom=5#respond" data-commentid="5" data-postid="830" data-belowelement="div-comment-5" data-respondelement="respond" data-replyto="Reply to Stefano Monteiro" aria-label="Reply to Stefano Monteiro">Reply</a>
    </div>  
</article>

本文标签: Edit Comments Fields