- 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-installer-skin.php
r43598 r45926 43 43 public function before() { 44 44 if ( ! empty( $this->api ) ) { 45 $this->upgrader->strings['process_success'] = sprintf( $this->upgrader->strings['process_success_specific'], $this->api->name, $this->api->version ); 45 $this->upgrader->strings['process_success'] = sprintf( 46 $this->upgrader->strings['process_success_specific'], 47 $this->api->name, 48 $this->api->version 49 ); 46 50 } 47 51 } … … 76 80 77 81 if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { 78 $customize_url 82 $customize_url = add_query_arg( 79 83 array( 80 84 'theme' => urlencode( $stylesheet ), … … 83 87 admin_url( 'customize.php' ) 84 88 ); 85 $install_actions['preview'] = '<a href="' . esc_url( $customize_url ) . '" class="hide-if-no-customize load-customize">'; 86 $install_actions['preview'] .= '<span aria-hidden="true">' . __( 'Live Preview' ) . '</span>'; 89 90 $install_actions['preview'] = sprintf( 91 '<a href="%s" class="hide-if-no-customize load-customize">' . 92 '<span aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></a>', 93 esc_url( $customize_url ), 94 __( 'Live Preview' ), 95 /* translators: %s: theme name */ 96 sprintf( __( 'Live Preview “%s”' ), $name ) 97 ); 98 } 99 100 $install_actions['activate'] = sprintf( 101 '<a href="%s" class="activatelink">' . 102 '<span aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></a>', 103 esc_url( $activate_link ), 104 __( 'Activate' ), 87 105 /* translators: %s: theme name */ 88 $install_actions['preview'] .= '<span class="screen-reader-text">' . sprintf( __( 'Live Preview “%s”' ), $name ) . '</span></a>'; 89 } 90 $install_actions['activate'] = '<a href="' . esc_url( $activate_link ) . '" class="activatelink">'; 91 $install_actions['activate'] .= '<span aria-hidden="true">' . __( 'Activate' ) . '</span>'; 92 /* translators: %s: theme name */ 93 $install_actions['activate'] .= '<span class="screen-reader-text">' . sprintf( __( 'Activate “%s”' ), $name ) . '</span></a>'; 106 sprintf( __( 'Activate “%s”' ), $name ) 107 ); 94 108 95 109 if ( is_network_admin() && current_user_can( 'manage_network_themes' ) ) { 96 $install_actions['network_enable'] = '<a href="' . esc_url( wp_nonce_url( 'themes.php?action=enable&theme=' . urlencode( $stylesheet ), 'enable-theme_' . $stylesheet ) ) . '" target="_parent">' . __( 'Network Enable' ) . '</a>'; 110 $install_actions['network_enable'] = sprintf( 111 '<a href="%s" target="_parent">%s</a>', 112 esc_url( wp_nonce_url( 'themes.php?action=enable&theme=' . urlencode( $stylesheet ), 'enable-theme_' . $stylesheet ) ), 113 __( 'Network Enable' ) 114 ); 97 115 } 98 116 99 117 if ( $this->type == 'web' ) { 100 $install_actions['themes_page'] = '<a href="' . self_admin_url( 'theme-install.php' ) . '" target="_parent">' . __( 'Return to Theme Installer' ) . '</a>'; 118 $install_actions['themes_page'] = sprintf( 119 '<a href="%s" target="_parent">%s</a>', 120 self_admin_url( 'theme-install.php' ), 121 __( 'Return to Theme Installer' ) 122 ); 101 123 } elseif ( current_user_can( 'switch_themes' ) || current_user_can( 'edit_theme_options' ) ) { 102 $install_actions['themes_page'] = '<a href="' . self_admin_url( 'themes.php' ) . '" target="_parent">' . __( 'Return to Themes page' ) . '</a>'; 124 $install_actions['themes_page'] = sprintf( 125 '<a href="%s" target="_parent">%s</a>', 126 self_admin_url( 'themes.php' ), 127 __( 'Return to Themes page' ) 128 ); 103 129 } 104 130
Note: See TracChangeset
for help on using the changeset viewer.