Ajax
1 year ago
Dto
1 year ago
Exception
1 year ago
Interfaces
1 year ago
Task
1 year ago
AbstractJob.php
1 year ago
JobProvider.php
1 year ago
JobServiceProvider.php
1 year ago
ProcessLock.php
1 year ago
JobServiceProvider.php
26 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WPStaging\Framework\Job; |
| 4 | |
| 5 | use WPStaging\Framework\DI\FeatureServiceProvider; |
| 6 | use WPStaging\Framework\Job\Ajax\Status; |
| 7 | |
| 8 | class JobServiceProvider extends FeatureServiceProvider |
| 9 | { |
| 10 | protected function registerClasses() |
| 11 | { |
| 12 | // no-op |
| 13 | } |
| 14 | |
| 15 | protected function addHooks() |
| 16 | { |
| 17 | $this->enqueueAjaxListeners(); |
| 18 | } |
| 19 | |
| 20 | protected function enqueueAjaxListeners() |
| 21 | { |
| 22 | add_action('wp_ajax_wpstg--job--status', $this->container->callback(Status::class, 'ajaxProcess')); // phpcs:ignore WPStaging.Security.AuthorizationChecked |
| 23 | //add_action('wp_ajax_wpstg--job--cancel', $this->container->callback(Cancel::class, 'ajaxProcess')); // phpcs:ignore WPStaging.Security.AuthorizationChecked |
| 24 | } |
| 25 | } |
| 26 |