DuplicatorServiceProvider.php
21 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WPStaging\Duplicator; |
| 4 | |
| 5 | use WPStaging\Duplicator\Ajax\MemoryExhaust; |
| 6 | use WPStaging\Framework\DI\ServiceProvider; |
| 7 | |
| 8 | /** |
| 9 | * Use this class to register common classes and hooks used by backup and cloning process |
| 10 | */ |
| 11 | class DuplicatorServiceProvider extends ServiceProvider |
| 12 | { |
| 13 | /** |
| 14 | * @return void |
| 15 | */ |
| 16 | protected function addHooks() |
| 17 | { |
| 18 | add_action('wp_ajax_wpstg--detect-memory-exhaust', $this->container->callback(MemoryExhaust::class, 'ajaxResponse')); // phpcs:ignore WPStaging.Security.AuthorizationChecked |
| 19 | } |
| 20 | } |
| 21 |