Completed
Branch BUG/improve-drs-option-help (8b9ba3)
by
unknown
18:20 queued 09:29
created
venues/help_tabs/venues_overview_table_column_headings.help_tab.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@  discard block
 block discarded – undo
6 6
 <li>
7 7
 <strong><?php esc_html_e('ID', 'event_espresso'); ?></strong><br />
8 8
 <?php printf(
9
-    esc_html__('This is the numerical ID for a venue. This value is used internally for %s.', 'event_espresso'),
10
-    Domain::brandName()
9
+	esc_html__('This is the numerical ID for a venue. This value is used internally for %s.', 'event_espresso'),
10
+	Domain::brandName()
11 11
 ); ?>
12 12
 </li>
13 13
 <li>
@@ -25,8 +25,8 @@  discard block
 block discarded – undo
25 25
 <li>
26 26
 <strong><?php esc_html_e('Capacity', 'event_espresso'); ?></strong><br />
27 27
 <?php printf(
28
-    esc_html__('This is the capacity of the venue. If no limit is set, then the capacity will be set to infinity (%s).', 'event_espresso'),
29
-    '&#8734'
28
+	esc_html__('This is the capacity of the venue. If no limit is set, then the capacity will be set to infinity (%s).', 'event_espresso'),
29
+	'&#8734'
30 30
 ); ?>
31 31
 </li>
32 32
 </ul>
Please login to merge, or discard this patch.
help_tabs/registrations_event_checkin_table_column_headings.help_tab.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -3,13 +3,13 @@
 block discarded – undo
3 3
 <li>
4 4
 <strong><?php esc_html_e('Check-In', 'event_espresso'); ?></strong><br />
5 5
 <?php printf(
6
-    esc_html__(
7
-        'Shows the Check-In status for an registrant. Available statuses are checked in %1$s, checked out %2$s, or no check-in record is available %3$s.',
8
-        'event_espresso'
9
-    ),
10
-    '<span class="ee-icon ee-icon-check-in"></span>',
11
-    '<span class="ee-icon ee-icon-check-out"></span>',
12
-    '<span class="dashicons dashicons-no"></span>'
6
+	esc_html__(
7
+		'Shows the Check-In status for an registrant. Available statuses are checked in %1$s, checked out %2$s, or no check-in record is available %3$s.',
8
+		'event_espresso'
9
+	),
10
+	'<span class="ee-icon ee-icon-check-in"></span>',
11
+	'<span class="ee-icon ee-icon-check-out"></span>',
12
+	'<span class="dashicons dashicons-no"></span>'
13 13
 ); ?>
14 14
 </li>
15 15
 <li>
Please login to merge, or discard this patch.
help_tabs/registrations_overview_table_column_headings.help_tab.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@  discard block
 block discarded – undo
6 6
 <li>
7 7
 <strong><?php esc_html_e('ID', 'event_espresso'); ?></strong><br />
8 8
 <?php printf(
9
-    esc_html__(
10
-        'The is the numerical ID of an registration. This value is used internally for %s.',
11
-        'event_espresso'
12
-    ),
13
-    Domain::brandName()
9
+	esc_html__(
10
+		'The is the numerical ID of an registration. This value is used internally for %s.',
11
+		'event_espresso'
12
+	),
13
+	Domain::brandName()
14 14
 ); ?>
15 15
 </li>
16 16
 <li>
@@ -40,14 +40,14 @@  discard block
 block discarded – undo
40 40
 <li>
41 41
 <strong><?php esc_html_e('Actions', 'event_espresso'); ?></strong><br />
42 42
 <?php printf(
43
-    esc_html__(
44
-        'Using the action buttons you can View Registration Details %1$s, Edit Contact Details %2$s, Resend Registration Details %3$s, and View Transaction Details %4$s.',
45
-        'event_espresso'
46
-    ),
47
-    '<span class="dashicons dashicons-search"></span>',
48
-    '<span class="dashicons dashicons-businessman"></span>',
49
-    '<span class="ee-icon ee-icon-email-send"></span>',
50
-    '<span class="ee-icon ee-icon-cash"></span>'
43
+	esc_html__(
44
+		'Using the action buttons you can View Registration Details %1$s, Edit Contact Details %2$s, Resend Registration Details %3$s, and View Transaction Details %4$s.',
45
+		'event_espresso'
46
+	),
47
+	'<span class="dashicons dashicons-search"></span>',
48
+	'<span class="dashicons dashicons-businessman"></span>',
49
+	'<span class="ee-icon ee-icon-email-send"></span>',
50
+	'<span class="ee-icon ee-icon-cash"></span>'
51 51
 ); ?>
52 52
 </li>
53 53
 </ul>
54 54
\ No newline at end of file
Please login to merge, or discard this patch.
admin_pages/events/help_tabs/event_editor_save_new_event.help_tab.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -4,12 +4,12 @@
 block discarded – undo
4 4
 </p>
5 5
 <p class="ee-attention">
6 6
 <?php printf(
7
-    esc_html__(
8
-        'Notice: Due to a %1$scurrent bug in the WordPress core%2$s, your event should always have at least a title or description or excerpt. Saving an event without at least one of these fields filled out with information will result in your event not saving correctly. You will then need to recreate your event by clicking on the Add Event button.',
9
-        'event_espresso'
10
-    ),
11
-    '<a href="https://core.trac.wordpress.org/ticket/17115#comment:15">',
12
-    '</a>'
7
+	esc_html__(
8
+		'Notice: Due to a %1$scurrent bug in the WordPress core%2$s, your event should always have at least a title or description or excerpt. Saving an event without at least one of these fields filled out with information will result in your event not saving correctly. You will then need to recreate your event by clicking on the Add Event button.',
9
+		'event_espresso'
10
+	),
11
+	'<a href="https://core.trac.wordpress.org/ticket/17115#comment:15">',
12
+	'</a>'
13 13
 ); ?>
14 14
 </p>
15 15
 <ul>
Please login to merge, or discard this patch.
registrations/form_sections/EE_Registration_Custom_Questions_Form.form.php 2 patches
Indentation   +155 added lines, -155 removed lines patch added patch discarded remove patch
@@ -15,173 +15,173 @@
 block discarded – undo
15 15
  */
16 16
 class EE_Registration_Custom_Questions_Form extends EE_Form_Section_Proper
17 17
 {
18
-    /**
19
-     *
20
-     * @var EE_Registration
21
-     */
22
-    protected $_registration = null;
18
+	/**
19
+	 *
20
+	 * @var EE_Registration
21
+	 */
22
+	protected $_registration = null;
23 23
 
24
-    /**
25
-     *
26
-     * @param EE_Registration $reg
27
-     * @param array $options
28
-     */
29
-    public function __construct(EE_Registration $reg, $options = array())
30
-    {
31
-        $this->_registration = $reg;
32
-        if (! isset($options['layout_strategy'])) {
33
-            $options['layout_strategy'] = new EE_Admin_Two_Column_Layout();
34
-        }
35
-        if (! isset($options['html_id'])) {
36
-            $options['html_id'] = 'reg-admin-attendee-questions-frm';
37
-        }
38
-        $this->build_form_from_registration();
39
-        parent::__construct($options);
40
-    }
24
+	/**
25
+	 *
26
+	 * @param EE_Registration $reg
27
+	 * @param array $options
28
+	 */
29
+	public function __construct(EE_Registration $reg, $options = array())
30
+	{
31
+		$this->_registration = $reg;
32
+		if (! isset($options['layout_strategy'])) {
33
+			$options['layout_strategy'] = new EE_Admin_Two_Column_Layout();
34
+		}
35
+		if (! isset($options['html_id'])) {
36
+			$options['html_id'] = 'reg-admin-attendee-questions-frm';
37
+		}
38
+		$this->build_form_from_registration();
39
+		parent::__construct($options);
40
+	}
41 41
 
42 42
 
43
-    /**
44
-     * Gets the registration object this form is about
45
-     * @return EE_Registration
46
-     */
47
-    public function get_registration()
48
-    {
49
-        return $this->_registration;
50
-    }
43
+	/**
44
+	 * Gets the registration object this form is about
45
+	 * @return EE_Registration
46
+	 */
47
+	public function get_registration()
48
+	{
49
+		return $this->_registration;
50
+	}
51 51
 
52
-    public function build_form_from_registration()
53
-    {
54
-        $reg = $this->get_registration();
55
-        if (! $reg instanceof EE_Registration) {
56
-            throw new EE_Error(__('We cannot build the registration custom questions form because there is no registration set on it yet', 'event_espresso'));
57
-        }
58
-        // we want to get all their question groups
59
-        $question_groups = EEM_Question_Group::instance()->get_all(
60
-            array(
61
-                array(
62
-                    'Event_Question_Group.EVT_ID' => $reg->event_ID(),
63
-                    'Event_Question_Group.EQG_primary' => $reg->count() == 1 ? true : false,
64
-                    'OR' => array(
65
-                        'Question.QST_system*blank' =>  '',
66
-                        'Question.QST_system*null' => array( 'IS_NULL' )
67
-                    )
68
-                ),
69
-                'order_by' => array( 'QSG_order' => 'ASC' )
70
-            )
71
-        );
72
-        // get each question groups questions
73
-        foreach ($question_groups as $question_group) {
74
-            if ($question_group instanceof EE_Question_Group) {
75
-                $this->_subsections[ $question_group->ID() ] = $this->build_subform_from_question_group(
76
-                    $question_group,
77
-                    $reg
78
-                );
79
-            }
80
-        }
81
-    }
52
+	public function build_form_from_registration()
53
+	{
54
+		$reg = $this->get_registration();
55
+		if (! $reg instanceof EE_Registration) {
56
+			throw new EE_Error(__('We cannot build the registration custom questions form because there is no registration set on it yet', 'event_espresso'));
57
+		}
58
+		// we want to get all their question groups
59
+		$question_groups = EEM_Question_Group::instance()->get_all(
60
+			array(
61
+				array(
62
+					'Event_Question_Group.EVT_ID' => $reg->event_ID(),
63
+					'Event_Question_Group.EQG_primary' => $reg->count() == 1 ? true : false,
64
+					'OR' => array(
65
+						'Question.QST_system*blank' =>  '',
66
+						'Question.QST_system*null' => array( 'IS_NULL' )
67
+					)
68
+				),
69
+				'order_by' => array( 'QSG_order' => 'ASC' )
70
+			)
71
+		);
72
+		// get each question groups questions
73
+		foreach ($question_groups as $question_group) {
74
+			if ($question_group instanceof EE_Question_Group) {
75
+				$this->_subsections[ $question_group->ID() ] = $this->build_subform_from_question_group(
76
+					$question_group,
77
+					$reg
78
+				);
79
+			}
80
+		}
81
+	}
82 82
 
83 83
 
84 84
 
85
-    /**
86
-     *
87
-     * @param EE_Question_Group $question_group
88
-     * @param EE_Registration   $registration
89
-     * @return \EE_Form_Section_Proper
90
-     * @throws \EE_Error
91
-     */
92
-    public function build_subform_from_question_group($question_group, $registration)
93
-    {
94
-        if (! $question_group instanceof EE_Question_Group ||
95
-            ! $registration instanceof EE_Registration) {
96
-            throw new EE_Error(__('A valid question group and registration must be passed to EE_Registration_Custom_Question_Form', 'event_espresso'));
97
-        }
98
-        $parts_of_subsection = array(
99
-            'title' => new EE_Form_Section_HTML(
100
-                EEH_HTML::h5(
101
-                    $question_group->name(),
102
-                    $question_group->identifier(),
103
-                    'espresso-question-group-title-h5 section-title'
104
-                )
105
-            )
106
-        );
107
-        $questions = $question_group->questions(
108
-            array(
109
-                array(
110
-                    'OR' => array(
111
-                        'QST_system*blank' => '',
112
-                        'QST_system*null' => array( 'IS_NULL' )
113
-                    )
114
-                )
115
-            )
116
-        );
117
-        foreach ($questions as $question) {
118
-            $parts_of_subsection[ $question->ID() ] = $question->generate_form_input($registration);
119
-        }
120
-        if (EE_Registry::instance()->CAP->current_user_can(
121
-            'ee_edit_registration',
122
-            'edit-reg-questions-mbox',
123
-            $this->_registration->ID()
124
-        )) {
125
-            $parts_of_subsection['edit_link'] = new EE_Form_Section_HTML(
126
-                EEH_HTML::table(
127
-                    EEH_HTML::tr(
128
-                        '<th/><td class="reg-admin-edit-attendee-question-td"><a class="reg-admin-edit-attendee-question-lnk" href="#" aria-label="' . esc_attr__('click to edit question', 'event_espresso') . '">
85
+	/**
86
+	 *
87
+	 * @param EE_Question_Group $question_group
88
+	 * @param EE_Registration   $registration
89
+	 * @return \EE_Form_Section_Proper
90
+	 * @throws \EE_Error
91
+	 */
92
+	public function build_subform_from_question_group($question_group, $registration)
93
+	{
94
+		if (! $question_group instanceof EE_Question_Group ||
95
+			! $registration instanceof EE_Registration) {
96
+			throw new EE_Error(__('A valid question group and registration must be passed to EE_Registration_Custom_Question_Form', 'event_espresso'));
97
+		}
98
+		$parts_of_subsection = array(
99
+			'title' => new EE_Form_Section_HTML(
100
+				EEH_HTML::h5(
101
+					$question_group->name(),
102
+					$question_group->identifier(),
103
+					'espresso-question-group-title-h5 section-title'
104
+				)
105
+			)
106
+		);
107
+		$questions = $question_group->questions(
108
+			array(
109
+				array(
110
+					'OR' => array(
111
+						'QST_system*blank' => '',
112
+						'QST_system*null' => array( 'IS_NULL' )
113
+					)
114
+				)
115
+			)
116
+		);
117
+		foreach ($questions as $question) {
118
+			$parts_of_subsection[ $question->ID() ] = $question->generate_form_input($registration);
119
+		}
120
+		if (EE_Registry::instance()->CAP->current_user_can(
121
+			'ee_edit_registration',
122
+			'edit-reg-questions-mbox',
123
+			$this->_registration->ID()
124
+		)) {
125
+			$parts_of_subsection['edit_link'] = new EE_Form_Section_HTML(
126
+				EEH_HTML::table(
127
+					EEH_HTML::tr(
128
+						'<th/><td class="reg-admin-edit-attendee-question-td"><a class="reg-admin-edit-attendee-question-lnk" href="#" aria-label="' . esc_attr__('click to edit question', 'event_espresso') . '">
129 129
 		  			<span class="reg-admin-edit-question-group-spn">' . __('edit the above question group', 'event_espresso') . '</span>
130 130
 		  			<div class="dashicons dashicons-edit"></div>
131 131
 		  		</a></td>'
132
-                    ) .
133
-                    EEH_HTML::no_row('', 2)
134
-                )
135
-            );
136
-        }
137
-        return new EE_Form_Section_Proper(
138
-            array(
139
-                'subsections' => $parts_of_subsection,
140
-                'html_class' => 'question-group-questions',
141
-            )
142
-        );
143
-    }
132
+					) .
133
+					EEH_HTML::no_row('', 2)
134
+				)
135
+			);
136
+		}
137
+		return new EE_Form_Section_Proper(
138
+			array(
139
+				'subsections' => $parts_of_subsection,
140
+				'html_class' => 'question-group-questions',
141
+			)
142
+		);
143
+	}
144 144
 
145
-    /**
146
-     * Overrides parent so if inputs were disabled, we leave those with their defaults
147
-     * from the answers in the DB
148
-     * @param array $req_data like $_POST
149
-     * @return void
150
-     */
151
-    protected function _normalize($req_data)
152
-    {
153
-        $this->_received_submission = true;
154
-        $this->_validation_errors = array();
155
-        foreach ($this->get_validatable_subsections() as $subsection) {
156
-            if ($subsection->form_data_present_in($req_data)) {
157
-                try {
158
-                    $subsection->_normalize($req_data);
159
-                } catch (EE_Validation_Error $e) {
160
-                    $subsection->add_validation_error($e);
161
-                }
162
-            }
163
-        }
164
-    }
145
+	/**
146
+	 * Overrides parent so if inputs were disabled, we leave those with their defaults
147
+	 * from the answers in the DB
148
+	 * @param array $req_data like $_POST
149
+	 * @return void
150
+	 */
151
+	protected function _normalize($req_data)
152
+	{
153
+		$this->_received_submission = true;
154
+		$this->_validation_errors = array();
155
+		foreach ($this->get_validatable_subsections() as $subsection) {
156
+			if ($subsection->form_data_present_in($req_data)) {
157
+				try {
158
+					$subsection->_normalize($req_data);
159
+				} catch (EE_Validation_Error $e) {
160
+					$subsection->add_validation_error($e);
161
+				}
162
+			}
163
+		}
164
+	}
165 165
 
166 166
 
167 167
 
168
-    /**
169
-     * Performs validation on this form section and its subsections. For each subsection,
170
-     * calls _validate_{subsection_name} on THIS form (if the function exists) and passes it the subsection, then calls _validate on that subsection.
171
-     * If you need to perform validation on the form as a whole (considering multiple) you would be best to override this _validate method,
172
-     * calling parent::_validate() first.
173
-     */
174
-    protected function _validate()
175
-    {
176
-        foreach ($this->get_validatable_subsections() as $subsection_name => $subsection) {
177
-            if ($subsection->form_data_present_in(array_merge($_GET, $_POST))) {
178
-                if (method_exists($this, '_validate_'.$subsection_name)) {
179
-                    call_user_func_array(array($this,'_validate_'.$subsection_name), array($subsection));
180
-                }
181
-                $subsection->_validate();
182
-            } elseif ($subsection instanceof EE_Form_Section_Proper) {
183
-                $subsection->_received_submission = true;
184
-            }
185
-        }
186
-    }
168
+	/**
169
+	 * Performs validation on this form section and its subsections. For each subsection,
170
+	 * calls _validate_{subsection_name} on THIS form (if the function exists) and passes it the subsection, then calls _validate on that subsection.
171
+	 * If you need to perform validation on the form as a whole (considering multiple) you would be best to override this _validate method,
172
+	 * calling parent::_validate() first.
173
+	 */
174
+	protected function _validate()
175
+	{
176
+		foreach ($this->get_validatable_subsections() as $subsection_name => $subsection) {
177
+			if ($subsection->form_data_present_in(array_merge($_GET, $_POST))) {
178
+				if (method_exists($this, '_validate_'.$subsection_name)) {
179
+					call_user_func_array(array($this,'_validate_'.$subsection_name), array($subsection));
180
+				}
181
+				$subsection->_validate();
182
+			} elseif ($subsection instanceof EE_Form_Section_Proper) {
183
+				$subsection->_received_submission = true;
184
+			}
185
+		}
186
+	}
187 187
 }
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -29,10 +29,10 @@  discard block
 block discarded – undo
