Commit 7e35c9c0 authored by Jim Tittsler's avatar Jim Tittsler
Browse files

Fix XMLRPC getPosts() with WordPress 4.4

Must supply an array of fields to retrieve when using WP 4.4.
The default null value supplied by the wordpress npm module
no longer works.
parent 7d810238
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -2,7 +2,7 @@
/* jshint node: true, multistr: true, trailing: true, esnext: true */
/* jshint node: true, multistr: true, trailing: true, esnext: true */
"use strict";
"use strict";


const VERSION = '0.11.3',
const VERSION = '0.11.4',
      JQUERY = 'http://code.jquery.com/jquery-2.1.1.min.js',
      JQUERY = 'http://code.jquery.com/jquery-2.1.1.min.js',
      FILEPATH = '/home/www/www';
      FILEPATH = '/home/www/www';


@@ -728,7 +728,7 @@ function getOutline() {
            }
            }
          }
          }


          wp.getPosts({post_type: 'page', number: 200}, function(err, data) {
          wp.getPosts({post_type: 'page', number: 200}, ['post_id'], function(err, data) {
              if (err) {
              if (err) {
                console.log(err);
                console.log(err);
                process.exit(8);
                process.exit(8);