Docs: Remove some funky nested filters.
See #48303 git-svn-id: https://develop.svn.wordpress.org/trunk@46608 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7548aa86ba
commit
0cd24d5c60
@ -406,7 +406,9 @@ 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( 'the_excerpt', apply_filters( 'get_the_excerpt', $post->post_excerpt, $post ) );
|
||||
$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,
|
||||
|
@ -1558,7 +1558,9 @@ 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( 'the_excerpt', apply_filters( 'get_the_excerpt', $post->post_excerpt, $post ) );
|
||||
$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,
|
||||
|
Loading…
Reference in New Issue
Block a user