Ticket #35429: 35429.6.diff
File 35429.6.diff, 9.8 KB (added by , 8 years ago) |
---|
-
src/wp-admin/css/themes.css
1056 1056 .theme-install-php a.browse-themes { 1057 1057 cursor: pointer; 1058 1058 } 1059 .theme-install-php a.browse-themes, 1060 .theme-install-php.show-upload-theme a.upload { 1059 1060 .upload-view-toggle .browse, 1061 .upload-view-toggle.upload-tab .upload, 1062 .show-upload-view .upload { 1061 1063 display: none; 1062 1064 } 1063 .theme-install-php.show-upload-theme a.browse-themes { 1065 1066 .upload-view-toggle.upload-tab .browse, 1067 .show-upload-view .upload-view-toggle .browse { 1064 1068 display: inline; 1065 1069 } 1070 1066 1071 .upload-theme, 1067 1072 .upload-plugin { 1068 1073 -webkit-box-sizing: border-box; … … 1076 1081 position: relative; 1077 1082 top: 10px; 1078 1083 } 1079 body.show-upload-theme .upload-theme, 1080 .upload-plugin { 1084 1085 .show-upload-view .upload-theme, 1086 .show-upload-view .upload-plugin, 1087 .upload-tab .upload-plugin { 1081 1088 display: block; 1082 1089 } 1090 1083 1091 .upload-theme .wp-upload-form, 1084 1092 .upload-plugin .wp-upload-form { 1085 1093 background: #fafafa; -
src/wp-admin/includes/admin-filters.php
64 64 65 65 // Plugin Install hooks. 66 66 add_action( 'install_plugins_featured', 'install_dashboard' ); 67 add_action( 'install_plugins_upload', 'install_plugins_upload' );67 // add_action( 'install_plugins_upload', 'install_plugins_upload' ); 68 68 add_action( 'install_plugins_search', 'display_plugins_table' ); 69 69 add_action( 'install_plugins_popular', 'display_plugins_table' ); 70 70 add_action( 'install_plugins_recommended', 'display_plugins_table' ); -
src/wp-admin/includes/class-wp-upgrader-skins.php
579 579 $install_actions['importers_page'] = '<a href="' . admin_url( 'import.php' ) . '" target="_parent">' . __( 'Return to Importers' ) . '</a>'; 580 580 } elseif ( $this->type == 'web' ) { 581 581 $install_actions['plugins_page'] = '<a href="' . self_admin_url( 'plugin-install.php' ) . '" target="_parent">' . __( 'Return to Plugin Installer' ) . '</a>'; 582 } elseif ( 'upload' == $this->type && 'plugins' == $from ) { 583 $install_actions['plugins_page'] = '<a href="' . self_admin_url( 'plugin-install.php' ) . '">' . __( 'Return to Plugin Installer' ) . '</a>'; 582 584 } else { 583 585 $install_actions['plugins_page'] = '<a href="' . self_admin_url( 'plugins.php' ) . '" target="_parent">' . __( 'Return to Plugins page' ) . '</a>'; 584 586 } -
src/wp-admin/includes/plugin-install.php
210 210 */ 211 211 function install_dashboard() { 212 212 ?> 213 <p><?php printf( __( 'Plugins extend and expand the functionality of WordPress. You may automatically install plugins from the <a href="%1$s">WordPress Plugin Directory</a> or upload a plugin in .zip format via <a href="%2$s">this page</a>.' ), 'https://wordpress.org/plugins/', self_admin_url( 'plugin-install.php?tab=upload' )); ?></p>213 <p><?php printf( __( 'Plugins extend and expand the functionality of WordPress. You may automatically install plugins from the <a href="%1$s">WordPress Plugin Directory</a> or upload a plugin in .zip format by clicking the button at the top of this page.' ), 'https://wordpress.org/plugins/' ); ?></p> 214 214 215 215 <?php display_plugins_table(); ?> 216 216 -
src/wp-admin/js/plugin-install.js
1 1 /* global plugininstallL10n, tb_click */ 2 2 3 /* Plugin Browser Thickbox related JS*/ 3 /** 4 * Functionality for the plugin install screens. 5 */ 4 6 var tb_position; 5 7 jQuery( document ).ready( function( $ ) { 6 8 tb_position = function() { … … 70 72 $( '#section-holder div.section' ).hide(); // Hide 'em all. 71 73 $( '#section-' + tab ).show(); 72 74 }); 75 76 /* 77 * When a user presses the "Upload plugin" button, show the upload form in place 78 * rather than sending them to the devoted upload plugin page. 79 */ 80 var uploadViewToggle = $( '.upload-view-toggle' ), 81 $body = $( document.body ); 82 uploadViewToggle 83 .attr({ 84 'role': 'button', 85 'aria-expanded': 'false' 86 }); 87 uploadViewToggle.on( 'click', function( event ) { 88 event.preventDefault(); 89 $body.toggleClass( 'show-upload-view' ); 90 uploadViewToggle.attr( 'aria-expanded', $body.hasClass( 'show-upload-view' ) ); 91 }); 73 92 }); -
src/wp-admin/js/theme.js
1573 1573 // in new location 1574 1574 searchContainer: $( '.wp-filter .search-form' ), 1575 1575 1576 /* 1577 * When a user presses the "Upload theme" button, show the upload form in place 1578 * rather than sending them to the devoted upload theme page. 1579 */ 1576 1580 uploader: function() { 1577 $( 'a.upload' ).on( 'click', function( event ) { 1581 var uploadViewToggle = $( '.upload-view-toggle' ), 1582 $body = $( document.body ); 1583 uploadViewToggle 1584 .attr({ 1585 'role': 'button', 1586 'aria-expanded': 'false' 1587 }); 1588 uploadViewToggle.on( 'click', function( event ) { 1578 1589 event.preventDefault(); 1579 $ ( 'body' ).addClass( 'show-upload-theme' );1580 themes.router.navigate( themes.router.baseUrl( '?upload' ), { replace: true });1590 $body.toggleClass( 'show-upload-view' ); 1591 uploadViewToggle.attr( 'aria-expanded', $body.hasClass( 'show-upload-view' ) ); 1581 1592 }); 1582 $( 'a.browse-themes' ).on( 'click', function( event ) {1583 event.preventDefault();1584 $( 'body' ).removeClass( 'show-upload-theme' );1585 themes.router.navigate( themes.router.baseUrl( '' ), { replace: true } );1586 });1587 1593 }, 1588 1594 1589 1595 // Toggle the full filters navigation -
src/wp-admin/plugin-install.php
106 106 if ( ! empty( $tabs['upload'] ) && current_user_can( 'upload_plugins' ) ) { 107 107 if ( $tab === 'upload' ) { 108 108 $href = self_admin_url( 'plugin-install.php' ); 109 $ text = _x( 'Browse', 'plugins' );109 $upload_tab_class = ' upload-tab'; 110 110 } else { 111 111 $href = self_admin_url( 'plugin-install.php?tab=upload' ); 112 $ text = __( 'Upload Plugin' );112 $upload_tab_class = ''; 113 113 } 114 echo ' <a href="' . $href . '" class="upload page-title-action">' . $text . '</a>'; 114 115 printf( ' <a href="%s" class="upload-view-toggle page-title-action%s"><span class="upload">%s</span><span class="browse">%s</span></a>', 116 $href, 117 $upload_tab_class, 118 __( 'Upload Plugin' ), 119 _x( 'Browse', 'plugins' ) 120 ); 115 121 } 116 122 ?> 117 123 </h1> 118 124 125 <div class="upload-plugin-wrap<?php echo $upload_tab_class; ?>"> 119 126 <?php 127 /* 128 * Output the upload plugin form on every plugin install screen, so it can be 129 * displayed via JavaScript rather then opening up the devoted upload plugin page. 130 */ 131 install_plugins_upload(); ?> 132 </div> 133 134 <?php 120 135 if ( $tab !== 'upload' ) { 121 136 $wp_list_table->views(); 122 137 echo '<br class="clear" />'; -
src/wp-admin/plugins.php
372 372 'content' => 373 373 '<p>' . __('Plugins extend and expand the functionality of WordPress. Once a plugin is installed, you may activate it or deactivate it here.') . '</p>' . 374 374 '<p>' . sprintf( 375 /* translators: 1: Plugin Browser/Installer URL, 2: WordPress Plugin Directory URL 3: local plugin directory */ 376 __( 'You can find additional plugins for your site by using the <a href="%1$s">Plugin Browser/Installer</a> functionality or by browsing the <a href="%2$s" target="_blank">WordPress Plugin Directory</a> directly and installing new plugins manually. To manually install a plugin you generally just need to upload the plugin file into your %3$s directory. Once a plugin has been installed, you can activate it here.' ), 377 'plugin-install.php', 378 'https://wordpress.org/plugins/', 379 '<code>/wp-content/plugins</code>' 375 /* translators: %s: WordPress Plugin Directory URL */ 376 __( 'If you would like to see more plugins to choose from, click on the “Add New” button and you will be able to browse or search for additional plugins from the <a href="%s" target="_blank">WordPress.org Plugin Directory</a>. Plugins in the WordPress.org Plugin Directory are designed and developed by third parties, and are compatible with the license WordPress uses. Oh, and they’re free!' ), 377 'https://wordpress.org/plugins/' 380 378 ) . '</p>' 381 379 ) ); 382 380 get_current_screen()->add_help_tab( array( -
src/wp-admin/theme-install.php
119 119 */ 120 120 $tabs = apply_filters( 'install_themes_tabs', array( 'upload' => __( 'Upload Theme' ) ) ); 121 121 if ( ! empty( $tabs['upload'] ) && current_user_can( 'upload_themes' ) ) { 122 echo ' <a href="#" class="upload page-title-action">' . __( 'Upload Theme' ) . '</a>'; 123 echo ' <a href="#" class="browse-themes page-title-action">' . _x( 'Browse', 'themes' ) . '</a>'; 122 echo ' <a href="#" class="upload-view-toggle page-title-action">' . '<span class="upload">' . __( 'Upload Theme' ) . '</span><span class="browse">' . __( 'Browse' ) . '</span></a>'; 124 123 } 125 124 ?></h1> 126 125