Ticket #21871: 21871.5.diff
| File 21871.5.diff, 1.0 KB (added by , 14 years ago) |
|---|
-
wp-admin/includes/screen.php
426 426 $id = sanitize_key( $id ); 427 427 if ( 'edit-comments' != $id && 'edit-tags' != $id && 'edit-' == substr( $id, 0, 5 ) ) { 428 428 $maybe = substr( $id, 5 ); 429 if ( false !== strpos( $maybe, '-' ) ) { 430 $maybe = explode( '-', $maybe ); 431 $maybe2 = $maybe[1]; 432 $maybe = $maybe[0]; 433 } 429 434 if ( taxonomy_exists( $maybe ) ) { 430 435 $id = 'edit-tags'; 431 436 $taxonomy = $maybe; 437 if ( ! empty( $maybe2 ) ) 438 $post_type = $maybe2; 432 439 } elseif ( post_type_exists( $maybe ) ) { 433 440 $id = 'edit'; 434 441 $post_type = $maybe; … … 496 503 case 'edit-tags' : 497 504 if ( null === $taxonomy ) 498 505 $taxonomy = 'post_tag'; 499 $id = 'edit-' . $taxonomy; 506 if ( null === $post_type ) 507 $post_type = 'post'; 508 $id = 'edit-' . $taxonomy . '-' . $post_type; 500 509 break; 501 510 } 502 511