Completed
Branch rest-authorization (c7240a)
by
unknown
02:23
created
caffeinated/admin/new/pricing/Pricing_Admin_Page_Init.core.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -30,15 +30,15 @@
 block discarded – undo
30 30
         define('PRICING_PG_SLUG', 'pricing');
31 31
         define('PRICING_LABEL', esc_html__('Pricing', 'event_espresso'));
32 32
         define('PRICING_PG_NAME', ucwords(str_replace('_', '', PRICING_PG_SLUG)));
33
-        define('PRICING_ADMIN', EE_CORE_CAF_ADMIN . 'new/' . PRICING_PG_SLUG . '/');
34
-        define('PRICING_ADMIN_URL', admin_url('admin.php?page=' . PRICING_PG_SLUG));
35
-        define('PRICING_ASSETS_PATH', PRICING_ADMIN . 'assets/');
36
-        define('PRICING_ASSETS_URL', EE_CORE_CAF_ADMIN_URL . 'new/' . PRICING_PG_SLUG . '/assets/');
37
-        define('PRICING_TEMPLATE_PATH', PRICING_ADMIN . 'templates/');
38
-        define('PRICING_TEMPLATE_URL', EE_CORE_CAF_ADMIN_URL . 'new/' . PRICING_PG_SLUG . '/templates/');
33
+        define('PRICING_ADMIN', EE_CORE_CAF_ADMIN.'new/'.PRICING_PG_SLUG.'/');
34
+        define('PRICING_ADMIN_URL', admin_url('admin.php?page='.PRICING_PG_SLUG));
35
+        define('PRICING_ASSETS_PATH', PRICING_ADMIN.'assets/');
36
+        define('PRICING_ASSETS_URL', EE_CORE_CAF_ADMIN_URL.'new/'.PRICING_PG_SLUG.'/assets/');
37
+        define('PRICING_TEMPLATE_PATH', PRICING_ADMIN.'templates/');
38
+        define('PRICING_TEMPLATE_URL', EE_CORE_CAF_ADMIN_URL.'new/'.PRICING_PG_SLUG.'/templates/');
39 39
 
40 40
         parent::__construct();
41
-        $this->_folder_path = EE_CORE_CAF_ADMIN . 'new/' . $this->_folder_name . '/';
41
+        $this->_folder_path = EE_CORE_CAF_ADMIN.'new/'.$this->_folder_name.'/';
42 42
     }
43 43
 
44 44
 
Please login to merge, or discard this patch.
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -13,52 +13,52 @@
 block discarded – undo
13 13
  */
14 14
 class Pricing_Admin_Page_Init extends EE_Admin_Page_Init
15 15
 {
16
-    /**
17
-     *        constructor
18
-     *
19
-     * @Constructor
20
-     * @access public
21
-     * @return Pricing_Admin_Page_Init
22
-     */
23
-    public function __construct()
24
-    {
16
+	/**
17
+	 *        constructor
18
+	 *
19
+	 * @Constructor
20
+	 * @access public
21
+	 * @return Pricing_Admin_Page_Init
22
+	 */
23
+	public function __construct()
24
+	{
25 25
 
26
-        do_action('AHEE_log', __FILE__, __FUNCTION__, '');
26
+		do_action('AHEE_log', __FILE__, __FUNCTION__, '');
27 27
 
28
-        define('PRICING_PG_SLUG', 'pricing');
29
-        define('PRICING_LABEL', esc_html__('Pricing', 'event_espresso'));
30
-        define('PRICING_PG_NAME', ucwords(str_replace('_', '', PRICING_PG_SLUG)));
31
-        define('PRICING_ADMIN', EE_CORE_CAF_ADMIN . 'new/' . PRICING_PG_SLUG . '/');
32
-        define('PRICING_ADMIN_URL', admin_url('admin.php?page=' . PRICING_PG_SLUG));
33
-        define('PRICING_ASSETS_PATH', PRICING_ADMIN . 'assets/');
34
-        define('PRICING_ASSETS_URL', EE_CORE_CAF_ADMIN_URL . 'new/' . PRICING_PG_SLUG . '/assets/');
35
-        define('PRICING_TEMPLATE_PATH', PRICING_ADMIN . 'templates/');
36
-        define('PRICING_TEMPLATE_URL', EE_CORE_CAF_ADMIN_URL . 'new/' . PRICING_PG_SLUG . '/templates/');
28
+		define('PRICING_PG_SLUG', 'pricing');
29
+		define('PRICING_LABEL', esc_html__('Pricing', 'event_espresso'));
30
+		define('PRICING_PG_NAME', ucwords(str_replace('_', '', PRICING_PG_SLUG)));
31
+		define('PRICING_ADMIN', EE_CORE_CAF_ADMIN . 'new/' . PRICING_PG_SLUG . '/');
32
+		define('PRICING_ADMIN_URL', admin_url('admin.php?page=' . PRICING_PG_SLUG));
33
+		define('PRICING_ASSETS_PATH', PRICING_ADMIN . 'assets/');
34
+		define('PRICING_ASSETS_URL', EE_CORE_CAF_ADMIN_URL . 'new/' . PRICING_PG_SLUG . '/assets/');
35
+		define('PRICING_TEMPLATE_PATH', PRICING_ADMIN . 'templates/');
36
+		define('PRICING_TEMPLATE_URL', EE_CORE_CAF_ADMIN_URL . 'new/' . PRICING_PG_SLUG . '/templates/');
37 37
 
38
-        parent::__construct();
39
-        $this->_folder_path = EE_CORE_CAF_ADMIN . 'new/' . $this->_folder_name . '/';
40
-    }
38
+		parent::__construct();
39
+		$this->_folder_path = EE_CORE_CAF_ADMIN . 'new/' . $this->_folder_name . '/';
40
+	}
41 41
 
42 42
 
43
-    protected function _set_init_properties()
44
-    {
45
-        $this->label = PRICING_LABEL;
46
-    }
43
+	protected function _set_init_properties()
44
+	{
45
+		$this->label = PRICING_LABEL;
46
+	}
47 47
 
48 48
 
49
-    protected function _set_menu_map()
50
-    {
51
-        $this->_menu_map = new EE_Admin_Page_Sub_Menu(
52
-            array(
53
-                'menu_group'      => 'management',
54
-                'menu_order'      => 20,
55
-                'show_on_menu'    => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY,
56
-                'parent_slug'     => 'espresso_events',
57
-                'menu_slug'       => PRICING_PG_SLUG,
58
-                'menu_label'      => PRICING_LABEL,
59
-                'capability'      => 'ee_read_default_prices',
60
-                'admin_init_page' => $this,
61
-            )
62
-        );
63
-    }
49
+	protected function _set_menu_map()
50
+	{
51
+		$this->_menu_map = new EE_Admin_Page_Sub_Menu(
52
+			array(
53
+				'menu_group'      => 'management',
54
+				'menu_order'      => 20,
55
+				'show_on_menu'    => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY,
56
+				'parent_slug'     => 'espresso_events',
57
+				'menu_slug'       => PRICING_PG_SLUG,
58
+				'menu_label'      => PRICING_LABEL,
59
+				'capability'      => 'ee_read_default_prices',
60
+				'admin_init_page' => $this,
61
+			)
62
+		);
63
+	}
64 64
 }
Please login to merge, or discard this patch.
caffeinated/admin/new/tickets/Tickets_Admin_Page_Init.core.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -42,15 +42,15 @@
 block discarded – undo
42 42
 
43 43
         define('TICKETS_PG_SLUG', 'tickets');
44 44
         define('TICKETS_LABEL', esc_html__('Default Tickets', 'event_espresso'));
