- Timestamp:
- 10/09/2017 04:03:35 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-theme-upgrader-skin.php
r41161 r41797 50 50 $activate_link = wp_nonce_url( $activate_link, 'switch-theme_' . $stylesheet ); 51 51 52 $customize_url = add_query_arg( 53 array( 54 'theme' => urlencode( $stylesheet ), 55 'return' => urlencode( admin_url( 'themes.php' ) ), 56 ), 57 admin_url( 'customize.php' ) 58 ); 52 59 if ( get_stylesheet() == $stylesheet ) { 53 60 if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { 54 $update_actions['preview'] = '<a href="' . wp_customize_url( $stylesheet) . '" class="hide-if-no-customize load-customize"><span aria-hidden="true">' . __( 'Customize' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Customize “%s”' ), $name ) . '</span></a>';61 $update_actions['preview'] = '<a href="' . esc_url( $customize_url ) . '" class="hide-if-no-customize load-customize"><span aria-hidden="true">' . __( 'Customize' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Customize “%s”' ), $name ) . '</span></a>'; 55 62 } 56 63 } elseif ( current_user_can( 'switch_themes' ) ) { 57 64 if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { 58 $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>';65 $update_actions['preview'] = '<a href="' . esc_url( $customize_url ) . '" 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>'; 59 66 } 60 67 $update_actions['activate'] = '<a href="' . esc_url( $activate_link ) . '" class="activatelink"><span aria-hidden="true">' . __( 'Activate' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Activate “%s”' ), $name ) . '</span></a>';
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)