[wp-trac] [WordPress Trac] #44891: Activate button showing after theme activated

WordPress Trac noreply at wordpress.org
Wed Sep 5 10:45:00 UTC 2018


#44891: Activate button showing after theme activated
-------------------------------------------------+-------------------------
 Reporter:  anilhada                             |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Themes                               |     Version:  4.9.8
 Severity:  normal                               |  Resolution:
 Keywords:  has-screenshots has-patch needs-     |     Focuses:  ui,
  testing                                        |  administration
-------------------------------------------------+-------------------------

Comment (by birgire):

 Thanks for the report @anilhada, this looks like a good find.

 @mukesh27 That looks like a good starting point.

 I wonder if we could adjusted some more:

 [attachment:"featured-themes-with-active-theme-shown.jpg"] is a suggestion
 that displayes the "Active" theme in a similar way as in the current list
 of [attachment:"installed-themes.jpg"].

 The patch in [attachment:"44891.2.diff"] makes {{{data.active}}} available
 in the Backbone micro template via the {{{wp_ajax_query_themes()}}}
 function with:

 {{{
 $theme->active = ( $theme->slug === $current_theme );

 }}}

 where we use {{{$current_theme = get_stylesheet()}}} as we have in
 {{{wp_prepare_themes_for_js()}}}.

 It also makes some adjustments to the Backbone micro templates.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44891#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list