Opened 4 years ago
Closed 4 years ago
#50593 closed defect (bug) (fixed)
Check requirements when uploading a plugin/theme by ZIP
Reported by: | mariovalney | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.5 | Priority: | normal |
Severity: | normal | Version: | 5.4.2 |
Component: | Upgrade/Install | Keywords: | has-patch |
Focuses: | docs | Cc: |
Description
From 9757 we agree uploading a plugin should check PHP required version.
We already check the package is a valid plugin and I think we can add both verifications: Requires PHP and Requires at least. And extend it to themes.
- Is there any other verifications that plugins from repository are submitted?
- Maybe we can use validate_plugin_requirements function.
- (@desrosj suggests) When the PHP or WordPress requirements are not met, can we link to the HelpHub so that the user has some direction: Maybe this page: https://wordpress.org/support/update-php/?
Attachments (1)
Change History (13)
This ticket was mentioned in PR #401 on WordPress/wordpress-develop by mariovalney.
4 years ago
#2
- Keywords has-patch added; needs-patch removed
#3
@
4 years ago
- Keywords needs-design needs-unit-tests added
Added a PR with validation to themes and plugins.
I'm using the same strings from 9757 to keep UX.
I guess we can improve this UI at least with the link do HelpHub like @desrosj suggested (wp_get_update_php_url / wp_get_default_update_php_url / wp_get_update_php_annotation).
Maybe keep version string in another line?
Here are prints for each case:
#6
in reply to:
↑ description
@
4 years ago
- Keywords needs-patch added; needs-screenshots has-patch needs-design needs-unit-tests removed
- Milestone changed from 5.5 to 5.5.1
Replying to mariovalney:
(@desrosj suggests) When the PHP or WordPress requirements are not met, can we link to the HelpHub so that the user has some direction: Maybe this page: https://wordpress.org/support/update-php/?
Let's address this in 5.5.1.
@
4 years ago
Upgrade/Install: Link HelpHub documentation about PHP and WordPress upgrade after failed plugins and themes upgrade attempts
#7
@
4 years ago
- Focuses docs added
- Keywords has-patch added; needs-patch removed
Added HelpHub links as per @SergeyBiryukov ’s previous comment.
This ticket was mentioned in Slack in #core by audrasjb. View the logs.
4 years ago
This ticket was mentioned in Slack in #core-auto-updates by audrasjb. View the logs.
4 years ago
This ticket was mentioned in Slack in #core by desrosj. View the logs.
4 years ago
#12
@
4 years ago
- Keywords commit removed
- Milestone changed from 5.5.1 to 5.5
- Resolution set to fixed
- Status changed from reviewing to closed
48666.diff doesn't seem to work as expected in my testing:
WP_Upgrader_Skin:error()
runs the message throughesc_html( strip_tags( ... ) )
, so any links are stripped. That was likely added for a reason, so I'm not very comfortable with changing that in a minor release.- I think the message should use the checks and functions used for similar messages elsewhere:
current_user_can( 'update_php' )
,wp_get_update_php_url()
,wp_get_update_php_annotation()
.
Going to re-close this as fixed in 5.5. Created #51152 for addressing the remaining bits.
Add PHP/WP version validation to upload ZIP packages.
Support to theme and plugins.
Ticket: https://core.trac.wordpress.org/ticket/50593