Skip to content

Commit

Permalink
Use home_url() rather than get_option() + is_ssl(). props ocean90, fi…
Browse files Browse the repository at this point in the history
…xes #19942.

git-svn-id: http://svn.automattic.com/wordpress/trunk@19811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
nacin committed Feb 1, 2012
1 parent b6edf3d commit cbafaae
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions wp-admin/includes/class-wp-themes-list-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,11 @@ function display_rows() {
$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>';
Expand Down

0 comments on commit cbafaae

Please sign in to comment.