mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Avoid an undefined index notice in get_post_type_archive_feed_link(). props ericlewis. fixes #23744.
git-svn-id: https://develop.svn.wordpress.org/trunk@23660 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
99392425cb
commit
9dc7a6a22f
@ -867,9 +867,10 @@ function get_post_type_archive_feed_link( $post_type, $feed = '' ) {
|
||||
|
||||
if ( ! $link = get_post_type_archive_link( $post_type ) )
|
||||
return false;
|
||||
|
||||
$post_type_obj = get_post_type_object( $post_type );
|
||||
if ( $post_type_obj->rewrite['feeds'] && get_option( 'permalink_structure' ) ) {
|
||||
$link = trailingslashit($link);
|
||||
if ( get_option( 'permalink_structure' ) && is_array( $post_type_obj->rewrite ) && $post_type_obj->rewrite['feeds'] ) {
|
||||
$link = trailingslashit( $link );
|
||||
$link .= 'feed/';
|
||||
if ( $feed != $default_feed )
|
||||
$link .= "$feed/";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user