WordPress.org

Make WordPress Core

Changeset 19811


Ignore:
Timestamp:
02/01/12 22:31:35 (2 years ago)
Author:
nacin
Message:

Use home_url() rather than get_option() + is_ssl(). props ocean90, fixes #19942.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-themes-list-table.php

    r19712 r19811  
    140140    $theme_root = $themes[$theme_name]['Theme Root']; 
    141141    $theme_root_uri = $themes[$theme_name]['Theme Root URI']; 
    142     $preview_link = esc_url( get_option( 'home' ) . '/' ); 
    143     if ( is_ssl() ) 
    144         $preview_link = str_replace( 'http://', 'https://', $preview_link ); 
    145     $preview_link = htmlspecialchars( add_query_arg( array( 'preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'preview_iframe' => true, 'TB_iframe' => 'true' ), $preview_link ) ); 
     142    $preview_link = esc_url( add_query_arg( array( 'preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'preview_iframe' => true, 'TB_iframe' => 'true' ), home_url( '/' ) ) ); 
    146143    $preview_text = esc_attr( sprintf( __( 'Preview of “%s”' ), $title ) ); 
    147144    $tags = $themes[$theme_name]['Tags']; 
    148145    $thickbox_class = 'thickbox thickbox-preview'; 
    149     $activate_link = wp_nonce_url( "themes.php?action=activate&template=".urlencode( $template )."&stylesheet=".urlencode( $stylesheet ), 'switch-theme_' . $template ); 
     146    $activate_link = wp_nonce_url( "themes.php?action=activate&template=" . urlencode( $template ) . "&stylesheet=" . urlencode( $stylesheet ), 'switch-theme_' . $template ); 
    150147    $activate_text = esc_attr( sprintf( __( 'Activate “%s”' ), $title ) ); 
    151148    $actions = array(); 
Note: See TracChangeset for help on using the changeset viewer.