In order to add comment meta data when a new comment is added I modified the wp-comments-post.php file. Now my worry is that when you upgrade wordpress, you will lose it.
So I am looking to find out whether the file is replaced during upgrade, and if so, what is the standard practice to do this?
The modifications I made were:
So I am looking to find out whether the file is replaced during upgrade, and if so, what is the standard practice to do this?
The modifications I made were:
Code:
if(isset($_POST['rating'])){
$rate = wp_filter_nohtml_kses($_POST['rating']);
add_comment_meta($comment_id, 'coumment_rating', $rate, false);
}