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/wp-conte.../plugins/network-.../views/post
File: content.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Created by PhpStorm.
[2] Fix | Delete
* User: Admin
[3] Fix | Delete
* Date: 04.04.2017
[4] Fix | Delete
* Time: 8:10
[5] Fix | Delete
*/
[6] Fix | Delete
use NetworkPosts\Components\NetsPostsHtmlHelper;
[7] Fix | Delete
use NetworkPosts\Components\Settings\NetsPostsNetworkSettings;
[8] Fix | Delete
if ( ! defined( 'POST_VIEWS_PATH' ) ) {
[9] Fix | Delete
die();
[10] Fix | Delete
}
[11] Fix | Delete
$wrap_text_start = sanitize_quotes( $shortcode_mgr->get( 'wrap_text_start' ) );
[12] Fix | Delete
$text_color = $shortcode_mgr->get( 'text_color' );
[13] Fix | Delete
$auto_excerpt = $shortcode_mgr->get_boolean( 'auto_excerpt' );
[14] Fix | Delete
$excerpt_length = $shortcode_mgr->get( 'excerpt_length' );
[15] Fix | Delete
$excerpt_letters_length = $shortcode_mgr->get( 'excerpt_letters_length' );
[16] Fix | Delete
$full_text = $shortcode_mgr->get_boolean( 'full_text' );
[17] Fix | Delete
$manual_excerpt_length = $shortcode_mgr->get( 'manual_excerpt_length' );
[18] Fix | Delete
$manual_excerpt_letters_length = $shortcode_mgr->get( 'manual_excerpt_letters_length' );
[19] Fix | Delete
$use_shortcode_in_excerpt = $shortcode_mgr->get_boolean( 'use_shortcode_in_excerpt' );
[20] Fix | Delete
$wrap_excerpt_start = sanitize_quotes( $shortcode_mgr->get( 'wrap_excerpt_start' ) );
[21] Fix | Delete
$wrap_excerpt_end = $shortcode_mgr->get( 'wrap_excerpt_end' );
[22] Fix | Delete
$wrap_text_end = $shortcode_mgr->get( 'wrap_text_end' );
[23] Fix | Delete
$html .= htmlspecialchars_decode( $wrap_text_start );
[24] Fix | Delete
$html .= '<div class="netsposts-excerpt" style="color: ' . $text_color . ';">';
[25] Fix | Delete
if( $shortcode_mgr->has_value( 'strip_excerpt_tags' ) ) {
[26] Fix | Delete
$strip_excerpt_tags = $shortcode_mgr->get_boolean( 'strip_excerpt_tags' );
[27] Fix | Delete
} else {
[28] Fix | Delete
$blog_id = get_current_blog_id();
[29] Fix | Delete
$strip_excerpt_tags = NetsPostsNetworkSettings::is_excerpt_tags_denied( $blog_id );
[30] Fix | Delete
}
[31] Fix | Delete
if( $strip_excerpt_tags ){
[32] Fix | Delete
$content = strip_tags( $the_post['post_content'] );
[33] Fix | Delete
} else {
[34] Fix | Delete
$content = $the_post['post_content'];
[35] Fix | Delete
}
[36] Fix | Delete
if( $shortcode_mgr->get_boolean( 'filter_excerpt_shortcodes' ) &&
[37] Fix | Delete
! $use_shortcode_in_excerpt ){
[38] Fix | Delete
$content = strip_shortcodes( $content );
[39] Fix | Delete
}
[40] Fix | Delete
if ( $auto_excerpt || ! $the_post['post_excerpt'] ) {
[41] Fix | Delete
if( $the_post['post_content'] ) {
[42] Fix | Delete
if ( $excerpt_length ) {
[43] Fix | Delete
$excerpt = get_words_excerpt( $excerpt_length, $content, $the_post['guid'] );
[44] Fix | Delete
} else if ( $excerpt_letters_length ) {
[45] Fix | Delete
$excerpt = ShortenText( $content, $excerpt_letters_length );
[46] Fix | Delete
}
[47] Fix | Delete
} else {
[48] Fix | Delete
$excerpt = '';
[49] Fix | Delete
}
[50] Fix | Delete
} else {
[51] Fix | Delete
$excerpt = $the_post['post_excerpt'];
[52] Fix | Delete
}
[53] Fix | Delete
if ( $use_shortcode_in_excerpt ) {
[54] Fix | Delete
if ( $excerpt ) {
[55] Fix | Delete
$excerpt = do_shortcode( $excerpt );
[56] Fix | Delete
}
[57] Fix | Delete
}
[58] Fix | Delete
if ( $shortcode_mgr->get_boolean( 'filter_excerpt' ) ) {
[59] Fix | Delete
if ( $excerpt ) {
[60] Fix | Delete
$excerpt = apply_filters( 'the_excerpt', $excerpt );
[61] Fix | Delete
}
[62] Fix | Delete
}
[63] Fix | Delete
if ( $full_text ) {
[64] Fix | Delete
$text = $the_post['post_content'];
[65] Fix | Delete
$text = do_shortcode( $text );
[66] Fix | Delete
$text = netsposts_remove_pagination( $text );
[67] Fix | Delete
} else {
[68] Fix | Delete
if( $strip_excerpt_tags ){
[69] Fix | Delete
$post_excerpt = strip_tags( $the_post['post_excerpt'] );
[70] Fix | Delete
} else {
[71] Fix | Delete
$post_excerpt = $the_post['post_excerpt'];
[72] Fix | Delete
}
[73] Fix | Delete
if ( $manual_excerpt_length ) {
[74] Fix | Delete
$text = get_words_excerpt( $manual_excerpt_length, $post_excerpt, $the_post['guid'] );
[75] Fix | Delete
} else if ( $manual_excerpt_letters_length ) {
[76] Fix | Delete
$text = ShortenText( $post_excerpt, $manual_excerpt_letters_length );
[77] Fix | Delete
} else {
[78] Fix | Delete
$text = $excerpt;
[79] Fix | Delete
}
[80] Fix | Delete
}
[81] Fix | Delete
if ( ! $shortcode_mgr->get_boolean( 'hide_excerpt' ) ) {
[82] Fix | Delete
$domain_url = get_site_url();
[83] Fix | Delete
$parent_blog_url = get_site_url( 1 );
[84] Fix | Delete
if( !$use_single_images_folder ){
[85] Fix | Delete
$text = netsposts_replace_image_domains( $text, $parent_blog_url, $domain_url );
[86] Fix | Delete
$text = netsposts_replace_image_link_domains( $text, $parent_blog_url, $domain_url );
[87] Fix | Delete
}
[88] Fix | Delete
$html .= htmlspecialchars_decode( $wrap_excerpt_start );
[89] Fix | Delete
$html .= strip_shortcodes( $text );
[90] Fix | Delete
$html .= htmlspecialchars_decode( $wrap_excerpt_end );
[91] Fix | Delete
}
[92] Fix | Delete
$show_link = true;
[93] Fix | Delete
$pages_without_readmore_link = array();
[94] Fix | Delete
$show_link = empty( $hide_all_links );
[95] Fix | Delete
if ( $show_link ) {
[96] Fix | Delete
$title = $the_post['post_title'];
[97] Fix | Delete
if ( ! empty( $pages_string ) > 0 ) {
[98] Fix | Delete
$pages_without_readmore_link = explode( ';', $pages_string );
[99] Fix | Delete
foreach ( $pages_without_readmore_link as $item ) {
[100] Fix | Delete
if ( trim( strtolower( $title ) ) == trim( strtolower( $item ) ) ) {
[101] Fix | Delete
$show_link = false;
[102] Fix | Delete
}
[103] Fix | Delete
}
[104] Fix | Delete
}
[105] Fix | Delete
}
[106] Fix | Delete
if( $shortcode_mgr->has_value( 'exclude_read_more_link' ) ) {
[107] Fix | Delete
if ( $shortcode_mgr->get_boolean( 'exclude_read_more_link' ) ) {
[108] Fix | Delete
$show_link = false;
[109] Fix | Delete
} else {
[110] Fix | Delete
$exclude_read_more_link = $shortcode_mgr->split_array( 'exclude_read_more_link', ',' );
[111] Fix | Delete
$show_link = ! in_array( $the_post['ID'], $exclude_read_more_link );
[112] Fix | Delete
}
[113] Fix | Delete
}
[114] Fix | Delete
if ( $show_link ) {
[115] Fix | Delete
if( $shortcode_mgr->has_value( 'read_more_text' ) ){
[116] Fix | Delete
$link_text = $shortcode_mgr->get( 'read_more_text' );
[117] Fix | Delete
}
[118] Fix | Delete
else{
[119] Fix | Delete
$link_text = __( 'read more', 'netsposts' ) . '&nbsp;&#10095;';
[120] Fix | Delete
}
[121] Fix | Delete
$html .= NetsPostsHtmlHelper::create_link( $the_post['guid'],
[122] Fix | Delete
$link_text,
[123] Fix | Delete
$open_link_in_new_tab,
[124] Fix | Delete
'netsposts-read-more-link'
[125] Fix | Delete
);
[126] Fix | Delete
}
[127] Fix | Delete
$html .= '</div>';//end of netsposts-excerpt
[128] Fix | Delete
$html .= htmlspecialchars_decode( $wrap_text_end );
[129] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function