Docs: Remove some funky nested filters.

See #48303

Built from https://develop.svn.wordpress.org/trunk@46608


git-svn-id: http://core.svn.wordpress.org/trunk@46405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2019-10-28 19:04:05 +00:00
parent 3a257f4018
commit 817807e5be
4 changed files with 8 additions and 4 deletions

View File

@ -41,8 +41,8 @@ function wp_latest_comments_draft_or_post_title( $post = 0 ) {
* @return string Returns the post content with latest comments added. * @return string Returns the post content with latest comments added.
*/ */
function render_block_core_latest_comments( $attributes = array() ) { function render_block_core_latest_comments( $attributes = array() ) {
// This filter is documented in wp-includes/widgets/class-wp-widget-recent-comments.php.
$comments = get_comments( $comments = get_comments(
/** This filter is documented in wp-includes/widgets/class-wp-widget-recent-comments.php */
apply_filters( apply_filters(
'widget_comments_args', 'widget_comments_args',
array( array(

View File

@ -406,7 +406,9 @@ class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller {
if ( in_array( 'caption', $fields, true ) ) { if ( in_array( 'caption', $fields, true ) ) {
/** This filter is documented in wp-includes/post-template.php */ /** 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( $data['caption'] = array(
'raw' => $post->post_excerpt, 'raw' => $post->post_excerpt,
'rendered' => $caption, 'rendered' => $caption,

View File

@ -1558,7 +1558,9 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
if ( rest_is_field_included( 'excerpt', $fields ) ) { if ( rest_is_field_included( 'excerpt', $fields ) ) {
/** This filter is documented in wp-includes/post-template.php */ /** 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( $data['excerpt'] = array(
'raw' => $post->post_excerpt, 'raw' => $post->post_excerpt,
'rendered' => post_password_required( $post ) ? '' : $excerpt, 'rendered' => post_password_required( $post ) ? '' : $excerpt,

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.4-alpha-46607'; $wp_version = '5.4-alpha-46608';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.