WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/03/2010 10:13:17 AM (10 years ago)
Author:
nacin
Message:

Post format indexes. First pass. see #15378.

File:
1 edited

Legend:

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

    r16553 r16705  
    1313$wp_list_table->check_permissions();
    1414
    15 if ( current_user_can('switch_themes') && isset($_GET['action']) ) {
     15if ( current_user_can( 'switch_themes' ) && isset($_GET['action'] ) ) {
    1616    if ( 'activate' == $_GET['action'] ) {
    1717        check_admin_referer('switch-theme_' . $_GET['template']);
     
    1919        wp_redirect( admin_url('themes.php?activated=true') );
    2020        exit;
    21     } else if ( 'delete' == $_GET['action'] ) {
     21    } elseif ( 'delete' == $_GET['action'] ) {
    2222        check_admin_referer('delete-theme_' . $_GET['template']);
    2323        if ( !current_user_can('delete_themes') )
     
    3535
    3636if ( current_user_can( 'switch_themes' ) ) :
     37
     38// Flush rewrite rules on activation once new theme is in place.
     39if ( isset( $_GET['activated'] ) && $_GET['activated'] == 'true' )
     40    flush_rewrite_rules();
    3741
    3842$help = '<p>' . __('Aside from the default theme included with your WordPress installation, themes are designed and developed by third parties.') . '</p>';
Note: See TracChangeset for help on using the changeset viewer.