Ticket #9670: 9670_checklist.diff
| File 9670_checklist.diff, 972 bytes (added by , 18 years ago) |
|---|
-
C:/xampp/htdocs/wordpress_trunk/wp-admin/includes/template.php
510 510 511 511 // Post process $categories rather than adding an exclude to the get_terms() query to keep the query the same across all posts (for any query cache) 512 512 $checked_categories = array(); 513 for ( $i = 0; isset($categories[$i]); $i++ ) { 514 if ( in_array($categories[$i]->term_id, $args['selected_cats']) ) { 515 $checked_categories[] = $categories[$i]; 516 unset($categories[$i]); 517 } 513 $keys = array_keys( $categories ); 514 515 foreach( $keys as $k ) { 516 if ( in_array( $categories[$k]->term_id, $args['selected_cats'] ) ) { 517 $checked_categories[] = $categories[$k]; 518 unset( $categories[$k] ); 519 } 518 520 } 519 521 520 522 // Put checked cats on top