Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/jetpack
File: class.photon.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
[0] Fix | Delete
/**
[1] Fix | Delete
* Class for photon functionality.
[2] Fix | Delete
*
[3] Fix | Delete
* @package automattic/jetpack
[4] Fix | Delete
* @deprecated 12.2 Use Automattic\Jetpack\Image_CDN\Image_CDN instead.
[5] Fix | Delete
*/
[6] Fix | Delete
[7] Fix | Delete
use Automattic\Jetpack\Image_CDN\Image_CDN;
[8] Fix | Delete
[9] Fix | Delete
/**
[10] Fix | Delete
* Class Jetpack_Photon
[11] Fix | Delete
*
[12] Fix | Delete
* @deprecated 12.2 Use Automattic\Jetpack\Image_CDN\Image_CDN instead.
[13] Fix | Delete
*/
[14] Fix | Delete
class Jetpack_Photon {
[15] Fix | Delete
[16] Fix | Delete
/**
[17] Fix | Delete
* Forward all method calls to the Image_CDN class.
[18] Fix | Delete
*
[19] Fix | Delete
* @param string $name The name of the method.
[20] Fix | Delete
* @param array $arguments The arguments to pass to the method.
[21] Fix | Delete
*
[22] Fix | Delete
* @throws Exception If the method is not found.
[23] Fix | Delete
*/
[24] Fix | Delete
public function __call( $name, $arguments ) {
[25] Fix | Delete
if ( method_exists( Image_CDN::class, $name ) ) {
[26] Fix | Delete
_deprecated_function( __CLASS__ . '::' . esc_html( $name ), 'jetpack-12.2', 'Automattic\Jetpack\Image_CDN\Image_CDN::' . esc_html( $name ) );
[27] Fix | Delete
return Image_CDN::instance()->$name( ...$arguments );
[28] Fix | Delete
} else {
[29] Fix | Delete
// Handle cases where the method is not found
[30] Fix | Delete
throw new Exception( sprintf( 'Undefined method: %s', esc_html( $name ) ) );
[31] Fix | Delete
}
[32] Fix | Delete
}
[33] Fix | Delete
[34] Fix | Delete
/**
[35] Fix | Delete
* Forward all static method calls to the Image_CDN class.
[36] Fix | Delete
*
[37] Fix | Delete
* @param string $name The name of the method.
[38] Fix | Delete
* @param array $arguments The arguments to pass to the method.
[39] Fix | Delete
*
[40] Fix | Delete
* @throws Exception If the method is not found.
[41] Fix | Delete
*/
[42] Fix | Delete
public static function __callStatic( $name, $arguments ) {
[43] Fix | Delete
if ( method_exists( Image_CDN::class, $name ) ) {
[44] Fix | Delete
_deprecated_function( __CLASS__ . '::' . esc_html( $name ), 'jetpack-12.2', 'Automattic\Jetpack\Image_CDN\Image_CDN::' . esc_html( $name ) );
[45] Fix | Delete
return Image_CDN::$name( ...$arguments );
[46] Fix | Delete
} else {
[47] Fix | Delete
// Handle cases where the method is not found
[48] Fix | Delete
throw new Exception( sprintf( 'Undefined static method: %s', esc_html( $name ) ) );
[49] Fix | Delete
}
[50] Fix | Delete
}
[51] Fix | Delete
}
[52] Fix | Delete
[53] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function