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

Add date/time option to use WP and ignore QTX formats #1248

Merged
merged 1 commit into from
Nov 8, 2022
Merged

Conversation

herrvigg
Copy link
Collaborator

@herrvigg herrvigg commented Nov 8, 2022

The strftime function is deprecated in PHP8.1 but the legacy language formats are still maintained with IntlDateFormatter (#1228, #1238). The strftime format used in the qTranslate language options should be deprecated (#1234). The date format should also be refactored without intermediate legacy conversions.

Meanwhile, it is safer to add a fallback option to disable any date/time conversion and hooks in qTranslate in case something unexpected would happen. This option could be enough for some users. The standard WP behavior for the_time() and all filters with get_post_modified_time is translating the global date/time WP formats. However when calling functions like get_post_time() from the code without any argument, no translation is done which could be unexpected when using qTranslate. Also, the WP options only allow to define a format for date and another for time, which could also be too restrictive.

@herrvigg herrvigg added the core Core functionalities, including the admin section label Nov 8, 2022
@herrvigg herrvigg changed the title Add date/time WP option to ignore QTX formats Add date/time option to use WP and ignore QTX formats Nov 8, 2022
@herrvigg herrvigg merged commit 78a790b into master Nov 8, 2022
@herrvigg herrvigg deleted the datetime-wp branch November 8, 2022 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core functionalities, including the admin section
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant