How to Disable XML-RPC in WordPress 3.5:
To disable XML-RPC in WordPress 3.5 first you have to paste the following command or code in your specific plugin.
add_filter('xmlrpc_enabled', '__return_false');
Disable WordPress XML-RPC with .htaccess:
If your site is getting attacked then one more option is available and that uses .htaccess file to disable XML-RPC with.
Apply this below code in your .htaccess file.
# Block WordPress xmlrpc.php requests
<Files xmlrpc.php>
order deny, allow
deny from all
allow from 123.123.123.123
</Files>