- Timestamp:
- 09/01/2019 05:12:43 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-theme-upgrader-skin.php
r45583 r45926 65 65 admin_url( 'customize.php' ) 66 66 ); 67 67 68 if ( get_stylesheet() == $stylesheet ) { 68 69 if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { 69 $update_actions['preview'] = '<a href="' . esc_url( $customize_url ) . '" class="hide-if-no-customize load-customize">'; 70 $update_actions['preview'] .= '<span aria-hidden="true">' . __( 'Customize' ) . '</span>'; 71 /* translators: %s: theme name */ 72 $update_actions['preview'] .= '<span class="screen-reader-text">' . sprintf( __( 'Customize “%s”' ), $name ) . '</span></a>'; 70 $update_actions['preview'] = sprintf( 71 '<a href="%s" class="hide-if-no-customize load-customize">' . 72 '<span aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></a>', 73 esc_url( $customize_url ), 74 __( 'Customize' ), 75 /* translators: %s: theme name */ 76 sprintf( __( 'Customize “%s”' ), $name ) 77 ); 73 78 } 74 79 } elseif ( current_user_can( 'switch_themes' ) ) { 75 80 if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { 76 $update_actions['preview'] = '<a href="' . esc_url( $customize_url ) . '" class="hide-if-no-customize load-customize">'; 77 $update_actions['preview'] .= '<span aria-hidden="true">' . __( 'Live Preview' ) . '</span>'; 81 $update_actions['preview'] = sprintf( 82 '<a href="%s" class="hide-if-no-customize load-customize">' . 83 '<span aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></a>', 84 esc_url( $customize_url ), 85 __( 'Live Preview' ), 86 /* translators: %s: theme name */ 87 sprintf( __( 'Live Preview “%s”' ), $name ) 88 ); 89 } 90 91 $update_actions['activate'] = sprintf( 92 '<a href="%s" class="activatelink">' . 93 '<span aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></a>', 94 esc_url( $activate_link ), 95 __( 'Activate' ), 78 96 /* translators: %s: theme name */ 79 $update_actions['preview'] .= '<span class="screen-reader-text">' . sprintf( __( 'Live Preview “%s”' ), $name ) . '</span></a>'; 80 } 81 $update_actions['activate'] = '<a href="' . esc_url( $activate_link ) . '" class="activatelink">'; 82 $update_actions['activate'] .= '<span aria-hidden="true">' . __( 'Activate' ) . '</span>'; 83 /* translators: %s: theme name */ 84 $update_actions['activate'] .= '<span class="screen-reader-text">' . sprintf( __( 'Activate “%s”' ), $name ) . '</span></a>'; 97 sprintf( __( 'Activate “%s”' ), $name ) 98 ); 85 99 } 86 100 … … 90 104 } 91 105 92 $update_actions['themes_page'] = '<a href="' . self_admin_url( 'themes.php' ) . '" target="_parent">' . __( 'Return to Themes page' ) . '</a>'; 106 $update_actions['themes_page'] = sprintf( 107 '<a href="%s" target="_parent">%s</a>', 108 self_admin_url( 'themes.php' ), 109 __( 'Return to Themes page' ) 110 ); 93 111 94 112 /**
Note: See TracChangeset
for help on using the changeset viewer.