%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/pn/beta/64801_wp-content/plugins/mailpoet/lib/Newsletter/Shortcodes/Categories/
Upload File :
Create Path :
Current File : //var/www/pn/beta/64801_wp-content/plugins/mailpoet/lib/Newsletter/Shortcodes/Categories/Date.php

<?php

namespace MailPoet\Newsletter\Shortcodes\Categories;

use MailPoet\WP\Functions as WPFunctions;

class Date {
  static function process(
    $shortcode_details
  ) {
    $action_mapping = array(
      'd' => 'd',
      'dordinal' => 'dS',
      'dtext' => 'l',
      'm' => 'm',
      'mtext' => 'F',
      'y' => 'Y'
    );
    if(!empty($action_mapping[$shortcode_details['action']])) {
      return date_i18n($action_mapping[$shortcode_details['action']], WPFunctions::currentTime('timestamp'));
    }
    return ($shortcode_details['action'] === 'custom' && $shortcode_details['action_argument'] === 'format') ?
      date_i18n($shortcode_details['action_argument_value'], WPFunctions::currentTime('timestamp')) :
      false;
  }
}

Zerion Mini Shell 1.0