Make WordPress Core

Changeset 23660


Ignore:
Timestamp:
03/12/2013 01:50:46 AM (12 years ago)
Author:
SergeyBiryukov
Message:

Avoid an undefined index notice in get_post_type_archive_feed_link(). props ericlewis. fixes #23744.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/link-template.php

    r23554 r23660  
    868868    if ( ! $link = get_post_type_archive_link( $post_type ) )
    869869        return false;
     870
    870871    $post_type_obj = get_post_type_object( $post_type );
    871     if ( $post_type_obj->rewrite['feeds'] && get_option( 'permalink_structure' ) ) {
    872         $link = trailingslashit($link);
     872    if ( get_option( 'permalink_structure' ) && is_array( $post_type_obj->rewrite ) && $post_type_obj->rewrite['feeds'] ) {
     873        $link = trailingslashit( $link );
    873874        $link .= 'feed/';
    874875        if ( $feed != $default_feed )
Note: See TracChangeset for help on using the changeset viewer.