Make WordPress Core

Opened 9 months ago

Closed 9 months ago

Last modified 8 months ago

#59350 closed defect (bug) (duplicate)

Excerpt Length Hook Has No Effect in Admin Ajax Request

Reported by: dcooney's profile dcooney Owned by:
Milestone: Priority: normal
Severity: normal Version: 6.3
Component: Editor Keywords: has-patch
Focuses: administration, template Cc:


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.

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.

9 months ago

  • Keywords has-patch added

This PR adds an additional check for wp_doing_ajax() to allow custom excerpt_length hooks in theme and plugins to run on the frontend via admin-ajax.

Trac Ticket: 59350

#3 @SergeyBiryukov
9 months 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:

8 months ago

This change needs to happen in Gutenberg. See

Note: See TracTickets for help on using tickets.