Definition:
function do_feed() {}
Loads the feed template from the use of an action hook.
If the feed action does not have a hook, then the function will die with a message telling the visitor that the feed is not valid.
Defined actions
- $hook
do_action( $hook, $wp_query->is_comment_feed );
Source code
function do_feed() { global $wp_query; $feed = get_query_var( 'feed' ); // Remove the pad, if present. $feed = preg_replace( '/^_+/', '', $feed ); if ( $feed == '' || $feed == 'feed' ) $feed = get_default_feed(); $hook = 'do_feed_' . $feed; if ( !has_action($hook) ) { $message = sprintf( __( 'ERROR: %s is not a valid feed template.' ), esc_html($feed)); wp_die( $message, '', array( 'response' => 404 ) ); } do_action( $hook, $wp_query->is_comment_feed ); }
956
No comments yet... Be the first to leave a reply!