Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double display of ulike buttons in 4.6.8 in a complex edge case involving Jetpack #89

Open
dkwgit opened this issue Aug 21, 2023 · 0 comments

Comments

@dkwgit
Copy link

dkwgit commented Aug 21, 2023

Commit 289d4ad from 4.6.8 leads to double display of Wp-ulike button in a complicated edge case.

I use a WP template, Twenty Twenty-One, which is wired to do excerpts in the main (front page) "many posts" display. Jetpack offers a customatization (accessible in Appearance|Customize|Content Options|Blog Display|Full Post, which overrides that behavior and inserts the full post for an excerpt. The change in 289d4ad means that Wp-ulike button display is accomplished by both the excerpt and the content filter--yet, in this edge case, each of those filters fires when displaying a post and thus the button is duplicated. It's really caused by Jetpack, perhaps, not by Wp-ulike, but I doubt Jetpack can do anything about it, because they can't know anything about filters that fire.

What is needed is something that checks whether the button has already been placed on a post by any filter . . . I think.

Work around (for me) was to comment out add_filter( 'the_excerpt', 'wp_ulike_put_posts', 15 );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant