#59350 closed defect (bug) (duplicate)
Excerpt Length Hook Has No Effect in Admin Ajax Request
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 6.3 |
| Component: | Editor | Keywords: | has-patch |
| Focuses: | administration, template | Cc: |
Description
When performing an Ajax request via admin-ajax.php custom excerpt_length hooks in themes and plugins are being overwritten by the hook in wp-includes/blocks/post-excerpt.php.
https://github.com/WordPress/WordPress/blob/master/wp-includes/blocks/post-excerpt.php#L86-L95
This line is forcing 100 words to be returned in all admin-ajax requests.
Change History (4)
This ticket was mentioned in PR #5217 on WordPress/wordpress-develop by @dcooney.
2 years ago
#1
- Keywords has-patch added
#3
@
2 years ago
- Component changed from General to Editor
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to closed
Hi there, welcome to WordPress Trac!
Thanks for the report, we're already tracking this issue in #59043.
@swissspidy commented on PR #5217:
2 years ago
#4
This change needs to happen in Gutenberg. See https://github.com/WordPress/gutenberg/pull/55400
Note: See
TracTickets for help on using
tickets.
This PR adds an additional check for
wp_doing_ajax()to allow customexcerpt_lengthhooks in theme and plugins to run on the frontend viaadmin-ajax.Trac Ticket: 59350