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/ninja-fo.../includes/Display
File: Page.php
<?php if ( ! defined( 'ABSPATH' ) ) exit;
[0] Fix | Delete
[1] Fix | Delete
abstract class NF_Display_Page
[2] Fix | Delete
{
[3] Fix | Delete
protected $_wp_query;
[4] Fix | Delete
[5] Fix | Delete
public function __construct()
[6] Fix | Delete
{
[7] Fix | Delete
$this->_wp_query = $GLOBALS['wp_query'];
[8] Fix | Delete
$this->modify_wp_query();
[9] Fix | Delete
}
[10] Fix | Delete
[11] Fix | Delete
/**
[12] Fix | Delete
* @return string HTML
[13] Fix | Delete
*/
[14] Fix | Delete
public function get_content()
[15] Fix | Delete
{
[16] Fix | Delete
ob_start();
[17] Fix | Delete
// ...
[18] Fix | Delete
$content = ob_get_clean();
[19] Fix | Delete
return $content;
[20] Fix | Delete
}
[21] Fix | Delete
[22] Fix | Delete
/**
[23] Fix | Delete
* @return string
[24] Fix | Delete
*/
[25] Fix | Delete
public abstract function get_title();
[26] Fix | Delete
[27] Fix | Delete
/**
[28] Fix | Delete
* @return string
[29] Fix | Delete
*/
[30] Fix | Delete
public abstract function get_guid();
[31] Fix | Delete
[32] Fix | Delete
/**
[33] Fix | Delete
* Modifies the WP Query to our liking
[34] Fix | Delete
*
[35] Fix | Delete
* @return void
[36] Fix | Delete
*/
[37] Fix | Delete
public function modify_wp_query()
[38] Fix | Delete
{
[39] Fix | Delete
$this->_wp_query->posts_per_page = 1;
[40] Fix | Delete
$this->_wp_query->nopaging = true;
[41] Fix | Delete
$this->_wp_query->post_count = 1;
[42] Fix | Delete
[43] Fix | Delete
// If we don't have a post, load an empty one
[44] Fix | Delete
if ( empty( $this->_wp_query->post ) )
[45] Fix | Delete
$this->_wp_query->post = new WP_Post( new \stdClass() );
[46] Fix | Delete
[47] Fix | Delete
$this->_wp_query->post->ID = 0;
[48] Fix | Delete
$this->_wp_query->post->post_date = current_time( 'mysql' );
[49] Fix | Delete
$this->_wp_query->post->post_date_gmt = current_time( 'mysql', 1 );
[50] Fix | Delete
$this->_wp_query->post->post_content = $this->get_content();
[51] Fix | Delete
$this->_wp_query->post->post_title = $this->get_title();
[52] Fix | Delete
$this->_wp_query->post->post_excerpt = '';
[53] Fix | Delete
$this->_wp_query->post->post_status = 'publish';
[54] Fix | Delete
$this->_wp_query->post->comment_status = false;
[55] Fix | Delete
$this->_wp_query->post->ping_status = false;
[56] Fix | Delete
$this->_wp_query->post->post_password = '';
[57] Fix | Delete
$this->_wp_query->post->post_name = $this->get_guid();
[58] Fix | Delete
$this->_wp_query->post->to_ping = '';
[59] Fix | Delete
$this->_wp_query->post->pinged = '';
[60] Fix | Delete
$this->_wp_query->post->post_modified = $this->_wp_query->post->post_date;
[61] Fix | Delete
$this->_wp_query->post->post_modified_gmt = $this->_wp_query->post->post_date_gmt;
[62] Fix | Delete
$this->_wp_query->post->post_content_filtered = '';
[63] Fix | Delete
$this->_wp_query->post->post_parent = 0;
[64] Fix | Delete
$this->_wp_query->post->guid = get_home_url() . '/' . $this->get_guid();
[65] Fix | Delete
$this->_wp_query->post->menu_order = 0;
[66] Fix | Delete
$this->_wp_query->post->post_type = 'page';
[67] Fix | Delete
$this->_wp_query->post->post_mime_type = '';
[68] Fix | Delete
$this->_wp_query->post->comment_count = 0;
[69] Fix | Delete
$this->_wp_query->post->filter = 'raw';
[70] Fix | Delete
[71] Fix | Delete
$this->_wp_query->posts = array( $this->_wp_query->post );
[72] Fix | Delete
$this->_wp_query->found_posts = 1;
[73] Fix | Delete
$this->_wp_query->is_single = false; //false -- so comments_template() doesn't add comments
[74] Fix | Delete
$this->_wp_query->is_preview = false;
[75] Fix | Delete
$this->_wp_query->is_page = false; //false -- so comments_template() doesn't add comments
[76] Fix | Delete
$this->_wp_query->is_archive = false;
[77] Fix | Delete
$this->_wp_query->is_date = false;
[78] Fix | Delete
$this->_wp_query->is_year = false;
[79] Fix | Delete
$this->_wp_query->is_month = false;
[80] Fix | Delete
$this->_wp_query->is_day = false;
[81] Fix | Delete
$this->_wp_query->is_time = false;
[82] Fix | Delete
$this->_wp_query->is_author = false;
[83] Fix | Delete
$this->_wp_query->is_category = false;
[84] Fix | Delete
$this->_wp_query->is_tag = false;
[85] Fix | Delete
$this->_wp_query->is_tax = false;
[86] Fix | Delete
$this->_wp_query->is_search = false;
[87] Fix | Delete
$this->_wp_query->is_feed = false;
[88] Fix | Delete
$this->_wp_query->is_comment_feed = false;
[89] Fix | Delete
$this->_wp_query->is_trackback = false;
[90] Fix | Delete
$this->_wp_query->is_home = false;
[91] Fix | Delete
$this->_wp_query->is_404 = false;
[92] Fix | Delete
$this->_wp_query->is_comments_popup = false;
[93] Fix | Delete
$this->_wp_query->is_paged = false;
[94] Fix | Delete
$this->_wp_query->is_admin = false;
[95] Fix | Delete
$this->_wp_query->is_attachment = false;
[96] Fix | Delete
$this->_wp_query->is_singular = false;
[97] Fix | Delete
$this->_wp_query->is_posts_page = false;
[98] Fix | Delete
$this->_wp_query->is_post_type_archive = false;
[99] Fix | Delete
[100] Fix | Delete
$GLOBALS['wp_query'] = $this->_wp_query;
[101] Fix | Delete
}
[102] Fix | Delete
}
[103] Fix | Delete
[104] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function