Make WordPress Core

Ticket #34988: 34988.3.diff

File 34988.3.diff, 1.8 KB (added by swissspidy, 9 years ago)
  • src/wp-admin/term.php

    diff --git src/wp-admin/term.php src/wp-admin/term.php
    index 6d00f50..401d8e7 100644
     
    1010/** WordPress Administration Bootstrap */
    1111require_once( dirname( __FILE__ ) . '/admin.php' );
    1212
    13 if ( empty( $_REQUEST['term_id'] ) ) {
     13if ( empty( $_REQUEST['tag_ID'] ) ) {
    1414        $sendback = admin_url( 'edit-tags.php' );
    1515        if ( ! empty( $taxnow ) ) {
    1616                $sendback = add_query_arg( array( 'taxonomy' => $taxnow ), $sendback );
    if ( empty( $_REQUEST['term_id'] ) ) { 
    1919        exit;
    2020}
    2121
    22 $term_id = absint( $_REQUEST['term_id'] );
     22$term_id = absint( $_REQUEST['tag_ID'] );
    2323$tag    = get_term( $term_id, $taxnow, OBJECT, 'edit' );
    2424
    2525if ( ! $tag instanceof WP_Term ) {
  • src/wp-includes/link-template.php

    diff --git src/wp-includes/link-template.php src/wp-includes/link-template.php
    index d872123..903adfd 100644
    function get_edit_term_link( $term_id, $taxonomy = '', $object_type = '' ) { 
    928928
    929929        $args = array(
    930930                'taxonomy' => $taxonomy,
    931                 'term_id'  => $term->term_id,
     931                'tag_ID'   => $term->term_id,
     932                'action'   => 'edit',
    932933        );
    933934
    934935        if ( $object_type ) {
  • src/wp-includes/vars.php

    diff --git src/wp-includes/vars.php src/wp-includes/vars.php
    index d894884..dd514ac 100644
    if ( is_admin() ) { 
    3939                if ( '.php' !== substr($pagenow, -4, 4) )
    4040                        $pagenow .= '.php'; // for Options +Multiviews: /wp-admin/themes/index.php (themes.php is queried)
    4141        }
     42
     43        // @see https://core.trac.wordpress.org/ticket/34988
     44        if ( 'term.php' === $pagenow ) {
     45                $pagenow = 'edit-tags.php';
     46        }
    4247} else {
    4348        if ( preg_match('#([^/]+\.php)([?/].*?)?$#i', $_SERVER['PHP_SELF'], $self_matches) )
    4449                $pagenow = strtolower($self_matches[1]);