<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

if ( defined( 'WP_CLI' ) && WP_CLI ) {

    /**
     * WP-CLI commands for Softech Addons for Elementor.
     */
    class SITS_CLI {

        /**
         * Clear Softech Addons plugin caches.
         *
         * ## EXAMPLES
         *
         *     wp sits clear-caches
         */
        public function clear_caches() {

            /**
             * Allow the plugin to clear its own caches safely.
             */
            do_action( 'sits_clear_plugin_cache' );

            \WP_CLI::success( 'Softech Addons caches cleared.' );
        }
    }

    \WP_CLI::add_command( 'sits', 'SITS_CLI' );
}
