Apply content filters to Storypath API content node
This commit is contained in:
parent
a7fc7a1ae0
commit
8bec510209
2
API.md
2
API.md
@ -654,7 +654,7 @@ The following schema defines all fields that can exist within the response, excl
|
|||||||
|  ➞ name `string` | Author name.
|
|  ➞ name `string` | Author name.
|
||||||
|  ➞ url `string\|null` | Author website.
|
|  ➞ url `string\|null` | Author website.
|
||||||
| coAuthors `[object]\|null` | Array of co-author nodes. Same as the author node.
|
| coAuthors `[object]\|null` | Array of co-author nodes. Same as the author node.
|
||||||
| content `string` | Return value of `get_the_content()` without filters applied. Needs processing.
|
| content `string` | Return value of `get_the_content()` with filters applied. May need further processing.
|
||||||
| description `string` | HTML string from TinyMCE. Needs processing.
|
| description `string` | HTML string from TinyMCE. Needs processing.
|
||||||
| words `integer` | Total number of words of all chapters.
|
| words `integer` | Total number of words of all chapters.
|
||||||
| ageRating `string` | Either Everyone, Teen, Mature, or Adult.
|
| ageRating `string` | Either Everyone, Teen, Mature, or Adult.
|
||||||
|
@ -83,6 +83,7 @@ if ( ! function_exists( 'fictioneer_api_get_story_node' ) ) {
|
|||||||
$content = get_the_excerpt( $story_id ); // Story likely misused as chapter
|
$content = get_the_excerpt( $story_id ); // Story likely misused as chapter
|
||||||
} else {
|
} else {
|
||||||
$content = get_the_content( null, false, $story_id );
|
$content = get_the_content( null, false, $story_id );
|
||||||
|
$content = apply_filters( 'the_content', $content );
|
||||||
}
|
}
|
||||||
|
|
||||||
$description = get_post_meta( $story_id, 'fictioneer_story_short_description', true );
|
$description = get_post_meta( $story_id, 'fictioneer_story_short_description', true );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user