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

Reinstate support for get_pages() post_modified_gmt sort column value #5111

Closed
wants to merge 2 commits into from

Conversation

felixarntz
Copy link
Member

This PR reinstates the missing support for post_modified_gmt and modified_gmt as possible values for the sort_column key in get_pages().

These two are the only values that aren't anyway supported by WP_Query.

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


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.

Copy link
Member

@joemcgill joemcgill left a comment

Choose a reason for hiding this comment

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

This looks good to me.

A very slight optimization would be to combine the array_map right above with the foreach to avoid looping through the same array twice, but I think this is fine for readability.

@felixarntz
Copy link
Member Author

Thanks @joemcgill! Updated in 1a00c19

@joemcgill
Copy link
Member

@joemcgill joemcgill closed this Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants