You appear to be a bot. Output may be restricted
Description
Redirect the browser to the custom feed URI.
Exits PHP after redirect.
Usage
$void = genesis_feed_redirect();
Parameters
Returns
void Return early if is feed user agent is set and matches Feedblitz, Feedburner or Feedvalidator. Redirects and exits on success.
Source
File name: genesis/lib/functions/feed.php
Lines:
1 to 27 of 27
function genesis_feed_redirect() { if ( ! is_feed() || ( isset( $_SERVER['HTTP_USER_AGENT'] ) && preg_match( '/feed(blitz|burner|validator)/i', $_SERVER['HTTP_USER_AGENT'] ) ) ) { return; } // Don't redirect if viewing archive, search, or post comments feed. if ( is_archive() || is_search() || is_singular() ) { return; } $feed_uri = genesis_get_option( 'feed_uri' ); $comments_feed_uri = genesis_get_option( 'comments_feed_uri' ); if ( $feed_uri && ! is_comment_feed() && genesis_get_option( 'redirect_feed' ) ) { wp_redirect( $feed_uri, 302 ); // phpcs:ignore WordPress.Security.SafeRedirect.wp_redirect_wp_redirect -- User inputs redirect URL. exit; } if ( $comments_feed_uri && is_comment_feed() && genesis_get_option( 'redirect_comments_feed' ) ) { wp_redirect( $comments_feed_uri, 302 ); // phpcs:ignore WordPress.Security.SafeRedirect.wp_redirect_wp_redirect -- User inputs redirect URL. exit; } }