WordPress.org

Make WordPress Core

Opened 13 months ago

Last modified 13 months ago

#51129 closed defect (bug)

Avoid the Enable/Disable auto-updates links to appear for externally hosted themes on the Network Admin > Themes screen — at Version 2

Reported by: audrasjb Owned by:
Milestone: 5.5.1 Priority: normal
Severity: normal Version:
Component: Upgrade/Install Keywords: has-patch has-screenshots
Focuses: multisite Cc:

Description (last modified by afragen)

This is a follow-up to #

As noted by @pbiron in comment number 66:


The above (Note: see [48688]) commit did not include the requisite changes to WP_MS_Themes_List_Table. The impact is that in multisite, the Enable/Disable auto-updates links will still appear for externally hosted themes on the Network Admin > Themes screen.

I'm looking into what it will take to add the multisite support for this. It's complicated by the fact that plugins use an array (returned by get_plugin_data()) and thus can use array_merge() on the info in the transient, array( 'update-supported => true ) and the plugin_data; whereas themes use an instance of WP_Theme...making the array merge not possible.

I think something can be worked out using the magic __get() and __set() methods of WP_Theme...but still looking into that.

Change History (2)

#1 @SergeyBiryukov
13 months ago

  • Description modified (diff)

#2 @afragen
13 months ago

  • Description modified (diff)

So I have a patch that seems to correctly set the auto-update tabs count in prepare_items() and correctly adds/removes the Enable|Disable auto-updates links in column_autoupdates().

Themes are very much different from plugins as we know.

I'm missing why we actually need the theme headers for setting the auto-updates. Can someone explain this a bit for me? I've been working with plugin/theme updates for a while and know I can add the array( 'update-supported => true ) if it's really needed.

Note: See TracTickets for help on using tickets.