From 76d64aabd44f8ec6df70d5b4955345189cdaa1ba Mon Sep 17 00:00:00 2001 From: Chris Hutchinson Date: Tue, 11 Apr 2017 09:54:51 +0100 Subject: [PATCH] Bump version to 1.4.0 --- README.md | 8 ++- acf-to-wp-api.php | 9 ++-- docs/classes/ACFtoWPAPI.html | 48 ++++++++++++++++-- docs/files/acf-to-wp-api.html | 8 +-- docs/files/acf-to-wp-api.php.txt | 43 +++++++++++----- docs/graphs/class.html | 2 +- docs/index.html | 8 +-- docs/namespaces/default.html | 8 +-- ...-file_ed4324bfbbef445f3dccc426ada722ee.dat | Bin 97500 -> 100124 bytes docs/reports/deprecated.html | 2 +- docs/reports/errors.html | 4 +- docs/reports/markers.html | 2 +- readme.txt | 8 ++- 13 files changed, 109 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index 9585d2e..a908697 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@ Contributors: chrishutchinson, kokarn, ramvi Tags: acf, api, wp-api Requires at least: 3.9.0 -Tested up to: 4.4.1 -Stable tag: 1.3.3 +Tested up to: 4.7.3 +Stable tag: 1.4.0 License: MIT License URI: http://opensource.org/licenses/MIT @@ -39,6 +39,10 @@ Request a specific option, by passing in the option name ## Changelog +### 1.4.0 + +* Compatibility improvements for WordPress 4.7 + ### 1.3.3 * Compatibility fix for V2.0Beta9 diff --git a/acf-to-wp-api.php b/acf-to-wp-api.php index 12592e5..a2dd75a 100644 --- a/acf-to-wp-api.php +++ b/acf-to-wp-api.php @@ -4,7 +4,7 @@ * Description: Puts all ACF fields from posts, pages, custom post types, attachments and taxonomy terms, into the WP-API output under the 'acf' key * Author: Chris Hutchinson * Author URI: http://www.chrishutchinson.me - * Version: 1.3.3 + * Version: 1.4.0 * Plugin URI: https://wordpress.org/plugins/acf-to-wp-api/ */ @@ -25,6 +25,7 @@ class ACFtoWPAPI { * * @author Chris Hutchinson * + * @since 1.4.0 Improved API version checking * @since 1.3.3 Compatibility fix for V2.0Beta9 * @since 1.3.0 Updated to support version 2 of the WP-API * @since 1.0.0 @@ -34,9 +35,9 @@ function __construct() { $this->plugin = new StdClass; $this->plugin->title = 'ACF to WP API'; $this->plugin->name = 'acf-to-wp-api'; - $this->plugin->folder = WP_PLUGIN_DIR . '/' . $this->plugin->name; - $this->plugin->url = WP_PLUGIN_URL . '/' . str_replace(basename( __FILE__), "", plugin_basename(__FILE__)); - $this->plugin->version = '1.3.3'; + $this->plugin->folder = WP_PLUGIN_DIR . '/' . $this->plugin->name; + $this->plugin->url = WP_PLUGIN_URL . '/' . str_replace(basename( __FILE__), "", plugin_basename(__FILE__)); + $this->plugin->version = '1.4.0'; $this->apiVersion = $this->_getAPIVersion(); diff --git a/docs/classes/ACFtoWPAPI.html b/docs/classes/ACFtoWPAPI.html index 5bb8f42..3b3ef83 100644 --- a/docs/classes/ACFtoWPAPI.html +++ b/docs/classes/ACFtoWPAPI.html @@ -136,10 +136,10 @@
- + \
-
+
@@ -167,7 +167,7 @@

\ACFtoWPAPI

Description: Puts all ACF fields from posts, pages, custom post types, attachments and taxonomy terms, into the WP-API output under the 'acf' key Author: Chris Hutchinson Author URI: http://www.chrishutchinson.me -Version: 1.3.2 +Version: 1.4.0 Plugin URI: https://wordpress.org/plugins/acf-to-wp-api/

@@ -230,6 +230,7 @@

Summary

dd()
_versionOneSetup()
_versionTwoSetup()
+ _getAPIVersion()
_getAPIBaseVersion()
_isAPIVersionOne()
_isAPIVersionTwo()
@@ -367,6 +368,8 @@

Tags

since + 1.4.0

Improved API version checking

+ 1.3.3

Compatibility fix for V2.0Beta9

1.3.0

Updated to support version 2 of the WP-API

1.0.0 @@ -1356,6 +1359,43 @@

Tags

+ +
+

_getAPIVersion()

+ +
_getAPIVersion() : string
+

Returns the WP REST API version, assumes version 2 +if can't find any other version

+ + + + +

Returns

+ string + —

The version number, set by WP REST API

+ +
+
+ +
+ +
+

_getAPIBaseVersion()

