You can try this to show the full post content only in the JSON API:
function remove_more_wpse_96740($content) {
if(get_query_var('json')){
global $post;
$content = preg_replace('/<!--more(.*?)?-->/','',$post->post_content);
}
return $content;
}
add_filter('the_content', 'remove_more_wpse_96740',1);
by targeting the json
query variable and remove the <!--more-->
part of the post.
If you have a custom string like <!--more But wait, there's more! -->
, it will also be removed.
This part of the plugin in /json-api/models/post.php
:
function set_content_value() {
global $json_api;
if ($json_api->include_value('content')) {
$content = get_the_content($json_api->query->read_more);
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
$this->content = $content;
} else {
unset($this->content);
}
}
is fetching the content and the check for <!--more(.*?)?-->
in the content takes place in the WordPress function get_the_content()
.
PS: Using the method above will disable <!--noteaser-->
in the JSON API, but that should be alright since you want the full post content there.