The get_comment_ID function was not working.
So use following code in location_meta_call function
function location_meta_call(){
$location = get_comment_meta($_GET["c"],'location', true);
}
add_filter('comment_save_pre','location_save');
function location_save($comment_content){
global $wpdb;
$id = $_POST['comment_ID'];
$text = $_POST['location_meta_box_text'];
update_comment_meta($id , 'location', $text);
return $comment_content;
}
Related Posts:
- How do I comment out a block of tags in XML?
- How to enable comments for pending and draft posts?
- A plugin where users can comment with Facebook or Twitter or OpenID [closed]
- Reverse comment pagination numbers
- Show comments from multiple post IDs in comment template
- get recent comments of a particular category
- Whitelisting Commenters
- WP_Comment_Query() displays “password protected” comments?
- Disable Comments Feed
- Use rich text editor in comments?
- Add a custom class to awating comments
- How to add custom comment fields but *only on the comment reply form*?
- Is it possible to move a comment that should be a reply to another comment?
- Can I seperate comments from post?
- Show only posts which can be commented
- What should I hook to add extra fields to comments?
- Get a variable field of all comments of current post
- Average Score of all ratings in comments
- Making a Comment on a page without being on that page?
- Display commenter’s registration date on comments?
- How do I display the commentor’s first name and last name in the comments?
- show un-approved comments at wordpress front end
- Warning: call_user_func_array() expects parameter 1 to be a valid callback, func
- How To Disable Comments On New Page
- What is the server IP comment hack
- How to add consent checkbox in comment section
- Do I have to have a nonce for a custom comment field?
- Get last seen date/time in wordpress get_comments() [closed]
- WP 4.4.1 allow empty comments via add_action ‘pre_comment_on_post’
- How to get replies of a comment?
- Recent comments from my blogs only
- Share comment to twitter after publishing [closed]
- changing comment-page-# to something like review-page-#
- Change username to nickname in comment section
- Hide notifications regarding new comments
- Are there any “YouTube-styled” commenting systems for WordPress?
- how to change comment author’s link from user’s website to author’s page(author.php)?
- Add class to comment form div when comment-reply button is clicked
- Add filter to comments loop?
- Disabling archives, search results, comments, etc?
- Pagination Comments Doesn’t Show
- Show comments to unregistered users
- WordPress comments – how to check if comment still needs to be approved?
- PAIN. Comments Pagination
- How to retain comment text on comment form after login/registration?
- Adding character count and limit in comments, modifying labels and fields – jetpack
- Check if comment was successfully submited
- Troubleshooting Emoji in Comments
- Change id=”respond” to the comments container
- Comments on Author page
- Link to a User’s Forum Profile From Their Comment
- if user role is then echo text
- Safely editing core files
- Why could my comment_form variable not be working?
- How to block comments and pings?
- Woocommerce comments subscription [closed]
- Can I turn off further comments on a single page?
- How to remove the number of a comment in the url slug?
- Add paragraph tags to comments
- How to tweak comment fields properly from functions.php
- Advanced Custom Fields comments [closed]
- How are readers authenticated for leaving comments?
- Are there some caveats for using guids for FB comments
- How to wrap comment_form $fields in one div?
- Two textareas showing up in comments.php
- How can I grab and show the reader comments of my site
- Make email not required comments.php
- My posts show 2 comment forms
- Modify links in user comments
- How indicate when a functions was upgraded in relationship to the entire program [closed]
- What templates/funtions needed in custom theme to allow comments the new 3.0 way
- Refresh individual comment text via API
- How to filter comments by comment_meta
- Prevent users to delete comments from trash
- How can I hide comment of the authors from their published posts?
- How to customize ‘children comments’ in WordPress?
- How to display replies to his comments in user profile of current user
- How do I refresh “Post Last Modified Time”, as long as comment is updated to Approve status?
- Top rated posts Average rating issue
- stop url changing when user comments
- Keep comment author’s name on their comment even when their account is deleted
- Badges for Guests based on their comment counts [closed]
- How to add a class to comment submit button?
- WordPress Commenting System User access and Security
- Comments.php is not getting called on main blog page
- Allowing comments on author pages
- How can I see whether a commenter has subscribed to be notified of replies / other comments to a post
- WordPress Comments – Only show part of user name
- Broken comments section – WordPress 2014 Theme
- Need an advice about comments
- I want to fill the comment with the comment count?
- How do I get the comments section to show up?
- By Default, Turn Comments Off for Pages & Leave Comments On for Posts
- same comment list for two posts
- Replace do_action() with a normal submit form in comments.php
- edit-comments.php in Admin – how to change ‘Comments’ title?
- Comments on pages not appearing, even though I enabled them
- Stop future commenting on specific post
- TinyMCE in comment reply form showing toolbar but can’t edit reply
- Add pending for reply comment in console WordPress