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/wp-smush.../core/webp
File: class-webp-dir.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Smush\Core\Webp;
[2] Fix | Delete
[3] Fix | Delete
use Smush\Core\Upload_Dir;
[4] Fix | Delete
[5] Fix | Delete
class Webp_Dir extends Upload_Dir {
[6] Fix | Delete
private $webp_path;
[7] Fix | Delete
[8] Fix | Delete
private $webp_rel_path;
[9] Fix | Delete
[10] Fix | Delete
private $webp_url;
[11] Fix | Delete
[12] Fix | Delete
/**
[13] Fix | Delete
* @return string
[14] Fix | Delete
*/
[15] Fix | Delete
public function get_webp_path() {
[16] Fix | Delete
if ( is_null( $this->webp_path ) ) {
[17] Fix | Delete
$this->webp_path = $this->prepare_webp_path();
[18] Fix | Delete
}
[19] Fix | Delete
[20] Fix | Delete
return $this->webp_path;
[21] Fix | Delete
}
[22] Fix | Delete
[23] Fix | Delete
/**
[24] Fix | Delete
* @return string
[25] Fix | Delete
*/
[26] Fix | Delete
public function get_webp_rel_path() {
[27] Fix | Delete
if ( is_null( $this->webp_rel_path ) ) {
[28] Fix | Delete
$this->webp_rel_path = $this->prepare_webp_rel_path();
[29] Fix | Delete
}
[30] Fix | Delete
[31] Fix | Delete
return $this->webp_rel_path;
[32] Fix | Delete
}
[33] Fix | Delete
[34] Fix | Delete
/**
[35] Fix | Delete
* @return string
[36] Fix | Delete
*/
[37] Fix | Delete
public function get_webp_url() {
[38] Fix | Delete
if ( is_null( $this->webp_url ) ) {
[39] Fix | Delete
$this->webp_url = $this->prepare_webp_url();
[40] Fix | Delete
}
[41] Fix | Delete
[42] Fix | Delete
return $this->webp_url;
[43] Fix | Delete
}
[44] Fix | Delete
[45] Fix | Delete
private function prepare_webp_path() {
[46] Fix | Delete
return dirname( $this->get_upload_path() ) . '/smush-webp';
[47] Fix | Delete
}
[48] Fix | Delete
[49] Fix | Delete
private function prepare_webp_rel_path() {
[50] Fix | Delete
return dirname( $this->get_upload_rel_path() ) . '/smush-webp';
[51] Fix | Delete
}
[52] Fix | Delete
[53] Fix | Delete
private function prepare_webp_url() {
[54] Fix | Delete
return dirname( $this->get_upload_url() ) . '/smush-webp';
[55] Fix | Delete
}
[56] Fix | Delete
[57] Fix | Delete
protected function prepare_root_path() {
[58] Fix | Delete
return apply_filters( 'smush_webp_rules_root_path_base', parent::prepare_root_path() );
[59] Fix | Delete
}
[60] Fix | Delete
}
[61] Fix | Delete
[62] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function