Files
piratepoet/lib/Newsletter/Shortcodes/Categories/Date.php
Vlad da7615ba4c - Removes redundant shortcode description
- Implements shortcode processing for custom fields
2016-05-31 11:03:04 -04:00

17 lines
474 B
PHP

<?php
namespace MailPoet\Newsletter\Shortcodes\Categories;
class Date {
static function process($action) {
$date = new \DateTime('now');
$actions = array(
'd' => $date->format('d'),
'dordinal' => $date->format('dS'),
'dtext' => $date->format('D'),
'm' => $date->format('m'),
'mtext' => $date->format('F'),
'y' => $date->format('Y')
);
return (isset($actions[$action])) ? $actions[$action] : false;
}
}