/var/www/vhosts/newcovenanttrust.com/httpdocs/wp-content/plugins/wordpress-seo/src/integrations/front-end/feed-improvements.php
$queried_object = \get_queried_object();
// Don't call get_class with null. This gives a warning.
$class = ( $queried_object !== null ) ? \get_class( $queried_object ) : null;
switch ( $class ) {
// Post type archive feeds.
case 'WP_Post_Type':
$url = $this->meta->for_post_type_archive( $queried_object->name )->canonical;
break;
// Post comment feeds.
case 'WP_Post':
$url = $this->meta->for_post( $queried_object->ID )->canonical;
break;
// Term feeds.
case 'WP_Term':
$url = $this->meta->for_term( $queried_object->term_id )->canonical;
break;
// Author feeds.
case 'WP_User':
$url = $this->meta->for_author( $queried_object->ID )->canonical;
break;
// This would be NULL on the home page and on date archive feeds.
case null:
$url = $this->meta->for_home_page()->canonical;
break;
default:
break;
}
return $url;
}
}
/var/www/vhosts/newcovenanttrust.com/httpdocs/wp-content/plugins/wordpress-seo/src/integrations/front-end/feed-improvements.php
$queried_object = \get_queried_object();
// Don't call get_class with null. This gives a warning.
$class = ( $queried_object !== null ) ? \get_class( $queried_object ) : null;
switch ( $class ) {
// Post type archive feeds.
case 'WP_Post_Type':
$url = $this->meta->for_post_type_archive( $queried_object->name )->canonical;
break;
// Post comment feeds.
case 'WP_Post':
$url = $this->meta->for_post( $queried_object->ID )->canonical;
break;
// Term feeds.
case 'WP_Term':
$url = $this->meta->for_term( $queried_object->term_id )->canonical;
break;
// Author feeds.
case 'WP_User':
$url = $this->meta->for_author( $queried_object->ID )->canonical;
break;
// This would be NULL on the home page and on date archive feeds.
case null:
$url = $this->meta->for_home_page()->canonical;
break;
default:
break;
}
return $url;
}
}
/var/www/vhosts/newcovenanttrust.com/httpdocs/wp-content/plugins/wordpress-seo/src/integrations/front-end/feed-improvements.php
*/
public function handle_rss_feed() {
$this->send_canonical_header( false );
}
/**
* Adds a canonical link header to the main canonical URL for the requested feed object. If it is not a comment
* feed.
*
* @param bool $for_comments If the RRS feed is meant for a comment feed.
*
* @return void
*/
public function send_canonical_header( $for_comments ) {
if ( $for_comments || \headers_sent() ) {
return;
}
$url = $this->get_url_for_queried_object( $this->meta->for_home_page()->canonical );
if ( ! empty( $url ) ) {
\header( \sprintf( 'Link: <%s>; rel="canonical"', $url ), false );
}
}
/**
* Adds noindex, follow tag for comment feeds.
*
* @param bool $for_comments If the RSS feed is meant for a comment feed.
*
* @return void
*/
public function add_robots_headers( $for_comments ) {
if ( $for_comments && ! \headers_sent() ) {
\header( 'X-Robots-Tag: noindex, follow', true );
}
}
/**
* Makes sure the title separator set in Yoast SEO is used for all feeds.
/var/www/vhosts/newcovenanttrust.com/httpdocs/wp-includes/class-wp-hook.php
$num_args = count( $args );
do {
$this->current_priority[ $nesting_level ] = current( $this->iterations[ $nesting_level ] );
$priority = $this->current_priority[ $nesting_level ];
foreach ( $this->callbacks[ $priority ] as $the_ ) {
if ( ! $this->doing_action ) {
$args[0] = $value;
}
// Avoid the array_slice() if possible.
if ( 0 === $the_['accepted_args'] ) {
$value = call_user_func( $the_['function'] );
} elseif ( $the_['accepted_args'] >= $num_args ) {
$value = call_user_func_array( $the_['function'], $args );
} else {
$value = call_user_func_array( $the_['function'], array_slice( $args, 0, $the_['accepted_args'] ) );
}
}
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
unset( $this->iterations[ $nesting_level ] );
unset( $this->current_priority[ $nesting_level ] );
--$this->nesting_level;
return $value;
}
/**
* Calls the callback functions that have been added to an action hook.
*
* @since 4.7.0
*
* @param array $args Parameters to pass to the callback functions.
*/
public function do_action( $args ) {
/var/www/vhosts/newcovenanttrust.com/httpdocs/wp-includes/class-wp-hook.php
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
unset( $this->iterations[ $nesting_level ] );
unset( $this->current_priority[ $nesting_level ] );
--$this->nesting_level;
return $value;
}
/**
* Calls the callback functions that have been added to an action hook.
*
* @since 4.7.0
*
* @param array $args Parameters to pass to the callback functions.
*/
public function do_action( $args ) {
$this->doing_action = true;
$this->apply_filters( '', $args );
// If there are recursive calls to the current action, we haven't finished it until we get to the last one.
if ( ! $this->nesting_level ) {
$this->doing_action = false;
}
}
/**
* Processes the functions hooked into the 'all' hook.
*
* @since 4.7.0
*
* @param array $args Arguments to pass to the hook callbacks. Passed by reference.
*/
public function do_all_hook( &$args ) {
$nesting_level = $this->nesting_level++;
$this->iterations[ $nesting_level ] = $this->priorities;
do {
$priority = current( $this->iterations[ $nesting_level ] );
/var/www/vhosts/newcovenanttrust.com/httpdocs/wp-includes/plugin.php
if ( ! isset( $wp_filter[ $hook_name ] ) ) {
if ( isset( $wp_filter['all'] ) ) {
array_pop( $wp_current_filter );
}
return;
}
if ( ! isset( $wp_filter['all'] ) ) {
$wp_current_filter[] = $hook_name;
}
if ( empty( $arg ) ) {
$arg[] = '';
} elseif ( is_array( $arg[0] ) && 1 === count( $arg[0] ) && isset( $arg[0][0] ) && is_object( $arg[0][0] ) ) {
// Backward compatibility for PHP4-style passing of `array( &$this )` as action `$arg`.
$arg[0] = $arg[0][0];
}
$wp_filter[ $hook_name ]->do_action( $arg );
array_pop( $wp_current_filter );
}
/**
* Calls the callback functions that have been added to an action hook, specifying arguments in an array.
*
* @since 2.1.0
*
* @see do_action() This function is identical, but the arguments passed to the
* functions hooked to `$hook_name` are supplied using an array.
*
* @global WP_Hook[] $wp_filter Stores all of the filters and actions.
* @global int[] $wp_actions Stores the number of times each action was triggered.
* @global string[] $wp_current_filter Stores the list of current filters with the current one last.
*
* @param string $hook_name The name of the action to be executed.
* @param array $args The arguments supplied to the functions hooked to `$hook_name`.
*/
function do_action_ref_array( $hook_name, $args ) {
/var/www/vhosts/newcovenanttrust.com/httpdocs/wp-includes/functions.php
/**
* Fires once the given feed is loaded.
*
* The dynamic portion of the hook name, `$feed`, refers to the feed template name.
*
* Possible hook names include:
*
* - `do_feed_atom`
* - `do_feed_rdf`
* - `do_feed_rss`
* - `do_feed_rss2`
*
* @since 2.1.0
* @since 4.4.0 The `$feed` parameter was added.
*
* @param bool $is_comment_feed Whether the feed is a comment feed.
* @param string $feed The feed name.
*/
do_action( "do_feed_{$feed}", $wp_query->is_comment_feed, $feed );
}
/**
* Loads the RDF RSS 0.91 Feed template.
*
* @since 2.1.0
*
* @see load_template()
*/
function do_feed_rdf() {
load_template( ABSPATH . WPINC . '/feed-rdf.php' );
}
/**
* Loads the RSS 1.0 Feed Template.
*
* @since 2.1.0
*
* @see load_template()
*/
/var/www/vhosts/newcovenanttrust.com/httpdocs/wp-includes/template-loader.php
// Process feeds and trackbacks even if not using themes.
if ( is_robots() ) {
/**
* Fired when the template loader determines a robots.txt request.
*
* @since 2.1.0
*/
do_action( 'do_robots' );
return;
} elseif ( is_favicon() ) {
/**
* Fired when the template loader determines a favicon.ico request.
*
* @since 5.4.0
*/
do_action( 'do_favicon' );
return;
} elseif ( is_feed() ) {
do_feed();
return;
} elseif ( is_trackback() ) {
require ABSPATH . 'wp-trackback.php';
return;
}
if ( wp_using_themes() ) {
$tag_templates = array(
'is_embed' => 'get_embed_template',
'is_404' => 'get_404_template',
'is_search' => 'get_search_template',
'is_front_page' => 'get_front_page_template',
'is_home' => 'get_home_template',
'is_privacy_policy' => 'get_privacy_policy_template',
'is_post_type_archive' => 'get_post_type_archive_template',
'is_tax' => 'get_taxonomy_template',
'is_attachment' => 'get_attachment_template',
'is_single' => 'get_single_template',
'is_page' => 'get_page_template',
/var/www/vhosts/newcovenanttrust.com/httpdocs/wp-blog-header.php
<?php
/**
* Loads the WordPress environment and template.
*
* @package WordPress
*/
if ( ! isset( $wp_did_header ) ) {
$wp_did_header = true;
// Load the WordPress library.
require_once __DIR__ . '/wp-load.php';
// Set up the WordPress query.
wp();
// Load the theme template.
require_once ABSPATH . WPINC . '/template-loader.php';
}
/var/www/vhosts/newcovenanttrust.com/httpdocs/index.php
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define( 'WP_USE_THEMES', true );
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';