PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3
Jetpack – WP Security, Backup, Speed, & Growth v16.3
16.3 16.3-beta 16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 All 508 releases
← All changes | class.photon.php +53 -0 16.2-beta → 16.3 View file →
@@ -1,0 +1,53 @@
1 +<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
2 +/**
3 + * Class for photon functionality.
4 + *
5 + * @package automattic/jetpack
6 + * @deprecated 12.2 Use Automattic\Jetpack\Image_CDN\Image_CDN instead.
7 + */
8 +
9 +use Automattic\Jetpack\Image_CDN\Image_CDN;
10 +
11 +/**
12 + * Class Jetpack_Photon
13 + *
14 + * @deprecated 12.2 Use Automattic\Jetpack\Image_CDN\Image_CDN instead.
15 + */
16 +class Jetpack_Photon {
17 +
18 + /**
19 + * Forward all method calls to the Image_CDN class.
20 + *
21 + * @param string $name The name of the method.
22 + * @param array $arguments The arguments to pass to the method.
23 + *
24 + * @throws Exception If the method is not found.
25 + */
26 + public function __call( $name, $arguments ) {
27 + if ( method_exists( Image_CDN::class, $name ) ) {
28 + _deprecated_function( __CLASS__ . '::' . esc_html( $name ), 'jetpack-12.2', 'Automattic\Jetpack\Image_CDN\Image_CDN::' . esc_html( $name ) );
29 + return Image_CDN::instance()->$name( ...$arguments );
30 + } else {
31 + // Handle cases where the method is not found
32 + throw new Exception( sprintf( 'Undefined method: %s', esc_html( $name ) ) );
33 + }
34 + }
35 +
36 + /**
37 + * Forward all static method calls to the Image_CDN class.
38 + *
39 + * @param string $name The name of the method.
40 + * @param array $arguments The arguments to pass to the method.
41 + *
42 + * @throws Exception If the method is not found.
43 + */
44 + public static function __callStatic( $name, $arguments ) {
45 + if ( method_exists( Image_CDN::class, $name ) ) {
46 + _deprecated_function( __CLASS__ . '::' . esc_html( $name ), 'jetpack-12.2', 'Automattic\Jetpack\Image_CDN\Image_CDN::' . esc_html( $name ) );
47 + return Image_CDN::$name( ...$arguments );
48 + } else {
49 + // Handle cases where the method is not found
50 + throw new Exception( sprintf( 'Undefined static method: %s', esc_html( $name ) ) );
51 + }
52 + }
53 +}