@@ -87,12 +87,12 @@ |
||
87 | 87 | |
88 | 88 | |
89 | 89 | /** |
90 | - * used to set the valid shortcodes for the receipt message type |
|
91 | - * |
|
92 | - * @since 4.5.0 |
|
93 | - * |
|
94 | - * @return void |
|
95 | - */ |
|
90 | + * used to set the valid shortcodes for the receipt message type |
|
91 | + * |
|
92 | + * @since 4.5.0 |
|
93 | + * |
|
94 | + * @return void |
|
95 | + */ |
|
96 | 96 | protected function _set_valid_shortcodes() { |
97 | 97 | $this->_valid_shortcodes['purchaser'] = array( |
98 | 98 | 'attendee_list', 'attendee', 'datetime_list', 'datetime', 'event_list', 'event', 'event_meta', 'messenger', 'organization', 'primary_registration_list', 'primary_registration_details', 'ticket_list', 'ticket', 'transaction', 'venue', 'line_item_list', 'payment_list', 'line_item', 'payment' |
@@ -5,7 +5,9 @@ |
||
5 | 5 | * @subpackage plugin api, messages |
6 | 6 | * @since 4.5.0 |
7 | 7 | */ |
8 | -if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed'); |
|
8 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
9 | + exit('No direct script access allowed'); |
|
10 | +} |
|
9 | 11 | |
10 | 12 | /** |
11 | 13 | * Use this to register or deregister a new message template pack variation for the EE messages system. |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | |
56 | 56 | |
57 | 57 | protected function _set_admin_pages() { |
58 | - $this->admin_registered_pages = array( 'events_edit' => TRUE ); |
|
58 | + $this->admin_registered_pages = array('events_edit' => TRUE); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | |
@@ -68,17 +68,17 @@ discard block |
||
68 | 68 | |
69 | 69 | protected function _set_with_messengers() { |
70 | 70 | $this->_with_messengers = array( |
71 | - 'html' => array( 'pdf' ) |
|
71 | + 'html' => array('pdf') |
|
72 | 72 | ); |
73 | 73 | } |
74 | 74 | |
75 | 75 | |
76 | 76 | |
77 | - protected function _get_data_for_context( $context, EE_Registration $registration, $id ) { |
|
77 | + protected function _get_data_for_context($context, EE_Registration $registration, $id) { |
|
78 | 78 | //receipt message type data handler is 'Gateways' and it expects a transaction object. |
79 | 79 | $transaction = $registration->transaction(); |
80 | - if ( $transaction instanceof EE_Transaction ) { |
|
81 | - return array( $transaction ); |
|
80 | + if ($transaction instanceof EE_Transaction) { |
|
81 | + return array($transaction); |
|
82 | 82 | } |
83 | 83 | return array(); |
84 | 84 | } |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | * @return void |
118 | 118 | */ |
119 | 119 | protected function _set_valid_shortcodes() { |
120 | - $this->_valid_shortcodes[ 'purchaser' ] = array( |
|
120 | + $this->_valid_shortcodes['purchaser'] = array( |
|
121 | 121 | 'attendee_list', |
122 | 122 | 'attendee', |
123 | 123 | 'datetime_list', |
@@ -1,6 +1,6 @@ |
||
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 | /** |
@@ -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,7 +1,8 @@ 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 | 7 | /** |
7 | 8 | * Event Espresso |
@@ -49,8 +50,9 @@ discard block |
||
49 | 50 | ); |
50 | 51 | $this->_MSGR->set_validator_config( $new_config ); |
51 | 52 | |
52 | - if ( $this->_context != 'admin' ) |
|
53 | - $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
|
53 | + if ( $this->_context != 'admin' ) { |
|
54 | + $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
|
55 | + } |
|
54 | 56 | |
55 | 57 | $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]'); |
56 | 58 | } |
@@ -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 | /** |
@@ -30,11 +30,11 @@ discard block |
||
30 | 30 | class EE_Messages_Email_Cancelled_Registration_Validator extends EE_Messages_Validator { |
31 | 31 | |
32 | 32 | |
33 | - public function __construct( $fields, $context ) { |
|
33 | + public function __construct($fields, $context) { |
|
34 | 34 | $this->_m_name = 'email'; |
35 | 35 | $this->_mt_name = 'cancelled_registration'; |
36 | 36 | |
37 | - parent::__construct( $fields, $context ); |
|
37 | + parent::__construct($fields, $context); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
@@ -46,9 +46,9 @@ discard block |
||
46 | 46 | 'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'), |
47 | 47 | 'required' => array('[EVENT_LIST]') |
48 | 48 | ); |
49 | - $this->_messenger->set_validator_config( $new_config ); |
|
49 | + $this->_messenger->set_validator_config($new_config); |
|
50 | 50 | |
51 | - if ( $this->_context != 'admin' ) |
|
51 | + if ($this->_context != 'admin') |
|
52 | 52 | $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'); |
53 | 53 | |
54 | 54 | $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]'); |
@@ -6,7 +6,7 @@ discard block |
||
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 | /** |
@@ -24,11 +24,11 @@ discard block |
||
24 | 24 | */ |
25 | 25 | class EE_Messages_Html_Receipt_Validator extends EE_Messages_Validator { |
26 | 26 | |
27 | - public function __construct( $fields, $context ) { |
|
27 | + public function __construct($fields, $context) { |
|
28 | 28 | $this->_m_name = 'html'; |
29 | 29 | $this->_mt_name = 'receipt'; |
30 | 30 | |
31 | - parent::__construct( $fields, $context ); |
|
31 | + parent::__construct($fields, $context); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | /** |
@@ -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 | * |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | * |
6 | 6 | * allows gateways to be used by different systems other than Event Espresso |
7 | 7 | */ |
8 | -interface EEI_Payment extends EEI_Base{ |
|
8 | +interface EEI_Payment extends EEI_Base { |
|
9 | 9 | |
10 | 10 | /** |
11 | 11 | * @return string indicating which the payment is approved, pending, cancelled or failed |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | /** |
153 | 153 | * Interface EEI_Payment_Method |
154 | 154 | */ |
155 | -interface EEI_Payment_Method{ |
|
155 | +interface EEI_Payment_Method { |
|
156 | 156 | |
157 | 157 | } |
158 | 158 | |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | * @param string $model_name |
172 | 172 | * @return EE_Log |
173 | 173 | */ |
174 | - function gateway_log($message,$id,$model_name); |
|
174 | + function gateway_log($message, $id, $model_name); |
|
175 | 175 | } |
176 | 176 | |
177 | 177 |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * |
25 | 25 | * ------------------------------------------------------------------------ |
26 | 26 | */ |
27 | -abstract class EE_Onsite_Gateway extends EE_Gateway{ |
|
27 | +abstract class EE_Onsite_Gateway extends EE_Gateway { |
|
28 | 28 | |
29 | 29 | /** |
30 | 30 | * @return EE_Onsite_Gateway |
@@ -53,5 +53,5 @@ discard block |
||
53 | 53 | * } unless a child class specifies these array keys are NOT present |
54 | 54 | * @return EE_Payment updated |
55 | 55 | */ |
56 | - public abstract function do_direct_payment($payment,$billing_info = null); |
|
56 | + public abstract function do_direct_payment($payment, $billing_info = null); |
|
57 | 57 | } |
@@ -2,10 +2,10 @@ |
||
2 | 2 | if (!defined('EVENT_ESPRESSO_VERSION')) |
3 | 3 | exit('No direct script access allowed'); |
4 | 4 | /** |
5 | - * payment_details_content |
|
6 | - * @var EE_Payment $payment |
|
7 | - * @var EE_Payment_Method $payment_method |
|
8 | - */ |
|
5 | + * payment_details_content |
|
6 | + * @var EE_Payment $payment |
|
7 | + * @var EE_Payment_Method $payment_method |
|
8 | + */ |
|
9 | 9 | $gateway_response = $payment->gateway_response(); |
10 | 10 | if ( ! empty( $gateway_response )) { |
11 | 11 | echo '<span class="error payment-problem">' . $gateway_response . '</span>'; |
@@ -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 | * payment_details_content |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | * @var EE_Payment_Method $payment_method |
8 | 8 | */ |
9 | 9 | $gateway_response = $payment->gateway_response(); |
10 | -if ( ! empty( $gateway_response )) { |
|
11 | - echo '<span class="error payment-problem">' . $gateway_response . '</span>'; |
|
10 | +if ( ! empty($gateway_response)) { |
|
11 | + echo '<span class="error payment-problem">'.$gateway_response.'</span>'; |
|
12 | 12 | } |
13 | 13 | // End of file payment_details_content.template.php |
14 | 14 | \ 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 | * |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | * @param array $setup_args an array of key value pairs of info for registering the component |
35 | 35 | * @return void |
36 | 36 | */ |
37 | - public static function register( $ID = NULL, $setup_args = array() ); |
|
37 | + public static function register($ID = NULL, $setup_args = array()); |
|
38 | 38 | |
39 | 39 | |
40 | 40 | |
@@ -45,5 +45,5 @@ discard block |
||
45 | 45 | * @param string $ID a unique name or ID for the component being registered |
46 | 46 | * @return void |
47 | 47 | */ |
48 | - public static function deregister( $ID = NULL ); |
|
48 | + public static function deregister($ID = NULL); |
|
49 | 49 | } |
@@ -5,7 +5,9 @@ |
||
5 | 5 | * @subpackage plugin api, messages |
6 | 6 | * @since 4.5.0 |
7 | 7 | */ |
8 | -if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed'); |
|
8 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
9 | + exit('No direct script access allowed'); |
|
10 | +} |
|
9 | 11 | |
10 | 12 | /** |
11 | 13 | * Use this to register or deregister a new message template pack variation for the EE messages system. |
@@ -18,30 +18,30 @@ discard block |
||
18 | 18 | class EE_Register_Admin_Page implements EEI_Plugin_API { |
19 | 19 | |
20 | 20 | |
21 | - /** |
|
22 | - * Holds registered EE_Admin_Pages |
|
23 | - * @var array |
|
24 | - */ |
|
25 | - protected static $_ee_admin_page_registry = array(); |
|
21 | + /** |
|
22 | + * Holds registered EE_Admin_Pages |
|
23 | + * @var array |
|
24 | + */ |
|
25 | + protected static $_ee_admin_page_registry = array(); |
|
26 | 26 | |
27 | 27 | |
28 | 28 | |
29 | 29 | |
30 | - /** |
|
31 | - * The purpose of this method is to provide an easy way for addons to register their admin pages (using the EE Admin Page loader system). |
|
32 | - * |
|
33 | - * @since 4.3.0 |
|
34 | - * |
|
30 | + /** |
|
31 | + * The purpose of this method is to provide an easy way for addons to register their admin pages (using the EE Admin Page loader system). |
|
32 | + * |
|
33 | + * @since 4.3.0 |
|
34 | + * |
|
35 | 35 | * @param string $page_basename This string represents the basename of the Admin Page init. |
36 | 36 | * The init file must use this basename in its name and class (i.e. {page_basename}_Admin_Page_Init.core.php). |
37 | - * @param array $config { An array of configuration options that will be used in different circumstances |
|
37 | + * @param array $config { An array of configuration options that will be used in different circumstances |
|
38 | 38 | * |
39 | 39 | * @type string $page_path This is the path where the registered admin pages reside ( used to setup autoloaders). |
40 | 40 | * |
41 | 41 | * } |
42 | - * @return void |
|
43 | - */ |
|
44 | - public static function register( $page_basename = NULL, $config = array() ) { |
|
42 | + * @return void |
|
43 | + */ |
|
44 | + public static function register( $page_basename = NULL, $config = array() ) { |
|
45 | 45 | |
46 | 46 | // check that an admin_page has not already been registered with that name |
47 | 47 | if ( isset(self::$_ee_admin_page_registry[ $page_basename ] )) { |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | } |
60 | 60 | |
61 | 61 | if ( ! did_action( 'AHEE__EE_System__load_espresso_addons' ) || did_action( 'AHEE__EE_Admin__loaded' )) { |
62 | - EE_Error::doing_it_wrong( |
|
62 | + EE_Error::doing_it_wrong( |
|
63 | 63 | __METHOD__, |
64 | 64 | sprintf( |
65 | 65 | __('An attempt was made to register "%s" as an EE Admin page has failed because it was not registered at the correct time. Please use the "AHEE__EE_Admin__loaded" hook to register Admin pages.','event_espresso'), |
@@ -67,36 +67,36 @@ discard block |
||
67 | 67 | ), |
68 | 68 | '4.3' |
69 | 69 | ); |
70 | - } |
|
70 | + } |
|
71 | 71 | |
72 | - //add incoming stuff to our registry property |
|
73 | - self::$_ee_admin_page_registry[ $page_basename ] = array( |
|
74 | - 'page_path' => $config['page_path'], |
|
75 | - 'config' => $config |
|
76 | - ); |
|
72 | + //add incoming stuff to our registry property |
|
73 | + self::$_ee_admin_page_registry[ $page_basename ] = array( |
|
74 | + 'page_path' => $config['page_path'], |
|
75 | + 'config' => $config |
|
76 | + ); |
|
77 | 77 | |
78 | - //add filters |
|
78 | + //add filters |
|
79 | 79 | |
80 | - add_filter('FHEE__EE_Admin_Page_Loader___get_installed_pages__installed_refs', array( 'EE_Register_Admin_Page', 'set_page_basename' ), 10 ); |
|
81 | - add_filter('FHEE__EEH_Autoloader__load_admin_core', array( 'EE_Register_Admin_Page', 'set_page_path' ), 10 ); |
|
80 | + add_filter('FHEE__EE_Admin_Page_Loader___get_installed_pages__installed_refs', array( 'EE_Register_Admin_Page', 'set_page_basename' ), 10 ); |
|
81 | + add_filter('FHEE__EEH_Autoloader__load_admin_core', array( 'EE_Register_Admin_Page', 'set_page_path' ), 10 ); |
|
82 | 82 | |
83 | - } |
|
83 | + } |
|
84 | 84 | |
85 | 85 | |
86 | 86 | |
87 | - /** |
|
88 | - * This deregisters a EE_Admin page that is already registered. Note, this MUST be loaded after the |
|
89 | - * page being deregistered is loaded. |
|
90 | - * |
|
91 | - * @since 4.3.0 |
|
92 | - * |
|
93 | - * @param string $page_basename Use whatever string was used to register the admin page. |
|
94 | - * @return void |
|
95 | - */ |
|
96 | - public static function deregister( $page_basename = NULL ) { |
|
97 | - if ( !empty( self::$_ee_admin_page_registry[$page_basename] ) ) |
|
98 | - unset( self::$_ee_admin_page_registry[$page_basename] ); |
|
99 | - } |
|
87 | + /** |
|
88 | + * This deregisters a EE_Admin page that is already registered. Note, this MUST be loaded after the |
|
89 | + * page being deregistered is loaded. |
|
90 | + * |
|
91 | + * @since 4.3.0 |
|
92 | + * |
|
93 | + * @param string $page_basename Use whatever string was used to register the admin page. |
|
94 | + * @return void |
|
95 | + */ |
|
96 | + public static function deregister( $page_basename = NULL ) { |
|
97 | + if ( !empty( self::$_ee_admin_page_registry[$page_basename] ) ) |
|
98 | + unset( self::$_ee_admin_page_registry[$page_basename] ); |
|
99 | + } |
|
100 | 100 | |
101 | 101 | |
102 | 102 | |
@@ -112,8 +112,8 @@ discard block |
||
112 | 112 | $installed_refs[ $basename ] = $args['page_path']; |
113 | 113 | } |
114 | 114 | } |
115 | - return $installed_refs; |
|
116 | - } |
|
115 | + return $installed_refs; |
|
116 | + } |
|
117 | 117 | |
118 | 118 | |
119 | 119 | |
@@ -124,9 +124,9 @@ discard block |
||
124 | 124 | * @return mixed |
125 | 125 | */ |
126 | 126 | public static function set_page_path( $paths ) { |
127 | - foreach ( self::$_ee_admin_page_registry as $basename => $args ) { |
|
128 | - $paths[ $basename ] = $args['page_path']; |
|
129 | - } |
|
130 | - return $paths; |
|
131 | - } |
|
127 | + foreach ( self::$_ee_admin_page_registry as $basename => $args ) { |
|
128 | + $paths[ $basename ] = $args['page_path']; |
|
129 | + } |
|
130 | + return $paths; |
|
131 | + } |
|
132 | 132 | } |
@@ -41,28 +41,28 @@ discard block |
||
41 | 41 | * } |
42 | 42 | * @return void |
43 | 43 | */ |
44 | - public static function register( $page_basename = NULL, $config = array() ) { |
|
44 | + public static function register($page_basename = NULL, $config = array()) { |
|
45 | 45 | |
46 | 46 | // check that an admin_page has not already been registered with that name |
47 | - if ( isset(self::$_ee_admin_page_registry[ $page_basename ] )) { |
|
48 | - throw new EE_Error( sprintf( __( 'An Admin Page with the name "%s" has already been registered and each Admin Page requires a unique name.', 'event_espresso' ), $page_basename )); |
|
47 | + if (isset(self::$_ee_admin_page_registry[$page_basename])) { |
|
48 | + throw new EE_Error(sprintf(__('An Admin Page with the name "%s" has already been registered and each Admin Page requires a unique name.', 'event_espresso'), $page_basename)); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | // required fields MUST be present, so let's make sure they are. |
52 | - if ( empty( $page_basename ) || ! is_array( $config ) || empty( $config['page_path'] )) { |
|
53 | - throw new EE_Error( __( 'In order to register an Admin Page with EE_Register_Admin_Page::register(), you must include the "page_basename" (the class name of the page), and an array containing the following keys: "page_path" (the path where the registered admin pages reside)', 'event_espresso' )); |
|
52 | + if (empty($page_basename) || ! is_array($config) || empty($config['page_path'])) { |
|
53 | + throw new EE_Error(__('In order to register an Admin Page with EE_Register_Admin_Page::register(), you must include the "page_basename" (the class name of the page), and an array containing the following keys: "page_path" (the path where the registered admin pages reside)', 'event_espresso')); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | //make sure we don't register twice |
57 | - if( isset( self::$_ee_admin_page_registry[ $page_basename ] ) ){ |
|
57 | + if (isset(self::$_ee_admin_page_registry[$page_basename])) { |
|
58 | 58 | return; |
59 | 59 | } |
60 | 60 | |
61 | - if ( ! did_action( 'AHEE__EE_System__load_espresso_addons' ) || did_action( 'AHEE__EE_Admin__loaded' )) { |
|
61 | + if ( ! did_action('AHEE__EE_System__load_espresso_addons') || did_action('AHEE__EE_Admin__loaded')) { |
|
62 | 62 | EE_Error::doing_it_wrong( |
63 | 63 | __METHOD__, |
64 | 64 | sprintf( |
65 | - __('An attempt was made to register "%s" as an EE Admin page has failed because it was not registered at the correct time. Please use the "AHEE__EE_Admin__loaded" hook to register Admin pages.','event_espresso'), |
|
65 | + __('An attempt was made to register "%s" as an EE Admin page has failed because it was not registered at the correct time. Please use the "AHEE__EE_Admin__loaded" hook to register Admin pages.', 'event_espresso'), |
|
66 | 66 | $page_basename |
67 | 67 | ), |
68 | 68 | '4.3' |
@@ -70,15 +70,15 @@ discard block |
||
70 | 70 | } |
71 | 71 | |
72 | 72 | //add incoming stuff to our registry property |
73 | - self::$_ee_admin_page_registry[ $page_basename ] = array( |
|
73 | + self::$_ee_admin_page_registry[$page_basename] = array( |
|
74 | 74 | 'page_path' => $config['page_path'], |
75 | 75 | 'config' => $config |
76 | 76 | ); |
77 | 77 | |
78 | 78 | //add filters |
79 | 79 | |
80 | - add_filter('FHEE__EE_Admin_Page_Loader___get_installed_pages__installed_refs', array( 'EE_Register_Admin_Page', 'set_page_basename' ), 10 ); |
|
81 | - add_filter('FHEE__EEH_Autoloader__load_admin_core', array( 'EE_Register_Admin_Page', 'set_page_path' ), 10 ); |
|
80 | + add_filter('FHEE__EE_Admin_Page_Loader___get_installed_pages__installed_refs', array('EE_Register_Admin_Page', 'set_page_basename'), 10); |
|
81 | + add_filter('FHEE__EEH_Autoloader__load_admin_core', array('EE_Register_Admin_Page', 'set_page_path'), 10); |
|
82 | 82 | |
83 | 83 | } |
84 | 84 | |
@@ -93,9 +93,9 @@ discard block |
||
93 | 93 | * @param string $page_basename Use whatever string was used to register the admin page. |
94 | 94 | * @return void |
95 | 95 | */ |
96 | - public static function deregister( $page_basename = NULL ) { |
|
97 | - if ( !empty( self::$_ee_admin_page_registry[$page_basename] ) ) |
|
98 | - unset( self::$_ee_admin_page_registry[$page_basename] ); |
|
96 | + public static function deregister($page_basename = NULL) { |
|
97 | + if ( ! empty(self::$_ee_admin_page_registry[$page_basename])) |
|
98 | + unset(self::$_ee_admin_page_registry[$page_basename]); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | |
@@ -106,10 +106,10 @@ discard block |
||
106 | 106 | * @param $installed_refs |
107 | 107 | * @return mixed |
108 | 108 | */ |
109 | - public static function set_page_basename( $installed_refs ) { |
|
110 | - if ( ! empty( self::$_ee_admin_page_registry )) { |
|
111 | - foreach ( self::$_ee_admin_page_registry as $basename => $args ) { |
|
112 | - $installed_refs[ $basename ] = $args['page_path']; |
|
109 | + public static function set_page_basename($installed_refs) { |
|
110 | + if ( ! empty(self::$_ee_admin_page_registry)) { |
|
111 | + foreach (self::$_ee_admin_page_registry as $basename => $args) { |
|
112 | + $installed_refs[$basename] = $args['page_path']; |
|
113 | 113 | } |
114 | 114 | } |
115 | 115 | return $installed_refs; |
@@ -123,9 +123,9 @@ discard block |
||
123 | 123 | * @param $paths |
124 | 124 | * @return mixed |
125 | 125 | */ |
126 | - public static function set_page_path( $paths ) { |
|
127 | - foreach ( self::$_ee_admin_page_registry as $basename => $args ) { |
|
128 | - $paths[ $basename ] = $args['page_path']; |
|
126 | + public static function set_page_path($paths) { |
|
127 | + foreach (self::$_ee_admin_page_registry as $basename => $args) { |
|
128 | + $paths[$basename] = $args['page_path']; |
|
129 | 129 | } |
130 | 130 | return $paths; |
131 | 131 | } |
@@ -5,7 +5,9 @@ discard block |
||
5 | 5 | * @subpackage helpers |
6 | 6 | * @since 4.3.0 |
7 | 7 | */ |
8 | -if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed'); |
|
8 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
9 | + exit('No direct script access allowed'); |
|
10 | +} |
|
9 | 11 | |
10 | 12 | /** |
11 | 13 | * Use this to register or deregister an EE Admin Page. |
@@ -94,8 +96,9 @@ discard block |
||
94 | 96 | * @return void |
95 | 97 | */ |
96 | 98 | public static function deregister( $page_basename = NULL ) { |
97 | - if ( !empty( self::$_ee_admin_page_registry[$page_basename] ) ) |
|
98 | - unset( self::$_ee_admin_page_registry[$page_basename] ); |
|
99 | + if ( !empty( self::$_ee_admin_page_registry[$page_basename] ) ) { |
|
100 | + unset( self::$_ee_admin_page_registry[$page_basename] ); |
|
101 | + } |
|
99 | 102 | } |
100 | 103 | |
101 | 104 |