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

git-svn-id: https://develop.svn.wordpress.org/trunk@19811 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-02-01 22:31:35 +00:00
parent 5371356600
commit b3b0fa681d
1 changed files with 2 additions and 5 deletions

View File

@ -139,14 +139,11 @@ class WP_Themes_List_Table extends WP_List_Table {
$parent_theme = $themes[$theme_name]['Parent Theme'];
$theme_root = $themes[$theme_name]['Theme Root'];
$theme_root_uri = $themes[$theme_name]['Theme Root URI'];
$preview_link = esc_url( get_option( 'home' ) . '/' );
if ( is_ssl() )
$preview_link = str_replace( 'http://', 'https://', $preview_link );
$preview_link = htmlspecialchars( add_query_arg( array( 'preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'preview_iframe' => true, 'TB_iframe' => 'true' ), $preview_link ) );
$preview_link = esc_url( add_query_arg( array( 'preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'preview_iframe' => true, 'TB_iframe' => 'true' ), home_url( '/' ) ) );
$preview_text = esc_attr( sprintf( __( 'Preview of “%s”' ), $title ) );
$tags = $themes[$theme_name]['Tags'];
$thickbox_class = 'thickbox thickbox-preview';
$activate_link = wp_nonce_url( "themes.php?action=activate&template=".urlencode( $template )."&stylesheet=".urlencode( $stylesheet ), 'switch-theme_' . $template );
$activate_link = wp_nonce_url( "themes.php?action=activate&template=" . urlencode( $template ) . "&stylesheet=" . urlencode( $stylesheet ), 'switch-theme_' . $template );
$activate_text = esc_attr( sprintf( __( 'Activate “%s”' ), $title ) );
$actions = array();
$actions[] = '<a href="' . $activate_link . '" class="activatelink" title="' . $activate_text . '">' . __( 'Activate' ) . '</a>';