@@ -1581,7 +1621,7 @@


Documentation is powered by phpDocumentor and authored - on September 17th, 2015 at 11:59. + on April 11th, 2017 at 08:54.
diff --git a/docs/files/acf-to-wp-api.html b/docs/files/acf-to-wp-api.html index dd29bed..601de8b 100644 --- a/docs/files/acf-to-wp-api.html +++ b/docs/files/acf-to-wp-api.html @@ -136,10 +136,10 @@
- + \
-
+
@@ -175,7 +175,7 @@

Classes

Description: Puts all ACF fields from posts, pages, custom post types, attachments and taxonomy terms, into the WP-API output under the 'acf' key Author: Chris Hutchinson Author URI: http://www.chrishutchinson.me -Version: 1.3.2 +Version: 1.4.0 Plugin URI: https://wordpress.org/plugins/acf-to-wp-api/ @@ -247,7 +247,7 @@


Documentation is powered by phpDocumentor and authored - on September 17th, 2015 at 11:59. + on April 11th, 2017 at 08:54.
diff --git a/docs/files/acf-to-wp-api.php.txt b/docs/files/acf-to-wp-api.php.txt index 1881335..fb96c3e 100644 --- a/docs/files/acf-to-wp-api.php.txt +++ b/docs/files/acf-to-wp-api.php.txt @@ -4,7 +4,7 @@ * Description: Puts all ACF fields from posts, pages, custom post types, attachments and taxonomy terms, into the WP-API output under the 'acf' key * Author: Chris Hutchinson * Author URI: http://www.chrishutchinson.me - * Version: 1.3.2 + * Version: 1.4.0 * Plugin URI: https://wordpress.org/plugins/acf-to-wp-api/ */ @@ -25,6 +25,8 @@ class ACFtoWPAPI { * * @author Chris Hutchinson * + * @since 1.4.0 Improved API version checking + * @since 1.3.3 Compatibility fix for V2.0Beta9 * @since 1.3.0 Updated to support version 2 of the WP-API * @since 1.0.0 */ @@ -33,11 +35,11 @@ class ACFtoWPAPI { $this->plugin = new StdClass; $this->plugin->title = 'ACF to WP API'; $this->plugin->name = 'acf-to-wp-api'; - $this->plugin->folder = WP_PLUGIN_DIR . '/' . $this->plugin->name; - $this->plugin->url = WP_PLUGIN_URL . '/' . str_replace(basename( __FILE__), "", plugin_basename(__FILE__)); - $this->plugin->version = '1.3.2'; + $this->plugin->folder = WP_PLUGIN_DIR . '/' . $this->plugin->name; + $this->plugin->url = WP_PLUGIN_URL . '/' . str_replace(basename( __FILE__), "", plugin_basename(__FILE__)); + $this->plugin->version = '1.4.0'; - $this->apiVersion = get_option( 'rest_api_plugin_version', get_option( 'json_api_plugin_version', null ) ); + $this->apiVersion = $this->_getAPIVersion(); // Version One if($this->_isAPIVersionOne()) { @@ -106,6 +108,26 @@ class ACFtoWPAPI { add_action( 'rest_api_init', array( $this, 'addACFOptionRouteV2') ); } + /** + * Returns the WP REST API version, assumes version 2 + * if can't find any other version + * + * @return string The version number, set by WP REST API + * + * @since 1.3.2 + */ + private function _getAPIVersion() { + $version = 2; + + if ( defined('REST_API_VERSION') ) { + $version = REST_API_VERSION; + } else { + $version = get_option( 'rest_api_plugin_version', get_option( 'json_api_plugin_version', null ) ); + } + + return $version; + } + /** * Gets the version number of the WP REST API * @@ -122,14 +144,10 @@ class ACFtoWPAPI { return false; } - $baseNumber = substr( $version, 0, 1 ); + $baseNumber = (int) substr( $version, 0, 1 ); - if( $baseNumber === '1' ) { - return 1; - } - - if( $baseNumber === '2' ) { - return 2; + if( $baseNumber > 0 ) { + return $baseNumber; } return false; @@ -540,3 +558,4 @@ class ACFtoWPAPI { } $ACFtoWPAPI = new ACFtoWPAPI(); + diff --git a/docs/graphs/class.html b/docs/graphs/class.html index 8c5fca8..4b0ad9f 100644 --- a/docs/graphs/class.html +++ b/docs/graphs/class.html @@ -152,7 +152,7 @@


Documentation is powered by phpDocumentor and authored - on September 17th, 2015 at 11:59. + on April 11th, 2017 at 08:54.
diff --git a/docs/index.html b/docs/index.html index 90847c0..2380cc4 100644 --- a/docs/index.html +++ b/docs/index.html @@ -88,10 +88,10 @@
- + \
-
+
@@ -125,7 +125,7 @@

Classes

