WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#36923 closed enhancement (invalid)

Create filter for $details_url in wp_theme_update_row()

Reported by: afragen Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Upgrade/Install Keywords: has-patch
Focuses: administration Cc:

Description

Currently, this function populates data for the details overlay for theme updates. Usually what is populated is the .org page for the theme. If a theme is not hosted on .org the overlay displays as a large white space blocking the screen with no information.

My use case is for updater code that populates themes_api() and so will have relevant information but no ability to display it. By allowing a filter here a developer may change the parameters of $details_url and have the ability to provide useful information to their users.

Thanks.

Attachments (5)

36923.diff (986 bytes) - added by afragen 5 years ago.
36923-2.diff (818 bytes) - added by afragen 5 years ago.
screenshot_02.png (293.1 KB) - added by afragen 5 years ago.
screenshot_03.png (65.0 KB) - added by afragen 5 years ago.
screenshot_01.png (162.1 KB) - added by afragen 5 years ago.

Download all attachments as: .zip

Change History (14)

@afragen
5 years ago

@afragen
5 years ago

#1 @afragen
5 years ago

Just some extra stuff removed from the diff.

#2 @afragen
5 years ago

  • Keywords has-patch added

#3 @dd32
5 years ago

I'm not sure this filter is needed (unless I'm missing something obvious), as if you're filtering the update response to add non-w.org-hosted plugins, then you'll be able to set the url field (which this filter is filtering) to whatever you want.

@afragen
5 years ago

@afragen
5 years ago

@afragen
5 years ago

#4 @afragen
5 years ago

In multisite, the current behavior loads a page from the theme directory that doesn't appear to have a close box and fills a majority of the screen. Perhaps, this is another issue?


For a non .org hosted theme it looks like this.


Filtering $details_url also allows me to filter the size of the popup and actually display some information.


Version 0, edited 5 years ago by afragen (next)

#5 follow-up: @afragen
5 years ago

I'm not sure this filter is needed (unless I'm missing something obvious), as if you're filtering the update response to add non-w.org-hosted plugins, then you'll be able to set the url field (which this filter is filtering) to whatever you want.

That's it exactly.

#6 in reply to: ↑ 5 @dd32
5 years ago

Replying to afragen:

I'm not sure this filter is needed (unless I'm missing something obvious), as if you're filtering the update response to add non-w.org-hosted plugins, then you'll be able to set the url field (which this filter is filtering) to whatever you want.

That's it exactly.

I think you're missing the fact that $current->response[ $theme_key ]['url'] can be set by your updater code.
The only thing this filter achieves is filtering the width/height of the thickbox.

#7 @afragen
5 years ago

I think I understand now. Thanks.

#8 @afragen
5 years ago

  • Resolution set to invalid
  • Status changed from new to closed

#9 @ocean90
5 years ago

  • Focuses administration added
  • Milestone Awaiting Review deleted
  • Type changed from feature request to enhancement
  • Version trunk deleted
Note: See TracTickets for help on using tickets.