AnsPress_Cli::activate_addon( array $args, mixed $assoc_args )
Description #
Activate an addon.
OPTIONS
Parameters #
- $argsarray (Required) Arguments.
- $assoc_argsmixed (Required) Options.
Source #
File: lib/class-anspress-cli.php
public function activate_addon( $args, $assoc_args ) { if ( empty( $args[0] ) ) { return WP_CLI::error( __( 'You must pass a addon name i.e. free/avatar.php', 'anspress-question-answer' ) ); } $addon_name = $args[0]; $ret = ap_activate_addon( $args[0] ); if ( false === $ret ) { return WP_CLI::error( __( 'Unable to activate addon. May be its already active or wrong name passed.', 'anspress-question-answer' ) ); } WP_CLI::success( __( 'Successfully enabled addon', 'anspress-question-answer' ) ); }
Expand full source code Collapse full source code View on GitHub: lib/class-anspress-cli.php:78
Add your comment