Exemplo n.º 1
0
 public function element_items()
 {
     $this->items = array('Notab' => array(array('name' => __('Title', WR_PBL), 'id' => 'prtbl_item_title', 'type' => 'text_field', 'class' => 'jsn-input-xxlarge-fluid', 'role' => 'title', 'std' => '', 'tooltip' => __('Title', WR_PBL)), array('name' => __('Description', WR_PBL), 'id' => 'prtbl_item_desc', 'type' => 'text_field', 'class' => 'jsn-input-xxlarge-fluid', 'std' => __('', WR_PBL), 'tooltip' => __('Description Tooltip', WR_PBL)), array('name' => __('Image', WR_PBL), 'id' => 'prtbl_item_image', 'type' => 'select_media', 'std' => '', 'class' => 'jsn-input-large-fluid', 'tooltip' => __('Image File', WR_PBL)), array('name' => __('Currency', WR_PBL), 'id' => 'prtbl_item_currency', 'type' => 'text_field', 'std' => __('', WR_PBL), 'class' => 'jsn-input-large-fluid', 'tooltip' => __('Currency', WR_PBL)), array('name' => __('Price', WR_PBL), 'id' => 'prtbl_item_price', 'type' => 'text_field', 'std' => __('', WR_PBL), 'class' => 'jsn-input-large-fluid wr_pb_price', 'tooltip' => __('Price', WR_PBL)), array('name' => __('Time Limits', WR_PBL), 'id' => 'prtbl_item_time', 'type' => 'text_field', 'std' => __('', WR_PBL), 'class' => 'jsn-input-large-fluid', 'tooltip' => __('Time Limits', WR_PBL)), array('name' => __('Button Text', WR_PBL), 'id' => 'prtbl_item_button_text', 'type' => 'text_field', 'class' => 'jsn-input-large-fluid wr-pb-limit-length', 'std' => __('Buy now', WR_PBL), 'tooltip' => __('Button Text', WR_PBL)), array('name' => __('Button Link', WR_PBL), 'id' => 'link_type', 'type' => 'select', 'std' => __('url', WR_PBL), 'options' => WR_Pb_Helper_Type::get_link_types(), 'tooltip' => __('Button Link', WR_PBL), 'has_depend' => '1'), array('name' => __('URL', WR_PBL), 'id' => 'button_type_url', 'type' => 'text_field', 'class' => 'jsn-input-xxlarge-fluid', 'std' => 'http://', 'tooltip' => __('URL', WR_PBL), 'dependency' => array('link_type', '=', 'url')), array('name' => __('Single Item', WR_PBL), 'id' => 'single_item', 'type' => 'type_group', 'std' => '', 'items' => WR_Pb_Helper_Type::get_single_item_button_bar('link_type', array('type' => 'items_list', 'options_type' => 'select', 'ul_wrap' => false))), array('name' => __('Open in', WR_PBL), 'id' => 'open_in', 'type' => 'select', 'std' => WR_Pb_Helper_Type::get_first_option(WR_Pb_Helper_Type::get_open_in_options()), 'options' => WR_Pb_Helper_Type::get_open_in_options(), 'dependency' => array('link_type', '!=', 'no_link')), array('id' => 'prtbl_item_attributes', 'type' => 'text_field', 'std' => '', 'input-type' => 'hidden', 'container_class' => 'hidden'), array('name' => __('Attributes', WR_PBL), 'id' => 'prtbl_attr', 'type' => 'group_table', 'class' => 'has_childsubmodal unsortable', 'shortcode' => ucfirst(__CLASS__), 'sub_item_type' => $this->config['has_subshortcode'], 'sub_items' => array(WR_Pricing_Table::get_option('max_domains', true), WR_Pricing_Table::get_option('storage', true), WR_Pricing_Table::get_option('ssl_support', true)), 'extract_title' => 'prtbl_item_attr_title'), array('name' => __('Featured', WR_PBL), 'id' => 'prtbl_item_feature', 'type' => 'radio', 'std' => 'no', 'options' => array('yes' => __('Yes', WR_PBL), 'no' => __('No', WR_PBL)), 'tooltip' => 'Featured')));
 }
Exemplo n.º 2
0
 /**
  * Get shortcode parameters for Pricing Option
  *
  * @param string $attribute     The ID of attribute
  * @param bool   $include_value Whether or not including Value parameter (true if call for WR_Item_Pricing_Table_Attr_Value)
  *
  * @return string
  */
 static function get_option($attribute, $include_value = false)
 {
     // get all Predefined Attributes
     $attributes = WR_Pricing_Table::$attributes;
     // get index of current Option/Attribute
     $idx = WR_Pricing_Table::$index = WR_Pricing_Table::$index % 3;
     $title = isset($attributes[$attribute]) ? isset($attributes[$attribute]['title']) ? $attributes[$attribute]['title'] : '' : '';
     $type = isset($attributes[$attribute]) ? isset($attributes[$attribute]['type']) ? $attributes[$attribute]['type'] : '' : '';
     if ($include_value) {
         $value = isset($attributes[$attribute]) ? isset($attributes[$attribute]['value'][$idx]) ? $attributes[$attribute]['value'][$idx] : '' : '';
     }
     $result = array('std' => '', 'prtbl_item_attr_id' => $attribute, 'prtbl_item_attr_title' => $title, 'prtbl_item_attr_type' => $type);
     if (!$include_value) {
         $result['prtbl_item_attr_desc'] = $title;
     } else {
         $result['prtbl_item_attr_value'] = $result['prtbl_item_attr_desc'] = $value;
     }
     return $result;
 }