Advertisement
bharatmakwana

Remove Date and Time from WordPress Comments

Oct 1st, 2020
956
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.49 KB | None | 0 0
  1. function theme_prefix_remove_comment_date($date, $d, $comment) {
  2.     if ( !is_admin() ) {
  3.         return;
  4.     } else {
  5.         return $date;
  6.     }
  7. }
  8. add_filter( 'get_comment_date', 'theme_prefix_remove_comment_date', 10, 3);
  9. // Remove comment time
  10. function theme_prefix_remove_comment_time($date, $d, $comment) {
  11.     if ( !is_admin() ) {
  12.             return;
  13.     } else {
  14.             return $date;
  15.     }
  16. }
  17. add_filter( 'get_comment_time', 'theme_prefix_remove_comment_time', 10, 3);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement