[wp-trac] [WordPress Trac] #43992: Prevent activation of a plugin if its required PHP version is too high

WordPress Trac noreply at wordpress.org
Fri Jan 25 22:19:59 UTC 2019


#43992: Prevent activation of a plugin if its required PHP version is too high
-------------------------------------------------+-------------------------
 Reporter:  flixos90                             |       Owner:  (none)
     Type:  task (blessed)                       |      Status:  new
 Priority:  normal                               |   Milestone:  5.2
Component:  Plugins                              |     Version:
 Severity:  major                                |  Resolution:
 Keywords:  needs-unit-tests servehappy dev-     |     Focuses:
  feedback has-patch needs-testing               |
-------------------------------------------------+-------------------------

Comment (by afragen):

 Replying to [comment:20 joyously]:
 > Comment 10 is talking about reading local versus using the API.
 `get_plugin_data` calls `get_file_data` which reads from the local file.
 The first parameter is the file to use, so you pass it the readme instead
 of the main plugin file. Still don't need your WP_Readme_Header_Parser.

 Comment 10 references the last part of the ticket description. Obtaining
 the data from a local `readme.txt` file and not from the API. The API
 parses the uploaded `readme.txt` file.

 `get_file_data()` reads from a plugin or theme main file, not from the
 `readme.txt`. `get_file_data()` references
 [https://codex.wordpress.org/File_Header File Header] in the Codex.
 `get_file_data()` will not correctly parse a `readme.txt` file.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/43992#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list