HEX
Server: LiteSpeed
System: Linux onyx.7ho.st 5.14.0-611.13.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 11 04:57:59 EST 2025 x86_64
User: atiscoir (1242)
PHP: 8.1.34
Disabled: show_source, system, shell_exec, passthru, exec, popen, proc_open
Upload Files
File: /home/atiscoir/public_html/wp-content/themes/myco/inc/class-security.php
<?php

class Security {

    public function __construct() {
        $category = 'general-settings';

        if(TMT_Get_Setting($category, 'disable-editor-theme-plugin')) {
            define( 'DISALLOW_FILE_EDIT', true );
        }
        if(TMT_Get_Setting($category, 'disable-wp-version')) {
            add_filter('the_generator', [$this, 'remove_wordpress_version_number']);
        }
        if(TMT_Get_Setting($category, 'disable-wp-users-rest-api')) {
            add_filter('rest_endpoints', [$this, 'disable_wordpress_users_rest_api']);
        }
    }
      
    public function remove_wordpress_version_number() {
          return '';
    }

    public function disable_wordpress_users_rest_api($endpoints) {
        if ( isset( $endpoints['/wp/v2/users'] ) ) {
            unset( $endpoints['/wp/v2/users'] );
        }
        if ( isset( $endpoints['/wp/v2/users/(?P<id>[d]+)'] ) ) {
            unset( $endpoints['/wp/v2/users/(?P<id>[d]+)'] );
        }
        return $endpoints;
    }
}

new Security;