45
-        define('TICKETS_ADMIN', EE_CORE_CAF_ADMIN . 'new/' . TICKETS_PG_SLUG . '/');
46
-        define('TICKETS_ADMIN_URL', admin_url('admin.php?page=' . TICKETS_PG_SLUG));
47
-        define('TICKETS_ASSETS_PATH', TICKETS_ADMIN . 'assets/');
48
-        define('TICKETS_ASSETS_URL', EE_CORE_CAF_ADMIN_URL . 'new/' . TICKETS_PG_SLUG . '/assets/');
49
-        define('TICKETS_TEMPLATE_PATH', TICKETS_ADMIN . 'templates/');
50
-        define('TICKETS_TEMPLATE_URL', EE_CORE_CAF_ADMIN_URL . 'new/' . TICKETS_PG_SLUG . '/templates/');
45
+        define('TICKETS_ADMIN', EE_CORE_CAF_ADMIN.'new/'.TICKETS_PG_SLUG.'/');
46
+        define('TICKETS_ADMIN_URL', admin_url('admin.php?page='.TICKETS_PG_SLUG));
47
+        define('TICKETS_ASSETS_PATH', TICKETS_ADMIN.'assets/');
48
+        define('TICKETS_ASSETS_URL', EE_CORE_CAF_ADMIN_URL.'new/'.TICKETS_PG_SLUG.'/assets/');
49
+        define('TICKETS_TEMPLATE_PATH', TICKETS_ADMIN.'templates/');
50
+        define('TICKETS_TEMPLATE_URL', EE_CORE_CAF_ADMIN_URL.'new/'.TICKETS_PG_SLUG.'/templates/');
51 51
 
52 52
         parent::__construct();
53
-        $this->_folder_path = EE_CORE_CAF_ADMIN . 'new/' . $this->_folder_name . DS;
53
+        $this->_folder_path = EE_CORE_CAF_ADMIN.'new/'.$this->_folder_name.DS;
54 54
     }
55 55
 
56 56
 
Please login to merge, or discard this patch.
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -26,51 +26,51 @@
 block discarded – undo
26 26
  */
27 27
 class Tickets_Admin_Page_Init extends EE_Admin_Page_Init
28 28
 {
29
-    /**
30
-     *        constructor
31
-     *
32
-     * @Constructor
33
-     * @access public
34
-     * @return void
35
-     */
36
-    public function __construct()
37
-    {
29
+	/**
30
+	 *        constructor
31
+	 *
32
+	 * @Constructor
33
+	 * @access public
34
+	 * @return void
35
+	 */
36
+	public function __construct()
37
+	{
38 38
 
39
-        do_action('AHEE_log', __FILE__, __FUNCTION__, '');
39
+		do_action('AHEE_log', __FILE__, __FUNCTION__, '');
40 40
 
41
-        define('TICKETS_PG_SLUG', 'tickets');
42
-        define('TICKETS_LABEL', esc_html__('Default Tickets', 'event_espresso'));
43
-        define('TICKETS_ADMIN', EE_CORE_CAF_ADMIN . 'new/' . TICKETS_PG_SLUG . '/');
44
-        define('TICKETS_ADMIN_URL', admin_url('admin.php?page=' . TICKETS_PG_SLUG));
45
-        define('TICKETS_ASSETS_PATH', TICKETS_ADMIN . 'assets/');
46
-        define('TICKETS_ASSETS_URL', EE_CORE_CAF_ADMIN_URL . 'new/' . TICKETS_PG_SLUG . '/assets/');
47
-        define('TICKETS_TEMPLATE_PATH', TICKETS_ADMIN . 'templates/');
48
-        define('TICKETS_TEMPLATE_URL', EE_CORE_CAF_ADMIN_URL . 'new/' . TICKETS_PG_SLUG . '/templates/');
41
+		define('TICKETS_PG_SLUG', 'tickets');
42
+		define('TICKETS_LABEL', esc_html__('Default Tickets', 'event_espresso'));
43
+		define('TICKETS_ADMIN', EE_CORE_CAF_ADMIN . 'new/' . TICKETS_PG_SLUG . '/');
44
+		define('TICKETS_ADMIN_URL', admin_url('admin.php?page=' . TICKETS_PG_SLUG));
45
+		define('TICKETS_ASSETS_PATH', TICKETS_ADMIN . 'assets/');
46
+		define('TICKETS_ASSETS_URL', EE_CORE_CAF_ADMIN_URL . 'new/' . TICKETS_PG_SLUG . '/assets/');
47
+		define('TICKETS_TEMPLATE_PATH', TICKETS_ADMIN . 'templates/');
48
+		define('TICKETS_TEMPLATE_URL', EE_CORE_CAF_ADMIN_URL . 'new/' . TICKETS_PG_SLUG . '/templates/');
49 49
 
50
-        parent::__construct();
51
-        $this->_folder_path = EE_CORE_CAF_ADMIN . 'new/' . $this->_folder_name . DS;
52
-    }
50
+		parent::__construct();
51
+		$this->_folder_path = EE_CORE_CAF_ADMIN . 'new/' . $this->_folder_name . DS;
52
+	}
53 53
 
54 54
 
55
-    protected function _set_init_properties()
56
-    {
57
-        $this->label = TICKETS_LABEL;
58
-    }
55
+	protected function _set_init_properties()
56
+	{
57
+		$this->label = TICKETS_LABEL;
58
+	}
59 59
 
60 60
 
61
-    protected function _set_menu_map()
62
-    {
63
-        $this->_menu_map = new EE_Admin_Page_Sub_Menu(
64
-            array(
65
-                'menu_group'      => 'management',
66
-                'menu_order'      => 15,
67
-                'show_on_menu'    => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY,
68
-                'parent_slug'     => 'espresso_events',
69
-                'menu_slug'       => TICKETS_PG_SLUG,
70
-                'menu_label'      => TICKETS_LABEL,
71
-                'capability'      => 'ee_read_default_tickets',
72
-                'admin_init_page' => $this,
73
-            )
74
-        );
75
-    }
61
+	protected function _set_menu_map()
62
+	{
63
+		$this->_menu_map = new EE_Admin_Page_Sub_Menu(
64
+			array(
65
+				'menu_group'      => 'management',
66
+				'menu_order'      => 15,
67
+				'show_on_menu'    => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY,
68
+				'parent_slug'     => 'espresso_events',
69
+				'menu_slug'       => TICKETS_PG_SLUG,
70
+				'menu_label'      => TICKETS_LABEL,
71
+				'capability'      => 'ee_read_default_tickets',
72
+				'admin_init_page' => $this,
73
+			)
74
+		);
75
+	}
76 76
 }
Please login to merge, or discard this patch.
message_type/newsletter/EE_Messages_Contacts_incoming_data.class.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
         // validate that the first element in the array is an EE_Attendee object.  Note that the array may be indexed by REG_ID so we will just shift off the first element.
28 28
         $ctc_chk = reset($data);
