Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #42814, comment 18


Ignore:
Timestamp:
01/12/2018 06:35:48 AM (6 years ago)
Author:
kraftbj
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #42814, comment 18

    v1 v2  
    33First, Jetpack is doing it wrong, yup. We should just ask for the excerpt we want using Core functions (`get_the_excerpt( $post );)`, which works as of WP 4.5 outside of the loop. ( https://github.com/Automattic/jetpack/pull/8510 )
    44
    5 Second, noting `get_the_excerpt`'s relatively new ability to accept a post argument, the default filter adds `wp_trim_excerpt`, which has not been updated to accept this new usage of `get_the_excerpt`, so it'll error out on it's own (or use the `global $post` data instead of the specified `$post`.
     5Second, noting `get_the_excerpt`'s relatively new ability to accept a post argument, the default filter adds `wp_trim_excerpt`, which has not been updated to accept this new usage of `get_the_excerpt`, so it'll error out on it's own (or use the `global $post` data instead of the specified `$post`).
    66
    77Try running