WordPress.org

Make WordPress Core

Changeset 20495


Ignore:
Timestamp:
04/17/2012 08:49:39 PM (8 years ago)
Author:
koopersmith
Message:

Theme Customizer: Display 'Save and Activate' when switching themes. Add and properties to the WP_Customize class. see #19910.

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-customize.php

    r20419 r20495  
    1111    protected $template;
    1212    protected $stylesheet;
     13    protected $original_template;
     14    protected $original_stylesheet;
     15
    1316    protected $previewing = false;
    1417
     
    8184
    8285        show_admin_bar( false );
     86
     87        $this->original_template   = get_template();
     88        $this->original_stylesheet = get_stylesheet();
    8389
    8490        add_filter( 'template', array( $this, 'get_template' ) );
  • trunk/wp-includes/customize-controls.php

    r20476 r20495  
    8282        <div id="customize-footer-actions" class="customize-section wp-full-overlay-footer">
    8383            <?php
    84             submit_button( __( 'Save' ), 'primary', 'save', false );
     84            $save_text = $this->get_stylesheet() == $this->original_stylesheet ? __('Save') : __('Save and Activate');
     85            submit_button( $save_text, 'primary', 'save', false );
    8586            ?>
    8687            <a href="#" class="collapse-sidebar button-secondary" title="<?php esc_attr_e('Collapse Sidebar'); ?>">
Note: See TracChangeset for help on using the changeset viewer.