Skip to content

Used WP_Query in wp_get_post_autosave instead of raw query#7962

Closed
narenin wants to merge 22 commits intoWordPress:trunkfrom
narenin:62658-wp-get-post-autosave
Closed

Used WP_Query in wp_get_post_autosave instead of raw query#7962
narenin wants to merge 22 commits intoWordPress:trunkfrom
narenin:62658-wp-get-post-autosave

Conversation

@narenin
Copy link
Copy Markdown

@narenin narenin commented Dec 6, 2024

Trac ticket: https://core.trac.wordpress.org/ticket/62658


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.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 6, 2024

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 props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props narenin, swissspidy, mukesh27, spacedmonkey, im3dabasia1.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 6, 2024

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • The Plugin and Theme Directories cannot be accessed within Playground.
  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

Copy link
Copy Markdown
Member

@swissspidy swissspidy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your patch!

It looks good at first glance. Just two things:

  1. While there is some test coverage for this function already via other tests, it would be good to add dedicated tests for this function. Of course they should all pass :)
  2. Let's remove all those inline comments. They don't provide any additional value.

@swissspidy
Copy link
Copy Markdown
Member

Additional props to @im3dabasia who opened #7965

@swissspidy swissspidy added the props-bot Adding this label triggers the Props Bot workflow for a PR. label Dec 6, 2024
@github-actions github-actions bot removed the props-bot Adding this label triggers the Props Bot workflow for a PR. label Dec 6, 2024
Copy link
Copy Markdown
Member

@spacedmonkey spacedmonkey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requests some review that will fix tests.

Copy link
Copy Markdown
Member

@mukeshpanchal27 mukeshpanchal27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks solid to me. Left some nit-pick feedbacks.

narenin and others added 3 commits January 18, 2025 21:24
Co-authored-by: Jonny Harris <spacedmonkey@users.noreply.github.com>
Co-authored-by: Jonny Harris <spacedmonkey@users.noreply.github.com>
@mukeshpanchal27
Copy link
Copy Markdown
Member

@narenin take a look pending feedback #7962 (comment) from @spacedmonkey

@narenin
Copy link
Copy Markdown
Author

narenin commented Jan 24, 2025

@spacedmonkey I have implemented suggestions, could you please take a look.

Copy link
Copy Markdown
Member

@spacedmonkey spacedmonkey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, final final things and I will commit.

Co-authored-by: Jonny Harris <spacedmonkey@users.noreply.github.com>
@im3dabasia
Copy link
Copy Markdown

Hi @spacedmonkey,

Would we be eligible to receive the Testing badge once this PR is merged? I initially contributed to the tests in the PR, which was later merged into this PR. I was wondering if I might still be eligible for the badge.

Nice work @narenin 💯

narenin and others added 2 commits January 27, 2025 14:03
Co-authored-by: Jonny Harris <spacedmonkey@users.noreply.github.com>
@narenin
Copy link
Copy Markdown
Author

narenin commented Jan 27, 2025

@spacedmonkey thanks for the feedbacks, I have implemented the suggestions could you please take the look.

Copy link
Copy Markdown
Member

@spacedmonkey spacedmonkey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marked as approved, I am happy to commit. Do you mind taking a look @swissspidy @mukeshpanchal27 before I commit.

@swissspidy
Copy link
Copy Markdown
Member

@im3dabasia See https://make.wordpress.org/test/handbook/test-team-profile-badges/ for that badge and its requirements and how to request it if you meet them.

@spacedmonkey LGTM

@github-actions
Copy link
Copy Markdown

A commit was made that fixes the Trac ticket referenced in the description of this pull request.

SVN changeset: 59715
GitHub commit: 7091fcd

This PR will be closed, but please confirm the accuracy of this and reopen if there is more work to be done.

@github-actions github-actions bot closed this Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants