WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#14381 closed defect (bug) (fixed)

WordPress doesn't report the currently active theme

Reported by: josephscott Owned by:
Milestone: 3.0.1 Priority: normal
Severity: normal Version: 3.0
Component: General Keywords: has-patch
Focuses: Cc:

Description

In rev [11714] WordPress stopped reporting the currently active theme to api.wordpress.org - see ticket #10220 for more history.

I've created a small patch to fix this, while I was in there I renamed the field 'active_theme' instead of 'template' to be more descriptive.

Attachments (4)

wp-includes--update.php.diff (854 bytes) - added by josephscott 6 years ago.
14381.diff (3.4 KB) - added by ryan 6 years ago.
14381.2.diff (3.7 KB) - added by ryan 6 years ago.
Send more theme fields to api. Blacklist unneeded fields.
14381.3.diff (3.7 KB) - added by josephscott 6 years ago.

Download all attachments as: .zip

Change History (14)

#1 @ryan
6 years ago

Should it use 'stylesheet' instead of 'template'?

#2 @westi
6 years ago

The whole naming convention in this function is a little sucky it seems.

I guess we should clear some of that up too.

#3 @westi
6 years ago

$current_theme->active_stylesheet = get_option( 'stylesheet' );
Should probably add so we get parent and child theme

#4 @ryan
6 years ago

Does api.wordpress.org need any fields other than Name and Version. It seems we are sending a lot of useless data.

#5 @ryan
6 years ago

Also, current_theme is being filled with the previous update response and then stuck into the request. Seems current_theme when sent in the request should not have checked and response fields.

@ryan
6 years ago

#6 @ryan
6 years ago

That cleans things up a bit. $current_theme is gone. Instead the current theme slug is assigned to the 'current_theme' key of the themes array. This gets rid of all of the local cache junk that was being sent to api under the current_theme key. The themes array is populated with only the Name and Version for each theme. That's all I see being used api side. The last cached update and the new update are in better named $last_update and $new_update variables.

@ryan
6 years ago

Send more theme fields to api. Blacklist unneeded fields.

#7 @ryan
6 years ago

It seems we need to send more than just version, name, and slug to help with disambiguation. Updated patch to blacklist certain fields and let the rest through.

@josephscott
6 years ago

#8 @josephscott
6 years ago

I don't think we need Description, Tags or Screenshot fields either.

#9 @ryan
6 years ago

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

(In [15455]) Clean up wp_update_themes(). Fix reporting of active theme. Props josephscott. fixes #14381 for 3.1

#10 @ryan
6 years ago

(In [15456]) Clean up wp_update_themes(). Fix reporting of active theme. Props josephscott. fixes #14381 for 3.0.1

Note: See TracTickets for help on using tickets.