From b3b0fa681d85202681eb0a41b02bdcebcbdb0a6a Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Wed, 1 Feb 2012 22:31:35 +0000 Subject: [PATCH] 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 --- wp-admin/includes/class-wp-themes-list-table.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/wp-admin/includes/class-wp-themes-list-table.php b/wp-admin/includes/class-wp-themes-list-table.php index d2186e61c0..b4ec81c591 100644 --- a/wp-admin/includes/class-wp-themes-list-table.php +++ b/wp-admin/includes/class-wp-themes-list-table.php @@ -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[] = '' . __( 'Activate' ) . '';