Server IP : 172.67.214.6 / Your IP : 216.73.216.244 Web Server : LiteSpeed System : Linux premium900.web-hosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 User : redwjova ( 1790) PHP Version : 8.1.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/redwjova/near.llc/wp-content/plugins/softaculous-pro/main/ |
Upload File : |
<?php if(!defined('ABSPATH')){ die('HACKING ATTEMPT!'); } add_action('admin_init', function () { // Redirect any user trying to access comments page global $pagenow; if ($pagenow === 'edit-comments.php') { wp_safe_redirect(admin_url()); exit; } // Disable support for comments and trackbacks in post types foreach (get_post_types() as $post_type) { if (post_type_supports($post_type, 'comments')) { remove_post_type_support($post_type, 'comments'); remove_post_type_support($post_type, 'trackbacks'); } } }); // Return 0 comments add_filter('the_comments', 'softaculous_pro_the_comments', 10, 1); function softaculous_pro_the_comments( $comments ) { return array(); } // Return 0 comments number add_filter('get_comments_number', 'softaculous_pro_get_comments_number', 10, 1); function softaculous_pro_get_comments_number( $comments_number ) { return 0; } // Close comments on the front-end add_filter('comments_open', '__return_false', 20, 2); add_filter('pings_open', '__return_false', 20, 2); // Hide existing comments add_filter('comments_array', '__return_empty_array', 10, 2); // Remove comments page in menu add_action('admin_menu', function () { remove_menu_page('edit-comments.php'); }); // Remove comments links from admin bar add_action('add_admin_bar_menus', function () { if (is_admin_bar_showing()) { remove_action('admin_bar_menu', 'wp_admin_bar_comments_menu', 60); } });