From 53e5969d0ebe6a2d3c271a257221253c5e9f61fa Mon Sep 17 00:00:00 2001 From: Darren Cooney Date: Thu, 14 Sep 2023 10:44:16 -0400 Subject: [PATCH] Adding fix to allow excerpt_length in admin-ajax requests. --- src/wp-includes/blocks/post-excerpt.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/blocks/post-excerpt.php b/src/wp-includes/blocks/post-excerpt.php index 4ed4edab95078..922ca5111f7a0 100644 --- a/src/wp-includes/blocks/post-excerpt.php +++ b/src/wp-includes/blocks/post-excerpt.php @@ -83,7 +83,7 @@ function register_block_core_post_excerpt() { * the excerpt length block setting has no effect. * Returns 100 because 100 is the max length in the setting. */ -if ( is_admin() || +if ( is_admin() && ! wp_doing_ajax() || defined( 'REST_REQUEST' ) && REST_REQUEST ) { add_filter( 'excerpt_length',