Make WordPress Core


Ignore:
Timestamp:
06/12/2012 06:39:16 PM (14 years ago)
Author:
nacin
Message:

Theme Customizer: Validate themes with more than just an existence check.

  • The current theme goes through validate_current_theme().
  • If doing a preview of a different theme, we check theme->errors().

Also:

  • Don't attach previewing hooks when previewing the current theme.

Aside from being unnecessary, this prevents issues with a theme with
the error of theme_parent_invalid.

  • Call send_origin_headers() earlier, to allow wp_die( '0' ) to properly

be returned in a domain mapping situation.

  • Fix the 'Save & Activate' message on themes.php.

fixes #20921.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/customize.php

    r21031 r21069  
    162162            'preview'       => esc_url( $url ? $url : home_url( '/' ) ),
    163163            'parent'        => esc_url( admin_url() ),
    164             'activated'     => esc_url( admin_url( 'themes.php?activated=true' ) ),
     164            'activated'     => admin_url( 'themes.php?activated=true&previewed' ),
    165165            'ajax'          => esc_url( admin_url( 'admin-ajax.php', 'relative' ) ),
    166166            'allowed'       => array_map( 'esc_url', $allowed_urls ),
Note: See TracChangeset for help on using the changeset viewer.