29
-        if (! $ctc_chk instanceof EE_Attendee) {
29
+        if ( ! $ctc_chk instanceof EE_Attendee) {
30 30
             throw new EE_Error(esc_html__('The EE_Message_Contacts_incoming_data class expects an array of EE_Attendee objects.', 'event_espresso'));
31 31
         }
32 32
 
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     {
44 44
         $attendee_ids = array_filter(
45 45
             array_map(
46
-                function ($attendee) {
46
+                function($attendee) {
47 47
                     if ($attendee instanceof EE_Attendee) {
48 48
                         return $attendee->ID();
49 49
                     }
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         $attendee_ids = (array) $attendee_ids;
69 69
         $attendees = EEM_Attendee::instance()->get_all(
70 70
             array(
71
-              array( 'ATT_ID' => array( 'IN', $attendee_ids ) )
71
+              array('ATT_ID' => array('IN', $attendee_ids))
72 72
             )
73 73
         );
74 74
         return $attendees;
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         $this->payment = null;
99 99
         $this->billing = array();
100 100
         $this->reg_objs = array();
101
-        $this->attendees = $this->events = $this->tickets = $this->datetimes = $this->questions = $this->answer =  $this->registrations = array();
101
+        $this->attendees = $this->events = $this->tickets = $this->datetimes = $this->questions = $this->answer = $this->registrations = array();
102 102
         $this->total_ticket_count = 0;
103 103
         $this->primary_attendee_data = array(
104 104
             'registration_id' => 0,
@@ -111,11 +111,11 @@  discard block
 block discarded – undo
111 111
         foreach ($this->_data as $contact) {
112 112
             $id = $contact->ID();
113 113
             $reg = $contact->get_first_related('Registration');
114
-            $this->attendees[ $id ]['att_obj'] = $contact;
115
-            $this->attendees[ $id ]['reg_objs'][ $reg->ID() ] = $reg;
116
-            $this->attendees[ $id ]['attendee_email'] = $contact->email();
117
-            $this->attendees[ $id ]['tkt_objs'] = array();
118
-            $this->attendees[ $id ]['evt_objs'] = array();
114
+            $this->attendees[$id]['att_obj'] = $contact;
115
+            $this->attendees[$id]['reg_objs'][$reg->ID()] = $reg;
116
+            $this->attendees[$id]['attendee_email'] = $contact->email();
117
+            $this->attendees[$id]['tkt_objs'] = array();
118
+            $this->attendees[$id]['evt_objs'] = array();
119 119
         }
120 120
     }
121 121
 }
Please login to merge, or discard this patch.
Indentation   +91 added lines, -91 removed lines patch added patch discarded remove patch
@@ -11,109 +11,109 @@
 block discarded – undo
11 11
  */
12 12
 class EE_Messages_Contacts_incoming_data extends EE_Messages_incoming_data
13 13
 {
14
-    /**
15
-     * Constructor.
16
-     *
17
-     * @since    4.3.0
18
-     * @param  EE_Attendee[]     $data expecting an array of EE_Attendee objects.
19
-     * @throws EE_Error
20
-     * @access protected
21
-     */
22
-    public function __construct($data = array())
23
-    {
14
+	/**
15
+	 * Constructor.
16
+	 *
17
+	 * @since    4.3.0
18
+	 * @param  EE_Attendee[]     $data expecting an array of EE_Attendee objects.
19
+	 * @throws EE_Error
20
+	 * @access protected
21
+	 */
22
+	public function __construct($data = array())
23
+	{
24 24
 
25
-        // validate that the first element in the array is an EE_Attendee object.  Note that the array may be indexed by REG_ID so we will just shift off the first element.
26
-        $ctc_chk = reset($data);
27
-        if (! $ctc_chk instanceof EE_Attendee) {
28
-            throw new EE_Error(esc_html__('The EE_Message_Contacts_incoming_data class expects an array of EE_Attendee objects.', 'event_espresso'));
29
-        }
25
+		// validate that the first element in the array is an EE_Attendee object.  Note that the array may be indexed by REG_ID so we will just shift off the first element.
26
+		$ctc_chk = reset($data);
27
+		if (! $ctc_chk instanceof EE_Attendee) {
28
+			throw new EE_Error(esc_html__('The EE_Message_Contacts_incoming_data class expects an array of EE_Attendee objects.', 'event_espresso'));
29
+		}
30 30
 
31
-        parent::__construct($data);
32
-    }
31
+		parent::__construct($data);
32
+	}
33 33
 
34 34
 
35
-    /**
36
-     * @see parent class for phpdocs.
37
-     * @param array $attendees
38
-     * @return array
39
-     */
40
-    public static function convert_data_for_persistent_storage($attendees)
41
-    {
42
-        $attendee_ids = array_filter(
43
-            array_map(
44
-                function ($attendee) {
45
-                    if ($attendee instanceof EE_Attendee) {
46
-                        return $attendee->ID();
47
-                    }
48
-                    return false;
49
-                },
50
-                $attendees
51
-            )
52
-        );
53
-        return $attendee_ids;
54
-    }
35
+	/**
36
+	 * @see parent class for phpdocs.
37
+	 * @param array $attendees
38
+	 * @return array
39
+	 */
40
+	public static function convert_data_for_persistent_storage($attendees)
41
+	{
42
+		$attendee_ids = array_filter(
43
+			array_map(
44
+				function ($attendee) {
45
+					if ($attendee instanceof EE_Attendee) {
46
+						return $attendee->ID();
47
+					}
48
+					return false;
49
+				},
50
+				$attendees
51
+			)
52
+		);
53
+		return $attendee_ids;
54
+	}
55 55
 
56 56
 
57 57
 
58 58
 
59
-    /**
60
-     * @see parent class for phpdocs
61
-     * @param array $attendee_ids
62
-     * @return EE_Attendee[]
63
-     */
64
-    public static function convert_data_from_persistent_storage($attendee_ids)
65
-    {
66
-        $attendee_ids = (array) $attendee_ids;
67
-        $attendees = EEM_Attendee::instance()->get_all(
68
-            array(
69
-              array( 'ATT_ID' => array( 'IN', $attendee_ids ) )
70
-            )
71
-        );
72
-        return $attendees;
73
-    }
59
+	/**
60
+	 * @see parent class for phpdocs
61
+	 * @param array $attendee_ids
62
+	 * @return EE_Attendee[]
63
+	 */
64
+	public static function convert_data_from_persistent_storage($attendee_ids)
65
+	{
66
+		$attendee_ids = (array) $attendee_ids;
67
+		$attendees = EEM_Attendee::instance()->get_all(
68
+			array(
69
+			  array( 'ATT_ID' => array( 'IN', $attendee_ids ) )
70
+			)
71
+		);
72
+		return $attendees;
73
+	}
74 74
 
75 75
 
76 76
 
77 77
 
78
-    /**
79
-     * setup the data.
80
-     *
81
-     * Sets up the expected data object for the messages prep using incoming registration objects.
82
-     *
83
-     * @since   4.3.0
84
-     *
85
-     * @return void
86
-     * @access protected
87
-     */
88
-    protected function _setup_data()
89
-    {
78
+	/**
79
+	 * setup the data.
80
+	 *
81
+	 * Sets up the expected data object for the messages prep using incoming registration objects.
82
+	 *
83
+	 * @since   4.3.0
84
+	 *
85
+	 * @return void
86
+	 * @access protected
87
+	 */
88
+	protected function _setup_data()
89
+	{
90 90
 
91
-        // we'll loop through each contact and setup the data needed.  Note that many properties will just be set as empty because the contacts data handler is for a very specific set of data (i.e. just what's related to the contact).
92
-        $this->txn = null;
93
-        $this->taxes = null;
94
-        $this->grand_total_price_object = '';
95
-        $this->user_id = $this->ip_address = $this->user_agent = $this->init_access = '';
96
-        $this->payment = null;
97
-        $this->billing = array();
98
-        $this->reg_objs = array();
99
-        $this->attendees = $this->events = $this->tickets = $this->datetimes = $this->questions = $this->answer =  $this->registrations = array();
100
-        $this->total_ticket_count = 0;
101
-        $this->primary_attendee_data = array(
102
-            'registration_id' => 0,
103
-            'att_obj' => null,
104
-            'reg_obj' => null,
105
-            'primary_att_obj' => null,
106
-            'primary_reg_obj' => null
107
-            );
91
+		// we'll loop through each contact and setup the data needed.  Note that many properties will just be set as empty because the contacts data handler is for a very specific set of data (i.e. just what's related to the contact).
92
+		$this->txn = null;
93
+		$this->taxes = null;
94
+		$this->grand_total_price_object = '';
95
+		$this->user_id = $this->ip_address = $this->user_agent = $this->init_access = '';
96
+		$this->payment = null;
97
+		$this->billing = array();
98
+		$this->reg_objs = array();
99
+		$this->attendees = $this->events = $this->tickets = $this->datetimes = $this->questions = $this->answer =  $this->registrations = array();
100
+		$this->total_ticket_count = 0;
101
+		$this->primary_attendee_data = array(
102
+			'registration_id' => 0,
103
+			'att_obj' => null,
104
+			'reg_obj' => null,
105
+			'primary_att_obj' => null,
106
+			'primary_reg_obj' => null
107
+			);
108 108
 
109
-        foreach ($this->_data as $contact) {
110
-            $id = $contact->ID();
111
-            $reg = $contact->get_first_related('Registration');
112
-            $this->attendees[ $id ]['att_obj'] = $contact;
113
-            $this->attendees[ $id ]['reg_objs'][ $reg->ID() ] = $reg;
114
-            $this->attendees[ $id ]['attendee_email'] = $contact->email();
115
-            $this->attendees[ $id ]['tkt_objs'] = array();
116
-            $this->attendees[ $id ]['evt_objs'] = array();
117
-        }
118
-    }
109
+		foreach ($this->_data as $contact) {
110
+			$id = $contact->ID();
111
+			$reg = $contact->get_first_related('Registration');
112
+			$this->attendees[ $id ]['att_obj'] = $contact;
113
+			$this->attendees[ $id ]['reg_objs'][ $reg->ID() ] = $reg;
114
+			$this->attendees[ $id ]['attendee_email'] = $contact->email();
115
+			$this->attendees[ $id ]['tkt_objs'] = array();
116
+			$this->attendees[ $id ]['evt_objs'] = array();
117
+		}
118
+	}
119 119
 }
Please login to merge, or discard this patch.
message_type/payment_reminder/EE_Payment_Reminder_message_type.class.php 1 patch
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -15,49 +15,49 @@
 block discarded – undo
15 15
 class EE_Payment_Reminder_message_type extends EE_Payment_Base_message_type
16 16
 {
17 17
 
18
-    public function __construct()
19
-    {
20
-
21
-        // setup type details for reference
22
-        $this->name = 'payment_reminder';
23
-        $this->description = esc_html__('This message type is used for all payment reminder messages.  These are triggered when an offline gateway registration is completed or when manually triggered via event administrators via the transaction admin page(s).', 'event_espresso');
24
-        $this->label = array(
25
-            'singular' => esc_html__('payment reminder', 'event_espresso'),
26
-            'plural' => esc_html__('payment reminders', 'event_espresso')
27
-            );
28
-        $this->_master_templates = array(
29
-            'email' => 'payment'
30
-            );
31
-
32
-        parent::__construct();
33
-    }
34
-
35
-
36
-
37
-    /**
38
-     * _set_contexts
39
-     * This sets up the contexts associated with the message_type
40
-     *
41
-     * @access  protected
42
-     * @return  void
43
-     */
44
-    protected function _set_contexts()
45
-    {
46
-        $this->_context_label = array(
47
-            'label' => esc_html__('recipient', 'event_espresso'),
48
-            'plural' => esc_html__('recipients', 'event_espresso'),
49
-            'description' => esc_html__('Recipient\'s are who will receive the template.  You may want different payment details sent out depending on who the recipient is', 'event_espresso')
50
-            );
51
-
52
-        $this->_contexts = array(
53
-            'admin' => array(
54
-                'label' => esc_html__('Event Admin', 'event_espresso'),
55
-                'description' => esc_html__('This template is what event administrators will receive on a successful payment', 'event_espresso')
56
-                ),
57
-            'primary_attendee' => array(
58
-                'label' => esc_html__('Primary Registrant', 'event_espresso'),
59
-                'description' => esc_html__('This template is what the primary registrant (the person who made the main registration) will receive on successful payment', 'event_espresso')
60
-                )
61
-            );
62
-    }
18
+	public function __construct()
19
+	{
20
+
21
+		// setup type details for reference
22
+		$this->name = 'payment_reminder';
23
+		$this->description = esc_html__('This message type is used for all payment reminder messages.  These are triggered when an offline gateway registration is completed or when manually triggered via event administrators via the transaction admin page(s).', 'event_espresso');
24
+		$this->label = array(
25
+			'singular' => esc_html__('payment reminder', 'event_espresso'),
26
+			'plural' => esc_html__('payment reminders', 'event_espresso')
27
+			);
28
+		$this->_master_templates = array(
29
+			'email' => 'payment'
30
+			);
31
+
32
+		parent::__construct();
33
+	}
34
+
35
+
36
+
37
+	/**
38
+	 * _set_contexts
39
+	 * This sets up the contexts associated with the message_type
40
+	 *
41
+	 * @access  protected
42
+	 * @return  void
43
+	 */
44
+	protected function _set_contexts()
45
+	{
46
+		$this->_context_label = array(
47
+			'label' => esc_html__('recipient', 'event_espresso'),
48
+			'plural' => esc_html__('recipients', 'event_espresso'),
49
+			'description' => esc_html__('Recipient\'s are who will receive the template.  You may want different payment details sent out depending on who the recipient is', 'event_espresso')
50
+			);
51
+
52
+		$this->_contexts = array(
53
+			'admin' => array(
54
+				'label' => esc_html__('Event Admin', 'event_espresso'),
55
+				'description' => esc_html__('This template is what event administrators will receive on a successful payment', 'event_espresso')
56
+				),
57
+			'primary_attendee' => array(
58
+				'label' => esc_html__('Primary Registrant', 'event_espresso'),
59
+				'description' => esc_html__('This template is what the primary registrant (the person who made the main registration) will receive on successful payment', 'event_espresso')
60
+				)
61
+			);
62
+	}
63 63
 }
Please login to merge, or discard this patch.
message_type/payment_declined/EE_Payment_Declined_message_type.class.php 1 patch
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -15,49 +15,49 @@
 block discarded – undo
15 15
 class EE_Payment_Declined_message_type extends EE_Payment_Base_message_type
16 16
 {
17 17
 
18
-    public function __construct()
19
-    {
20
-
21
-        // setup type details for reference
22
-        $this->name = 'payment_declined';
23
-        $this->description = esc_html__('This message type is used for all declined payment notification messages that go out including any manual payments entered by an event administrator.', 'event_espresso');
24
-        $this->label = array(
25
-            'singular' => esc_html__('payment declined', 'event_espresso'),
26
-            'plural' => esc_html__('payments declined', 'event_espresso')
27
-            );
28
-
29
-        $this->_master_templates = array(
30
-            'email' => 'payment'
31
-            );
32
-
33
-        parent::__construct();
34
-    }
35
-
36
-
37
-    /**
38
-     * _set_contexts
39
-     * This sets up the contexts associated with the message_type
40
-     *
41
-     * @access  protected
42
-     * @return  void
43
-     */
44
-    protected function _set_contexts()
45
-    {
46
-        $this->_context_label = array(
47
-            'label' => esc_html__('recipient', 'event_espresso'),
48
-            'plural' => esc_html__('recipients', 'event_espresso'),
49
-            'description' => esc_html__('Recipient\'s are who will receive the template.  You may want different payment details sent out depending on who the recipient is', 'event_espresso')
50
-            );
51
-
52
-        $this->_contexts = array(
53
-            'admin' => array(
54
-                'label' => esc_html__('Event Admin', 'event_espresso'),
55
-                'description' => esc_html__('This template is what event administrators will receive when payment is declined', 'event_espresso')
56
-                ),
57
-            'primary_attendee' => array(
58
-                'label' => esc_html__('Primary Registrant', 'event_espresso'),
59
-                'description' => esc_html__('This template is what the primary registrant (the person who made the main registration) will receive when the payment is declined', 'event_espresso')
60
-                )
61
-            );
62
-    }
18
+	public function __construct()
19
+	{
20
+
21
+		// setup type details for reference
22
+		$this->name = 'payment_declined';
23
+		$this->description = esc_html__('This message type is used for all declined payment notification messages that go out including any manual payments entered by an event administrator.', 'event_espresso');
24
+		$this->label = array(
25
+			'singular' => esc_html__('payment declined', 'event_espresso'),
26
+			'plural' => esc_html__('payments declined', 'event_espresso')
27
+			);
28
+
29
+		$this->_master_templates = array(
30
+			'email' => 'payment'
31
+			);
32
+
33
+		parent::__construct();
34
+	}
35
+
36
+
37
+	/**
38
+	 * _set_contexts
39
+	 * This sets up the contexts associated with the message_type
40
+	 *
41
+	 * @access  protected
42
+	 * @return  void
43
+	 */
44
+	protected function _set_contexts()
45
+	{
46
+		$this->_context_label = array(
47
+			'label' => esc_html__('recipient', 'event_espresso'),
48
+			'plural' => esc_html__('recipients', 'event_espresso'),
49
+			'description' => esc_html__('Recipient\'s are who will receive the template.  You may want different payment details sent out depending on who the recipient is', 'event_espresso')
50
+			);
51
+
52
+		$this->_contexts = array(
53
+			'admin' => array(
54
+				'label' => esc_html__('Event Admin', 'event_espresso'),
55
+				'description' => esc_html__('This template is what event administrators will receive when payment is declined', 'event_espresso')
56
+				),
57
+			'primary_attendee' => array(
58
+				'label' => esc_html__('Primary Registrant', 'event_espresso'),
59
+				'description' => esc_html__('This template is what the primary registrant (the person who made the main registration) will receive when the payment is declined', 'event_espresso')
60
+				)
61
+			);
62
+	}
63 63
 }
Please login to merge, or discard this patch.
caffeinated/payment_methods/Paypal_Pro/forms/PayPalProSettingsForm.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -18,30 +18,30 @@
 block discarded – undo
18 18
  */
19 19
 class PayPalProSettingsForm extends PayPalSettingsForm
20 20
 {
21
-    /**
22
-     * SettingsForm constructor.
23
-     *
24
-     * @param array $options_array
25
-     * @param string $help_tab_link
26
-     */
27
-    public function __construct(array $options_array = array(), $help_tab_link = '')
28
-    {
29
-        $options_array = array_replace_recursive(
30
-            array(
31
-                'extra_meta_inputs' => array(
32
-                    'credit_card_types' => new EE_Checkbox_Multi_Input(
33
-                        EE_PMT_Paypal_Pro::card_types_supported(),
34
-                        array(
35
-                            'html_label_text' => esc_html__('Card Types Supported', 'event_espresso'),
36
-                            'required' => true
37
-                        )
38
-                    ),
39
-                )
40
-            ),
41
-            $options_array
42
-        );
43
-        parent::__construct($options_array, $help_tab_link);
44
-    }
21
+	/**
22
+	 * SettingsForm constructor.
23
+	 *
24
+	 * @param array $options_array
25
+	 * @param string $help_tab_link
26
+	 */
27
+	public function __construct(array $options_array = array(), $help_tab_link = '')
28
+	{
29
+		$options_array = array_replace_recursive(
30
+			array(
31
+				'extra_meta_inputs' => array(
32
+					'credit_card_types' => new EE_Checkbox_Multi_Input(
33
+						EE_PMT_Paypal_Pro::card_types_supported(),
34
+						array(
35
+							'html_label_text' => esc_html__('Card Types Supported', 'event_espresso'),
36
+							'required' => true
37
+						)
38
+					),
39
+				)
40
+			),
41
+			$options_array
42
+		);
43
+		parent::__construct($options_array, $help_tab_link);
44
+	}
45 45
 }
46 46
 // End of file SettingsForm.php
47 47
 // Location: EventEspresso/caffeinated/payment_methods/PayPal_Pro/forms/PayPalProSettingsForm.php
Please login to merge, or discard this patch.
caffeinated/payment_methods/Aim/EE_PMT_Aim.pm.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      */
32 32
     protected function _setup_properties()
33 33
     {
34
-        require_once($this->file_folder() . 'EEG_Aim.gateway.php');
34
+        require_once($this->file_folder().'EEG_Aim.gateway.php');
35 35
         $this->_gateway = new EEG_Aim();
36 36
         $this->_pretty_name = esc_html__("Authorize.net AIM", 'event_espresso');
37 37
         $this->_default_description = esc_html__('Please provide the following billing information.', 'event_espresso');
@@ -128,13 +128,13 @@  discard block
 block discarded – undo
128 128
                 $billing_form->get_input('cvv')->set_default('123');
129 129
             }
130 130
             $billing_form->add_subsections(
131
-                array( 'fyi_about_autofill' => $billing_form->payment_fields_autofilled_notice_html() ),
131
+                array('fyi_about_autofill' => $billing_form->payment_fields_autofilled_notice_html()),
132 132
                 'credit_card'
133 133
             );
134 134
             $billing_form->add_subsections(
135 135
                 array(
136 136
                     'debug_content' => new EE_Form_Section_HTML_From_Template(
137
-                        __DIR__ . '/templates/authorize_net_aim_debug_info.template.php'
137
+                        __DIR__.'/templates/authorize_net_aim_debug_info.template.php'
138 138
                     )
139 139
                 ),
140 140
                 'first_name'
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
                             'html_label_text' => sprintf(esc_html__("Required Payment Form Fields %s", 'event_espresso'), $this->get_help_tab_link()),
190 190
                             'default' => array_diff(
191 191
                                 array_keys($billing_input_names),
192
-                                array( 'address2', 'phone', 'company', 'fax' )
192
+                                array('address2', 'phone', 'company', 'fax')
193 193
                             ),
194 194
                             'html_help_text' => esc_html__('Note: if fields are excluded they cannot be required.', 'event_espresso')
195 195
                         )
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
     {
235 235
         $all_billing_values_empty = array();
236 236
         foreach (array_keys($this->billing_input_names()) as $input_name) {
237
-            $all_billing_values_empty[ $input_name ] = '';
237
+            $all_billing_values_empty[$input_name] = '';
238 238
         }
239 239
         return array_merge(
240 240
             $all_billing_values_empty,
Please login to merge, or discard this patch.
Indentation   +239 added lines, -239 removed lines patch added patch discarded remove patch
@@ -10,261 +10,261 @@
 block discarded – undo
10 10
  */
11 11
 class EE_PMT_Aim extends EE_PMT_Base
12 12
 {
13
-    /**
14
-     * @param EE_Payment_Method $pm_instance
15
-     * @return EE_PMT_Aim
16
-     * @throws \EE_Error
17
-     */
18
-    public function __construct($pm_instance = null)
19
-    {
20
-        $this->_setup_properties();
21
-        parent::__construct($pm_instance);
22
-    }
13
+	/**
14
+	 * @param EE_Payment_Method $pm_instance
15
+	 * @return EE_PMT_Aim
16
+	 * @throws \EE_Error
17
+	 */
18
+	public function __construct($pm_instance = null)
19
+	{
20
+		$this->_setup_properties();
21
+		parent::__construct($pm_instance);
22
+	}
23 23
 
24
-    /**
25
-     * Sets up payment method type properties for this gateway, which is normally
26
-     * done in the constructor, but we want this to be easy for similar gateways to override
27
-     * while still calling the parent constructor.
28
-     * So children should override this method instead of __construct
29
-     */
30
-    protected function _setup_properties()
31
-    {
32
-        require_once($this->file_folder() . 'EEG_Aim.gateway.php');
33
-        $this->_gateway = new EEG_Aim();
34
-        $this->_pretty_name = esc_html__("Authorize.net AIM", 'event_espresso');
35
-        $this->_default_description = esc_html__('Please provide the following billing information.', 'event_espresso');
36
-        $this->_requires_https = true;
37
-    }
24
+	/**
25
+	 * Sets up payment method type properties for this gateway, which is normally
26
+	 * done in the constructor, but we want this to be easy for similar gateways to override
27
+	 * while still calling the parent constructor.
28
+	 * So children should override this method instead of __construct
29
+	 */
30
+	protected function _setup_properties()
31
+	{
32
+		require_once($this->file_folder() . 'EEG_Aim.gateway.php');
33
+		$this->_gateway = new EEG_Aim();
34
+		$this->_pretty_name = esc_html__("Authorize.net AIM", 'event_espresso');
35
+		$this->_default_description = esc_html__('Please provide the following billing information.', 'event_espresso');
36
+		$this->_requires_https = true;
37
+	}
38 38
 
39 39
 
40 40
 
41
-    /**
42
-     * Creates the billing form for this payment method type
43
-     *
44
-     * @param \EE_Transaction $transaction
45
-     * @return EE_Billing_Info_Form
46
-     * @throws \EE_Error
47
-     */
48
-    public function generate_new_billing_form(EE_Transaction $transaction = null)
49
-    {
50
-        $billing_form = new EE_Billing_Attendee_Info_Form($this->_pm_instance, array(
51
-            'name' => 'AIM_Form',
52
-            'subsections' => array(
53
-                'credit_card' => new EE_Credit_Card_Input(array(
54
-                    'required' => true,
55
-                    'html_label_text' => esc_html__('Card Number', 'event_espresso')
56
-                )),
57
-                'exp_month' => new EE_Credit_Card_Month_Input(true, array(
58
-                    'required' => true,
59
-                    'html_label_text' => esc_html__('Expiry Month', 'event_espresso')
60
-                )),
61
-                'exp_year' => new EE_Credit_Card_Year_Input(array(
62
-                    'required' => true,
63
-                    'html_label_text' => esc_html__('Expiry Year', 'event_espresso')
64
-                )),
65
-                'cvv' => new EE_CVV_Input(array(
66
-                    'required' => true,
67
-                    'html_label_text' => esc_html__('CVV', 'event_espresso') )),
68
-            )
69
-        ));
70
-        $billing_form->add_subsections(array(
71
-            'company' => new EE_Text_Input(array(
72
-                'html_label_text' => esc_html__('Company', 'event_espresso')
73
-            ))
74
-        ), 'email', false);
75
-        $billing_form->add_subsections(
76
-            array(
77
-                    'fax' => new EE_Text_Input(array(
78
-                        'html_label_text' => esc_html__('Fax', 'event_espresso')
79
-                    ))
80
-                ),
81
-            'phone',
82
-            false
83
-        );
84
-        $settings_form = $this->settings_form();
85
-        if ($settings_form->get_input('excluded_billing_inputs') instanceof EE_Checkbox_Multi_Input) {
86
-                $billing_form->exclude($settings_form->get_input('excluded_billing_inputs')->normalized_value());
87
-        }
88
-        if ($settings_form->get_input('required_billing_inputs') instanceof EE_Checkbox_Multi_Input) {
89
-            $required_inputs = $settings_form->get_input('required_billing_inputs')->normalized_value();
90
-            // only change the requirement of inputs which are allowed to be changed
91
-            /** @var EE_Form_Input_Base[] $inputs_to_evaluate */
92
-            $inputs_to_evaluate = array_intersect_key(
93
-                $billing_form->inputs(),
94
-                $this->billing_input_names()
95
-            );
96
-            foreach ($inputs_to_evaluate as $input_name => $input) {
97
-                if (in_array($input_name, $required_inputs)) {
98
-                    $input->set_required(true);
99
-                } else {
100
-                    $input->set_required(false);
101
-                }
102
-            }
103
-        }
104
-        return $this->apply_billing_form_debug_settings($billing_form);
105
-    }
41
+	/**
42
+	 * Creates the billing form for this payment method type
43
+	 *
44
+	 * @param \EE_Transaction $transaction
45
+	 * @return EE_Billing_Info_Form
46
+	 * @throws \EE_Error
47
+	 */
48
+	public function generate_new_billing_form(EE_Transaction $transaction = null)
49
+	{
50
+		$billing_form = new EE_Billing_Attendee_Info_Form($this->_pm_instance, array(
51
+			'name' => 'AIM_Form',
52
+			'subsections' => array(
53
+				'credit_card' => new EE_Credit_Card_Input(array(
54
+					'required' => true,
55
+					'html_label_text' => esc_html__('Card Number', 'event_espresso')
56
+				)),
57
+				'exp_month' => new EE_Credit_Card_Month_Input(true, array(
58
+					'required' => true,
59
+					'html_label_text' => esc_html__('Expiry Month', 'event_espresso')
60
+				)),
61
+				'exp_year' => new EE_Credit_Card_Year_Input(array(
62
+					'required' => true,
63
+					'html_label_text' => esc_html__('Expiry Year', 'event_espresso')
64
+				)),
65
+				'cvv' => new EE_CVV_Input(array(
66
+					'required' => true,
67
+					'html_label_text' => esc_html__('CVV', 'event_espresso') )),
68
+			)
69
+		));
70
+		$billing_form->add_subsections(array(
71
+			'company' => new EE_Text_Input(array(
72
+				'html_label_text' => esc_html__('Company', 'event_espresso')
73
+			))
74
+		), 'email', false);
75
+		$billing_form->add_subsections(
76
+			array(
77
+					'fax' => new EE_Text_Input(array(
78
+						'html_label_text' => esc_html__('Fax', 'event_espresso')
79
+					))
80
+				),
81
+			'phone',
82
+			false
83
+		);
84
+		$settings_form = $this->settings_form();
85
+		if ($settings_form->get_input('excluded_billing_inputs') instanceof EE_Checkbox_Multi_Input) {
86
+				$billing_form->exclude($settings_form->get_input('excluded_billing_inputs')->normalized_value());
87
+		}
88
+		if ($settings_form->get_input('required_billing_inputs') instanceof EE_Checkbox_Multi_Input) {
89
+			$required_inputs = $settings_form->get_input('required_billing_inputs')->normalized_value();
90
+			// only change the requirement of inputs which are allowed to be changed
91
+			/** @var EE_Form_Input_Base[] $inputs_to_evaluate */
92
+			$inputs_to_evaluate = array_intersect_key(
93
+				$billing_form->inputs(),
94
+				$this->billing_input_names()
95
+			);
96
+			foreach ($inputs_to_evaluate as $input_name => $input) {
97
+				if (in_array($input_name, $required_inputs)) {
98
+					$input->set_required(true);
99
+				} else {
100
+					$input->set_required(false);
101
+				}
102
+			}
103
+		}
104
+		return $this->apply_billing_form_debug_settings($billing_form);
105
+	}
106 106
 
107 107
 
108 108
 
109
-    /**
110
-     * apply_billing_form_debug_settings
111
-     * applies debug data to the form
112
-     *
113
-     * @param \EE_Billing_Info_Form $billing_form
114
-     * @return \EE_Billing_Info_Form
115
-     * @throws \EE_Error
116
-     */
117
-    public function apply_billing_form_debug_settings(EE_Billing_Info_Form $billing_form)
118
-    {
119
-        if (
120
-            $this->_pm_instance->debug_mode()
121
-            || $this->_pm_instance->get_extra_meta('test_transactions', true, false)
122
-        ) {
123
-            $billing_form->get_input('credit_card')->set_default('4007000000027');
124
-            $billing_form->get_input('exp_year')->set_default('2020');
125
-            if ($billing_form->get_subsection('cvv') instanceof EE_Form_Input_Base) {
126
-                $billing_form->get_input('cvv')->set_default('123');
127
-            }
128
-            $billing_form->add_subsections(
129
-                array( 'fyi_about_autofill' => $billing_form->payment_fields_autofilled_notice_html() ),
130
-                'credit_card'
131
-            );
132
-            $billing_form->add_subsections(
133
-                array(
134
-                    'debug_content' => new EE_Form_Section_HTML_From_Template(
135
-                        __DIR__ . '/templates/authorize_net_aim_debug_info.template.php'
136
-                    )
137
-                ),
138
-                'first_name'
139
-            );
140
-        }
141
-        return $billing_form;
142
-    }
109
+	/**
110
+	 * apply_billing_form_debug_settings
111
+	 * applies debug data to the form
112
+	 *
113
+	 * @param \EE_Billing_Info_Form $billing_form
114
+	 * @return \EE_Billing_Info_Form
115
+	 * @throws \EE_Error
116
+	 */
117
+	public function apply_billing_form_debug_settings(EE_Billing_Info_Form $billing_form)
118
+	{
119
+		if (
120
+			$this->_pm_instance->debug_mode()
121
+			|| $this->_pm_instance->get_extra_meta('test_transactions', true, false)
122
+		) {
123
+			$billing_form->get_input('credit_card')->set_default('4007000000027');
124
+			$billing_form->get_input('exp_year')->set_default('2020');
125
+			if ($billing_form->get_subsection('cvv') instanceof EE_Form_Input_Base) {
126
+				$billing_form->get_input('cvv')->set_default('123');
127
+			}
128
+			$billing_form->add_subsections(
129
+				array( 'fyi_about_autofill' => $billing_form->payment_fields_autofilled_notice_html() ),
130
+				'credit_card'
131
+			);
132
+			$billing_form->add_subsections(
133
+				array(
134
+					'debug_content' => new EE_Form_Section_HTML_From_Template(
135
+						__DIR__ . '/templates/authorize_net_aim_debug_info.template.php'
136
+					)
137
+				),
138
+				'first_name'
139
+			);
140
+		}
141
+		return $billing_form;
142
+	}
143 143
 
144 144
 
145 145
 
146
-    /**
147
-     * Gets the form for all the settings related to this payment method type
148
-     * @return EE_Payment_Method_Form
149
-     */
150
-    public function generate_new_settings_form()
151
-    {
152
-        $billing_input_names = $this->billing_input_names();
153
-        return new EE_Payment_Method_Form(
154
-            array(
155
-                'extra_meta_inputs' => array(
156
-                    'login_id' => new EE_Text_Input(
157
-                        array(
158
-                            'html_label_text' =>  sprintf(esc_html__("Authorize.net API Login ID %s", "event_espresso"), $this->get_help_tab_link()),
159
-                            'required' => true )
160
-                    ),
161
-                    'transaction_key' => new EE_Text_Input(
162
-                        array(
163
-                            'html_label_text' => sprintf(esc_html__("Authorize.net Transaction Key %s", "event_espresso"), $this->get_help_tab_link()),
164
-                            'required' => true )
165
-                    ),
166
-                    'test_transactions' => new EE_Yes_No_Input(
167
-                        array(
168
-                            'html_label_text' =>  sprintf(esc_html__("Send test transactions? %s", 'event_espresso'), $this->get_help_tab_link()),
169
-                            'html_help_text' =>  esc_html__("Send test transactions, even to live server", 'event_espresso'),
170
-                            'default' => false,
171
-                            'required' => true
172
-                        )
173
-                    ),
174
-                    'excluded_billing_inputs' => new EE_Checkbox_Multi_Input(
175
-                        $billing_input_names,
176
-                        array(
177
-                        'html_label_text' => sprintf(esc_html__("Excluded Payment Form Fields %s", 'event_espresso'), $this->get_help_tab_link()),
178
-                        'default' => array(
179
-                            'company',
180
-                            'fax',
181
-                        )
182
-                        )
183
-                    ),
184
-                    'required_billing_inputs' => new EE_Checkbox_Multi_Input(
185
-                        $billing_input_names,
186
-                        array(
187
-                            'html_label_text' => sprintf(esc_html__("Required Payment Form Fields %s", 'event_espresso'), $this->get_help_tab_link()),
188
-                            'default' => array_diff(
189
-                                array_keys($billing_input_names),
190
-                                array( 'address2', 'phone', 'company', 'fax' )
191
-                            ),
192
-                            'html_help_text' => esc_html__('Note: if fields are excluded they cannot be required.', 'event_espresso')
193
-                        )
194
-                    ),
195
-                )
196
-            )
197
-        );
198
-    }
146
+	/**
147
+	 * Gets the form for all the settings related to this payment method type
148
+	 * @return EE_Payment_Method_Form
149
+	 */
150
+	public function generate_new_settings_form()
151
+	{
152
+		$billing_input_names = $this->billing_input_names();
153
+		return new EE_Payment_Method_Form(
154
+			array(
155
+				'extra_meta_inputs' => array(
156
+					'login_id' => new EE_Text_Input(
157
+						array(
158
+							'html_label_text' =>  sprintf(esc_html__("Authorize.net API Login ID %s", "event_espresso"), $this->get_help_tab_link()),
159
+							'required' => true )
160
+					),
161
+					'transaction_key' => new EE_Text_Input(
162
+						array(
163
+							'html_label_text' => sprintf(esc_html__("Authorize.net Transaction Key %s", "event_espresso"), $this->get_help_tab_link()),
164
+							'required' => true )
165
+					),
166
+					'test_transactions' => new EE_Yes_No_Input(
167
+						array(
168
+							'html_label_text' =>  sprintf(esc_html__("Send test transactions? %s", 'event_espresso'), $this->get_help_tab_link()),
169
+							'html_help_text' =>  esc_html__("Send test transactions, even to live server", 'event_espresso'),
170
+							'default' => false,
171
+							'required' => true
172
+						)
173
+					),
174
+					'excluded_billing_inputs' => new EE_Checkbox_Multi_Input(
175
+						$billing_input_names,
176
+						array(
177
+						'html_label_text' => sprintf(esc_html__("Excluded Payment Form Fields %s", 'event_espresso'), $this->get_help_tab_link()),
178
+						'default' => array(
179
+							'company',
180
+							'fax',
181
+						)
182
+						)
183
+					),
184
+					'required_billing_inputs' => new EE_Checkbox_Multi_Input(
185
+						$billing_input_names,
186
+						array(
187
+							'html_label_text' => sprintf(esc_html__("Required Payment Form Fields %s", 'event_espresso'), $this->get_help_tab_link()),
188
+							'default' => array_diff(
189
+								array_keys($billing_input_names),
190
+								array( 'address2', 'phone', 'company', 'fax' )
191
+							),
192
+							'html_help_text' => esc_html__('Note: if fields are excluded they cannot be required.', 'event_espresso')
193
+						)
194
+					),
195
+				)
196
+			)
197
+		);
198
+	}
199 199
 
200
-    /**
201
-     * Returns an array where keys are the slugs for billing inputs, and values
202
-     * are their i18n names
203
-     * @return array
204
-     */
205
-    public function billing_input_names()
206
-    {
207
-        return array(
208
-            'first_name' => esc_html__('First Name', 'event_espresso'),
209
-            'last_name' => esc_html__('Last Name', 'event_espresso'),
210
-            'email' => esc_html__('Email', 'event_espresso'),
211
-            'company' => esc_html__('Company', 'event_espresso'),
212
-            'address' => esc_html__('Address', 'event_espresso'),
213
-            'address2' => esc_html__('Address2', 'event_espresso'),
214
-            'city' => esc_html__('City', 'event_espresso'),
215
-            'state' => esc_html__('State', 'event_espresso'),
216
-            'country' => esc_html__('Country', 'event_espresso'),
217
-            'zip' =>  esc_html__('Zip', 'event_espresso'),
218
-            'phone' => esc_html__('Phone', 'event_espresso'),
219
-            'fax' => esc_html__('Fax', 'event_espresso'),
220
-            'cvv' => esc_html__('CVV', 'event_espresso')
221
-        );
222
-    }
200
+	/**
201
+	 * Returns an array where keys are the slugs for billing inputs, and values
202
+	 * are their i18n names
203
+	 * @return array
204
+	 */
205
+	public function billing_input_names()
206
+	{
207
+		return array(
208
+			'first_name' => esc_html__('First Name', 'event_espresso'),
209
+			'last_name' => esc_html__('Last Name', 'event_espresso'),
210
+			'email' => esc_html__('Email', 'event_espresso'),
211
+			'company' => esc_html__('Company', 'event_espresso'),
212
+			'address' => esc_html__('Address', 'event_espresso'),
213
+			'address2' => esc_html__('Address2', 'event_espresso'),
214
+			'city' => esc_html__('City', 'event_espresso'),
215
+			'state' => esc_html__('State', 'event_espresso'),
216
+			'country' => esc_html__('Country', 'event_espresso'),
217
+			'zip' =>  esc_html__('Zip', 'event_espresso'),
218
+			'phone' => esc_html__('Phone', 'event_espresso'),
219
+			'fax' => esc_html__('Fax', 'event_espresso'),
220
+			'cvv' => esc_html__('CVV', 'event_espresso')
221
+		);
222
+	}
223 223
 
224
-    /**
225
-     * Overrides parent so we always have all billing inputs in the returned array,
226
-     * not just the ones included at the time. This helps simplify the gateway code
227
-     *
228
-     * @param EE_Billing_Info_Form $billing_form
229
-     * @return array
230
-     */
231
-    protected function _get_billing_values_from_form($billing_form)
232
-    {
233
-        $all_billing_values_empty = array();
234
-        foreach (array_keys($this->billing_input_names()) as $input_name) {
235
-            $all_billing_values_empty[ $input_name ] = '';
236
-        }
237
-        return array_merge(
238
-            $all_billing_values_empty,
239
-            parent::_get_billing_values_from_form($billing_form)
240
-        );
241
-    }
224
+	/**
225
+	 * Overrides parent so we always have all billing inputs in the returned array,
226
+	 * not just the ones included at the time. This helps simplify the gateway code
227
+	 *
228
+	 * @param EE_Billing_Info_Form $billing_form
229
+	 * @return array
230
+	 */
231
+	protected function _get_billing_values_from_form($billing_form)
232
+	{
233
+		$all_billing_values_empty = array();
234
+		foreach (array_keys($this->billing_input_names()) as $input_name) {
235
+			$all_billing_values_empty[ $input_name ] = '';
236
+		}
237
+		return array_merge(
238
+			$all_billing_values_empty,
239
+			parent::_get_billing_values_from_form($billing_form)
240
+		);
241
+	}
242 242
 
243 243
 
244 244
 
245
-    /**
246
-     * Adds the help tab
247
-     * @see EE_PMT_Base::help_tabs_config()
248
-     * @return array
249
-     */
250
-    public function help_tabs_config()
251
-    {
252
-        return array(
253
-            $this->get_help_tab_name() => array(
254
-                'title' => esc_html__('Authorize.net AIM Settings', 'event_espresso'),
255
-                'filename' => 'payment_methods_overview_aim'
256
-            ),
257
-        );
258
-    }
245
+	/**
246
+	 * Adds the help tab
247
+	 * @see EE_PMT_Base::help_tabs_config()
248
+	 * @return array
249
+	 */
250
+	public function help_tabs_config()
251
+	{
252
+		return array(
253
+			$this->get_help_tab_name() => array(
254
+				'title' => esc_html__('Authorize.net AIM Settings', 'event_espresso'),
255
+				'filename' => 'payment_methods_overview_aim'
256
+			),
257
+		);
258
+	}
259 259
 
260 260
 
261 261
 
262
-    /**
263
-     * Gets a list of instructions and/or information regarding how the payment is to be completed
264
-     * @return string
265
-     */
266
-    public function payment_information()
267
-    {
268
-        // TODO: Implement payment_information() method.
269
-    }
262
+	/**
263
+	 * Gets a list of instructions and/or information regarding how the payment is to be completed
264
+	 * @return string
265
+	 */
266
+	public function payment_information()
267
+	{
268
+		// TODO: Implement payment_information() method.
269
+	}
270 270
 }
Please login to merge, or discard this patch.
modules/feeds/templates/espresso_events_feed.template.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -16,17 +16,17 @@
 block discarded – undo
16 16
 
17 17
 ?>
18 18
 <p>
19
-    <?php esc_html_e('Event Organizer: ', 'event_espresso') . espresso_organization_name($EVT_ID); ?>
19
+    <?php esc_html_e('Event Organizer: ', 'event_espresso').espresso_organization_name($EVT_ID); ?>
20 20
     <br/>
21
-    <?php esc_html_e('Organizer Email: ', 'event_espresso') . espresso_organization_email($EVT_ID); ?>
21
+    <?php esc_html_e('Organizer Email: ', 'event_espresso').espresso_organization_email($EVT_ID); ?>
22 22
     <br/>
23
-    <?php esc_html_e('Event Phone: ', 'event_espresso') . espresso_event_phone($EVT_ID); ?>
23
+    <?php esc_html_e('Event Phone: ', 'event_espresso').espresso_event_phone($EVT_ID); ?>
24 24
 </p>
25
-<p><?php esc_html_e('Event Status: ', 'event_espresso') . espresso_event_status($EVT_ID); ?></p>
26
-<p><?php esc_html_e('Categories: ', 'event_espresso') . espresso_event_categories($EVT_ID); ?></p>
27
-<?php esc_html_e('Dates and Times: ', 'event_espresso') . espresso_list_of_event_dates($EVT_ID); ?>
28
-<?php esc_html_e('Available Tickets: ', 'event_espresso') . espresso_event_tickets_available($EVT_ID); ?>
29
-<p><?php esc_html_e('Event Venue: ', 'event_espresso') . espresso_venue_name(null, false); ?></p>
30
-<p><?php esc_html_e('Description: ', 'event_espresso') . $event_description; ?></p>
25
+<p><?php esc_html_e('Event Status: ', 'event_espresso').espresso_event_status($EVT_ID); ?></p>
26
+<p><?php esc_html_e('Categories: ', 'event_espresso').espresso_event_categories($EVT_ID); ?></p>
27
+<?php esc_html_e('Dates and Times: ', 'event_espresso').espresso_list_of_event_dates($EVT_ID); ?>
28
+<?php esc_html_e('Available Tickets: ', 'event_espresso').espresso_event_tickets_available($EVT_ID); ?>
29
+<p><?php esc_html_e('Event Venue: ', 'event_espresso').espresso_venue_name(null, false); ?></p>
30
+<p><?php esc_html_e('Description: ', 'event_espresso').$event_description; ?></p>
31 31
 <br/>
32 32
  
33 33
\ No newline at end of file
Please login to merge, or discard this patch.
modules/feeds/templates/espresso_venues_feed.template.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -16,15 +16,15 @@
 block discarded – undo
16 16
 
17 17
 ?>
18 18
 <p>
19
-    <?php esc_html_e('Organizer Name: ', 'event_espresso') . espresso_organization_name($VNU_ID); ?>
19
+    <?php esc_html_e('Organizer Name: ', 'event_espresso').espresso_organization_name($VNU_ID); ?>
20 20
     <br/>
21
-    <?php esc_html_e('Organizer Email: ', 'event_espresso') . espresso_organization_email($VNU_ID); ?>
21
+    <?php esc_html_e('Organizer Email: ', 'event_espresso').espresso_organization_email($VNU_ID); ?>
22 22
     <br/>
23
-    <?php esc_html_e('Venue Phone: ', 'event_espresso') . espresso_venue_phone($VNU_ID); ?>
23
+    <?php esc_html_e('Venue Phone: ', 'event_espresso').espresso_venue_phone($VNU_ID); ?>
24 24
 </p>
25
-<p><?php esc_html_e('Categories: ', 'event_espresso') . espresso_venue_categories($VNU_ID); ?></p>
26
-<p><?php esc_html_e('Address: ', 'event_espresso') . espresso_venue_address($VNU_ID); ?></p>
27
-<p><?php esc_html_e('Website: ', 'event_espresso') . espresso_venue_website($VNU_ID); ?></p>
28
-<p><?php esc_html_e('Description: ', 'event_espresso') . $venue_description; ?></p>
25
+<p><?php esc_html_e('Categories: ', 'event_espresso').espresso_venue_categories($VNU_ID); ?></p>
26
+<p><?php esc_html_e('Address: ', 'event_espresso').espresso_venue_address($VNU_ID); ?></p>
27
+<p><?php esc_html_e('Website: ', 'event_espresso').espresso_venue_website($VNU_ID); ?></p>
28
+<p><?php esc_html_e('Description: ', 'event_espresso').$venue_description; ?></p>
29 29
 <br/>
30 30
  
31 31
\ No newline at end of file
Please login to merge, or discard this patch.