/**
  * override convert function to update backend text
  */
 function convert($post, $thumbnail = '', $excerpt = false, $singular = false)
 {
     $result = parent::convert($post, $thumbnail);
     if ($result) {
         $currency = ae_currency_sign(false);
         $align = ae_currency_align(false);
         if ($align) {
             $result->backend_text = sprintf(__("(%s)%s for %d days", 'aecore-class-ae-package-backend'), $currency, $result->et_price, $result->et_duration);
         } else {
             $result->backend_text = sprintf(__("%s(%s) for %d days", 'aecore-class-ae-package-backend'), $result->et_price, $currency, $result->et_duration);
         }
     }
     return $result;
 }
 /**
  * construct instance, set post_type and meta data
  * @since 1.0
  */
 function __construct($post_type = '', $meta = array(), $localize = array())
 {
     $this->post_type = $post_type ? $post_type : 'pack';
     $this->meta = !empty($meta) ? $meta : array('qa_badge_point', 'qa_badge_color', 'option_name');
     $this->localize = $localize;
     /**
      * add option name to control which option list post handle
      */
     $this->meta[] = 'option_name';
     /**
      * setup convert field of post data
      */
     $this->convert = array('post_title', 'post_name', 'post_content', 'ID', 'post_type', 'menu_order', 'post_status');
     self::$instance = $this;
 }