Enforce version checks on Theme bulk_update#5583
Closed
salcode wants to merge 3 commits intoWordPress:trunkfrom
Closed
Enforce version checks on Theme bulk_update#5583salcode wants to merge 3 commits intoWordPress:trunkfrom
salcode wants to merge 3 commits intoWordPress:trunkfrom
Conversation
Apply check_package() to upgrader_source_selection in theme bulk_upgrade While this prevents updating a theme if the new version does NOT meet the theme requirements, it is an expensive check. In https://core.trac.wordpress.org/ticket/59198, which addressed this same issue for Plugins rather than themes, additional less expensive checks were added before this check runs. Resolves https://core.trac.wordpress.org/ticket/59758
These changes mirror those that we applied in https://core.trac.wordpress.org/ticket/59758. In that ticket we were checking that the WordPress and PHP requirements were met for a plugin, while here we are applying those checks for a theme. See https://core.trac.wordpress.org/ticket/59758
Originally, this code assumed the response $r was an object, however upon further investigation, it appears the response $r is an associative array, not an object. This change accommadotes for this. See https://core.trac.wordpress.org/ticket/59758
|
I have tested the patch on PHP 7.4 It works as expected; thanks @salcode Here are the screenshots of my CLI log. This is my first time to test a patch, so correct me if I'm wrong. Without patch With path CLI info: |
Member
|
Merged in https://core.trac.wordpress.org/changeset/57252 Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Add PHP version and WordPress version checks on bulk theme update.
Trac ticket: #59758