Changeset 38172
- Timestamp:
- 07/31/2016 06:10:45 PM (8 years ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/css/themes.css
r37872 r38172 1027 1027 1028 1028 .upload-view-toggle .browse, 1029 . upload-view-toggle.upload-tab.upload {1029 .plugin-install-tab-upload .upload-view-toggle .upload { 1030 1030 display: none; 1031 1031 } 1032 1032 1033 . upload-view-toggle.upload-tab.browse {1033 .plugin-install-tab-upload .upload-view-toggle .browse { 1034 1034 display: inline; 1035 1035 } … … 1049 1049 } 1050 1050 1051 .upload-plugin-wrap { 1052 display: none; 1053 } 1054 1051 1055 .show-upload-view .upload-theme, 1052 1056 .show-upload-view .upload-plugin, 1053 .upload-tab .upload-plugin { 1057 .show-upload-view .upload-plugin-wrap, 1058 .plugin-install-tab-upload .upload-plugin { 1054 1059 display: block; 1055 1060 } -
trunk/src/wp-admin/includes/admin-filters.php
r38046 r38172 71 71 // Plugin Install hooks. 72 72 add_action( 'install_plugins_featured', 'install_dashboard' ); 73 add_action( 'install_plugins_upload', 'install_plugins_upload' ); 73 74 add_action( 'install_plugins_search', 'display_plugins_table' ); 74 75 add_action( 'install_plugins_popular', 'display_plugins_table' ); -
trunk/src/wp-admin/js/plugin-install.js
r37681 r38172 13 13 $firstTabbable, 14 14 $lastTabbable, 15 uploadViewToggle = $( '.upload-view-toggle' ), 15 $uploadViewToggle = $( '.upload-view-toggle' ), 16 $wrap = $ ( '.wrap' ), 16 17 $body = $( document.body ); 17 18 … … 184 185 * rather than sending them to the devoted upload plugin page. 185 186 * The `?tab=upload` page still exists for no-js support and for plugins that 186 * might access it directly (?). When we're in this page, let the link behave187 * might access it directly. When we're in this page, let the link behave 187 188 * like a link. Otherwise we're in the normal plugin installer pages and the 188 189 * link should behave like a toggle button. 189 190 */ 190 if ( ! uploadViewToggle.hasClass( 'upload-tab' ) ) {191 uploadViewToggle191 if ( ! $wrap.hasClass( 'plugin-install-tab-upload' ) ) { 192 $uploadViewToggle 192 193 .attr({ 193 194 role: 'button', … … 197 198 event.preventDefault(); 198 199 $body.toggleClass( 'show-upload-view' ); 199 uploadViewToggle.attr( 'aria-expanded', $body.hasClass( 'show-upload-view' ) );200 $uploadViewToggle.attr( 'aria-expanded', $body.hasClass( 'show-upload-view' ) ); 200 201 }); 201 202 } -
trunk/src/wp-admin/plugin-install.php
r38119 r38172 67 67 do_action( "install_plugins_pre_$tab" ); 68 68 69 /* 70 * Call the pre upload action on every non-upload plugin install screen 71 * because the form is always displayed on these screens. 72 */ 73 if ( 'upload' !== $tab ) { 74 /** This action is documented in wp-admin/plugin-install.php */ 75 do_action( 'install_plugins_pre_upload' ); 76 } 77 69 78 get_current_screen()->add_help_tab( array( 70 79 'id' => 'overview', … … 102 111 include(ABSPATH . 'wp-admin/admin-header.php'); 103 112 ?> 104 <div class="wrap ">113 <div class="wrap <?php echo esc_attr( "plugin-install-tab-$tab" ); ?>"> 105 114 <h1> 106 115 <?php 107 116 echo esc_html( $title ); 108 117 if ( ! empty( $tabs['upload'] ) && current_user_can( 'upload_plugins' ) ) { 109 if ( $tab === 'upload' ) { 110 $href = self_admin_url( 'plugin-install.php' ); 111 $upload_tab_class = ' upload-tab'; 112 } else { 113 $href = self_admin_url( 'plugin-install.php?tab=upload' ); 114 $upload_tab_class = ''; 115 } 116 117 printf( ' <a href="%s" class="upload-view-toggle page-title-action%s"><span class="upload">%s</span><span class="browse">%s</span></a>', 118 $href, 119 $upload_tab_class, 118 printf( ' <a href="%s" class="upload-view-toggle page-title-action"><span class="upload">%s</span><span class="browse">%s</span></a>', 119 ( 'upload' === $tab ) ? self_admin_url( 'plugin-install.php' ) : self_admin_url( 'plugin-install.php?tab=upload' ), 120 120 __( 'Upload Plugin' ), 121 121 __( 'Browse Plugins' ) … … 125 125 </h1> 126 126 127 <div class="upload-plugin-wrap<?php echo $upload_tab_class; ?>">128 127 <?php 129 128 /* 130 * Output the upload plugin form on every plugin install screen, so it can be129 * Output the upload plugin form on every non-upload plugin install screen, so it can be 131 130 * displayed via JavaScript rather then opening up the devoted upload plugin page. 132 131 */ 133 install_plugins_upload(); ?> 134 </div> 132 if ( $tab !== 'upload' ) { 133 ?> 134 <div class="upload-plugin-wrap"> 135 <?php 136 /** This action is documented in wp-admin/plugin-install.php */ 137 do_action( 'install_plugins_upload' ); 138 ?> 139 </div> 140 <?php 141 } 135 142 136 <?php137 143 if ( $tab !== 'upload' ) { 138 144 $wp_list_table->views();
Note: See TracChangeset
for help on using the changeset viewer.