WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 6 years ago

Last modified 5 years ago

#7519 closed task (blessed) (fixed)

theme update api

Reported by: lloydbudd Owned by: rboren
Milestone: 2.7 Priority: high
Severity: major Version: 2.7
Component: Themes Keywords: blessed has-patch needs-testing
Focuses: Cc:

Description

theme update api, like we do for plugins

Attachments (4)

wp-includes--update.php.diff (3.2 KB) - added by josephscott 7 years ago.
7519.diff (12.8 KB) - added by DD32 7 years ago.
7519.2.diff (1.7 KB) - added by DD32 7 years ago.
7519.3.diff (1.8 KB) - added by DD32 7 years ago.

Download all attachments as: .zip

Change History (28)

comment:1 @ryan7 years ago

Joseph and I will start looking at version-check API for themes soon. The WP side of the work should largely be a cut-and-paste of the plugin code. To accommodate those who modify their themes, we might need some sort of diff service to warn them that they have changes that the update will overwrite.

comment:2 @josephscott7 years ago

This patch adds support for checking with api.wordpress.org on theme updates.

comment:3 @ryan7 years ago

(In [8891]) Themes API from josephscott. see #7519

comment:4 @jacobsantos7 years ago

Note to self: Fix inline documentation and submit ticket to #7550.

@DD327 years ago

comment:5 @DD327 years ago

  • Version set to 2.7

attachment 7519.diff added.

Initial Theme update

  • Needs to handle current-theme-is-active use case
  • May need testing for Child/Parent themes(I really dont know the backend of that 100%)
  • Currently bases everything off 'stylesheet' and 'Stylesheet Dir'
  • Cache busting added to update themes function for added/changed themes
  • Fixed a Tags if statement covering too much content
  • Check the TODO's

comment:6 @DD327 years ago

  • Has some issues with JS and thickbox on the update links

comment:7 @DD327 years ago

  • BTW: The API was returning a null version for me last night while writing that patch, Shouldnt affect the patch though; Just a FYI

comment:8 @westi7 years ago

(In [8989]) Theme update UI first pass. See #7519 props DD32.

comment:9 @ShaneF7 years ago

I'll get this testing with SSH2 testing.

comment:10 @DD327 years ago

SSH2 should work perfectly, As long as it implements all the same functionality as FTP. I've only tested upgrade with Direct and FTP so far however.

comment:11 @ryan7 years ago

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

comment:12 @DD327 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Can someone with more theme knowledge complete the update-current-theme use case in the updater?

[8989] see trunk/wp-admin/update.php => TODO

Basically:

  • If theme is active: Switch to default (Or put blog into maintainence?)
  • Upgrade
  • If theme was active (And the theme was switched to default) Switch to ugraded theme, Else, If theme put into maintainence, Deactivate the maintainence mode.

comment:13 @ShaneF7 years ago

I'll take a stab @ it.

comment:14 @ryan7 years ago

  • Component changed from Administration to Themes

comment:15 @westi7 years ago

  • Severity changed from major to blocker

Raising to blocker.

Should we just go into maintenance mode like we do for core upgrade.

@DD327 years ago

comment:16 @DD327 years ago

attachment 7519.2.diff added.

  • Puts blog into maintainence mode during theme update
  • ..See next patch for one that puts it into maintainence mode for if the current Stylesheet, OR parent theme is being updated..
  • Takes blog out of maintainence mode on a failed theme update as well, If the theme didnt get touched at all, then it'll be ok, Could be disasterous if theme was only half-updated. Should revert to default theme if the current theme ends up broken on next admin page load i believe?

@DD327 years ago

comment:17 @westi7 years ago

  • Keywords has-patch needs-testing added

+1

Patch looks good to me

Need some testing.

Putting a call out to wp-testers

comment:18 @westi7 years ago

Currently it seems if the active theme is not present you get:

  • Blank Front End - no content at all
  • Back end works fine but you have to go to Apperance > Themes before it detects the missing theme

comment:19 @westi7 years ago

  • Milestone changed from 2.7 to 2.8
  • Severity changed from blocker to major

Too late to get this in before 2.7 goes gold.

Move to 2.8 for now.. Can be backported to 2.7.1 as well.

comment:20 @ryan7 years ago

  • Type changed from enhancement to task (blessed)

comment:21 @ShaneF6 years ago

Isn't this a dup of now the mostly tested #7875 patch?

comment:22 @DD326 years ago

Yes, In the event that huge patch on #7875 gets commited, This ticket can be closed as fixed in 2.7, As the maintainence mode stuff is taken care of by it.

comment:23 @ryan6 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

comment:24 @nacin5 years ago

  • Milestone changed from 2.8 to 2.7
Note: See TracTickets for help on using tickets.