| 1 | Index: wp-admin/admin-ajax.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-admin/admin-ajax.php (revision 15301) |
|---|
| 4 | +++ wp-admin/admin-ajax.php (working copy) |
|---|
| 5 | @@ -552,7 +552,7 @@ |
|---|
| 6 | break; |
|---|
| 7 | case 'add-tag' : // From Manage->Tags |
|---|
| 8 | check_ajax_referer( 'add-tag' ); |
|---|
| 9 | - |
|---|
| 10 | + $post_type = !empty($_POST['post_type']) ? $_POST['post_type'] : 'post'; |
|---|
| 11 | $taxonomy = !empty($_POST['taxonomy']) ? $_POST['taxonomy'] : 'post_tag'; |
|---|
| 12 | $tax = get_taxonomy($taxonomy); |
|---|
| 13 | |
|---|
| 14 | Index: wp-admin/includes/template.php |
|---|
| 15 | =================================================================== |
|---|
| 16 | --- wp-admin/includes/template.php (revision 15301) |
|---|
| 17 | +++ wp-admin/includes/template.php (working copy) |
|---|
| 18 | @@ -1389,7 +1389,7 @@ |
|---|
| 19 | if ( !empty( $categories ) ) { |
|---|
| 20 | $out = array(); |
|---|
| 21 | foreach ( $categories as $c ) |
|---|
| 22 | - $out[] = "<a href='edit.php?category_name=$c->slug'> " . esc_html(sanitize_term_field('name', $c->name, $c->term_id, 'category', 'display')) . '</a>'; |
|---|
| 23 | + $out[] = "<a href='edit.php?post_type={$post->post_type}&category_name={$c->slug}'> " . esc_html(sanitize_term_field('name', $c->name, $c->term_id, 'category', 'display')) . '</a>'; |
|---|
| 24 | echo join( ', ', $out ); |
|---|
| 25 | } else { |
|---|
| 26 | _e('Uncategorized'); |
|---|
| 27 | @@ -1405,7 +1405,7 @@ |
|---|
| 28 | if ( !empty( $tags ) ) { |
|---|
| 29 | $out = array(); |
|---|
| 30 | foreach ( $tags as $c ) |
|---|
| 31 | - $out[] = "<a href='edit.php?tag=$c->slug'> " . esc_html(sanitize_term_field('name', $c->name, $c->term_id, 'post_tag', 'display')) . '</a>'; |
|---|
| 32 | + $out[] = "<a href='edit.php?post_type={$post->post_type}&tag={$c->slug}'> " . esc_html(sanitize_term_field('name', $c->name, $c->term_id, 'post_tag', 'display')) . '</a>'; |
|---|
| 33 | echo join( ', ', $out ); |
|---|
| 34 | } else { |
|---|
| 35 | _e('No Tags'); |
|---|
| 36 | Index: wp-admin/edit-tags.php |
|---|
| 37 | =================================================================== |
|---|
| 38 | --- wp-admin/edit-tags.php (revision 15301) |
|---|
| 39 | +++ wp-admin/edit-tags.php (working copy) |
|---|
| 40 | @@ -382,6 +382,7 @@ |
|---|
| 41 | <input type="hidden" name="action" value="add-tag" /> |
|---|
| 42 | <input type="hidden" name="screen" value="<?php echo esc_attr($current_screen->id); ?>" /> |
|---|
| 43 | <input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" /> |
|---|
| 44 | +<input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" /> |
|---|
| 45 | <?php wp_nonce_field('add-tag'); ?> |
|---|
| 46 | |
|---|
| 47 | <div class="form-field form-required"> |
|---|