CLI.php
30 lines
| 1 | <?php |
| 2 | /** |
| 3 | * ACF 6.8.0 feature port. |
| 4 | * |
| 5 | * @package wordpress/secure-custom-fields |
| 6 | */ |
| 7 | |
| 8 | // phpcs:disable -- Upstream ACF 6.8.0 feature-port files are kept close to source. |
| 9 | |
| 10 | namespace SCF\CLI; |
| 11 | |
| 12 | // Exit if accessed directly. |
| 13 | defined( 'ABSPATH' ) || exit; |
| 14 | |
| 15 | /** |
| 16 | * Bootstrapper for ACF WP-CLI commands. |
| 17 | */ |
| 18 | class CLI { |
| 19 | |
| 20 | /** |
| 21 | * Registers all free ACF WP-CLI commands. |
| 22 | * |
| 23 | * @since 6.8 |
| 24 | */ |
| 25 | public function __construct() { |
| 26 | \WP_CLI::add_command( 'acf json', JsonCommand::class ); |
| 27 | \WP_CLI::add_command( 'scf json', JsonCommand::class ); |
| 28 | } |
| 29 | } |
| 30 |