Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#20266 closed defect (bug) (fixed)

Update get_plugin_data()

Reported by: nacin Owned by: nacin
Milestone: 3.4 Priority: normal
Severity: normal Version:
Component: Plugins Keywords:
Focuses: Cc:


#20103 started with taking get_plugin_data() and _get_plugin_data_markup_translate() and applying the same concept to themes. Eventually I discarded that approach, but not before I had fixed up both of these functions.

Attached is a patch.

Attachments (1)

20266.diff (5.6 KB) - added by nacin 4 years ago.

Download all attachments as: .zip

Change History (4)

@nacin4 years ago

comment:1 @nacin4 years ago

The one issue with 20266.diff is that it causes sanitized data to be cached (as _get_plugin_data_markup_translate() is run even when $markup = $translate = false), but then will still re-sanitize the data when _get_plugin_data_markup_translate() is used later to apply markup or apply translations.

We probably need a final sanitize = false parameter, then call sanitize = true in get_plugins(). (Or true by default and false where we don't need it.) In general, these kinds of issues were what caused WP_Theme to be written.

comment:2 @nacin4 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In [20229]:

Clean up get_plugin_data() and _get_plugin_data_markup_translate(), and standardize sanitization. fixes #20266.

comment:3 @kawauso4 years ago

Related: #16418

Note: See TracTickets for help on using tickets.