[Bug] Posts marked as expired even when they’re not
-
On a page I have an iteration of posts like:
foreach( $posts as $post ): setup_postdata($post); // do something endforeach; wp_reset_postdata();
Some posts are marked as expired even if they aren’t, and that’s because the filters applied to the_title, post_class and maybe display_post_states on the previous post/iteration are still effective (they’re never removed).
I solved it by adding these lines on row 269 of wp-post-expires.php:
else { remove_filter('the_title', [$this, 'textTitleFilter'], 10, 2); remove_filter('post_class', [$this, 'cssClassFilter']); remove_filter('display_post_states', [$this, 'addPostState'], 10, 2); }
—
Plugin version: 1.2.4
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘[Bug] Posts marked as expired even when they’re not’ is closed to new replies.