Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Use an authenticated call for gw.getVersion so we can verify that XML…

…-RPC is enabled and verify credentials.
  • Loading branch information...
commit 0c5523a74afd020690335fe7e032f1ff3c415615 1 parent 92c7de1
Scott González authored

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. +3 1 tasks/wordpress.js
4 tasks/wordpress.js
@@ -42,7 +42,7 @@ grunt.registerHelper( "wordpress-client", function() {
42 42 grunt.registerHelper( "wordpress-validate-xmlrpc-version", function( fn ) {
43 43 var client = grunt.helper( "wordpress-client" );
44 44 grunt.verbose.write( "Verifying XML-RPC version..." );
45   - client.call( "gw.getVersion", function( error, xmlrpcVersion ) {
  45 + client.authenticatedCall( "gw.getVersion", function( error, xmlrpcVersion ) {
46 46 if ( error ) {
47 47 grunt.verbose.error();
48 48 if ( error.code === -32601 ) {
@@ -50,6 +50,8 @@ grunt.registerHelper( "wordpress-validate-xmlrpc-version", function( fn ) {
50 50 "XML-RPC extensions for grunt-wordpress are not installed." ) );
51 51 }
52 52
  53 + // XML-RPC is disabled or bad credentials
  54 + // WordPress provides good error messages, so we don't do any special handling
53 55 return fn( error );
54 56 }
55 57

0 comments on commit 0c5523a

Please sign in to comment.
Something went wrong with that request. Please try again.