Changeset 12966
- Timestamp:
- 02/05/2010 02:16:31 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/template.php
r12927 r12966 583 583 584 584 if ( $post_ID ) 585 $checked_ categories = wp_get_object_terms($post_ID, 'category', array('fields'=>'ids'));585 $checked_terms = wp_get_object_terms($post_ID, $taxonomy, array('fields'=>'ids')); 586 586 else 587 $checked_ categories = array();588 589 $ categories = get_terms( $taxonomy, array( 'orderby' => 'count', 'order' => 'DESC', 'number' => $number, 'hierarchical' => false ) );587 $checked_terms = array(); 588 589 $terms = get_terms( $taxonomy, array( 'orderby' => 'count', 'order' => 'DESC', 'number' => $number, 'hierarchical' => false ) ); 590 590 591 591 $popular_ids = array(); 592 foreach ( (array) $ categories as $category) {593 $popular_ids[] = $ category->term_id;592 foreach ( (array) $terms as $term ) { 593 $popular_ids[] = $term->term_id; 594 594 if ( !$echo ) // hack for AJAX use 595 595 continue; 596 $id = "popular-$taxonomy-$ category->term_id";597 $checked = in_array( $ category->term_id, $checked_categories ) ? 'checked="checked"' : '';596 $id = "popular-$taxonomy-$term->term_id"; 597 $checked = in_array( $term->term_id, $checked_terms ) ? 'checked="checked"' : ''; 598 598 ?> 599 599 600 600 <li id="<?php echo $id; ?>" class="popular-category"> 601 601 <label class="selectit"> 602 <input id="in-<?php echo $id; ?>" type="checkbox" <?php echo $checked; ?> value="<?php echo (int) $ category->term_id; ?>" />603 <?php echo esc_html( apply_filters( 'the_category', $ category->name ) ); ?>602 <input id="in-<?php echo $id; ?>" type="checkbox" <?php echo $checked; ?> value="<?php echo (int) $term->term_id; ?>" /> 603 <?php echo esc_html( apply_filters( 'the_category', $term->name ) ); ?> 604 604 </label> 605 605 </li> … … 2700 2700 </select> 2701 2701 <input class="hide-if-js" type="text" id="metakeyinput" name="metakeyinput" tabindex="7" value="" /> 2702 <a href="#postcustomstuff" class="hide-if-no-js" on click="jQuery('#metakeyinput, #metakeyselect, #enternew, #cancelnew').toggle();return false;">2702 <a href="#postcustomstuff" class="hide-if-no-js" onClick="jQuery('#metakeyinput, #metakeyselect, #enternew, #cancelnew').toggle();return false;"> 2703 2703 <span id="enternew"><?php _e('Enter new'); ?></span> 2704 2704 <span id="cancelnew" class="hidden"><?php _e('Cancel'); ?></span></a> … … 3377 3377 <label class="screen-reader-text" for="find-posts-input"><?php _e( 'Search' ); ?></label> 3378 3378 <input type="text" id="find-posts-input" name="ps" value="" /> 3379 <input type="button" on click="findPosts.send();" value="<?php esc_attr_e( 'Search' ); ?>" class="button" /><br />3379 <input type="button" onClick="findPosts.send();" value="<?php esc_attr_e( 'Search' ); ?>" class="button" /><br /> 3380 3380 3381 3381 <input type="radio" name="find-posts-what" id="find-posts-posts" checked="checked" value="posts" /> … … 3387 3387 </div> 3388 3388 <div class="find-box-buttons"> 3389 <input type="button" class="button alignleft" on click="findPosts.close();" value="<?php esc_attr_e('Close'); ?>" />3389 <input type="button" class="button alignleft" onClick="findPosts.close();" value="<?php esc_attr_e('Close'); ?>" /> 3390 3390 <input id="find-posts-submit" type="submit" class="button-primary alignright" value="<?php esc_attr_e('Select'); ?>" /> 3391 3391 </div>
Note: See TracChangeset
for help on using the changeset viewer.