mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-05 02:10:45 +01:00
Avoid an undefined index notice in get_post_type_archive_feed_link(). props ericlewis. fixes #23744.
git-svn-id: http://core.svn.wordpress.org/trunk@23660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
88e8c501ab
commit
4c85664703
@ -867,9 +867,10 @@ function get_post_type_archive_feed_link( $post_type, $feed = '' ) {
|
|||||||
|
|
||||||
if ( ! $link = get_post_type_archive_link( $post_type ) )
|
if ( ! $link = get_post_type_archive_link( $post_type ) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
$post_type_obj = get_post_type_object( $post_type );
|
$post_type_obj = get_post_type_object( $post_type );
|
||||||
if ( $post_type_obj->rewrite['feeds'] && get_option( 'permalink_structure' ) ) {
|
if ( get_option( 'permalink_structure' ) && is_array( $post_type_obj->rewrite ) && $post_type_obj->rewrite['feeds'] ) {
|
||||||
$link = trailingslashit($link);
|
$link = trailingslashit( $link );
|
||||||
$link .= 'feed/';
|
$link .= 'feed/';
|
||||||
if ( $feed != $default_feed )
|
if ( $feed != $default_feed )
|
||||||
$link .= "$feed/";
|
$link .= "$feed/";
|
||||||
|
Loading…
Reference in New Issue
Block a user