Docs: Coding standards fix after [46608].

See #48303


git-svn-id: https://develop.svn.wordpress.org/trunk@46609 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn 2019-10-28 19:33:24 +00:00
parent 0cd24d5c60
commit 38dd307f5a
2 changed files with 8 additions and 4 deletions

View File

@ -407,8 +407,10 @@ class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller {
if ( in_array( 'caption', $fields, true ) ) {
/** This filter is documented in wp-includes/post-template.php */
$caption = apply_filters( 'get_the_excerpt', $post->post_excerpt, $post );
/** This filter is documented in wp-includes/post-template.php */
$caption = apply_filters( 'the_excerpt', $caption );
$data['caption'] = array(
'raw' => $post->post_excerpt,
'rendered' => $caption,

View File

@ -1559,8 +1559,10 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
if ( rest_is_field_included( 'excerpt', $fields ) ) {
/** This filter is documented in wp-includes/post-template.php */
$excerpt = apply_filters( 'get_the_excerpt', $post->post_excerpt, $post );
/** This filter is documented in wp-includes/post-template.php */
$excerpt = apply_filters( 'the_excerpt', $excerpt );
$data['excerpt'] = array(
'raw' => $post->post_excerpt,
'rendered' => post_password_required( $post ) ? '' : $excerpt,