qtranslate / qtranslate-xt

qTranslate-XT (eXTended) - reviving qTranslate-X multilingual plugin for WordPress. A new community-driven plugin soon. Built-in modules for WooCommerce, ACF, slugs and others.
GNU General Public License v2.0
546 stars 103 forks source link

`modified_date/time` filters should not use global post #1336

Closed herrvigg closed 1 year ago

herrvigg commented 1 year ago

Spotted when fixing other date/time type issues with #1335, the global post is used with these filters: 1) get_the_modified_date: the post is passed by the filter but it's ignored by the callback. 2) 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.

herrvigg commented 1 year ago

Fix released in 3.15.1.