- Adds custom date format as a shortcode action's argument

- Updates shortcodes logic to allow action arguments other than
"default"
This commit is contained in:
Vlad
2017-01-09 09:05:24 -05:00
parent 497c2fb595
commit a3f2c32a6d
6 changed files with 30 additions and 15 deletions

View File

@@ -10,11 +10,15 @@ require_once(ABSPATH . 'wp-includes/pluggable.php');
class Subscriber {
static function process(
$action,
$default_value,
$action_argument,
$action_argument_value,
$newsletter,
$subscriber
) {
if($subscriber !== false && !is_object($subscriber)) return false;
$default_value = ($action_argument === 'default') ?
$action_argument_value :
'';
switch($action) {
case 'firstname':
return ($subscriber) ? $subscriber->first_name : $default_value;