Skip to content

Commit

Permalink
Merge branch 'hotfix/1.1.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
erwstout committed Jan 25, 2018
2 parents 6d69faf + 51a6e5b commit 5237da1
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 9 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased]
n/a

## [1.1.2] - 2018-01-25
### Update
- Fix issue where get post by slug was returning just the first post
- Fix instance of lefover $bwe variable naming

## [1.1.1] - 2018-01-25
### Update
- Update plugin version to re-trigger build.
- Update plugin version to re-trigger build.

## [1.1.0] - 2018-01-25
### Added
Expand Down
2 changes: 1 addition & 1 deletion better-wp-endpoints.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Better Rest Endpoints
Plugin URI: https://github.com/factor1/better-rest-endpoints/
Description: Serves up slimmer WordPress Rest API endpoints, with some great enhancements.
Version: 1.1.1
Version: 1.1.2
Author: Eric Stout, Factor1 Studios
Author URI: https://factor1studios.com/
License: GPL3
Expand Down
2 changes: 1 addition & 1 deletion includes/get_post_by_id.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function get_post_by_id( $data ) {
}
} else {
// no posts found
$bwepost = [];
$bre_post = [];

return $bre_post;
}
Expand Down
6 changes: 3 additions & 3 deletions includes/get_post_by_slug.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
/**
* Grab post by slug
*
* @param array $data Options for the function.
* @param array $request Options for the function.
* @return string|null Post by slug or empty object for none
* @since 1.1.0
*/

function get_post_by_slug( $data ) {
function get_post_by_slug( WP_REST_Request $request ) {
$post_slug = $request['slug'];

// WP_Query arguments
Expand Down Expand Up @@ -107,7 +107,7 @@ function get_post_by_slug( $data ) {
}
} else {
// no posts found
$bwepost = [];
$bre_post = [];

return $bre_post;
}
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "better-rest-endpoints",
"version": "1.1.1",
"version": "1.1.2",
"description": "Serves up slimmer WordPress Rest API endpoints.",
"main": "index.js",
"scripts": {
Expand Down
6 changes: 5 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Contributors: factor1, erwstout
Tags: rest, api, endpoints, acf, json
Requires at least: 4.7.1
Tested up to: 4.9.2
Stable Tag: 1.1.1
Stable Tag: 1.1.2
License: GNU Version 3 or Any Later Version

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

== Changelog ==

= 1.1.2, January 25, 2018 =
* Fix: issue where get post by slug was returning just the first post
* Fix: instance of lefover $bwe variable naming

= 1.1.1, January 25, 2018 =
* Update: update plugin version to retrigger build.

Expand Down

0 comments on commit 5237da1

Please sign in to comment.