@@ -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 | /** |
@@ -35,15 +35,15 @@ discard block |
||
35 | 35 | */ |
36 | 36 | public function __construct() { |
37 | 37 | //define some page related constants |
38 | - define( 'EE_PAYMENTS_PG_SLUG', 'espresso_payment_settings' ); |
|
39 | - define( 'EE_PAYMENTS_ADMIN_URL', admin_url( 'admin.php?page=' . EE_PAYMENTS_PG_SLUG )); |
|
40 | - define( 'EE_PAYMENTS_ADMIN', EE_ADMIN_PAGES . 'payments' . DS ); |
|
41 | - define( 'EE_PAYMENTS_TEMPLATE_PATH', EE_PAYMENTS_ADMIN . 'templates' . DS ); |
|
42 | - define( 'EE_PAYMENTS_ASSETS_URL', EE_ADMIN_PAGES_URL . 'payments/assets/' ); |
|
38 | + define('EE_PAYMENTS_PG_SLUG', 'espresso_payment_settings'); |
|
39 | + define('EE_PAYMENTS_ADMIN_URL', admin_url('admin.php?page='.EE_PAYMENTS_PG_SLUG)); |
|
40 | + define('EE_PAYMENTS_ADMIN', EE_ADMIN_PAGES.'payments'.DS); |
|
41 | + define('EE_PAYMENTS_TEMPLATE_PATH', EE_PAYMENTS_ADMIN.'templates'.DS); |
|
42 | + define('EE_PAYMENTS_ASSETS_URL', EE_ADMIN_PAGES_URL.'payments/assets/'); |
|
43 | 43 | |
44 | 44 | //check that there are active gateways on all admin page loads. but dont do it just yet |
45 | 45 | // echo "constructing payments admin page";die; |
46 | - add_action('admin_notices',array($this,'check_payment_gateway_setup')); |
|
46 | + add_action('admin_notices', array($this, 'check_payment_gateway_setup')); |
|
47 | 47 | parent::__construct(); |
48 | 48 | } |
49 | 49 | |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | } |
53 | 53 | |
54 | 54 | protected function _set_menu_map() { |
55 | - $this->_menu_map = new EE_Admin_Page_Sub_Menu( array( |
|
55 | + $this->_menu_map = new EE_Admin_Page_Sub_Menu(array( |
|
56 | 56 | 'menu_group' => 'settings', |
57 | 57 | 'menu_order' => 30, |
58 | 58 | 'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY, |
@@ -68,23 +68,23 @@ discard block |
||
68 | 68 | /** |
69 | 69 | * Checks that there is at least one active gateway. If not, add a notice |
70 | 70 | */ |
71 | - public function check_payment_gateway_setup(){ |
|
71 | + public function check_payment_gateway_setup() { |
|
72 | 72 | //ONLY do this check if models can query |
73 | 73 | //and avoid a bug where when we nuke EE4's data that this causes a fatal error |
74 | 74 | //because the tables are deleted just before this request runs. see https://events.codebasehq.com/projects/event-espresso/tickets/7539 |
75 | 75 | EE_Registry::instance()->load_helper('Activation'); |
76 | - if ( ! EE_Maintenance_Mode::instance()->models_can_query() || ! EEH_Activation::table_exists( EEM_Payment_Method::instance()->table() ) ) { |
|
76 | + if ( ! EE_Maintenance_Mode::instance()->models_can_query() || ! EEH_Activation::table_exists(EEM_Payment_Method::instance()->table())) { |
|
77 | 77 | return; |
78 | 78 | } |
79 | 79 | |
80 | 80 | |
81 | 81 | // ensure Payment_Method model is loaded |
82 | - EE_Registry::instance()->load_model( 'Payment_Method' ); |
|
83 | - $actives = EEM_Payment_Method::instance()->count_active( EEM_Payment_Method::scope_cart ); |
|
84 | - if( $actives < 1 ){ |
|
82 | + EE_Registry::instance()->load_model('Payment_Method'); |
|
83 | + $actives = EEM_Payment_Method::instance()->count_active(EEM_Payment_Method::scope_cart); |
|
84 | + if ($actives < 1) { |
|
85 | 85 | $url = EE_Admin_Page::add_query_args_and_nonce(array(), EE_PAYMENTS_ADMIN_URL); |
86 | 86 | echo '<div class="error"> |
87 | - <p>'. sprintf(__("There are no Active Payment Methods setup for Event Espresso. Please %s activate at least one.%s", "event_espresso"),"<a href='$url'>","</a>").'</p> |
|
87 | + <p>'. sprintf(__("There are no Active Payment Methods setup for Event Espresso. Please %s activate at least one.%s", "event_espresso"), "<a href='$url'>", "</a>").'</p> |
|
88 | 88 | </div>'; |
89 | 89 | } |
90 | 90 | } |
@@ -6,8 +6,9 @@ |
||
6 | 6 | * @package Event Espresso |
7 | 7 | * @subpackage messages |
8 | 8 | */ |
9 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
9 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
10 | 10 | exit('NO direct script access allowed'); |
11 | +} |
|
11 | 12 | |
12 | 13 | /** |
13 | 14 | * |
@@ -2,10 +2,10 @@ |
||
2 | 2 | <?php _e('Mijireh Gateway', 'event_espresso'); ?> |
3 | 3 | </h3> |
4 | 4 | <p> |
5 | -<?php printf(__('Mijireh is basically a middle-man between Event Espresso and over 90 payment gateways. Most of the configuration occurs on %sMijireh\' website%s, where you configure your Mijireh store with the %spayment gateway of your choice%s.', 'event_espresso'),'<a href="http://www.mijireh.com/">','</a>','<a href="http://www.mijireh.com/docs/payment-gateways/">','</a>'); ?> |
|
5 | +<?php printf(__('Mijireh is basically a middle-man between Event Espresso and over 90 payment gateways. Most of the configuration occurs on %sMijireh\' website%s, where you configure your Mijireh store with the %spayment gateway of your choice%s.', 'event_espresso'), '<a href="http://www.mijireh.com/">', '</a>', '<a href="http://www.mijireh.com/docs/payment-gateways/">', '</a>'); ?> |
|
6 | 6 | </p> |
7 | 7 | <h3><?php _e('Mijireh Checkout Page Design', 'event_espresso'); ?></h3> |
8 | 8 | <p> |
9 | -<?php _e("As you're probably aware, when users pay with Mijireh Gateway, they are taken to a secure offsite page, hosted by Mijireh. This page can easily be made to have the look-and-feel of your website through a process called 'slurping', where Mijireh 'slurps' up your website's design and uses it on their checkout page. ", 'event_espresso');?> |
|
10 | -<?php printf(__("In order to do this, we automatically create a new WordPress page which is design to be slurped by Mijireh. You can customize the page like any other, but the page must contain Mijireh's special '{{mijireh-checkout-form}}' shortcode. Once you have finished designing the page, publish it, and %s then click the special 'slurp now' button%s. Mijireh may take several minutes to slurp the page. Once Mijireh is finished slurping, you can delete the page, or mark it as a draft. ", 'event_espresso'),'<a href="https://docs.google.com/a/eventespresso.com/file/d/0B5P8GXTvZgfMdjREYUtGM18wSms/edit?usp=drivesdk">','</a>');?> |
|
9 | +<?php _e("As you're probably aware, when users pay with Mijireh Gateway, they are taken to a secure offsite page, hosted by Mijireh. This page can easily be made to have the look-and-feel of your website through a process called 'slurping', where Mijireh 'slurps' up your website's design and uses it on their checkout page. ", 'event_espresso'); ?> |
|
10 | +<?php printf(__("In order to do this, we automatically create a new WordPress page which is design to be slurped by Mijireh. You can customize the page like any other, but the page must contain Mijireh's special '{{mijireh-checkout-form}}' shortcode. Once you have finished designing the page, publish it, and %s then click the special 'slurp now' button%s. Mijireh may take several minutes to slurp the page. Once Mijireh is finished slurping, you can delete the page, or mark it as a draft. ", 'event_espresso'), '<a href="https://docs.google.com/a/eventespresso.com/file/d/0B5P8GXTvZgfMdjREYUtGM18wSms/edit?usp=drivesdk">', '</a>'); ?> |
|
11 | 11 | </p> |
12 | 12 | \ No newline at end of file |
@@ -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 | /** |
@@ -68,21 +68,21 @@ discard block |
||
68 | 68 | |
69 | 69 | |
70 | 70 | protected function _start() { |
71 | - $content = '<h3>' . __('Payment Methods', 'event_espresso') . '</h3>'; |
|
72 | - $content .= '<p>' . __('This tour of the Payment Methods page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>'; |
|
71 | + $content = '<h3>'.__('Payment Methods', 'event_espresso').'</h3>'; |
|
72 | + $content .= '<p>'.__('This tour of the Payment Methods page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>'; |
|
73 | 73 | return $content; |
74 | 74 | } |
75 | 75 | |
76 | 76 | protected function _gateway_links_stop() { |
77 | - return '<p>' . __('Available payment methods are shown here. Clicking on a payment method will provide you with an option to activate that payment gateway.', 'event_espresso') . '</p>'; |
|
77 | + return '<p>'.__('Available payment methods are shown here. Clicking on a payment method will provide you with an option to activate that payment gateway.', 'event_espresso').'</p>'; |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | protected function _gateway_settings_metabox_stop() { |
81 | - return '<p>' . __('A payment gateway must first be enabled. You will then be able to configure the payment gateway. Be sure to save settings after configuring your payment gateway.', 'event_espresso') . '</p>'; |
|
81 | + return '<p>'.__('A payment gateway must first be enabled. You will then be able to configure the payment gateway. Be sure to save settings after configuring your payment gateway.', 'event_espresso').'</p>'; |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | protected function _end_tour_stop() { |
85 | - return '<p>' . __('After configuring your payment gateway, go to the Event Editor to create your first event with Event Espresso.', 'event_espresso') . '</p>'; |
|
85 | + return '<p>'.__('After configuring your payment gateway, go to the Event Editor to create your first event with Event Espresso.', 'event_espresso').'</p>'; |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | } |
89 | 89 | \ No newline at end of file |
@@ -6,8 +6,9 @@ |
||
6 | 6 | * @package Event Espresso |
7 | 7 | * @subpackage messages |
8 | 8 | */ |
9 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
9 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
10 | 10 | exit('NO direct script access allowed'); |
11 | +} |
|
11 | 12 | |
12 | 13 | /** |
13 | 14 | * |
@@ -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 | /** |
@@ -53,12 +53,12 @@ discard block |
||
53 | 53 | |
54 | 54 | |
55 | 55 | protected function _start() { |
56 | - $content = '<h3>' . __('Payment Settings', 'event_espresso') . '</h3>'; |
|
57 | - $content .= '<p>' . __('This tour of the Payment Settings page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>'; |
|
56 | + $content = '<h3>'.__('Payment Settings', 'event_espresso').'</h3>'; |
|
57 | + $content .= '<p>'.__('This tour of the Payment Settings page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>'; |
|
58 | 58 | return $content; |
59 | 59 | } |
60 | 60 | |
61 | 61 | protected function _show_pending_options_stop() { |
62 | - return '<p>' . __('Specify whether to provide your registrants with the option to retry payments.', 'event_espresso') . '</p>'; |
|
62 | + return '<p>'.__('Specify whether to provide your registrants with the option to retry payments.', 'event_espresso').'</p>'; |
|
63 | 63 | } |
64 | 64 | } |
65 | 65 | \ No newline at end of file |
@@ -6,8 +6,9 @@ |
||
6 | 6 | * @package Event Espresso |
7 | 7 | * @subpackage messages |
8 | 8 | */ |
9 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
9 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
10 | 10 | exit('NO direct script access allowed'); |
11 | +} |
|
11 | 12 | |
12 | 13 | /** |
13 | 14 | * |
@@ -3,27 +3,27 @@ |
||
3 | 3 | if (!defined('EVENT_ESPRESSO_VERSION')) |
4 | 4 | exit('No direct script access allowed'); |
5 | 5 | /** |
6 | - * Event Espresso |
|
7 | - * |
|
8 | - * Event Registration and Management Plugin for WordPress |
|
9 | - * |
|
10 | - * @ package Event Espresso |
|
11 | - * @ author Seth Shoultes |
|
12 | - * @ copyright (c) 2008-2011 Event Espresso All Rights Reserved. |
|
13 | - * @ license http://eventespresso.com/support/terms-conditions/ * see Plugin Licensing * |
|
14 | - * @ link http://www.eventespresso.com |
|
15 | - * @ version 4.3 |
|
16 | - * |
|
17 | - * ------------------------------------------------------------------------ |
|
18 | - * |
|
19 | - * payment_log_details |
|
20 | - * |
|
21 | - * @package Event Espresso |
|
22 | - * @subpackage |
|
23 | - * @author Mike Nelson |
|
24 | - * |
|
25 | - * ------------------------------------------------------------------------ |
|
26 | - */ |
|
6 | + * Event Espresso |
|
7 | + * |
|
8 | + * Event Registration and Management Plugin for WordPress |
|
9 | + * |
|
10 | + * @ package Event Espresso |
|
11 | + * @ author Seth Shoultes |
|
12 | + * @ copyright (c) 2008-2011 Event Espresso All Rights Reserved. |
|
13 | + * @ license http://eventespresso.com/support/terms-conditions/ * see Plugin Licensing * |
|
14 | + * @ link http://www.eventespresso.com |
|
15 | + * @ version 4.3 |
|
16 | + * |
|
17 | + * ------------------------------------------------------------------------ |
|
18 | + * |
|
19 | + * payment_log_details |
|
20 | + * |
|
21 | + * @package Event Espresso |
|
22 | + * @subpackage |
|
23 | + * @author Mike Nelson |
|
24 | + * |
|
25 | + * ------------------------------------------------------------------------ |
|
26 | + */ |
|
27 | 27 | /*@var EE_Change_Log $payment_Log */ |
28 | 28 | /*@var EE_Payment_Method $payment_Method*/ |
29 | 29 | /*@var EE_Transaction $transaction*/ |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (!defined('EVENT_ESPRESSO_VERSION')) |
|
3 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) |
|
4 | 4 | exit('No direct script access allowed'); |
5 | 5 | /** |
6 | 6 | * Event Espresso |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | </label> |
62 | 62 | </th> |
63 | 63 | <td> |
64 | - <?php echo $transaction ? $transaction->ID() : __("Could not be determined", 'event_espresso');?> |
|
64 | + <?php echo $transaction ? $transaction->ID() : __("Could not be determined", 'event_espresso'); ?> |
|
65 | 65 | |
66 | 66 | </td> |
67 | 67 | </tr> |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | </label> |
73 | 73 | </th> |
74 | 74 | <td> |
75 | - <?php echo $payment_log->e('LOG_message','as_table');//EEH_Template::layout_array_as_table($payment_log->content())?> |
|
75 | + <?php echo $payment_log->e('LOG_message', 'as_table'); //EEH_Template::layout_array_as_table($payment_log->content())?> |
|
76 | 76 | </td> |
77 | 77 | </tr> |
78 | 78 | </tbody> |
@@ -1,7 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (!defined('EVENT_ESPRESSO_VERSION')) |
|
3 | +if (!defined('EVENT_ESPRESSO_VERSION')) { |
|
4 | 4 | exit('No direct script access allowed'); |
5 | +} |
|
5 | 6 | /** |
6 | 7 | * Event Espresso |
7 | 8 | * |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @var $payment_method EE_Payment_Method |
|
4 | - * @var $activate_url string url to activate this payment method |
|
5 | - */ |
|
3 | + * @var $payment_method EE_Payment_Method |
|
4 | + * @var $activate_url string url to activate this payment method |
|
5 | + */ |
|
6 | 6 | ?> |
7 | 7 | <div class="padding"> |
8 | 8 | <table class="form-table"> |
@@ -14,7 +14,7 @@ |
||
14 | 14 | <td> |
15 | 15 | |
16 | 16 | <a id="activate_<?php echo $payment_method->slug()?>" class="espresso-button-green button-primary" href="<?php echo $activate_url?>"> |
17 | - <?php printf(__("Activate %s Payment Method?", "event_espresso"),$payment_method->admin_name()); ?> |
|
17 | + <?php printf(__("Activate %s Payment Method?", "event_espresso"), $payment_method->admin_name()); ?> |
|
18 | 18 | </a> |
19 | 19 | </td> |
20 | 20 | </tr> |
@@ -9,7 +9,7 @@ |
||
9 | 9 | </label> |
10 | 10 | </th> |
11 | 11 | <td> |
12 | - <?php echo EEH_Form_Fields::select_input('show_pending_payment_options', $values, $show_pending_payment_options ); ?> |
|
12 | + <?php echo EEH_Form_Fields::select_input('show_pending_payment_options', $values, $show_pending_payment_options); ?> |
|
13 | 13 | |
14 | 14 | </td> |
15 | 15 | </tr> |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | ), |
140 | 140 | 'list_table' => 'Registration_Form_Questions_Admin_List_Table', |
141 | 141 | 'metaboxes' => $this->_default_espresso_metaboxes, |
142 | - 'help_tabs' => array( |
|
142 | + 'help_tabs' => array( |
|
143 | 143 | 'registration_form_questions_overview_help_tab' => array( |
144 | 144 | 'title' => __('Questions Overview', 'event_espresso'), |
145 | 145 | 'filename' => 'registration_form_questions_overview' |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | 'filename' => 'registration_form_edit_question' |
191 | 191 | ), |
192 | 192 | ), |
193 | - 'help_tour' => array( 'Registration_Form_Edit_Question_Help_Tour'), |
|
193 | + 'help_tour' => array( 'Registration_Form_Edit_Question_Help_Tour'), |
|
194 | 194 | 'require_nonce' => FALSE |
195 | 195 | ), |
196 | 196 | ); |
@@ -392,7 +392,7 @@ |
||
392 | 392 | |
393 | 393 | |
394 | 394 | /** |
395 | - * @return array |
|
395 | + * @return EventEspresso\core\libraries\form_sections\inputs\EE_Form_Input_Base[] |
|
396 | 396 | */ |
397 | 397 | public function getAvailableFormInputs() { |
398 | 398 | $exclude = array( |
@@ -4,8 +4,8 @@ discard block |
||
4 | 4 | use EventEspresso\admin_pages\registration_form\RegistrationFormEditorFormDisplay; |
5 | 5 | use EventEspresso\core\libraries\form_sections\inputs\FormInputsLoader; |
6 | 6 | |
7 | -if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
8 | - exit( 'NO direct script access allowed' ); |
|
7 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
8 | + exit('NO direct script access allowed'); |
|
9 | 9 | } |
10 | 10 | |
11 | 11 | |
@@ -53,12 +53,12 @@ discard block |
||
53 | 53 | |
54 | 54 | |
55 | 55 | |
56 | - public function __construct( $routing = TRUE ) { |
|
57 | - require_once( EE_MODELS . 'EEM_Question.model.php' ); |
|
58 | - require_once( EE_MODELS . 'EEM_Question_Group.model.php' ); |
|
59 | - $this->_question_model= EEM_Question::instance(); |
|
60 | - $this->_question_group_model=EEM_Question_Group::instance(); |
|
61 | - parent::__construct( $routing ); |
|
56 | + public function __construct($routing = TRUE) { |
|
57 | + require_once(EE_MODELS.'EEM_Question.model.php'); |
|
58 | + require_once(EE_MODELS.'EEM_Question_Group.model.php'); |
|
59 | + $this->_question_model = EEM_Question::instance(); |
|
60 | + $this->_question_group_model = EEM_Question_Group::instance(); |
|
61 | + parent::__construct($routing); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | |
113 | 113 | |
114 | 114 | protected function _set_page_routes() { |
115 | - $qsg_id = ! empty( $this->_req_data['QSG_ID'] ) ? $this->_req_data['QSG_ID'] : 1; |
|
115 | + $qsg_id = ! empty($this->_req_data['QSG_ID']) ? $this->_req_data['QSG_ID'] : 1; |
|
116 | 116 | $this->_page_routes = array( |
117 | 117 | |
118 | 118 | 'default' => array( |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | |
130 | 130 | 'update_question' => array( |
131 | 131 | 'func' => '_insert_or_update_question', |
132 | - 'args' => array('new_question' => FALSE ), |
|
132 | + 'args' => array('new_question' => FALSE), |
|
133 | 133 | 'capability' => 'ee_edit_question', |
134 | 134 | 'obj_id' => $qsg_id, |
135 | 135 | 'noheader' => TRUE, |
@@ -137,14 +137,14 @@ discard block |
||
137 | 137 | |
138 | 138 | 'insert_question_group' => array( |
139 | 139 | 'func' => '_insert_or_update_question_group', |
140 | - 'args' => array( 'new_question_group' => true ), |
|
140 | + 'args' => array('new_question_group' => true), |
|
141 | 141 | 'capability' => 'ee_edit_question_groups', |
142 | 142 | 'noheader' => true |
143 | 143 | ), |
144 | 144 | |
145 | 145 | 'update_question_group' => array( |
146 | 146 | 'func' => '_insert_or_update_question_group', |
147 | - 'args' => array( 'new_question_group' => false ), |
|
147 | + 'args' => array('new_question_group' => false), |
|
148 | 148 | 'capability' => 'ee_edit_question_group', |
149 | 149 | 'obj_id' => $qsg_id, |
150 | 150 | 'noheader' => true, |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | 'filename' => 'registration_form_questions_overview_views_bulk_actions_search' |
181 | 181 | ) |
182 | 182 | ), |
183 | - 'help_tour' => array( 'Registration_Form_Questions_Overview_Help_Tour'), |
|
183 | + 'help_tour' => array('Registration_Form_Questions_Overview_Help_Tour'), |
|
184 | 184 | 'require_nonce' => FALSE, |
185 | 185 | 'qtips' => array( |
186 | 186 | 'EE_Registration_Form_Tips' |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | 'filename' => 'registration_form_question_groups' |
200 | 200 | ), |
201 | 201 | ), |
202 | - 'help_tour' => array( 'Registration_Form_Question_Groups_Help_Tour'), |
|
202 | + 'help_tour' => array('Registration_Form_Question_Groups_Help_Tour'), |
|
203 | 203 | 'require_nonce' => FALSE |
204 | 204 | ), |
205 | 205 | |
@@ -208,21 +208,21 @@ discard block |
||
208 | 208 | 'label' => __('Edit Question', 'event_espresso'), |
209 | 209 | 'order' => 15, |
210 | 210 | 'persistent' => FALSE, |
211 | - 'url' => isset( $this->_req_data['question_id'] ) |
|
211 | + 'url' => isset($this->_req_data['question_id']) |
|
212 | 212 | ? add_query_arg( |
213 | - array('question_id' => $this->_req_data['question_id'] ), |
|
213 | + array('question_id' => $this->_req_data['question_id']), |
|
214 | 214 | $this->_current_page_view_url |
215 | 215 | ) |
216 | 216 | : $this->_admin_base_url |
217 | 217 | ), |
218 | - 'metaboxes' => array_merge( $this->_default_espresso_metaboxes, array('_publish_post_box' ) ), |
|
218 | + 'metaboxes' => array_merge($this->_default_espresso_metaboxes, array('_publish_post_box')), |
|
219 | 219 | 'help_tabs' => array( |
220 | 220 | 'registration_form_edit_question_group_help_tab' => array( |
221 | 221 | 'title' => __('Edit Question', 'event_espresso'), |
222 | 222 | 'filename' => 'registration_form_edit_question' |
223 | 223 | ), |
224 | 224 | ), |
225 | - 'help_tour' => array( 'Registration_Form_Edit_Question_Help_Tour'), |
|
225 | + 'help_tour' => array('Registration_Form_Edit_Question_Help_Tour'), |
|
226 | 226 | 'require_nonce' => FALSE |
227 | 227 | ), |
228 | 228 | ); |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | //none of the below group are currently used for Event Categories |
244 | 244 | protected function _add_feature_pointers() {} |
245 | 245 | public function load_scripts_styles() { |
246 | - wp_register_style( 'espresso_registration', REGISTRATION_FORM_ASSETS_URL . 'espresso_registration_form_admin.css', array( 'dashicons' ), EVENT_ESPRESSO_VERSION ); |
|
246 | + wp_register_style('espresso_registration', REGISTRATION_FORM_ASSETS_URL.'espresso_registration_form_admin.css', array('dashicons'), EVENT_ESPRESSO_VERSION); |
|
247 | 247 | wp_enqueue_style('espresso_registration'); |
248 | 248 | } |
249 | 249 | public function admin_init() {} |
@@ -256,12 +256,12 @@ discard block |
||
256 | 256 | $this->load_scripts_styles_forms(); |
257 | 257 | wp_register_script( |
258 | 258 | 'espresso_registration_form_single', |
259 | - REGISTRATION_FORM_ASSETS_URL . 'espresso_registration_form_admin.js', |
|
260 | - array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable' ), |
|
261 | - EVENT_ESPRESSO_VERSION . time(), |
|
259 | + REGISTRATION_FORM_ASSETS_URL.'espresso_registration_form_admin.js', |
|
260 | + array('jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable'), |
|
261 | + EVENT_ESPRESSO_VERSION.time(), |
|
262 | 262 | true |
263 | 263 | ); |
264 | - wp_enqueue_script( 'espresso_registration_form_single' ); |
|
264 | + wp_enqueue_script('espresso_registration_form_single'); |
|
265 | 265 | } |
266 | 266 | |
267 | 267 | |
@@ -271,15 +271,15 @@ discard block |
||
271 | 271 | } |
272 | 272 | public function load_scripts_styles_edit_question() { |
273 | 273 | $this->load_scripts_styles_forms(); |
274 | - wp_register_script( 'espresso_registration_form_single', REGISTRATION_FORM_ASSETS_URL . 'espresso_registration_form_admin.js', array('jquery-ui-sortable'), EVENT_ESPRESSO_VERSION, TRUE ); |
|
275 | - wp_enqueue_script( 'espresso_registration_form_single' ); |
|
274 | + wp_register_script('espresso_registration_form_single', REGISTRATION_FORM_ASSETS_URL.'espresso_registration_form_admin.js', array('jquery-ui-sortable'), EVENT_ESPRESSO_VERSION, TRUE); |
|
275 | + wp_enqueue_script('espresso_registration_form_single'); |
|
276 | 276 | } |
277 | 277 | |
278 | 278 | |
279 | 279 | |
280 | 280 | |
281 | 281 | public function recaptcha_info_help_tab() { |
282 | - $template = REGISTRATION_FORM_TEMPLATE_PATH . 'recaptcha_info_help_tab.template.php'; |
|
282 | + $template = REGISTRATION_FORM_TEMPLATE_PATH.'recaptcha_info_help_tab.template.php'; |
|
283 | 283 | EEH_Template::display_template($template, array()); |
284 | 284 | } |
285 | 285 | |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | ) |
309 | 309 | ); |
310 | 310 | |
311 | - if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_questions', 'espresso_registration_form_trash_questions' ) ) { |
|
311 | + if (EE_Registry::instance()->CAP->current_user_can('ee_delete_questions', 'espresso_registration_form_trash_questions')) { |
|
312 | 312 | $this->_views['trash'] = array( |
313 | 313 | 'slug' => 'trash', |
314 | 314 | 'label' => __('Trash', 'event_espresso'), |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | ) |
335 | 335 | ); |
336 | 336 | |
337 | - if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_questions', 'espresso_registration_form_trash_questions' ) ) { |
|
337 | + if (EE_Registry::instance()->CAP->current_user_can('ee_delete_questions', 'espresso_registration_form_trash_questions')) { |
|
338 | 338 | $this->_views['trash'] = array( |
339 | 339 | 'slug' => 'trash', |
340 | 340 | 'label' => __('Trash', 'event_espresso'), |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | * _edit_form |
367 | 367 | */ |
368 | 368 | protected function _edit_form() { |
369 | - do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' ); |
|
369 | + do_action('AHEE_log', __FILE__, __FUNCTION__, ''); |
|
370 | 370 | $reg_form_editor = new RegistrationFormEditor( |
371 | 371 | $this, |
372 | 372 | new RegistrationFormEditorFormDisplay( |
@@ -382,9 +382,9 @@ discard block |
||
382 | 382 | $reg_form_editor->getRoute(), |
383 | 383 | $reg_form_editor->getAdditionalHiddenFields() |
384 | 384 | ); |
385 | - $this->_set_publish_post_box_vars( 'id', $reg_form_editor->getQuestionGroupID() ); |
|
385 | + $this->_set_publish_post_box_vars('id', $reg_form_editor->getQuestionGroupID()); |
|
386 | 386 | $reg_form_editor->addMetaBoxes(); |
387 | - $this->_template_args[ 'admin_page_content' ] = $reg_form_editor->getAdminPageContent(); |
|
387 | + $this->_template_args['admin_page_content'] = $reg_form_editor->getAdminPageContent(); |
|
388 | 388 | // the details template wrapper |
389 | 389 | $this->display_admin_page_with_sidebar(); |
390 | 390 | } |
@@ -405,28 +405,28 @@ discard block |
||
405 | 405 | 'select_multi_model', |
406 | 406 | //'submit', |
407 | 407 | ); |
408 | - return FormInputsLoader::get( $exclude ); |
|
408 | + return FormInputsLoader::get($exclude); |
|
409 | 409 | } |
410 | 410 | |
411 | - protected function _insert_or_update_question_group( $new_question_group = true ) { |
|
411 | + protected function _insert_or_update_question_group($new_question_group = true) { |
|
412 | 412 | //$reg_form_editor_form = new RegistrationFormEditorForm( |
413 | 413 | // $this->_question_model |
414 | 414 | //); |
415 | 415 | //$form = $reg_form_editor_form->rawForm( $this->getAvailableFormInputs() ); |
416 | - unset( $_REQUEST['reg_form']['clone'] ); |
|
417 | - unset( $_REQUEST['settings']['clone'] ); |
|
418 | - $reg_form_input_list = explode( ',', sanitize_text_field( $_REQUEST['reg_form_input_list'] ) ); |
|
419 | - \EEH_Debug_Tools::printr( $reg_form_input_list, '$reg_form_input_list', __FILE__, __LINE__ ); |
|
420 | - foreach ( $reg_form_input_list as $reg_form_input ) { |
|
421 | - $reg_form_input = explode( '-', $reg_form_input ); |
|
422 | - if ( isset( $reg_form_input[1], $_REQUEST['settings'][ $reg_form_input[1] ] ) ) { |
|
416 | + unset($_REQUEST['reg_form']['clone']); |
|
417 | + unset($_REQUEST['settings']['clone']); |
|
418 | + $reg_form_input_list = explode(',', sanitize_text_field($_REQUEST['reg_form_input_list'])); |
|
419 | + \EEH_Debug_Tools::printr($reg_form_input_list, '$reg_form_input_list', __FILE__, __LINE__); |
|
420 | + foreach ($reg_form_input_list as $reg_form_input) { |
|
421 | + $reg_form_input = explode('-', $reg_form_input); |
|
422 | + if (isset($reg_form_input[1], $_REQUEST['settings'][$reg_form_input[1]])) { |
|
423 | 423 | $input_type = $reg_form_input[0]; |
424 | - $input_settings = $_REQUEST['settings'][ $reg_form_input[1] ]; |
|
425 | - \EEH_Debug_Tools::printr( $input_type, '$input_type', __FILE__, __LINE__ ); |
|
426 | - \EEH_Debug_Tools::printr( $input_settings, '$input_settings', __FILE__, __LINE__ ); |
|
427 | - if ( isset( $_REQUEST['input_options'][ $reg_form_input[1] ] ) ) { |
|
428 | - $input_options = $_REQUEST['input_options'][ $reg_form_input[1] ]; |
|
429 | - \EEH_Debug_Tools::printr( $input_options, '$input_options', __FILE__, __LINE__ ); |
|
424 | + $input_settings = $_REQUEST['settings'][$reg_form_input[1]]; |
|
425 | + \EEH_Debug_Tools::printr($input_type, '$input_type', __FILE__, __LINE__); |
|
426 | + \EEH_Debug_Tools::printr($input_settings, '$input_settings', __FILE__, __LINE__); |
|
427 | + if (isset($_REQUEST['input_options'][$reg_form_input[1]])) { |
|
428 | + $input_options = $_REQUEST['input_options'][$reg_form_input[1]]; |
|
429 | + \EEH_Debug_Tools::printr($input_options, '$input_options', __FILE__, __LINE__); |
|
430 | 430 | } |
431 | 431 | } |
432 | 432 | } |
@@ -587,36 +587,36 @@ discard block |
||
587 | 587 | |
588 | 588 | $this->_template_args['values'] = $this->_yes_no_values; |
589 | 589 | |
590 | - $this->_template_args['use_captcha'] = isset( EE_Registry::instance()->CFG->registration->use_captcha ) ? EE_Registry::instance()->CFG->registration->use_captcha : FALSE; |
|
591 | - $this->_template_args['show_captcha_settings'] = $this->_template_args['use_captcha'] ? 'style="display:table-row;"': ''; |
|
590 | + $this->_template_args['use_captcha'] = isset(EE_Registry::instance()->CFG->registration->use_captcha) ? EE_Registry::instance()->CFG->registration->use_captcha : FALSE; |
|
591 | + $this->_template_args['show_captcha_settings'] = $this->_template_args['use_captcha'] ? 'style="display:table-row;"' : ''; |
|
592 | 592 | |
593 | - $this->_template_args['recaptcha_publickey'] = isset( EE_Registry::instance()->CFG->registration->recaptcha_publickey ) ? stripslashes( EE_Registry::instance()->CFG->registration->recaptcha_publickey ) : ''; |
|
594 | - $this->_template_args['recaptcha_privatekey'] = isset( EE_Registry::instance()->CFG->registration->recaptcha_privatekey ) ? stripslashes( EE_Registry::instance()->CFG->registration->recaptcha_privatekey ) : ''; |
|
595 | - $this->_template_args['recaptcha_width'] = isset( EE_Registry::instance()->CFG->registration->recaptcha_width ) ? absint( EE_Registry::instance()->CFG->registration->recaptcha_width ) : 500; |
|
593 | + $this->_template_args['recaptcha_publickey'] = isset(EE_Registry::instance()->CFG->registration->recaptcha_publickey) ? stripslashes(EE_Registry::instance()->CFG->registration->recaptcha_publickey) : ''; |
|
594 | + $this->_template_args['recaptcha_privatekey'] = isset(EE_Registry::instance()->CFG->registration->recaptcha_privatekey) ? stripslashes(EE_Registry::instance()->CFG->registration->recaptcha_privatekey) : ''; |
|
595 | + $this->_template_args['recaptcha_width'] = isset(EE_Registry::instance()->CFG->registration->recaptcha_width) ? absint(EE_Registry::instance()->CFG->registration->recaptcha_width) : 500; |
|
596 | 596 | |
597 | 597 | $this->_template_args['recaptcha_theme_options'] = array( |
598 | - array('id' => 'red','text'=> __('Red', 'event_espresso')), |
|
599 | - array('id' => 'white','text'=> __('White', 'event_espresso')), |
|
600 | - array('id' => 'blackglass','text'=> __('Blackglass', 'event_espresso')), |
|
601 | - array('id' => 'clean','text'=> __('Clean', 'event_espresso')) |
|
598 | + array('id' => 'red', 'text'=> __('Red', 'event_espresso')), |
|
599 | + array('id' => 'white', 'text'=> __('White', 'event_espresso')), |
|
600 | + array('id' => 'blackglass', 'text'=> __('Blackglass', 'event_espresso')), |
|
601 | + array('id' => 'clean', 'text'=> __('Clean', 'event_espresso')) |
|
602 | 602 | ); |
603 | - $this->_template_args['recaptcha_theme'] = isset( EE_Registry::instance()->CFG->registration->recaptcha_theme ) ? EE_Registry::instance()->CFG->registration->get_pretty( 'recaptcha_theme' ) : 'clean'; |
|
603 | + $this->_template_args['recaptcha_theme'] = isset(EE_Registry::instance()->CFG->registration->recaptcha_theme) ? EE_Registry::instance()->CFG->registration->get_pretty('recaptcha_theme') : 'clean'; |
|
604 | 604 | |
605 | 605 | $this->_template_args['recaptcha_language_options'] = array( |
606 | - array('id' => 'en','text'=> __('English', 'event_espresso')), |
|
607 | - array('id' => 'es','text'=> __('Spanish', 'event_espresso')), |
|
608 | - array('id' => 'nl','text'=> __('Dutch', 'event_espresso')), |
|
609 | - array('id' => 'fr','text'=> __('French', 'event_espresso')), |
|
610 | - array('id' => 'de','text'=> __('German', 'event_espresso')), |
|
611 | - array('id' => 'pt','text'=> __('Portuguese', 'event_espresso')), |
|
612 | - array('id' => 'ru','text'=> __('Russian', 'event_espresso')), |
|
613 | - array('id' => 'tr','text'=> __('Turkish', 'event_espresso')) |
|
606 | + array('id' => 'en', 'text'=> __('English', 'event_espresso')), |
|
607 | + array('id' => 'es', 'text'=> __('Spanish', 'event_espresso')), |
|
608 | + array('id' => 'nl', 'text'=> __('Dutch', 'event_espresso')), |
|
609 | + array('id' => 'fr', 'text'=> __('French', 'event_espresso')), |
|
610 | + array('id' => 'de', 'text'=> __('German', 'event_espresso')), |
|
611 | + array('id' => 'pt', 'text'=> __('Portuguese', 'event_espresso')), |
|
612 | + array('id' => 'ru', 'text'=> __('Russian', 'event_espresso')), |
|
613 | + array('id' => 'tr', 'text'=> __('Turkish', 'event_espresso')) |
|
614 | 614 | ); |
615 | - $this->_template_args['recaptcha_language'] = isset( EE_Registry::instance()->CFG->registration->recaptcha_language ) ? EE_Registry::instance()->CFG->registration->recaptcha_language : 'en'; |
|
615 | + $this->_template_args['recaptcha_language'] = isset(EE_Registry::instance()->CFG->registration->recaptcha_language) ? EE_Registry::instance()->CFG->registration->recaptcha_language : 'en'; |
|
616 | 616 | |
617 | - $this->_set_add_edit_form_tags( 'update_reg_form_settings' ); |
|
618 | - $this->_set_publish_post_box_vars( NULL, FALSE, FALSE, NULL, FALSE ); |
|
619 | - $this->_template_args['admin_page_content'] = EEH_Template::display_template( REGISTRATION_FORM_TEMPLATE_PATH . 'reg_form_settings.template.php', $this->_template_args, TRUE ); |
|
617 | + $this->_set_add_edit_form_tags('update_reg_form_settings'); |
|
618 | + $this->_set_publish_post_box_vars(NULL, FALSE, FALSE, NULL, FALSE); |
|
619 | + $this->_template_args['admin_page_content'] = EEH_Template::display_template(REGISTRATION_FORM_TEMPLATE_PATH.'reg_form_settings.template.php', $this->_template_args, TRUE); |
|
620 | 620 | $this->display_admin_page_with_sidebar(); |
621 | 621 | } |
622 | 622 |
@@ -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 | /** |
@@ -33,16 +33,16 @@ discard block |
||
33 | 33 | |
34 | 34 | public function __construct() { |
35 | 35 | //define some constants |
36 | - define( 'REGISTRATION_FORM_PG_SLUG', 'espresso_registration_form' ); |
|
37 | - define( 'REGISTRATION_FORM_LABEL', __('Registration Form', 'event_espresso')); |
|
38 | - define( 'REGISTRATION_FORM_PG_NAME', REGISTRATION_FORM_LABEL ); |
|
39 | - define( 'REGISTRATION_FORM_ADMIN', EE_ADMIN_PAGES . 'registration_form' . DS ); |
|
40 | - define( 'REGISTRATION_FORM_ADMIN_URL', admin_url( 'admin.php?page=' . REGISTRATION_FORM_PG_SLUG )); |
|
41 | - define( 'EE_FORMS_ADMIN_URL', admin_url('admin.php?page=' . REGISTRATION_FORM_PG_SLUG )); |
|
42 | - define( 'REGISTRATION_FORM_ASSETS_PATH', REGISTRATION_FORM_ADMIN . 'assets' . DS ); |
|
43 | - define( 'REGISTRATION_FORM_ASSETS_URL', EE_ADMIN_PAGES_URL . 'registration_form/assets/' ); |
|
44 | - define( 'REGISTRATION_FORM_TEMPLATE_PATH', REGISTRATION_FORM_ADMIN . 'templates' . DS ); |
|
45 | - define( 'REGISTRATION_FORM_TEMPLATE_URL', EE_ADMIN_PAGES_URL . 'registration_form/templates/' ); |
|
36 | + define('REGISTRATION_FORM_PG_SLUG', 'espresso_registration_form'); |
|
37 | + define('REGISTRATION_FORM_LABEL', __('Registration Form', 'event_espresso')); |
|
38 | + define('REGISTRATION_FORM_PG_NAME', REGISTRATION_FORM_LABEL); |
|
39 | + define('REGISTRATION_FORM_ADMIN', EE_ADMIN_PAGES.'registration_form'.DS); |
|
40 | + define('REGISTRATION_FORM_ADMIN_URL', admin_url('admin.php?page='.REGISTRATION_FORM_PG_SLUG)); |
|
41 | + define('EE_FORMS_ADMIN_URL', admin_url('admin.php?page='.REGISTRATION_FORM_PG_SLUG)); |
|
42 | + define('REGISTRATION_FORM_ASSETS_PATH', REGISTRATION_FORM_ADMIN.'assets'.DS); |
|
43 | + define('REGISTRATION_FORM_ASSETS_URL', EE_ADMIN_PAGES_URL.'registration_form/assets/'); |
|
44 | + define('REGISTRATION_FORM_TEMPLATE_PATH', REGISTRATION_FORM_ADMIN.'templates'.DS); |
|
45 | + define('REGISTRATION_FORM_TEMPLATE_URL', EE_ADMIN_PAGES_URL.'registration_form/templates/'); |
|
46 | 46 | parent::__construct(); |
47 | 47 | } |
48 | 48 | |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | |
54 | 54 | |
55 | 55 | protected function _set_menu_map() { |
56 | - $this->_menu_map = new EE_Admin_Page_Sub_Menu( array( |
|
56 | + $this->_menu_map = new EE_Admin_Page_Sub_Menu(array( |
|
57 | 57 | 'menu_group' => 'management', |
58 | 58 | 'menu_order' => 30, |
59 | 59 | 'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY, |
@@ -6,8 +6,9 @@ |
||
6 | 6 | * @package Event Espresso |
7 | 7 | * @subpackage messages |
8 | 8 | */ |
9 | -if (!defined('EVENT_ESPRESSO_VERSION') ) |
|
9 | +if (!defined('EVENT_ESPRESSO_VERSION') ) { |
|
10 | 10 | exit('NO direct script access allowed'); |
11 | +} |
|
11 | 12 | |
12 | 13 | /** |
13 | 14 | * |