PluginProbe
Cookiebot by Usercentrics – Automatic Cookie Banner for GDPR/CCPA & Google Consent Mode / 4.7.4
Cookiebot by Usercentrics – Automatic Cookie Banner for GDPR/CCPA & Google Consent Mode v4.7.4
4.7.4 4.7.5 4.7.3 4.7.2 4.7.1 trunk 2.3.0 2.4.0 2.4.1 2.4.2 2.5.0 3.0.0 3.0.1 3.1.0 3.10.0 3.10.1 3.11.1 3.11.2 3.11.3 3.2.0 3.3.0 3.3.1 3.4.0 3.4.1 3.4.2 All 95 releases
← All changes | src/cli/Cookiebot_CLI_Command.php +6 -9 4.7.2 → 4.7.4 View file →
@@ -38,14 +38,14 @@
38 38 /**
39 39 * Validate and return the requested output format, or emit an error and return null.
40 40 *
41 41 * @param array $assoc_args WP-CLI named arguments.
42 - * @param string $default Default format when not specified.
42 + * @param string $default_format Default format when not specified.
43 43 * @return string|null One of table|json|yaml|csv, or null on invalid input.
44 44 */
45 - private function get_format( $assoc_args, $default = 'table' ) {
45 + private function get_format( $assoc_args, $default_format = 'table' ) {
46 46 $allowed = array( 'table', 'json', 'yaml', 'csv' );
47 - $format = isset( $assoc_args['format'] ) ? $assoc_args['format'] : $default;
47 + $format = isset( $assoc_args['format'] ) ? $assoc_args['format'] : $default_format;
48 48 if ( ! in_array( $format, $allowed, true ) ) {
49 49 $this->output->error( sprintf( 'Invalid --format "%s". Allowed: table, json, yaml, csv.', $format ) );
50 50 return null;
51 51 }
@@ -229,12 +229,11 @@
229 229 * wp cookiebot set-cbid AbCdEfGhI
230 230 * wp cookiebot set-cbid AbCdEfGhIjKlMn
231 231 *
232 232 * @subcommand set-cbid
233 - * @param array $args Positional arguments.
234 - * @param array $assoc_args Named arguments.
233 + * @param array $args Positional arguments.
235 234 */
236 - public function set_cbid( $args, $assoc_args ) {
235 + public function set_cbid( $args ) {
237 236 if ( empty( $args[0] ) ) {
238 237 $this->output->error( 'CBID is required. Usage: wp cookiebot set-cbid <cbid>' );
239 238 return;
240 239 }
@@ -312,12 +311,10 @@
312 311 *
313 312 * wp cookiebot install-ppg
314 313 *
315 314 * @subcommand install-ppg
316 - * @param array $args Positional arguments.
317 - * @param array $assoc_args Named arguments.
318 315 */
319 - public function install_ppg( $args, $assoc_args ) {
316 + public function install_ppg() {
320 317 $ability = $this->get_ability( 'cookiebot/install-ppg' );
321 318 if ( ! $ability ) {
322 319 return;
323 320 }