PluginProbe
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF / trunk
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF vtrunk
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 / CustomFoldersDeprecatedTrait.php

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

45 lines 984 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\CustomFolders.
8 *
9 * @since 1.9.8
10 * @author Grégory Viguier
11 */
12 trait CustomFoldersDeprecatedTrait {
13
14 /**
15 * Get the original media's URL.
16 *
17 * @since 1.9
18 * @since 1.9.8 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__ . '()', '1.9.8', '( new \Imagify\Media\CustomFolders( $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 $row = $this->get_row();
37
38 if ( ! $row || empty( $row['path'] ) ) {
39 return false;
40 }
41
42 return \Imagify_Files_Scan::remove_placeholder( $row['path'], 'url' );
43 }
44 }
45