Fixed: Inconsistancy in add/get/update/delete_post_meta() functions#5476
Fixed: Inconsistancy in add/get/update/delete_post_meta() functions#5476felipeelia wants to merge 7 commits intoWordPress:trunkfrom
Conversation
This PR used `wp_is_post_revision()` function `get_post_meta()` function Trac ticket: https://core.trac.wordpress.org/ticket/58763
| * @ticket 58763 | ||
| * @covers ::get_post_meta | ||
| */ | ||
| public function test_get_post_meta() { |
There was a problem hiding this comment.
I found this test passes before the patch. To test the fix it should fail before the patch is applied.
Also, the test probably belongs in tests/phpunit/tests/post/meta.php or tests/phpunit/tests/post/metaRevisions.php
|
We should check for existing uses (existing plugins) that might be expecting to be able to retrieve meta revisions here (in the case of revisioned meta). |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @monir@coderex.co. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
I'm not sure which is your concern here. As you can see here, all plugins simply expect meta from the post, none from revision (prob because it has never been reliable) I should have added another PR because this is now two years old, I'm starting to doubt if the original submitter is still around. I was expecting that the patch is so trivial that it could be shipped fast. There are multiple versions of code like this and this that prove that this has been missing for ages (and pretty much all the other CRUD post_meta functions already had this) PS: When you comment here, I don't receive a notification to follow up you (because this is not my PR). |
This just adds unit tests on top of #5216
Trac ticket: https://core.trac.wordpress.org/ticket/58763
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.