| 1 |
<?php |
| 2 |
namespace Imagify\Bulk; |
| 3 |
|
| 4 |
/** |
| 5 |
* Interface to use for bulk. |
| 6 |
* |
| 7 |
* @since 1.9 |
| 8 |
*/ |
| 9 |
interface BulkInterface { |
| 10 |
/** |
| 11 |
* Get all unoptimized media ids. |
| 12 |
* |
| 13 |
* @since 1.9 |
| 14 |
* |
| 15 |
* @param int $optimization_level The optimization level. |
| 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. |
| 17 |
*/ |
| 18 |
public function get_unoptimized_media_ids( $optimization_level ); |
| 19 |
|
| 20 |
/** |
| 21 |
* Get ids of all optimized media without Next gen versions. |
| 22 |
* |
| 23 |
* @since 2.2 |
| 24 |
* |
| 25 |
* @param string $format Format we are looking for. (webp|avif). |
| 26 |
* |
| 27 |
* @return array { |
| 28 |
* @type array $ids A list of media IDs. |
| 29 |
* @type array $errors { |
| 30 |
* @type array $no_file_path A list of media IDs. |
| 31 |
* @type array $no_backup A list of media IDs. |
| 32 |
* } |
| 33 |
* } |
| 34 |
*/ |
| 35 |
public function get_optimized_media_ids_without_format( $format ); |
| 36 |
|
| 37 |
|
| 38 |
/** |
| 39 |
* Tell if there are optimized media without next-gen versions. |
| 40 |
* |
| 41 |
* @since 2.2 |
| 42 |
* |
| 43 |
* @return int The number of media. |
| 44 |
*/ |
| 45 |
public function has_optimized_media_without_nextgen(); |
| 46 |
|
| 47 |
/** |
| 48 |
* Get the context data. |
| 49 |
* |
| 50 |
* @since 1.9 |
| 51 |
* |
| 52 |
* @return array { |
| 53 |
* The formated data. |
| 54 |
* The array keys corresponds to the table cell classes: "imagify-cell-{key}". |
| 55 |
* |
| 56 |
* @type string $count-optimized Number of media optimized. |
| 57 |
* @type string $count-errors Number of media having an optimization error, with a link to the page listing the optimization errors. |
| 58 |
* @type string $optimized-size Optimized filesize. |
| 59 |
* @type string $original-size Original filesize. |
| 60 |
* } |
| 61 |
*/ |
| 62 |
public function get_context_data(); |
| 63 |
} |
| 64 |
|