Changeset 10559
- Timestamp:
- 02/12/2009 06:31:16 PM (16 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/theme-install.php
r10553 r10559 48 48 } 49 49 } 50 50 //var_dump(array($args, $res)); 51 51 return apply_filters('themes_api_result', $res, $action, $args); 52 52 } … … 95 95 switch( $type ){ 96 96 case 'tag': 97 $args['tag'] = sanitize_title_with_dashes($term); 97 $terms = explode(',', $term); 98 $terms = array_map('trim', $terms); 99 $terms = array_map('sanitize_title_with_dashes', $terms); 100 $args['tag'] = $terms; 98 101 break; 99 102 case 'term': … … 258 261 <div class="tablenav"> 259 262 <div class="alignleft actions"> 260 263 <?php do_action('install_themes_table_header'); ?> 261 264 </div> 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 265 <?php 266 $url = clean_url($_SERVER['REQUEST_URI']); 267 if ( ! empty($term) ) 268 $url = add_query_arg('s', $term, $url); 269 if ( ! empty($type) ) 270 $url = add_query_arg('type', $type, $url); 271 272 $page_links = paginate_links( array( 273 'base' => add_query_arg('paged', '%#%', $url), 274 'format' => '', 275 'prev_text' => __('«'), 276 'next_text' => __('»'), 277 'total' => $totalpages, 278 'current' => $page 279 )); 280 281 if ( $page_links ) 282 echo "\t\t<div class='tablenav-pages'>$page_links</div>"; 280 283 ?> 281 284 <br class="clear" /> 285 </div> 286 <div class="theme-listing"> 287 <?php 288 $in_column = 0; 289 foreach ( $themes as $theme ) { 290 //var_dump($theme); 291 292 $name = wp_kses($theme->name, $themes_allowedtags); 293 $desc = wp_kses($theme->description, $themes_allowedtags); 294 if ( strlen($desc) > 30 ) 295 $desc = substr($desc, 0, 30) . '<span class="dots">...</span><span>' . substr($desc, 30) . '</span>'; 296 297 $action_links = array(); 298 $action_links[] = '<a href="' . admin_url('theme-install.php?tab=theme-information&theme=' . $theme->slug . 299 '&TB_iframe=true&width=600&height=800') . '" class="thickbox onclick" title="' . 300 attribute_escape($name) . '">' . __('Install') . '</a>'; 301 $action_links[] = '<a href="' . $theme->preview_url . '&TB_iframe" class="thickbox onclick" title="' . 302 attribute_escape( sprintf(__('Preview %s'), $name) ) . '">' . __('Preview') . '</a>'; 303 304 $action_links = apply_filters('theme_install_action_links', $action_links, $theme); 305 $actions = implode ( ' | ', $action_links ); 306 echo " 307 <div class='theme-item'> 308 <h3>{$theme->name}</h3> 309 <img src='{$theme->screenshot_url}' width='150' /><br /> 310 <div class='theme-item-info'> 311 {$desc} 312 <br class='line' /> 313 <span class='action-links'>$actions</span> 314 </div> 315 </div>"; 316 /* 317 object(stdClass)[59] 318 public 'name' => string 'Magazine Basic' (length=14) 319 public 'slug' => string 'magazine-basic' (length=14) 320 public 'version' => string '1.1' (length=3) 321 public 'author' => string 'tinkerpriest' (length=12) 322 public 'preview_url' => string 'http://wp-themes.com/?magazine-basic' (length=36) 323 public 'screenshot_url' => string 'http://wp-themes.com/wp-content/themes/magazine-basic/screenshot.png' (length=68) 324 public 'rating' => float 80 325 public 'num_ratings' => int 1 326 public 'homepage' => string 'http://wordpress.org/extend/themes/magazine-basic' (length=49) 327 public 'description' => string 'A basic magazine style layout with a fully customizable layout through a backend interface. Designed by <a href="http://bavotasan.com">c.bavota</a> of <a href="http://tinkerpriestmedia.com">Tinker Priest Media</a>.' (length=214) 328 public 'download_link' => string 'http://wordpress.org/extend/themes/download/magazine-basic.1.1.zip' (length=66) 329 */ 330 } 331 332 ?> 282 333 </div> 283 334 <table class="widefat" id="install-themes" cellspacing="0"> -
trunk/wp-admin/theme-install.php
r10553 r10559 19 19 20 20 wp_reset_vars( array('tab', 'paged') ); 21 //wp_enqueue_style( 'theme-install' ); 22 //wp_enqueue_script( 'theme-install' ); 23 //TODO: Combine? This'll do until a new UI is dreamed up though :) 24 wp_enqueue_style( 'plugin-install' ); 25 wp_enqueue_script( 'plugin-install' ); 21 wp_enqueue_style( 'theme-install' ); 22 wp_enqueue_script( 'theme-install' ); 26 23 27 24 add_thickbox(); … … 32 29 if ( 'search' == $tab ) 33 30 $tabs['search'] = __('Search Results'); 31 $tabs['tag-filter'] = __('Tag Filter'); 34 32 $tabs['featured'] = __('Featured'); 35 $tabs['popular'] = __('Popular');33 //$tabs['popular'] = __('Popular'); 36 34 $tabs['new'] = __('Newest'); 37 35 $tabs['updated'] = __('Recently Updated');
Note: See TracChangeset
for help on using the changeset viewer.