API Hook for After Commenting (for sharing on Facebook)

Have you tried comment_post action? It’s fired right after the comment is inserted into the database. function share_comment_on_facebook( $comment_ID ) { $commentdata = get_comment( $comment_ID ); if ( $commentdata[‘comment_approved’] ) { // fire up the code to launch pop up } } add_action( ‘comment_post’, ‘share_comment_on_facebook’ );

Can WordPress comments have titles and taxonomy?

Well. Theoretically. Comments do not have title field in a database. However they have meta natively, so quick add_comment_meta() can get you title–like custom field. Comments have links (get_comment_link()), but they are heavily based on context of singular post displaying them. Displaying comments by themselves with their own URLs structure would take some creative rewrite … Read more

Editing WordPress comments : generating comment from selection

Three aspects to this: Adding the checkboxes to the comment form Adding the values from the checkboxes to the comment meta data Displaying the values of the checkboxes Assuming you want to dynamically generate these based on the headings in the article, you’ll need to parse the post content for headings and add the checkboxes … Read more

How to move comments box above comments

You needed to move <?php comment_form(); ?> at the top, just above comment header title. Here is the modified code. <?php /** * The template for displaying comments. * * The area of the page that contains both current comments * and the comment form. * * @package Tesseract */ /* * If the current … Read more

How can I edit comment notification email content?

You can apply a filter to comment_notification_text: 1525 /** 1526 * Filter the comment notification email text. 1527 * 1528 * @since 1.5.2 1529 * 1530 * @param string $notify_message The comment notification email text. 1531 * @param int $comment_id Comment ID. 1532 */ 1533 $notify_message = apply_filters( ‘comment_notification_text’, $notify_message, $comment->comment_ID ); If you have … Read more

How to limit comment author to one comment per post

This would depend on how your theme handles saving comments. For instance if it submits the form via ajax it will be expecting certain returns. The way I would hook into this would probably be through the pre_comment_approved filter. Checking the received email against any previously submitted posts then return unapproved if it fails. function … Read more

Log file reports SQL Error processing child comments

It looks like this is a bug related to caching in WordPress v4.6.1 which you can follow on Trac ticket #37696. A proper fix is scheduled for WordPress v4.6.2, but in the meantime, you could try the following workaround reported by Rarst, who created the issue on Trac: Issue goes away if I disable Object … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)