You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These filters work as long as they are used with the current post stored as global. However the two related functions can be called for a specific post other than the global one, so the filters are broken in such cases.
The text was updated successfully, but these errors were encountered:
Using the global post is wrong as the user may ask for a post ID.
1) Fix `get_the_modified_date` properly using the given Post object.
2) Unfortunately `get_post_modified_time` cannot be fixed due to the
lack of Post object in the WordPress filter :(
Better to use the time given by WP instead of using a wrong post ID.
Spotted when fixing other date/time type issues with #1335, the global post is used with these filters:
get_the_modified_date
: the post is passed by the filter but it's ignored by the callback.get_post_modified_time
: more problematic, the post is not given by the filter.These filters work as long as they are used with the current post stored as global. However the two related functions can be called for a specific post other than the global one, so the filters are broken in such cases.
The text was updated successfully, but these errors were encountered: