@@ -4,9 +4,9 @@ |
||
| 4 | 4 | </ul> |
| 5 | 5 | <div id="espresso_event_type-all" class="tabs-panel"> |
| 6 | 6 | <?php |
| 7 | - $name = 'tax_input[espresso_event_type]'; |
|
| 8 | - echo "<input type='hidden' name='{$name}[]' value='0' />"; // Allows for an empty term set to be sent. 0 is an invalid Term ID and will be ignored by empty() checks. |
|
| 9 | - ?> |
|
| 7 | + $name = 'tax_input[espresso_event_type]'; |
|
| 8 | + echo "<input type='hidden' name='{$name}[]' value='0' />"; // Allows for an empty term set to be sent. 0 is an invalid Term ID and will be ignored by empty() checks. |
|
| 9 | + ?> |
|
| 10 | 10 | <ul id="espresso_event_typechecklist" data-wp-lists="list:espresso_event_type" class="categorychecklist form-no-clear"> |
| 11 | 11 | <?php echo $radio_list; ?> |
| 12 | 12 | </ul> |
@@ -1,6 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
| 2 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
| 3 | 3 | exit('NO direct script access allowed'); |
| 4 | +} |
|
| 4 | 5 | |
| 5 | 6 | /** |
| 6 | 7 | * Event Espresso |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
| 2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
| 3 | 3 | exit('NO direct script access allowed'); |
| 4 | 4 | |
| 5 | 5 | /** |
@@ -32,15 +32,15 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | |
| 34 | 34 | |
| 35 | - public function __construct( $routing = TRUE ) { |
|
| 36 | - parent::__construct( $routing ); |
|
| 37 | - define( 'EE_ABOUT_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'about/templates/' ); |
|
| 35 | + public function __construct($routing = TRUE) { |
|
| 36 | + parent::__construct($routing); |
|
| 37 | + define('EE_ABOUT_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND.'about/templates/'); |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | |
| 41 | 41 | |
| 42 | 42 | protected function _extend_page_config() { |
| 43 | - $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'about'; |
|
| 43 | + $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND.'about'; |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | protected function _set_page_routes() { |
@@ -89,11 +89,11 @@ discard block |
||
| 89 | 89 | protected function _whats_new() { |
| 90 | 90 | $steps = EE_Maintenance_Mode::instance()->level() != EE_Maintenance_Mode::level_2_complete_maintenance ? $this->_get_started_steps() : FALSE; |
| 91 | 91 | $steps = $steps !== FALSE ? $steps : ''; |
| 92 | - $this->_admin_page_title = sprintf( __('Welcome to Event Espresso %s', 'event_espresso'), EVENT_ESPRESSO_VERSION ); |
|
| 92 | + $this->_admin_page_title = sprintf(__('Welcome to Event Espresso %s', 'event_espresso'), EVENT_ESPRESSO_VERSION); |
|
| 93 | 93 | $settings_message = $steps; |
| 94 | - $this->_template_args['admin_page_subtitle'] = __('Thank you for choosing Event Espresso, the most powerful Event Management plugin for WordPress.', 'event_espresso'). $settings_message ; |
|
| 95 | - $template = is_readable(EE_ABOUT_CAF_TEMPLATE_PATH . 'whats_new.template.php') ? EE_ABOUT_CAF_TEMPLATE_PATH . 'whats_new.template.php' : EE_ABOUT_TEMPLATE_PATH . 'whats_new.template.php'; |
|
| 96 | - $this->_template_args['about_admin_page_content'] = EEH_Template::display_template( $template, $this->_template_args, TRUE ); |
|
| 94 | + $this->_template_args['admin_page_subtitle'] = __('Thank you for choosing Event Espresso, the most powerful Event Management plugin for WordPress.', 'event_espresso').$settings_message; |
|
| 95 | + $template = is_readable(EE_ABOUT_CAF_TEMPLATE_PATH.'whats_new.template.php') ? EE_ABOUT_CAF_TEMPLATE_PATH . 'whats_new.template.php' : EE_ABOUT_TEMPLATE_PATH.'whats_new.template.php'; |
|
| 96 | + $this->_template_args['about_admin_page_content'] = EEH_Template::display_template($template, $this->_template_args, TRUE); |
|
| 97 | 97 | $this->display_about_admin_page(); |
| 98 | 98 | } |
| 99 | 99 | |
@@ -101,16 +101,16 @@ discard block |
||
| 101 | 101 | protected function _overview() { |
| 102 | 102 | $this->_admin_page_title = __('About Event Espresso', 'event_espresso'); |
| 103 | 103 | $this->_template_args['admin_page_subtitle'] = __('Thank you for choosing Event Espresso, the most powerful Event Management plugin for WordPress.', 'event_espresso'); |
| 104 | - $template = is_readable(EE_ABOUT_CAF_TEMPLATE_PATH . 'ee4-overview.template.php') ? EE_ABOUT_CAF_TEMPLATE_PATH . 'ee4-overview.template.php' : EE_ABOUT_TEMPLATE_PATH . 'ee4-overview.template.php'; |
|
| 105 | - $this->_template_args['about_admin_page_content'] = EEH_Template::display_template( $template, $this->_template_args, TRUE ); |
|
| 104 | + $template = is_readable(EE_ABOUT_CAF_TEMPLATE_PATH.'ee4-overview.template.php') ? EE_ABOUT_CAF_TEMPLATE_PATH . 'ee4-overview.template.php' : EE_ABOUT_TEMPLATE_PATH.'ee4-overview.template.php'; |
|
| 105 | + $this->_template_args['about_admin_page_content'] = EEH_Template::display_template($template, $this->_template_args, TRUE); |
|
| 106 | 106 | $this->display_about_admin_page(); |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | protected function _credits() { |
| 110 | 110 | // $this->_template_args['admin_page_title'] = sprintf( __('Welcome to Event Espresso %s', 'event_espresso'), EVENT_ESPRESSO_VERSION ); |
| 111 | 111 | $this->_template_args['admin_page_subtitle'] = __('Thank you for choosing Event Espresso, the most powerful Event Management plugin for WordPress.', 'event_espresso'); |
| 112 | - $template = EE_ABOUT_TEMPLATE_PATH . 'credits.template.php'; |
|
| 113 | - $this->_template_args['about_admin_page_content'] = EEH_Template::display_template( $template, $this->_template_args, TRUE ); |
|
| 112 | + $template = EE_ABOUT_TEMPLATE_PATH.'credits.template.php'; |
|
| 113 | + $this->_template_args['about_admin_page_content'] = EEH_Template::display_template($template, $this->_template_args, TRUE); |
|
| 114 | 114 | $this->display_about_admin_page(); |
| 115 | 115 | } |
| 116 | 116 | } |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
| 2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
| 3 | 3 | exit('NO direct script access allowed'); |
| 4 | 4 | |
| 5 | 5 | /** |
@@ -1,6 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
| 2 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
| 3 | 3 | exit('NO direct script access allowed'); |
| 4 | +} |
|
| 4 | 5 | |
| 5 | 6 | /** |
| 6 | 7 | * Event Espresso |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
| 2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
| 3 | 3 | exit('NO direct script access allowed'); |
| 4 | 4 | |
| 5 | 5 | /** |
@@ -1,6 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
| 2 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
| 3 | 3 | exit('NO direct script access allowed'); |
| 4 | +} |
|
| 4 | 5 | |
| 5 | 6 | /** |
| 6 | 7 | * Event Espresso |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
| 2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
| 3 | 3 | exit('NO direct script access allowed'); |
| 4 | 4 | |
| 5 | 5 | /** |
@@ -1,6 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
| 2 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
| 3 | 3 | exit('NO direct script access allowed'); |
| 4 | +} |
|
| 4 | 5 | |
| 5 | 6 | /** |
| 6 | 7 | * Event Espresso |
@@ -1,4 +1,6 @@ |
||
| 1 | -<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed'); |
|
| 1 | +<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
| 2 | + exit('No direct script access allowed'); |
|
| 3 | +} |
|
| 2 | 4 | /** |
| 3 | 5 | * Event Espresso |
| 4 | 6 | * |
@@ -103,40 +103,40 @@ discard block |
||
| 103 | 103 | * @param string $timezone string representing the timezone we want to set for returned Date Time Strings (and any incoming timezone data that gets saved). Note this just sends the timezone info to the date time model field objects. Default is NULL (and will be assumed using the set timezone in the 'timezone_string' wp option) |
| 104 | 104 | * @return \EEM_Line_Item |
| 105 | 105 | */ |
| 106 | - protected function __construct( $timezone ) { |
|
| 107 | - $this->singular_item = __('Line Item','event_espresso'); |
|
| 108 | - $this->plural_item = __('Line Items','event_espresso'); |
|
| 106 | + protected function __construct($timezone) { |
|
| 107 | + $this->singular_item = __('Line Item', 'event_espresso'); |
|
| 108 | + $this->plural_item = __('Line Items', 'event_espresso'); |
|
| 109 | 109 | |
| 110 | 110 | $this->_tables = array( |
| 111 | - 'Line_Item'=>new EE_Primary_Table('esp_line_item','LIN_ID') |
|
| 111 | + 'Line_Item'=>new EE_Primary_Table('esp_line_item', 'LIN_ID') |
|
| 112 | 112 | ); |
| 113 | - $line_items_can_be_for = array('Ticket','Price'); |
|
| 113 | + $line_items_can_be_for = array('Ticket', 'Price'); |
|
| 114 | 114 | $this->_fields = array( |
| 115 | 115 | 'Line_Item' => array( |
| 116 | - 'LIN_ID' => new EE_Primary_Key_Int_Field( 'LIN_ID', __( "ID", "event_espresso" ) ), |
|
| 117 | - 'LIN_code' => new EE_Slug_Field( 'LIN_code', __( "Code for index into Cart", "event_espresso" ), TRUE ), |
|
| 118 | - 'TXN_ID' => new EE_Foreign_Key_Int_Field( 'TXN_ID', __( "Transaction ID", "event_espresso" ), TRUE, NULL, 'Transaction' ), |
|
| 119 | - 'LIN_name' => new EE_Full_HTML_Field( 'LIN_name', __( "Line Item Name", "event_espresso" ), FALSE, '' ), |
|
| 120 | - 'LIN_desc' => new EE_Full_HTML_Field( 'LIN_desc', __( "Line Item Description", "event_espresso" ), TRUE ), |
|
| 121 | - 'LIN_unit_price' => new EE_Money_Field( 'LIN_unit_price', __( "Unit Price", "event_espresso" ), FALSE, 0 ), |
|
| 122 | - 'LIN_percent' => new EE_Float_Field( 'LIN_percent', __( "Percent", "event_espresso" ), FALSE, 0 ), |
|
| 123 | - 'LIN_is_taxable' => new EE_Boolean_Field( 'LIN_is_taxable', __( "Taxable", "event_espresso" ), FALSE, FALSE ), |
|
| 124 | - 'LIN_order' => new EE_Integer_Field( 'LIN_order', __( "Order of Application towards total of parent", "event_espresso" ), FALSE, 1 ), |
|
| 125 | - 'LIN_total' => new EE_Money_Field( 'LIN_total', __( "Total (unit price x quantity)", "event_espresso" ), FALSE, 0 ), |
|
| 126 | - 'LIN_quantity' => new EE_Integer_Field( 'LIN_quantity', __( "Quantity", "event_espresso" ), TRUE, NULL ), |
|
| 127 | - 'LIN_parent' => new EE_Integer_Field( 'LIN_parent', __( "Parent ID (this item goes towards that Line Item's total)", "event_espresso" ), TRUE, NULL ), |
|
| 128 | - 'LIN_type' => new EE_Enum_Text_Field( 'LIN_type', __( "Type", "event_espresso" ), FALSE, 'line-item', array( |
|
| 116 | + 'LIN_ID' => new EE_Primary_Key_Int_Field('LIN_ID', __("ID", "event_espresso")), |
|
| 117 | + 'LIN_code' => new EE_Slug_Field('LIN_code', __("Code for index into Cart", "event_espresso"), TRUE), |
|
| 118 | + 'TXN_ID' => new EE_Foreign_Key_Int_Field('TXN_ID', __("Transaction ID", "event_espresso"), TRUE, NULL, 'Transaction'), |
|
| 119 | + 'LIN_name' => new EE_Full_HTML_Field('LIN_name', __("Line Item Name", "event_espresso"), FALSE, ''), |
|
| 120 | + 'LIN_desc' => new EE_Full_HTML_Field('LIN_desc', __("Line Item Description", "event_espresso"), TRUE), |
|
| 121 | + 'LIN_unit_price' => new EE_Money_Field('LIN_unit_price', __("Unit Price", "event_espresso"), FALSE, 0), |
|
| 122 | + 'LIN_percent' => new EE_Float_Field('LIN_percent', __("Percent", "event_espresso"), FALSE, 0), |
|
| 123 | + 'LIN_is_taxable' => new EE_Boolean_Field('LIN_is_taxable', __("Taxable", "event_espresso"), FALSE, FALSE), |
|
| 124 | + 'LIN_order' => new EE_Integer_Field('LIN_order', __("Order of Application towards total of parent", "event_espresso"), FALSE, 1), |
|
| 125 | + 'LIN_total' => new EE_Money_Field('LIN_total', __("Total (unit price x quantity)", "event_espresso"), FALSE, 0), |
|
| 126 | + 'LIN_quantity' => new EE_Integer_Field('LIN_quantity', __("Quantity", "event_espresso"), TRUE, NULL), |
|
| 127 | + 'LIN_parent' => new EE_Integer_Field('LIN_parent', __("Parent ID (this item goes towards that Line Item's total)", "event_espresso"), TRUE, NULL), |
|
| 128 | + 'LIN_type' => new EE_Enum_Text_Field('LIN_type', __("Type", "event_espresso"), FALSE, 'line-item', array( |
|
| 129 | 129 | self::type_line_item => __("Line Item", "event_espresso"), |
| 130 | 130 | self::type_sub_line_item => __("Sub-Item", "event_espresso"), |
| 131 | 131 | self::type_sub_total => __("Subtotal", "event_espresso"), |
| 132 | 132 | self::type_tax_sub_total => __("Tax Subtotal", "event_espresso"), |
| 133 | 133 | self::type_tax => __("Tax", "event_espresso"), |
| 134 | 134 | self::type_total => __("Total", "event_espresso"), |
| 135 | - self::type_cancellation => __( 'Cancellation', 'event_espresso' ) |
|
| 135 | + self::type_cancellation => __('Cancellation', 'event_espresso') |
|
| 136 | 136 | ) |
| 137 | 137 | ), |
| 138 | - 'OBJ_ID' => new EE_Foreign_Key_Int_Field( 'OBJ_ID', __( 'ID of Item purchased.', 'event_espresso' ), TRUE, NULL, $line_items_can_be_for ), |
|
| 139 | - 'OBJ_type' =>new EE_Any_Foreign_Model_Name_Field( 'OBJ_type', __( "Model Name this Line Item is for", "event_espresso" ), TRUE, NULL, $line_items_can_be_for ), |
|
| 138 | + 'OBJ_ID' => new EE_Foreign_Key_Int_Field('OBJ_ID', __('ID of Item purchased.', 'event_espresso'), TRUE, NULL, $line_items_can_be_for), |
|
| 139 | + 'OBJ_type' =>new EE_Any_Foreign_Model_Name_Field('OBJ_type', __("Model Name this Line Item is for", "event_espresso"), TRUE, NULL, $line_items_can_be_for), |
|
| 140 | 140 | ) |
| 141 | 141 | ); |
| 142 | 142 | $this->_model_relations = array( |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | 'Price' =>new EE_Belongs_To_Any_Relation(), |
| 146 | 146 | ); |
| 147 | 147 | $this->_model_chain_to_wp_user = 'Transaction.Registration.Event'; |
| 148 | - parent::__construct( $timezone ); |
|
| 148 | + parent::__construct($timezone); |
|
| 149 | 149 | } |
| 150 | 150 | |
| 151 | 151 | |
@@ -156,9 +156,9 @@ discard block |
||
| 156 | 156 | * @param EE_Transaction|int $transaction |
| 157 | 157 | * @return EE_Line_Item[] |
| 158 | 158 | */ |
| 159 | - public function get_all_of_type_for_transaction( $line_item_type, $transaction ){ |
|
| 160 | - $transaction = EEM_Transaction::instance()->ensure_is_ID( $transaction ); |
|
| 161 | - return $this->get_all( array( array( |
|
| 159 | + public function get_all_of_type_for_transaction($line_item_type, $transaction) { |
|
| 160 | + $transaction = EEM_Transaction::instance()->ensure_is_ID($transaction); |
|
| 161 | + return $this->get_all(array(array( |
|
| 162 | 162 | 'LIN_type' => $line_item_type, |
| 163 | 163 | 'TXN_ID' => $transaction |
| 164 | 164 | ))); |
@@ -169,14 +169,14 @@ discard block |
||
| 169 | 169 | * (eg shipping, promotions, and miscellaneous other stuff should probably fit in this category) |
| 170 | 170 | * @param EE_Transaction|int $transaction |
| 171 | 171 | */ |
| 172 | - public function get_all_non_ticket_line_items_for_transaction( $transaction ) { |
|
| 173 | - $transaction = EEM_Transaction::instance()->ensure_is_ID( $transaction ); |
|
| 174 | - return $this->get_all( array( array( |
|
| 172 | + public function get_all_non_ticket_line_items_for_transaction($transaction) { |
|
| 173 | + $transaction = EEM_Transaction::instance()->ensure_is_ID($transaction); |
|
| 174 | + return $this->get_all(array(array( |
|
| 175 | 175 | 'LIN_type' => self::type_line_item, |
| 176 | 176 | 'TXN_ID' => $transaction, |
| 177 | 177 | 'OR' => array( |
| 178 | - 'OBJ_type*notticket' => array( '!=', 'Ticket'), |
|
| 179 | - 'OBJ_type*null' => array( 'IS_NULL' )) |
|
| 178 | + 'OBJ_type*notticket' => array('!=', 'Ticket'), |
|
| 179 | + 'OBJ_type*null' => array('IS_NULL')) |
|
| 180 | 180 | ))); |
| 181 | 181 | } |
| 182 | 182 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
| 2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
| 3 | 3 | exit('NO direct script access allowed'); |
| 4 | 4 | |
| 5 | 5 | /** |
@@ -1,6 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
| 2 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
| 3 | 3 | exit('NO direct script access allowed'); |
| 4 | +} |
|
| 4 | 5 | |
| 5 | 6 | /** |
| 6 | 7 | * Event Espresso |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
| 2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
| 3 | 3 | exit('NO direct script access allowed'); |
| 4 | 4 | |
| 5 | 5 | /** |
@@ -1,6 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
| 2 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
| 3 | 3 | exit('NO direct script access allowed'); |
| 4 | +} |
|
| 4 | 5 | |
| 5 | 6 | /** |
| 6 | 7 | * Event Espresso |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
| 2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
| 3 | 3 | exit('NO direct script access allowed'); |
| 4 | 4 | |
| 5 | 5 | /** |
@@ -1,6 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
| 2 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
| 3 | 3 | exit('NO direct script access allowed'); |
| 4 | +} |
|
| 4 | 5 | |
| 5 | 6 | /** |
| 6 | 7 | * Event Espresso |