Description: Puts all ACF fields from posts, pages, custom post types, attachments and taxonomy terms, into the WP-API output under the 'acf' key Author: Chris Hutchinson Author URI: http://www.chrishutchinson.me -Version: 1.3.2 +Version: 1.4.0 Plugin URI: https://wordpress.org/plugins/acf-to-wp-api/ @@ -182,7 +182,7 @@


Documentation is powered by phpDocumentor and authored - on September 17th, 2015 at 11:59. + on April 11th, 2017 at 08:54.
diff --git a/docs/namespaces/default.html b/docs/namespaces/default.html index e113f3b..20125a2 100644 --- a/docs/namespaces/default.html +++ b/docs/namespaces/default.html @@ -88,10 +88,10 @@
- + \
-
+
@@ -125,7 +125,7 @@

Classes

Description: Puts all ACF fields from posts, pages, custom post types, attachments and taxonomy terms, into the WP-API output under the 'acf' key Author: Chris Hutchinson Author URI: http://www.chrishutchinson.me -Version: 1.3.2 +Version: 1.4.0 Plugin URI: https://wordpress.org/plugins/acf-to-wp-api/ @@ -182,7 +182,7 @@


Documentation is powered by phpDocumentor and authored - on September 17th, 2015 at 11:59. + on April 11th, 2017 at 08:54.
diff --git a/docs/phpdoc-cache-6a/phpdoc-cache-file_ed4324bfbbef445f3dccc426ada722ee.dat b/docs/phpdoc-cache-6a/phpdoc-cache-file_ed4324bfbbef445f3dccc426ada722ee.dat index e2fabe0cbdca76c6cd6554f9754a369db0e0467b..71b3bf1dc013530d954c73fd6e48721cfec0b450 100644 GIT binary patch delta 2692 zcmb7G4Qw3671o>Cb8H7=JA%}T>v-ZoZPUc;-|g-C>clOC;2&ZWCk`&6&YitypW-`T z?#>Y=sbkkkApsS_pf0K`kw74T6d)R^l?V{0RTWxO8WdVJDkL^a_!D&#wYztN`HQSUfxZ~-f&{&sz5B4coiG*lr5m5n7cFCYm!Z^Wc`}9 z4cYuwkU%0a5HS<8gk_g$I7GSv(aI#J740U0=pgCmJH#_tZceJDxS1S?M@b?X=UtKw z946CxbRZHm<10wQOp=>|gW2#|^>dQQ^g>Pvy{}-w&J6u(vfXJnvtb>P-TpbbD$;Fo zYG!v;rPER;@42&m&HA>6mUWfYBvqGPcx95G@B3q7_9aXgB0IImq&1%Q68@g&@V|6} z85Zo(>l(pR6^7NT~%2p9EgO|w+1`_5vw|REg^=lUhaWj#m){Qgnf<3Z$2vVzp zlBaNL^>XP8>D9gEnb_AAdy65TJ*fWZI?&ih^*M-*H;;iO_QD;YTFZ){+S=a>D?z0r zhqPs~QCo4%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KIYJ^UHoL$2p$muYjf8 ziaHl}4zPVI;VV8mJb

Documentation is powered by phpDocumentor and authored - on September 17th, 2015 at 11:59. + on April 11th, 2017 at 08:54.
diff --git a/docs/reports/errors.html b/docs/reports/errors.html index 5f26b82..5e05ce8 100644 --- a/docs/reports/errors.html +++ b/docs/reports/errors.html @@ -124,7 +124,7 @@

error - 525 + 543 Argument $routes is missing from the Docblock of registerRoutes @@ -170,7 +170,7 @@


Documentation is powered by phpDocumentor and authored - on September 17th, 2015 at 11:59. + on April 11th, 2017 at 08:54.
diff --git a/docs/reports/markers.html b/docs/reports/markers.html index cc88243..352b01b 100644 --- a/docs/reports/markers.html +++ b/docs/reports/markers.html @@ -141,7 +141,7 @@


Documentation is powered by phpDocumentor and authored - on September 17th, 2015 at 11:59. + on April 11th, 2017 at 08:54.
diff --git a/readme.txt b/readme.txt index 11ff02d..e9f869b 100644 --- a/readme.txt +++ b/readme.txt @@ -2,8 +2,8 @@ Contributors: chrishutchinson, kokarn, ramvi Tags: acf, api, wp-api Requires at least: 3.9.0 -Tested up to: 4.4.1 -Stable tag: 1.3.3 +Tested up to: 4.7.3 +Stable tag: 1.4.0 License: MIT License URI: http://opensource.org/licenses/MIT @@ -32,6 +32,10 @@ See GitHub issue #13 (http://github.com/times/acf-to-wp-api/issues/13) for examp == Changelog == += 1.4.0 = + +* Compatibility improvements for WordPress 4.7 + = 1.3.3 = * Compatibility fix for V2.0Beta9