Make WordPress Core

Ticket #33693: 33693.diff

File 33693.diff, 1.1 KB (added by iworks, 10 years ago)
  • wp-admin/edit.php

     
    1010require_once( dirname( __FILE__ ) . '/admin.php' );
    1111
    1212if ( ! $typenow )
    13         wp_die( __( 'Invalid post type' ) );
     13        wp_die( __( 'This Invalid post type' ) );
    1414
    1515if ( 'attachment' === $typenow ) {
    1616        if ( wp_redirect( admin_url( 'upload.php' ) ) ) {
  • wp-includes/link-template.php

     
    622622        if ( empty( $feed ) )
    623623                $feed = get_default_feed();
    624624
    625         if ( '' != get_option('permalink_structure') ) {
     625        if ( 0 == wp_get_post_parent_id($post_id) && is_attachment() ) {
     626                $url = add_query_arg( array( 'feed' => $feed, 'attachment_id' => $post_id ), home_url( '/' ) );
     627        } else if ( '' != get_option('permalink_structure') ) {
    626628                if ( 'page' == get_option('show_on_front') && $post_id == get_option('page_on_front') )
    627629                        $url = _get_page_link( $post_id );
    628630                else