Skip to content

Commit

Permalink
Merge branch 'hotfix/content-filters'
Browse files Browse the repository at this point in the history
  • Loading branch information
erwstout committed Oct 9, 2017
2 parents ed9bac7 + 0f8775e commit a0e8f4a
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
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 WordPress Endpoints
Plugin URI: https://github.com/factor1/better-wp-endpoints/
Description: Serves up slimmer WordPress Rest API endpoints, with some great enhancements.
Version: 0.1.4
Version: 0.1.5
Author: Eric Stout, Factor1 Studios
Author URI: https://factor1studios.com/
License: GPL3
Expand Down
2 changes: 1 addition & 1 deletion includes/create_cpt_endpoints.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function bwe_build_cpt_endpoints() {

// show post content unless parameter is false
if( $show_content === 'true' ) {
$bwe_post->content = get_the_content();
$bwe_post->content = apply_filters('the_content', get_the_content());
}

$bwe_post->author = esc_html__(get_the_author(), 'text_domain');
Expand Down
2 changes: 1 addition & 1 deletion includes/get_cpt_by_id.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function bwe_build_single_cpt_endpoints() {
$bwe_cpt_post->slug = basename(get_permalink());
$bwe_cpt_post->date = get_the_date('c');
$bwe_cpt_post->excerpt = get_the_excerpt();
$bwe_cpt_post->content = get_the_content();
$bwe_cpt_post->content = apply_filters('the_content', get_the_content());
$bwe_cpt_post->author = esc_html__(get_the_author(), 'text_domain');
$bwe_cpt_post->author_id = get_the_author_meta('ID');

Expand Down
2 changes: 1 addition & 1 deletion includes/get_page_by_id.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function get_page_by_id( WP_REST_Request $request ){
$bwe_page->template = 'default';
}

$bwe_page->content = get_the_content();
$bwe_page->content = apply_filters('the_content', get_the_content());


/*
Expand Down
4 changes: 2 additions & 2 deletions includes/get_pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ function bwe_get_pages( WP_REST_Request $request ) {
$template_name = preg_replace('/\\.[^.\\s]{3,4}$/', '', basename(get_page_template()));

$bwe_page->template = $template_name;

} else {
$bwe_page->template = 'default';
}


// show post content unless parameter is false
if( $show_content === 'true' ) {
$bwe_page->content = get_the_content();
$bwe_page->content = apply_filters('the_content', get_the_content());
}

/*
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 @@ -29,7 +29,7 @@ function get_post_by_id( $data ) {
$bwe_post->slug = basename(get_permalink());
$bwe_post->date = get_the_date('c');
$bwe_post->excerpt = get_the_excerpt();
$bwe_post->content = get_the_content();
$bwe_post->content = apply_filters('the_content', get_the_content());
$bwe_post->author = esc_html__(get_the_author(), 'text_domain');
$bwe_post->author_id = get_the_author_meta('ID');

Expand Down
2 changes: 1 addition & 1 deletion includes/get_posts.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function bwe_get_posts( WP_REST_Request $request ) {

// show post content unless parameter is false
if( $show_content === 'true' ) {
$bwe_post->content = get_the_content();
$bwe_post->content = apply_filters('the_content', get_the_content());
}

$bwe_post->author = esc_html__(get_the_author(), 'text_domain');
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-wp-endpoints",
"version": "0.1.4",
"version": "0.1.5",
"description": "Serves up slimmer WordPress Rest API endpoints.",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit a0e8f4a

Please sign in to comment.