jetpack
Last commit date
3rd-party
2 months ago
_inc
4 weeks ago
css
4 weeks ago
extensions
4 weeks ago
images
1 month ago
jetpack_vendor
4 weeks ago
json-endpoints
4 weeks ago
modules
4 weeks ago
sal
4 weeks ago
src
4 weeks ago
vendor
4 weeks ago
views
1 month ago
CHANGELOG.md
4 weeks ago
LICENSE.txt
5 months ago
SECURITY.md
2 years ago
class-jetpack-connection-status.php
2 years ago
class-jetpack-gallery-settings.php
6 months ago
class-jetpack-newsletter-dashboard-widget.php
6 months ago
class-jetpack-pre-connection-jitms.php
2 years ago
class-jetpack-stats-dashboard-widget.php
3 months ago
class-jetpack-xmlrpc-methods.php
6 months ago
class.frame-nonce-preview.php
6 months ago
class.jetpack-admin.php
1 month ago
class.jetpack-autoupdate.php
6 months ago
class.jetpack-cli.php
5 months ago
class.jetpack-client-server.php
2 years ago
class.jetpack-gutenberg.php
2 months ago
class.jetpack-heartbeat.php
3 months ago
class.jetpack-modules-list-table.php
6 months ago
class.jetpack-network-sites-list-table.php
6 months ago
class.jetpack-network.php
1 month ago
class.jetpack-plan.php
2 years ago
class.jetpack-post-images.php
2 months ago
class.jetpack-twitter-cards.php
3 months ago
class.jetpack-user-agent.php
2 years ago
class.jetpack.php
4 weeks ago
class.json-api-endpoints.php
1 month ago
class.json-api.php
5 months ago
class.photon.php
3 years ago
composer.json
4 weeks ago
enhanced-open-graph.php
3 months ago
functions.compat.php
3 months ago
functions.cookies.php
2 years ago
functions.global.php
1 month ago
functions.is-mobile.php
2 years ago
functions.opengraph.php
2 months ago
functions.photon.php
2 years ago
jetpack.php
4 weeks ago
json-api-config.php
3 years ago
json-endpoints.php
2 years ago
load-jetpack.php
2 months ago
locales.php
6 months ago
readme.txt
4 weeks ago
unauth-file-upload.php
6 months ago
uninstall.php
6 months ago
wpml-config.xml
3 years ago
class.photon.php
54 lines
| 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 | } |
| 54 |