Changeset 29634 for trunk/src/wp-admin/plugin-install.php
- Timestamp:
- 08/27/2014 01:31:05 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/plugin-install.php
r29218 r29634 27 27 $wp_list_table->prepare_items(); 28 28 29 $title = __( 'Install Plugins');29 $title = __( 'Add Plugins' ); 30 30 $parent_file = 'plugins.php'; 31 31 … … 76 76 <h2> 77 77 <?php 78 echo esc_html( $title ); 79 $href = self_admin_url( 'plugin-install.php?tab=upload' ); 78 echo esc_html( $title ); 79 if ( ! empty( $tabs['upload'] ) && current_user_can( 'upload_plugins' ) ) { 80 if ( $tab === 'upload' ) { 81 $href = self_admin_url( 'plugin-install.php' ); 82 $text = _x( 'Browse', 'plugins' ); 83 } else { 84 $href = self_admin_url( 'plugin-install.php?tab=upload' ); 85 $text = __( 'Upload Plugin' ); 86 } 87 echo ' <a href="' . $href . '" class="upload add-new-h2">' . $text . '</a>'; 88 } 80 89 ?> 81 <a href="<?php echo $href; ?>" class="upload add-new-h2"><?php _e( 'Upload Plugin' ); ?></a>82 90 </h2> 83 91 84 <?php $wp_list_table->views(); ?> 92 <?php 93 if ( $tab !== 'upload' ) { 94 $wp_list_table->views(); 95 echo '<br class="clear" />'; 96 } 85 97 86 <br class="clear" />87 <?php88 98 /** 89 99 * Fires after the plugins list table in each tab of the Install Plugins screen.
Note: See TracChangeset
for help on using the changeset viewer.