Horje
Edit Comments is a simple WordPress plugin that allows commenters to edit their own comments. To edit a comment, a user must have the same IP address …

Noted That:

  • To install correctly this edit-comments.zip.
  • Fisrt Download the edit-comments.zip to your computer
  • Extract/Open edit-comments.zip to Your Computer.
  • Then, Find readme.txt file inside edit-comments.zip and Open readme.txt.
  • Now, Read the Requirements of this plugin. Which Wordpress Version and PHP Version are required to run this Plugin in Your Wordpress Site.
  • Then, Follow the the Tips Below.

Start the Tips:

1. First Download "edit-comments.zip" Plugin to your Local Computer. (Click Download)

2. Then, Login to your "yourdomain.com/wp-admin" Dashboard.

/stack/wp/e1593231376d7d849d2-4597-4fa3-a6ff-1eca18f72aab.png

3. Then, Click on "Plugins" + "Add New" from left sidemenu of Dashboard.

/stack/wp/e1593231378Screenshot20.png

4. Now, Click on "Upload Plugin" button.

/stack/wp/e1593231380Screenshot-2019-4-2AddPluginsHorjeWordPress.png

 

5. Now, Browse "edit-comments.zip" Downloaded plugin from your computer, Where you downloaded edit-comments.zip According to Step – 1 Above then, click on "Install Now"

/stack/wp/e15931461531577025694plugin.png

6. Now, Click on "Active Plugin"

/stack/wp/e15932313830ca45529-bf73-4101-8178-53ae60ce549f.png

7. Then, See left sidemenu. "Edit Comments" folder is added on left sidemenu. Now, Click on "Edit Comments" folder.

   Noted that: If you do not see "Edit Comments" folder on left sidemenu then, see at left sidemenu "Settings" or "Tools".

8. Now you configure yourself oR Watch video tutorial below about Edit Comments Configurtions and Settings or How to work "Edit Comments" in your WordPress site.

 

oR

After Activated Plugin According to Step-6 then,

  1. Go to "Plugins" + "Installed Plugin" from Wordpress Admin Panel Leftside Menu.
  2. or Direct go to: https://yourdomain/wp-admin/plugins.php
  3. Then, Find "Edit Comments" Activated Plugin from Plugin List.
  4. Then, Click on "Settings" from Plugin that is Edit Comments
  5. Now, Edit/Add/Config the setting and Click on "Save Changes" button,
WP Plugin Setting



Guide

Unfortunately, the edits required to make this plugin work are fairly extensive. They don’t, however, require any core edits, which means upgrading WordPress versions will not affect this plugin. I’ll try to explain the edits the best I can.

  1. Upload the plugin file “jal-edit-comments.php” to your plugins folder. This folder is located at /wp-contents/plugins/

  2. Activate the plugin from your WordPress admin panel.

  3. Here’s where it gets tricky. We’re going to need to make some changes to the comments.php file of your theme. This file is located in /wp-content/themes/**YOUR THEME NAME***/comments.php

  4. Before we make any edits, let’s make a backup of comments.php . Copy the file and name it comments-backup.php . You should now have two comment files in your theme directory, one called comments-backup.php and one called comments.php .

NOTE: For people using the default theme, Kubrick, I’ve included a modified copy of the comments.php file. It contains all the edits needed to make the plugin work. If you’re using a Kubrick-based theme, that file may also work for you.

  1. For the rest of you, it’ll require quite a bit of tweaking to get it right. Make the following edits to your comments.php file:

5a. First thing to do is add the link that users will click on to edit their comments. This will be added within the comment loop. The beginning of the comment loop looks like this:

And the end of the comment loop looks like:

Anything inbetween those two bits of code will be repeated for each comment. We need to add a tag that will create the link somewhere in this loop. The code is: . An example would be:

at |

This will output the comment date and time, and then the edit link. This function is a good replacement for WordPress’s edit_comment_link(). It uses the same structure and arguments.

5b. Now we need to account for three possible scenarios.

  • Someone who is logged in and making a comment
  • Someone who isn’t logged in and making a comment
  • Someone who is editing their comment (logged in or not doesn’t matter)

In your file, the first 2 are already accounted for. We need to make room for the last one.

Find this: . It means there is someone logged in. The next line might be something like “

<

p>Logged in as…..”

Here we go with a big edit. Delete this:
And change it to:

5c. Now we need to edit the where users input their comments. Look for:

And replace it with:

5d. You’re pretty much done! Now, we can just do a bit of beautification and cleanup.

We obviously don’t want to have the “Leave a Reply” message as the header of the comment area if they’re editing a comment. So change this:

Leave a Reply

To:

The above uses a ternary operator. Basically, if the someone is editing a comment, it will print “Edit your Comment”, and if not it will print “Leave a Reply” . You could also use this technique for the submit button.

  1. Break out a bottle of champagne. You just finished the installation of Edit Comments. Enjoy!

edit, comments, must, user, same, address, comment, have, commenters, simple,

Name

Reffered: https://wordpress.org/

Share on: