Settings > WordPress Tweaks > File Editor', 'it-l10n-ithemes-security-pro' ) . "\n"; } return $modification; } public static function filter_litespeed_server_config_modification( $modification ) { return self::filter_apache_server_config_modification( $modification, 'litespeed' ); } public static function filter_apache_server_config_modification( $modification, $server = 'apache' ) { $input = ITSEC_Modules::get_settings( 'wordpress-tweaks' ); if ( 2 == $input['disable_xmlrpc'] ) { $modification .= "\n"; $modification .= "\t# " . __( 'Disable XML-RPC - Security > Settings > WordPress Tweaks > XML-RPC', 'it-l10n-ithemes-security-pro' ) . "\n"; $modification .= "\t\n"; if ( 'apache' === $server ) { $modification .= "\t\t\n"; $modification .= "\t\t\tRequire all denied\n"; $modification .= "\t\t\n"; $modification .= "\t\t\n"; $modification .= "\t\t\tOrder allow,deny\n"; $modification .= "\t\t\tDeny from all\n"; $modification .= "\t\t\n"; } else { $modification .= "\t\t\n"; $modification .= "\t\t\tOrder allow,deny\n"; $modification .= "\t\t\tDeny from all\n"; $modification .= "\t\t\n"; } $modification .= "\t\n"; } return $modification; } public static function filter_nginx_server_config_modification( $modification ) { $input = ITSEC_Modules::get_settings( 'wordpress-tweaks' ); if ( 2 == $input['disable_xmlrpc'] ) { $modification .= "\n"; $modification .= "\t# " . __( 'Disable XML-RPC - Security > Settings > WordPress Tweaks > XML-RPC', 'it-l10n-ithemes-security-pro' ) . "\n"; $modification .= "\tlocation ~ xmlrpc.php { deny all; }\n"; } return $modification; } }