WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 20 months ago

#14781 new feature request

Allow upload of PHP files as plugin

Reported by: hakre Owned by:
Priority: normal Milestone: Future Release
Component: Upgrade/Install Version:
Severity: normal Keywords: has-patch dev-feedback
Cc:

Description

Currently allowed are only ZIP packages. Plugins that consist of a single PHP file are not supported. It would be handy if uploading a single PHP file is an option.

Attachments (2)

php_upload_func.patch (1.3 KB) - added by Ornani 3 years ago.
14781_2.diff (1.3 KB) - added by edwardw 20 months ago.
Refresh of existing patch

Download all attachments as: .zip

Change History (11)

comment:1 hakre3 years ago

Related: #9757

comment:2 hakre3 years ago

Workaround: Zipping the single one PHP file (not having any directory attached) and uploading it, does the job.

comment:3 nacin3 years ago

  • Component changed from General to Upgrade/Install
  • Type changed from defect (bug) to enhancement

comment:4 follow-up: dd323 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release
  • Type changed from enhancement to feature request

Seems like a relatively sane idea, Checks would need to be performed obviously to ensure that the file contains proper plugin headers.

comment:5 in reply to: ↑ 4 hakre3 years ago

Replying to dd32:

Seems like a relatively sane idea, Checks would need to be performed obviously to ensure that the file contains proper plugin headers.

Shouldn't we do the exact checks on the unpacked zip as well?

comment:6 dd323 years ago

Shouldn't we do the exact checks on the unpacked zip as well?

They are done AFAIK, However skipping the unzip process would bypass that section of code.

Ornani3 years ago

comment:7 Ornani3 years ago

  • Keywords needs-testing added

I've attached a patch that fixes this issue functional-wise. Now you can upload a single PHP file or ZIP archives.

The thing that is not done is taking care over the texts and user messages.

Also needs testing.

comment:8 Ornani3 years ago

  • Keywords changed from needs-patch, needs-testing to needs-patch,needs-testing

edwardw20 months ago

Refresh of existing patch

comment:9 edwardw20 months ago

  • Keywords has-patch dev-feedback added; needs-patch needs-testing removed
Note: See TracTickets for help on using tickets.