Themes: Show a disabled "Activated" button instead of "Activate" for the active theme on Add Themes screen.
Additionally, switch the "Live Preview" label for the active theme to "Customize", for consistency with the Themes screen. Props afercia, SergeyBiryukov. Fixes #50334. Built from https://develop.svn.wordpress.org/trunk@47924 git-svn-id: http://core.svn.wordpress.org/trunk@47698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -28,11 +28,16 @@ themes.Model = Backbone.Model.extend({
|
||||
initialize: function() {
|
||||
var description;
|
||||
|
||||
// If theme is already installed, set an attribute.
|
||||
// If the theme is already installed, set an attribute.
|
||||
if ( _.indexOf( themes.data.installedThemes, this.get( 'slug' ) ) !== -1 ) {
|
||||
this.set({ installed: true });
|
||||
}
|
||||
|
||||
// If the theme is active, set an attribute.
|
||||
if ( themes.data.activeTheme === this.get( 'slug' ) ) {
|
||||
this.set({ active: true });
|
||||
}
|
||||
|
||||
// Set the attributes.
|
||||
this.set({
|
||||
// `slug` is for installation, `id` is for existing.
|
||||
|
||||
Reference in New Issue
Block a user