Skip to content

Commit 5237da1

Browse files
committed
Merge branch 'hotfix/1.1.2'
2 parents 6d69faf + 51a6e5b commit 5237da1

7 files changed

+18
-9
lines changed

CHANGELOG.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77
## [Unreleased]
88
n/a
99

10+
## [1.1.2] - 2018-01-25
11+
### Update
12+
- Fix issue where get post by slug was returning just the first post
13+
- Fix instance of lefover $bwe variable naming
14+
1015
## [1.1.1] - 2018-01-25
1116
### Update
12-
- Update plugin version to re-trigger build.
17+
- Update plugin version to re-trigger build.
1318

1419
## [1.1.0] - 2018-01-25
1520
### Added

better-wp-endpoints.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Plugin Name: Better Rest Endpoints
44
Plugin URI: https://github.com/factor1/better-rest-endpoints/
55
Description: Serves up slimmer WordPress Rest API endpoints, with some great enhancements.
6-
Version: 1.1.1
6+
Version: 1.1.2
77
Author: Eric Stout, Factor1 Studios
88
Author URI: https://factor1studios.com/
99
License: GPL3

includes/get_post_by_id.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ function get_post_by_id( $data ) {
105105
}
106106
} else {
107107
// no posts found
108-
$bwepost = [];
108+
$bre_post = [];
109109

110110
return $bre_post;
111111
}

includes/get_post_by_slug.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
/**
33
* Grab post by slug
44
*
5-
* @param array $data Options for the function.
5+
* @param array $request Options for the function.
66
* @return string|null Post by slug or empty object for none
77
* @since 1.1.0
88
*/
99

10-
function get_post_by_slug( $data ) {
10+
function get_post_by_slug( WP_REST_Request $request ) {
1111
$post_slug = $request['slug'];
1212

1313
// WP_Query arguments
@@ -107,7 +107,7 @@ function get_post_by_slug( $data ) {
107107
}
108108
} else {
109109
// no posts found
110-
$bwepost = [];
110+
$bre_post = [];
111111

112112
return $bre_post;
113113
}

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "better-rest-endpoints",
3-
"version": "1.1.1",
3+
"version": "1.1.2",
44
"description": "Serves up slimmer WordPress Rest API endpoints.",
55
"main": "index.js",
66
"scripts": {

readme.txt

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Contributors: factor1, erwstout
66
Tags: rest, api, endpoints, acf, json
77
Requires at least: 4.7.1
88
Tested up to: 4.9.2
9-
Stable Tag: 1.1.1
9+
Stable Tag: 1.1.2
1010
License: GNU Version 3 or Any Later Version
1111

1212
A WordPress plugin that serves up slimmer WP Rest API endpoints.
@@ -42,6 +42,10 @@ apps endpoints to use Better Rest Endpoints.
4242

4343
== Changelog ==
4444

45+
= 1.1.2, January 25, 2018 =
46+
* Fix: issue where get post by slug was returning just the first post
47+
* Fix: instance of lefover $bwe variable naming
48+
4549
= 1.1.1, January 25, 2018 =
4650
* Update: update plugin version to retrigger build.
4751

0 commit comments

Comments
 (0)