[wp-trac] [WordPress Trac] #59350: Excerpt Length Hook Has No Effect in Admin Ajax Request

WordPress Trac noreply at wordpress.org
Thu Sep 14 14:40:21 UTC 2023


#59350: Excerpt Length Hook Has No Effect in Admin Ajax Request
--------------------------------------+-----------------------------
 Reporter:  dcooney                   |      Owner:  (none)
     Type:  defect (bug)              |     Status:  new
 Priority:  normal                    |  Milestone:  Awaiting Review
Component:  General                   |    Version:  6.3
 Severity:  normal                    |   Keywords:
  Focuses:  administration, template  |
--------------------------------------+-----------------------------
 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59350>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list