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

Remove get_pages() from uncached functions in … #573

Merged
merged 4 commits into from
Jul 11, 2016

Conversation

davecpage
Copy link
Contributor

…WordPress.VIP.RestrictedFunctions

It is cached and is no longer on the VIP restricted list.

Fixes #569

David Page added 2 commits June 13, 2016 09:40
…tedFunctions

It is cached and is no longer on the VIP restricted list.
No need to have a separate group as `get_children()` is a wrapper for `get_posts()`
@JDGrimes
Copy link
Contributor

@davidpagepsycle The tests are currently failing:

There was 1 failure:

1) WordPress_Tests_VIP_RestrictedFunctionsUnitTest::testSniff

[LINE 60] Expected 1 error(s) in RestrictedFunctionsUnitTest.inc but found 0 error(s).

[LINE 61] Expected 1 error(s) and 0 warning(s) in RestrictedFunctionsUnitTest.inc but found 0 error(s) and 1 warning(s). The warning(s) found were:

 -> get_children is discouraged in favor of creating a new WP_Query() so that Advanced Post Cache will cache the query, unless you explicitly supply suppress_filters => false. (WordPress.VIP.RestrictedFunctions.get_posts)

I guess you need to update the tests to reflect this change.

David Page added 2 commits July 11, 2016 14:48
Merging in with the same as functions wp_get_recent_posts()

Relates to WordPress#573
@davecpage
Copy link
Contributor Author

@JDGrimes Ah, forgot about the Travis checks. I've made changes to the tests so no failures now.

@JDGrimes JDGrimes added this to the 0.10.0 milestone Jul 11, 2016
@JDGrimes JDGrimes merged commit 97c27b7 into WordPress:develop Jul 11, 2016
JDGrimes pushed a commit that referenced this pull request Oct 8, 2016
JDGrimes pushed a commit that referenced this pull request Oct 8, 2016
Merging in with the same as functions wp_get_recent_posts()

Relates to #573
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.

2 participants