Completed
Branch BUG-9019-ticket-selector-submi... (f025e0)
by
unknown
467:48 queued 450:54
created
caffeinated/core/libraries/shortcodes/EE_Question_List_Shortcodes.lib.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('NO direct script access allowed');
5 5
 
6 6
 /**
@@ -47,10 +47,10 @@  discard block
 block discarded – undo
47 47
 	}
48 48
 
49 49
 
50
-	protected function _parser( $shortcode ) {
50
+	protected function _parser($shortcode) {
51 51
 
52 52
 
53
-		switch ( $shortcode ) {
53
+		switch ($shortcode) {
54 54
 			case '[QUESTION_LIST]' :
55 55
 				return $this->_get_question_list();
56 56
 				break;
@@ -65,12 +65,12 @@  discard block
 block discarded – undo
65 65
 		$this->_set_shortcode_helper();
66 66
 
67 67
 		//for when [QUESTION_LIST] is used in the [attendee_list] field.
68
-		if ( $this->_data['data'] instanceof EE_Registration ) {
68
+		if ($this->_data['data'] instanceof EE_Registration) {
69 69
 			return $this->_get_question_answer_list_for_attendee();
70 70
 		}
71 71
 		//for when [QUESTION_LIST] is used in the main content field.
72
-		else if ( $this->_data['data'] instanceof EE_Messages_Addressee && $this->_data['data']->reg_obj instanceof EE_Registration ) {
73
-			return $this->_get_question_answer_list_for_attendee( $this->_data['data']->reg_obj );
72
+		else if ($this->_data['data'] instanceof EE_Messages_Addressee && $this->_data['data']->reg_obj instanceof EE_Registration) {
73
+			return $this->_get_question_answer_list_for_attendee($this->_data['data']->reg_obj);
74 74
 		} else {
75 75
 			return '';
76 76
 		}
@@ -82,18 +82,18 @@  discard block
 block discarded – undo
82 82
 	 * Note when we parse the "[question_list]" shortcode for attendees we're actually going to retrieve the list of answers for that attendee since that is what we really need (we can derive the questions from the answers);
83 83
 	 * @return string parsed template.
84 84
 	 */
