WordPress.org

Make WordPress Core

Ticket #16845: wordpress-missing-post_id-and-type.patch

File wordpress-missing-post_id-and-type.patch, 728 bytes (added by spaam, 3 years ago)
  • wp-admin/includes/media.php

     
    7878                        $class = ''; 
    7979                        if ( $current == $callback ) 
    8080                                $class = " class='current'"; 
    81                         $href = add_query_arg(array('tab'=>$callback, 's'=>false, 'paged'=>false, 'post_mime_type'=>false, 'm'=>false)); 
     81                        $href = add_query_arg(array('tab'=>$callback, 's'=>false, 'paged'=>false, 'post_id'=> $_GET['post_id'], 'type'=> $_GET['type'], 'post_mime_type'=>false, 'm'=>false)); 
    8282                        $link = "<a href='" . esc_url($href) . "'$class>$text</a>"; 
    8383                        echo "\t<li id='" . esc_attr("tab-$callback") . "'>$link</li>\n"; 
    8484                }