Skip to content

Commit

Permalink
Bump version to 1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
chrishutchinson committed Apr 11, 2017
1 parent 429b489 commit 76d64aa
Show file tree
Hide file tree
Showing 13 changed files with 109 additions and 41 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
9 changes: 5 additions & 4 deletions acf-to-wp-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -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/
*/

Expand All @@ -25,6 +25,7 @@ class ACFtoWPAPI {
*
* @author Chris Hutchinson <[email protected]>
*
* @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
Expand All @@ -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();

Expand Down
48 changes: 44 additions & 4 deletions docs/classes/ACFtoWPAPI.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1228078457"></a>
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1342203185"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1228078457" class="accordion-body collapse in">
<div id="namespace-1342203185" class="accordion-body collapse in">
<div class="accordion-inner">


Expand Down Expand Up @@ -167,7 +167,7 @@ <h1><small>\</small>ACFtoWPAPI</h1>
Description: Puts all ACF fields from posts, pages, custom post types, attachments and taxonomy terms, into the WP-API output under the &#039;acf&#039; 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/</em></p>


Expand Down Expand Up @@ -230,6 +230,7 @@ <h2>Summary</h2>
<a href="../classes/ACFtoWPAPI.html#method_dd" class="">dd()</a><br />
<a href="../classes/ACFtoWPAPI.html#method__versionOneSetup" class="">_versionOneSetup()</a><br />
<a href="../classes/ACFtoWPAPI.html#method__versionTwoSetup" class="">_versionTwoSetup()</a><br />
<a href="../classes/ACFtoWPAPI.html#method__getAPIVersion" class="">_getAPIVersion()</a><br />
<a href="../classes/ACFtoWPAPI.html#method__getAPIBaseVersion" class="">_getAPIBaseVersion()</a><br />
<a href="../classes/ACFtoWPAPI.html#method__isAPIVersionOne" class="">_isAPIVersionOne()</a><br />
<a href="../classes/ACFtoWPAPI.html#method__isAPIVersionTwo" class="">_isAPIVersionTwo()</a><br />
Expand Down Expand Up @@ -367,6 +368,8 @@ <h2>Tags</h2>
since
</th>
<td>
1.4.0 <p>Improved API version checking</p>
1.3.3 <p>Compatibility fix for V2.0Beta9</p>
1.3.0 <p>Updated to support version 2 of the WP-API</p>
1.0.0
</td>
Expand Down Expand Up @@ -1356,6 +1359,43 @@ <h2>Tags</h2>

<div class="row-fluid">
<div class="span8 content class">
<a id="method__getAPIVersion" name="method__getAPIVersion" class="anchor"></a>
<article class="method">
<h3 class="private ">_getAPIVersion()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">_getAPIVersion() : string</pre>
<p><em>Returns the WP REST API version, assumes version 2
if can&#039;t find any other version</em></p>




<h4>Returns</h4>
string
&mdash; <p>The version number, set by WP REST API</p>

</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
since
</th>
<td>
1.3.2
</td>
</tr>
</table>
</aside>
</div>

<div class="row-fluid">
<div class="span8 content class">
<a id="method__getAPIBaseVersion" name="method__getAPIBaseVersion" class="anchor"></a>
<article class="method">
<h3 class="private ">_getAPIBaseVersion()</h3>
Expand Down Expand Up @@ -1581,7 +1621,7 @@ <h1><i class="icon-pushpin"></i></h1>
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on September 17th, 2015 at 11:59.
on April 11th, 2017 at 08:54.
</section>
</section>
</section>
Expand Down
8 changes: 4 additions & 4 deletions docs/files/acf-to-wp-api.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-551050294"></a>
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1329118943"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-551050294" class="accordion-body collapse in">
<div id="namespace-1329118943" class="accordion-body collapse in">
<div class="accordion-inner">


Expand Down Expand Up @@ -175,7 +175,7 @@ <h2>Classes</h2>
Description: Puts all ACF fields from posts, pages, custom post types, attachments and taxonomy terms, into the WP-API output under the &#039;acf&#039; 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/</em></td>
</tr>
</table>
Expand Down Expand Up @@ -247,7 +247,7 @@ <h1><i class="icon-pushpin"></i></h1>
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on September 17th, 2015 at 11:59.
on April 11th, 2017 at 08:54.
</section>
</section>
</section>
Expand Down
43 changes: 31 additions & 12 deletions docs/files/acf-to-wp-api.php.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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/
*/

Expand All @@ -25,6 +25,8 @@ class ACFtoWPAPI {
*
* @author Chris Hutchinson <[email protected]>
*
* @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
*/
Expand All @@ -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()) {
Expand Down Expand Up @@ -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
*
Expand All @@ -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;
Expand Down Expand Up @@ -540,3 +558,4 @@ class ACFtoWPAPI {
}

$ACFtoWPAPI = new ACFtoWPAPI();

2 changes: 1 addition & 1 deletion docs/graphs/class.html
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ <h1><i class="icon-pushpin"></i></h1>
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on September 17th, 2015 at 11:59.
on April 11th, 2017 at 08:54.
</section>
</section>
</section>
Expand Down
8 changes: 4 additions & 4 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-2083656335"></a>
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1453914356"></a>
<a href="namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-2083656335" class="accordion-body collapse in">
<div id="namespace-1453914356" class="accordion-body collapse in">
<div class="accordion-inner">


Expand Down Expand Up @@ -125,7 +125,7 @@ <h2>Classes</h2>
Description: Puts all ACF fields from posts, pages, custom post types, attachments and taxonomy terms, into the WP-API output under the &#039;acf&#039; 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/</em></td>
</tr>
</table>
Expand Down Expand Up @@ -182,7 +182,7 @@ <h1><i class="icon-pushpin"></i></h1>
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on September 17th, 2015 at 11:59.
on April 11th, 2017 at 08:54.
</section>
</section>
</section>
Expand Down
8 changes: 4 additions & 4 deletions docs/namespaces/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1614830885"></a>
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1180433108"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1614830885" class="accordion-body collapse in">
<div id="namespace-1180433108" class="accordion-body collapse in">
<div class="accordion-inner">


Expand Down Expand Up @@ -125,7 +125,7 @@ <h2>Classes</h2>
Description: Puts all ACF fields from posts, pages, custom post types, attachments and taxonomy terms, into the WP-API output under the &#039;acf&#039; 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/</em></td>
</tr>
</table>
Expand Down Expand Up @@ -182,7 +182,7 @@ <h1><i class="icon-pushpin"></i></h1>
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on September 17th, 2015 at 11:59.
on April 11th, 2017 at 08:54.
</section>
</section>
</section>
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/reports/deprecated.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ <h1><i class="icon-pushpin"></i></h1>
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on September 17th, 2015 at 11:59.
on April 11th, 2017 at 08:54.
</section>
</section>
</section>
Expand Down
4 changes: 2 additions & 2 deletions docs/reports/errors.html
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ <h3>
</tr>
<tr>
<td>error</td>
<td>525</td>
<td>543</td>
<td>Argument $routes is missing from the Docblock of registerRoutes</td>
</tr>
</tbody>
Expand Down Expand Up @@ -170,7 +170,7 @@ <h1><i class="icon-pushpin"></i></h1>
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on September 17th, 2015 at 11:59.
on April 11th, 2017 at 08:54.
</section>
</section>
</section>
Expand Down
2 changes: 1 addition & 1 deletion docs/reports/markers.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ <h1><i class="icon-pushpin"></i></h1>
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on September 17th, 2015 at 11:59.
on April 11th, 2017 at 08:54.
</section>
</section>
</section>
Expand Down
8 changes: 6 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 76d64aa

Please sign in to comment.