Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blocks: Check wp_doing_ajax before filtering excerpt_length. #5354

Closed
wants to merge 1 commit into from

Conversation

perrelet
Copy link

wp-include/blocks/post-excerpt.php:86

hooks excerpt_length with a value of 100 and priority of PHP_INT_MAX for admin and rest requests. As a result, excerpt_length is set to 100 for ajax requests (is_admin() is true for these)

Presumably this is incorrect. If a post is being rendered via ajax, it's excerpt length shouldn't be hijacked by block logic.

Trac ticket: (https://core.trac.wordpress.org/ticket/59504)


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@perrelet perrelet closed this Sep 29, 2023
@perrelet
Copy link
Author

Closed as duplicate of #5217

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant