Completed
Branch 973/fix-visible-recaptcha (0580c7)
by
unknown
03:03 queued 30s
created
caffeinated/admin/extend/messages/Extend_Messages_Admin_Page.core.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -21,17 +21,17 @@  discard block
 block discarded – undo
21 21
     public function __construct($routing = true)
22 22
     {
23 23
         parent::__construct($routing);
24
-        if (! defined('EE_MSG_CAF_ASSETS_PATH')) {
25
-            define('EE_MSG_CAF_ASSETS_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'messages/assets/');
26
-            define('EE_MSG_CAF_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL . 'messages/assets/');
27
-            define('EE_MSG_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'messages/templates/');
28
-            define('EE_MSG_CAF_TEMPLATE_URL', EE_CORE_CAF_ADMIN_EXTEND_URL . 'messages/templates/');
24
+        if ( ! defined('EE_MSG_CAF_ASSETS_PATH')) {
25
+            define('EE_MSG_CAF_ASSETS_PATH', EE_CORE_CAF_ADMIN_EXTEND.'messages/assets/');
26
+            define('EE_MSG_CAF_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL.'messages/assets/');
27
+            define('EE_MSG_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND.'messages/templates/');
28
+            define('EE_MSG_CAF_TEMPLATE_URL', EE_CORE_CAF_ADMIN_EXTEND_URL.'messages/templates/');
29 29
         }
30 30
     }
31 31
 
32 32
     protected function _extend_page_config()
33 33
     {
34
-        $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'messages';
34
+        $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND.'messages';
35 35
         $this->_page_routes['custom_mtps'] = array(
36 36
             'func'       => '_ee_custom_messages_overview_list_table',
37 37
             'capability' => 'ee_read_messages',
@@ -76,13 +76,13 @@  discard block
 block discarded – undo
76 76
     {
77 77
         global $admin_page_hooks;
78 78
 
79
-        if (! empty($admin_page_hooks['espresso_events'])) {
79
+        if ( ! empty($admin_page_hooks['espresso_events'])) {
80 80
             // we're on a EE specific page... good stuff!
81 81
             $hook_prefix = $admin_page_hooks['espresso_events'];
82
-            $filter_ref = $hook_prefix . '_page_' . $this->page_slug;
83
-            add_filter('FHEE_manage_' . $filter_ref . '_columns', array($this, 'add_custom_mtps_columns'), 10, 2);
82
+            $filter_ref = $hook_prefix.'_page_'.$this->page_slug;
83
+            add_filter('FHEE_manage_'.$filter_ref.'_columns', array($this, 'add_custom_mtps_columns'), 10, 2);
84 84
             add_action(
85
-                'AHEE__EE_Admin_List_Table__column_actions__' . $filter_ref,
85
+                'AHEE__EE_Admin_List_Table__column_actions__'.$filter_ref,
86 86
                 array($this, 'custom_mtp_create_button_column'),
87 87
                 10,
88 88
                 2
Please login to merge, or discard this patch.
Indentation   +186 added lines, -186 removed lines patch added patch discarded remove patch
@@ -18,190 +18,190 @@
 block discarded – undo
18 18
 {
19 19
 
20 20
 
21
-    public function __construct($routing = true)
22
-    {
23
-        parent::__construct($routing);
24
-        if (! defined('EE_MSG_CAF_ASSETS_PATH')) {
25
-            define('EE_MSG_CAF_ASSETS_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'messages/assets/');
26
-            define('EE_MSG_CAF_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL . 'messages/assets/');
27
-            define('EE_MSG_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'messages/templates/');
28
-            define('EE_MSG_CAF_TEMPLATE_URL', EE_CORE_CAF_ADMIN_EXTEND_URL . 'messages/templates/');
29
-        }
30
-    }
31
-
32
-    protected function _extend_page_config()
33
-    {
34
-        $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'messages';
35
-        $this->_page_routes['custom_mtps'] = array(
36
-            'func'       => '_ee_custom_messages_overview_list_table',
37
-            'capability' => 'ee_read_messages',
38
-        );
39
-        $this->_page_config['custom_mtps'] = array(
40
-            'nav'           => array(
41
-                'label' => esc_html__('Custom Message Templates', 'event_espresso'),
42
-                'order' => 30,
43
-            ),
44
-            'list_table'    => 'Custom_Messages_Template_List_Table',
45
-            'help_tabs'     => array(
46
-                'message_overview_message_types_help_tab' => array(
47
-                    'title'    => esc_html__('Message Types', 'event_espresso'),
48
-                    'filename' => 'messages_overview_types',
49
-                ),
50
-                'messages_overview_messengers_help_tab'   => array(
51
-                    'title'    => esc_html__('Messengers', 'event_espresso'),
52
-                    'filename' => 'messages_overview_messengers',
53
-                ),
54
-                'messages_overview_other_help_tab'        => array(
55
-                    'title'    => esc_html__('Messages Other', 'event_espresso'),
56
-                    'filename' => 'messages_overview_other',
57
-                ),
58
-            ),
59
-            'require_nonce' => false,
60
-        );
61
-
62
-        add_action('current_screen', array($this, 'dynamic_screen_hooks'), 10);
63
-    }
64
-
65
-
66
-    /**
67
-     * Callback for current_screen action
68
-     * This is used for any filters and/or actions that require the dynamic screen hook_prefix to be correct.
69
-     *
70
-     * @since 4.5.0
71
-     *
72
-     * @return void
73
-     */
74
-    public function dynamic_screen_hooks()
75
-    {
76
-        global $admin_page_hooks;
77
-
78
-        if (! empty($admin_page_hooks['espresso_events'])) {
79
-            // we're on a EE specific page... good stuff!
80
-            $hook_prefix = $admin_page_hooks['espresso_events'];
81
-            $filter_ref = $hook_prefix . '_page_' . $this->page_slug;
82
-            add_filter('FHEE_manage_' . $filter_ref . '_columns', array($this, 'add_custom_mtps_columns'), 10, 2);
83
-            add_action(
84
-                'AHEE__EE_Admin_List_Table__column_actions__' . $filter_ref,
85
-                array($this, 'custom_mtp_create_button_column'),
86
-                10,
87
-                2
88
-            );
89
-        }
90
-    }
91
-
92
-
93
-    /**
94
-     * This is the callback for the FHEE__manage_event-espresso_page_espresso_messages_columns to register the
95
-     * caffeinated columns for the global message templates list table.
96
-     *
97
-     * @since 4.3.2
98
-     *
99
-     * @param array  $columns   Original defined list of columns
100
-     * @param string $screen_id The unique screen id for the page.
101
-     */
102
-    public function add_custom_mtps_columns($columns, $screen_id)
103
-    {
104
-        if ($screen_id !== 'espresso_messages_global_mtps') {
105
-            return $columns;
106
-        }
107
-
108
-        $columns['actions'] = '';
109
-        return $columns;
110
-    }
111
-
112
-
113
-    /**
114
-     * Callback for FHEE__EE_Admin_List_Table__column_actions__event-espresso_page_espresso_messages action that allows
115
-     * for adding the content for the registered "action" column.
116
-     *
117
-     * @since 4.3.2
118
-     *
119
-     * @param EE_Base_Class
120
-     * @param string $screen_id Unique screen id for the page
121
-     *
122
-     * @return string html content for the page.
123
-     */
124
-    public function custom_mtp_create_button_column($item, $screen_id)
125
-    {
126
-        if (
127
-            $screen_id !== 'espresso_messages_global_mtps' || ! EE_Registry::instance()->CAP->current_user_can(
128
-                'ee_edit_messages',
129
-                'espresso_messages_add_new_message_template'
130
-            )
131
-        ) {
132
-            return '';
133
-        }
134
-
135
-        // first we consider whether this template has override set.  If it does then that means no custom templates can be created from this template as a base.  So let's just skip the button creation.
136
-        if ($item->get('MTP_is_override')) {
137
-            return '';
138
-        }
139
-
140
-
141
-        $create_args = array(
142
-            'GRP_ID'       => $item->ID(),
143
-            'messenger'    => $item->messenger(),
144
-            'message_type' => $item->message_type(),
145
-            'action'       => 'add_new_message_template',
146
-        );
147
-        $create_link = EE_Admin_Page::add_query_args_and_nonce($create_args, EE_MSG_ADMIN_URL);
148
-        echo sprintf(
149
-            '<a href="%s" class="button button-small">%s</a>',
150
-            $create_link,
151
-            esc_html__('Create Custom', 'event_espresso')
152
-        );
153
-    }
154
-
155
-
156
-    protected function _add_screen_options_custom_mtps()
157
-    {
158
-        $page_title = $this->_admin_page_title;
159
-        $this->_admin_page_title = esc_html__('Custom Message Templates', 'event_espresso');
160
-        $this->_per_page_screen_option();
161
-        $this->_admin_page_title = $page_title;
162
-    }
163
-
164
-
165
-    /**
166
-     * set views array for Custom Templates list table
167
-     *
168
-     * @access public
169
-     * @return void
170
-     */
171
-    public function _set_list_table_views_custom_mtps()
172
-    {
173
-        $this->_views = array(
174
-            'in_use' => array(
175
-                'slug'        => 'in_use',
176
-                'label'       => esc_html__('In Use', 'event_espresso'),
177
-                'count'       => 0,
178
-                'bulk_action' => array(
179
-                    'trash_message_template' => esc_html__('Move to Trash', 'event_espresso'),
180
-                ),
181
-            ),
182
-        );
183
-        if (
184
-            EE_Registry::instance()->CAP->current_user_can(
185
-                'ee_delete_messages',
186
-                'espresso_messages_trash_message_template'
187
-            )
188
-        ) {
189
-            $this->_views['trashed'] = array(
190
-                'slug'        => 'trashed',
191
-                'label'       => esc_html__('Trash', 'event_espresso'),
192
-                'count'       => 0,
193
-                'bulk_action' => array(
194
-                    'restore_message_template' => esc_html__('Restore From Trash', 'event_espresso'),
195
-                    'delete_message_template'  => esc_html__('Delete Permanently', 'event_espresso'),
196
-                ),
197
-            );
198
-        }
199
-    }
200
-
201
-
202
-    protected function _ee_custom_messages_overview_list_table()
203
-    {
204
-        $this->_admin_page_title = esc_html__('Custom Message Templates', 'event_espresso');
205
-        $this->display_admin_list_table_page_with_no_sidebar();
206
-    }
21
+	public function __construct($routing = true)
22
+	{
23
+		parent::__construct($routing);
24
+		if (! defined('EE_MSG_CAF_ASSETS_PATH')) {
25
+			define('EE_MSG_CAF_ASSETS_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'messages/assets/');
26
+			define('EE_MSG_CAF_ASSETS_URL', EE_CORE_CAF_ADMIN_EXTEND_URL . 'messages/assets/');
27
+			define('EE_MSG_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'messages/templates/');
28
+			define('EE_MSG_CAF_TEMPLATE_URL', EE_CORE_CAF_ADMIN_EXTEND_URL . 'messages/templates/');
29
+		}
30
+	}
31
+
32
+	protected function _extend_page_config()
33
+	{
34
+		$this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'messages';
35
+		$this->_page_routes['custom_mtps'] = array(
36
+			'func'       => '_ee_custom_messages_overview_list_table',
37
+			'capability' => 'ee_read_messages',
38
+		);
39
+		$this->_page_config['custom_mtps'] = array(
40
+			'nav'           => array(
41
+				'label' => esc_html__('Custom Message Templates', 'event_espresso'),
42
+				'order' => 30,
43
+			),
44
+			'list_table'    => 'Custom_Messages_Template_List_Table',
45
+			'help_tabs'     => array(
46
+				'message_overview_message_types_help_tab' => array(
47
+					'title'    => esc_html__('Message Types', 'event_espresso'),
48
+					'filename' => 'messages_overview_types',
49
+				),
50
+				'messages_overview_messengers_help_tab'   => array(
51
+					'title'    => esc_html__('Messengers', 'event_espresso'),
52
+					'filename' => 'messages_overview_messengers',
53
+				),
54
+				'messages_overview_other_help_tab'        => array(
55
+					'title'    => esc_html__('Messages Other', 'event_espresso'),
56
+					'filename' => 'messages_overview_other',
57
+				),
58
+			),
59
+			'require_nonce' => false,
60
+		);
61
+
62
+		add_action('current_screen', array($this, 'dynamic_screen_hooks'), 10);
63
+	}
64
+
65
+
66
+	/**
67
+	 * Callback for current_screen action
68
+	 * This is used for any filters and/or actions that require the dynamic screen hook_prefix to be correct.
69
+	 *
70
+	 * @since 4.5.0
71
+	 *
72
+	 * @return void
73
+	 */
74
+	public function dynamic_screen_hooks()
75
+	{
76
+		global $admin_page_hooks;
77
+
78
+		if (! empty($admin_page_hooks['espresso_events'])) {
79
+			// we're on a EE specific page... good stuff!
80
+			$hook_prefix = $admin_page_hooks['espresso_events'];
81
+			$filter_ref = $hook_prefix . '_page_' . $this->page_slug;
82
+			add_filter('FHEE_manage_' . $filter_ref . '_columns', array($this, 'add_custom_mtps_columns'), 10, 2);
83
+			add_action(
84
+				'AHEE__EE_Admin_List_Table__column_actions__' . $filter_ref,
85
+				array($this, 'custom_mtp_create_button_column'),
86
+				10,
87
+				2
88
+			);
89
+		}
90
+	}
91
+
92
+
93
+	/**
94
+	 * This is the callback for the FHEE__manage_event-espresso_page_espresso_messages_columns to register the
95
+	 * caffeinated columns for the global message templates list table.
96
+	 *
97
+	 * @since 4.3.2
98
+	 *
99
+	 * @param array  $columns   Original defined list of columns
100
+	 * @param string $screen_id The unique screen id for the page.
101
+	 */
102
+	public function add_custom_mtps_columns($columns, $screen_id)
103
+	{
104
+		if ($screen_id !== 'espresso_messages_global_mtps') {
105
+			return $columns;
106
+		}
107
+
108
+		$columns['actions'] = '';
109
+		return $columns;
110
+	}
111
+
112
+
113
+	/**
114
+	 * Callback for FHEE__EE_Admin_List_Table__column_actions__event-espresso_page_espresso_messages action that allows
115
+	 * for adding the content for the registered "action" column.
116
+	 *
117
+	 * @since 4.3.2
118
+	 *
119
+	 * @param EE_Base_Class
120
+	 * @param string $screen_id Unique screen id for the page
121
+	 *
122
+	 * @return string html content for the page.
123
+	 */
124
+	public function custom_mtp_create_button_column($item, $screen_id)
125
+	{
126
+		if (
127
+			$screen_id !== 'espresso_messages_global_mtps' || ! EE_Registry::instance()->CAP->current_user_can(
128
+				'ee_edit_messages',
129
+				'espresso_messages_add_new_message_template'
130
+			)
131
+		) {
132
+			return '';
133
+		}
134
+
135
+		// first we consider whether this template has override set.  If it does then that means no custom templates can be created from this template as a base.  So let's just skip the button creation.
136
+		if ($item->get('MTP_is_override')) {
137
+			return '';
138
+		}
139
+
140
+
141
+		$create_args = array(
142
+			'GRP_ID'       => $item->ID(),
143
+			'messenger'    => $item->messenger(),
144
+			'message_type' => $item->message_type(),
145
+			'action'       => 'add_new_message_template',
146
+		);
147
+		$create_link = EE_Admin_Page::add_query_args_and_nonce($create_args, EE_MSG_ADMIN_URL);
148
+		echo sprintf(
149
+			'<a href="%s" class="button button-small">%s</a>',
150
+			$create_link,
151
+			esc_html__('Create Custom', 'event_espresso')
152
+		);
153
+	}
154
+
155
+
156
+	protected function _add_screen_options_custom_mtps()
157
+	{
158
+		$page_title = $this->_admin_page_title;
159
+		$this->_admin_page_title = esc_html__('Custom Message Templates', 'event_espresso');
160
+		$this->_per_page_screen_option();
161
+		$this->_admin_page_title = $page_title;
162
+	}
163
+
164
+
165
+	/**
166
+	 * set views array for Custom Templates list table
167
+	 *
168
+	 * @access public
169
+	 * @return void
170
+	 */
171
+	public function _set_list_table_views_custom_mtps()
172
+	{
173
+		$this->_views = array(
174
+			'in_use' => array(
175
+				'slug'        => 'in_use',
176
+				'label'       => esc_html__('In Use', 'event_espresso'),
177
+				'count'       => 0,
178
+				'bulk_action' => array(
179
+					'trash_message_template' => esc_html__('Move to Trash', 'event_espresso'),
180
+				),
181
+			),
182
+		);
183
+		if (
184
+			EE_Registry::instance()->CAP->current_user_can(
185
+				'ee_delete_messages',
186
+				'espresso_messages_trash_message_template'
187
+			)
188
+		) {
189
+			$this->_views['trashed'] = array(
190
+				'slug'        => 'trashed',
191
+				'label'       => esc_html__('Trash', 'event_espresso'),
192
+				'count'       => 0,
193
+				'bulk_action' => array(
194
+					'restore_message_template' => esc_html__('Restore From Trash', 'event_espresso'),
195
+					'delete_message_template'  => esc_html__('Delete Permanently', 'event_espresso'),
196
+				),
197
+			);
198
+		}
199
+	}
200
+
201
+
202
+	protected function _ee_custom_messages_overview_list_table()
203
+	{
204
+		$this->_admin_page_title = esc_html__('Custom Message Templates', 'event_espresso');
205
+		$this->display_admin_list_table_page_with_no_sidebar();
206
+	}
207 207
 }
Please login to merge, or discard this patch.
admin/extend/general_settings/Extend_General_Settings_Admin_Page.core.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,14 +21,14 @@  discard block
 block discarded – undo
21 21
     public function __construct($routing = true)
22 22
     {
23 23
         parent::__construct($routing);
24
-        define('GEN_SET_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'general_settings/templates/');
24
+        define('GEN_SET_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND.'general_settings/templates/');
25 25
     }
26 26
 
27 27
 
28 28
     protected function _extend_page_config()
29 29
     {
30 30
 
31
-        $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'general_settings';
31
+        $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND.'general_settings';
32 32
 
33 33
         // filters and action hooks here
34 34
         add_action('AHEE__admin_option_settings__template__before', array($this, 'debug_logging_options'), 9);
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         $template_args['remote_logging_url'] = isset(EE_Registry::instance()->CFG->admin->remote_logging_url)
61 61
                                                && ! empty(EE_Registry::instance()->CFG->admin->remote_logging_url)
62 62
             ? stripslashes(EE_Registry::instance()->CFG->admin->remote_logging_url) : '';
63
-        $template = GEN_SET_CAF_TEMPLATE_PATH . 'debug_log_settings.template.php';
63
+        $template = GEN_SET_CAF_TEMPLATE_PATH.'debug_log_settings.template.php';
64 64
         EEH_Template::display_template($template, $template_args);
65 65
     }
66 66
 
Please login to merge, or discard this patch.
Indentation   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -18,68 +18,68 @@
 block discarded – undo
18 18
 {
19 19
 
20 20
 
21
-    public function __construct($routing = true)
22
-    {
23
-        parent::__construct($routing);
24
-        define('GEN_SET_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'general_settings/templates/');
25
-    }
21
+	public function __construct($routing = true)
22
+	{
23
+		parent::__construct($routing);
24
+		define('GEN_SET_CAF_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'general_settings/templates/');
25
+	}
26 26
 
27 27
 
28
-    protected function _extend_page_config()
29
-    {
28
+	protected function _extend_page_config()
29
+	{
30 30
 
31
-        $this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'general_settings';
31
+		$this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'general_settings';
32 32
 
33
-        // filters and action hooks here
34
-        add_action('AHEE__admin_option_settings__template__before', array($this, 'debug_logging_options'), 9);
35
-        add_filter(
36
-            'FHEE__General_Settings_Admin_Page___update_admin_option_settings__CFG_admin',
37
-            array($this, 'update_debug_logging_options'),
38
-            10,
39
-            1
40
-        );
41
-    }
33
+		// filters and action hooks here
34
+		add_action('AHEE__admin_option_settings__template__before', array($this, 'debug_logging_options'), 9);
35
+		add_filter(
36
+			'FHEE__General_Settings_Admin_Page___update_admin_option_settings__CFG_admin',
37
+			array($this, 'update_debug_logging_options'),
38
+			10,
39
+			1
40
+		);
41
+	}
42 42
 
43 43
 
44 44
 
45
-    /*************        Logging Settings        *************/
45
+	/*************        Logging Settings        *************/
46 46
 
47
-    /**
48
-     * debug_logging_options
49
-     *
50
-     * @param array $template_args
51
-     *
52
-     * @return void
53
-     */
54
-    public function debug_logging_options($template_args = array())
55
-    {
56
-        $template_args['use_remote_logging'] = isset(EE_Registry::instance()->CFG->admin->use_remote_logging) ? absint(
57
-            EE_Registry::instance()->CFG->admin->use_remote_logging
58
-        ) : false;
59
-        $template_args['remote_logging_url'] = isset(EE_Registry::instance()->CFG->admin->remote_logging_url)
60
-                                               && ! empty(EE_Registry::instance()->CFG->admin->remote_logging_url)
61
-            ? stripslashes(EE_Registry::instance()->CFG->admin->remote_logging_url) : '';
62
-        $template = GEN_SET_CAF_TEMPLATE_PATH . 'debug_log_settings.template.php';
63
-        EEH_Template::display_template($template, $template_args);
64
-    }
47
+	/**
48
+	 * debug_logging_options
49
+	 *
50
+	 * @param array $template_args
51
+	 *
52
+	 * @return void
53
+	 */
54
+	public function debug_logging_options($template_args = array())
55
+	{
56
+		$template_args['use_remote_logging'] = isset(EE_Registry::instance()->CFG->admin->use_remote_logging) ? absint(
57
+			EE_Registry::instance()->CFG->admin->use_remote_logging
58
+		) : false;
59
+		$template_args['remote_logging_url'] = isset(EE_Registry::instance()->CFG->admin->remote_logging_url)
60
+											   && ! empty(EE_Registry::instance()->CFG->admin->remote_logging_url)
61
+			? stripslashes(EE_Registry::instance()->CFG->admin->remote_logging_url) : '';
62
+		$template = GEN_SET_CAF_TEMPLATE_PATH . 'debug_log_settings.template.php';
63
+		EEH_Template::display_template($template, $template_args);
64
+	}
65 65
 
66 66
 
67
-    /**
68
-     * update_debug_logging_options
69
-     *
70
-     * @param array $admin_options
71
-     *
72
-     * @return array
73
-     */
74
-    public function update_debug_logging_options($admin_options = array())
75
-    {
76
-        $admin_options->use_remote_logging = isset($this->_req_data['use_remote_logging']) ? absint(
77
-            $this->_req_data['use_remote_logging']
78
-        ) : $admin_options->use_remote_logging;
79
-        $admin_options->remote_logging_url = isset($this->_req_data['remote_logging_url']) ? esc_url_raw(
80
-            $this->_req_data['remote_logging_url']
81
-        ) : $admin_options->remote_logging_url;
67
+	/**
68
+	 * update_debug_logging_options
69
+	 *
70
+	 * @param array $admin_options
71
+	 *
72
+	 * @return array
73
+	 */
74
+	public function update_debug_logging_options($admin_options = array())
75
+	{
76
+		$admin_options->use_remote_logging = isset($this->_req_data['use_remote_logging']) ? absint(
77
+			$this->_req_data['use_remote_logging']
78
+		) : $admin_options->use_remote_logging;
79
+		$admin_options->remote_logging_url = isset($this->_req_data['remote_logging_url']) ? esc_url_raw(
80
+			$this->_req_data['remote_logging_url']
81
+		) : $admin_options->remote_logging_url;
82 82
 
83
-        return $admin_options;
84
-    }
83
+		return $admin_options;
84
+	}
85 85
 }
Please login to merge, or discard this patch.
caffeinated/admin/extend/events/qtips/EE_Event_Editor_Tips.lib.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
             ),
72 72
             7  => array(
73 73
                 'content_id' => 'tkt-status-archived',
74
-                'target'     => '.ticket-row .tkt-status-' . EE_Ticket::archived,
74
+                'target'     => '.ticket-row .tkt-status-'.EE_Ticket::archived,
75 75
                 'content'    => $this->_ticket_status_legend(EE_Ticket::archived),
76 76
                 'options'    => array(
77 77
                     'position' => array(
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
             ),
85 85
             8  => array(
86 86
                 'content_id' => 'tkt-status-expired',
87
-                'target'     => '.ticket-row .tkt-status-' . EE_Ticket::expired,
87
+                'target'     => '.ticket-row .tkt-status-'.EE_Ticket::expired,
88 88
                 'content'    => $this->_ticket_status_legend(EE_Ticket::expired),
89 89
                 'options'    => array(
90 90
                     'position' => array(
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
             ),
98 98
             9  => array(
99 99
                 'content_id' => 'tkt-status-sold_out',
100
-                'target'     => '.ticket-row .tkt-status-' . EE_Ticket::sold_out,
100
+                'target'     => '.ticket-row .tkt-status-'.EE_Ticket::sold_out,
101 101
                 'content'    => $this->_ticket_status_legend(EE_Ticket::sold_out),
102 102
                 'options'    => array(
103 103
                     'position' => array(
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
             ),
111 111
             10 => array(
112 112
                 'content_id' => 'tkt-status-pending',
113
-                'target'     => '.ticket-row .tkt-status-' . EE_Ticket::pending,
113
+                'target'     => '.ticket-row .tkt-status-'.EE_Ticket::pending,
114 114
                 'content'    => $this->_ticket_status_legend(EE_Ticket::pending),
115 115
                 'options'    => array(
116 116
                     'position' => array(
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
             ),
124 124
             11 => array(
125 125
                 'content_id' => 'tkt-status-onsale',
126
-                'target'     => '.ticket-row .tkt-status-' . EE_Ticket::onsale,
126
+                'target'     => '.ticket-row .tkt-status-'.EE_Ticket::onsale,
127 127
                 'content'    => $this->_ticket_status_legend(EE_Ticket::onsale),
128 128
                 'options'    => array(
129 129
                     'position' => array(
@@ -173,12 +173,12 @@  discard block
 block discarded – undo
173 173
                        'Clicking the taxable ticket toggle checkbox has enabled taxes for this ticket. What this means is that when a person purchases this ticket, the tax will be applied to all prices on this ticket. You can edit the existing tax price modifier that was setup in Event Espresso by going to  %sDefault Pricing Admin Page%s (labelled "Pricing" in the Event Espresso Menu)',
174 174
                        'event_espresso'
175 175
                    ),
176
-                   '<a href="' . $price_admin_link . '" title="' . esc_attr__(
176
+                   '<a href="'.$price_admin_link.'" title="'.esc_attr__(
177 177
                        'Pricing Admin Page',
178 178
                        'event_espresso'
179
-                   ) . '">',
179
+                   ).'">',
180 180
                    '</a>'
181
-               ) . '</p>';
181
+               ).'</p>';
182 182
     }
183 183
 
184 184
     /**
Please login to merge, or discard this patch.
Indentation   +180 added lines, -180 removed lines patch added patch discarded remove patch
@@ -15,189 +15,189 @@
 block discarded – undo
15 15
 {
16 16
 
17 17
 
18
-    protected function _set_tips_array()
19
-    {
20
-        $this->_qtipsa = array(
21
-            0  => array(
22
-                'content_id' => 'about-taxable-toggle',
23
-                'target'     => '.TKT-taxable-checkbox',
24
-                'content'    => $this->_get_taxable_info_content(),
25
-                'options'    => array(
26
-                    'show_only_once' => true,
27
-                    'content'        => array(
28
-                        'title' => esc_html__('Taxable Ticket Toggle', 'event_espresso'),
29
-                        'button' => true,
30
-                    ),
31
-                    'show'           => array(
32
-                        'event' => 'click',
33
-                    ),
34
-                    'hide'           => array(
35
-                        'event' => false,
36
-                    ),
37
-                    'style'          => array(
38
-                        'classes' => '',
39
-                    ),
40
-                )// defaults
41
-            ),
42
-            1  => array(
43
-                'content_id' => 'ticket-icon-help',
44
-                'target'     => '.ticket-icon',
45
-                'content'    => esc_html__('Assigned Tickets', 'event_espresso'),
46
-            ),
47
-            2  => array(
48
-                'content_id' => 'clone-icon-help',
49
-                'target'     => '.clone-icon',
50
-                'content'    => esc_html__('Duplicate this Item', 'event_espresso'),
51
-            ),
52
-            3  => array(
53
-                'content_id' => 'trash-datetime-help',
54
-                'target'     => '.datetime-edit-table .trash-icon',
55
-                'content'    => esc_html__('Trash Datetime', 'event_espresso'),
56
-            ),
57
-            4  => array(
58
-                'content_id' => 'trash-ticket-help',
59
-                'target'     => '.ticket-row .trash-icon',
60
-                'content'    => esc_html__('Trash Ticket', 'event_espresso'),
61
-            ),
62
-            5  => array(
63
-                'content_id' => 'trash-price-modifier-help',
64
-                'target'     => '.ticket-price-rows .trash-icon',
65
-                'content'    => esc_html__('Trash Price Modifier', 'event_espresso'),
66
-            ),
67
-            6  => array(
68
-                'content_id' => 'gear-icon-help',
69
-                'target'     => '.gear-icon',
70
-                'content'    => esc_html__('Advanced Settings', 'event_espresso'),
71
-            ),
72
-            7  => array(
73
-                'content_id' => 'tkt-status-archived',
74
-                'target'     => '.ticket-row .tkt-status-' . EE_Ticket::archived,
75
-                'content'    => $this->_ticket_status_legend(EE_Ticket::archived),
76
-                'options'    => array(
77
-                    'position' => array(
78
-                        'target' => 'mouse',
79
-                        'adjust' => array(
80
-                            'mouse' => false,
81
-                        ),
82
-                    ),
83
-                ),
84
-            ),
85
-            8  => array(
86
-                'content_id' => 'tkt-status-expired',
87
-                'target'     => '.ticket-row .tkt-status-' . EE_Ticket::expired,
88
-                'content'    => $this->_ticket_status_legend(EE_Ticket::expired),
89
-                'options'    => array(
90
-                    'position' => array(
91
-                        'target' => 'mouse',
92
-                        'adjust' => array(
93
-                            'mouse' => false,
94
-                        ),
95
-                    ),
96
-                ),
97
-            ),
98
-            9  => array(
99
-                'content_id' => 'tkt-status-sold_out',
100
-                'target'     => '.ticket-row .tkt-status-' . EE_Ticket::sold_out,
101
-                'content'    => $this->_ticket_status_legend(EE_Ticket::sold_out),
102
-                'options'    => array(
103
-                    'position' => array(
104
-                        'target' => 'mouse',
105
-                        'adjust' => array(
106
-                            'mouse' => false,
107
-                        ),
108
-                    ),
109
-                ),
110
-            ),
111
-            10 => array(
112
-                'content_id' => 'tkt-status-pending',
113
-                'target'     => '.ticket-row .tkt-status-' . EE_Ticket::pending,
114
-                'content'    => $this->_ticket_status_legend(EE_Ticket::pending),
115
-                'options'    => array(
116
-                    'position' => array(
117
-                        'target' => 'mouse',
118
-                        'adjust' => array(
119
-                            'mouse' => false,
120
-                        ),
121
-                    ),
122
-                ),
123
-            ),
124
-            11 => array(
125
-                'content_id' => 'tkt-status-onsale',
126
-                'target'     => '.ticket-row .tkt-status-' . EE_Ticket::onsale,
127
-                'content'    => $this->_ticket_status_legend(EE_Ticket::onsale),
128
-                'options'    => array(
129
-                    'position' => array(
130
-                        'target' => 'mouse',
131
-                        'adjust' => array(
132
-                            'mouse' => false,
133
-                        ),
134
-                    ),
135
-                ),
136
-            ),
137
-            12 => array(
138
-                'content_id' => 'sortable-tkt-drag-handle-tip',
139
-                'target'     => '.ee-ticket-sortable .sortable-drag-handle',
140
-                'content'    => esc_html__('Click and drag-n-drop to reorder tickets.', 'event_espresso'),
141
-                'options'    => array(
142
-                    'position' => array(
143
-                        'adjust' => array(
144
-                            'mouse' => false,
145
-                            'y'     => 5,
146
-                        ),
147
-                    ),
148
-                ),
149
-            ),
150
-            13 => array(
151
-                'content_id' => 'sortable-dtt-drag-handle-tip',
152
-                'target'     => '.ee-dtt-sortable .sortable-drag-handle',
153
-                'content'    => esc_html__('Click and drag-n-drop to reorder datetimes.', 'event_espresso'),
154
-                'options'    => array(
155
-                    'position' => array(
156
-                        'adjust' => array(
157
-                            'mouse' => false,
158
-                            'y'     => 5,
159
-                        ),
160
-                    ),
161
-                ),
162
-            ),
163
-        );
164
-    }
18
+	protected function _set_tips_array()
19
+	{
20
+		$this->_qtipsa = array(
21
+			0  => array(
22
+				'content_id' => 'about-taxable-toggle',
23
+				'target'     => '.TKT-taxable-checkbox',
24
+				'content'    => $this->_get_taxable_info_content(),
25
+				'options'    => array(
26
+					'show_only_once' => true,
27
+					'content'        => array(
28
+						'title' => esc_html__('Taxable Ticket Toggle', 'event_espresso'),
29
+						'button' => true,
30
+					),
31
+					'show'           => array(
32
+						'event' => 'click',
33
+					),
34
+					'hide'           => array(
35
+						'event' => false,
36
+					),
37
+					'style'          => array(
38
+						'classes' => '',
39
+					),
40
+				)// defaults
41
+			),
42
+			1  => array(
43
+				'content_id' => 'ticket-icon-help',
44
+				'target'     => '.ticket-icon',
45
+				'content'    => esc_html__('Assigned Tickets', 'event_espresso'),
46
+			),
47
+			2  => array(
48
+				'content_id' => 'clone-icon-help',
49
+				'target'     => '.clone-icon',
50
+				'content'    => esc_html__('Duplicate this Item', 'event_espresso'),
51
+			),
52
+			3  => array(
53
+				'content_id' => 'trash-datetime-help',
54
+				'target'     => '.datetime-edit-table .trash-icon',
55
+				'content'    => esc_html__('Trash Datetime', 'event_espresso'),
56
+			),
57
+			4  => array(
58
+				'content_id' => 'trash-ticket-help',
59
+				'target'     => '.ticket-row .trash-icon',
60
+				'content'    => esc_html__('Trash Ticket', 'event_espresso'),
61
+			),
62
+			5  => array(
63
+				'content_id' => 'trash-price-modifier-help',
64
+				'target'     => '.ticket-price-rows .trash-icon',
65
+				'content'    => esc_html__('Trash Price Modifier', 'event_espresso'),
66
+			),
67
+			6  => array(
68
+				'content_id' => 'gear-icon-help',
69
+				'target'     => '.gear-icon',
70
+				'content'    => esc_html__('Advanced Settings', 'event_espresso'),
71
+			),
72
+			7  => array(
73
+				'content_id' => 'tkt-status-archived',
74
+				'target'     => '.ticket-row .tkt-status-' . EE_Ticket::archived,
75
+				'content'    => $this->_ticket_status_legend(EE_Ticket::archived),
76
+				'options'    => array(
77
+					'position' => array(
78
+						'target' => 'mouse',
79
+						'adjust' => array(
80
+							'mouse' => false,
81
+						),
82
+					),
83
+				),
84
+			),
85
+			8  => array(
86
+				'content_id' => 'tkt-status-expired',
87
+				'target'     => '.ticket-row .tkt-status-' . EE_Ticket::expired,
88
+				'content'    => $this->_ticket_status_legend(EE_Ticket::expired),
89
+				'options'    => array(
90
+					'position' => array(
91
+						'target' => 'mouse',
92
+						'adjust' => array(
93
+							'mouse' => false,
94
+						),
95
+					),
96
+				),
97
+			),
98
+			9  => array(
99
+				'content_id' => 'tkt-status-sold_out',
100
+				'target'     => '.ticket-row .tkt-status-' . EE_Ticket::sold_out,
101
+				'content'    => $this->_ticket_status_legend(EE_Ticket::sold_out),
102
+				'options'    => array(
103
+					'position' => array(
104
+						'target' => 'mouse',
105
+						'adjust' => array(
106
+							'mouse' => false,
107
+						),
108
+					),
109
+				),
110
+			),
111
+			10 => array(
112
+				'content_id' => 'tkt-status-pending',
113
+				'target'     => '.ticket-row .tkt-status-' . EE_Ticket::pending,
114
+				'content'    => $this->_ticket_status_legend(EE_Ticket::pending),
115
+				'options'    => array(
116
+					'position' => array(
117
+						'target' => 'mouse',
118
+						'adjust' => array(
119
+							'mouse' => false,
120
+						),
121
+					),
122
+				),
123
+			),
124
+			11 => array(
125
+				'content_id' => 'tkt-status-onsale',
126
+				'target'     => '.ticket-row .tkt-status-' . EE_Ticket::onsale,
127
+				'content'    => $this->_ticket_status_legend(EE_Ticket::onsale),
128
+				'options'    => array(
129
+					'position' => array(
130
+						'target' => 'mouse',
131
+						'adjust' => array(
132
+							'mouse' => false,
133
+						),
134
+					),
135
+				),
136
+			),
137
+			12 => array(
138
+				'content_id' => 'sortable-tkt-drag-handle-tip',
139
+				'target'     => '.ee-ticket-sortable .sortable-drag-handle',
140
+				'content'    => esc_html__('Click and drag-n-drop to reorder tickets.', 'event_espresso'),
141
+				'options'    => array(
142
+					'position' => array(
143
+						'adjust' => array(
144
+							'mouse' => false,
145
+							'y'     => 5,
146
+						),
147
+					),
148
+				),
149
+			),
150
+			13 => array(
151
+				'content_id' => 'sortable-dtt-drag-handle-tip',
152
+				'target'     => '.ee-dtt-sortable .sortable-drag-handle',
153
+				'content'    => esc_html__('Click and drag-n-drop to reorder datetimes.', 'event_espresso'),
154
+				'options'    => array(
155
+					'position' => array(
156
+						'adjust' => array(
157
+							'mouse' => false,
158
+							'y'     => 5,
159
+						),
160
+					),
161
+				),
162
+			),
163
+		);
164
+	}
165 165
 
166 166
 
167
-    private function _get_taxable_info_content()
168
-    {
169
-        $price_admin_link = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'default'), PRICING_ADMIN_URL);
170
-        return '<p>'
171
-               . sprintf(
172
-                   esc_html__(
173
-                       'Clicking the taxable ticket toggle checkbox has enabled taxes for this ticket. What this means is that when a person purchases this ticket, the tax will be applied to all prices on this ticket. You can edit the existing tax price modifier that was setup in Event Espresso by going to  %sDefault Pricing Admin Page%s (labelled "Pricing" in the Event Espresso Menu)',
174
-                       'event_espresso'
175
-                   ),
176
-                   '<a href="' . $price_admin_link . '" title="' . esc_attr__(
177
-                       'Pricing Admin Page',
178
-                       'event_espresso'
179
-                   ) . '">',
180
-                   '</a>'
181
-               ) . '</p>';
182
-    }
167
+	private function _get_taxable_info_content()
168
+	{
169
+		$price_admin_link = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'default'), PRICING_ADMIN_URL);
170
+		return '<p>'
171
+			   . sprintf(
172
+				   esc_html__(
173
+					   'Clicking the taxable ticket toggle checkbox has enabled taxes for this ticket. What this means is that when a person purchases this ticket, the tax will be applied to all prices on this ticket. You can edit the existing tax price modifier that was setup in Event Espresso by going to  %sDefault Pricing Admin Page%s (labelled "Pricing" in the Event Espresso Menu)',
174
+					   'event_espresso'
175
+				   ),
176
+				   '<a href="' . $price_admin_link . '" title="' . esc_attr__(
177
+					   'Pricing Admin Page',
178
+					   'event_espresso'
179
+				   ) . '">',
180
+				   '</a>'
181
+			   ) . '</p>';
182
+	}
183 183
 
184
-    /**
185
-     * output the relevant ee-status-legend with the designated status highlighted.
186
-     *
187
-     * @param  EE_Ticket constant $status What status is set (by class)
188
-     * @return string         The status legend with the related status highlighted
189
-     */
190
-    private function _ticket_status_legend($status)
191
-    {
184
+	/**
185
+	 * output the relevant ee-status-legend with the designated status highlighted.
186
+	 *
187
+	 * @param  EE_Ticket constant $status What status is set (by class)
188
+	 * @return string         The status legend with the related status highlighted
189
+	 */
190
+	private function _ticket_status_legend($status)
191
+	{
192 192
 
193
-        $status_array = array(
194
-            'archived' => EE_Ticket::archived,
195
-            'expired'  => EE_Ticket::expired,
196
-            'sold_out' => EE_Ticket::sold_out,
197
-            'pending'  => EE_Ticket::pending,
198
-            'onsale'   => EE_Ticket::onsale,
199
-        );
193
+		$status_array = array(
194
+			'archived' => EE_Ticket::archived,
195
+			'expired'  => EE_Ticket::expired,
196
+			'sold_out' => EE_Ticket::sold_out,
197
+			'pending'  => EE_Ticket::pending,
198
+			'onsale'   => EE_Ticket::onsale,
199
+		);
200 200
 
201
-        return EEH_Template::status_legend($status_array, $status);
202
-    }
201
+		return EEH_Template::status_legend($status_array, $status);
202
+	}
203 203
 }
Please login to merge, or discard this patch.
payment_declined/EE_Messages_Email_Payment_Declined_Validator.class.php 2 patches
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -15,37 +15,37 @@
 block discarded – undo
15 15
 {
16 16
 
17 17
 
18
-    public function __construct($fields, $context)
19
-    {
20
-        $this->_m_name = 'email';
21
-        $this->_mt_name = 'payment_declined';
22
-
23
-        parent::__construct($fields, $context);
24
-    }
25
-
26
-    /**
27
-     * at this point no custom validation needed for this messenger/message_type combo.
28
-     */
29
-    protected function _modify_validator()
30
-    {
31
-        $new_config = $this->_messenger->get_validator_config();
32
-
33
-        // modify just event_list
34
-        $new_config['event_list'] = array(
35
-            'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization','recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list')
36
-            );
37
-        $new_config['ticket_list'] = array(
38
-            'shortcodes' => array('event_list', 'attendee_list', 'ticket', 'datetime_list', 'recipient_details', 'transaction')
39
-            );
40
-        $new_config['content'] = array(
41
-            'shortcodes' => array('event_list','attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger')
42
-            );
43
-        $this->_messenger->set_validator_config($new_config);
44
-
45
-        if ($this->_context != 'admin') {
46
-            $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');
47
-        }
48
-
49
-        $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
50
-    }
18
+	public function __construct($fields, $context)
19
+	{
20
+		$this->_m_name = 'email';
21
+		$this->_mt_name = 'payment_declined';
22
+
23
+		parent::__construct($fields, $context);
24
+	}
25
+
26
+	/**
27
+	 * at this point no custom validation needed for this messenger/message_type combo.
28
+	 */
29
+	protected function _modify_validator()
30
+	{
31
+		$new_config = $this->_messenger->get_validator_config();
32
+
33
+		// modify just event_list
34
+		$new_config['event_list'] = array(
35
+			'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization','recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list')
36
+			);
37
+		$new_config['ticket_list'] = array(
38
+			'shortcodes' => array('event_list', 'attendee_list', 'ticket', 'datetime_list', 'recipient_details', 'transaction')
39
+			);
40
+		$new_config['content'] = array(
41
+			'shortcodes' => array('event_list','attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger')
42
+			);
43
+		$this->_messenger->set_validator_config($new_config);
44
+
45
+		if ($this->_context != 'admin') {
46
+			$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');
47
+		}
48
+
49
+		$this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
50
+	}
51 51
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,18 +32,18 @@
 block discarded – undo
32 32
 
33 33
         // modify just event_list
34 34
         $new_config['event_list'] = array(
35
-            'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization','recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list')
35
+            'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list')
36 36
             );
37 37
         $new_config['ticket_list'] = array(
38 38
             'shortcodes' => array('event_list', 'attendee_list', 'ticket', 'datetime_list', 'recipient_details', 'transaction')
39 39
             );
40 40
         $new_config['content'] = array(
41
-            'shortcodes' => array('event_list','attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger')
41
+            'shortcodes' => array('event_list', 'attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger')
42 42
             );
43 43
         $this->_messenger->set_validator_config($new_config);
44 44
 
45 45
         if ($this->_context != 'admin') {
46
-            $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');
46
+            $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');
47 47
         }
48 48
 
49 49
         $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
Please login to merge, or discard this patch.
message_type/newsletter/EE_Messages_Email_Newsletter_Validator.class.php 2 patches
Indentation   +65 added lines, -65 removed lines patch added patch discarded remove patch
@@ -11,72 +11,72 @@
 block discarded – undo
11 11
  */
12 12
 class EE_Messages_Email_Newsletter_Validator extends EE_Messages_Validator
13 13
 {
14
-    /**
15
-     * EE_Messages_Email_Newsletter_Validator constructor.
16
-     *
17
-     * @param array $fields
18
-     * @param string $context
19
-     * @throws EE_Error
20
-     * @throws ReflectionException
21
-     */
22
-    public function __construct(array $fields, $context)
23
-    {
24
-        $this->_m_name = 'email';
25
-        $this->_mt_name = 'newsletter';
14
+	/**
15
+	 * EE_Messages_Email_Newsletter_Validator constructor.
16
+	 *
17
+	 * @param array $fields
18
+	 * @param string $context
19
+	 * @throws EE_Error
20
+	 * @throws ReflectionException
21
+	 */
22
+	public function __construct(array $fields, $context)
23
+	{
24
+		$this->_m_name = 'email';
25
+		$this->_mt_name = 'newsletter';
26 26
 
27
-        parent::__construct($fields, $context);
28
-    }
27
+		parent::__construct($fields, $context);
28
+	}
29 29
 
30
-    /**
31
-     * custom validator (restricting what was originally set by the messenger)
32
-     */
33
-    protected function _modify_validator()
34
-    {
35
-        if ($this->_context === 'attendee') {
36
-            $this->_valid_shortcodes_modifier[ $this->_context ]['from'] = array(
37
-                'recipient_details',
38
-                'email',
39
-                'organization',
40
-            );
41
-        }
30
+	/**
31
+	 * custom validator (restricting what was originally set by the messenger)
32
+	 */
33
+	protected function _modify_validator()
34
+	{
35
+		if ($this->_context === 'attendee') {
36
+			$this->_valid_shortcodes_modifier[ $this->_context ]['from'] = array(
37
+				'recipient_details',
38
+				'email',
39
+				'organization',
40
+			);
41
+		}
42 42
 
43
-        // excluded shortcodes
44
-        $fields = array('to', 'from', 'subject', 'content', 'newsletter_content');
45
-        foreach ($fields as $field) {
46
-            $this->_specific_shortcode_excludes[ $field ] = array(
47
-                '[RECIPIENT_REGISTRATION_CODE]',
48
-                '[EVENT_AUTHOR_FORMATTED_EMAIL]',
49
-                '[EVENT_AUTHOR_EMAIL]',
50
-            );
51
-        }
52
-        $add_excludes = array(
53
-            '[RECIPIENT_FNAME]',
54
-            '[RECIPIENT_LNAME]',
55
-            '[RECIPIENT_EMAIL]',
56
-            '[COMPANY]',
57
-            '[CO_ADD1]',
58
-            '[CO_ADD2]',
59
-            '[CO_CITY]',
60
-            '[CO_STATE]',
61
-            '[CO_ZIP]',
62
-            '[CO_LOGO]',
63
-            '[CO_PHONE]',
64
-            '[CO_LOGO_URL]',
65
-            '[CO_FACEBOOK_URL]',
66
-            '[CO_TWITTER_URL]',
67
-            '[CO_PINTEREST_URL]',
68
-            '[CO_GOOGLE_URL]',
69
-            '[CO_LINKEDIN_URL]',
70
-            '[CO_INSTAGRAM_URL]',
71
-        );
72
-        $this->_specific_shortcode_excludes['from'] =
73
-            array_merge(
74
-                $this->_specific_shortcode_excludes['from'],
75
-                $add_excludes
76
-            );
77
-        $this->_specific_shortcode_excludes['content'] = array_merge(
78
-            $this->_specific_shortcode_excludes['content'],
79
-            array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]')
80
-        );
81
-    }
43
+		// excluded shortcodes
44
+		$fields = array('to', 'from', 'subject', 'content', 'newsletter_content');
45
+		foreach ($fields as $field) {
46
+			$this->_specific_shortcode_excludes[ $field ] = array(
47
+				'[RECIPIENT_REGISTRATION_CODE]',
48
+				'[EVENT_AUTHOR_FORMATTED_EMAIL]',
49
+				'[EVENT_AUTHOR_EMAIL]',
50
+			);
51
+		}
52
+		$add_excludes = array(
53
+			'[RECIPIENT_FNAME]',
54
+			'[RECIPIENT_LNAME]',
55
+			'[RECIPIENT_EMAIL]',
56
+			'[COMPANY]',
57
+			'[CO_ADD1]',
58
+			'[CO_ADD2]',
59
+			'[CO_CITY]',
60
+			'[CO_STATE]',
61
+			'[CO_ZIP]',
62
+			'[CO_LOGO]',
63
+			'[CO_PHONE]',
64
+			'[CO_LOGO_URL]',
65
+			'[CO_FACEBOOK_URL]',
66
+			'[CO_TWITTER_URL]',
67
+			'[CO_PINTEREST_URL]',
68
+			'[CO_GOOGLE_URL]',
69
+			'[CO_LINKEDIN_URL]',
70
+			'[CO_INSTAGRAM_URL]',
71
+		);
72
+		$this->_specific_shortcode_excludes['from'] =
73
+			array_merge(
74
+				$this->_specific_shortcode_excludes['from'],
75
+				$add_excludes
76
+			);
77
+		$this->_specific_shortcode_excludes['content'] = array_merge(
78
+			$this->_specific_shortcode_excludes['content'],
79
+			array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]')
80
+		);
81
+	}
82 82
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     protected function _modify_validator()
34 34
     {
35 35
         if ($this->_context === 'attendee') {
36
-            $this->_valid_shortcodes_modifier[ $this->_context ]['from'] = array(
36
+            $this->_valid_shortcodes_modifier[$this->_context]['from'] = array(
37 37
                 'recipient_details',
38 38
                 'email',
39 39
                 'organization',
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         // excluded shortcodes
44 44
         $fields = array('to', 'from', 'subject', 'content', 'newsletter_content');
45 45
         foreach ($fields as $field) {
46
-            $this->_specific_shortcode_excludes[ $field ] = array(
46
+            $this->_specific_shortcode_excludes[$field] = array(
47 47
                 '[RECIPIENT_REGISTRATION_CODE]',
48 48
                 '[EVENT_AUTHOR_FORMATTED_EMAIL]',
49 49
                 '[EVENT_AUTHOR_EMAIL]',
Please login to merge, or discard this patch.
messages/message_type/newsletter/EE_Newsletter_message_type.class.php 2 patches
Indentation   +190 added lines, -190 removed lines patch added patch discarded remove patch
@@ -13,194 +13,194 @@
 block discarded – undo
13 13
 class EE_Newsletter_message_type extends EE_message_type
14 14
 {
15 15
 
16
-    public function __construct()
17
-    {
18
-        $this->name = 'newsletter';
19
-        $this->description = esc_html__(
20
-            'Batch message type messages are triggered manually by the admin for sending notifications to a selected group of recipients. This should only be used for more general notification type messages that contain information specific for the recipients. For "newsletter" type messages we recommend using an email list service like MailChimp, because sending non-related mail-outs to contacts increases the risk of your site domain getting added to spam lists, which will prevent messages getting to users.',
21
-            'event_espresso'
22
-        );
23
-        $this->label = array(
24
-            'singular' => esc_html__('batch', 'event_espresso'),
25
-            'plural'   => esc_html__('batches', 'event_espresso'),
26
-        );
27
-        $this->_master_templates = array(
28
-            'email' => 'registration',
29
-        );
30
-
31
-        parent::__construct();
32
-    }
33
-
34
-
35
-    /**
36
-     * Sets admin_registered_pages property
37
-     */
38
-    protected function _set_admin_pages()
39
-    {
40
-        $this->admin_registered_pages = array(); // no admin pages to register this with.
41
-    }
42
-
43
-
44
-    /**
45
-     * Sets property related to data handler.
46
-     */
47
-    protected function _set_data_handler()
48
-    {
49
-        $this->_data_handler = 'Registrations';
50
-        $this->_single_message = $this->_data instanceof EE_Registration;
51
-    }
52
-
53
-
54
-    /**
55
-     * Returns the data for the given context for this message type.
56
-     * @param string          $context
57
-     * @param EE_Registration $registration
58
-     * @param int             $id
59
-     * @return array|mixed
60
-     */
61
-    protected function _get_data_for_context($context, EE_Registration $registration, $id)
62
-    {
63
-        // newsletter message type data handler is 'Registrations' and it expects an array of EE_Registration objects.
64
-        return array($registration);
65
-    }
66
-
67
-
68
-    /**
69
-     * Sets the admin settings fields property for this message type.
70
-     */
71
-    protected function _set_admin_settings_fields()
72
-    {
73
-        $this->_admin_settings_fields = array();
74
-    }
75
-
76
-
77
-    /**
78
-     * Sets the contexts for this message type.
79
-     */
80
-    protected function _set_contexts()
81
-    {
82
-        $this->_context_label = array(
83
-            'label'       => esc_html__('recipient', 'event_espresso'),
84
-            'plural'      => esc_html__('recipients', 'event_espresso'),
85
-            'description' => esc_html__('Recipient\'s are who will receive the message.', 'event_espresso'),
86
-        );
87
-
88
-        $this->_contexts = array(
89
-            'attendee' => array(
90
-                'label'       => esc_html__('Registrant', 'event_espresso'),
91
-                'description' => esc_html__('This template goes to selected registrants.', 'event_espresso'),
92
-            ),
93
-        );
94
-    }
95
-
96
-
97
-    /**
98
-     * used to set the valid shortcodes.
99
-     * For the newsletter message type we only have two valid shortcode libraries in use, recipient details and
100
-     * organization.  That's it!
101
-     *
102
-     * @since   4.3.0
103
-     * @return  void
104
-     */
105
-    protected function _set_valid_shortcodes()
106
-    {
107
-        parent::_set_valid_shortcodes();
108
-
109
-        $included_shortcodes = array(
110
-            'recipient_details',
111
-            'organization',
112
-            'newsletter',
113
-        );
114
-
115
-        foreach ($this->_valid_shortcodes as $context => $shortcodes) {
116
-            foreach ($shortcodes as $key => $shortcode) {
117
-                if (! in_array($shortcode, $included_shortcodes, true)) {
118
-                    unset($this->_valid_shortcodes[ $context ][ $key ]);
119
-                }
120
-            }
121
-            $this->_valid_shortcodes[ $context ][] = 'newsletter';
122
-        }
123
-    }
124
-
125
-
126
-    /**
127
-     * Override default _attendee_addressees in EE_message_type because we want to loop through the registrations
128
-     * for EE_message_type.
129
-     *
130
-     * @return array
131
-     * @throws EE_Error
132
-     * @throws InvalidArgumentException
133
-     * @throws ReflectionException
134
-     * @throws \EventEspresso\core\exceptions\InvalidDataTypeException
135
-     * @throws \EventEspresso\core\exceptions\InvalidInterfaceException
136
-     */
137
-    protected function _attendee_addressees()
138
-    {
139
-        $addressee = array();
140
-
141
-        // looping through registrations
142
-        foreach ($this->_data->registrations as $reg_id => $details) {
143
-            // set $attendee array to blank on each loop
144
-            $aee = array();
145
-
146
-            // need to get the attendee from this registration.
147
-            $attendee = isset($details['att_obj']) && $details['att_obj'] instanceof EE_Attendee
148
-                ? $details['att_obj']
149
-                : null;
150
-
151
-            if (! $attendee instanceof EE_Attendee) {
152
-                continue;
153
-            }
154
-
155
-            // set $aee from attendee object
156
-            $aee['att_obj'] = $attendee;
157
-            $aee['reg_objs'] = isset($this->_data->attendees[ $attendee->ID() ]['reg_objs'])
158
-                ? $this->_data->attendees[ $attendee->ID() ]['reg_objs']
159
-                : array();
160
-            $aee['attendee_email'] = $attendee->email();
161
-            $aee['tkt_objs'] = isset($this->_data->attendees[ $attendee->ID() ]['tkt_objs'])
162
-                ? $this->_data->attendees[ $attendee->ID() ]['tkt_objs']
163
-                : array();
164
-
165
-            if (isset($this->_data->attendees[ $attendee->ID() ]['evt_objs'])) {
166
-                $aee['evt_objs'] = $this->_data->attendees[ $attendee->ID() ]['evt_objs'];
167
-                $aee['events'] = $this->_data->attendees[ $attendee->ID() ]['evt_objs'];
168
-            } else {
169
-                $aee['evt_objs'] = $aee['events'] = array();
170
-            }
171
-
172
-            $aee['reg_obj'] = isset($details['reg_obj'])
173
-                ? $details['reg_obj']
174
-                : null;
175
-            $aee['attendees'] = $this->_data->attendees;
176
-
177
-            // merge in the primary attendee data
178
-            $aee = array_merge($this->_default_addressee_data, $aee);
179
-
180
-            // make sure txn is set
181
-            if (empty($aee['txn']) && $aee['reg_obj'] instanceof EE_Registration) {
182
-                $aee['txn'] = $aee['reg_obj']->transaction();
183
-            }
184
-
185
-            $addressee[] = new EE_Messages_Addressee($aee);
186
-        }
187
-        return $addressee;
188
-    }
189
-
190
-    /**
191
-     * Allows a message type to specifically exclude template fields for the provided messenger.
192
-     * Filtered so this can be programmatically altered as well.
193
-     *
194
-     * @param string $messenger_name name of messenger
195
-     * @return array
196
-     */
197
-    public function excludedFieldsForMessenger($messenger_name)
198
-    {
199
-        $excluded_fields = array(
200
-            'email' => array('cc')
201
-        );
202
-        return isset($excluded_fields[ $messenger_name ])
203
-            ? $excluded_fields[ $messenger_name ]
204
-            : parent::excludedFieldsForMessenger($messenger_name);
205
-    }
16
+	public function __construct()
17
+	{
18
+		$this->name = 'newsletter';
19
+		$this->description = esc_html__(
20
+			'Batch message type messages are triggered manually by the admin for sending notifications to a selected group of recipients. This should only be used for more general notification type messages that contain information specific for the recipients. For "newsletter" type messages we recommend using an email list service like MailChimp, because sending non-related mail-outs to contacts increases the risk of your site domain getting added to spam lists, which will prevent messages getting to users.',
21
+			'event_espresso'
22
+		);
23
+		$this->label = array(
24
+			'singular' => esc_html__('batch', 'event_espresso'),
25
+			'plural'   => esc_html__('batches', 'event_espresso'),
26
+		);
27
+		$this->_master_templates = array(
28
+			'email' => 'registration',
29
+		);
30
+
31
+		parent::__construct();
32
+	}
33
+
34
+
35
+	/**
36
+	 * Sets admin_registered_pages property
37
+	 */
38
+	protected function _set_admin_pages()
39
+	{
40
+		$this->admin_registered_pages = array(); // no admin pages to register this with.
41
+	}
42
+
43
+
44
+	/**
45
+	 * Sets property related to data handler.
46
+	 */
47
+	protected function _set_data_handler()
48
+	{
49
+		$this->_data_handler = 'Registrations';
50
+		$this->_single_message = $this->_data instanceof EE_Registration;
51
+	}
52
+
53
+
54
+	/**
55
+	 * Returns the data for the given context for this message type.
56
+	 * @param string          $context
57
+	 * @param EE_Registration $registration
58
+	 * @param int             $id
59
+	 * @return array|mixed
60
+	 */
61
+	protected function _get_data_for_context($context, EE_Registration $registration, $id)
62
+	{
63
+		// newsletter message type data handler is 'Registrations' and it expects an array of EE_Registration objects.
64
+		return array($registration);
65
+	}
66
+
67
+
68
+	/**
69
+	 * Sets the admin settings fields property for this message type.
70
+	 */
71
+	protected function _set_admin_settings_fields()
72
+	{
73
+		$this->_admin_settings_fields = array();
74
+	}
75
+
76
+
77
+	/**
78
+	 * Sets the contexts for this message type.
79
+	 */
80
+	protected function _set_contexts()
81
+	{
82
+		$this->_context_label = array(
83
+			'label'       => esc_html__('recipient', 'event_espresso'),
84
+			'plural'      => esc_html__('recipients', 'event_espresso'),
85
+			'description' => esc_html__('Recipient\'s are who will receive the message.', 'event_espresso'),
86
+		);
87
+
88
+		$this->_contexts = array(
89
+			'attendee' => array(
90
+				'label'       => esc_html__('Registrant', 'event_espresso'),
91
+				'description' => esc_html__('This template goes to selected registrants.', 'event_espresso'),
92
+			),
93
+		);
94
+	}
95
+
96
+
97
+	/**
98
+	 * used to set the valid shortcodes.
99
+	 * For the newsletter message type we only have two valid shortcode libraries in use, recipient details and
100
+	 * organization.  That's it!
101
+	 *
102
+	 * @since   4.3.0
103
+	 * @return  void
104
+	 */
105
+	protected function _set_valid_shortcodes()
106
+	{
107
+		parent::_set_valid_shortcodes();
108
+
109
+		$included_shortcodes = array(
110
+			'recipient_details',
111
+			'organization',
112
+			'newsletter',
113
+		);
114
+
115
+		foreach ($this->_valid_shortcodes as $context => $shortcodes) {
116
+			foreach ($shortcodes as $key => $shortcode) {
117
+				if (! in_array($shortcode, $included_shortcodes, true)) {
118
+					unset($this->_valid_shortcodes[ $context ][ $key ]);
119
+				}
120
+			}
121
+			$this->_valid_shortcodes[ $context ][] = 'newsletter';
122
+		}
123
+	}
124
+
125
+
126
+	/**
127
+	 * Override default _attendee_addressees in EE_message_type because we want to loop through the registrations
128
+	 * for EE_message_type.
129
+	 *
130
+	 * @return array
131
+	 * @throws EE_Error
132
+	 * @throws InvalidArgumentException
133
+	 * @throws ReflectionException
134
+	 * @throws \EventEspresso\core\exceptions\InvalidDataTypeException
135
+	 * @throws \EventEspresso\core\exceptions\InvalidInterfaceException
136
+	 */
137
+	protected function _attendee_addressees()
138
+	{
139
+		$addressee = array();
140
+
141
+		// looping through registrations
142
+		foreach ($this->_data->registrations as $reg_id => $details) {
143
+			// set $attendee array to blank on each loop
144
+			$aee = array();
145
+
146
+			// need to get the attendee from this registration.
147
+			$attendee = isset($details['att_obj']) && $details['att_obj'] instanceof EE_Attendee
148
+				? $details['att_obj']
149
+				: null;
150
+
151
+			if (! $attendee instanceof EE_Attendee) {
152
+				continue;
153
+			}
154
+
155
+			// set $aee from attendee object
156
+			$aee['att_obj'] = $attendee;
157
+			$aee['reg_objs'] = isset($this->_data->attendees[ $attendee->ID() ]['reg_objs'])
158
+				? $this->_data->attendees[ $attendee->ID() ]['reg_objs']
159
+				: array();
160
+			$aee['attendee_email'] = $attendee->email();
161
+			$aee['tkt_objs'] = isset($this->_data->attendees[ $attendee->ID() ]['tkt_objs'])
162
+				? $this->_data->attendees[ $attendee->ID() ]['tkt_objs']
163
+				: array();
164
+
165
+			if (isset($this->_data->attendees[ $attendee->ID() ]['evt_objs'])) {
166
+				$aee['evt_objs'] = $this->_data->attendees[ $attendee->ID() ]['evt_objs'];
167
+				$aee['events'] = $this->_data->attendees[ $attendee->ID() ]['evt_objs'];
168
+			} else {
169
+				$aee['evt_objs'] = $aee['events'] = array();
170
+			}
171
+
172
+			$aee['reg_obj'] = isset($details['reg_obj'])
173
+				? $details['reg_obj']
174
+				: null;
175
+			$aee['attendees'] = $this->_data->attendees;
176
+
177
+			// merge in the primary attendee data
178
+			$aee = array_merge($this->_default_addressee_data, $aee);
179
+
180
+			// make sure txn is set
181
+			if (empty($aee['txn']) && $aee['reg_obj'] instanceof EE_Registration) {
182
+				$aee['txn'] = $aee['reg_obj']->transaction();
183
+			}
184
+
185
+			$addressee[] = new EE_Messages_Addressee($aee);
186
+		}
187
+		return $addressee;
188
+	}
189
+
190
+	/**
191
+	 * Allows a message type to specifically exclude template fields for the provided messenger.
192
+	 * Filtered so this can be programmatically altered as well.
193
+	 *
194
+	 * @param string $messenger_name name of messenger
195
+	 * @return array
196
+	 */
197
+	public function excludedFieldsForMessenger($messenger_name)
198
+	{
199
+		$excluded_fields = array(
200
+			'email' => array('cc')
201
+		);
202
+		return isset($excluded_fields[ $messenger_name ])
203
+			? $excluded_fields[ $messenger_name ]
204
+			: parent::excludedFieldsForMessenger($messenger_name);
205
+	}
206 206
 }
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -114,11 +114,11 @@  discard block
 block discarded – undo
114 114
 
115 115
         foreach ($this->_valid_shortcodes as $context => $shortcodes) {
116 116
             foreach ($shortcodes as $key => $shortcode) {
117
-                if (! in_array($shortcode, $included_shortcodes, true)) {
118
-                    unset($this->_valid_shortcodes[ $context ][ $key ]);
117
+                if ( ! in_array($shortcode, $included_shortcodes, true)) {
118
+                    unset($this->_valid_shortcodes[$context][$key]);
119 119
                 }
120 120
             }
121
-            $this->_valid_shortcodes[ $context ][] = 'newsletter';
121
+            $this->_valid_shortcodes[$context][] = 'newsletter';
122 122
         }
123 123
     }
124 124
 
@@ -148,23 +148,23 @@  discard block
 block discarded – undo
148 148
                 ? $details['att_obj']
149 149
                 : null;
150 150
 
151
-            if (! $attendee instanceof EE_Attendee) {
151
+            if ( ! $attendee instanceof EE_Attendee) {
152 152
                 continue;
153 153
             }
154 154
 
155 155
             // set $aee from attendee object
156 156
             $aee['att_obj'] = $attendee;
157
-            $aee['reg_objs'] = isset($this->_data->attendees[ $attendee->ID() ]['reg_objs'])
158
-                ? $this->_data->attendees[ $attendee->ID() ]['reg_objs']
157
+            $aee['reg_objs'] = isset($this->_data->attendees[$attendee->ID()]['reg_objs'])
158
+                ? $this->_data->attendees[$attendee->ID()]['reg_objs']
159 159
                 : array();
160 160
             $aee['attendee_email'] = $attendee->email();
161
-            $aee['tkt_objs'] = isset($this->_data->attendees[ $attendee->ID() ]['tkt_objs'])
162
-                ? $this->_data->attendees[ $attendee->ID() ]['tkt_objs']
161
+            $aee['tkt_objs'] = isset($this->_data->attendees[$attendee->ID()]['tkt_objs'])
162
+                ? $this->_data->attendees[$attendee->ID()]['tkt_objs']
163 163
                 : array();
164 164
 
165
-            if (isset($this->_data->attendees[ $attendee->ID() ]['evt_objs'])) {
166
-                $aee['evt_objs'] = $this->_data->attendees[ $attendee->ID() ]['evt_objs'];
167
-                $aee['events'] = $this->_data->attendees[ $attendee->ID() ]['evt_objs'];
165
+            if (isset($this->_data->attendees[$attendee->ID()]['evt_objs'])) {
166
+                $aee['evt_objs'] = $this->_data->attendees[$attendee->ID()]['evt_objs'];
167
+                $aee['events'] = $this->_data->attendees[$attendee->ID()]['evt_objs'];
168 168
             } else {
169 169
                 $aee['evt_objs'] = $aee['events'] = array();
170 170
             }
@@ -199,8 +199,8 @@  discard block
 block discarded – undo
199 199
         $excluded_fields = array(
200 200
             'email' => array('cc')
201 201
         );
202
-        return isset($excluded_fields[ $messenger_name ])
203
-            ? $excluded_fields[ $messenger_name ]
202
+        return isset($excluded_fields[$messenger_name])
203
+            ? $excluded_fields[$messenger_name]
204 204
             : parent::excludedFieldsForMessenger($messenger_name);
205 205
     }
206 206
 }
Please login to merge, or discard this patch.
payment_failed/EE_Messages_Email_Payment_Failed_Validator.class.php 2 patches
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -16,37 +16,37 @@
 block discarded – undo
16 16
 {
17 17
 
18 18
 
19
-    public function __construct($fields, $context)
20
-    {
21
-        $this->_m_name = 'email';
22
-        $this->_mt_name = 'payment_failed';
23
-
24
-        parent::__construct($fields, $context);
25
-    }
26
-
27
-    /**
28
-     * at this point no custom validation needed for this messenger/message_type combo.
29
-     */
30
-    protected function _modify_validator()
31
-    {
32
-        $new_config = $this->_messenger->get_validator_config();
33
-
34
-        // modify just event_list
35
-        $new_config['event_list'] = array(
36
-            'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization','recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list')
37
-            );
38
-        $new_config['ticket_list'] = array(
39
-            'shortcodes' => array('event_list', 'attendee_list', 'ticket', 'datetime_list', 'recipient_details', 'transaction')
40
-            );
41
-        $new_config['content'] = array(
42
-            'shortcodes' => array('event_list','attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger')
43
-            );
44
-        $this->_messenger->set_validator_config($new_config);
45
-
46
-        if ($this->_context != 'admin') {
47
-            $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');
48
-        }
49
-
50
-        $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
51
-    }
19
+	public function __construct($fields, $context)
20
+	{
21
+		$this->_m_name = 'email';
22
+		$this->_mt_name = 'payment_failed';
23
+
24
+		parent::__construct($fields, $context);
25
+	}
26
+
27
+	/**
28
+	 * at this point no custom validation needed for this messenger/message_type combo.
29
+	 */
30
+	protected function _modify_validator()
31
+	{
32
+		$new_config = $this->_messenger->get_validator_config();
33
+
34
+		// modify just event_list
35
+		$new_config['event_list'] = array(
36
+			'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization','recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list')
37
+			);
38
+		$new_config['ticket_list'] = array(
39
+			'shortcodes' => array('event_list', 'attendee_list', 'ticket', 'datetime_list', 'recipient_details', 'transaction')
40
+			);
41
+		$new_config['content'] = array(
42
+			'shortcodes' => array('event_list','attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger')
43
+			);
44
+		$this->_messenger->set_validator_config($new_config);
45
+
46
+		if ($this->_context != 'admin') {
47
+			$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');
48
+		}
49
+
50
+		$this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
51
+	}
52 52
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,18 +32,18 @@
 block discarded – undo
32 32
 
33 33
         // modify just event_list
34 34
         $new_config['event_list'] = array(
35
-            'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization','recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list')
35
+            'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list')
36 36
             );
37 37
         $new_config['ticket_list'] = array(
38 38
             'shortcodes' => array('event_list', 'attendee_list', 'ticket', 'datetime_list', 'recipient_details', 'transaction')
39 39
             );
40 40
         $new_config['content'] = array(
41
-            'shortcodes' => array('event_list','attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger')
41
+            'shortcodes' => array('event_list', 'attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger')
42 42
             );
43 43
         $this->_messenger->set_validator_config($new_config);
44 44
 
45 45
         if ($this->_context != 'admin') {
46
-            $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');
46
+            $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');
47 47
         }
48 48
 
49 49
         $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
Please login to merge, or discard this patch.
cancelled_registration/EE_Cancelled_Registration_message_type.class.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,8 +67,8 @@
 block discarded – undo
67 67
 
68 68
         // remove unwanted transaction shortcode
69 69
         foreach ($this->_valid_shortcodes as $context => $shortcodes) {
70
-            if (($key = array_search('transaction', $shortcodes) ) !== false) {
71
-                unset($this->_valid_shortcodes[ $context ][ $key ]);
70
+            if (($key = array_search('transaction', $shortcodes)) !== false) {
71
+                unset($this->_valid_shortcodes[$context][$key]);
72 72
             }
73 73
         }
74 74
     }
Please login to merge, or discard this patch.
Indentation   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -15,61 +15,61 @@
 block discarded – undo
15 15
 class EE_Cancelled_Registration_message_type extends EE_Registration_Base_message_type
16 16
 {
17 17
 
18
-    public function __construct()
19
-    {
20
-        $this->name = 'cancelled_registration';
21
-        $this->description = esc_html__('This message type is for messages sent to registrants when their registration is cancelled.', 'event_espresso');
22
-        $this->label = array(
23
-            'singular' => esc_html__('registration cancelled', 'event_espresso'),
24
-            'plural' => esc_html__('registrations cancelled', 'event_espresso')
25
-            );
26
-        $this->_master_templates = array(
27
-            'email' => 'not_approved_registration'
28
-            );
29
-        parent::__construct();
30
-    }
18
+	public function __construct()
19
+	{
20
+		$this->name = 'cancelled_registration';
21
+		$this->description = esc_html__('This message type is for messages sent to registrants when their registration is cancelled.', 'event_espresso');
22
+		$this->label = array(
23
+			'singular' => esc_html__('registration cancelled', 'event_espresso'),
24
+			'plural' => esc_html__('registrations cancelled', 'event_espresso')
25
+			);
26
+		$this->_master_templates = array(
27
+			'email' => 'not_approved_registration'
28
+			);
29
+		parent::__construct();
30
+	}
31 31
 
32 32
 
33 33
 
34 34
 
35
-    /**
36
-     * _set_contexts
37
-     * This sets up the contexts associated with the message_type
38
-     *
39
-     * @access  protected
40
-     * @return  void
41
-     */
42
-    protected function _set_contexts()
43
-    {
44
-        $this->_context_label = array(
45
-            'label' => esc_html__('recipient', 'event_espresso'),
46
-            'plural' => esc_html__('recipients', 'event_espresso'),
47
-            'description' => esc_html__('Recipient\'s are who will receive the template.  You may want different registration details sent out depending on who the recipient is', 'event_espresso')
48
-            );
35
+	/**
36
+	 * _set_contexts
37
+	 * This sets up the contexts associated with the message_type
38
+	 *
39
+	 * @access  protected
40
+	 * @return  void
41
+	 */
42
+	protected function _set_contexts()
43
+	{
44
+		$this->_context_label = array(
45
+			'label' => esc_html__('recipient', 'event_espresso'),
46
+			'plural' => esc_html__('recipients', 'event_espresso'),
47
+			'description' => esc_html__('Recipient\'s are who will receive the template.  You may want different registration details sent out depending on who the recipient is', 'event_espresso')
48
+			);
49 49
 
50
-        $this->_contexts = array(
51
-            'admin' => array(
52
-                'label' => esc_html__('Event Admin', 'event_espresso'),
53
-                'description' => esc_html__('This template is what event administrators will receive with an cancelled registration', 'event_espresso')
54
-                ),
55
-            'attendee' => array(
56
-                'label' => esc_html__('Registrant', 'event_espresso'),
57
-                'description' => esc_html__('This template is what each registrant for the event will receive when their registration is cancelled.', 'event_espresso')
58
-                )
59
-            );
60
-    }
50
+		$this->_contexts = array(
51
+			'admin' => array(
52
+				'label' => esc_html__('Event Admin', 'event_espresso'),
53
+				'description' => esc_html__('This template is what event administrators will receive with an cancelled registration', 'event_espresso')
54
+				),
55
+			'attendee' => array(
56
+				'label' => esc_html__('Registrant', 'event_espresso'),
57
+				'description' => esc_html__('This template is what each registrant for the event will receive when their registration is cancelled.', 'event_espresso')
58
+				)
59
+			);
60
+	}
61 61
 
62 62
 
63 63
 
64
-    protected function _set_valid_shortcodes()
65
-    {
66
-        parent::_set_valid_shortcodes();
64
+	protected function _set_valid_shortcodes()
65
+	{
66
+		parent::_set_valid_shortcodes();
67 67
 
68
-        // remove unwanted transaction shortcode
69
-        foreach ($this->_valid_shortcodes as $context => $shortcodes) {
70
-            if (($key = array_search('transaction', $shortcodes) ) !== false) {
71
-                unset($this->_valid_shortcodes[ $context ][ $key ]);
72
-            }
73
-        }
74
-    }
68
+		// remove unwanted transaction shortcode
69
+		foreach ($this->_valid_shortcodes as $context => $shortcodes) {
70
+			if (($key = array_search('transaction', $shortcodes) ) !== false) {
71
+				unset($this->_valid_shortcodes[ $context ][ $key ]);
72
+			}
73
+		}
74
+	}
75 75
 }
Please login to merge, or discard this patch.
EE_Messages_Email_Cancelled_Registration_Validator.class.php 2 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -15,30 +15,30 @@
 block discarded – undo
15 15
 {
16 16
 
17 17
 
18
-    public function __construct($fields, $context)
19
-    {
20
-        $this->_m_name = 'email';
21
-        $this->_mt_name = 'cancelled_registration';
18
+	public function __construct($fields, $context)
19
+	{
20
+		$this->_m_name = 'email';
21
+		$this->_mt_name = 'cancelled_registration';
22 22
 
23
-        parent::__construct($fields, $context);
24
-    }
23
+		parent::__construct($fields, $context);
24
+	}
25 25
 
26
-    /**
27
-     * custom validator (will override what was originally set by the message_type and messenger)
28
-     */
29
-    protected function _modify_validator()
30
-    {
31
-        $new_config = $this->_messenger->get_validator_config();
32
-        $new_config['event_list'] = array(
33
-            'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'),
34
-            'required' => array('[EVENT_LIST]')
35
-            );
36
-        $this->_messenger->set_validator_config($new_config);
26
+	/**
27
+	 * custom validator (will override what was originally set by the message_type and messenger)
28
+	 */
29
+	protected function _modify_validator()
30
+	{
31
+		$new_config = $this->_messenger->get_validator_config();
32
+		$new_config['event_list'] = array(
33
+			'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'),
34
+			'required' => array('[EVENT_LIST]')
35
+			);
36
+		$this->_messenger->set_validator_config($new_config);
37 37
 
38
-        if ($this->_context != 'admin') {
39
-            $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');
40
-        }
38
+		if ($this->_context != 'admin') {
39
+			$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');
40
+		}
41 41
 
42
-        $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
43
-    }
42
+		$this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
43
+	}
44 44
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
         $this->_messenger->set_validator_config($new_config);
39 39
 
40 40
         if ($this->_context != 'admin') {
41
-            $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');
41
+            $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');
42 42
         }
43 43
 
44 44
         $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
Please login to merge, or discard this patch.