How to update Comment post meta through an Ajax call
How to update Comment post meta through an Ajax call
How to update Comment post meta through an Ajax call
This is pretty easy to do. Put this code in your functions.php file. The logic is pretty straightforward. Get all posts with get_posts(). Iterate over all post, extract comments count and permalink of current post and Print out the results. . add_action( ‘init’, ‘get_comments_count’ ); // Hook to init, elsewhere or use directly in your … Read more
I have found a way by using nicEdit here’s the tutorial. In order to get this fully functioning, I had to amend my script slightly. jQuery(“.stickers img”).click(function(){ var img = jQuery(this).parent().html(); var text = jQuery(“#respond .nicEdit-main”).html(); jQuery(“#respond .nicEdit-main”).html(text + img); }); I hope this helps someone.
Place the following into a custom plugin or into your child theme’s functions file: add_action(“wp_insert_comment”, function() { global $current_user; if ( !$current_user->ID ) return; update_user_meta( $current_user->ID, “se_last_commented”, time() ); }); add_action(“init”, function() { if ( “wp-comments-post.php” == $GLOBALS[‘pagenow’] ) { global $current_user; if ( !$current_user->ID ) return; $last_commented = (int) get_user_meta( $current_user->ID, “se_last_commented”, 1 ); … Read more
Adding character count and limit in comments, modifying labels and fields – jetpack
All users/comments suspected as bot? [closed]
Turns out Advanced Custom Fields, a plugin I was already using, makes it super easy to insert additional fields into the comment form. ACF is so good that it has created a tutorial to do just this and how to output the data within the comment thread: https://www.advancedcustomfields.com/resources/get-values-comment/ However, by doing this the plugin adds … Read more
warnCommentChanges always being triggered on update
First of all, you don’t want unregistered users to be able to edit comments, because you have no way of knowing whether they are who they say they are. So, this can only be made to work for registered users. As you can see from roles and capabilities only editors and up can moderate comments. … Read more
I want to allow the use of a data-flw attribute in links in comments