How to add button approve the comment after line `comment awaiting moderation`?

142
April 17, 2018, at 06:49 AM

I have many comments, I don't want manager commenting in default comment system of Wordpress.

Because it don't have function sort order by "accept or decline".

I think to add a button "Accept comment" in view of the post is easy to manage. I can click to accept a new comment and reply at this.

Look like this image:

I know a new comment has structure like this.

Accept structure: https://example.com/wp-admin/comment.php?action=approve&c=159#wpbody-content

with 159 is the number of comment.

Decline structure: https://example.com/wp-admin/comment.php?action=trash&c=159#wpbody-content

I don't know: - Hook to add button approve in the comment. - How to get id of comment to execute code.

Here is sample code:

function filter_comment_form_accept_comment( $submit_button, $args ) {
    return 'https://example.com/wp-admin/comment.php?action=approve&c=159#wpbody-content
';
};
// add the filter
add_filter( '', 'filter_comment_form_accept_comment', 10, 2 );
READ ALSO
how to publish obtaining id $_SESSION

how to publish obtaining id $_SESSION

I briefly explain what my problem isI'm building in php, a website that allows you to post job advertisements

99
Fullcalendar, i would like to Create an event every 12 weeks on a Friday, until a specific date

Fullcalendar, i would like to Create an event every 12 weeks on a Friday, until a specific date

I develop an application with an API in CakePhp 3 and the front in AngularJSI integrate Fullcalendar and I would like to Create, for example : an event every 12 weeks on a Friday, until a specific date like google calendar

99
Decrypt VB TripleDES in PHP

Decrypt VB TripleDES in PHP

I have a 3rd party vendor setting up a page where they encrypt some data and send through the encoded token, where it is received on my php pageThe vendor works in VB and sent us the code used to encrypt the token, as well as our 48 character key and 16 character...

170