Make WordPress Core

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


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

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #42814, comment 18

    initial v1  
    11I see where you're going with this @dd32, but I think there's another problem in play.
    22
    3 First, 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 )
     3First, 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
    55Second, 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`.
     
    1010get_the_excerpt( $post );
    1111}}}
    12 and it'll error still.
     12and it'll throw a notice still.
    1313
    1414Patch incoming. Marking as issue since 4.5 based on when the `$post` arg was added to `get_the_excerpt`