PluginProbe ʕ •ᴥ•ʔ
Robin Image Optimizer – Unlimited Image Optimization, WebP & AVIF / trunk
Robin Image Optimizer – Unlimited Image Optimization, WebP & AVIF vtrunk
2.0.5 trunk 1.3.7 1.4.0 1.4.1 1.4.2 1.4.6 1.5.0 1.5.3 1.5.6 1.5.8 1.6.5 1.6.6 1.6.9 1.7.0 1.7.4 1.8.1 1.8.2 1.9.0 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4
robin-image-optimizer / includes / classes / processing / class-rio-processing.php
robin-image-optimizer / includes / classes / processing Last commit date
class-rio-folder-processing.php 5 months ago class-rio-media-processing-avif.php 3 months ago class-rio-media-processing-webp.php 3 months ago class-rio-media-processing.php 3 months ago class-rio-nextgen-processing.php 5 months ago class-rio-processing.php 5 months ago
class-rio-processing.php
68 lines
1 <?php
2
3 use WBCR\Factory_Processing_759\WP_Background_Process;
4
5 // Exit if accessed directly
6 if ( ! defined( 'ABSPATH' ) ) {
7 exit;
8 }
9
10 /**
11 * Класс для работы оптимизации в фоне
12 *
13 * @version 1.0
14 */
15 abstract class WRIO_Processing extends WP_Background_Process {
16
17 /**
18 * @var string
19 */
20 protected $prefix = 'wrio';
21
22 /**
23 * @var string
24 */
25 protected $action = 'optimize_process';
26
27 /**
28 * @var string
29 */
30 public $scope;
31
32 /**
33 * Processing constructor.
34 *
35 * @param $scope
36 */
37 public function __construct( $scope ) {
38 $this->scope = $scope;
39 $this->action = "{$this->action}_{$scope}";
40 parent::__construct();
41 }
42
43 abstract public function push_items();
44
45 /**
46 * Fire before start handle the tasks
47 */
48 protected function handle_before() {
49 WRIO_Plugin::app()->logger->info( 'START auto optimize process.' );
50 }
51
52 /**
53 * Fire after end handle the tasks
54 */
55 protected function handle_after() {
56 WRIO_Plugin::app()->logger->info( 'END auto optimize process.' );
57 }
58
59 /**
60 * Fire after complete handle
61 *
62 * @return void
63 */
64 protected function handle_after_complete() {
65 WRIO_Plugin::app()->updatePopulateOption( 'process_running', false );
66 }
67 }
68