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
← All changes | classes/Bulk/Noop.php +20 -31 1.10 → trunk View file →
@@ -1,23 +1,17 @@
1 1 <?php
2 2 namespace Imagify\Bulk;
3 3
4 -defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' );
5 -
6 4 /**
7 5 * Falback class for bulk.
8 6 *
9 - * @since 1.9
10 - * @author Grégory Viguier
7 + * @since 1.9
11 8 */
12 -class Noop implements BulkInterface {
13 -
9 +class Noop extends AbstractBulk {
14 10 /**
15 11 * Get all unoptimized media ids.
16 12 *
17 - * @since 1.9
18 - * @access public
19 - * @author Grégory Viguier
13 + * @since 1.9
20 14 *
21 15 * @param int $optimization_level The optimization level.
22 16 * @return array A list of unoptimized media. Array keys are media IDs prefixed with an underscore character, array values are the main file’s URL.
23 17 */
@@ -25,15 +19,25 @@
25 19 return [];
26 20 }
27 21
28 22 /**
29 - * Get ids of all optimized media without WebP versions.
23 + * Get all optimized media ids that can be restored.
30 24 *
31 - * @since 1.9
32 - * @since 1.9.5 The method doesn't return the IDs directly anymore.
33 - * @access public
34 - * @author Grégory Viguier
25 + * @since 2.3
35 26 *
27 + * @return array A list of optimized media IDs with backup files available.
28 + */
29 + public function get_optimized_media_ids(): array {
30 + return [];
31 + }
32 +
33 + /**
34 + * * Get ids of all optimized media without Next gen versions.
35 + *
36 + * @since 2.2
37 + *
38 + * @param string $format Format we are looking for. (webp|avif).
39 + *
36 40 * @return array {
37 41 * @type array $ids A list of media IDs.
38 42 * @type array $errors {
39 43 * @type array $no_file_path A list of media IDs.
@@ -40,9 +44,9 @@
40 44 * @type array $no_backup A list of media IDs.
41 45 * }
42 46 * }
43 47 */
44 - public function get_optimized_media_ids_without_webp() {
48 + public function get_optimized_media_ids_without_format( $format ) {
45 49 return [
46 50 'ids' => [],
47 51 'errors' => [
48 52 'no_file_path' => [],
@@ -51,26 +55,11 @@
51 55 ];
52 56 }
53 57
54 58 /**
55 - * Tell if there are optimized media without WebP versions.
56 - *
57 - * @since 1.9
58 - * @access public
59 - * @author Grégory Viguier
60 - *
61 - * @return int The number of media.
62 - */
63 - public function has_optimized_media_without_webp() {
64 - return 0;
65 - }
66 -
67 - /**
68 59 * Get the context data.
69 60 *
70 - * @since 1.9
71 - * @access public
72 - * @author Grégory Viguier
61 + * @since 1.9
73 62 *
74 63 * @return array {
75 64 * The formated data.
76 65 *