Ticket #10122: 10122-2.patch
File 10122-2.patch, 28.6 KB (added by , 15 years ago) |
---|
-
wp-includes/taxonomy.php
194 194 $args['name'] = $taxonomy; 195 195 $args['object_type'] = (array) $object_type; 196 196 $wp_taxonomies[$taxonomy] = (object) $args; 197 198 //register callback handling for metabox 199 add_filter('wp_ajax_add-'.$taxonomy, '_wp_ajax_add_hierarchical_term'); 197 200 } 198 201 199 202 /** … … 1573 1576 * slug has to be globally unique for every taxonomy. 1574 1577 * 1575 1578 * The way this works is that if the taxonomy that the term belongs to is 1576 * h eirarchical and has a parent, it will append that parent to the $slug.1579 * hierarchical and has a parent, it will append that parent to the $slug. 1577 1580 * 1578 1581 * If that still doesn't return an unique slug, then it try to append a number 1579 1582 * until it finds a number that is truely unique. -
wp-includes/category-template.php
356 356 if ( (int) $tab_index > 0 ) 357 357 $tab_index_attribute = " tabindex=\"$tab_index\""; 358 358 359 $categories = get_ categories($r );359 $categories = get_terms( $taxonomy, $r ); 360 360 $name = esc_attr($name); 361 361 $class = esc_attr($class); 362 362 -
wp-admin/admin-ajax.php
200 200 $x->send(); 201 201 } 202 202 203 function _wp_ajax_add_hierarchical_term() { 204 $action = $_POST['action']; 205 $taxonomy = get_taxonomy(substr($action, 4)); 206 check_ajax_referer( $action ); 207 if ( !current_user_can( 'manage_categories' ) ) 208 die('-1'); 209 $names = explode(',', $_POST['new'.$taxonomy->name]); 210 if ( 0 > $parent = (int) $_POST['new'.$taxonomy->name.'_parent'] ) 211 $parent = 0; 212 if($taxonomy->name == 'category') { 213 $post_category = isset($_POST['post_category'])? (array) $_POST['post_category'] : array(); 214 } 215 else { 216 $post_category = (isset($_POST['tax_input']) && isset($_POST['tax_input'][$taxonomy->name])) ? (array) $_POST['tax_input'][$taxonomy->name] : array(); 217 } 218 $checked_categories = array_map( 'absint', (array) $post_category ); 219 $popular_ids = wp_popular_terms_checklist($taxonomy->name, 0, 10, false); 220 221 foreach ( $names as $cat_name ) { 222 $cat_name = trim($cat_name); 223 $category_nicename = sanitize_title($cat_name); 224 if ( '' === $category_nicename ) 225 continue; 226 if(!($cat_id = is_term($cat_name, $taxonomy->name, $parent))) { 227 $new_term = wp_insert_term($cat_name, $taxonomy->name, array('parent' => $parent)); 228 $cat_id = $new_term['term_id']; 229 } 230 $checked_categories[] = $cat_id; 231 if ( $parent ) // Do these all at once in a second 232 continue; 233 $category = get_term( $cat_id, $taxonomy->name ); 234 ob_start(); 235 wp_terms_checklist( 0, array('taxonomy'=>$taxonomy->name, 'descendants_and_self'=>$cat_id, 'selected_cats'=>$checked_categories, 'popular_cats'=>$popular_ids)); 236 $data = ob_get_contents(); 237 ob_end_clean(); 238 $add = array( 239 'what' => $taxonomy->name, 240 'id' => $cat_id, 241 'data' => str_replace( array("\n", "\t"), '', $data), 242 'position' => -1 243 ); 244 } 245 if ( $parent ) { // Foncy - replace the parent and all its children 246 $parent = get_term( $parent, $taxonomy->name ); 247 $term_id = $parent->term_id; 248 249 while ( $parent->parent ) { // get the top parent 250 $parent = &get_term( $parent->parent, $taxonomy->name ); 251 if ( is_wp_error( $parent ) ) 252 break; 253 $term_id = $parent->term_id; 254 } 255 256 ob_start(); 257 wp_terms_checklist( 0, array('taxonomy' => $taxonomy->name, 'descendants_and_self' => $term_id, 'selected_cats' => $checked_categories, 'popular_cats' => $popular_ids)); 258 $data = ob_get_contents(); 259 ob_end_clean(); 260 $add = array( 261 'what' => $taxonomy->name, 262 'id' => $term_id, 263 'data' => str_replace( array("\n", "\t"), '', $data), 264 'position' => -1 265 ); 266 } 267 268 ob_start(); 269 wp_dropdown_categories( array( 'taxonomy' => $taxonomy->name, 'hide_empty' => 0, 'name' => 'new'.$taxonomy->name.'_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => __('Parent category') ) ); 270 $sup = ob_get_contents(); 271 ob_end_clean(); 272 $add['supplemental'] = array( 'newcat_parent' => $sup ); 273 274 $x = new WP_Ajax_Response( $add ); 275 $x->send(); 276 } 277 278 203 279 $id = isset($_POST['id'])? (int) $_POST['id'] : 0; 204 280 switch ( $action = $_POST['action'] ) : 205 281 case 'delete-comment' : // On success, die with time() instead of 1 … … 409 485 _wp_ajax_delete_comment_response( $comment->comment_ID ); 410 486 die( '0' ); 411 487 break; 412 case 'add-category' : // On the Fly413 check_ajax_referer( $action );414 if ( !current_user_can( 'manage_categories' ) )415 die('-1');416 $names = explode(',', $_POST['newcat']);417 if ( 0 > $parent = (int) $_POST['newcat_parent'] )418 $parent = 0;419 $post_category = isset($_POST['post_category'])? (array) $_POST['post_category'] : array();420 $checked_categories = array_map( 'absint', (array) $post_category );421 $popular_ids = wp_popular_terms_checklist('category', 0, 10, false);422 423 foreach ( $names as $cat_name ) {424 $cat_name = trim($cat_name);425 $category_nicename = sanitize_title($cat_name);426 if ( '' === $category_nicename )427 continue;428 $cat_id = wp_create_category( $cat_name, $parent );429 $checked_categories[] = $cat_id;430 if ( $parent ) // Do these all at once in a second431 continue;432 $category = get_category( $cat_id );433 ob_start();434 wp_category_checklist( 0, $cat_id, $checked_categories, $popular_ids );435 $data = ob_get_contents();436 ob_end_clean();437 $add = array(438 'what' => 'category',439 'id' => $cat_id,440 'data' => str_replace( array("\n", "\t"), '', $data),441 'position' => -1442 );443 }444 if ( $parent ) { // Foncy - replace the parent and all its children445 $parent = get_category( $parent );446 $term_id = $parent->term_id;447 448 while ( $parent->parent ) { // get the top parent449 $parent = &get_category( $parent->parent );450 if ( is_wp_error( $parent ) )451 break;452 $term_id = $parent->term_id;453 }454 455 ob_start();456 wp_category_checklist( 0, $term_id, $checked_categories, $popular_ids, null, false );457 $data = ob_get_contents();458 ob_end_clean();459 $add = array(460 'what' => 'category',461 'id' => $term_id,462 'data' => str_replace( array("\n", "\t"), '', $data),463 'position' => -1464 );465 }466 467 ob_start();468 wp_dropdown_categories( array( 'hide_empty' => 0, 'name' => 'newcat_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => __('Parent category') ) );469 $sup = ob_get_contents();470 ob_end_clean();471 $add['supplemental'] = array( 'newcat_parent' => $sup );472 473 $x = new WP_Ajax_Response( $add );474 $x->send();475 break;476 488 case 'add-link-category' : // On the Fly 477 489 check_ajax_referer( $action ); 478 490 if ( !current_user_can( 'manage_categories' ) ) -
wp-admin/includes/meta-boxes.php
268 268 * 269 269 * @param object $post 270 270 */ 271 function post_categories_meta_box($post) { 272 ?> 273 <ul id="category-tabs"> 274 <li class="tabs"><a href="#categories-all" tabindex="3"><?php _e( 'All Categories' ); ?></a></li> 275 <li class="hide-if-no-js"><a href="#categories-pop" tabindex="3"><?php _e( 'Most Used' ); ?></a></li> 276 </ul> 271 function post_categories_meta_box($post, $box) { 272 $defaults = array('taxonomy' => 'category'); 273 if(!isset($box['args']) || !is_array($args = $box['args'])) { 274 $args = array(); 275 } 276 extract(array_merge($defaults, $args)); 277 ?> 278 <div id="taxonomy-<?php echo $taxonomy; ?>" class="categorydiv"> 279 <ul id="<?php echo $taxonomy; ?>-tabs" class="category-tabs"> 280 <li class="tabs"><a href="#<?php echo $taxonomy; ?>-all" tabindex="3"><?php _e( 'All Categories' ); ?></a></li> 281 <li class="hide-if-no-js"><a href="#<?php echo $taxonomy; ?>-pop" tabindex="3"><?php _e( 'Most Used' ); ?></a></li> 282 </ul> 277 283 278 <div id="categories-pop" class="tabs-panel" style="display: none;">279 <ul id="categorychecklist-pop" class="categorychecklist form-no-clear" >280 <?php $popular_ids = wp_popular_terms_checklist('category'); ?> 281 </ul>282 </div>284 <div id="<?php echo $taxonomy; ?>-pop" class="tabs-panel" style="display: none;"> 285 <ul id="<?php echo $taxonomy; ?>checklist-pop" class="categorychecklist form-no-clear" > 286 <?php $popular_ids = wp_popular_terms_checklist($taxonomy); ?>aaa 287 </ul> 288 </div> 283 289 284 <div id="categories-all" class="tabs-panel">285 <ul id="categorychecklist" class="list:categorycategorychecklist form-no-clear">286 <?php wp_category_checklist($post->ID, false, false, $popular_ids) ?>287 </ul>288 </div>290 <div id="<?php echo $taxonomy; ?>-all" class="tabs-panel"> 291 <ul id="<?php echo $taxonomy; ?>checklist" class="list:<?php echo $taxonomy?> categorychecklist form-no-clear"> 292 <?php wp_terms_checklist($post->ID, array('taxonomy'=>$taxonomy, 'popular_cats'=> $popular_ids)) ?> 293 </ul> 294 </div> 289 295 290 <?php if ( current_user_can('manage_categories') ) : ?> 291 <div id="category-adder" class="wp-hidden-children"> 292 <h4><a id="category-add-toggle" href="#category-add" class="hide-if-no-js" tabindex="3"><?php _e( '+ Add New Category' ); ?></a></h4> 293 <p id="category-add" class="wp-hidden-child"> 294 <label class="screen-reader-text" for="newcat"><?php _e( 'Add New Category' ); ?></label><input type="text" name="newcat" id="newcat" class="form-required form-input-tip" value="<?php esc_attr_e( 'New category name' ); ?>" tabindex="3" aria-required="true"/> 295 <label class="screen-reader-text" for="newcat_parent"><?php _e('Parent category'); ?>:</label><?php wp_dropdown_categories( array( 'hide_empty' => 0, 'name' => 'newcat_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => __('Parent category') ) ); ?> 296 <input type="button" id="category-add-sumbit" class="add:categorychecklist:category-add button" value="<?php esc_attr_e( 'Add' ); ?>" tabindex="3" /> 297 <?php wp_nonce_field( 'add-category', '_ajax_nonce', false ); ?> 298 <span id="category-ajax-response"></span></p> 299 </div> 300 <?php 301 endif; 302 296 <?php if ( current_user_can('manage_categories') ) : ?> 297 <div id="<?php echo $taxonomy; ?>-adder" class="wp-hidden-children"> 298 <h4><a id="<?php echo $taxonomy; ?>-add-toggle" href="#<?php echo $taxonomy; ?>-add" class="hide-if-no-js" tabindex="3"><?php _e( '+ Add New Category' ); ?></a></h4> 299 <p id="<?php echo $taxonomy; ?>-add" class="category-add wp-hidden-child"> 300 <label class="screen-reader-text" for="new<?php echo $taxonomy; ?>"><?php _e( 'Add New Category' ); ?></label><input type="text" name="new<?php echo $taxonomy; ?>" id="new<?php echo $taxonomy; ?>" class="form-required form-input-tip" value="<?php esc_attr_e( 'New category name' ); ?>" tabindex="3" aria-required="true"/> 301 <label class="screen-reader-text" for="new<?php echo $taxonomy; ?>_parent"><?php _e('Parent category'); ?>:</label><?php wp_dropdown_categories( array( 'taxonomy' => $taxonomy, 'hide_empty' => 0, 'name' => 'new'.$taxonomy.'_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => __('Parent category'), 'tab_index' => 3 ) ); ?> 302 <input type="button" id="<?php echo $taxonomy; ?>-add-submit" class="add:<?php echo $taxonomy ?>checklist:<?php echo $taxonomy ?>-add button category-add-sumbit" value="<?php esc_attr_e( 'Add' ); ?>" tabindex="3" /> 303 <?php wp_nonce_field( 'add-'.$taxonomy, '_ajax_nonce', false ); ?> 304 <span id="<?php echo $taxonomy; ?>-ajax-response"></span> 305 </p> 306 </div> 307 <?php endif; ?> 308 </div> 309 <?php 303 310 } 304 311 305 312 -
wp-admin/includes/template.php
465 465 466 466 function start_el(&$output, $category, $depth, $args) { 467 467 extract($args); 468 468 if(empty($taxonomy)) 469 $taxonomy = 'category'; 470 471 if($taxonomy == 'category') 472 $name = 'post_category'; 473 else 474 $name = 'tax_input['.$taxonomy.']'; 475 469 476 $class = in_array( $category->term_id, $popular_cats ) ? ' class="popular-category"' : ''; 470 $output .= "\n<li id=' category-$category->term_id'$class>" . '<label class="selectit"><input value="' . $category->term_id . '" type="checkbox" name="post_category[]" id="in-category-' . $category->term_id . '"' . (in_array( $category->term_id, $selected_cats ) ? ' checked="checked"' : "" ) . '/> ' . esc_html( apply_filters('the_category', $category->name )) . '</label>';477 $output .= "\n<li id='{$taxonomy}-{$category->term_id}'$class>" . '<label class="selectit"><input value="' . $category->term_id . '" type="checkbox" name="'.$name.'[]" id="in-'.$taxonomy.'-' . $category->term_id . '"' . (in_array( $category->term_id, $selected_cats ) ? ' checked="checked"' : "" ) . '/> ' . esc_html( apply_filters('the_category', $category->name )) . '</label>'; 471 478 } 472 479 473 480 function end_el(&$output, $category, $depth, $args) { … … 486 493 * @param unknown_type $popular_cats 487 494 */ 488 495 function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $selected_cats = false, $popular_cats = false, $walker = null, $checked_ontop = true ) { 496 wp_terms_checklist($post_id, 497 array( 498 'taxonomy' => 'category', 499 'descendants_and_self' => $descendants_and_self, 500 'selected_cats' => $selected_cats, 501 'popular_cats' => $popular_cats, 502 'walker' => $walker 503 )); 504 } 505 506 /** 507 * Taxonomy independent version of wp_category_checklist 508 * 509 * @param int $post_id 510 * @param array $args 511 */ 512 function wp_terms_checklist($post_id = 0, $args = array()) { 513 $defaults = array( 514 'descendants_and_self' => 0, 515 'selected_cats' => false, 516 'popular_cats' => false, 517 'walker' => null, 518 'taxonomy' => 'category' 519 ); 520 extract(array_merge($defaults, $args)); 521 489 522 if ( empty($walker) || !is_a($walker, 'Walker') ) 490 523 $walker = new Walker_Category_Checklist; 491 524 492 525 $descendants_and_self = (int) $descendants_and_self; 493 526 494 $args = array( );527 $args = array('taxonomy' => $taxonomy); 495 528 496 529 if ( is_array( $selected_cats ) ) 497 530 $args['selected_cats'] = $selected_cats; 498 531 elseif ( $post_id ) 499 $args['selected_cats'] = wp_get_ post_categories($post_id);532 $args['selected_cats'] = wp_get_object_terms($post_id, $taxonomy, array_merge($args, array('fields' => 'ids'))); 500 533 else 501 534 $args['selected_cats'] = array(); 502 535 503 536 if ( is_array( $popular_cats ) ) 504 537 $args['popular_cats'] = $popular_cats; 505 538 else 506 $args['popular_cats'] = get_terms( 'category', array( 'fields' => 'ids', 'orderby' => 'count', 'order' => 'DESC', 'number' => 10, 'hierarchical' => false ) );539 $args['popular_cats'] = get_terms( $taxonomy, array( 'fields' => 'ids', 'orderby' => 'count', 'order' => 'DESC', 'number' => 10, 'hierarchical' => false ) ); 507 540 508 541 if ( $descendants_and_self ) { 509 $categories = get_categories(array('child_of' => $descendants_and_self, 'hierarchical' => 0, 'hide_empty' => 0));510 $self = get_ category( $descendants_and_self);542 $categories = (array) get_terms($taxonomy, array( 'child_of' => $descendants_and_self, 'hierarchical' => 0, 'hide_empty' => 0 ) ); 543 $self = get_term( $descendants_and_self, $taxonomy ); 511 544 array_unshift( $categories, $self ); 512 545 } else { 513 $categories = get_categories(array('get' => 'all'));546 $categories = (array) get_terms($taxonomy, array('get' => 'all')); 514 547 } 515 548 516 549 if ( $checked_ontop ) { … … 547 580 global $post_ID; 548 581 549 582 if ( $post_ID ) 550 $checked_categories = wp_get_ post_categories($post_ID);583 $checked_categories = wp_get_object_terms($post_ID, 'category', array('fields'=>'ids')); 551 584 else 552 585 $checked_categories = array(); 553 586 … … 558 591 $popular_ids[] = $category->term_id; 559 592 if ( !$echo ) // hack for AJAX use 560 593 continue; 561 $id = "popular- category-$category->term_id";594 $id = "popular-$taxonomy-$category->term_id"; 562 595 $checked = in_array( $category->term_id, $checked_categories ) ? 'checked="checked"' : ''; 563 596 ?> 564 597 -
wp-admin/js/post.dev.js
228 228 })(jQuery); 229 229 230 230 jQuery(document).ready( function($) { 231 var catAddAfter,stamp, visibility, sticky = '', post = 'post' == pagenow || 'post-new' == pagenow, page = 'page' == pagenow || 'page-new' == pagenow;231 var stamp, visibility, sticky = '', post = 'post' == pagenow || 'post-new' == pagenow, page = 'page' == pagenow || 'page-new' == pagenow; 232 232 233 233 // postboxes 234 234 if ( post ) { … … 253 253 } 254 254 255 255 // categories 256 if ( $('#categorydiv').length ) { 256 $('.categorydiv').each(function(){ 257 var this_id = $(this).attr('id'), noSyncChecks = false, syncChecks, catAddAfter, popularCats; 258 var taxonomy_parts = this_id.split('-'); 259 taxonomy_parts.shift(); 260 var taxonomy = taxonomy_parts.join('-'); 261 var settingName = taxonomy+'_tab'; 262 if(taxonomy == 'category') 263 settingName = 'cats'; 264 257 265 // TODO: move to jQuery 1.3+, support for multiple hierarchical taxonomies, see wp-lists.dev.js 258 $('a', '# category-tabs').click(function(){266 $('a', '#'+taxonomy+'-tabs').click(function(){ 259 267 var t = $(this).attr('href'); 260 268 $(this).parent().addClass('tabs').siblings('li').removeClass('tabs'); 261 $('# category-tabs').siblings('.tabs-panel').hide();269 $('#'+taxonomy+'-tabs').siblings('.tabs-panel').hide(); 262 270 $(t).show(); 263 if ( '# categories-all' == t )264 deleteUserSetting( 'cats');271 if ( '#'+taxonomy+'-all' == t ) 272 deleteUserSetting(settingName); 265 273 else 266 setUserSetting( 'cats','pop');274 setUserSetting(settingName,'pop'); 267 275 return false; 268 276 }); 269 if ( getUserSetting('cats') ) 270 $('a[href="#categories-pop"]', '#category-tabs').click(); 277 278 if ( getUserSetting(settingName) ) 279 $('a[href="#'+taxonomy+'-pop"]', '#'+taxonomy+'-tabs').click(); 271 280 272 281 // Ajax Cat 273 $('#newcat').one( 'focus', function() { $(this).val( '' ).removeClass( 'form-input-tip' ) } ); 274 $('#category-add-sumbit').click( function(){ $('#newcat').focus(); } ); 275 282 $('#new'+taxonomy).one( 'focus', function() { $(this).val( '' ).removeClass( 'form-input-tip' ) } ); 283 $('#'+taxonomy+'-add-submit').click(function(){$('#new'+taxonomy).focus();}); 284 285 syncChecks = function() { 286 if ( noSyncChecks ) 287 return; 288 noSyncChecks = true; 289 var th = jQuery(this), c = th.is(':checked'), id = th.val().toString(); 290 $('#in-'+taxonomy+'-' + id + ', #in-'+taxonomy+'-category-' + id).attr( 'checked', c ); 291 noSyncChecks = false; 292 }; 293 294 295 276 296 catAddBefore = function( s ) { 277 if ( !$('#new cat').val() )297 if ( !$('#new'+taxonomy).val() ) 278 298 return false; 279 s.data += '&' + $( ':checked', '# categorychecklist' ).serialize();299 s.data += '&' + $( ':checked', '#'+taxonomy+'checklist' ).serialize(); 280 300 return s; 281 301 }; 282 302 283 303 catAddAfter = function( r, s ) { 284 var sup, drop = $('#new cat_parent');304 var sup, drop = $('#new'+taxonomy+'_parent'); 285 305 286 306 if ( 'undefined' != s.parsed.responses[0] && (sup = s.parsed.responses[0].supplemental.newcat_parent) ) { 287 307 drop.before(sup); … … 289 309 } 290 310 }; 291 311 292 $('# categorychecklist').wpList({312 $('#'+taxonomy+'checklist').wpList({ 293 313 alt: '', 294 response: 'category-ajax-response',314 response: taxonomy+'-ajax-response', 295 315 addBefore: catAddBefore, 296 316 addAfter: catAddAfter 297 317 }); 298 299 $('#category-add-toggle').click( function() { 300 $('#category-adder').toggleClass( 'wp-hidden-children' ); 301 $('a[href="#categories-all"]', '#category-tabs').click(); 318 $('#'+taxonomy+'-add-toggle').click( function() { 319 $('#'+taxonomy+'-adder').toggleClass( 'wp-hidden-children' ); 320 $('a[href="#'+taxonomy+'-all"]', '#'+taxonomy+'-tabs').click(); 302 321 return false; 303 322 }); 304 323 305 $('# categorychecklist').children('li.popular-category').add( $('#categorychecklist-pop').children() ).find(':checkbox').live( 'click', function(){324 $('#'+taxonomy+'checklist').children('li.popular-category').add( $('#'+taxonomy+'checklist-pop').children() ).find(':checkbox').live( 'click', function(){ 306 325 var t = $(this), c = t.is(':checked'), id = t.val(); 307 $('#in- category-' + id + ', #in-popular-category-' + id).attr( 'checked', c );326 $('#in-'+taxonomy+'-' + id + ', #in-popular-'+taxonomy+'-' + id).attr( 'checked', c ); 308 327 }); 309 328 310 } // end cats329 }); // end cats 311 330 312 331 // Custom Fields 313 332 if ( $('#postcustom').length ) { -
wp-admin/edit-form-advanced.php
94 94 95 95 // all tag-style taxonomies 96 96 foreach ( get_object_taxonomies($post_type) as $tax_name ) { 97 $taxonomy = get_taxonomy($tax_name); 98 $label = isset($taxonomy->label) ? esc_attr($taxonomy->label) : $tax_name; 99 97 100 if ( !is_taxonomy_hierarchical($tax_name) ) { 98 $taxonomy = get_taxonomy($tax_name);99 $label = isset($taxonomy->label) ? esc_attr($taxonomy->label) : $tax_name;100 101 101 add_meta_box('tagsdiv-' . $tax_name, $label, 'post_tags_meta_box', $post_type, 'side', 'core'); 102 102 } 103 else { 104 add_meta_box($tax_name.'div', $label, 'post_categories_meta_box', 'post', 'side', 'core', array('taxonomy'=>$tax_name)); 105 } 103 106 } 104 107 105 if ( is_object_in_taxonomy($post_type, 'category') )106 add_meta_box('categorydiv', __('Categories'), 'post_categories_meta_box', $post_type, 'side', 'core');107 108 108 if ( post_type_supports($post_type, 'page-attributes') ) 109 109 add_meta_box('pageparentdiv', __('Attributes'), 'page_attributes_meta_box', $post_type, 'side', 'core'); 110 110 -
wp-admin/css/colors-classic.dev.css
110 110 } 111 111 112 112 div.tabs-panel, 113 ul #category-tabs li.tabs {113 ul.category-tabs li.tabs { 114 114 border-color: #dfdfdf; 115 115 } 116 116 117 ul #category-tabs li.tabs {117 ul.category-tabs li.tabs { 118 118 background-color: #f1f1f1; 119 119 } 120 120 … … 384 384 background: #faf9f7 !important; 385 385 } 386 386 387 #side-sortables #category-tabs .tabs a {387 #side-sortables .category-tabs .tabs a { 388 388 color: #333; 389 389 } 390 390 … … 1463 1463 background-color: #f5f5f5; 1464 1464 } 1465 1465 1466 #post-body ul #category-tabs li.tabs a {1466 #post-body ul.category-tabs li.tabs a { 1467 1467 color: #333; 1468 1468 } 1469 1469 -
wp-admin/css/press-this.dev.css
115 115 } 116 116 117 117 #tagsdiv-post_tag h3, 118 #categorydiv h3 {118 .categorydiv h3 { 119 119 cursor: pointer; 120 120 } 121 121 … … 308 308 display: none; 309 309 } 310 310 311 #category-adder {311 .category-adder { 312 312 padding: 4px 0; 313 313 } 314 314 315 #category-adder h4 {315 .category-adder h4 { 316 316 margin: 0 0 8px; 317 317 } 318 318 319 #category-add input {319 .category-add input { 320 320 width: 94%; 321 321 font-family: Verdana,Arial,Helvetica,sans-serif; 322 322 font-size: 13px; … … 324 324 padding: 3px; 325 325 } 326 326 327 #category-add select {327 .category-add select { 328 328 width: 70%; 329 329 -x-system-font: none; 330 330 border-style: solid; … … 338 338 vertical-align: top; 339 339 } 340 340 341 #category-add input,342 #category-add-sumbit {341 .category-add input, 342 .category-add-sumbit { 343 343 width: auto; 344 344 } 345 345 346 346 /* Categories */ 347 #categorydiv ul,347 .categorydiv ul, 348 348 #linkcategorydiv ul { 349 349 list-style: none; 350 350 padding: 0; 351 351 margin: 0; 352 352 } 353 353 354 #categorydiv ul.categorychecklist ul {354 .categorydiv ul.categorychecklist ul { 355 355 margin-left: 18px; 356 356 } 357 357 358 #categorydiv div.tabs-panel {358 .categorydiv div.tabs-panel { 359 359 height: 140px; 360 360 overflow: auto; 361 361 } -
wp-admin/css/colors-fresh.dev.css
110 110 } 111 111 112 112 div.tabs-panel, 113 ul #category-tabs li.tabs {113 ul.category-tabs li.tabs { 114 114 border-color: #dfdfdf; 115 115 } 116 116 117 ul #category-tabs li.tabs {117 ul.category-tabs li.tabs { 118 118 background-color: #f1f1f1; 119 119 } 120 120 … … 380 380 border-color: #dfdfdf; 381 381 } 382 382 383 #side-sortables #category-tabs .tabs a {383 #side-sortables .category-tabs .tabs a { 384 384 color: #333; 385 385 } 386 386 … … 1458 1458 background-color: #f5f5f5; 1459 1459 } 1460 1460 1461 #post-body ul #category-tabs li.tabs a {1461 #post-body ul.category-tabs li.tabs a { 1462 1462 color: #333; 1463 1463 } 1464 1464 -
wp-admin/css/wp-admin.dev.css
1928 1928 1929 1929 /* Categories */ 1930 1930 1931 #category-adder {1931 .category-adder { 1932 1932 margin-left: 120px; 1933 1933 padding: 4px 0; 1934 1934 } 1935 1935 1936 #category-adder h4 {1936 .category-adder h4 { 1937 1937 margin: 0 0 8px; 1938 1938 } 1939 1939 1940 #side-sortables #category-adder {1940 #side-sortables .category-adder { 1941 1941 margin: 0; 1942 1942 } 1943 1943 1944 #post-body #category-add input, #category-add select {1944 #post-body .category-add input, .category-add select { 1945 1945 width: 30%; 1946 1946 } 1947 1947 1948 #side-sortables #category-add input {1948 #side-sortables .category-add input { 1949 1949 width: 94%; 1950 1950 } 1951 1951 1952 #side-sortables #category-add select {1952 #side-sortables .category-add select { 1953 1953 width: 100%; 1954 1954 } 1955 1955 1956 # category-add input#category-add-sumbit {1956 #side-sortables .category-add input.category-add-sumbit, #post-body .category-add input.category-add input.category-add-sumbit { 1957 1957 width: auto; 1958 1958 } 1959 1959 1960 #post-body ul #category-tabs {1960 #post-body ul.category-tabs { 1961 1961 float: left; 1962 1962 width: 120px; 1963 1963 text-align: right; … … 1966 1966 padding: 0; 1967 1967 } 1968 1968 1969 #post-body ul #category-tabs li {1969 #post-body ul.category-tabs li { 1970 1970 padding: 8px; 1971 1971 } 1972 1972 1973 #post-body ul #category-tabs li.tabs {1973 #post-body ul.category-tabs li.tabs { 1974 1974 -moz-border-radius: 3px 0 0 3px; 1975 1975 -webkit-border-top-left-radius: 3px; 1976 1976 -webkit-border-bottom-left-radius: 3px; … … 1980 1980 border-bottom-left-radius: 3px; 1981 1981 } 1982 1982 1983 #post-body ul #category-tabs li.tabs a {1983 #post-body ul.category-tabs li.tabs a { 1984 1984 font-weight: bold; 1985 1985 text-decoration: none; 1986 1986 } 1987 1987 1988 #categorydiv div.tabs-panel,1988 .categorydiv div.tabs-panel, 1989 1989 #linkcategorydiv div.tabs-panel { 1990 1990 height: 200px; 1991 1991 overflow: auto; … … 1994 1994 border-width: 1px; 1995 1995 } 1996 1996 1997 #post-body #categorydiv div.tabs-panel,1997 #post-body .categorydiv div.tabs-panel, 1998 1998 #post-body #linkcategorydiv div.tabs-panel { 1999 1999 margin: 0 5px 0 125px; 2000 2000 } 2001 2001 2002 #side-sortables #category-tabs li {2002 #side-sortables .category-tabs li { 2003 2003 display: inline; 2004 2004 padding-right: 8px; 2005 2005 } 2006 2006 2007 #side-sortables #category-tabs a {2007 #side-sortables .category-tabs a { 2008 2008 text-decoration: none; 2009 2009 } 2010 2010 2011 #side-sortables #category-tabs {2011 #side-sortables .category-tabs { 2012 2012 margin-bottom: 3px; 2013 2013 } 2014 2014 2015 #categorydiv ul,2015 .categorydiv ul, 2016 2016 #linkcategorydiv ul { 2017 2017 list-style: none; 2018 2018 padding: 0; 2019 2019 margin: 0; 2020 2020 } 2021 2021 2022 #categorydiv ul.categorychecklist ul,2022 .categorydiv ul.categorychecklist ul, 2023 2023 #linkcategorydiv ul.categorychecklist ul { 2024 2024 margin-left: 18px; 2025 2025 } … … 2030 2030 line-height: 19px; 2031 2031 } 2032 2032 2033 #category-adder h4 {2033 .category-adder h4 { 2034 2034 margin-top: 4px; 2035 2035 margin-bottom: 0px; 2036 2036 } 2037 2037 2038 #categorydiv .tabs-panel {2038 .categorydiv .tabs-panel { 2039 2039 border-width: 3px; 2040 2040 border-style: solid; 2041 2041 } 2042 2042 2043 ul #category-tabs {2043 ul.category-tabs { 2044 2044 margin-top: 12px; 2045 2045 } 2046 2046 2047 ul #category-tabs li.tabs {2047 ul.category-tabs li.tabs { 2048 2048 border-style: solid solid none; 2049 2049 border-width: 1px 1px 0; 2050 2050 } 2051 2051 2052 #post-body #category-tabs li.tabs {2052 #post-body .category-tabs li.tabs { 2053 2053 border-style: solid none solid solid; 2054 2054 border-width: 1px 0 1px 1px; 2055 2055 margin-right: -1px; 2056 2056 } 2057 2057 2058 ul #category-tabs li {2058 ul.category-tabs li { 2059 2059 padding: 5px 8px; 2060 2060 -moz-border-radius: 3px 3px 0 0; 2061 2061 -webkit-border-top-left-radius: 3px; -
wp-admin/css/wp-admin-rtl.css
294 294 margin-left: 4px; 295 295 } 296 296 /* Categories */ 297 #category-adder {297 .category-adder { 298 298 margin-left: 0; 299 299 margin-right: 120px; 300 300 } 301 #post-body ul #category-tabs li.tabs {301 #post-body ul.category-tabs li.tabs { 302 302 -moz-border-radius: 0 3px 3px 0; 303 303 -webkit-border-top-left-radius: 0; 304 304 -webkit-border-top-right-radius: 3px; … … 309 309 border-bottom-left-radius: 0; 310 310 border-bottom-right-radius: 3px; 311 311 } 312 #post-body ul #category-tabs {312 #post-body ul.category-tabs { 313 313 float: right; 314 314 text-align: left; 315 315 margin: 0 0 0 -120px; 316 316 } 317 #post-body #categorydiv div.tabs-panel,317 #post-body .categorydiv div.tabs-panel, 318 318 #post-body #linkcategorydiv div.tabs-panel { 319 319 margin: 0 120px 0 5px; 320 320 } 321 321 /* 1800 - 2000 322 322 =================================== */ 323 #side-sortables #category-tabs li {323 #side-sortables .category-tabs li { 324 324 padding-right: 0; 325 325 padding-left: 8px; 326 326 } 327 #categorydiv ul.categorychecklist ul,327 .categorydiv ul.categorychecklist ul, 328 328 #linkcategorydiv ul.categorychecklist ul { 329 329 margin-left: 0; 330 330 margin-right: 18px;