PluginProbe
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF / 2.3.1
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF v2.3.1
2.3.4 2.3.3 2.3.2 2.3.1 2.3.0 2.2.9 2.2.8 trunk 1.10 1.3.3 1.3.4 1.3.5 1.3.5.1 1.3.5.2 1.3.6 1.3.6.1 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.5 All 103 releases
imagify / inc / deprecated / Traits / Media / NGGDeprecatedTrait.php

NGGDeprecatedTrait.php in Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF 2.3.1, at inc/deprecated/Traits/Media/NGGDeprecatedTrait.php

39 lines 848 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Imagify\Deprecated\Traits\Media;
3
4 defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' );
5
6 /**
7 * Trait containing deprecated methods of the class \Imagify\Media\NGG.
8 *
9 * @since
10 * @author Grégory Viguier
11 */
12 trait NGGDeprecatedTrait {
13
14 /**
15 * Get the original media's URL.
16 *
17 * @since 1.9
18 * @since Deprecated
19 * @access public
20 * @author Grégory Viguier
21 * @deprecated
22 *
23 * @return string|bool The file URL. False on failure.
24 */
25 public function get_original_url() {
26 _deprecated_function( get_class( $this ) . '::' . __FUNCTION__ . '()', '', '( new \Imagify\Media\NGG( $id ) )->get_fullsize_url()' );
27
28 if ( ! $this->is_valid() ) {
29 return false;
30 }
31
32 if ( $this->get_cdn() ) {
33 return $this->get_cdn()->get_file_url();
34 }
35
36 return ! empty( $this->image->imageURL ) ? $this->image->imageURL : false;
37 }
38 }
39