85
-	private function _get_question_answer_list_for_attendee( $reg_obj = null ) {
85
+	private function _get_question_answer_list_for_attendee($reg_obj = null) {
86 86
 		$valid_shortcodes = array('question');
87 87
 		$reg_obj = $reg_obj instanceof EE_Registration ? $reg_obj : $this->_data['data'];
88
-		$template = is_array( $this->_data['template'] ) && isset($this->_data['template']['question_list']) ? $this->_data['template']['question_list'] : $this->_extra_data['template']['question_list'];
88
+		$template = is_array($this->_data['template']) && isset($this->_data['template']['question_list']) ? $this->_data['template']['question_list'] : $this->_extra_data['template']['question_list'];
89 89
 		$ans_result = '';
90 90
 		$answers = ! empty($this->_extra_data['data']->registrations[$reg_obj->ID()]['ans_objs']) ? $this->_extra_data['data']->registrations[$reg_obj->ID()]['ans_objs'] : array();
91
-		foreach ( $answers as $answer ) {
91
+		foreach ($answers as $answer) {
92 92
 			$question = $answer->question();
93
-			if ( $question instanceof EE_Question and $question->admin_only() ) {
93
+			if ($question instanceof EE_Question and $question->admin_only()) {
94 94
 						continue;
95 95
 					}
96
-			$ans_result .= $this->_shortcode_helper->parse_question_list_template( $template, $answer, $valid_shortcodes, $this->_extra_data);
96
+			$ans_result .= $this->_shortcode_helper->parse_question_list_template($template, $answer, $valid_shortcodes, $this->_extra_data);
97 97
 		}
98 98
 
99 99
 		return $ans_result;
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
10 10
 	exit('NO direct script access allowed');
11
+}
11 12
 
12 13
 /**
13 14
  *
Please login to merge, or discard this patch.
caffeinated/core/libraries/shortcodes/EE_Question_Shortcodes.lib.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('NO direct script access allowed');
5 5
 
6 6
 /**
@@ -57,39 +57,39 @@  discard block
 block discarded – undo
57 57
 	 * @param string $shortcode the shortcode to be parsed.
58 58
 	 * @return string parsed shortcode
59 59
 	 */
60
-	protected function _parser( $shortcode ) {
60
+	protected function _parser($shortcode) {
61 61
 
62
-		if ( ! $this->_data instanceof EE_Answer || ! isset( $this->_extra_data['data'] ) || ! $this->_extra_data['data'] instanceof EE_Messages_Addressee ) {
62
+		if ( ! $this->_data instanceof EE_Answer || ! isset($this->_extra_data['data']) || ! $this->_extra_data['data'] instanceof EE_Messages_Addressee) {
63 63
 			return '';
64 64
 		}
65 65
 
66
-		switch ( $shortcode ) {
66
+		switch ($shortcode) {
67 67
 
68 68
 			case '[QUESTION]' :
69
-				$question = isset( $this->_extra_data['data']->questions[$this->_data->ID()] ) ? $this->_extra_data['data']->questions[$this->_data->ID()] : $this->_data->question();
70
-				if ( ! $question instanceof EE_Question ) {
69
+				$question = isset($this->_extra_data['data']->questions[$this->_data->ID()]) ? $this->_extra_data['data']->questions[$this->_data->ID()] : $this->_data->question();
70
+				if ( ! $question instanceof EE_Question) {
71 71
 					return ''; //get out because we can't figure out what the question is.
72 72
 				}
73
-				return $question->get_pretty( 'QST_display_text', 'no_wpautop' );
73
+				return $question->get_pretty('QST_display_text', 'no_wpautop');
74 74
 				break;
75 75
 
76 76
 			case '[ANSWER]' :
77 77
 				//need to get the question to determine the type of question (some questions require translation of the answer).
78
-				$question = isset( $this->_extra_data['data']->questions[$this->_data->ID()] ) ? $this->_extra_data['data']->questions[$this->_data->ID()] : $this->_data->question();
79
-				if ( ! $question instanceof EE_Question ) {
78
+				$question = isset($this->_extra_data['data']->questions[$this->_data->ID()]) ? $this->_extra_data['data']->questions[$this->_data->ID()] : $this->_data->question();
79
+				if ( ! $question instanceof EE_Question) {
80 80
 					return ''; //get out cause we can't figure out what the question type is!
81 81
 				}
82 82
 
83 83
 				//what we show for the answer depends on the question type!
84
-				switch ( $question->get( 'QST_type' ) ) {
84
+				switch ($question->get('QST_type')) {
85 85
 
86 86
 					case 'STATE' :
87
-						$state = EEM_State::instance()->get_one_by_ID( $this->_data->get('ANS_value') );
87
+						$state = EEM_State::instance()->get_one_by_ID($this->_data->get('ANS_value'));
88 88
 						$answer = $state instanceof EE_State ? $state->name() : '';
89 89
 						break;
90 90
 
91 91
 					case 'COUNTRY' :
92
-						$country = EEM_Country::instance()->get_one_by_ID( $this->_data->get( 'ANS_value') );
92
+						$country = EEM_Country::instance()->get_one_by_ID($this->_data->get('ANS_value'));
93 93
 						$answer = $country instanceof EE_Country ? $country->name() : '';
94 94
 						break;
95 95
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
10 10
 	exit('NO direct script access allowed');
11
+}
11 12
 
12 13
 /**
13 14
  *
Please login to merge, or discard this patch.
caffeinated/modules/event_single_caff/EED_Event_Single_Caff.module.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	 * @return EED_Event_Single_Caff
30 30
 	 */
31 31
 	public static function instance() {
32
-		return parent::get_instance( __CLASS__ );
32
+		return parent::get_instance(__CLASS__);
33 33
 	}
34 34
 
35 35
 
@@ -50,9 +50,9 @@  discard block
 block discarded – undo
50 50
 	 *  @return 	void
51 51
 	 */
52 52
 	public static function set_hooks_admin() {
53
-		define( 'EVENT_SINGLE_CAFF_TEMPLATES_PATH', plugin_dir_path( __FILE__ ) . 'templates' . DS );
54
-		add_action( 'AHEE__template_settings__template__before_settings_form', array( 'EED_Event_Single_Caff', 'template_settings_form' ), 10 );
55
-		add_filter( 'FHEE__General_Settings_Admin_Page__update_template_settings__data', array( 'EED_Event_Single_Caff', 'update_template_settings' ), 10, 2 );
53
+		define('EVENT_SINGLE_CAFF_TEMPLATES_PATH', plugin_dir_path(__FILE__).'templates'.DS);
54
+		add_action('AHEE__template_settings__template__before_settings_form', array('EED_Event_Single_Caff', 'template_settings_form'), 10);
55
+		add_filter('FHEE__General_Settings_Admin_Page__update_template_settings__data', array('EED_Event_Single_Caff', 'update_template_settings'), 10, 2);
56 56
 	}
57 57
 
58 58
 
@@ -69,9 +69,9 @@  discard block
 block discarded – undo
69 69
 	 */
70 70
 	public static function template_settings_form() {
71 71
 		$EE = EE_Registry::instance();
72
-		$EE->CFG->template_settings->EED_Event_Single = isset( $EE->CFG->template_settings->EED_Event_Single ) ? $EE->CFG->template_settings->EED_Event_Single : new EE_Event_Single_Config();
73
-		$EE->CFG->template_settings->EED_Event_Single = apply_filters( 'FHEE__EED_Event_Single__template_settings_form__event_list_config', $EE->CFG->template_settings->EED_Event_Single );
74
-		EEH_Template::display_template( EVENT_SINGLE_CAFF_TEMPLATES_PATH . 'admin-event-single-settings.template.php', $EE->CFG->template_settings->EED_Event_Single );
72
+		$EE->CFG->template_settings->EED_Event_Single = isset($EE->CFG->template_settings->EED_Event_Single) ? $EE->CFG->template_settings->EED_Event_Single : new EE_Event_Single_Config();
73
+		$EE->CFG->template_settings->EED_Event_Single = apply_filters('FHEE__EED_Event_Single__template_settings_form__event_list_config', $EE->CFG->template_settings->EED_Event_Single);
74
+		EEH_Template::display_template(EVENT_SINGLE_CAFF_TEMPLATES_PATH.'admin-event-single-settings.template.php', $EE->CFG->template_settings->EED_Event_Single);
75 75
 	}
76 76
 
77 77
 
@@ -84,10 +84,10 @@  discard block
 block discarded – undo
84 84
 	 * @param $REQ
85 85
 	 * @return    void
86 86
 	 */
87
-	public static function update_template_settings( $CFG, $REQ ) {
87
+	public static function update_template_settings($CFG, $REQ) {
88 88
 		$CFG->EED_Event_Single = new EE_Event_Single_Config();
89
-		$CFG->EED_Event_Single->display_status_banner_single = !empty( $REQ['display_status_banner_single'] ) && $REQ['display_status_banner_single'] ? TRUE : FALSE;
90
-		$CFG->EED_Event_Single->display_venue = !empty( $REQ['display_venue'] ) && $REQ['display_venue'] ? TRUE : FALSE;
89
+		$CFG->EED_Event_Single->display_status_banner_single = ! empty($REQ['display_status_banner_single']) && $REQ['display_status_banner_single'] ? TRUE : FALSE;
90
+		$CFG->EED_Event_Single->display_venue = ! empty($REQ['display_venue']) && $REQ['display_venue'] ? TRUE : FALSE;
91 91
 		return $CFG;
92 92
 	}
93 93
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 	 * @param WP $WP
101 101
 	 * @return    void
102 102
 	 */
103
-	public function run( $WP ) {
103
+	public function run($WP) {
104 104
 	}
105 105
 
106 106
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
Please login to merge, or discard this patch.
event_single_caff/templates/admin-event-single-settings.template.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 					</label>
20 20
 				</th>
21 21
 				<td>
22
-					<?php echo EEH_Form_Fields::select_input( 'display_status_banner_single', $values, $display_status_banner_single, 'id="display_status_banner_single"' ); ?>
22
+					<?php echo EEH_Form_Fields::select_input('display_status_banner_single', $values, $display_status_banner_single, 'id="display_status_banner_single"'); ?>
23 23
 					<p class="description"><?php _e('Selecting "Yes" will inject an Event Status banner with the title whenever Events are displaying on the single event page.', 'event_espresso'); ?></p>
24 24
 				</td>
25 25
 			</tr>
@@ -27,11 +27,11 @@  discard block
 block discarded – undo
27 27
 			<tr>
28 28
 				<th>
29 29
 					<label for="display_venue">
30
-						<?php _e('Display Venue Details', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link('display_addresses_in_reg_form_info');?>
30
+						<?php _e('Display Venue Details', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link('display_addresses_in_reg_form_info'); ?>
31 31
 					</label>
32 32
 				</th>
33 33
 				<td>
34
-					<?php echo EEH_Form_Fields::select_input( 'display_venue', $values, $display_venue, 'id="display_venue"' ); ?>
34
+					<?php echo EEH_Form_Fields::select_input('display_venue', $values, $display_venue, 'id="display_venue"'); ?>
35 35
 					<p class="description"><?php _e('Do not use this if you are using the venue shortcodes in your event description.', 'event_espresso'); ?></p>
36 36
 				</td>
37 37
 			</tr>
Please login to merge, or discard this patch.
events_archive_caff/templates/admin-event-list-settings.template.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@  discard block
 block discarded – undo
1 1
 <?php
2
-$values = EEH_Form_Fields::prep_answer_options( array(
3
-	array( 'id' => 1, 'text' => __('Yes', 'event_espresso')),
4
-	array( 'id' => 0, 'text' => __('No', 'event_espresso'))
2
+$values = EEH_Form_Fields::prep_answer_options(array(
3
+	array('id' => 1, 'text' => __('Yes', 'event_espresso')),
4
+	array('id' => 0, 'text' => __('No', 'event_espresso'))
5 5
 ));
6 6
 
7
-$description = EEH_Form_Fields::prep_answer_options( array(
8
-	array( 'id' => 0, 'text' => __('none', 'event_espresso')),
9
-	array( 'id' => 1, 'text' => __('excerpt (short desc)', 'event_espresso')),
10
-	array( 'id' => 2, 'text' => __('full description', 'event_espresso'))
7
+$description = EEH_Form_Fields::prep_answer_options(array(
8
+	array('id' => 0, 'text' => __('none', 'event_espresso')),
9
+	array('id' => 1, 'text' => __('excerpt (short desc)', 'event_espresso')),
10
+	array('id' => 2, 'text' => __('full description', 'event_espresso'))
11 11
 ));
12 12
 
13
-add_filter( 'FHEE__EEH_Form_Fields__label_html', '__return_empty_string' );
13
+add_filter('FHEE__EEH_Form_Fields__label_html', '__return_empty_string');
14 14
 EE_Registry::instance()->load_helper('Event_View');
15 15
 EE_Registry::instance()->load_helper('Form_Fields');
16 16
 ?>
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 			<tr>
27 27
 				<th>
28 28
 					<label for="event_listings_url">
29
-						<?php _e('Event Listings URL', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('event_listings_url_info');?>
29
+						<?php _e('Event Listings URL', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('event_listings_url_info'); ?>
30 30
 					</label>
31 31
 				</th>
32 32
 				<td>
@@ -41,10 +41,10 @@  discard block
 block discarded – undo
41 41
 					</label>
42 42
 				</th>
43 43
 				<td>
44
-					<p><?php echo site_url() . '/ ' . EEH_Form_Fields::text( 'not_used', EE_Registry::instance()->CFG->core->event_cpt_slug, 'event_cpt_slug', 'event_cpt_slug', 'regular' ); ?></p>
44
+					<p><?php echo site_url().'/ '.EEH_Form_Fields::text('not_used', EE_Registry::instance()->CFG->core->event_cpt_slug, 'event_cpt_slug', 'event_cpt_slug', 'regular'); ?></p>
45 45
 					<p class="description"><?php _e('This allows you to configure what slug is used for the url of all event pages.', 'event_espresso'); ?></p>
46
-					<?php if ( has_filter( 'FHEE__EE_Register_CPTs__register_CPT__rewrite' ) ) : ?>
47
-						<p style="color:#D54E21;"><?php _e('Usage of the <code>FHEE__EE_Register_CPTs__register_CPT__rewrite</code> filter has been detected.  Please be aware that while this filter is being used, this setting has no affect.', 'event_espresso' );?></p>
46
+					<?php if (has_filter('FHEE__EE_Register_CPTs__register_CPT__rewrite')) : ?>
47
+						<p style="color:#D54E21;"><?php _e('Usage of the <code>FHEE__EE_Register_CPTs__register_CPT__rewrite</code> filter has been detected.  Please be aware that while this filter is being used, this setting has no affect.', 'event_espresso'); ?></p>
48 48
 					<?php endif; ?>
49 49
 				</td>
50 50
 			</tr>
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 					</label>
57 57
 				</th>
58 58
 				<td>
59
-				<?php echo EEH_Form_Fields::select( 'display_status_banner', $display_status_banner, $values, 'EED_Events_Archive_display_status_banner', 'EED_Events_Archive_display_status_banner' );?>
59
+				<?php echo EEH_Form_Fields::select('display_status_banner', $display_status_banner, $values, 'EED_Events_Archive_display_status_banner', 'EED_Events_Archive_display_status_banner'); ?>
60 60
 					<p class="description"><?php _e('Selecting "Yes" will inject an Event Status banner with the title whenever Events are displaying on the events archive page.', 'event_espresso'); ?></p>
61 61
 				</td>
62 62
 			</tr>
@@ -64,55 +64,55 @@  discard block
 block discarded – undo
64 64
 			<tr>
65 65
 				<th>
66 66
 					<label for="EED_Events_Archive_display_description">
67
-						<?php _e('Display Description', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_description_info');?>
67
+						<?php _e('Display Description', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_description_info'); ?>
68 68
 					</label>
69 69
 				</th>
70 70
 				<td>
71
-					<?php echo EEH_Form_Fields::select( 'description', $display_description, $description, 'EED_Events_Archive_display_description', 'EED_Events_Archive_display_description' );?>
71
+					<?php echo EEH_Form_Fields::select('description', $display_description, $description, 'EED_Events_Archive_display_description', 'EED_Events_Archive_display_description'); ?>
72 72
 				</td>
73 73
 			</tr>
74 74
 
75 75
 			<tr>
76 76
 				<th>
77 77
 					<label for="EED_Events_Archive_display_ticket_selector">
78
-						<?php _e('Display Ticket Selector', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_ticket_selector_info');?>
78
+						<?php _e('Display Ticket Selector', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_ticket_selector_info'); ?>
79 79
 					</label>
80 80
 				</th>
81 81
 				<td>
82
-					<?php echo EEH_Form_Fields::select( 'ticket_selector', $display_ticket_selector, $values, 'EED_Events_Archive_display_ticket_selector', 'EED_Events_Archive_display_ticket_selector' );?>
82
+					<?php echo EEH_Form_Fields::select('ticket_selector', $display_ticket_selector, $values, 'EED_Events_Archive_display_ticket_selector', 'EED_Events_Archive_display_ticket_selector'); ?>
83 83
 				</td>
84 84
 			</tr>
85 85
 
86 86
 			<tr>
87 87
 				<th>
88 88
 					<label for="EED_Events_Archive_display_datetimes">
89
-						<?php _e('Display Datetimes', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_datetimes_info');?>
89
+						<?php _e('Display Datetimes', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_datetimes_info'); ?>
90 90
 					</label>
91 91
 				</th>
92 92
 				<td>
93
-					<?php echo EEH_Form_Fields::select( 'venue_details', $display_datetimes, $values, 'EED_Events_Archive_display_datetimes', 'EED_Events_Archive_display_datetimes' );?>
93
+					<?php echo EEH_Form_Fields::select('venue_details', $display_datetimes, $values, 'EED_Events_Archive_display_datetimes', 'EED_Events_Archive_display_datetimes'); ?>
94 94
 				</td>
95 95
 			</tr>
96 96
 
97 97
 			<tr>
98 98
 				<th>
99 99
 					<label for="EED_Events_Archive_display_venue">
100
-						<?php _e('Display Venue Details', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_venue_details_info');?>
100
+						<?php _e('Display Venue Details', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_venue_details_info'); ?>
101 101
 					</label>
102 102
 				</th>
103 103
 				<td>
104
-					<?php echo EEH_Form_Fields::select( 'display_venue', $display_venue, $values, 'EED_Events_Archive_display_venue', 'EED_Events_Archive_display_venue' );?>
104
+					<?php echo EEH_Form_Fields::select('display_venue', $display_venue, $values, 'EED_Events_Archive_display_venue', 'EED_Events_Archive_display_venue'); ?>
105 105
 				</td>
106 106
 			</tr>
107 107
 
108 108
 			<tr>
109 109
 				<th>
110 110
 					<label for="EED_Events_Archive_display_expired_events">
111
-						<?php _e('Display Expired Events', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_expired_events_info');?>
111
+						<?php _e('Display Expired Events', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_expired_events_info'); ?>
112 112
 					</label>
113 113
 				</th>
114 114
 				<td>
115
-					<?php echo EEH_Form_Fields::select( 'expired_events', $display_expired_events, $values, 'EED_Events_Archive_display_expired_events', 'EED_Events_Archive_display_expired_events' );?>
115
+					<?php echo EEH_Form_Fields::select('expired_events', $display_expired_events, $values, 'EED_Events_Archive_display_expired_events', 'EED_Events_Archive_display_expired_events'); ?>
116 116
 				</td>
117 117
 			</tr>
118 118
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 				</label>
124 124
 			</th>
125 125
 			<td>
126
-				<?php echo EEH_Form_Fields::select( 'reset_event_list_settings', 0, $values, 'EED_Events_Archive_reset_event_list_settings', 'EED_Events_Archive_reset_event_list_settings' );?>
126
+				<?php echo EEH_Form_Fields::select('reset_event_list_settings', 0, $values, 'EED_Events_Archive_reset_event_list_settings', 'EED_Events_Archive_reset_event_list_settings'); ?>
127 127
 			</td>
128 128
 		</tr>
129 129
 
Please login to merge, or discard this patch.
caffeinated/modules/mijireh_slurper/EED_Mijireh_Slurper.module.php 3 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -110,10 +110,10 @@  discard block
 block discarded – undo
110 110
 	}
111 111
 
112 112
 	/**
113
-	* Return true if the current page is the mijireh checkout page, otherwise return false.
114
-	*
115
-	* @return boolean
116
-	*/
113
+	 * Return true if the current page is the mijireh checkout page, otherwise return false.
114
+	 *
115
+	 * @return boolean
116
+	 */
117 117
 	public static function is_slurp_page() {
118 118
 		global $post;
119 119
 		$isSlurp = false;
@@ -130,9 +130,9 @@  discard block
 block discarded – undo
130 130
 	}
131 131
 
132 132
 	/**
133
-	* adds the callback to adding the slurp page metabox, which shoudl only appear on a page with the {{mj-checkout-form}} "shortcode"
134
-	* @return void
135
-	*/
133
+	 * adds the callback to adding the slurp page metabox, which shoudl only appear on a page with the {{mj-checkout-form}} "shortcode"
134
+	 * @return void
135
+	 */
136 136
 	public static function add_slurp_page_metabox() {
137 137
 		if(self::is_slurp_page() && EEM_Payment_Method::instance()->get_one_active( EEM_Payment_Method::scope_cart, array( array( 'PMD_type' => 'Mijireh' ) ) ) ){
138 138
 			add_meta_box(
@@ -147,10 +147,10 @@  discard block
 block discarded – undo
147 147
 	}
148 148
 
149 149
 	/**
150
-	* outputs HTML for displaying the slurping metabox
151
-	* @param WP_Post $post
152
-	* @return void echoes out html
153
-	*/
150
+	 * outputs HTML for displaying the slurping metabox
151
+	 * @param WP_Post $post
152
+	 * @return void echoes out html
153
+	 */
154 154
 	public static function slurp_page_metabox($post) {
155 155
 	   global $wp;
156 156
 	   $mijireh_payment_method = EEM_Payment_Method::instance()->get_one_of_type( 'Mijireh' );
@@ -168,10 +168,10 @@  discard block
 block discarded – undo
168 168
 	}
169 169
 
170 170
 	/**
171
-	* decides whether to slurp the post indicated by the $post global or not, based entirely
172
-	* on a special arg being in the querystring
173
-	* @return void
174
-	*/
171
+	 * decides whether to slurp the post indicated by the $post global or not, based entirely
172
+	 * on a special arg being in the querystring
173
+	 * @return void
174
+	 */
175 175
 	public static function slurp_or_not(){
176 176
 	  //check if this page has the right mijire 'shortcode' and if they've specified to slurp it
177 177
 	  if(isset($_GET['mijireh_slurp_now']) && $_GET['mijireh_slurp_now'] == 'true' && EED_Mijireh_Slurper::is_slurp_page()){
@@ -180,9 +180,9 @@  discard block
 block discarded – undo
180 180
 	}
181 181
 
182 182
 	/**
183
-	* Sends a request to mijireh to slurp the current $post, and then redirects the user back to the current page without the
184
-	* special querystring arg indicating to slurp. Also, should temporarily make the current post published, then revert it to its previous status
185
-	*/
183
+	 * Sends a request to mijireh to slurp the current $post, and then redirects the user back to the current page without the
184
+	 * special querystring arg indicating to slurp. Also, should temporarily make the current post published, then revert it to its previous status
185
+	 */
186 186
 	public static function slurp_now(){
187 187
 		global $post;
188 188
 		if ( $post->post_status != 'publish' ) {
Please login to merge, or discard this patch.
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -49,19 +49,19 @@  discard block
 block discarded – undo
49 49
 	 *  @return 	void
50 50
 	 */
51 51
 	public static function set_hooks_admin() {
52
-		define('EED_MIJIREH_SLURPER_PATH',EE_CAFF_PATH.'modules'.DS.'mijireh_slurper'.DS);
53
-		add_action('load-post.php',array('EED_Mijireh_Slurper','set_edit_post_page_hooks'));
54
-		add_action('load-admin.php',array('EED_Mijireh_Slurper','check_for_edit_slurp_page'));
55
-		add_action('AHEE__EE_Mijireh__settings_end',array('EED_Mijireh_Slurper','add_slurp_link_to_gateway'));
52
+		define('EED_MIJIREH_SLURPER_PATH', EE_CAFF_PATH.'modules'.DS.'mijireh_slurper'.DS);
53
+		add_action('load-post.php', array('EED_Mijireh_Slurper', 'set_edit_post_page_hooks'));
54
+		add_action('load-admin.php', array('EED_Mijireh_Slurper', 'check_for_edit_slurp_page'));
55
+		add_action('AHEE__EE_Mijireh__settings_end', array('EED_Mijireh_Slurper', 'add_slurp_link_to_gateway'));
56 56
 	}
57 57
 	/**
58 58
 	 * Merely used to avoid even bothering to add these hooks on pages besides admin's post.php
59 59
 	 */
60
-	public static function set_edit_post_page_hooks(){
61
-		add_action('add_meta_boxes',array('EED_Mijireh_Slurper','add_slurp_page_metabox'));
62
-		add_action('posts_selection',array('EED_Mijireh_Slurper','slurp_or_not'));
63
-		if(get_transient(EED_Mijireh_Slurper::slurp_started_transient_name)){
64
-			add_action( 'admin_notices', array('EED_Mijireh_Slurper', 'slurping_in_progress_notice') );
60
+	public static function set_edit_post_page_hooks() {
61
+		add_action('add_meta_boxes', array('EED_Mijireh_Slurper', 'add_slurp_page_metabox'));
62
+		add_action('posts_selection', array('EED_Mijireh_Slurper', 'slurp_or_not'));
63
+		if (get_transient(EED_Mijireh_Slurper::slurp_started_transient_name)) {
64
+			add_action('admin_notices', array('EED_Mijireh_Slurper', 'slurping_in_progress_notice'));
65 65
 			delete_transient(EED_Mijireh_Slurper::slurp_started_transient_name);
66 66
 		}
67 67
 	}
@@ -70,11 +70,11 @@  discard block
 block discarded – undo
70 70
 	 * Adds the slurping content to the gateway's settings page, because I thought this was best suited to remain in the module's code (because
71 71
 	 * the gateway works fine independent of this module)
72 72
 	 */
73
-	public static function add_slurp_link_to_gateway($existing_content){
74
-		echo EEH_Template::display_template( EED_MIJIREH_SLURPER_PATH.'templates/additional_content_on_gateway.template.php', array(),true ) . $existing_content;
73
+	public static function add_slurp_link_to_gateway($existing_content) {
74
+		echo EEH_Template::display_template(EED_MIJIREH_SLURPER_PATH.'templates/additional_content_on_gateway.template.php', array(), true).$existing_content;
75 75
 	}
76
-	public static function slurping_in_progress_notice(){
77
-		EEH_Template::display_template( EED_MIJIREH_SLURPER_PATH.'templates/slurping_in_progress_notice.template.php', array() );
76
+	public static function slurping_in_progress_notice() {
77
+		EEH_Template::display_template(EED_MIJIREH_SLURPER_PATH.'templates/slurping_in_progress_notice.template.php', array());
78 78
 	}
79 79
 
80 80
 	/**
@@ -83,10 +83,10 @@  discard block
 block discarded – undo
83 83
 	 * need to first make it). If the special arg is present, redirects the user to the slurp page's edit page
84 84
 	 * @return void
85 85
 	 */
86
-	public static function check_for_edit_slurp_page(){
87
-		if(isset($_GET['mijireh_edit_slurp_page']) && $_GET['mijireh_edit_slurp_page'] == 'true'){
86
+	public static function check_for_edit_slurp_page() {
87
+		if (isset($_GET['mijireh_edit_slurp_page']) && $_GET['mijireh_edit_slurp_page'] == 'true') {
88 88
 			//check if we already have a slurping page
89
-			if( ! $slurp_page_id = self::find_slurp_page() ){
89
+			if ( ! $slurp_page_id = self::find_slurp_page()) {
90 90
 				//if no slurp page yet, make one
91 91
 				$slurp_page_id = wp_insert_post(
92 92
 					array(
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 					)
97 97
 				);
98 98
 			}
99
-			wp_redirect(add_query_arg(array('post'=>$slurp_page_id,'action'=>'edit'),admin_url('post.php')));
99
+			wp_redirect(add_query_arg(array('post'=>$slurp_page_id, 'action'=>'edit'), admin_url('post.php')));
100 100
 		}
101 101
 	}
102 102
 
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 	 * Gets the post id which has the {{mj-checkout-form}} "shortcode" in it, otherwise null
105 105
 	 * @return int
106 106
 	 */
107
-	public static function find_slurp_page(){
107
+	public static function find_slurp_page() {
108 108
 		global $wpdb;
109 109
 		return $wpdb->get_var("SELECT id FROM {$wpdb->posts} WHERE post_content LIKE '%".EED_Mijireh_Slurper::mijireh_slurper_shortcode."%'");
110 110
 	}
@@ -117,9 +117,9 @@  discard block
 block discarded – undo
117 117
 	public static function is_slurp_page() {
118 118
 		global $post;
119 119
 		$isSlurp = false;
120
-		if(isset($post) && is_object($post)) {
120
+		if (isset($post) && is_object($post)) {
121 121
 			$content = $post->post_content;
122
-			if( strpos($content, EED_Mijireh_Slurper::mijireh_slurper_shortcode ) !== false ) {
122
+			if (strpos($content, EED_Mijireh_Slurper::mijireh_slurper_shortcode) !== false) {
123 123
 				$isSlurp = true;
124 124
 			}
125 125
 		}
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 	* @return void
135 135
 	*/
136 136
 	public static function add_slurp_page_metabox() {
137
-		if(self::is_slurp_page() && EEM_Payment_Method::instance()->get_one_active( EEM_Payment_Method::scope_cart, array( array( 'PMD_type' => 'Mijireh' ) ) ) ){
137
+		if (self::is_slurp_page() && EEM_Payment_Method::instance()->get_one_active(EEM_Payment_Method::scope_cart, array(array('PMD_type' => 'Mijireh')))) {
138 138
 			add_meta_box(
139 139
 				'slurp_meta_box', // $id
140 140
 				'Mijireh Page Slurp', // $title
@@ -153,15 +153,15 @@  discard block
 block discarded – undo
153 153
 	*/
154 154
 	public static function slurp_page_metabox($post) {
155 155
 	   global $wp;
156
-	   $mijireh_payment_method = EEM_Payment_Method::instance()->get_one_of_type( 'Mijireh' );
157
-	   if( $mijireh_payment_method ){
158
-		$access_key = $mijireh_payment_method->get_extra_meta( 'access_key', TRUE );
156
+	   $mijireh_payment_method = EEM_Payment_Method::instance()->get_one_of_type('Mijireh');
157
+	   if ($mijireh_payment_method) {
158
+		$access_key = $mijireh_payment_method->get_extra_meta('access_key', TRUE);
159 159
 		EEH_Template::display_template(
160 160
 			EED_MIJIREH_SLURPER_PATH.'templates/mijireh_slurp_page_metabox.template.php',
161 161
 			 array(
162 162
 				 'mijireh_image_url'=> $mijireh_payment_method->button_url(),
163 163
 				 'access_key'=>$access_key,
164
-				 'slurp_action_link'=> esc_url_raw( add_query_arg('mijireh_slurp_now','true', add_query_arg( $wp->query_string, '',  '?'.$_SERVER['QUERY_STRING'] )))
164
+				 'slurp_action_link'=> esc_url_raw(add_query_arg('mijireh_slurp_now', 'true', add_query_arg($wp->query_string, '', '?'.$_SERVER['QUERY_STRING'])))
165 165
 			 )
166 166
 		 );
167 167
 	   }
@@ -172,9 +172,9 @@  discard block
 block discarded – undo
172 172
 	* on a special arg being in the querystring
173 173
 	* @return void
174 174
 	*/
175
-	public static function slurp_or_not(){
175
+	public static function slurp_or_not() {
176 176
 	  //check if this page has the right mijire 'shortcode' and if they've specified to slurp it
177
-	  if(isset($_GET['mijireh_slurp_now']) && $_GET['mijireh_slurp_now'] == 'true' && EED_Mijireh_Slurper::is_slurp_page()){
177
+	  if (isset($_GET['mijireh_slurp_now']) && $_GET['mijireh_slurp_now'] == 'true' && EED_Mijireh_Slurper::is_slurp_page()) {
178 178
 		  EED_Mijireh_Slurper::slurp_now();
179 179
 	  }
180 180
 	}
@@ -183,22 +183,22 @@  discard block
 block discarded – undo
183 183
 	* Sends a request to mijireh to slurp the current $post, and then redirects the user back to the current page without the
184 184
 	* special querystring arg indicating to slurp. Also, should temporarily make the current post published, then revert it to its previous status
185 185
 	*/
186
-	public static function slurp_now(){
186
+	public static function slurp_now() {
187 187
 		global $post;
188
-		if ( $post->post_status != 'publish' ) {
188
+		if ($post->post_status != 'publish') {
189 189
 			//make sure the post is published at least while slurping
190 190
 			$post->post_status = 'publish';
191 191
 			wp_update_post($post);
192 192
 		}
193
-		$mijireh_gateway = EEM_Payment_Method::instance()->get_one_of_type( 'Mijireh' );
194
-		$access_key = $mijireh_gateway->get_extra_meta( 'access_key', TRUE );
193
+		$mijireh_gateway = EEM_Payment_Method::instance()->get_one_of_type('Mijireh');
194
+		$access_key = $mijireh_gateway->get_extra_meta('access_key', TRUE);
195 195
 		// 'slurp_url'=>get_permalink($post),
196 196
 		// 'page_id'=>$post->ID,
197 197
 		// 'return_url'=>$return_url
198 198
 		$url = 'https://secure.mijireh.com/api/1/slurps';
199 199
 		$args = array(
200 200
 		  	'headers' => array(
201
-				'Authorization' => 'Basic ' . base64_encode( $access_key . ':' ),
201
+				'Authorization' => 'Basic '.base64_encode($access_key.':'),
202 202
 				'Accept'=>'application/json'
203 203
 			),
204 204
 			'body'=>json_encode(
@@ -209,12 +209,12 @@  discard block
 block discarded – undo
209 209
 				)
210 210
 			)
211 211
 		);
212
-		$response = wp_remote_post($url,$args);
212
+		$response = wp_remote_post($url, $args);
213 213
 		//now redirect the user back to the same page
214 214
 		$redirect_args = $_GET;
215 215
 		unset($redirect_args['mijireh_slurp_now']);
216
-		$url = add_query_arg($redirect_args,admin_url('post.php'));
217
-		set_transient(EED_Mijireh_Slurper::slurp_started_transient_name,true);
216
+		$url = add_query_arg($redirect_args, admin_url('post.php'));
217
+		set_transient(EED_Mijireh_Slurper::slurp_started_transient_name, true);
218 218
 		// echo "redirect to $url";
219 219
 		wp_redirect($url);
220 220
 	}
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 	 *  @access 	public
226 226
 	 *  @return 	void
227 227
 	 */
228
-	public function run( $WP ) {
228
+	public function run($WP) {
229 229
 	}
230 230
 
231 231
 }
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
@@ -122,8 +124,7 @@  discard block
 block discarded – undo
122 124
 			if( strpos($content, EED_Mijireh_Slurper::mijireh_slurper_shortcode ) !== false ) {
123 125
 				$isSlurp = true;
124 126
 			}
125
-		}
126
-		else {
127
+		} else {
127 128
 			// echo '[' . basename(__FILE__) . ' - line ' . __LINE__ . "] Check Slurp Page Failed: " . print_r($post, 1);
128 129
 		}
129 130
 		return $isSlurp;
Please login to merge, or discard this patch.
mijireh_slurper/templates/additional_content_on_gateway.template.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <tr>
2
-	<th><?php _e("Mijireh Checkout Page Design", 'event_espresso');?><?php echo EEH_Template::get_help_tab_link( 'ee_mijireh_help_tab' ); ?></th>
2
+	<th><?php _e("Mijireh Checkout Page Design", 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link('ee_mijireh_help_tab'); ?></th>
3 3
 	<td>
4
-		<a href="?mijireh_edit_slurp_page=true"><?php _e("Edit Slurp Page", 'event_espresso');?></a>
4
+		<a href="?mijireh_edit_slurp_page=true"><?php _e("Edit Slurp Page", 'event_espresso'); ?></a>
5 5
 	</td>
6 6
 </tr>
7 7
\ No newline at end of file
Please login to merge, or discard this patch.
modules/mijireh_slurper/templates/mijireh_slurp_page_metabox.template.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
    <div id='mijireh_notice' class='mijireh-info alert-message info' data-alert='alert'>
2
-      <div class='mijireh-logo'><img src='<?php echo $mijireh_image_url;?>' alt='<?php printf( esc_attr__( '%s Checkout Logo', 'event_espresso' ), 'Mijereh' ); ?>'></div>
2
+      <div class='mijireh-logo'><img src='<?php echo $mijireh_image_url; ?>' alt='<?php printf(esc_attr__('%s Checkout Logo', 'event_espresso'), 'Mijereh'); ?>'></div>
3 3
       <div class='mijireh-blurb'>
4
-		  <h2><?php _e("Slurp Into Mijireh", 'event_espresso');?></h2>
5
-		  <p><?php printf(__("Design the page how you want, and be sure to include the special text {{mj-checkout-form}} to indicate where to place Mijireh's Checkout Form. You may want to read %s Mijireh's instructions on slurping%s.", 'event_espresso'),"<a href='http://www.mijireh.com/docs/what-is-page-slurp/'>","</a>");?>
4
+		  <h2><?php _e("Slurp Into Mijireh", 'event_espresso'); ?></h2>
5
+		  <p><?php printf(__("Design the page how you want, and be sure to include the special text {{mj-checkout-form}} to indicate where to place Mijireh's Checkout Form. You may want to read %s Mijireh's instructions on slurping%s.", 'event_espresso'), "<a href='http://www.mijireh.com/docs/what-is-page-slurp/'>", "</a>"); ?>
6 6
 
7 7
         <p class='aligncenter'><a href='<?php echo $slurp_action_link?>' id='page_slurp' class='button-primary'>Slurp This Page!</a></p>
8 8
         <p class="aligncenter"><a class="nobold" href="https://secure.mijireh.com/checkout/<?php echo $access_key?>" id="view_slurp" target="_new">Preview Checkout Page</a></p>
Please login to merge, or discard this patch.
modules/mijireh_slurper/templates/slurping_in_progress_notice.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,3 +1,3 @@
 block discarded – undo
1 1
 <div class="updated">
2
-        <p><?php _e( "Mijireh is currently slurping your content. This will usually take a few minutes. Please login to Mijireh to see the slurp's progress", 'event_espresso' ); ?></p>
2
+        <p><?php _e("Mijireh is currently slurping your content. This will usually take a few minutes. Please login to Mijireh to see the slurp's progress", 'event_espresso'); ?></p>
3 3
     </div>
4 4
\ No newline at end of file
Please login to merge, or discard this patch.