HEX
Server: Apache
System: Linux web5.visualcom.es 4.18.0-477.21.1.lve.1.el8.x86_64 #1 SMP Tue Sep 5 23:08:35 UTC 2023 x86_64
User: ensaco.es (10019)
PHP: 8.3.32
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/ensaco.es/httpdocs/wp-content/themes/bb-theme/classes/class-fl-wpcli-command.php
<?php

/**
 * WP Cli commands for theme.
 */
class FLTheme_WPCLI_Command extends WP_CLI_Command {

	/**
	 * Deletes compiled css for Beaver Theme.
	 *
	 * ## EXAMPLES
	 *
	 * 1. wp beaver theme clearcache
	 *      - Clears and rebuilds the Beaver Theme CSS.
	*/
	public function clearcache( $args, $assoc_args ) {
		$compile = FLCustomizer::refresh_css();
		if ( ! is_wp_error( $compile ) ) {
			WP_CLI::success( 'Rebuilt the theme cache' );
		} else {
			WP_CLI::error( sprintf( 'Error while compiling Less: %s', $compile->get_error_message() ) );
		}
	}
}

WP_CLI::add_command( 'beaver theme', 'FLTheme_WPCLI_Command' );