Changeset 33492 for trunk/src/wp-admin/includes/class-wp-upgrader-skins.php
- Timestamp:
- 07/29/2015 06:35:40 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-upgrader-skins.php
r32974 r33492 651 651 $template = $theme_info->get_template(); 652 652 653 $preview_link = add_query_arg( array(654 'preview' => 1,655 'template' => urlencode( $template ),656 'stylesheet' => urlencode( $stylesheet ),657 ), trailingslashit( home_url() ) );658 659 653 $activate_link = add_query_arg( array( 660 654 'action' => 'activate', … … 665 659 666 660 $install_actions = array(); 667 $install_actions['preview'] = '<a href="' . esc_url( $preview_link ) . '" class="hide-if-customize"><span aria-hidden="true">' . __( 'Preview' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Preview “%s”' ), $name ) . '</span></a>'; 661 668 662 if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { 669 663 $install_actions['preview'] .= '<a href="' . wp_customize_url( $stylesheet ) . '" class="hide-if-no-customize load-customize"><span aria-hidden="true">' . __( 'Live Preview' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Live Preview “%s”' ), $name ) . '</span></a>'; … … 733 727 $template = $theme_info->get_template(); 734 728 735 $preview_link = add_query_arg( array(736 'preview' => 1,737 'template' => urlencode( $template ),738 'stylesheet' => urlencode( $stylesheet ),739 ), trailingslashit( home_url() ) );740 741 729 $activate_link = add_query_arg( array( 742 730 'action' => 'activate', … … 751 739 } 752 740 } elseif ( current_user_can( 'switch_themes' ) ) { 753 $update_actions['preview'] = '<a href="' . esc_url( $preview_link ) . '" class="hide-if-customize"><span aria-hidden="true">' . __( 'Preview' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Preview “%s”' ), $name ) . '</span></a>';754 741 if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { 755 742 $update_actions['preview'] .= '<a href="' . wp_customize_url( $stylesheet ) . '" class="hide-if-no-customize load-customize"><span aria-hidden="true">' . __( 'Live Preview' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Live Preview “%s”' ), $name ) . '</span></a>';
Note: See TracChangeset
for help on using the changeset viewer.