Ticket #27055: 27055.12.diff
| File 27055.12.diff, 6.3 KB (added by , 12 years ago) |
|---|
-
wp-admin/includes/theme-install.php
134 134 } 135 135 // add_action('install_themes_dashboard', 'install_themes_dashboard'); 136 136 137 /** 138 * Display all the available tag filters. 139 * 140 * @since 3.9.0 141 */ 142 function install_themes_more_filters() { 143 144 $feature_list = get_theme_feature_list(); 145 146 foreach ( (array) $feature_list as $feature_name => $features ) { 147 echo '<div class="filters-group">'; 148 $feature_name = esc_html( $feature_name ); 149 echo '<h4 class="feature-name">' . $feature_name . '</h4>'; 150 151 echo '<ol class="feature-group">'; 152 foreach ( $features as $feature => $feature_name ) { 153 $feature_name = esc_html( $feature_name ); 154 $feature = esc_attr($feature); 155 ?> 156 <li> 157 <input type="checkbox" name="features[]" id="feature-id-<?php echo $feature; ?>" value="<?php echo $feature; ?>" /> 158 <label for="feature-id-<?php echo $feature; ?>"><?php echo $feature_name; ?></label> 159 </li> 160 <?php } ?> 161 </ol> 162 </div> 163 <?php } ?> 164 <br class="clear" /> 165 <?php 166 } 167 137 168 function install_themes_upload() { 138 169 ?> 139 170 <p class="install-help"><?php _e('If you have a theme in a .zip format, you may install it by uploading it here.'); ?></p> -
wp-admin/js/theme.js
1153 1153 searchContainer: $( '.theme-navigation' ), 1154 1154 1155 1155 uploader: function() { 1156 $( 'a.upload.button' ).on( 'click', function() { 1157 $( '.upload-theme' ) 1158 .toggleClass( 'opened' ) 1159 .hasClass( 'opened' ) ? $( this ).text( l10n.back ) : $( this ).text( l10n.upload ); 1156 $( 'a.upload' ).on( 'click', function() { 1157 $( 'body' ).addClass( 'show-upload-theme' ); 1158 themes.router.navigate( themes.router.baseUrl( '?upload' ), { replace: true } ); 1160 1159 }); 1160 $( 'a.browse-themes' ).on( 'click', function() { 1161 $( 'body' ).removeClass( 'show-upload-theme' ); 1162 themes.router.navigate( themes.router.baseUrl( '' ), { replace: true } ); 1163 }); 1161 1164 }, 1162 1165 1163 1166 moreFilters: function() { … … 1168 1171 themes.InstallerRouter = Backbone.Router.extend({ 1169 1172 routes: { 1170 1173 'theme-install.php?theme=:slug': 'preview', 1171 'theme-install.php(?sort=:sort)': 'sort', 1174 'theme-install.php?sort=:sort': 'sort', 1175 'theme-install.php?upload': 'upload', 1172 1176 '': 'sort' 1173 1177 }, 1174 1178 … … 1225 1229 self.view.trigger( 'theme:close' ); 1226 1230 }); 1227 1231 1232 themes.router.on( 'route:upload', function( slug ) { 1233 $( 'a.upload' ).trigger( 'click' ); 1234 }); 1235 1228 1236 this.extraRoutes(); 1229 1237 }, 1230 1238 -
wp-admin/css/themes.css
1065 1065 16.2 - Install Themes 1066 1066 ------------------------------------------------------------------------------*/ 1067 1067 1068 .theme-install-php h2 .upload {1069 margin-left: 10px;1070 }1071 1068 .theme-navigation { 1072 1069 background: #fff; 1073 1070 box-shadow: 0 1px 1px 0 rgba(0,0,0,.1); … … 1081 1078 position: relative; 1082 1079 width: 100%; 1083 1080 } 1081 .theme-install-php a.upload, 1082 .theme-install-php a.browse-themes { 1083 cursor: pointer; 1084 } 1085 .theme-install-php a.browse-themes, 1086 .theme-install-php.show-upload-theme a.upload { 1087 display: none; 1088 } 1089 .theme-install-php.show-upload-theme a.browse-themes { 1090 display: inline; 1091 } 1084 1092 .upload-theme { 1085 1093 -moz-box-sizing: border-box; 1086 1094 box-sizing: border-box; … … 1092 1100 position: relative; 1093 1101 top: 10px; 1094 1102 } 1095 .upload-theme.opened{1103 body.show-upload-theme .upload-theme { 1096 1104 display: block; 1097 1105 } 1098 1106 .upload-theme .wp-upload-form { … … 1110 1118 padding: 40px 0 0; 1111 1119 text-align: center; 1112 1120 } 1113 .upload-theme.opened+ .theme-navigation,1114 .upload-theme.opened+ .theme-navigation + .theme-browser {1121 body.show-upload-theme .upload-theme + .theme-navigation, 1122 body.show-upload-theme .upload-theme + .theme-navigation + .theme-browser { 1115 1123 display: none; 1116 1124 } 1117 1125 .theme-navigation .theme-count { … … 1148 1156 transition: color .1s ease-in, background .1s ease-in; 1149 1157 } 1150 1158 body.more-filters-opened .more-filters, 1151 .theme-navigation .more-filters.current{1159 body.more-filters-opened .more-filters:before { 1152 1160 background: rgb(46, 162, 204); 1153 1161 border-radius: 2px; 1154 1162 border: none; … … 1197 1205 body.more-filters-opened .more-filters-container { 1198 1206 display: block; 1199 1207 } 1208 .more-filters-container .filters-group { 1209 -moz-box-sizing: border-box; 1210 box-sizing: border-box; 1211 float: left; 1212 width: 20%; 1213 } 1214 .more-filters-container .feature-name { 1215 margin-top: 0; 1216 } 1217 .more-filters-container ol { 1218 list-style-type: none; 1219 margin: 0; 1220 } 1221 1200 1222 .theme-install-php .add-new-theme { 1201 1223 display: none !important; 1202 1224 } 1203 1225 1226 @media only screen and (max-width: 1120px) { 1227 .theme-install-php .theme-search { 1228 margin: 20px 0; 1229 position: static; 1230 width: 100%; 1231 } 1232 .more-filters-container { 1233 border-bottom: 1px solid #eee; 1234 } 1235 .upload-theme .wp-upload-form { 1236 margin: 20px 0; 1237 max-width: 100%; 1238 } 1239 .upload-theme .install-help { 1240 font-size: 15px; 1241 padding: 20px 0 0; 1242 text-align: left; 1243 } 1244 .more-filters-container .filters-group { 1245 width: 50%; 1246 } 1247 .more-filters-container .filters-group:nth-child(3n) { 1248 clear: left; 1249 } 1250 } 1251 1204 1252 .rating { 1205 1253 margin: 30px 0; 1206 1254 } -
wp-admin/theme-install.php
104 104 <div class="wrap"> 105 105 <h2> 106 106 <?php echo esc_html( $title ); ?> 107 <a class="upload button button-secondary"><?php esc_html_e( 'Upload Theme' ); ?></a> 107 <a class="upload add-new-h2"><?php esc_html_e( 'Upload Theme' ); ?></a> 108 <a class="browse-themes add-new-h2"><?php esc_html_e( 'Browse' ); ?></a> 108 109 </h2> 109 110 110 111 <div class="upload-theme"> … … 119 120 <div class="theme-top-filters"> 120 121 <span class="theme-filter" data-filter="photoblogging">Photography</span> 121 122 <span class="theme-filter" data-filter="responsive-layout">Responsive</span> 122 <span class=" theme-filtermore-filters">More</span>123 <span class="more-filters">More</span> 123 124 </div> 124 125 <div class="more-filters-container"> 125 Display more filters.126 <?php install_themes_more_filters(); ?> 126 127 </div> 127 128 </div> 128 129 <div class="theme-browser"></div>