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

QTS: Use $post object instead of $_POST array #1102

Merged
merged 3 commits into from
Feb 18, 2022

Conversation

sviluppomania
Copy link
Contributor

Use $post->post_title instead of $_POST['post_title']

WordPress 5.0.3/PHP-7.3.1

Use $post->post_title instead of $_POST['post_title']

WordPress 5.0.3/PHP-7.3.1
@sviluppomania sviluppomania changed the title Use $post object instead of $_POST array QTS: Use $post object instead of $_POST array Feb 18, 2022
@herrvigg
Copy link
Collaborator

I guess it's a good change. Have you seen any problem related to this?

@herrvigg
Copy link
Collaborator

In other words: is it really fixing an issue, or is it just because it looks better?
A risk could be that $post->title is already translated for a different language, but $POST['post_title'] would still contain the raw ML values.

@sviluppomania
Copy link
Contributor Author

For now I have not encountered any problems, it is only for a better look. But having these requirements: WordPress 5.0.3 / PHP-7.3.1, maybe someone using older versions may encounter problems, I think.

To keep consistency
@herrvigg
Copy link
Collaborator

OK I made a quick test and $post contains raw ML values in that case.

@herrvigg herrvigg merged commit bddcce1 into qtranslate:master Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants