@@ -1,13 +1,13 @@ |
||
1 | 1 | <?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { exit('No direct script access allowed'); } |
2 | 2 | /** |
3 | - * EE_CCV_Input |
|
4 | - * Text-field, except should evaluate to a number, and should be completely emptied |
|
5 | - * when cleaning out sensitive data |
|
6 | - * |
|
7 | - * @package Event Espresso |
|
8 | - * @subpackage |
|
9 | - * @author Mike Nelson |
|
10 | - */ |
|
3 | + * EE_CCV_Input |
|
4 | + * Text-field, except should evaluate to a number, and should be completely emptied |
|
5 | + * when cleaning out sensitive data |
|
6 | + * |
|
7 | + * @package Event Espresso |
|
8 | + * @subpackage |
|
9 | + * @author Mike Nelson |
|
10 | + */ |
|
11 | 11 | class EE_CVV_Input extends EE_Text_Input{ |
12 | 12 | |
13 | 13 | /** |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | * @subpackage |
9 | 9 | * @author Mike Nelson |
10 | 10 | */ |
11 | -class EE_CVV_Input extends EE_Text_Input{ |
|
11 | +class EE_CVV_Input extends EE_Text_Input { |
|
12 | 12 | |
13 | 13 | /** |
14 | 14 | * @param array $input_settings { |
@@ -17,12 +17,12 @@ discard block |
||
17 | 17 | */ |
18 | 18 | public function __construct($input_settings = array()) { |
19 | 19 | $this->set_sensitive_data_removal_strategy(new EE_CCV_Sensitive_Data_Removal()); |
20 | - $this->_add_validation_strategy( new EE_Int_Validation_Strategy(isset( $input_settings[ 'validation_error_message' ] ) ? $input_settings[ 'validation_error_message' ] : NULL ) ); |
|
20 | + $this->_add_validation_strategy(new EE_Int_Validation_Strategy(isset($input_settings['validation_error_message']) ? $input_settings['validation_error_message'] : NULL)); |
|
21 | 21 | parent::__construct($input_settings); |
22 | - if( |
|
23 | - ! isset( $input_settings[ 'include_whats_this_link' ] ) || |
|
24 | - ( isset( $input_settings[ 'include_whats_this_link' ] ) && |
|
25 | - $input_settings[ 'include_whats_this_link' ] == true ) ) { |
|
22 | + if ( |
|
23 | + ! isset($input_settings['include_whats_this_link']) || |
|
24 | + (isset($input_settings['include_whats_this_link']) && |
|
25 | + $input_settings['include_whats_this_link'] == true) ) { |
|
26 | 26 | $this->_html_label_text = sprintf( |
27 | 27 | _x( |
28 | 28 | '%1$s %2$s(What\'s this?)%3$s', |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php if (!defined('EVENT_ESPRESSO_VERSION')) { exit('No direct script access allowed'); } |
|
1 | +<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { exit('No direct script access allowed'); } |
|
2 | 2 | /** |
3 | 3 | * |
4 | 4 | * Class EE_Checkbox_Multi_Input |
@@ -11,16 +11,16 @@ discard block |
||
11 | 11 | * @since $VID:$ |
12 | 12 | * |
13 | 13 | */ |
14 | -class EE_Checkbox_Multi_Input extends EE_Form_Input_With_Options_Base{ |
|
14 | +class EE_Checkbox_Multi_Input extends EE_Form_Input_With_Options_Base { |
|
15 | 15 | |
16 | 16 | /** |
17 | 17 | * @param array $input_settings |
18 | 18 | * @param array | EE_Question_Option[] $answer_options |
19 | 19 | */ |
20 | - public function __construct( $answer_options, $input_settings = array() ) { |
|
21 | - $this->_set_display_strategy( new EE_Checkbox_Display_Strategy() ); |
|
22 | - $this->_add_validation_strategy( new EE_Many_Valued_Validation_Strategy( array( new EE_Enum_Validation_Strategy( isset( $input_settings[ 'validation_error_message' ] ) ? $input_settings[ 'validation_error_message' ] : NULL ) ))); |
|
20 | + public function __construct($answer_options, $input_settings = array()) { |
|
21 | + $this->_set_display_strategy(new EE_Checkbox_Display_Strategy()); |
|
22 | + $this->_add_validation_strategy(new EE_Many_Valued_Validation_Strategy(array(new EE_Enum_Validation_Strategy(isset($input_settings['validation_error_message']) ? $input_settings['validation_error_message'] : NULL)))); |
|
23 | 23 | $this->_multiple_selections = TRUE; |
24 | - parent::__construct( $answer_options, $input_settings ); |
|
24 | + parent::__construct($answer_options, $input_settings); |
|
25 | 25 | } |
26 | 26 | } |
27 | 27 | \ No newline at end of file |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php if ( ! defined( 'EVENT_ESPRESSO_VERSION' )) { exit( 'No direct script access allowed' ); } |
|
1 | +<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { exit('No direct script access allowed'); } |
|
2 | 2 | /** |
3 | 3 | * Class EE_Country_Select_Input |
4 | 4 | * |
@@ -11,20 +11,20 @@ discard block |
||
11 | 11 | * @since $VID:$ |
12 | 12 | * |
13 | 13 | */ |
14 | -class EE_Country_Select_Input extends EE_Select_Input{ |
|
14 | +class EE_Country_Select_Input extends EE_Select_Input { |
|
15 | 15 | |
16 | 16 | /** |
17 | 17 | * @param array $country_options |
18 | 18 | * @param array $input_settings |
19 | 19 | * @return EE_Country_Select_Input |
20 | 20 | */ |
21 | - public function __construct( $country_options = NULL, $input_settings = array() ){ |
|
21 | + public function __construct($country_options = NULL, $input_settings = array()) { |
|
22 | 22 | $country_options = apply_filters( |
23 | 23 | 'FHEE__EE_Country_Select_Input____construct__country_options', |
24 | - $this->get_country_answer_options( $country_options ), |
|
24 | + $this->get_country_answer_options($country_options), |
|
25 | 25 | $this |
26 | 26 | ); |
27 | - parent::__construct( $country_options, $input_settings ); |
|
27 | + parent::__construct($country_options, $input_settings); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | |
@@ -35,16 +35,16 @@ discard block |
||
35 | 35 | * @param array $country_options |
36 | 36 | * @return array |
37 | 37 | */ |
38 | - public function get_country_answer_options( $country_options = NULL ){ |
|
38 | + public function get_country_answer_options($country_options = NULL) { |
|
39 | 39 | // if passed something that is NOT an array |
40 | - if ( ! is_array( $country_options )) { |
|
40 | + if ( ! is_array($country_options)) { |
|
41 | 41 | // get possibly cached list of countries |
42 | 42 | $countries = EEM_Country::instance()->get_all_active_countries(); |
43 | - if ( ! empty( $countries )) { |
|
44 | - $country_options[ '' ] = ''; |
|
45 | - foreach( $countries as $country ){ |
|
46 | - if ( $country instanceof EE_Country ) { |
|
47 | - $country_options[ $country->ID() ] = $country->name(); |
|
43 | + if ( ! empty($countries)) { |
|
44 | + $country_options[''] = ''; |
|
45 | + foreach ($countries as $country) { |
|
46 | + if ($country instanceof EE_Country) { |
|
47 | + $country_options[$country->ID()] = $country->name(); |
|
48 | 48 | } |
49 | 49 | } |
50 | 50 | } else { |
@@ -7,16 +7,16 @@ |
||
7 | 7 | * @subpackage |
8 | 8 | * @author Mike Nelson |
9 | 9 | */ |
10 | -class EE_Credit_Card_Input extends EE_Form_Input_Base{ |
|
10 | +class EE_Credit_Card_Input extends EE_Form_Input_Base { |
|
11 | 11 | |
12 | 12 | /** |
13 | 13 | * @param array $input_settings |
14 | 14 | */ |
15 | - function __construct($input_settings = array()){ |
|
16 | - $input_settings['required'] = isset( $input_settings['required'] ) ? $input_settings['required'] : TRUE; |
|
15 | + function __construct($input_settings = array()) { |
|
16 | + $input_settings['required'] = isset($input_settings['required']) ? $input_settings['required'] : TRUE; |
|
17 | 17 | $this->_set_display_strategy(new EE_Text_Input_Display_Strategy()); |
18 | 18 | $this->_set_normalization_strategy(new EE_Text_Normalization()); |
19 | - $this->_add_validation_strategy(new EE_Credit_Card_Validation_Strategy( isset( $input_settings[ 'validation_error_message' ] ) ? $input_settings[ 'validation_error_message' ] : NULL )); |
|
19 | + $this->_add_validation_strategy(new EE_Credit_Card_Validation_Strategy(isset($input_settings['validation_error_message']) ? $input_settings['validation_error_message'] : NULL)); |
|
20 | 20 | $this->set_sensitive_data_removal_strategy(new EE_Credit_Card_Sensitive_Data_Removal()); |
21 | 21 | parent::__construct($input_settings); |
22 | 22 | } |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { exit('No direct script access allowed'); } |
2 | 2 | /** |
3 | - * |
|
4 | - * EE_Credit_Card_Input |
|
5 | - * |
|
6 | - * @package Event Espresso |
|
7 | - * @subpackage |
|
8 | - * @author Mike Nelson |
|
9 | - */ |
|
3 | + * |
|
4 | + * EE_Credit_Card_Input |
|
5 | + * |
|
6 | + * @package Event Espresso |
|
7 | + * @subpackage |
|
8 | + * @author Mike Nelson |
|
9 | + */ |
|
10 | 10 | class EE_Credit_Card_Input extends EE_Form_Input_Base{ |
11 | 11 | |
12 | 12 | /** |
@@ -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 | /** |
@@ -24,14 +24,14 @@ discard block |
||
24 | 24 | * |
25 | 25 | * ------------------------------------------------------------------------ |
26 | 26 | */ |
27 | -class EE_Credit_Card_Month_Input extends EE_Month_Input{ |
|
27 | +class EE_Credit_Card_Month_Input extends EE_Month_Input { |
|
28 | 28 | |
29 | 29 | /** |
30 | 30 | * @param bool $leading_zero |
31 | 31 | * @param array $input_settings |
32 | 32 | */ |
33 | - function __construct( $leading_zero = false, $input_settings = array()){ |
|
34 | - $this->set_sensitive_data_removal_strategy( new EE_All_Sensitive_Data_Removal() ); |
|
35 | - parent::__construct($leading_zero,$input_settings); |
|
33 | + function __construct($leading_zero = false, $input_settings = array()) { |
|
34 | + $this->set_sensitive_data_removal_strategy(new EE_All_Sensitive_Data_Removal()); |
|
35 | + parent::__construct($leading_zero, $input_settings); |
|
36 | 36 | } |
37 | 37 | } |
38 | 38 | \ No newline at end of file |
@@ -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,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 | /** |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * @subpackage |
10 | 10 | * @author Mike Nelson |
11 | 11 | */ |
12 | -class EE_Credit_Card_Year_Input extends EE_Year_Input{ |
|
12 | +class EE_Credit_Card_Year_Input extends EE_Year_Input { |
|
13 | 13 | |
14 | 14 | /** |
15 | 15 | * @param array $input_settings |
@@ -17,8 +17,8 @@ discard block |
||
17 | 17 | * @param int $years_behind |
18 | 18 | * @param int $years_ahead |
19 | 19 | */ |
20 | - function __construct( $input_settings = array(), $four_digit_year = true, $years_behind = 0, $years_ahead = 15 ){ |
|
21 | - $this->set_sensitive_data_removal_strategy( new EE_All_Sensitive_Data_Removal() ); |
|
22 | - parent::__construct( $input_settings, $four_digit_year, $years_behind, $years_ahead ); |
|
20 | + function __construct($input_settings = array(), $four_digit_year = true, $years_behind = 0, $years_ahead = 15) { |
|
21 | + $this->set_sensitive_data_removal_strategy(new EE_All_Sensitive_Data_Removal()); |
|
22 | + parent::__construct($input_settings, $four_digit_year, $years_behind, $years_ahead); |
|
23 | 23 | } |
24 | 24 | } |
@@ -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 | * |
@@ -8,24 +8,24 @@ |
||
8 | 8 | * @author Mike Nelson |
9 | 9 | * |
10 | 10 | */ |
11 | -class EE_Currency_Input extends EE_Select_Input{ |
|
11 | +class EE_Currency_Input extends EE_Select_Input { |
|
12 | 12 | |
13 | 13 | /** |
14 | 14 | * |
15 | 15 | * @param array $only_specific_currency_codes numerically-indexed array of allowed currency codes. By default, all are allowed |
16 | 16 | * @param array $input_settings |
17 | 17 | */ |
18 | - function __construct( $only_specific_currency_codes = array(), $input_settings = array()){ |
|
18 | + function __construct($only_specific_currency_codes = array(), $input_settings = array()) { |
|
19 | 19 | $query_params = array('order_by'=>array('CNT_name'=>'asc')); |
20 | - if($only_specific_currency_codes){ |
|
21 | - $query_params[0]['CNT_cur_code'] = array('IN',$only_specific_currency_codes); |
|
20 | + if ($only_specific_currency_codes) { |
|
21 | + $query_params[0]['CNT_cur_code'] = array('IN', $only_specific_currency_codes); |
|
22 | 22 | } |
23 | 23 | $all_countries = EEM_Country::instance()->get_all($query_params); |
24 | 24 | $country_options = array(); |
25 | - foreach($all_countries as $country){ |
|
25 | + foreach ($all_countries as $country) { |
|
26 | 26 | /* @var $country EE_Country */ |
27 | - $country_options[$country->currency_code()] = $country->name().": ".$country->currency_name_single() ." (".$country->currency_sign().")"; |
|
27 | + $country_options[$country->currency_code()] = $country->name().": ".$country->currency_name_single()." (".$country->currency_sign().")"; |
|
28 | 28 | } |
29 | - parent::__construct($country_options,'int',$input_settings); |
|
29 | + parent::__construct($country_options, 'int', $input_settings); |
|
30 | 30 | } |
31 | 31 | } |
32 | 32 | \ No newline at end of file |
@@ -6,21 +6,21 @@ discard block |
||
6 | 6 | * @subpackage |
7 | 7 | * @author Mike Nelson |
8 | 8 | */ |
9 | -class EE_Datepicker_Input extends EE_Form_Input_Base{ |
|
9 | +class EE_Datepicker_Input extends EE_Form_Input_Base { |
|
10 | 10 | |
11 | 11 | /** |
12 | 12 | * @param array $input_settings |
13 | 13 | */ |
14 | - function __construct( $input_settings = array() ){ |
|
15 | - $this->_set_display_strategy( new EE_Text_Input_Display_Strategy( 'datepicker' ) ); |
|
16 | - $this->_set_normalization_strategy( new EE_Text_Normalization() ); |
|
14 | + function __construct($input_settings = array()) { |
|
15 | + $this->_set_display_strategy(new EE_Text_Input_Display_Strategy('datepicker')); |
|
16 | + $this->_set_normalization_strategy(new EE_Text_Normalization()); |
|
17 | 17 | //we could do better for validation, but at least verify its plaintext |
18 | - $this->_add_validation_strategy( new EE_Plaintext_Validation_Strategy( isset( $input_settings[ 'validation_error_message' ] ) ? $input_settings[ 'validation_error_message' ] : NULL ) ); |
|
19 | - parent::__construct( $input_settings ); |
|
20 | - $this->set_html_class( $this->html_class() . ' datepicker' ); |
|
18 | + $this->_add_validation_strategy(new EE_Plaintext_Validation_Strategy(isset($input_settings['validation_error_message']) ? $input_settings['validation_error_message'] : NULL)); |
|
19 | + parent::__construct($input_settings); |
|
20 | + $this->set_html_class($this->html_class().' datepicker'); |
|
21 | 21 | // add some style and make it dance |
22 | - add_action( 'wp_enqueue_scripts', array( 'EE_Datepicker_Input', 'enqueue_styles_and_scripts' )); |
|
23 | - add_action( 'admin_enqueue_scripts', array( 'EE_Datepicker_Input', 'enqueue_styles_and_scripts' )); |
|
22 | + add_action('wp_enqueue_scripts', array('EE_Datepicker_Input', 'enqueue_styles_and_scripts')); |
|
23 | + add_action('admin_enqueue_scripts', array('EE_Datepicker_Input', 'enqueue_styles_and_scripts')); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | |
@@ -33,8 +33,8 @@ discard block |
||
33 | 33 | */ |
34 | 34 | public static function enqueue_styles_and_scripts() { |
35 | 35 | // load css |
36 | - wp_register_style( 'espresso-ui-theme', EE_GLOBAL_ASSETS_URL . 'css/espresso-ui-theme/jquery-ui-1.10.3.custom.min.css', array(), EVENT_ESPRESSO_VERSION, TRUE ); |
|
37 | - wp_enqueue_style( 'espresso-ui-theme'); |
|
36 | + wp_register_style('espresso-ui-theme', EE_GLOBAL_ASSETS_URL.'css/espresso-ui-theme/jquery-ui-1.10.3.custom.min.css', array(), EVENT_ESPRESSO_VERSION, TRUE); |
|
37 | + wp_enqueue_style('espresso-ui-theme'); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | * @subpackage |
7 | 7 | * @author Brent Christensen |
8 | 8 | */ |
9 | -class EE_Fixed_Hidden_Input extends EE_Hidden_Input{ |
|
9 | +class EE_Fixed_Hidden_Input extends EE_Hidden_Input { |
|
10 | 10 | |
11 | 11 | |
12 | 12 | /** |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | * @param array $req_data like $_POST |
18 | 18 | * @return boolean whether or not there was an error |
19 | 19 | */ |
20 | - protected function _normalize( $req_data ) { |
|
20 | + protected function _normalize($req_data) { |
|
21 | 21 | } |
22 | 22 | |
23 | 23 |