29 29
     public function __construct(EE_Registration $reg, $options = array())
30 30
     {
31 31
         $this->_registration = $reg;
32
-        if (! isset($options['layout_strategy'])) {
32
+        if ( ! isset($options['layout_strategy'])) {
33 33
             $options['layout_strategy'] = new EE_Admin_Two_Column_Layout();
34 34
         }
35
-        if (! isset($options['html_id'])) {
35
+        if ( ! isset($options['html_id'])) {
36 36
             $options['html_id'] = 'reg-admin-attendee-questions-frm';
37 37
         }
38 38
         $this->build_form_from_registration();
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     public function build_form_from_registration()
53 53
     {
54 54
         $reg = $this->get_registration();
55
-        if (! $reg instanceof EE_Registration) {
55
+        if ( ! $reg instanceof EE_Registration) {
56 56
             throw new EE_Error(__('We cannot build the registration custom questions form because there is no registration set on it yet', 'event_espresso'));
57 57
         }
58 58
         // we want to get all their question groups
@@ -63,16 +63,16 @@  discard block
 block discarded – undo
63 63
                     'Event_Question_Group.EQG_primary' => $reg->count() == 1 ? true : false,
64 64
                     'OR' => array(
65 65
                         'Question.QST_system*blank' =>  '',
66
-                        'Question.QST_system*null' => array( 'IS_NULL' )
66
+                        'Question.QST_system*null' => array('IS_NULL')
67 67
                     )
68 68
                 ),
69
-                'order_by' => array( 'QSG_order' => 'ASC' )
69
+                'order_by' => array('QSG_order' => 'ASC')
70 70
             )
71 71
         );
72 72
         // get each question groups questions
73 73
         foreach ($question_groups as $question_group) {
74 74
             if ($question_group instanceof EE_Question_Group) {
75
-                $this->_subsections[ $question_group->ID() ] = $this->build_subform_from_question_group(
75
+                $this->_subsections[$question_group->ID()] = $this->build_subform_from_question_group(
76 76
                     $question_group,
77 77
                     $reg
78 78
                 );
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      */
92 92
     public function build_subform_from_question_group($question_group, $registration)
93 93
     {
94
-        if (! $question_group instanceof EE_Question_Group ||
94
+        if ( ! $question_group instanceof EE_Question_Group ||
95 95
             ! $registration instanceof EE_Registration) {
96 96
             throw new EE_Error(__('A valid question group and registration must be passed to EE_Registration_Custom_Question_Form', 'event_espresso'));
97 97
         }
@@ -109,13 +109,13 @@  discard block
 block discarded – undo
109 109
                 array(
110 110
                     'OR' => array(
111 111
                         'QST_system*blank' => '',
112
-                        'QST_system*null' => array( 'IS_NULL' )
112
+                        'QST_system*null' => array('IS_NULL')
113 113
                     )
114 114
                 )
115 115
             )
116 116
         );
117 117
         foreach ($questions as $question) {
118
-            $parts_of_subsection[ $question->ID() ] = $question->generate_form_input($registration);
118
+            $parts_of_subsection[$question->ID()] = $question->generate_form_input($registration);
119 119
         }
120 120
         if (EE_Registry::instance()->CAP->current_user_can(
121 121
             'ee_edit_registration',
@@ -125,11 +125,11 @@  discard block
 block discarded – undo
125 125
             $parts_of_subsection['edit_link'] = new EE_Form_Section_HTML(
126 126
                 EEH_HTML::table(
127 127
                     EEH_HTML::tr(
128
-                        '<th/><td class="reg-admin-edit-attendee-question-td"><a class="reg-admin-edit-attendee-question-lnk" href="#" aria-label="' . esc_attr__('click to edit question', 'event_espresso') . '">
129
-		  			<span class="reg-admin-edit-question-group-spn">' . __('edit the above question group', 'event_espresso') . '</span>
128
+                        '<th/><td class="reg-admin-edit-attendee-question-td"><a class="reg-admin-edit-attendee-question-lnk" href="#" aria-label="'.esc_attr__('click to edit question', 'event_espresso').'">
129
+		  			<span class="reg-admin-edit-question-group-spn">' . __('edit the above question group', 'event_espresso').'</span>
130 130
 		  			<div class="dashicons dashicons-edit"></div>
131 131
 		  		</a></td>'
132
-                    ) .
132
+                    ).
133 133
                     EEH_HTML::no_row('', 2)
134 134
                 )
135 135
             );
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
         foreach ($this->get_validatable_subsections() as $subsection_name => $subsection) {
177 177
             if ($subsection->form_data_present_in(array_merge($_GET, $_POST))) {
178 178
                 if (method_exists($this, '_validate_'.$subsection_name)) {
179
-                    call_user_func_array(array($this,'_validate_'.$subsection_name), array($subsection));
179
+                    call_user_func_array(array($this, '_validate_'.$subsection_name), array($subsection));
180 180
                 }
181 181
                 $subsection->_validate();
182 182
             } elseif ($subsection instanceof EE_Form_Section_Proper) {
Please login to merge, or discard this patch.
core/libraries/form_sections/form_handlers/SequentialStepFormManager.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use EE_Error;
6 6
 use EE_Request;
7
-use EventEspresso\core\exceptions\ExceptionStackTraceDisplay;
8 7
 use EventEspresso\core\exceptions\InvalidClassException;
9 8
 use EventEspresso\core\exceptions\InvalidDataTypeException;
10 9
 use EventEspresso\core\exceptions\InvalidEntityException;
Please login to merge, or discard this patch.
Indentation   +580 added lines, -580 removed lines patch added patch discarded remove patch
@@ -29,584 +29,584 @@
 block discarded – undo
29 29
 abstract class SequentialStepFormManager
30 30
 {
31 31
 
32
-    /**
33
-     * a simplified URL with no form related parameters
34
-     * that will be used to build the form's redirect URLs
35
-     *
36
-     * @var string $base_url
37
-     */
38
-    private $base_url = '';
39
-
40
-    /**
41
-     * the key used for the URL param that denotes the current form step
42
-     * defaults to 'ee-form-step'
43
-     *
44
-     * @var string $form_step_url_key
45
-     */
46
-    private $form_step_url_key = '';
47
-
48
-    /**
49
-     * @var string $default_form_step
50
-     */
51
-    private $default_form_step = '';
52
-
53
-    /**
54
-     * @var string $form_action
55
-     */
56
-    private $form_action;
57
-
58
-    /**
59
-     * value of one of the string constant above
60
-     *
61
-     * @var string $form_config
62
-     */
63
-    private $form_config;
64
-
65
-    /**
66
-     * @var string $progress_step_style
67
-     */
68
-    private $progress_step_style = '';
69
-
70
-    /**
71
-     * @var EE_Request $request
72
-     */
73
-    private $request;
74
-
75
-    /**
76
-     * @var Collection $form_steps
77
-     */
78
-    protected $form_steps;
79
-
80
-    /**
81
-     * @var ProgressStepManager $progress_step_manager
82
-     */
83
-    protected $progress_step_manager;
84
-
85
-
86
-    /**
87
-     * @return Collection|null
88
-     */
89
-    abstract protected function getFormStepsCollection();
90
-
91
-    // phpcs:disable PEAR.Functions.ValidDefaultValue.NotAtEnd
92
-    /**
93
-     * StepsManager constructor
94
-     *
95
-     * @param string     $base_url
96
-     * @param string     $default_form_step
97
-     * @param string     $form_action
98
-     * @param string     $form_config
99
-     * @param EE_Request $request
100
-     * @param string     $progress_step_style
101
-     * @throws InvalidDataTypeException
102
-     * @throws InvalidArgumentException
103
-     */
104
-    public function __construct(
105
-        $base_url,
106
-        $default_form_step,
107
-        $form_action = '',
108
-        $form_config = FormHandler::ADD_FORM_TAGS_AND_SUBMIT,
109
-        $progress_step_style = 'number_bubbles',
110
-        EE_Request $request
111
-    ) {
112
-        $this->setBaseUrl($base_url);
113
-        $this->setDefaultFormStep($default_form_step);
114
-        $this->setFormAction($form_action);
115
-        $this->setFormConfig($form_config);
116
-        $this->setProgressStepStyle($progress_step_style);
117
-        $this->request = $request;
118
-    }
119
-
120
-
121
-    /**
122
-     * @return string
123
-     * @throws InvalidFormHandlerException
124
-     */
125
-    public function baseUrl()
126
-    {
127
-        if (strpos($this->base_url, $this->getCurrentStep()->slug()) === false) {
128
-            add_query_arg(
129
-                array($this->form_step_url_key => $this->getCurrentStep()->slug()),
130
-                $this->base_url
131
-            );
132
-        }
133
-        return $this->base_url;
134
-    }
135
-
136
-
137
-    /**
138
-     * @param string $base_url
139
-     * @throws InvalidDataTypeException
140
-     * @throws InvalidArgumentException
141
-     */
142
-    protected function setBaseUrl($base_url)
143
-    {
144
-        if (! is_string($base_url)) {
145
-            throw new InvalidDataTypeException('$base_url', $base_url, 'string');
146
-        }
147
-        if (empty($base_url)) {
148
-            throw new InvalidArgumentException(
149
-                esc_html__('The base URL can not be an empty string.', 'event_espresso')
150
-            );
151
-        }
152
-        $this->base_url = $base_url;
153
-    }
154
-
155
-
156
-    /**
157
-     * @return string
158
-     * @throws InvalidDataTypeException
159
-     */
160
-    public function formStepUrlKey()
161
-    {
162
-        if (empty($this->form_step_url_key)) {
163
-            $this->setFormStepUrlKey();
164
-        }
165
-        return $this->form_step_url_key;
166
-    }
167
-
168
-
169
-    /**
170
-     * @param string $form_step_url_key
171
-     * @throws InvalidDataTypeException
172
-     */
173
-    public function setFormStepUrlKey($form_step_url_key = 'ee-form-step')
174
-    {
175
-        if (! is_string($form_step_url_key)) {
176
-            throw new InvalidDataTypeException('$form_step_key', $form_step_url_key, 'string');
177
-        }
178
-        $this->form_step_url_key = ! empty($form_step_url_key) ? $form_step_url_key : 'ee-form-step';
179
-    }
180
-
181
-
182
-    /**
183
-     * @return string
184
-     */
185
-    public function defaultFormStep()
186
-    {
187
-        return $this->default_form_step;
188
-    }
189
-
190
-
191
-    /**
192
-     * @param $default_form_step
193
-     * @throws InvalidDataTypeException
194
-     */
195
-    protected function setDefaultFormStep($default_form_step)
196
-    {
197
-        if (! is_string($default_form_step)) {
198
-            throw new InvalidDataTypeException('$default_form_step', $default_form_step, 'string');
199
-        }
200
-        $this->default_form_step = $default_form_step;
201
-    }
202
-
203
-
204
-    /**
205
-     * @return void
206
-     * @throws \EventEspresso\core\exceptions\InvalidIdentifierException
207
-     * @throws InvalidDataTypeException
208
-     */
209
-    protected function setCurrentStepFromRequest()
210
-    {
211
-        $current_step_slug = $this->request()->get($this->formStepUrlKey(), $this->defaultFormStep());
212
-        if (! $this->form_steps->setCurrent($current_step_slug)) {
213
-            throw new InvalidIdentifierException(
214
-                $current_step_slug,
215
-                $this->defaultFormStep(),
216
-                $message = sprintf(
217
-                    esc_html__(
218
-                        'The "%1$s" form step could not be set.',
219
-                        'event_espresso'
220
-                    ),
221
-                    $current_step_slug
222
-                )
223
-            );
224
-        }
225
-    }
226
-
227
-
228
-    /**
229
-     * @return object|SequentialStepFormInterface
230
-     * @throws InvalidFormHandlerException
231
-     */
232
-    public function getCurrentStep()
233
-    {
234
-        if (! $this->form_steps->current() instanceof SequentialStepForm) {
235
-            throw new InvalidFormHandlerException($this->form_steps->current());
236
-        }
237
-        return $this->form_steps->current();
238
-    }
239
-
240
-
241
-    /**
242
-     * @return string
243
-     * @throws InvalidFormHandlerException
244
-     */
245
-    public function formAction()
246
-    {
247
-        if (! is_string($this->form_action) || empty($this->form_action)) {
248
-            $this->form_action = $this->baseUrl();
249
-        }
250
-        return $this->form_action;
251
-    }
252
-
253
-
254
-    /**
255
-     * @param string $form_action
256
-     * @throws InvalidDataTypeException
257
-     */
258
-    public function setFormAction($form_action)
259
-    {
260
-        if (! is_string($form_action)) {
261
-            throw new InvalidDataTypeException('$form_action', $form_action, 'string');
262
-        }
263
-        $this->form_action = $form_action;
264
-    }
265
-
266
-
267
-    /**
268
-     * @param array $form_action_args
269
-     * @throws InvalidDataTypeException
270
-     * @throws InvalidFormHandlerException
271
-     */
272
-    public function addFormActionArgs($form_action_args = array())
273
-    {
274
-        if (! is_array($form_action_args)) {
275
-            throw new InvalidDataTypeException('$form_action_args', $form_action_args, 'array');
276
-        }
277
-        $form_action_args = ! empty($form_action_args)
278
-            ? $form_action_args
279
-            : array($this->formStepUrlKey() => $this->form_steps->current()->slug());
280
-        $this->getCurrentStep()->setFormAction(
281
-            add_query_arg($form_action_args, $this->formAction())
282
-        );
283
-        $this->form_action = $this->getCurrentStep()->formAction();
284
-    }
285
-
286
-
287
-    /**
288
-     * @return string
289
-     */
290
-    public function formConfig()
291
-    {
292
-        return $this->form_config;
293
-    }
294
-
295
-
296
-    /**
297
-     * @param string $form_config
298
-     */
299
-    public function setFormConfig($form_config)
300
-    {
301
-        $this->form_config = $form_config;
302
-    }
303
-
304
-
305
-    /**
306
-     * @return string
307
-     */
308
-    public function progressStepStyle()
309
-    {
310
-        return $this->progress_step_style;
311
-    }
312
-
313
-
314
-    /**
315
-     * @param string $progress_step_style
316
-     */
317
-    public function setProgressStepStyle($progress_step_style)
318
-    {
319
-        $this->progress_step_style = $progress_step_style;
320
-    }
321
-
322
-
323
-    /**
324
-     * @return EE_Request
325
-     */
326
-    public function request()
327
-    {
328
-        return $this->request;
329
-    }
330
-
331
-
332
-    /**
333
-     * @return Collection|null
334
-     * @throws InvalidInterfaceException
335
-     */
336
-    protected function getProgressStepsCollection()
337
-    {
338
-        static $collection = null;
339
-        if (! $collection instanceof ProgressStepCollection) {
340
-            $collection = new ProgressStepCollection();
341
-        }
342
-        return $collection;
343
-    }
344
-
345
-
346
-    /**
347
-     * @param Collection $progress_steps_collection
348
-     * @return ProgressStepManager
349
-     * @throws InvalidInterfaceException
350
-     * @throws InvalidClassException
351
-     * @throws InvalidDataTypeException
352
-     * @throws InvalidEntityException
353
-     * @throws InvalidFormHandlerException
354
-     */
355
-    protected function generateProgressSteps(Collection $progress_steps_collection)
356
-    {
357
-        $current_step = $this->getCurrentStep();
358
-        /** @var SequentialStepForm $form_step */
359
-        foreach ($this->form_steps as $form_step) {
360
-            // is this step active ?
361
-            if (! $form_step->initialize()) {
362
-                continue;
363
-            }
364
-            $progress_steps_collection->add(
365
-                new ProgressStep(
366
-                    $form_step->order(),
367
-                    $form_step->slug(),
368
-                    $form_step->slug(),
369
-                    $form_step->formName()
370
-                ),
371
-                $form_step->slug()
372
-            );
373
-        }
374
-        // set collection pointer back to current step
375
-        $this->form_steps->setCurrentUsingObject($current_step);
376
-        return new ProgressStepManager(
377
-            $this->progressStepStyle(),
378
-            $this->defaultFormStep(),
379
-            $this->formStepUrlKey(),
380
-            $progress_steps_collection
381
-        );
382
-    }
383
-
384
-
385
-    /**
386
-     * @throws InvalidClassException
387
-     * @throws InvalidDataTypeException
388
-     * @throws InvalidEntityException
389
-     * @throws InvalidIdentifierException
390
-     * @throws InvalidInterfaceException
391
-     * @throws InvalidArgumentException
392
-     * @throws InvalidFormHandlerException
393
-     */
394
-    public function buildForm()
395
-    {
396
-        $this->buildCurrentStepFormForDisplay();
397
-    }
398
-
399
-
400
-    /**
401
-     * @param array $form_data
402
-     * @throws InvalidArgumentException
403
-     * @throws InvalidClassException
404
-     * @throws InvalidDataTypeException
405
-     * @throws InvalidEntityException
406
-     * @throws InvalidFormHandlerException
407
-     * @throws InvalidIdentifierException
408
-     * @throws InvalidInterfaceException
409
-     */
410
-    public function processForm($form_data = array())
411
-    {
412
-        $this->buildCurrentStepFormForProcessing();
413
-        $this->processCurrentStepForm($form_data);
414
-    }
415
-
416
-
417
-    /**
418
-     * @throws InvalidClassException
419
-     * @throws InvalidDataTypeException
420
-     * @throws InvalidEntityException
421
-     * @throws InvalidInterfaceException
422
-     * @throws InvalidIdentifierException
423
-     * @throws InvalidArgumentException
424
-     * @throws InvalidFormHandlerException
425
-     */
426
-    public function buildCurrentStepFormForDisplay()
427
-    {
428
-        $form_step = $this->buildCurrentStepForm();
429
-        // no displayable content ? then skip straight to processing
430
-        if (! $form_step->displayable()) {
431
-            $this->addFormActionArgs();
432
-            $form_step->setFormAction($this->formAction());
433
-            wp_safe_redirect($form_step->formAction());
434
-        }
435
-    }
436
-
437
-
438
-    /**
439
-     * @throws InvalidClassException
440
-     * @throws InvalidDataTypeException
441
-     * @throws InvalidEntityException
442
-     * @throws InvalidInterfaceException
443
-     * @throws InvalidIdentifierException
444
-     * @throws InvalidArgumentException
445
-     * @throws InvalidFormHandlerException
446
-     */
447
-    public function buildCurrentStepFormForProcessing()
448
-    {
449
-        $this->buildCurrentStepForm(false);
450
-    }
451
-
452
-
453
-    /**
454
-     * @param bool $for_display
455
-     * @return SequentialStepFormInterface
456
-     * @throws InvalidArgumentException
457
-     * @throws InvalidClassException
458
-     * @throws InvalidDataTypeException
459
-     * @throws InvalidEntityException
460
-     * @throws InvalidFormHandlerException
461
-     * @throws InvalidIdentifierException
462
-     * @throws InvalidInterfaceException
463
-     */
464
-    private function buildCurrentStepForm($for_display = true)
465
-    {
466
-        $this->form_steps = $this->getFormStepsCollection();
467
-        $this->setCurrentStepFromRequest();
468
-        $form_step = $this->getCurrentStep();
469
-        if ($form_step->submitBtnText() === esc_html__('Submit', 'event_espresso')) {
470
-            $form_step->setSubmitBtnText(esc_html__('Next Step', 'event_espresso'));
471
-        }
472
-        if ($for_display && $form_step->displayable()) {
473
-            $this->progress_step_manager = $this->generateProgressSteps(
474
-                $this->getProgressStepsCollection()
475
-            );
476
-            $this->progress_step_manager->setCurrentStep(
477
-                $form_step->slug()
478
-            );
479
-            // mark all previous progress steps as completed
480
-            $this->progress_step_manager->setPreviousStepsCompleted();
481
-            $this->progress_step_manager->enqueueStylesAndScripts();
482
-            $this->addFormActionArgs();
483
-            $form_step->setFormAction($this->formAction());
484
-        } else {
485
-            $form_step->setRedirectUrl($this->baseUrl());
486
-            $form_step->addRedirectArgs(
487
-                array($this->formStepUrlKey() => $this->form_steps->current()->slug())
488
-            );
489
-        }
490
-        $form_step->generate();
491
-        if ($for_display) {
492
-            $form_step->enqueueStylesAndScripts();
493
-        }
494
-        return $form_step;
495
-    }
496
-
497
-
498
-    /**
499
-     * @param bool $return_as_string
500
-     * @return string
501
-     * @throws InvalidFormHandlerException
502
-     */
503
-    public function displayProgressSteps($return_as_string = true)
504
-    {
505
-        $form_step = $this->getCurrentStep();
506
-        if (! $form_step->displayable()) {
507
-            return '';
508
-        }
509
-        $progress_steps = apply_filters(
510
-            'FHEE__EventEspresso_core_libraries_form_sections_form_handlers_SequentialStepFormManager__displayProgressSteps__before_steps',
511
-            ''
512
-        );
513
-        $progress_steps .= $this->progress_step_manager->displaySteps();
514
-        $progress_steps .= apply_filters(
515
-            'FHEE__EventEspresso_core_libraries_form_sections_form_handlers_SequentialStepFormManager__displayProgressSteps__after_steps',
516
-            ''
517
-        );
518
-        if ($return_as_string) {
519
-            return $progress_steps;
520
-        }
521
-        echo $progress_steps;
522
-        return '';
523
-    }
524
-
525
-
526
-    /**
527
-     * @param bool $return_as_string
528
-     * @return string
529
-     * @throws InvalidFormHandlerException
530
-     */
531
-    public function displayCurrentStepForm($return_as_string = true)
532
-    {
533
-        if ($return_as_string) {
534
-            return $this->getCurrentStep()->display();
535
-        }
536
-        echo $this->getCurrentStep()->display();
537
-        return '';
538
-    }
539
-
540
-
541
-    /**
542
-     * @param array $form_data
543
-     * @return void
544
-     * @throws InvalidArgumentException
545
-     * @throws InvalidDataTypeException
546
-     * @throws InvalidFormHandlerException
547
-     */
548
-    public function processCurrentStepForm($form_data = array())
549
-    {
550
-        // grab instance of current step because after calling next() below,
551
-        // any calls to getCurrentStep() will return the "next" step because we advanced
552
-        $current_step = $this->getCurrentStep();
553
-        try {
554
-            // form processing should either throw exceptions or return true
555
-            $current_step->process($form_data);
556
-        } catch (Exception $e) {
557
-            // something went wrong, convert the Exception to an EE_Error
558
-            EE_Error::add_error($e->getMessage(), __FILE__, __FUNCTION__, __LINE__);
559
-            // prevent redirect to next step or other if exception was thrown
560
-            if ($current_step->redirectTo() === SequentialStepForm::REDIRECT_TO_NEXT_STEP
561
-                || $current_step->redirectTo() === SequentialStepForm::REDIRECT_TO_OTHER
562
-            ) {
563
-                $current_step->setRedirectTo(SequentialStepForm::REDIRECT_TO_CURRENT_STEP);
564
-            }
565
-        }
566
-        // save notices to a transient so that when we redirect back
567
-        // to the display portion for this step
568
-        // those notices can be displayed
569
-        EE_Error::get_notices(false, true);
570
-        $this->redirectForm($current_step);
571
-    }
572
-
573
-
574
-    /**
575
-     * handles where to go to next
576
-     *
577
-     * @param SequentialStepFormInterface $current_step
578
-     * @throws InvalidArgumentException
579
-     * @throws InvalidDataTypeException
580
-     * @throws InvalidFormHandlerException
581
-     */
582
-    public function redirectForm(SequentialStepFormInterface $current_step)
583
-    {
584
-        $redirect_step = $current_step;
585
-        switch ($current_step->redirectTo()) {
586
-            case SequentialStepForm::REDIRECT_TO_OTHER:
587
-                // going somewhere else, so just check out now
588
-                wp_safe_redirect($redirect_step->redirectUrl());
589
-                exit();
590
-                break;
591
-            case SequentialStepForm::REDIRECT_TO_PREV_STEP:
592
-                $redirect_step = $this->form_steps->previous();
593
-                break;
594
-            case SequentialStepForm::REDIRECT_TO_NEXT_STEP:
595
-                $this->form_steps->next();
596
-                if ($this->form_steps->valid()) {
597
-                    $redirect_step = $this->form_steps->current();
598
-                }
599
-                break;
600
-            case SequentialStepForm::REDIRECT_TO_CURRENT_STEP:
601
-            default:
602
-                // $redirect_step is already set
603
-        }
604
-        $current_step->setRedirectUrl($this->baseUrl());
605
-        $current_step->addRedirectArgs(
606
-            // use the slug for whatever step we are redirecting too
607
-            array($this->formStepUrlKey() => $redirect_step->slug())
608
-        );
609
-        wp_safe_redirect($current_step->redirectUrl());
610
-        exit();
611
-    }
32
+	/**
33
+	 * a simplified URL with no form related parameters
34
+	 * that will be used to build the form's redirect URLs
35
+	 *
36
+	 * @var string $base_url
37
+	 */
38
+	private $base_url = '';
39
+
40
+	/**
41
+	 * the key used for the URL param that denotes the current form step
42
+	 * defaults to 'ee-form-step'
43
+	 *
44
+	 * @var string $form_step_url_key
45
+	 */
46
+	private $form_step_url_key = '';
47
+
48
+	/**
49
+	 * @var string $default_form_step
50
+	 */
51
+	private $default_form_step = '';
52
+
53
+	/**
54
+	 * @var string $form_action
55
+	 */
56
+	private $form_action;
57
+
58
+	/**
59
+	 * value of one of the string constant above
60
+	 *
61
+	 * @var string $form_config
62
+	 */
63
+	private $form_config;
64
+
65
+	/**
66
+	 * @var string $progress_step_style
67
+	 */
68
+	private $progress_step_style = '';
69
+
70
+	/**
71
+	 * @var EE_Request $request
72
+	 */
73
+	private $request;
74
+
75
+	/**
76
+	 * @var Collection $form_steps
77
+	 */
78
+	protected $form_steps;
79
+
80
+	/**
81
+	 * @var ProgressStepManager $progress_step_manager
82
+	 */
83
+	protected $progress_step_manager;
84
+
85
+
86
+	/**
87
+	 * @return Collection|null
88
+	 */
89
+	abstract protected function getFormStepsCollection();
90
+
91
+	// phpcs:disable PEAR.Functions.ValidDefaultValue.NotAtEnd
92
+	/**
93
+	 * StepsManager constructor
94
+	 *
95
+	 * @param string     $base_url
96
+	 * @param string     $default_form_step
97
+	 * @param string     $form_action
98
+	 * @param string     $form_config
99
+	 * @param EE_Request $request
100
+	 * @param string     $progress_step_style
101
+	 * @throws InvalidDataTypeException
102
+	 * @throws InvalidArgumentException
103
+	 */
104
+	public function __construct(
105
+		$base_url,
106
+		$default_form_step,
107
+		$form_action = '',
108
+		$form_config = FormHandler::ADD_FORM_TAGS_AND_SUBMIT,
109
+		$progress_step_style = 'number_bubbles',
110
+		EE_Request $request
111
+	) {
112
+		$this->setBaseUrl($base_url);
113
+		$this->setDefaultFormStep($default_form_step);
114
+		$this->setFormAction($form_action);
115
+		$this->setFormConfig($form_config);
116
+		$this->setProgressStepStyle($progress_step_style);
117
+		$this->request = $request;
118
+	}
119
+
120
+
121
+	/**
122
+	 * @return string
123
+	 * @throws InvalidFormHandlerException
124
+	 */
125
+	public function baseUrl()
126
+	{
127
+		if (strpos($this->base_url, $this->getCurrentStep()->slug()) === false) {
128
+			add_query_arg(
129
+				array($this->form_step_url_key => $this->getCurrentStep()->slug()),
130
+				$this->base_url
131
+			);
132
+		}
133
+		return $this->base_url;
134
+	}
135
+
136
+
137
+	/**
138
+	 * @param string $base_url
139
+	 * @throws InvalidDataTypeException
140
+	 * @throws InvalidArgumentException
141
+	 */
142
+	protected function setBaseUrl($base_url)
143
+	{
144
+		if (! is_string($base_url)) {
145
+			throw new InvalidDataTypeException('$base_url', $base_url, 'string');
146
+		}
147
+		if (empty($base_url)) {
148
+			throw new InvalidArgumentException(
149
+				esc_html__('The base URL can not be an empty string.', 'event_espresso')
150
+			);
151
+		}
152
+		$this->base_url = $base_url;
153
+	}
154
+
155
+
156
+	/**
157
+	 * @return string
158
+	 * @throws InvalidDataTypeException
159
+	 */
160
+	public function formStepUrlKey()
161
+	{
162
+		if (empty($this->form_step_url_key)) {
163
+			$this->setFormStepUrlKey();
164
+		}
165
+		return $this->form_step_url_key;
166
+	}
167
+
168
+
169
+	/**
170
+	 * @param string $form_step_url_key
171
+	 * @throws InvalidDataTypeException
172
+	 */
173
+	public function setFormStepUrlKey($form_step_url_key = 'ee-form-step')
174
+	{
175
+		if (! is_string($form_step_url_key)) {
176
+			throw new InvalidDataTypeException('$form_step_key', $form_step_url_key, 'string');
177
+		}
178
+		$this->form_step_url_key = ! empty($form_step_url_key) ? $form_step_url_key : 'ee-form-step';
179
+	}
180
+
181
+
182
+	/**
183
+	 * @return string
184
+	 */
185
+	public function defaultFormStep()
186
+	{
187
+		return $this->default_form_step;
188
+	}
189
+
190
+
191
+	/**
192
+	 * @param $default_form_step
193
+	 * @throws InvalidDataTypeException
194
+	 */
195
+	protected function setDefaultFormStep($default_form_step)
196
+	{
197
+		if (! is_string($default_form_step)) {
198
+			throw new InvalidDataTypeException('$default_form_step', $default_form_step, 'string');
199
+		}
200
+		$this->default_form_step = $default_form_step;
201
+	}
202
+
203
+
204
+	/**
205
+	 * @return void
206
+	 * @throws \EventEspresso\core\exceptions\InvalidIdentifierException
207
+	 * @throws InvalidDataTypeException
208
+	 */
209
+	protected function setCurrentStepFromRequest()
210
+	{
211
+		$current_step_slug = $this->request()->get($this->formStepUrlKey(), $this->defaultFormStep());
212
+		if (! $this->form_steps->setCurrent($current_step_slug)) {
213
+			throw new InvalidIdentifierException(
214
+				$current_step_slug,
215
+				$this->defaultFormStep(),
216
+				$message = sprintf(
217
+					esc_html__(
218
+						'The "%1$s" form step could not be set.',
219
+						'event_espresso'
220
+					),
221
+					$current_step_slug
222
+				)
223
+			);
224
+		}
225
+	}
226
+
227
+
228
+	/**
229
+	 * @return object|SequentialStepFormInterface
230
+	 * @throws InvalidFormHandlerException
231
+	 */
232
+	public function getCurrentStep()
233
+	{
234
+		if (! $this->form_steps->current() instanceof SequentialStepForm) {
235
+			throw new InvalidFormHandlerException($this->form_steps->current());
236
+		}
237
+		return $this->form_steps->current();
238
+	}
239
+
240
+
241
+	/**
242
+	 * @return string
243
+	 * @throws InvalidFormHandlerException
244
+	 */
245
+	public function formAction()
246
+	{
247
+		if (! is_string($this->form_action) || empty($this->form_action)) {
248
+			$this->form_action = $this->baseUrl();
249
+		}
250
+		return $this->form_action;
251
+	}
252
+
253
+
254
+	/**
255
+	 * @param string $form_action
256
+	 * @throws InvalidDataTypeException
257
+	 */
258
+	public function setFormAction($form_action)
259
+	{
260
+		if (! is_string($form_action)) {
261
+			throw new InvalidDataTypeException('$form_action', $form_action, 'string');
262
+		}
263
+		$this->form_action = $form_action;
264
+	}
265
+
266
+
267
+	/**
268
+	 * @param array $form_action_args
269
+	 * @throws InvalidDataTypeException
270
+	 * @throws InvalidFormHandlerException
271
+	 */
272
+	public function addFormActionArgs($form_action_args = array())
273
+	{
274
+		if (! is_array($form_action_args)) {
275
+			throw new InvalidDataTypeException('$form_action_args', $form_action_args, 'array');
276
+		}
277
+		$form_action_args = ! empty($form_action_args)
278
+			? $form_action_args
279
+			: array($this->formStepUrlKey() => $this->form_steps->current()->slug());
280
+		$this->getCurrentStep()->setFormAction(
281
+			add_query_arg($form_action_args, $this->formAction())
282
+		);
283
+		$this->form_action = $this->getCurrentStep()->formAction();
284
+	}
285
+
286
+
287
+	/**
288
+	 * @return string
289
+	 */
290
+	public function formConfig()
291
+	{
292
+		return $this->form_config;
293
+	}
294
+
295
+
296
+	/**
297
+	 * @param string $form_config
298
+	 */
299
+	public function setFormConfig($form_config)
300
+	{
301
+		$this->form_config = $form_config;
302
+	}
303
+
304
+
305
+	/**
306
+	 * @return string
307
+	 */
308
+	public function progressStepStyle()
309
+	{
310
+		return $this->progress_step_style;
311
+	}
312
+
313
+
314
+	/**
315
+	 * @param string $progress_step_style
316
+	 */
317
+	public function setProgressStepStyle($progress_step_style)
318
+	{
319
+		$this->progress_step_style = $progress_step_style;
320
+	}
321
+
322
+
323
+	/**
324
+	 * @return EE_Request
325
+	 */
326
+	public function request()
327
+	{
328
+		return $this->request;
329
+	}
330
+
331
+
332
+	/**
333
+	 * @return Collection|null
334
+	 * @throws InvalidInterfaceException
335
+	 */
336
+	protected function getProgressStepsCollection()
337
+	{
338
+		static $collection = null;
339
+		if (! $collection instanceof ProgressStepCollection) {
340
+			$collection = new ProgressStepCollection();
341
+		}
342
+		return $collection;
343
+	}
344
+
345
+
346
+	/**
347
+	 * @param Collection $progress_steps_collection
348
+	 * @return ProgressStepManager
349
+	 * @throws InvalidInterfaceException
350
+	 * @throws InvalidClassException
351
+	 * @throws InvalidDataTypeException
352
+	 * @throws InvalidEntityException
353
+	 * @throws InvalidFormHandlerException
354
+	 */
355
+	protected function generateProgressSteps(Collection $progress_steps_collection)
356
+	{
357
+		$current_step = $this->getCurrentStep();
358
+		/** @var SequentialStepForm $form_step */
359
+		foreach ($this->form_steps as $form_step) {
360
+			// is this step active ?
361
+			if (! $form_step->initialize()) {
362
+				continue;
363
+			}
364
+			$progress_steps_collection->add(
365
+				new ProgressStep(
366
+					$form_step->order(),
367
+					$form_step->slug(),
368
+					$form_step->slug(),
369
+					$form_step->formName()
370
+				),
371
+				$form_step->slug()
372
+			);
373
+		}
374
+		// set collection pointer back to current step
375
+		$this->form_steps->setCurrentUsingObject($current_step);
376
+		return new ProgressStepManager(
377
+			$this->progressStepStyle(),
378
+			$this->defaultFormStep(),
379
+			$this->formStepUrlKey(),
380
+			$progress_steps_collection
381
+		);
382
+	}
383
+
384
+
385
+	/**
386
+	 * @throws InvalidClassException
387
+	 * @throws InvalidDataTypeException
388
+	 * @throws InvalidEntityException
389
+	 * @throws InvalidIdentifierException
390
+	 * @throws InvalidInterfaceException
391
+	 * @throws InvalidArgumentException
392
+	 * @throws InvalidFormHandlerException
393
+	 */
394
+	public function buildForm()
395
+	{
396
+		$this->buildCurrentStepFormForDisplay();
397
+	}
398
+
399
+
400
+	/**
401
+	 * @param array $form_data
402
+	 * @throws InvalidArgumentException
403
+	 * @throws InvalidClassException
404
+	 * @throws InvalidDataTypeException
405
+	 * @throws InvalidEntityException
406
+	 * @throws InvalidFormHandlerException
407
+	 * @throws InvalidIdentifierException
408
+	 * @throws InvalidInterfaceException
409
+	 */
410
+	public function processForm($form_data = array())
411
+	{
412
+		$this->buildCurrentStepFormForProcessing();
413
+		$this->processCurrentStepForm($form_data);
414
+	}
415
+
416
+
417
+	/**
418
+	 * @throws InvalidClassException
419
+	 * @throws InvalidDataTypeException
420
+	 * @throws InvalidEntityException
421
+	 * @throws InvalidInterfaceException
422
+	 * @throws InvalidIdentifierException
423
+	 * @throws InvalidArgumentException
424
+	 * @throws InvalidFormHandlerException
425
+	 */
426
+	public function buildCurrentStepFormForDisplay()
427
+	{
428
+		$form_step = $this->buildCurrentStepForm();
429
+		// no displayable content ? then skip straight to processing
430
+		if (! $form_step->displayable()) {
431
+			$this->addFormActionArgs();
432
+			$form_step->setFormAction($this->formAction());
433
+			wp_safe_redirect($form_step->formAction());
434
+		}
435
+	}
436
+
437
+
438
+	/**
439
+	 * @throws InvalidClassException
440
+	 * @throws InvalidDataTypeException
441
+	 * @throws InvalidEntityException
442
+	 * @throws InvalidInterfaceException
443
+	 * @throws InvalidIdentifierException
444
+	 * @throws InvalidArgumentException
445
+	 * @throws InvalidFormHandlerException
446
+	 */
447
+	public function buildCurrentStepFormForProcessing()
448
+	{
449
+		$this->buildCurrentStepForm(false);
450
+	}
451
+
452
+
453
+	/**
454
+	 * @param bool $for_display
455
+	 * @return SequentialStepFormInterface
456
+	 * @throws InvalidArgumentException
457
+	 * @throws InvalidClassException
458
+	 * @throws InvalidDataTypeException
459
+	 * @throws InvalidEntityException
460
+	 * @throws InvalidFormHandlerException
461
+	 * @throws InvalidIdentifierException
462
+	 * @throws InvalidInterfaceException
463
+	 */
464
+	private function buildCurrentStepForm($for_display = true)
465
+	{
466
+		$this->form_steps = $this->getFormStepsCollection();
467
+		$this->setCurrentStepFromRequest();
468
+		$form_step = $this->getCurrentStep();
469
+		if ($form_step->submitBtnText() === esc_html__('Submit', 'event_espresso')) {
470
+			$form_step->setSubmitBtnText(esc_html__('Next Step', 'event_espresso'));
471
+		}
472
+		if ($for_display && $form_step->displayable()) {
473
+			$this->progress_step_manager = $this->generateProgressSteps(
474
+				$this->getProgressStepsCollection()
475
+			);
476
+			$this->progress_step_manager->setCurrentStep(
477
+				$form_step->slug()
478
+			);
479
+			// mark all previous progress steps as completed
480
+			$this->progress_step_manager->setPreviousStepsCompleted();
481
+			$this->progress_step_manager->enqueueStylesAndScripts();
482
+			$this->addFormActionArgs();
483
+			$form_step->setFormAction($this->formAction());
484
+		} else {
485
+			$form_step->setRedirectUrl($this->baseUrl());
486
+			$form_step->addRedirectArgs(
487
+				array($this->formStepUrlKey() => $this->form_steps->current()->slug())
488
+			);
489
+		}
490
+		$form_step->generate();
491
+		if ($for_display) {
492
+			$form_step->enqueueStylesAndScripts();
493
+		}
494
+		return $form_step;
495
+	}
496
+
497
+
498
+	/**
499
+	 * @param bool $return_as_string
500
+	 * @return string
501
+	 * @throws InvalidFormHandlerException
502
+	 */
503
+	public function displayProgressSteps($return_as_string = true)
504
+	{
505
+		$form_step = $this->getCurrentStep();
506
+		if (! $form_step->displayable()) {
507
+			return '';
508
+		}
509
+		$progress_steps = apply_filters(
510
+			'FHEE__EventEspresso_core_libraries_form_sections_form_handlers_SequentialStepFormManager__displayProgressSteps__before_steps',
511
+			''
512
+		);
513
+		$progress_steps .= $this->progress_step_manager->displaySteps();
514
+		$progress_steps .= apply_filters(
515
+			'FHEE__EventEspresso_core_libraries_form_sections_form_handlers_SequentialStepFormManager__displayProgressSteps__after_steps',
516
+			''
517
+		);
518
+		if ($return_as_string) {
519
+			return $progress_steps;
520
+		}
521
+		echo $progress_steps;
522
+		return '';
523
+	}
524
+
525
+
526
+	/**
527
+	 * @param bool $return_as_string
528
+	 * @return string
529
+	 * @throws InvalidFormHandlerException
530
+	 */
531
+	public function displayCurrentStepForm($return_as_string = true)
532
+	{
533
+		if ($return_as_string) {
534
+			return $this->getCurrentStep()->display();
535
+		}
536
+		echo $this->getCurrentStep()->display();
537
+		return '';
538
+	}
539
+
540
+
541
+	/**
542
+	 * @param array $form_data
543
+	 * @return void
544
+	 * @throws InvalidArgumentException
545
+	 * @throws InvalidDataTypeException
546
+	 * @throws InvalidFormHandlerException
547
+	 */
548
+	public function processCurrentStepForm($form_data = array())
549
+	{
550
+		// grab instance of current step because after calling next() below,
551
+		// any calls to getCurrentStep() will return the "next" step because we advanced
552
+		$current_step = $this->getCurrentStep();
553
+		try {
554
+			// form processing should either throw exceptions or return true
555
+			$current_step->process($form_data);
556
+		} catch (Exception $e) {
557
+			// something went wrong, convert the Exception to an EE_Error
558
+			EE_Error::add_error($e->getMessage(), __FILE__, __FUNCTION__, __LINE__);
559
+			// prevent redirect to next step or other if exception was thrown
560
+			if ($current_step->redirectTo() === SequentialStepForm::REDIRECT_TO_NEXT_STEP
561
+				|| $current_step->redirectTo() === SequentialStepForm::REDIRECT_TO_OTHER
562
+			) {
563
+				$current_step->setRedirectTo(SequentialStepForm::REDIRECT_TO_CURRENT_STEP);
564
+			}
565
+		}
566
+		// save notices to a transient so that when we redirect back
567
+		// to the display portion for this step
568
+		// those notices can be displayed
569
+		EE_Error::get_notices(false, true);
570
+		$this->redirectForm($current_step);
571
+	}
572
+
573
+
574
+	/**
575
+	 * handles where to go to next
576
+	 *
577
+	 * @param SequentialStepFormInterface $current_step
578
+	 * @throws InvalidArgumentException
579
+	 * @throws InvalidDataTypeException
580
+	 * @throws InvalidFormHandlerException
581
+	 */
582
+	public function redirectForm(SequentialStepFormInterface $current_step)
583
+	{
584
+		$redirect_step = $current_step;
585
+		switch ($current_step->redirectTo()) {
586
+			case SequentialStepForm::REDIRECT_TO_OTHER:
587
+				// going somewhere else, so just check out now
588
+				wp_safe_redirect($redirect_step->redirectUrl());
589
+				exit();
590
+				break;
591
+			case SequentialStepForm::REDIRECT_TO_PREV_STEP:
592
+				$redirect_step = $this->form_steps->previous();
593
+				break;
594
+			case SequentialStepForm::REDIRECT_TO_NEXT_STEP:
595
+				$this->form_steps->next();
596
+				if ($this->form_steps->valid()) {
597
+					$redirect_step = $this->form_steps->current();
598
+				}
599
+				break;
600
+			case SequentialStepForm::REDIRECT_TO_CURRENT_STEP:
601
+			default:
602
+				// $redirect_step is already set
603
+		}
604
+		$current_step->setRedirectUrl($this->baseUrl());
605
+		$current_step->addRedirectArgs(
606
+			// use the slug for whatever step we are redirecting too
607
+			array($this->formStepUrlKey() => $redirect_step->slug())
608
+		);
609
+		wp_safe_redirect($current_step->redirectUrl());
610
+		exit();
611
+	}
612 612
 }
Please login to merge, or discard this patch.
strategies/validation/EE_Credit_Card_Validation_Strategy.strategy.php 2 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -13,19 +13,19 @@
 block discarded – undo
13 13
 class EE_Credit_Card_Validation_Strategy extends EE_Text_Validation_Strategy
14 14
 {
15 15
 
16
-    /**
17
-     * @param null $validation_error_message
18
-     */
19
-    public function __construct($validation_error_message = null)
20
-    {
21
-        if (! $validation_error_message) {
22
-            $validation_error_message = __("Please enter a valid credit card number", "event_espresso");
23
-        }
24
-        parent::__construct(
25
-            $validation_error_message,
26
-            // @codingStandardsIgnoreStart
27
-            '~^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|2[2-7][0-9]{14}|6011[0-9]{12}|3(?:0[0-5]|[68][0-9])[0-9]{11}|3[47][0-9]{13})$~'
28
-            // @codingStandardsIgnoreEnd
29
-        );
30
-    }
16
+	/**
17
+	 * @param null $validation_error_message
18
+	 */
19
+	public function __construct($validation_error_message = null)
20
+	{
21
+		if (! $validation_error_message) {
22
+			$validation_error_message = __("Please enter a valid credit card number", "event_espresso");
23
+		}
24
+		parent::__construct(
25
+			$validation_error_message,
26
+			// @codingStandardsIgnoreStart
27
+			'~^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|2[2-7][0-9]{14}|6011[0-9]{12}|3(?:0[0-5]|[68][0-9])[0-9]{11}|3[47][0-9]{13})$~'
28
+			// @codingStandardsIgnoreEnd
29
+		);
30
+	}
31 31
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
      */
19 19
     public function __construct($validation_error_message = null)
20 20
     {
21
-        if (! $validation_error_message) {
21
+        if ( ! $validation_error_message) {
22 22
             $validation_error_message = __("Please enter a valid credit card number", "event_espresso");
23 23
         }
24 24
         parent::__construct(
Please login to merge, or discard this patch.
caffeinated/admin/extend/about/templates/ee4-overview.template.php 1 patch
Indentation   +106 added lines, -106 removed lines patch added patch discarded remove patch
@@ -1,56 +1,56 @@  discard block
 block discarded – undo
1 1
 <div class="headline-feature">
2 2
     <h2 class="about-headline-callout"><?php esc_html_e('Welcome to Event Espresso 4!', 'event_espresso'); ?></h2>
3 3
     <p><?php
4
-        echo sprintf(
5
-            esc_html__(
6
-                'Manage your events from your WordPress dashboard. Reduce your admin, reduce your costs, make your life easier! This is the Caffeinated/Regular version of Event Espresso, but we also have a hosted version called %sEvent Smart%s for customers that want to cut back on their hosting and security expenses.',
7
-                'event_espresso'
8
-            ),
9
-            '<a href="https://eventsmart.com//?utm_source=ee4_decaf&amp;utm_medium=link&amp;utm_campaign=espresso_about_tab&amp;utm_content=EE4+Caffeinated">',
10
-            '</a>'
11
-        ); ?></p>
4
+		echo sprintf(
5
+			esc_html__(
6
+				'Manage your events from your WordPress dashboard. Reduce your admin, reduce your costs, make your life easier! This is the Caffeinated/Regular version of Event Espresso, but we also have a hosted version called %sEvent Smart%s for customers that want to cut back on their hosting and security expenses.',
7
+				'event_espresso'
8
+			),
9
+			'<a href="https://eventsmart.com//?utm_source=ee4_decaf&amp;utm_medium=link&amp;utm_campaign=espresso_about_tab&amp;utm_content=EE4+Caffeinated">',
10
+			'</a>'
11
+		); ?></p>
12 12
     <h2><?php
13
-        esc_html_e(
14
-            'Powering 40,000+ event websites; $100 million in ticket sales per year!',
15
-            'event_espresso'
16
-        ); ?></h2>
13
+		esc_html_e(
14
+			'Powering 40,000+ event websites; $100 million in ticket sales per year!',
15
+			'event_espresso'
16
+		); ?></h2>
17 17
     <p><?php
18
-        echo sprintf(
19
-            esc_html__(
20
-                'Event Espresso is a %sWordPress event manager%s which makes it easy for you to register attendees for classes, workshops, events, trainings, conferences or concerts, all from your WordPress website. Event Espresso events are created from the WordPress admin area. You can create signup forms to collect information about your attendees, accept payments, and create reports. The lite version of the plugin provides everything that you need to manage your event using WordPress.',
21
-                'event_espresso'
22
-            ),
23
-            '<a href="http://eventespresso.com/?utm_source=wordpress_org&amp;utm_medium=link&amp;utm_campaign=espresso_about_tab&amp;utm_content=EE4+Decaf" rel="nofollow">',
24
-            '</a>'
25
-        ); ?></p>
18
+		echo sprintf(
19
+			esc_html__(
20
+				'Event Espresso is a %sWordPress event manager%s which makes it easy for you to register attendees for classes, workshops, events, trainings, conferences or concerts, all from your WordPress website. Event Espresso events are created from the WordPress admin area. You can create signup forms to collect information about your attendees, accept payments, and create reports. The lite version of the plugin provides everything that you need to manage your event using WordPress.',
21
+				'event_espresso'
22
+			),
23
+			'<a href="http://eventespresso.com/?utm_source=wordpress_org&amp;utm_medium=link&amp;utm_campaign=espresso_about_tab&amp;utm_content=EE4+Decaf" rel="nofollow">',
24
+			'</a>'
25
+		); ?></p>
26 26
 </div>
27 27
     <div class="feature-section has-3-columns is-fullwidth three-col">
28 28
         <div class="column col">
29 29
             <img src="<?php echo EE_GLOBAL_ASSETS_URL; ?>images/screenshots/publish_meta_box.jpg">
30 30
             <h3><?php esc_html_e('Optimized aesthetic', 'event_espresso'); ?></h3>
31 31
             <p><?php
32
-                esc_html_e(
33
-                    'The Event Espresso 4 dashboard has a fresh, uncluttered design that embraces clarity and simplicity.',
34
-                    'event_espresso'
35
-                ); ?></p>
32
+				esc_html_e(
33
+					'The Event Espresso 4 dashboard has a fresh, uncluttered design that embraces clarity and simplicity.',
34
+					'event_espresso'
35
+				); ?></p>
36 36
         </div>
37 37
         <div class="column col">
38 38
             <img src="<?php echo EE_GLOBAL_ASSETS_URL; ?>images/screenshots/registrations-overview.jpg">
39 39
             <h3><?php esc_html_e('Integrated management', 'event_espresso'); ?></h3>
40 40
             <p><?php
41
-                esc_html_e(
42
-                    'We’ve made it easier to know who your customers are and how they’ve done business with you over time.',
43
-                    'event_espresso'
44
-                ); ?></p>
41
+				esc_html_e(
42
+					'We’ve made it easier to know who your customers are and how they’ve done business with you over time.',
43
+					'event_espresso'
44
+				); ?></p>
45 45
         </div>
46 46
         <div class="column col last-feature">
47 47
             <img src="<?php echo EE_GLOBAL_ASSETS_URL; ?>images/screenshots/refined-bookkeeping.jpg">
48 48
             <h3><?php esc_html_e('Easy bookkeeping', 'event_espresso'); ?></h3>
49 49
             <p><?php
50
-                esc_html_e(
51
-                    'Registrations, payment, and transactions have been substantially improved in Event Espresso 4.',
52
-                    'event_espresso'
53
-                ); ?></p>
50
+				esc_html_e(
51
+					'Registrations, payment, and transactions have been substantially improved in Event Espresso 4.',
52
+					'event_espresso'
53
+				); ?></p>
54 54
         </div>
55 55
     </div>
56 56
 
@@ -62,16 +62,16 @@  discard block
 block discarded – undo
62 62
         <div class="column col">
63 63
             <h3><?php esc_html_e('Higher customer retention', 'event_espresso'); ?></h3>
64 64
             <p><?php
65
-                esc_html_e(
66
-                    'The Event Espresso 4 registration process is faster than ever. With quick ticket selections, single page check-out, and customizable notifications! Registration that can scale to your business needs.',
67
-                    'event_espresso'
68
-                ); ?></p>
65
+				esc_html_e(
66
+					'The Event Espresso 4 registration process is faster than ever. With quick ticket selections, single page check-out, and customizable notifications! Registration that can scale to your business needs.',
67
+					'event_espresso'
68
+				); ?></p>
69 69
             <h4><?php esc_html_e('Ticket selection boxes on any post page or post', 'event_espresso'); ?></h4>
70 70
             <p><?php
71
-                esc_html_e(
72
-                    'Customers can easily register for classes, events, or conferences, in just a few simple steps. No matter how you use it, Event Espresso 4 will adapt to a multitude of different ticketing and pricing scenarios.',
73
-                    'event_espresso'
74
-                ); ?></p>
71
+				esc_html_e(
72
+					'Customers can easily register for classes, events, or conferences, in just a few simple steps. No matter how you use it, Event Espresso 4 will adapt to a multitude of different ticketing and pricing scenarios.',
73
+					'event_espresso'
74
+				); ?></p>
75 75
         </div>
76 76
         <div class="column col last-feature about-colors-img">
77 77
             <img src="<?php echo EE_GLOBAL_ASSETS_URL; ?>images/screenshots/registrtation-page-large.jpg">
@@ -85,21 +85,21 @@  discard block
 block discarded – undo
85 85
         <div class="column col">
86 86
             <h3><?php esc_html_e('Refined event management', 'event_espresso'); ?></h3>
87 87
             <p><?php
88
-                esc_html_e(
89
-                    'The new event management screen lets you survey your events at a glance. Want more information? Click to view more. Quickly add/edit prices, dates, or information in any event.',
90
-                    'event_espresso'
91
-                ); ?></p>
88
+				esc_html_e(
89
+					'The new event management screen lets you survey your events at a glance. Want more information? Click to view more. Quickly add/edit prices, dates, or information in any event.',
90
+					'event_espresso'
91
+				); ?></p>
92 92
             <h4><?php esc_html_e('Smoother price types, taxes, and price modifiers', 'event_espresso'); ?></h4>
93 93
             <p><?php
94
-                esc_html_e(
95
-                    'Price Types allow you to create new prices that adjust the default ticket (base) price for your system-default ticket',
96
-                    'event_espresso'
97
-                ); ?>.</p>
94
+				esc_html_e(
95
+					'Price Types allow you to create new prices that adjust the default ticket (base) price for your system-default ticket',
96
+					'event_espresso'
97
+				); ?>.</p>
98 98
             <p><?php
99
-                esc_html_e(
100
-                    'Easily categorize a price modifier and indicate how that price gets applied to the running total when a transaction occurs.',
101
-                    'event_espresso'
102
-                ); ?></p>
99
+				esc_html_e(
100
+					'Easily categorize a price modifier and indicate how that price gets applied to the running total when a transaction occurs.',
101
+					'event_espresso'
102
+				); ?></p>
103 103
         </div>
104 104
         <div class="column col last-feature about-themes-img">
105 105
             <img src="<?php echo EE_GLOBAL_ASSETS_URL; ?>images/screenshots/event-management.jpg">
@@ -109,68 +109,68 @@  discard block
 block discarded – undo
109 109
 <hr>
110 110
 
111 111
     <h2 class="about-headline-callout"><?php
112
-        esc_html_e(
113
-            'People Like You Manage Event Registration with WordPress',
114
-            'event_espresso'
115
-        ); ?></h2>
112
+		esc_html_e(
113
+			'People Like You Manage Event Registration with WordPress',
114
+			'event_espresso'
115
+		); ?></h2>
116 116
     <div class="feature-section has-2-columns is-fullwidth two-col">
117 117
         <div class="column col">
118 118
             <p><?php
119
-                echo sprintf(
120
-                    esc_html__(
121
-                        'Trusted by thousands, Event Espresso is the best WordPress event online registration and ticketing manager plugin–and the best supported with full-time support. Turn your existing blog or website into a %sfully-featured event management website%s and a new way to make money. With Event Espresso you get it all; everything from custom registration forms and emails, seating limits, multiple price options, and discount codes to printable tickets.',
122
-                        'event_espresso'
123
-                    ),
124
-                    '<strong>',
125
-                    '</strong>'
126
-                ); ?></p>
127
-            <p><?php
128
-                esc_html_e(
129
-                    'Event Espresso works perfectly for classes, workshops, fundraisers, sporting, trainings, conferences, networking, religion, social, non-profit, and nearly any other type of event.',
130
-                    'event_espresso'
131
-                ); ?></p>
119
+				echo sprintf(
120
+					esc_html__(
121
+						'Trusted by thousands, Event Espresso is the best WordPress event online registration and ticketing manager plugin–and the best supported with full-time support. Turn your existing blog or website into a %sfully-featured event management website%s and a new way to make money. With Event Espresso you get it all; everything from custom registration forms and emails, seating limits, multiple price options, and discount codes to printable tickets.',
122
+						'event_espresso'
123
+					),
124
+					'<strong>',
125
+					'</strong>'
126
+				); ?></p>
127
+            <p><?php
128
+				esc_html_e(
129
+					'Event Espresso works perfectly for classes, workshops, fundraisers, sporting, trainings, conferences, networking, religion, social, non-profit, and nearly any other type of event.',
130
+					'event_espresso'
131
+				); ?></p>
132 132
         </div>
133 133
         <div class="column col">
134 134
             <p><?php
135
-                echo sprintf(
136
-                    esc_html__(
137
-                        'Our online event registration software can %smake your organization more profitable and efficient%s by helping you save money on registration and ticketing fees, reduce the countless hours of time you spend manually processing registrations, create a “green” and paperless event registration process and you will be open for business to accept registrations and payment 24/7.',
138
-                        'event_espresso'
139
-                    ),
140
-                    '<strong>',
141
-                    '</strong>'
142
-                ); ?></p>
143
-            <p><?php
144
-                esc_html_e(
145
-                    'If you\'re doing event registration and ticketing any other way, then you’re wasting time and money. We offer packages and prices to fit any budget, so get started with your online event registration and ticketing management system today.',
146
-                    'event_espresso'
147
-                ); ?></p>
135
+				echo sprintf(
136
+					esc_html__(
137
+						'Our online event registration software can %smake your organization more profitable and efficient%s by helping you save money on registration and ticketing fees, reduce the countless hours of time you spend manually processing registrations, create a “green” and paperless event registration process and you will be open for business to accept registrations and payment 24/7.',
138
+						'event_espresso'
139
+					),
140
+					'<strong>',
141
+					'</strong>'
142
+				); ?></p>
143
+            <p><?php
144
+				esc_html_e(
145
+					'If you\'re doing event registration and ticketing any other way, then you’re wasting time and money. We offer packages and prices to fit any budget, so get started with your online event registration and ticketing management system today.',
146
+					'event_espresso'
147
+				); ?></p>
148 148
         </div>
149 149
     </div>
150 150
 
151 151
     <div class="feature-section has-2-columns is-fullwidth two-col">
152 152
         <div class="column col">
153 153
             <h3><?php
154
-                esc_html_e(
155
-                    'Turn your blog into a complete event registration and management system',
156
-                    'event_espresso'
157
-                ); ?></h3>
158
-            <p><?php
159
-                esc_html_e(
160
-                    'Create a beautiful event page with ticket selection, venue details, and an integrated single page checkout system. With WordPress, Event Espresso, and Espresso Arabica 2014 (based on the "Twenty Fourteen" theme by WordPress), your events will certainly sell out faster than ever!',
161
-                    'event_espresso'
162
-                ); ?></p>
163
-            <p><?php
164
-                esc_html_e(
165
-                    'With a striking design that does not compromise the simplicity of WordPress and Event Espresso 4, Espresso Arabica 2014 will be the best event theme on the market.',
166
-                    'event_espresso'
167
-                ); ?></p>
168
-            <p><?php
169
-                echo sprintf(
170
-                    esc_html__('%sLearn more >>%s', 'event_espresso'),
171
-                    '<a href="http://eventespresso.com/wiki/setup-event-espresso-arabica-theme/">',
172
-                    '</a>'
173
-                ); ?></p>
154
+				esc_html_e(
155
+					'Turn your blog into a complete event registration and management system',
156
+					'event_espresso'
157
+				); ?></h3>
158
+            <p><?php
159
+				esc_html_e(
160
+					'Create a beautiful event page with ticket selection, venue details, and an integrated single page checkout system. With WordPress, Event Espresso, and Espresso Arabica 2014 (based on the "Twenty Fourteen" theme by WordPress), your events will certainly sell out faster than ever!',
161
+					'event_espresso'
162
+				); ?></p>
163
+            <p><?php
164
+				esc_html_e(
165
+					'With a striking design that does not compromise the simplicity of WordPress and Event Espresso 4, Espresso Arabica 2014 will be the best event theme on the market.',
166
+					'event_espresso'
167
+				); ?></p>
168
+            <p><?php
169
+				echo sprintf(
170
+					esc_html__('%sLearn more >>%s', 'event_espresso'),
171
+					'<a href="http://eventespresso.com/wiki/setup-event-espresso-arabica-theme/">',
172
+					'</a>'
173
+				); ?></p>
174 174
         </div>
175 175
         <div class="column col"><img src="<?php echo EE_GLOBAL_ASSETS_URL; ?>images/screenshots/single-event-page.jpg"></div>
176 176
     </div>
@@ -183,10 +183,10 @@  discard block
 block discarded – undo
183 183
     <div class="feature-section has-1-column is-fullwidth is-wide one-col">
184 184
         <div class="column col">
185 185
             <p><?php
186
-            esc_html_e(
187
-                'We’ve made it super easy to integrate Event Espresso with almost any properly coded WordPress theme, including many of the thousands of themes available on WordPress.org. The image below shows the same Event Espresso ticketing page across three diffrent WordPress themes.',
188
-                'event_espresso'
189
-            ); ?></p>
186
+			esc_html_e(
187
+				'We’ve made it super easy to integrate Event Espresso with almost any properly coded WordPress theme, including many of the thousands of themes available on WordPress.org. The image below shows the same Event Espresso ticketing page across three diffrent WordPress themes.',
188
+				'event_espresso'
189
+			); ?></p>
190 190
             <p><img class="about-overview-img" src="<?php echo EE_GLOBAL_ASSETS_URL; ?>images/screenshots/multiple-themes.jpg"/></p>
191 191
         </div>
192 192
     </div>
Please login to merge, or discard this patch.
admin_pages/about/templates/ee4-overview.template.php 1 patch
Indentation   +124 added lines, -124 removed lines patch added patch discarded remove patch
@@ -1,24 +1,24 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 // maintenance mode on?
3 3
 if (EE_Maintenance_Mode::instance()->level() == EE_Maintenance_Mode::level_2_complete_maintenance) {
4
-    ?>
4
+	?>
5 5
     <div class="ee-attention">
6 6
         <h2 class="ee-maintenance-mode-callout">
7 7
             <?php esc_html_e(
8
-                'Event Espresso is in full maintenance mode.',
9
-                'event_espresso'
10
-            ); ?></h2>
8
+				'Event Espresso is in full maintenance mode.',
9
+				'event_espresso'
10
+			); ?></h2>
11 11
         <p>
12 12
             <?php
13
-            printf(
14
-                esc_html__(
15
-                    'A previous version of Event Espresso has detected. But before anything else can happen, we need to know whether or not to migrate (copy over) your existing event data so that it can be utilized by EE4. For more instructions on what to do, please visit the %sEvent Espresso Maintenance%s page.',
16
-                    'event_espresso'
17
-                ),
18
-                '<a href="admin.php?page=espresso_maintenance_settings">',
19
-                '</a>'
20
-            );
21
-            ?>
13
+			printf(
14
+				esc_html__(
15
+					'A previous version of Event Espresso has detected. But before anything else can happen, we need to know whether or not to migrate (copy over) your existing event data so that it can be utilized by EE4. For more instructions on what to do, please visit the %sEvent Espresso Maintenance%s page.',
16
+					'event_espresso'
17
+				),
18
+				'<a href="admin.php?page=espresso_maintenance_settings">',
19
+				'</a>'
20
+			);
21
+			?>
22 22
         </p>
23 23
     </div>
24 24
     <?php
@@ -27,62 +27,62 @@  discard block
 block discarded – undo
27 27
 <div class="headline-feature">
28 28
     <h2 class="about-headline-callout">
29 29
         <?php esc_html_e(
30
-            'Welcome to the Decaf (free) Version of Event Espresso 4!',
31
-            'event_espresso'
32
-        ); ?></h2>
30
+			'Welcome to the Decaf (free) Version of Event Espresso 4!',
31
+			'event_espresso'
32
+		); ?></h2>
33 33
     <p><?php
34
-        echo sprintf(
35
-            esc_html__(
36
-                'Manage your events from your WordPress dashboard. Reduce your admin, reduce your costs, make your life easier! This is the Decaf version of Event Espresso, but we also have a premium version called %sEvent Espreso 4 Regular%s and a hosted version called %sEvent Smart%s (SaaS).',
37
-                'event_espresso'
38
-            ),
39
-            '<a href="?page=espresso_about&action=decafvpro">',
40
-            '</a>',
41
-            '<a href="https://eventsmart.com//?utm_source=ee4_decaf&amp;utm_medium=link&amp;utm_campaign=espresso_about_tab&amp;utm_content=EE4+Decaf">',
42
-            '</a>'
43
-        ); ?></p>
34
+		echo sprintf(
35
+			esc_html__(
36
+				'Manage your events from your WordPress dashboard. Reduce your admin, reduce your costs, make your life easier! This is the Decaf version of Event Espresso, but we also have a premium version called %sEvent Espreso 4 Regular%s and a hosted version called %sEvent Smart%s (SaaS).',
37
+				'event_espresso'
38
+			),
39
+			'<a href="?page=espresso_about&action=decafvpro">',
40
+			'</a>',
41
+			'<a href="https://eventsmart.com//?utm_source=ee4_decaf&amp;utm_medium=link&amp;utm_campaign=espresso_about_tab&amp;utm_content=EE4+Decaf">',
42
+			'</a>'
43
+		); ?></p>
44 44
     <h2>
45 45
         <?php esc_html_e(
46
-            'Powering 40,000+ event websites; $100 million in ticket sales per year!',
47
-            'event_espresso'
48
-        ); ?></h2>
46
+			'Powering 40,000+ event websites; $100 million in ticket sales per year!',
47
+			'event_espresso'
48
+		); ?></h2>
49 49
     <p><?php
50
-        echo sprintf(
51
-            esc_html__(
52
-                'Event Espresso is a %sWordPress event manager%s which makes it easy for you to register attendees for classes, workshops, events, trainings, conferences or concerts, all from your WordPress website. Event Espresso events are created from the WordPress admin area. You can create signup forms to collect information about your attendees, accept payments, and create reports. The Decaf (free) version of the plugin provides everything that you need to manage your event using WordPress.',
53
-                'event_espresso'
54
-            ),
55
-            '<a href="http://eventespresso.com/?utm_source=wordpress_org&amp;utm_medium=link&amp;utm_campaign=plugin_description_tab&amp;utm_content=EE4+Decaf">',
56
-            '</a>'
57
-        ); ?></p>
50
+		echo sprintf(
51
+			esc_html__(
52
+				'Event Espresso is a %sWordPress event manager%s which makes it easy for you to register attendees for classes, workshops, events, trainings, conferences or concerts, all from your WordPress website. Event Espresso events are created from the WordPress admin area. You can create signup forms to collect information about your attendees, accept payments, and create reports. The Decaf (free) version of the plugin provides everything that you need to manage your event using WordPress.',
53
+				'event_espresso'
54
+			),
55
+			'<a href="http://eventespresso.com/?utm_source=wordpress_org&amp;utm_medium=link&amp;utm_campaign=plugin_description_tab&amp;utm_content=EE4+Decaf">',
56
+			'</a>'
57
+		); ?></p>
58 58
 </div>
59 59
     <div class="feature-section has-3-columns is-fullwidth three-col">
60 60
         <div class="column col">
61 61
             <img src="<?php echo EE_GLOBAL_ASSETS_URL; ?>images/screenshots/publish_meta_box.jpg">
62 62
             <h3><?php esc_html_e('Optimized aesthetic', 'event_espresso'); ?></h3>
63 63
             <p><?php
64
-                esc_html_e(
65
-                    'The Event Espresso 4 dashboard has a fresh, uncluttered design that embraces clarity and simplicity.',
66
-                    'event_espresso'
67
-                ); ?></p>
64
+				esc_html_e(
65
+					'The Event Espresso 4 dashboard has a fresh, uncluttered design that embraces clarity and simplicity.',
66
+					'event_espresso'
67
+				); ?></p>
68 68
         </div>
69 69
         <div class="column col">
70 70
             <img src="<?php echo EE_GLOBAL_ASSETS_URL; ?>images/screenshots/registrations-overview.jpg">
71 71
             <h3><?php esc_html_e('Integrated management', 'event_espresso'); ?></h3>
72 72
             <p><?php
73
-                esc_html_e(
74
-                    'We’ve made it easier to know who your customers are and how they’ve done business with you over time.',
75
-                    'event_espresso'
76
-                ); ?></p>
73
+				esc_html_e(
74
+					'We’ve made it easier to know who your customers are and how they’ve done business with you over time.',
75
+					'event_espresso'
76
+				); ?></p>
77 77
         </div>
78 78
         <div class="column col last-feature">
79 79
             <img src="<?php echo EE_GLOBAL_ASSETS_URL; ?>images/screenshots/refined-bookkeeping.jpg">
80 80
             <h3><?php esc_html_e('Easy bookkeeping', 'event_espresso'); ?></h3>
81 81
             <p><?php
82
-                esc_html_e(
83
-                    'Registrations, payment, and transactions have been substantially improved in Event Espresso 4.',
84
-                    'event_espresso'
85
-                ); ?></p>
82
+				esc_html_e(
83
+					'Registrations, payment, and transactions have been substantially improved in Event Espresso 4.',
84
+					'event_espresso'
85
+				); ?></p>
86 86
         </div>
87 87
     </div>
88 88
 
@@ -92,16 +92,16 @@  discard block
 block discarded – undo
92 92
         <div class="column col">
93 93
             <h3><?php esc_html_e('Higher customer retention', 'event_espresso'); ?></h3>
94 94
             <p><?php
95
-                esc_html_e(
96
-                    'The Event Espresso 4 registration process is faster than ever. With quick ticket selections, single page check-out, and customizable notifications! Registration that can scale to your business needs.',
97
-                    'event_espresso'
98
-                ); ?></p>
95
+				esc_html_e(
96
+					'The Event Espresso 4 registration process is faster than ever. With quick ticket selections, single page check-out, and customizable notifications! Registration that can scale to your business needs.',
97
+					'event_espresso'
98
+				); ?></p>
99 99
             <h4><?php esc_html_e('Ticket selection boxes on any post page or post', 'event_espresso'); ?></h4>
100 100
             <p><?php
101
-                esc_html_e(
102
-                    'Customers can easily register for classes, events, or conferences, in just a few simple steps. No matter how you use it, Event Espresso 4 will adapt to a multitude of different ticketing and pricing scenarios.',
103
-                    'event_espresso'
104
-                ); ?></p>
101
+				esc_html_e(
102
+					'Customers can easily register for classes, events, or conferences, in just a few simple steps. No matter how you use it, Event Espresso 4 will adapt to a multitude of different ticketing and pricing scenarios.',
103
+					'event_espresso'
104
+				); ?></p>
105 105
         </div>
106 106
         <div class="column col last-feature about-colors-img">
107 107
             <img src="<?php echo EE_GLOBAL_ASSETS_URL; ?>images/screenshots/registrtation-page-large.jpg">
@@ -112,22 +112,22 @@  discard block
 block discarded – undo
112 112
         <div class="column col">
113 113
             <h3><?php esc_html_e('Refined event management', 'event_espresso'); ?></h3>
114 114
             <p><?php
115
-                esc_html_e(
116
-                    'The new event management screen lets you survey your events at a glance. Want more information? Click to view more. Quickly add/edit prices, dates, or information in any event.',
117
-                    'event_espresso'
118
-                ); ?></p>
115
+				esc_html_e(
116
+					'The new event management screen lets you survey your events at a glance. Want more information? Click to view more. Quickly add/edit prices, dates, or information in any event.',
117
+					'event_espresso'
118
+				); ?></p>
119 119
             <h4><?php
120
-                esc_html_e('Smoother price types, taxes, and price modifiers', 'event_espresso'); ?></h4>
120
+				esc_html_e('Smoother price types, taxes, and price modifiers', 'event_espresso'); ?></h4>
121 121
             <p><?php
122
-                esc_html_e(
123
-                    'Price Types allow you to create new prices that adjust the default ticket (base) price for your system-default ticket',
124
-                    'event_espresso'
125
-                ); ?>.</p>
122
+				esc_html_e(
123
+					'Price Types allow you to create new prices that adjust the default ticket (base) price for your system-default ticket',
124
+					'event_espresso'
125
+				); ?>.</p>
126 126
             <p><?php
127
-                esc_html_e(
128
-                    'Easily categorize a price modifier and indicate how that price gets applied to the running total when a transaction occurs.',
129
-                    'event_espresso'
130
-                ); ?></p>
127
+				esc_html_e(
128
+					'Easily categorize a price modifier and indicate how that price gets applied to the running total when a transaction occurs.',
129
+					'event_espresso'
130
+				); ?></p>
131 131
         </div>
132 132
         <div class="column col last-feature about-themes-img">
133 133
             <img src="<?php echo EE_GLOBAL_ASSETS_URL; ?>images/screenshots/event-management.jpg">
@@ -137,68 +137,68 @@  discard block
 block discarded – undo
137 137
 <hr>
138 138
 
139 139
     <h2 class="about-headline-callout"><?php
140
-        esc_html_e(
141
-            'People Like You Manage Event Registration with WordPress',
142
-            'event_espresso'
143
-        ); ?></h2>
140
+		esc_html_e(
141
+			'People Like You Manage Event Registration with WordPress',
142
+			'event_espresso'
143
+		); ?></h2>
144 144
     <div class="feature-section has-2-columns is-fullwidth two-col">
145 145
         <div class="column col">
146 146
             <p><?php
147
-                echo sprintf(
148
-                    esc_html__(
149
-                        'Trusted by thousands, Event Espresso is the best WordPress event online registration and ticketing manager plugin–and the best supported with full-time support. Turn your existing blog or website into a %sfully-featured event management website%s and a new way to make money. With Event Espresso you get it all; everything from custom registration forms and emails, seating limits, multiple price options, and discount codes to printable tickets.',
150
-                        'event_espresso'
151
-                    ),
152
-                    '<strong>',
153
-                    '</strong>'
154
-                ); ?></p>
155
-            <p><?php
156
-                esc_html_e(
157
-                    'Event Espresso works perfectly for classes, workshops, fundraisers, sporting, trainings, conferences, networking, religion, social, non-profit, and nearly any other type of event.',
158
-                    'event_espresso'
159
-                ); ?></p>
147
+				echo sprintf(
148
+					esc_html__(
149
+						'Trusted by thousands, Event Espresso is the best WordPress event online registration and ticketing manager plugin–and the best supported with full-time support. Turn your existing blog or website into a %sfully-featured event management website%s and a new way to make money. With Event Espresso you get it all; everything from custom registration forms and emails, seating limits, multiple price options, and discount codes to printable tickets.',
150
+						'event_espresso'
151
+					),
152
+					'<strong>',
153
+					'</strong>'
154
+				); ?></p>
155
+            <p><?php
156
+				esc_html_e(
157
+					'Event Espresso works perfectly for classes, workshops, fundraisers, sporting, trainings, conferences, networking, religion, social, non-profit, and nearly any other type of event.',
158
+					'event_espresso'
159
+				); ?></p>
160 160
         </div>
161 161
         <div class="column col">
162 162
             <p><?php
163
-                echo sprintf(
164
-                    esc_html__(
165
-                        'Our online event registration software can %smake your organization more profitable and efficient%s by helping you save money on registration and ticketing fees, reduce the countless hours of time you spend manually processing registrations, create a “green” and paperless event registration process and you will be open for business to accept registrations and payment 24/7.',
166
-                        'event_espresso'
167
-                    ),
168
-                    '<strong>',
169
-                    '</strong>'
170
-                ); ?></p>
171
-            <p><?php
172
-                esc_html_e(
173
-                    'If you\'re doing event registration and ticketing any other way, then you’re wasting time and money. We offer packages and prices to fit any budget, so get started with your online event registration and ticketing management system today.',
174
-                    'event_espresso'
175
-                ); ?></p>
163
+				echo sprintf(
164
+					esc_html__(
165
+						'Our online event registration software can %smake your organization more profitable and efficient%s by helping you save money on registration and ticketing fees, reduce the countless hours of time you spend manually processing registrations, create a “green” and paperless event registration process and you will be open for business to accept registrations and payment 24/7.',
166
+						'event_espresso'
167
+					),
168
+					'<strong>',
169
+					'</strong>'
170
+				); ?></p>
171
+            <p><?php
172
+				esc_html_e(
173
+					'If you\'re doing event registration and ticketing any other way, then you’re wasting time and money. We offer packages and prices to fit any budget, so get started with your online event registration and ticketing management system today.',
174
+					'event_espresso'
175
+				); ?></p>
176 176
         </div>
177 177
     </div>
178 178
 
179 179
     <div class="feature-section has-2-columns is-fullwidth two-col">
180 180
         <div class="column col">
181 181
             <h3><?php
182
-                esc_html_e(
183
-                    'Turn your blog into a complete event registration and management system',
184
-                    'event_espresso'
185
-                ); ?></h3>
186
-            <p><?php
187
-                esc_html_e(
188
-                    'Create a beautiful event page with ticket selection, venue details, and an integrated single page checkout system. With WordPress, Event Espresso, and Espresso Arabica 2014 (based on the "Twenty Fourteen" theme by WordPress), your events will certainly sell out faster than ever!',
189
-                    'event_espresso'
190
-                ); ?></p>
191
-            <p><?php
192
-                esc_html_e(
193
-                    'With a striking design that does not compromise the simplicity of WordPress and Event Espresso 4, Espresso Arabica 2014 will be the best event theme on the market.',
194
-                    'event_espresso'
195
-                ); ?></p>
196
-            <p><?php
197
-                echo sprintf(
198
-                    esc_html__('%sLearn more >>%s', 'event_espresso'),
199
-                    '<a href="http://eventespresso.com/wiki/setup-event-espresso-arabica-theme/">',
200
-                    '</a>'
201
-                ); ?></p>
182
+				esc_html_e(
183
+					'Turn your blog into a complete event registration and management system',
184
+					'event_espresso'
185
+				); ?></h3>
186
+            <p><?php
187
+				esc_html_e(
188
+					'Create a beautiful event page with ticket selection, venue details, and an integrated single page checkout system. With WordPress, Event Espresso, and Espresso Arabica 2014 (based on the "Twenty Fourteen" theme by WordPress), your events will certainly sell out faster than ever!',
189
+					'event_espresso'
190
+				); ?></p>
191
+            <p><?php
192
+				esc_html_e(
193
+					'With a striking design that does not compromise the simplicity of WordPress and Event Espresso 4, Espresso Arabica 2014 will be the best event theme on the market.',
194
+					'event_espresso'
195
+				); ?></p>
196
+            <p><?php
197
+				echo sprintf(
198
+					esc_html__('%sLearn more >>%s', 'event_espresso'),
199
+					'<a href="http://eventespresso.com/wiki/setup-event-espresso-arabica-theme/">',
200
+					'</a>'
201
+				); ?></p>
202 202
         </div>
203 203
         <div class="column col"><img src="<?php echo EE_GLOBAL_ASSETS_URL; ?>images/screenshots/single-event-page.jpg"></div>
204 204
     </div>
@@ -209,10 +209,10 @@  discard block
 block discarded – undo
209 209
     <div class="feature-section has-1-column is-fullwidth is-wide one-col">
210 210
         <div class="column col">
211 211
             <p><?php
212
-            esc_html_e(
213
-                'We’ve made it super easy to integrate Event Espresso with almost any properly coded WordPress theme, including many of the thousands of themes available on WordPress.org. The image below shows the same Event Espresso ticketing page across three diffrent WordPress themes.',
214
-                'event_espresso'
215
-            ); ?></p>
212
+			esc_html_e(
213
+				'We’ve made it super easy to integrate Event Espresso with almost any properly coded WordPress theme, including many of the thousands of themes available on WordPress.org. The image below shows the same Event Espresso ticketing page across three diffrent WordPress themes.',
214
+				'event_espresso'
215
+			); ?></p>
216 216
             <p><img class="about-overview-img" src="<?php echo EE_GLOBAL_ASSETS_URL; ?>images/screenshots/multiple-themes.jpg"/></p>
217 217
         </div>
218 218
     </div>
Please login to merge, or discard this patch.