Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/accelera.../feeds
File: instant-article-feed.php
<?php
[0] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[1] Fix | Delete
exit;
[2] Fix | Delete
}
[3] Fix | Delete
header('Content-Type: ' . esc_attr(feed_content_type('rss2')) . '; charset=' . esc_attr( get_option('blog_charset') ), true);
[4] Fix | Delete
$more = 1;
[5] Fix | Delete
echo '<?xml version="1.0" encoding="'. esc_attr( get_option('blog_charset') ).'"?'.'>';
[6] Fix | Delete
?>
[7] Fix | Delete
[8] Fix | Delete
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
[9] Fix | Delete
[10] Fix | Delete
<channel>
[11] Fix | Delete
<title><?php bloginfo_rss('name'); ?></title>
[12] Fix | Delete
<link><?php bloginfo_rss('url'); ?></link>
[13] Fix | Delete
<description><?php bloginfo_rss("description"); ?></description>
[14] Fix | Delete
<lastBuildDate><?php echo esc_attr(mysql2date('c', get_lastpostmodified('GMT'), false)); ?></lastBuildDate>
[15] Fix | Delete
<language><?php bloginfo_rss( 'language' ); ?></language>
[16] Fix | Delete
<?php
[17] Fix | Delete
global $redux_builder_amp;
[18] Fix | Delete
$number_of_articles = $exclude_ids = '';
[19] Fix | Delete
$exclude_cats = array();
[20] Fix | Delete
if( isset( $redux_builder_amp['ampforwp-fb-instant-article-posts'] ) && $redux_builder_amp['ampforwp-fb-instant-article-posts'] ){
[21] Fix | Delete
$number_of_articles = $redux_builder_amp['ampforwp-fb-instant-article-posts'];
[22] Fix | Delete
$number_of_articles = intval( $number_of_articles );
[23] Fix | Delete
}
[24] Fix | Delete
else{
[25] Fix | Delete
$number_of_articles = 50;
[26] Fix | Delete
}
[27] Fix | Delete
[28] Fix | Delete
$ia_args = array(
[29] Fix | Delete
'post_status' => 'publish',
[30] Fix | Delete
'ignore_sticky_posts' => true,
[31] Fix | Delete
'posts_per_page' => esc_attr($number_of_articles),
[32] Fix | Delete
'no_found_rows' => true,
[33] Fix | Delete
'meta_query' => array(
[34] Fix | Delete
array(
[35] Fix | Delete
'key' => 'ampforwp-ia-on-off',
[36] Fix | Delete
'value' => 'default',
[37] Fix | Delete
),
[38] Fix | Delete
)
[39] Fix | Delete
);
[40] Fix | Delete
if(ampforwp_get_setting('fb-instant-article-order-by') == 2){
[41] Fix | Delete
$ia_args['orderby'] = 'post_modified';
[42] Fix | Delete
}
[43] Fix | Delete
if ( ampforwp_get_setting('hide-amp-ia-categories') ) {
[44] Fix | Delete
$exclude_cats = array_values(array_filter(ampforwp_get_setting('hide-amp-ia-categories')));
[45] Fix | Delete
$ia_args['category__not_in'] = $exclude_cats;
[46] Fix | Delete
}
[47] Fix | Delete
if ( is_category() ) {
[48] Fix | Delete
$ia_args['category__in'] = get_queried_object_id();
[49] Fix | Delete
}
[50] Fix | Delete
if ( is_tag() ) {
[51] Fix | Delete
$ia_args['tag__in'] = get_queried_object_id();
[52] Fix | Delete
}
[53] Fix | Delete
if ( is_tax() ) {
[54] Fix | Delete
$tax_object = get_queried_object();
[55] Fix | Delete
$ia_args['post_type'] = get_post_type();
[56] Fix | Delete
$ia_args['tax_query']['taxonomy'] = esc_attr($tax_object->taxonomy);
[57] Fix | Delete
$ia_args['tax_query']['field'] = 'id';
[58] Fix | Delete
$ia_args['tax_query']['terms'] = esc_attr($tax_object->term_id);
[59] Fix | Delete
}
[60] Fix | Delete
$ia_args = apply_filters('ampforwp_ia_query_args' , $ia_args );
[61] Fix | Delete
$ia_query = new WP_Query( $ia_args );
[62] Fix | Delete
while( $ia_query->have_posts() ) :
[63] Fix | Delete
$ia_query->the_post(); ?>
[64] Fix | Delete
[65] Fix | Delete
<item>
[66] Fix | Delete
<title><?php the_title_rss() ?></title>
[67] Fix | Delete
<link><?php the_permalink_rss() ?></link>
[68] Fix | Delete
<guid><?php the_guid(); ?></guid>
[69] Fix | Delete
<pubDate><?php echo esc_attr(mysql2date('c', get_post_time('c', true), false)); ?></pubDate>
[70] Fix | Delete
<?php if ( true == $redux_builder_amp['ampforwp-instant-article-author-meta'] ) { ?>
[71] Fix | Delete
<author><?php the_author() ?></author>
[72] Fix | Delete
<?php } ?>
[73] Fix | Delete
<description><?php the_excerpt_rss(); ?></description>
[74] Fix | Delete
<content:encoded>
[75] Fix | Delete
<![CDATA[
[76] Fix | Delete
<?php
[77] Fix | Delete
$template_file = AMPFORWP_PLUGIN_DIR . 'templates/instant-articles/instant-article.php';
[78] Fix | Delete
load_template($template_file, false);
[79] Fix | Delete
?>
[80] Fix | Delete
]]>
[81] Fix | Delete
</content:encoded>
[82] Fix | Delete
</item>
[83] Fix | Delete
[84] Fix | Delete
<?php endwhile; ?>
[85] Fix | Delete
<?php wp_reset_postdata(); ?>
[86] Fix | Delete
</channel>
[87] Fix | Delete
</rss>
[88] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function