Changeset 6713
- Timestamp:
- 02/02/2008 08:31:56 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-form-advanced.php
r6712 r6713 211 211 <div id="categories-pop" class="ui-tabs-panel" style="display: none;"> 212 212 <ul id="categorychecklist-pop" class="categorychecklist form-no-clear"> 213 <?php wp_popular_ categories_checklist(); ?>213 <?php wp_popular_terms_checklist('category'); ?> 214 214 </ul> 215 215 </div> -
trunk/wp-admin/edit-link-form.php
r6695 r6713 71 71 <div id="category-adder" class="wp-hidden-children"> 72 72 <h4><a id="category-add-toggle" href="#category-add"><?php _e( '+ Add New Category' ); ?></a></h4> 73 <p id=" category-add" class="wp-hidden-child">73 <p id="link-category-add" class="wp-hidden-child"> 74 74 <input type="text" name="newcat" id="newcat" class="form-required form-input-tip" value="<?php _e( 'New category name' ); ?>" /> 75 <?php wp_dropdown_categories( array( 'hide_empty' => 0, 'name' => 'newcat_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => __('Parent category') ) ); ?>76 75 <input type="button" id="category-add-sumbit" class="add:categorychecklist:linkcategorydiv button" value="<?php _e( 'Add' ); ?>" /> 77 76 <?php wp_nonce_field( 'add-link-category', '_ajax_nonce', false ); ?> … … 93 92 <div id="categories-pop" class="ui-tabs-panel" style="display: none;"> 94 93 <ul id="categorychecklist-pop" class="categorychecklist form-no-clear"> 95 <?php wp_popular_ categories_checklist(); ?>94 <?php wp_popular_terms_checklist('link_category'); ?> 96 95 </ul> 97 96 </div> -
trunk/wp-admin/includes/template.php
r6680 r6713 188 188 } 189 189 190 function wp_popular_ categories_checklist($default = 0, $number = 10 ) {191 $categories = get_ categories(array( 'orderby' => 'count', 'order' => 'DESC', 'number' => $number ) );190 function wp_popular_terms_checklist( $taxonomy, $default = 0, $number = 10 ) { 191 $categories = get_terms( $taxonomy, array( 'orderby' => 'count', 'order' => 'DESC', 'number' => $number ) ); 192 192 193 193 foreach ( (array) $categories as $category ) { -
trunk/wp-admin/js/link.js
r6695 r6713 9 9 var newCat = jQuery('#newcat').one( 'focus', function() { jQuery(this).val( '' ).removeClass( 'form-input-tip' ) } ); 10 10 jQuery('#category-add-sumbit').click( function() { newCat.focus(); } ); 11 var newCatParent = false;12 var newCatParentOption = false;13 11 var noSyncChecks = false; // prophylactic. necessary? 14 12 var syncChecks = function() { … … 23 21 }; 24 22 var catAddAfter = function( r, s ) { 25 if ( !newCatParent ) newCatParent = jQuery('#newcat_parent');26 if ( !newCatParentOption ) newCatParentOption = newCatParent.find( 'option[value=-1]' );27 23 jQuery(s.what + ' response_data', r).each( function() { 28 24 var t = jQuery(jQuery(this).text()); … … 32 28 var id = th.find('input')[0].id 33 29 jQuery('#' + id).change( syncChecks ); 34 if ( newCatParent.find( 'option[value=' + val + ']' ).size() )35 return;36 30 var name = jQuery.trim( th.text() ); 37 31 var o = jQuery( '<option value="' + parseInt( val, 10 ) + '"></option>' ).text( name ); 38 newCatParent.prepend( o );39 32 } ); 40 newCatParentOption.attr( 'selected', true );41 33 } ); 42 34 }; -
trunk/wp-admin/js/postbox.js
r6675 r6713 6 6 function save_postboxes_state() { 7 7 var closed = jQuery('.postbox').filter('.closed').map(function() { return this.id; }).get().join(','); 8 jQuery.post(post L10n.requestFile, {8 jQuery.post(postboxL10n.requestFile, { 9 9 action: 'closed-postboxes', 10 10 closed: closed, -
trunk/wp-admin/wp-admin.css
r6705 r6713 1366 1366 } 1367 1367 1368 #linkcategorydiv #category-adder { 1369 margin-left: 120px; 1370 padding: 4px 0; 1371 } 1372 1373 #linkcategorydiv ul#category-tabs { 1374 float: left; 1375 width: 120px; 1376 text-align: right; 1377 /* Negative margin for the sake of those without JS: all tabs display */ 1378 margin: 0 -120px 0 0; 1379 padding: 0; 1380 } 1381 1382 #linkcategorydiv ul { 1383 list-style: none; 1384 padding: 0; 1385 margin: 0; 1386 } 1387 1388 #linkcategorydiv ul.categorychecklist ul { 1389 margin-left: 18px; 1390 } 1391 1368 1392 /* Global classes */ 1369 1393 .wp-hidden-children .wp-hidden-child { display: none; } -
trunk/wp-includes/script-loader.php
r6695 r6713 133 133 $this->add( 'upload', '/wp-admin/js/upload.js', array('jquery'), '20070518' ); 134 134 $this->add( 'postbox', '/wp-admin/js/postbox.js', array('jquery'), '20080128' ); 135 $this->localize( 'postbox', 'postboxL10n', array( 136 'requestFile' => get_option( 'siteurl' ) . '/wp-admin/admin-ajax.php', 137 ) ); 135 138 $this->add( 'post', '/wp-admin/js/post.js', array('suggest', 'jquery-ui-tabs', 'wp-lists', 'postbox'), '20080128' ); 136 139 $this->localize( 'post', 'postL10n', array(
Note: See TracChangeset
for help on using the changeset viewer.