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

render_block_core_latest_posts() use get_posts() instead of wp_get_recen… #11984

Merged
merged 4 commits into from
Feb 7, 2019

Conversation

ghost
Copy link

@ghost ghost commented Nov 16, 2018

…t_posts()

Description

Use get_posts() instead of wp_get_recent_posts(). In this way, thirty-party plugins don't have a limitation in filtering query results

it was proposed here #11195 (comment)

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

@ghost ghost force-pushed the core_latest_posts branch from 8ae5857 to b252b4c Compare November 16, 2018 15:09
@ghost
Copy link
Author

ghost commented Nov 19, 2018

@swissspidy Hello! Can you please check if it looks like what you suggested?

@ghost ghost force-pushed the core_latest_posts branch from 23ec043 to 2bbbecd Compare November 19, 2018 11:52
@ghost
Copy link
Author

ghost commented Nov 20, 2018

@swissspidy is there a chance to include this change to WP 5.0?

@ghost ghost force-pushed the core_latest_posts branch from 7a85740 to 74863ce Compare November 20, 2018 13:38
@swissspidy
Copy link
Member

@grey-rsi Would you mind rebasing or merging the master branch into yours to fix the conflict? Thanks!

After that I think this is good to go.

@ghost
Copy link
Author

ghost commented Nov 21, 2018

@swissspidy sorry for delay, missed your comment. I have merged my changes so it should be fine now

@ghost ghost force-pushed the core_latest_posts branch 2 times, most recently from 967e9ea to 3521d2e Compare November 22, 2018 09:08
@ghost
Copy link
Author

ghost commented Nov 30, 2018

@swissspidy can you please update if you're going to include this to WP 5.0 or 5.0.1? We will be very appreciate if you can include it.

Thanks!

@swissspidy swissspidy added this to the WordPress 5.0.1 milestone Nov 30, 2018
@swissspidy
Copy link
Member

@grey-rsi Thanks for the ping. This is not really my call to make, but I think it's ready for inclusion in 5.0.1. I updated the milestone accordingly.

@ghost
Copy link
Author

ghost commented Nov 30, 2018

@swissspidy Thanks a lot for the reply!

@youknowriad youknowriad modified the milestones: WordPress 5.0.1, 4.7 Dec 4, 2018
@swissspidy
Copy link
Member

@grey-rsi Would you mind making a patch for this change against the WordPress 5.0 branch and upload it to https://core.trac.wordpress.org/ticket/45349? Thanks!

@mtias mtias added the [Block] Latest Posts Affects the Latest Posts Block label Dec 4, 2018
@ghost
Copy link
Author

ghost commented Dec 5, 2018

@swissspidy added a patch file, Thanks for update!

Copy link
Contributor

@mcsf mcsf left a comment

Choose a reason for hiding this comment

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

This needs more testing before we can merge confidently. Punting to the next release.

packages/block-library/src/latest-posts/index.php Outdated Show resolved Hide resolved
@mcsf mcsf modified the milestones: 4.7, 4.8 Dec 9, 2018
@youknowriad youknowriad modified the milestones: 4.8, 4.9 Dec 19, 2018
@gziolo
Copy link
Member

gziolo commented Feb 5, 2019

@grey-rsi - it looks like there are some e2e test failures which might be caused by some changes introduced in this PR. It would be surprising, but I would recommend bringing this branch up to date with the latest changes applied to master to ensure this isn't the case.

@gziolo gziolo requested a review from mcsf February 5, 2019 15:04
Copy link
Contributor

@mcsf mcsf 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 the work, @grey-rsi! (edit: my approval implies addressing the e2e item raised by gziolo)

@gziolo gziolo merged commit c7a8c12 into WordPress:master Feb 7, 2019
@gziolo
Copy link
Member

gziolo commented Feb 7, 2019

@grey-rsi congratulation on your first code contribution to Gutenberg 🎉

@ghost
Copy link
Author

ghost commented Feb 7, 2019

@mcsf @gziolo @swissspidy I really appreciate your help, Thanks a lot guys!

youknowriad pushed a commit that referenced this pull request Mar 6, 2019
…cen… (#11984)

* render_block_core_latest_posts() use get_posts() instead of wp_get_recent_posts()

* small fix

* small fix
youknowriad pushed a commit that referenced this pull request Mar 6, 2019
…cen… (#11984)

* render_block_core_latest_posts() use get_posts() instead of wp_get_recent_posts()

* small fix

* small fix
This was referenced Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Latest Posts Affects the Latest Posts Block
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants