-
Notifications
You must be signed in to change notification settings - Fork 0
/
wpcampus-slide32.php
40 lines (39 loc) · 1014 Bytes
/
wpcampus-slide32.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
/**
* Plugin Name: wpcampus
* Plugin URI: https://gilzow.com/wpcampus
* Description: Greet WPCampus attendees
* Author: Paul Gilzow
* Author URI: https://gilzow.com/
* Text Domain: wpcampus
* Domain Path: /languages
* Version: 0.1.0
*
* @package WPCAMPUS
*/
if ( ! defined('WP_CLI') ) {
return;
}
/**
* Welcomes a user to WPCampus 2023
*
* ## OPTIONS
* <name>
* : Name of the person to greet
*
* --subject=<subject>
* : What topic sessions interests this person
*
* ## EXAMPLES
*
* # Welcome a user
* $ wp wpcampus Paul --subject=InfoSec
* Welcome to WPCampus, Paul!!!
* You are interested in sessions on InfoSec.
*/
WP_CLI::add_command('wpcampus',function ($args, $assoc_args){
printf("Welcome to WPCampus%s!!!" . PHP_EOL, (isset($args[0])) ? ", ${args[0]}" : '');
if(isset($assoc_args['subject'])) {
echo "You are interested in sessions on ${assoc_args['subject']}.", PHP_EOL;
}
});