- Timestamp:
- 09/01/2019 05:12:43 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-themes-list-table.php
r45881 r45926 98 98 if ( is_multisite() ) { 99 99 if ( current_user_can( 'install_themes' ) && current_user_can( 'manage_network_themes' ) ) { 100 printf( __( 'You only have one theme enabled for this site right now. Visit the Network Admin to <a href="%1$s">enable</a> or <a href="%2$s">install</a> more themes.' ), network_admin_url( 'site-themes.php?id=' . $blog_id ), network_admin_url( 'theme-install.php' ) ); 100 printf( 101 /* translators: 1: URL to Themes tab on Edit Site screen, 2: URL to Add Themes screen */ 102 __( 'You only have one theme enabled for this site right now. Visit the Network Admin to <a href="%1$s">enable</a> or <a href="%2$s">install</a> more themes.' ), 103 network_admin_url( 'site-themes.php?id=' . $blog_id ), 104 network_admin_url( 'theme-install.php' ) 105 ); 101 106 102 107 return; 103 108 } elseif ( current_user_can( 'manage_network_themes' ) ) { 104 printf( __( 'You only have one theme enabled for this site right now. Visit the Network Admin to <a href="%1$s">enable</a> more themes.' ), network_admin_url( 'site-themes.php?id=' . $blog_id ) ); 109 printf( 110 /* translators: %s: URL to Themes tab on Edit Site screen */ 111 __( 'You only have one theme enabled for this site right now. Visit the Network Admin to <a href="%s">enable</a> more themes.' ), 112 network_admin_url( 'site-themes.php?id=' . $blog_id ) 113 ); 105 114 106 115 return; … … 109 118 } else { 110 119 if ( current_user_can( 'install_themes' ) ) { 111 printf( __( 'You only have one theme installed right now. Live a little! You can choose from over 1,000 free themes in the WordPress Theme Directory at any time: just click on the <a href="%s">Install Themes</a> tab above.' ), admin_url( 'theme-install.php' ) ); 120 printf( 121 /* translators: %s: URL to Add Themes screen */ 122 __( 'You only have one theme installed right now. Live a little! You can choose from over 1,000 free themes in the WordPress Theme Directory at any time: just click on the <a href="%s">Install Themes</a> tab above.' ), 123 admin_url( 'theme-install.php' ) 124 ); 112 125 113 126 return; … … 115 128 } 116 129 // Fallthrough. 117 printf( __( 'Only the current theme is available to you. Contact the %s administrator for information about accessing additional themes.' ), get_site_option( 'site_name' ) ); 130 printf( 131 /* translators: %s: network title */ 132 __( 'Only the current theme is available to you. Contact the %s administrator for information about accessing additional themes.' ), 133 get_site_option( 'site_name' ) 134 ); 118 135 } 119 136 … … 187 204 188 205 $actions = array(); 189 $actions['activate'] = '<a href="' . $activate_link . '" class="activatelink" title="' 190 . esc_attr( sprintf( __( 'Activate “%s”' ), $title ) ) . '">' . __( 'Activate' ) . '</a>'; 206 $actions['activate'] = sprintf( 207 '<a href="%s" class="activatelink" title="%s">%s</a>', 208 $activate_link, 209 /* translators: %s: theme name */ 210 esc_attr( sprintf( __( 'Activate “%s”' ), $title ) ), 211 __( 'Activate' ) 212 ); 191 213 192 214 if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { 193 $actions['preview'] .= '<a href="' . wp_customize_url( $stylesheet ) . '" class="load-customize hide-if-no-customize">' 194 . __( 'Live Preview' ) . '</a>'; 215 $actions['preview'] .= sprintf( 216 '<a href="%s" class="load-customize hide-if-no-customize">%s</a>', 217 wp_customize_url( $stylesheet ), 218 __( 'Live Preview' ) 219 ); 195 220 } 196 221 197 222 if ( ! is_multisite() && current_user_can( 'delete_themes' ) ) { 198 $actions['delete'] = '<a class="submitdelete deletion" href="' . wp_nonce_url( 'themes.php?action=delete&stylesheet=' . urlencode( $stylesheet ), 'delete-theme_' . $stylesheet ) 199 . '" onclick="' . "return confirm( '" . esc_js( sprintf( __( "You are about to delete this theme '%s'\n 'Cancel' to stop, 'OK' to delete." ), $title ) ) 200 . "' );" . '">' . __( 'Delete' ) . '</a>'; 223 $actions['delete'] = sprintf( 224 '<a class="submitdelete deletion" href="%s" onclick="return confirm( \'%s\' );">%s</a>', 225 wp_nonce_url( 'themes.php?action=delete&stylesheet=' . urlencode( $stylesheet ), 'delete-theme_' . $stylesheet ), 226 /* translators: %s: theme name */ 227 esc_js( sprintf( __( "You are about to delete this theme '%s'\n 'Cancel' to stop, 'OK' to delete." ), $title ) ), 228 __( 'Delete' ) 229 ); 201 230 } 202 231 … … 224 253 225 254 <h3><?php echo $title; ?></h3> 226 <div class="theme-author"><?php printf( __( 'By %s' ), $author ); ?></div> 255 <div class="theme-author"> 256 <?php 257 /* translators: %s: theme author */ 258 printf( __( 'By %s' ), $author ); 259 ?> 260 </div> 227 261 <div class="action-links"> 228 262 <ul>
Note: See TracChangeset
for help on using the changeset viewer.