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.../public_h.../clone/wp-conte.../plugins/themify-.../includes/plugin-c...
File: bwpminify.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Builder Plugin Compatibility Code
[2] Fix | Delete
*
[3] Fix | Delete
* @package Themify_Builder
[4] Fix | Delete
* @subpackage Themify_Builder/classes
[5] Fix | Delete
*/
[6] Fix | Delete
[7] Fix | Delete
class Themify_Builder_Plugin_Compat_BWPMinify {
[8] Fix | Delete
[9] Fix | Delete
static function init() {
[10] Fix | Delete
// Only apply the filter when WP Multisite with subdirectory install.
[11] Fix | Delete
if ( defined( 'SUBDOMAIN_INSTALL' ) && ! SUBDOMAIN_INSTALL ) {
[12] Fix | Delete
add_filter( 'bwp_minify_get_src', array( __CLASS__, 'bwp_minify_get_src' ) );
[13] Fix | Delete
}
[14] Fix | Delete
}
[15] Fix | Delete
[16] Fix | Delete
/**
[17] Fix | Delete
* Modify the src for builder stylesheet.
[18] Fix | Delete
*/
[19] Fix | Delete
public static function bwp_minify_get_src(string $string ):string {
[20] Fix | Delete
$split_string = explode( ',', $string );
[21] Fix | Delete
$found_src = array();
[22] Fix | Delete
foreach( $split_string as $src ) {
[23] Fix | Delete
if ( preg_match( '/^files\/themify-css/', $src ) ) {
[24] Fix | Delete
$found_src[] = $src;
[25] Fix | Delete
}
[26] Fix | Delete
}
[27] Fix | Delete
if ( !empty( $found_src )) {
[28] Fix | Delete
$basedir = themify_upload_dir('basedir');
[29] Fix | Delete
$base_path = substr( $basedir, strpos( $basedir, 'wp-content' ) );
[30] Fix | Delete
foreach ( $found_src as $replace_src ) {
[31] Fix | Delete
$key = array_search( $replace_src, $split_string );
[32] Fix | Delete
if ( $key !== false ) {
[33] Fix | Delete
$split_string[ $key ] = trailingslashit( $base_path ) . str_replace( 'files/themify-css', 'themify-css', $split_string[ $key ] );
[34] Fix | Delete
}
[35] Fix | Delete
}
[36] Fix | Delete
$string = implode( ',', $split_string );
[37] Fix | Delete
}
[38] Fix | Delete
return $string;
[39] Fix | Delete
}
[40] Fix | Delete
}
[41] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function