Completed
Branch FET-9222-rest-api-writes (64ff44)
by
unknown
95:49 queued 82:41
created
Mijireh/help_tabs/payment_methods_overview_mijireh.help_tab.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1
-<p><strong><?php _e( 'Mijireh', 'event_espresso' ); ?></strong></p>
1
+<p><strong><?php _e('Mijireh', 'event_espresso'); ?></strong></p>
2 2
 <p>
3
-	<?php _e( 'Adjust the settings for the Mijireh payment gateway.', 'event_espresso' ); ?>
3
+	<?php _e('Adjust the settings for the Mijireh payment gateway.', 'event_espresso'); ?>
4 4
 </p>
5 5
 <p>
6 6
 	<?php
7 7
 	printf(
8
-		__( 'Mijireh is basically a middle-man between Event Espresso and over 90 payment gateways. Most of the configuration occurs on %1$sMijireh\' website%2$s, where you configure your Mijireh store with the %3$spayment gateway of your choice%4$s.', 'event_espresso' ),
8
+		__('Mijireh is basically a middle-man between Event Espresso and over 90 payment gateways. Most of the configuration occurs on %1$sMijireh\' website%2$s, where you configure your Mijireh store with the %3$spayment gateway of your choice%4$s.', 'event_espresso'),
9 9
 		'<a href="http://www.mijireh.com/" target="_blank">',
10 10
 		'</a>',
11 11
 		'<a href="http://www.mijireh.com/docs/payment-gateways/" target="_blank">',
@@ -14,26 +14,26 @@  discard block
 block discarded – undo
14 14
 	?>
15 15
 </p>
16 16
 <p>
17
-	<?php _e( 'For information on what currencies you can use with Mijireh, please consult the payment gateway Mijireh is setup to use.', 'event_espresso' ) ?>
17
+	<?php _e('For information on what currencies you can use with Mijireh, please consult the payment gateway Mijireh is setup to use.', 'event_espresso') ?>
18 18
 </p>
19 19
 <ul>
20 20
 	<li>
21
-		<strong><?php _e( 'Mijireh Access Key', 'event_espresso' ); ?></strong><br/>
21
+		<strong><?php _e('Mijireh Access Key', 'event_espresso'); ?></strong><br/>
22 22
 		<?php
23 23
 		printf(
24
-			__( 'Enter your Access Key for Mijireh. Your Access Key can be found in your %1$sMijireh account dashboard%2$s.', 'event_espresso' ),
24
+			__('Enter your Access Key for Mijireh. Your Access Key can be found in your %1$sMijireh account dashboard%2$s.', 'event_espresso'),
25 25
 			'<a href="https://secure.mijireh.com/login" target="_blank">',
26 26
 			'</a>'
27 27
 		);
28 28
 		?>
29 29
 	</li>
30 30
 	<li>
31
-		<strong><?php _e( 'Button Image URL', 'event_espresso' ); ?></strong><br/>
32
-		<?php _e( 'Change the image that is used for this payment gateway.', 'event_espresso' ); ?>
31
+		<strong><?php _e('Button Image URL', 'event_espresso'); ?></strong><br/>
32
+		<?php _e('Change the image that is used for this payment gateway.', 'event_espresso'); ?>
33 33
 	</li>
34 34
 </ul>
35
-<p><strong><?php _e( 'Mijireh Checkout Page Design', 'event_espresso' ); ?></strong></p>
35
+<p><strong><?php _e('Mijireh Checkout Page Design', 'event_espresso'); ?></strong></p>
36 36
 <p>
37
-	<?php _e( "As you are probably aware, when users pay with Mijireh Payment Method, they are taken to a secure offsite page, hosted by Mijireh. This page can easily be made to have the look-and-feel of your website through a process called 'slurping', where Mijireh 'slurps' up your website's design and uses it on their checkout page.", 'event_espresso' ); ?>
38
-	<?php printf( __( "In order to do this, we automatically create a new WordPress page which is designed to be slurped by Mijireh. You can customize the page like any other, but the page must contain Mijireh's special '{{mijireh-checkout-form}}' shortcode. Once you have finished designing the page, publish it, and %s then click the special 'slurp now' button%s. Mijireh may take several minutes to slurp the page. Once Mijireh is finished slurping, you can delete the page, or mark it as a draft.", 'event_espresso' ), '<a href="http://ee-screenshots.s3.amazonaws.com/ee4/event-espresso-mijireh-slurp-page-example.jpg" target="_blank">', '</a>' ); ?>
37
+	<?php _e("As you are probably aware, when users pay with Mijireh Payment Method, they are taken to a secure offsite page, hosted by Mijireh. This page can easily be made to have the look-and-feel of your website through a process called 'slurping', where Mijireh 'slurps' up your website's design and uses it on their checkout page.", 'event_espresso'); ?>
38
+	<?php printf(__("In order to do this, we automatically create a new WordPress page which is designed to be slurped by Mijireh. You can customize the page like any other, but the page must contain Mijireh's special '{{mijireh-checkout-form}}' shortcode. Once you have finished designing the page, publish it, and %s then click the special 'slurp now' button%s. Mijireh may take several minutes to slurp the page. Once Mijireh is finished slurping, you can delete the page, or mark it as a draft.", 'event_espresso'), '<a href="http://ee-screenshots.s3.amazonaws.com/ee4/event-espresso-mijireh-slurp-page-example.jpg" target="_blank">', '</a>'); ?>
39 39
 </p>
40 40
\ No newline at end of file
Please login to merge, or discard this patch.
caffeinated/admin/hooks/Global_EE_Caf_Hooks.class.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -36,25 +36,25 @@  discard block
 block discarded – undo
36 36
 
37 37
 
38 38
 	private function _do_hooks() {
39
-		add_filter('FHEE_show_sponsors_meta_box', '__return_false', 10 );
40
-		add_filter('FHEE_show_ratings_request_meta_box', '__return_false', 10 );
41
-		add_filter('FHEE__EE_Admin_Page_Core__load_global_scripts_styles__loader_containers', array( $this, 'forums_lazy_loading'), 10 );
42
-		add_action('AHEE__EE_Admin_Page__espresso_news_post_box__after_content', array( $this, 'extra_news_box_content' ), 10 );
39
+		add_filter('FHEE_show_sponsors_meta_box', '__return_false', 10);
40
+		add_filter('FHEE_show_ratings_request_meta_box', '__return_false', 10);
41
+		add_filter('FHEE__EE_Admin_Page_Core__load_global_scripts_styles__loader_containers', array($this, 'forums_lazy_loading'), 10);
42
+		add_action('AHEE__EE_Admin_Page__espresso_news_post_box__after_content', array($this, 'extra_news_box_content'), 10);
43 43
 	}
44 44
 
45 45
 
46 46
 
47 47
 
48
-	public function extra_news_box_content( $content ) {
49
-		echo '<h3 style="margin:0">' . __('From the Forums', 'event_espresso') . '</h3>';
48
+	public function extra_news_box_content($content) {
49
+		echo '<h3 style="margin:0">'.__('From the Forums', 'event_espresso').'</h3>';
50 50
 		echo '<div id="ee_forum_posts_content">';
51 51
 		$url = 'http://eventespresso.com/forum/event-espresso-support/feed/';
52
-		EE_Admin_Page::cached_rss_display( 'ee_forum_posts_content', $url);
52
+		EE_Admin_Page::cached_rss_display('ee_forum_posts_content', $url);
53 53
 		echo '</div>';
54 54
 	}
55 55
 
56 56
 
57
-	public function forums_lazy_loading( $ids ) {
57
+	public function forums_lazy_loading($ids) {
58 58
 		$ids[] = 'ee_forum_posts_content';
59 59
 		return $ids;
60 60
 	}
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
3 3
 	exit('NO direct script access allowed');
4
+}
4 5
 
5 6
 /**
6 7
  * Event Espresso
Please login to merge, or discard this patch.
caffeinated/admin/extend/events/help_tabs/import_page.help_tab.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -2,18 +2,18 @@
 block discarded – undo
2 2
 <p>
3 3
 <?php _e('The importer can be used to import event information into Event Espresso using a CSV file.', 'event_espresso'); ?>
4 4
 </p>
5
-<p><strong><?php _e("Importing from other Event Espresso 4 Sites", 'event_espresso');?></strong></p>
5
+<p><strong><?php _e("Importing from other Event Espresso 4 Sites", 'event_espresso'); ?></strong></p>
6 6
 <p>
7 7
 <?php _e('To import Event Espresso data from another Event Espresso 4 install, export a CSV file from the admin Events overview page, or anywhere you can generate a CSV export file from. Then upload that file here (regardless of what type of information was exported).', 'event_espresso'); ?>
8 8
 </p>
9 9
 <p>
10 10
 <?php _e('Note: its possible that data from the other site have the same IDs as data in this site. The importer recognizes that this data is from a different database and inserts new items for each item in the CSV file, regardless of whether its ID matches that of an item in this site\'s database or not. However, the importer also remembers the mapping from the old site\'s database to this site\'s database, and on subsequent CSV importers from that site, the data in this database will be updated instead of re-inserting new items.', 'event_espresso'); ?>
11 11
 </p>
12
-<p><strong><?php _e("Importing from this Site", 'event_espresso');?></strong></p>
13
-<p><?php _e("You may want to export data from this site, modify it (or modify the database), and re-import it. When this is done, the importer recognizes that the data is from this site\'s database and updates the records (instead of inserting new items like it would have, had the CSV data been from a different site).", 'event_espresso');?></p>
12
+<p><strong><?php _e("Importing from this Site", 'event_espresso'); ?></strong></p>
13
+<p><?php _e("You may want to export data from this site, modify it (or modify the database), and re-import it. When this is done, the importer recognizes that the data is from this site\'s database and updates the records (instead of inserting new items like it would have, had the CSV data been from a different site).", 'event_espresso'); ?></p>
14 14
 
15
-	<p><strong><?php _e("Notes about Generating your own CSV Import Files", "event_espresso");?></strong></p>
16
-	<p><?php _e("If you think you could save time entering data into a CSV file, you can use the sample import file below. Note that creating your own CSV file is more complicated than in Event Espresso 3.1 because of the more advanced data structure, and so we recommend creating/editing your events using the normal web-interface.", "event_espresso");?></p>
17
-	<p><?php _e("The export file is just an export of an event, or if you do not have any events in your system, it will only contain column headers. Do not change those column headers. Add as many rows as you like. ", "event_espresso");?></p>
18
-	<p><?php _e("In the ID columns (columns ending in '_ID'), you should enter 'temporary IDs', which are unique numbers/words that identify that item, which can be used later when you want to refer to that item. (For example, if you assign an event's EVT_ID to be a temporary id of 'my-event-1', then use that same phrase 'my-event-1' to refer to that event in the Datetime model's EVT_ID column)", "event_espresso");?></p>
19
-	<p><?php _e("Also note, you do NOT have to enter info in for each model. (You can, for example, only enter in Term_Taxonomies and Term model data)", "event_espresso");?></p>
20 15
\ No newline at end of file
16
+	<p><strong><?php _e("Notes about Generating your own CSV Import Files", "event_espresso"); ?></strong></p>
17
+	<p><?php _e("If you think you could save time entering data into a CSV file, you can use the sample import file below. Note that creating your own CSV file is more complicated than in Event Espresso 3.1 because of the more advanced data structure, and so we recommend creating/editing your events using the normal web-interface.", "event_espresso"); ?></p>
18
+	<p><?php _e("The export file is just an export of an event, or if you do not have any events in your system, it will only contain column headers. Do not change those column headers. Add as many rows as you like. ", "event_espresso"); ?></p>
19
+	<p><?php _e("In the ID columns (columns ending in '_ID'), you should enter 'temporary IDs', which are unique numbers/words that identify that item, which can be used later when you want to refer to that item. (For example, if you assign an event's EVT_ID to be a temporary id of 'my-event-1', then use that same phrase 'my-event-1' to refer to that event in the Datetime model's EVT_ID column)", "event_espresso"); ?></p>
20
+	<p><?php _e("Also note, you do NOT have to enter info in for each model. (You can, for example, only enter in Term_Taxonomies and Term model data)", "event_espresso"); ?></p>
21 21
\ No newline at end of file
Please login to merge, or discard this patch.
core/libraries/messages/EE_messenger.lib.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
 	/**
504 504
 	 * @param $message_types
505 505
 	 * @param array $extra
506
-	 * @return mixed|string
506
+	 * @return string
507 507
 	 */
508 508
 	protected function _get_admin_content_events_edit( $message_types, $extra ) {
509 509
 		//defaults
@@ -771,7 +771,7 @@  discard block
 block discarded – undo
771 771
 	 * All this does is set the existing test settings (in the db) for the messenger
772 772
 	 *
773 773
 	 * @access public
774
-	 * @param $settings
774
+	 * @param string $settings
775 775
 	 * @return bool success/fail
776 776
 	 */
777 777
 	public function set_existing_test_settings( $settings ) {
Please login to merge, or discard this patch.
Spacing   +101 added lines, -101 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 use \EventEspresso\core\exceptions\SendMessageException;
3 3
 
4
-if (!defined('EVENT_ESPRESSO_VERSION') )
4
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
5 5
 	exit('NO direct script access allowed');
6 6
 
7 7
 /**
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 	 * @return void
280 280
 	 */
281 281
 	public function enqueue_scripts_styles() {
282
-		do_action( 'AHEE__EE_messenger__enqueue_scripts_styles');
282
+		do_action('AHEE__EE_messenger__enqueue_scripts_styles');
283 283
 	}
284 284
 
285 285
 
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
 
350 350
 		$this->_supports_labels->template_variation_description = __('These are different styles to choose from for the selected template structure.  Usually these affect things like font style, color, borders etc.  In some cases the styles will also make minor layout changes.');
351 351
 
352
-		$this->_supports_labels = apply_filters( 'FHEE__EE_messenger___set_supports_labels_defaults___supports_labels', $this->_supports_labels, $this );
352
+		$this->_supports_labels = apply_filters('FHEE__EE_messenger___set_supports_labels_defaults___supports_labels', $this->_supports_labels, $this);
353 353
 	}
354 354
 
355 355
 
@@ -364,10 +364,10 @@  discard block
 block discarded – undo
364 364
 	 * @return stdClass
365 365
 	 */
366 366
 	public function get_supports_labels() {
367
-		if ( empty( $this->_supports_labels->template_pack ) || empty( $this->_supports_labels->template_variation) ) {
367
+		if (empty($this->_supports_labels->template_pack) || empty($this->_supports_labels->template_variation)) {
368 368
 			$this->_set_supports_labels_defaults();
369 369
 		}
370
-		return apply_filters( 'FHEE__EE_messenger__get_supports_labels', $this->_supports_labels, $this );
370
+		return apply_filters('FHEE__EE_messenger__get_supports_labels', $this->_supports_labels, $this);
371 371
 	}
372 372
 
373 373
 
@@ -387,10 +387,10 @@  discard block
 block discarded – undo
387 387
 	 *
388 388
 	 * @return string                    path or url for the requested variation.
389 389
 	 */
390
-	public function get_variation( EE_Messages_Template_Pack $pack, $message_type_name, $url = FALSE, $type = 'main', $variation = 'default', $skip_filters = FALSE ) {
390
+	public function get_variation(EE_Messages_Template_Pack $pack, $message_type_name, $url = FALSE, $type = 'main', $variation = 'default', $skip_filters = FALSE) {
391 391
 		$this->_tmp_pack = $pack;
392
-		$variation_path = apply_filters( 'EE_messenger__get_variation__variation', false, $pack, $this->name, $message_type_name, $url, $type, $variation, $skip_filters );
393
-		$variation_path = empty( $variation_path ) ? $this->_tmp_pack->get_variation( $this->name, $message_type_name, $type, $variation, $url, '.css', $skip_filters ) : $variation_path;
392
+		$variation_path = apply_filters('EE_messenger__get_variation__variation', false, $pack, $this->name, $message_type_name, $url, $type, $variation, $skip_filters);
393
+		$variation_path = empty($variation_path) ? $this->_tmp_pack->get_variation($this->name, $message_type_name, $type, $variation, $url, '.css', $skip_filters) : $variation_path;
394 394
 		return $variation_path;
395 395
 
396 396
 	}
@@ -408,13 +408,13 @@  discard block
 block discarded – undo
408 408
 	 * @return array
409 409
 	 */
410 410
 	public function get_default_message_types() {
411
-		$class = get_class( $this );
411
+		$class = get_class($this);
412 412
 
413 413
 		//messenger specific filter
414
-		$default_types = apply_filters( 'FHEE__' . $class . '__get_default_message_types__default_types', $this->_default_message_types, $this );
414
+		$default_types = apply_filters('FHEE__'.$class.'__get_default_message_types__default_types', $this->_default_message_types, $this);
415 415
 
416 416
 		//all messengers filter
417
-		$default_types = apply_filters( 'FHEE__EE_messenger__get_default_message_types__default_types', $default_types, $this );
417
+		$default_types = apply_filters('FHEE__EE_messenger__get_default_message_types__default_types', $default_types, $this);
418 418
 		return $default_types;
419 419
 	}
420 420
 
@@ -429,14 +429,14 @@  discard block
 block discarded – undo
429 429
 	 * @return array
430 430
 	 */
431 431
 	public function get_valid_message_types() {
432
-		$class = get_class( $this );
432
+		$class = get_class($this);
433 433
 
434 434
 		//messenger specific filter
435 435
 		//messenger specific filter
436
-		$valid_types = apply_filters( 'FHEE__' . $class . '__get_valid_message_types__valid_types', $this->_valid_message_types, $this );
436
+		$valid_types = apply_filters('FHEE__'.$class.'__get_valid_message_types__valid_types', $this->_valid_message_types, $this);
437 437
 
438 438
 		//all messengers filter
439
-		$valid_types = apply_filters( 'FHEE__EE_messenger__get_valid_message_types__valid_types', $valid_types, $this );
439
+		$valid_types = apply_filters('FHEE__EE_messenger__get_valid_message_types__valid_types', $valid_types, $this);
440 440
 		return $valid_types;
441 441
 	}
442 442
 
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
 	 * @access public
451 451
 	 * @param array $new_config Whatever is put in here will reset the _validator_config property
452 452
 	 */
453
-	public function set_validator_config( $new_config ) {
453
+	public function set_validator_config($new_config) {
454 454
 		$this->_validator_config = $new_config;
455 455
 	}
456 456
 
@@ -466,8 +466,8 @@  discard block
 block discarded – undo
466 466
 	public function get_validator_config() {
467 467
 		$class = get_class($this);
468 468
 
469
-		$config = apply_filters( 'FHEE__' . $class . '__get_validator_config', $this->_validator_config, $this );
470
-		$config = apply_filters( 'FHEE__EE_messenger__get_validator_config', $config, $this );
469
+		$config = apply_filters('FHEE__'.$class.'__get_validator_config', $this->_validator_config, $this);
470
+		$config = apply_filters('FHEE__EE_messenger__get_validator_config', $config, $this);
471 471
 		return $config;
472 472
 	}
473 473
 
@@ -484,8 +484,8 @@  discard block
 block discarded – undo
484 484
 	 * @access public
485 485
 	 * @return string content for page
486 486
 	 */
487
-	public function get_messenger_admin_page_content( $page, $action = null, $extra = array(), $message_types = array() ) {
488
-		return $this->_get_admin_page_content( $page, $action, $extra, $message_types );
487
+	public function get_messenger_admin_page_content($page, $action = null, $extra = array(), $message_types = array()) {
488
+		return $this->_get_admin_page_content($page, $action, $extra, $message_types);
489 489
 	}
490 490
 
491 491
 
@@ -495,20 +495,20 @@  discard block
 block discarded – undo
495 495
 	 * @param array $extra
496 496
 	 * @return mixed|string
497 497
 	 */
498
-	protected function _get_admin_content_events_edit( $message_types, $extra ) {
498
+	protected function _get_admin_content_events_edit($message_types, $extra) {
499 499
 		//defaults
500 500
 		$template_args = array();
501 501
 		$selector_rows = '';
502 502
 
503 503
 		//we don't need message types here so we're just going to ignore. we do, however, expect the event id here. The event id is needed to provide a link to setup a custom template for this event.
504
-		$event_id = isset( $extra['event'] ) ? $extra['event'] : NULL;
504
+		$event_id = isset($extra['event']) ? $extra['event'] : NULL;
505 505
 
506
-		$template_wrapper_path = EE_LIBRARIES . 'messages/messenger/admin_templates/event_switcher_wrapper.template.php';
507
-		$template_row_path = EE_LIBRARIES . 'messages/messenger/admin_templates/event_switcher_row.template.php';
506
+		$template_wrapper_path = EE_LIBRARIES.'messages/messenger/admin_templates/event_switcher_wrapper.template.php';
507
+		$template_row_path = EE_LIBRARIES.'messages/messenger/admin_templates/event_switcher_row.template.php';
508 508
 
509 509
 		//array of template objects for global and custom (non-trashed) (but remember just for this messenger!)
510 510
 		$global_templates = EEM_Message_Template_Group::instance()->get_all(
511
-			array( array( 'MTP_messenger' => $this->name, 'MTP_is_global' => true, 'MTP_is_active' => true ) )
511
+			array(array('MTP_messenger' => $this->name, 'MTP_is_global' => true, 'MTP_is_active' => true))
512 512
 		);
513 513
 		$templates_for_event = EEM_Message_Template_Group::instance()->get_all_custom_templates_by_event(
514 514
 			$event_id,
@@ -517,55 +517,55 @@  discard block
 block discarded – undo
517 517
 				'MTP_is_active' => true
518 518
 			)
519 519
 		);
520
-		$templates_for_event = !empty( $templates_for_event ) ? $templates_for_event : array();
520
+		$templates_for_event = ! empty($templates_for_event) ? $templates_for_event : array();
521 521
 
522 522
 		//so we need to setup the rows for the selectors and we use the global mtpgs (cause those will the active message template groups)
523
-		foreach ( $global_templates as $mtpgID => $mtpg ) {
524
-			if ( $mtpg instanceof EE_Message_Template_Group ) {
523
+		foreach ($global_templates as $mtpgID => $mtpg) {
524
+			if ($mtpg instanceof EE_Message_Template_Group) {
525 525
 				//verify this message type is supposed to show on this page
526 526
 				$mtp_obj = $mtpg->message_type_obj();
527
-				if ( ! $mtp_obj instanceof EE_message_type ) {
527
+				if ( ! $mtp_obj instanceof EE_message_type) {
528 528
 					continue;
529 529
 				}
530
-				$mtp_obj->admin_registered_pages = (array)$mtp_obj->admin_registered_pages;
531
-				if ( ! in_array( 'events_edit', $mtp_obj->admin_registered_pages ) ) {
530
+				$mtp_obj->admin_registered_pages = (array) $mtp_obj->admin_registered_pages;
531
+				if ( ! in_array('events_edit', $mtp_obj->admin_registered_pages)) {
532 532
 					continue;
533 533
 				}
534 534
 				$select_values = array();
535
-				$select_values[ $mtpgID ] = __( 'Global', 'event_espresso' );
536
-				$default_value = array_key_exists( $mtpgID, $templates_for_event ) && ! $mtpg->get( 'MTP_is_override' ) ? $mtpgID : null;
535
+				$select_values[$mtpgID] = __('Global', 'event_espresso');
536
+				$default_value = array_key_exists($mtpgID, $templates_for_event) && ! $mtpg->get('MTP_is_override') ? $mtpgID : null;
537 537
 				//if the override has been set for the global template, then that means even if there are custom templates already created we ignore them because of the set override.
538
-				if ( ! $mtpg->get( 'MTP_is_override' ) ) {
538
+				if ( ! $mtpg->get('MTP_is_override')) {
539 539
 					//any custom templates for this message type?
540
-					$custom_templates = EEM_Message_Template_Group::instance()->get_custom_message_template_by_m_and_mt( $this->name, $mtpg->message_type() );
541
-					foreach ( $custom_templates as $cmtpgID => $cmtpg ) {
542
-						$select_values[ $cmtpgID ] = $cmtpg->name();
543
-						$default_value = array_key_exists( $cmtpgID, $templates_for_event ) ? $cmtpgID : $default_value;
540
+					$custom_templates = EEM_Message_Template_Group::instance()->get_custom_message_template_by_m_and_mt($this->name, $mtpg->message_type());
541
+					foreach ($custom_templates as $cmtpgID => $cmtpg) {
542
+						$select_values[$cmtpgID] = $cmtpg->name();
543
+						$default_value = array_key_exists($cmtpgID, $templates_for_event) ? $cmtpgID : $default_value;
544 544
 					}
545 545
 				}
546 546
 				//if there is no $default_value then we set it as the global
547
-				$default_value = empty( $default_value ) ? $mtpgID : $default_value;
548
-				$edit_url = EEH_URL::add_query_args_and_nonce( array( 'page' => 'espresso_messages', 'action' => 'edit_message_template', 'id' => $default_value ), admin_url( 'admin.php' ) );
549
-				$create_url = EEH_URL::add_query_args_and_nonce( array( 'page' => 'espresso_messages', 'action' => 'add_new_message_template', 'GRP_ID' => $default_value ), admin_url( 'admin.php' ) );
550
-				$st_args[ 'mt_name' ] = ucwords( $mtp_obj->label[ 'singular' ] );
551
-				$st_args[ 'mt_slug' ] = $mtpg->message_type();
552
-				$st_args[ 'messenger_slug' ] = $this->name;
553
-				$st_args[ 'selector' ] = EEH_Form_Fields::select_input( 'event_message_templates_relation[' . $mtpgID . ']', $select_values, $default_value, 'data-messenger="' . $this->name . '" data-messagetype="' . $mtpg->message_type() . '"', 'message-template-selector' );
547
+				$default_value = empty($default_value) ? $mtpgID : $default_value;
548
+				$edit_url = EEH_URL::add_query_args_and_nonce(array('page' => 'espresso_messages', 'action' => 'edit_message_template', 'id' => $default_value), admin_url('admin.php'));
549
+				$create_url = EEH_URL::add_query_args_and_nonce(array('page' => 'espresso_messages', 'action' => 'add_new_message_template', 'GRP_ID' => $default_value), admin_url('admin.php'));
550
+				$st_args['mt_name'] = ucwords($mtp_obj->label['singular']);
551
+				$st_args['mt_slug'] = $mtpg->message_type();
552
+				$st_args['messenger_slug'] = $this->name;
553
+				$st_args['selector'] = EEH_Form_Fields::select_input('event_message_templates_relation['.$mtpgID.']', $select_values, $default_value, 'data-messenger="'.$this->name.'" data-messagetype="'.$mtpg->message_type().'"', 'message-template-selector');
554 554
 				//note that  message template group that has override_all_custom set will remove the ability to set a custom message template based off of the global (and that also in turn overrides any other custom templates).
555
-				$st_args[ 'create_button' ] = $mtpg->get( 'MTP_is_override' ) ? '' : '<a data-messenger="' . $this->name . '" data-messagetype="' . $mtpg->message_type() . '" data-grpid="' . $default_value . '" target="_blank" href="' . $create_url . '" class="button button-small create-mtpg-button">' . __( 'Create New Custom', 'event_espresso' ) . '</a>';
556
-				$st_args[ 'create_button' ] = EE_Registry::instance()->CAP->current_user_can( 'ee_edit_messages', 'espresso_messages_add_new_message_template' ) ? $st_args[ 'create_button' ] : '';
557
-				$st_args[ 'edit_button' ] = EE_Registry::instance()->CAP->current_user_can( 'ee_edit_message', 'espresso_messages_edit_message_template', $mtpgID ) ? '<a data-messagetype="' . $mtpg->message_type() . '" data-grpid="' . $default_value . '" target="_blank" href="' . $edit_url . '" class="button button-small edit-mtpg-button">' . __( 'Edit', 'event_espresso' ) . '</a>' : '';
558
-				$selector_rows .= EEH_Template::display_template( $template_row_path, $st_args, true );
555
+				$st_args['create_button'] = $mtpg->get('MTP_is_override') ? '' : '<a data-messenger="'.$this->name.'" data-messagetype="'.$mtpg->message_type().'" data-grpid="'.$default_value.'" target="_blank" href="'.$create_url.'" class="button button-small create-mtpg-button">'.__('Create New Custom', 'event_espresso').'</a>';
556
+				$st_args['create_button'] = EE_Registry::instance()->CAP->current_user_can('ee_edit_messages', 'espresso_messages_add_new_message_template') ? $st_args['create_button'] : '';
557
+				$st_args['edit_button'] = EE_Registry::instance()->CAP->current_user_can('ee_edit_message', 'espresso_messages_edit_message_template', $mtpgID) ? '<a data-messagetype="'.$mtpg->message_type().'" data-grpid="'.$default_value.'" target="_blank" href="'.$edit_url.'" class="button button-small edit-mtpg-button">'.__('Edit', 'event_espresso').'</a>' : '';
558
+				$selector_rows .= EEH_Template::display_template($template_row_path, $st_args, true);
559 559
 			}
560 560
 		}
561 561
 
562 562
 		//if no selectors present then get out.
563
-		if ( empty( $selector_rows ) ) {
563
+		if (empty($selector_rows)) {
564 564
 			return '';
565 565
 		}
566 566
 
567 567
 		$template_args['selector_rows'] = $selector_rows;
568
-		return EEH_Template::display_template( $template_wrapper_path, $template_args, TRUE );
568
+		return EEH_Template::display_template($template_wrapper_path, $template_args, TRUE);
569 569
 	}
570 570
 
571 571
 
@@ -580,8 +580,8 @@  discard block
 block discarded – undo
580 580
 	 * @return array $this->_template_fields
581 581
 	 */
582 582
 	public function get_template_fields() {
583
-		$template_fields = apply_filters( 'FHEE__' . get_class($this) . '__get_template_fields', $this->_template_fields, $this );
584
-		$template_fields = apply_filters( 'FHEE__EE_messenger__get_template_fields', $template_fields, $this );
583
+		$template_fields = apply_filters('FHEE__'.get_class($this).'__get_template_fields', $this->_template_fields, $this);
584
+		$template_fields = apply_filters('FHEE__EE_messenger__get_template_fields', $template_fields, $this);
585 585
 		return $template_fields;
586 586
 	}
587 587
 
@@ -595,9 +595,9 @@  discard block
 block discarded – undo
595 595
 	 * @param mixed $value
596 596
 	 */
597 597
 	protected function _set_template_value($item, $value) {
598
-		if ( array_key_exists($item, $this->_template_fields) ) {
599
-			$prop = '_' . $item;
600
-			$this->{$prop}= $value;
598
+		if (array_key_exists($item, $this->_template_fields)) {
599
+			$prop = '_'.$item;
600
+			$this->{$prop} = $value;
601 601
 		}
602 602
 	}
603 603
 
@@ -615,18 +615,18 @@  discard block
 block discarded – undo
615 615
 	 *
616 616
 	 * @throws SendMessageException
617 617
 	 */
618
-	final public function send_message( $message, EE_message_type $message_type ) {
618
+	final public function send_message($message, EE_message_type $message_type) {
619 619
 		try {
620
-			$this->_validate_and_setup( $message );
620
+			$this->_validate_and_setup($message);
621 621
 			$this->_incoming_message_type = $message_type;
622 622
 			$response = $this->_send_message();
623
-			if ( $response instanceof WP_Error ) {
624
-				EE_Error::add_error( $response->get_error_message(), __FILE__, __FUNCTION__, __LINE__ );
623
+			if ($response instanceof WP_Error) {
624
+				EE_Error::add_error($response->get_error_message(), __FILE__, __FUNCTION__, __LINE__);
625 625
 				$response = false;
626 626
 			}
627
-		} catch ( \Exception $e ) {
627
+		} catch (\Exception $e) {
628 628
 			//convert to an instance of SendMessageException
629
-			throw new SendMessageException( $e->getMessage() );
629
+			throw new SendMessageException($e->getMessage());
630 630
 		}
631 631
 		return $response;
632 632
 	}
@@ -640,28 +640,28 @@  discard block
 block discarded – undo
640 640
 	 * @param  bool   $send    true we will actually use the _send method (for test sends). FALSE we just return preview
641 641
 	 * @return string          return the message html content
642 642
 	 */
643
-	public function get_preview( EE_Message $message, EE_message_type $message_type, $send = false ) {
644
-		$this->_validate_and_setup( $message );
643
+	public function get_preview(EE_Message $message, EE_message_type $message_type, $send = false) {
644
+		$this->_validate_and_setup($message);
645 645
 
646 646
 		$this->_incoming_message_type = $message_type;
647 647
 
648
-		if ( $send ) {
648
+		if ($send) {
649 649
 			//are we overriding any existing template fields?
650 650
 			$settings = $this->get_existing_test_settings();
651
-			if ( ! empty( $settings ) ) {
652
-				foreach ( $settings as $field => $value ) {
653
-					$this->_set_template_value( $field, $value );
651
+			if ( ! empty($settings)) {
652
+				foreach ($settings as $field => $value) {
653
+					$this->_set_template_value($field, $value);
654 654
 				}
655 655
 			}
656 656
 		}
657 657
 
658 658
 		//enqueue preview js so that any links/buttons on the page are disabled.
659
-		if ( ! $send ) {
659
+		if ( ! $send) {
660 660
 			// the below may seem like duplication.  However, typically if a messenger enqueues scripts/styles,
661 661
 			// it deregisters all existing wp scripts and styles first.  So the second hook ensures our previewer still gets setup.
662
-			add_action( 'admin_enqueue_scripts', array( $this, 'add_preview_script' ), 10 );
663
-			add_action( 'wp_enqueue_scripts', array( $this, 'add_preview_script' ), 10 );
664
-			add_action( 'AHEE__EE_messenger__enqueue_scripts_styles', array( $this, 'add_preview_script' ), 10 );
662
+			add_action('admin_enqueue_scripts', array($this, 'add_preview_script'), 10);
663
+			add_action('wp_enqueue_scripts', array($this, 'add_preview_script'), 10);
664
+			add_action('AHEE__EE_messenger__enqueue_scripts_styles', array($this, 'add_preview_script'), 10);
665 665
 		}
666 666
 
667 667
 		return $send ? $this->_send_message() : $this->_preview();
@@ -679,10 +679,10 @@  discard block
 block discarded – undo
679 679
 	 */
680 680
 	public function add_preview_script() {
681 681
 		//error message
682
-		EE_Registry::$i18n_js_strings[ 'links_disabled' ] = __( 'All the links on this page have been disabled because this is a generated preview message for the purpose of ensuring layout, style, and content setup.  To test generated links, you must trigger an actual message notification.', 'event_espresso' );
683
-		wp_register_script( 'ee-messages-preview-js', EE_LIBRARIES_URL . 'messages/messenger/assets/js/ee-messages-preview.js', array( 'jquery' ), EVENT_ESPRESSO_VERSION, true );
684
-		wp_localize_script( 'ee-messages-preview-js', 'eei18n', EE_Registry::$i18n_js_strings );
685
-		wp_enqueue_script( 'ee-messages-preview-js' );
682
+		EE_Registry::$i18n_js_strings['links_disabled'] = __('All the links on this page have been disabled because this is a generated preview message for the purpose of ensuring layout, style, and content setup.  To test generated links, you must trigger an actual message notification.', 'event_espresso');
683
+		wp_register_script('ee-messages-preview-js', EE_LIBRARIES_URL.'messages/messenger/assets/js/ee-messages-preview.js', array('jquery'), EVENT_ESPRESSO_VERSION, true);
684
+		wp_localize_script('ee-messages-preview-js', 'eei18n', EE_Registry::$i18n_js_strings);
685
+		wp_enqueue_script('ee-messages-preview-js');
686 686
 	}
687 687
 
688 688
 
@@ -693,13 +693,13 @@  discard block
 block discarded – undo
693 693
 	 * @param  EE_Message $message
694 694
 	 * @throws EE_Error
695 695
 	 */
696
-	protected function _validate_and_setup( EE_Message $message ) {
696
+	protected function _validate_and_setup(EE_Message $message) {
697 697
 		$template_pack = $message->get_template_pack();
698 698
 		$variation = $message->get_template_pack_variation();
699 699
 
700 700
 		//verify we have the required template pack value on the $message object.
701
-		if ( ! $template_pack instanceof EE_Messages_Template_Pack ) {
702
-			throw new EE_Error( __('Incoming $message object must have an EE_Messages_Template_Pack object available.', 'event_espresso' ) );
701
+		if ( ! $template_pack instanceof EE_Messages_Template_Pack) {
702
+			throw new EE_Error(__('Incoming $message object must have an EE_Messages_Template_Pack object available.', 'event_espresso'));
703 703
 		}
704 704
 
705 705
 		$this->_tmp_pack = $template_pack;
@@ -708,11 +708,11 @@  discard block
 block discarded – undo
708 708
 
709 709
 		$template_fields = $this->get_template_fields();
710 710
 
711
-		foreach ( $template_fields as $template => $value ) {
712
-			if ( $template !== 'extra' ) {
713
-				$column_value = $message->get_field_or_extra_meta( 'MSG_' . $template );
711
+		foreach ($template_fields as $template => $value) {
712
+			if ($template !== 'extra') {
713
+				$column_value = $message->get_field_or_extra_meta('MSG_'.$template);
714 714
 				$message_template_value = $column_value ? $column_value : null;
715
-				$this->_set_template_value( $template, $message_template_value );
715
+				$this->_set_template_value($template, $message_template_value);
716 716
 			}
717 717
 		}
718 718
 	}
@@ -727,19 +727,19 @@  discard block
 block discarded – undo
727 727
 	 * @return string
728 728
 	 * @throws \EE_Error
729 729
 	 */
730
-	protected function _get_main_template( $preview = FALSE ) {
730
+	protected function _get_main_template($preview = FALSE) {
731 731
 		$type = $preview ? 'preview' : 'main';
732 732
 
733
-		$wrapper_template = $this->_tmp_pack->get_wrapper( $this->name, $type );
733
+		$wrapper_template = $this->_tmp_pack->get_wrapper($this->name, $type);
734 734
 
735 735
 		//check file exists and is readable
736
-		if ( !is_readable( $wrapper_template ) )
737
-			throw new EE_Error( sprintf( __('Unable to access the template file for the %s messenger main content wrapper.  The location being attempted is %s.', 'event_espresso' ), ucwords($this->label['singular']) , $wrapper_template ) );
736
+		if ( ! is_readable($wrapper_template))
737
+			throw new EE_Error(sprintf(__('Unable to access the template file for the %s messenger main content wrapper.  The location being attempted is %s.', 'event_espresso'), ucwords($this->label['singular']), $wrapper_template));
738 738
 
739 739
 		//add message type to template args
740 740
 		$this->_template_args['message_type'] = $this->_incoming_message_type;
741 741
 
742
-		return EEH_Template::display_template( $wrapper_template, $this->_template_args, TRUE );
742
+		return EEH_Template::display_template($wrapper_template, $this->_template_args, TRUE);
743 743
 	}
744 744
 
745 745
 
@@ -775,9 +775,9 @@  discard block
 block discarded – undo
775 775
 	 */
776 776
 	public function get_existing_test_settings() {
777 777
 		/** @var EE_Message_Resource_Manager $Message_Resource_Manager */
778
-		$Message_Resource_Manager = EE_Registry::instance()->load_lib( 'Message_Resource_Manager' );
778
+		$Message_Resource_Manager = EE_Registry::instance()->load_lib('Message_Resource_Manager');
779 779
 		$settings = $Message_Resource_Manager->get_active_messengers_option();
780
-		return isset( $settings[ $this->name ]['test_settings'] ) ? $settings[ $this->name ]['test_settings'] : array();
780
+		return isset($settings[$this->name]['test_settings']) ? $settings[$this->name]['test_settings'] : array();
781 781
 	}
782 782
 
783 783
 
@@ -789,12 +789,12 @@  discard block
 block discarded – undo
789 789
 	 * @param $settings
790 790
 	 * @return bool success/fail
791 791
 	 */
792
-	public function set_existing_test_settings( $settings ) {
792
+	public function set_existing_test_settings($settings) {
793 793
 		/** @var EE_Message_Resource_Manager $Message_Resource_Manager */
794
-		$Message_Resource_Manager = EE_Registry::instance()->load_lib( 'Message_Resource_Manager' );
794
+		$Message_Resource_Manager = EE_Registry::instance()->load_lib('Message_Resource_Manager');
795 795
 		$existing = $Message_Resource_Manager->get_active_messengers_option();
796
-		$existing[ $this->name ]['test_settings'] = $settings;
797
-		return $Message_Resource_Manager->update_active_messengers_option( $existing );
796
+		$existing[$this->name]['test_settings'] = $settings;
797
+		return $Message_Resource_Manager->update_active_messengers_option($existing);
798 798
 	}
799 799
 
800 800
 
@@ -807,21 +807,21 @@  discard block
 block discarded – undo
807 807
 	 * @param string $field The field to retrieve the label for
808 808
 	 * @return string        	  The label
809 809
 	 */
810
-	public function get_field_label( $field ) {
810
+	public function get_field_label($field) {
811 811
 		//first let's see if the field requests is in the top level array.
812
-		if ( isset( $this->_template_fields[$field] ) && !empty( $this->_template_fields[$field]['label'] ) )
812
+		if (isset($this->_template_fields[$field]) && ! empty($this->_template_fields[$field]['label']))
813 813
 			return $this->_template[$field]['label'];
814 814
 
815 815
 		//nope so let's look in the extra array to see if it's there HOWEVER if the field exists as a top level index in the extra array then we know the label is in the 'main' index.
816
-		if ( isset( $this->_template_fields['extra'] ) && !empty( $this->_template_fields['extra'][$field] ) && !empty( $this->_template_fields['extra'][$field]['main']['label'] )  )
816
+		if (isset($this->_template_fields['extra']) && ! empty($this->_template_fields['extra'][$field]) && ! empty($this->_template_fields['extra'][$field]['main']['label']))
817 817
 			return $this->_template_fields['extra'][$field]['main']['label'];
818 818
 
819 819
 		//now it's possible this field may just be existing in any of the extra array items.
820
-		if ( !empty( $this->_template_fields['extra'] ) && is_array( $this->_template_fields['extra'] ) ) {
821
-			foreach ( $this->_template_fields['extra'] as $main_field => $subfields ) {
822
-				if ( !is_array( $subfields ) )
820
+		if ( ! empty($this->_template_fields['extra']) && is_array($this->_template_fields['extra'])) {
821
+			foreach ($this->_template_fields['extra'] as $main_field => $subfields) {
822
+				if ( ! is_array($subfields))
823 823
 					continue;
824
-				if ( isset( $subfields[$field] ) && !empty( $subfields[$field]['label'] ) )
824
+				if (isset($subfields[$field]) && ! empty($subfields[$field]['label']))
825 825
 					return $subfields[$field]['label'];
826 826
 			}
827 827
 		}
@@ -842,7 +842,7 @@  discard block
 block discarded – undo
842 842
 	 *
843 843
 	 * @return void
844 844
 	 */
845
-	public function do_secondary_messenger_hooks( $sending_messenger_name ) {
845
+	public function do_secondary_messenger_hooks($sending_messenger_name) {
846 846
 		return;
847 847
 	}
848 848
 
Please login to merge, or discard this patch.
Braces   +17 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,8 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 use \EventEspresso\core\exceptions\SendMessageException;
3 3
 
4
-if (!defined('EVENT_ESPRESSO_VERSION') )
4
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
5 5
 	exit('NO direct script access allowed');
6
+}
6 7
 
7 8
 /**
8 9
  * EE_messenger class
@@ -733,8 +734,9 @@  discard block
 block discarded – undo
733 734
 		$wrapper_template = $this->_tmp_pack->get_wrapper( $this->name, $type );
734 735
 
735 736
 		//check file exists and is readable
736
-		if ( !is_readable( $wrapper_template ) )
737
-			throw new EE_Error( sprintf( __('Unable to access the template file for the %s messenger main content wrapper.  The location being attempted is %s.', 'event_espresso' ), ucwords($this->label['singular']) , $wrapper_template ) );
737
+		if ( !is_readable( $wrapper_template ) ) {
738
+					throw new EE_Error( sprintf( __('Unable to access the template file for the %s messenger main content wrapper.  The location being attempted is %s.', 'event_espresso' ), ucwords($this->label['singular']) , $wrapper_template ) );
739
+		}
738 740
 
739 741
 		//add message type to template args
740 742
 		$this->_template_args['message_type'] = $this->_incoming_message_type;
@@ -809,20 +811,24 @@  discard block
 block discarded – undo
809 811
 	 */
810 812
 	public function get_field_label( $field ) {
811 813
 		//first let's see if the field requests is in the top level array.
812
-		if ( isset( $this->_template_fields[$field] ) && !empty( $this->_template_fields[$field]['label'] ) )
813
-			return $this->_template[$field]['label'];
814
+		if ( isset( $this->_template_fields[$field] ) && !empty( $this->_template_fields[$field]['label'] ) ) {
815
+					return $this->_template[$field]['label'];
816
+		}
814 817
 
815 818
 		//nope so let's look in the extra array to see if it's there HOWEVER if the field exists as a top level index in the extra array then we know the label is in the 'main' index.
816
-		if ( isset( $this->_template_fields['extra'] ) && !empty( $this->_template_fields['extra'][$field] ) && !empty( $this->_template_fields['extra'][$field]['main']['label'] )  )
817
-			return $this->_template_fields['extra'][$field]['main']['label'];
819
+		if ( isset( $this->_template_fields['extra'] ) && !empty( $this->_template_fields['extra'][$field] ) && !empty( $this->_template_fields['extra'][$field]['main']['label'] )  ) {
820
+					return $this->_template_fields['extra'][$field]['main']['label'];
821
+		}
818 822
 
819 823
 		//now it's possible this field may just be existing in any of the extra array items.
820 824
 		if ( !empty( $this->_template_fields['extra'] ) && is_array( $this->_template_fields['extra'] ) ) {
821 825
 			foreach ( $this->_template_fields['extra'] as $main_field => $subfields ) {
822
-				if ( !is_array( $subfields ) )
823
-					continue;
824
-				if ( isset( $subfields[$field] ) && !empty( $subfields[$field]['label'] ) )
825
-					return $subfields[$field]['label'];
826
+				if ( !is_array( $subfields ) ) {
827
+									continue;
828
+				}
829
+				if ( isset( $subfields[$field] ) && !empty( $subfields[$field]['label'] ) ) {
830
+									return $subfields[$field]['label'];
831
+				}
826 832
 			}
827 833
 		}
828 834
 
Please login to merge, or discard this patch.
Invoice/templates/invoice_settings_header_gateway.template.php 3 patches
Spacing   +3 added lines, -3 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
  * Event Espresso
@@ -26,9 +26,9 @@  discard block
 block discarded – undo
26 26
  */
27 27
 ?>
28 28
 	<tr>
29
-		<th><h3><?php _e("Invoice Gateway Settings", 'event_espresso');?></h3></th>
29
+		<th><h3><?php _e("Invoice Gateway Settings", 'event_espresso'); ?></h3></th>
30 30
 		<td>
31
-			<span class="description"><?php _e("The following settings affect the functioning of the Invoice gateway.", 'event_espresso');?></span>
31
+			<span class="description"><?php _e("The following settings affect the functioning of the Invoice gateway.", 'event_espresso'); ?></span>
32 32
 		</td>
33 33
 	</tr>
34 34
 <?php
Please login to merge, or discard this patch.
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -3,27 +3,27 @@
 block discarded – undo
3 3
 if (!defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('No direct script access allowed');
5 5
 /**
6
- * Event Espresso
7
- *
8
- * Event Registration and Management Plugin for WordPress
9
- *
10
- * @ package			Event Espresso
11
- * @ author			Seth Shoultes
12
- * @ copyright		(c) 2008-2011 Event Espresso  All Rights Reserved.
13
- * @ license			http://eventespresso.com/support/terms-conditions/   * see Plugin Licensing *
14
- * @ link					http://www.eventespresso.com
15
- * @ version		 	4.3
16
- *
17
- * ------------------------------------------------------------------------
18
- *
19
- * invoice_settings_header_gateway
20
- *
21
- * @package			Event Espresso
22
- * @subpackage
23
- * @author				Mike Nelson
24
- *
25
- * ------------------------------------------------------------------------
26
- */
6
+	 * Event Espresso
7
+	 *
8
+	 * Event Registration and Management Plugin for WordPress
9
+	 *
10
+	 * @ package			Event Espresso
11
+	 * @ author			Seth Shoultes
12
+	 * @ copyright		(c) 2008-2011 Event Espresso  All Rights Reserved.
13
+	 * @ license			http://eventespresso.com/support/terms-conditions/   * see Plugin Licensing *
14
+	 * @ link					http://www.eventespresso.com
15
+	 * @ version		 	4.3
16
+	 *
17
+	 * ------------------------------------------------------------------------
18
+	 *
19
+	 * invoice_settings_header_gateway
20
+	 *
21
+	 * @package			Event Espresso
22
+	 * @subpackage
23
+	 * @author				Mike Nelson
24
+	 *
25
+	 * ------------------------------------------------------------------------
26
+	 */
27 27
 ?>
28 28
 	<tr>
29 29
 		<th><h3><?php _e("Invoice Gateway Settings", 'event_espresso');?></h3></th>
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@
 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 7
  * Event Espresso
7 8
  *
Please login to merge, or discard this patch.
Invoice/templates/invoice_settings_header_display.template.php 3 patches
Spacing   +3 added lines, -3 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
  * Event Espresso
@@ -26,9 +26,9 @@  discard block
 block discarded – undo
26 26
  */
27 27
 ?>
28 28
 	<tr>
29
-		<th><h3><?php _e("Invoice Display Settings", 'event_espresso');?></h3></th>
29
+		<th><h3><?php _e("Invoice Display Settings", 'event_espresso'); ?></h3></th>
30 30
 		<td>
31
-			<span class="description"><?php _e("The following settings affect the content and/or appearance of the downloadable PDF invoice.", 'event_espresso');?></span>
31
+			<span class="description"><?php _e("The following settings affect the content and/or appearance of the downloadable PDF invoice.", 'event_espresso'); ?></span>
32 32
 		</td>
33 33
 	</tr>
34 34
 <?php
Please login to merge, or discard this patch.
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -3,27 +3,27 @@
 block discarded – undo
3 3
 if (!defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('No direct script access allowed');
5 5
 /**
6
- * Event Espresso
7
- *
8
- * Event Registration and Management Plugin for WordPress
9
- *
10
- * @ package			Event Espresso
11
- * @ author			Seth Shoultes
12
- * @ copyright		(c) 2008-2011 Event Espresso  All Rights Reserved.
13
- * @ license			http://eventespresso.com/support/terms-conditions/   * see Plugin Licensing *
14
- * @ link					http://www.eventespresso.com
15
- * @ version		 	4.3
16
- *
17
- * ------------------------------------------------------------------------
18
- *
19
- * invoice_settings_header_display
20
- *
21
- * @package			Event Espresso
22
- * @subpackage
23
- * @author				Mike Nelson
24
- *
25
- * ------------------------------------------------------------------------
26
- */
6
+	 * Event Espresso
7
+	 *
8
+	 * Event Registration and Management Plugin for WordPress
9
+	 *
10
+	 * @ package			Event Espresso
11
+	 * @ author			Seth Shoultes
12
+	 * @ copyright		(c) 2008-2011 Event Espresso  All Rights Reserved.
13
+	 * @ license			http://eventespresso.com/support/terms-conditions/   * see Plugin Licensing *
14
+	 * @ link					http://www.eventespresso.com
15
+	 * @ version		 	4.3
16
+	 *
17
+	 * ------------------------------------------------------------------------
18
+	 *
19
+	 * invoice_settings_header_display
20
+	 *
21
+	 * @package			Event Espresso
22
+	 * @subpackage
23
+	 * @author				Mike Nelson
24
+	 *
25
+	 * ------------------------------------------------------------------------
26
+	 */
27 27
 ?>
28 28
 	<tr>
29 29
 		<th><h3><?php _e("Invoice Display Settings", 'event_espresso');?></h3></th>
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@
 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 7
  * Event Espresso
7 8
  *
Please login to merge, or discard this patch.
core/libraries/messages/EE_Message_To_Generate.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -200,7 +200,7 @@
 block discarded – undo
200 200
 	 * generates an EE_Message using the supplied arguments and some defaults
201 201
 	 *
202 202
 	 * @param array $properties
203
-	 * @return string
203
+	 * @return EE_Message
204 204
 	 */
205 205
 	protected function _generate_message( $properties = array() ) {
206 206
 		$message = EE_Message_Factory::create(
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -105,14 +105,14 @@  discard block
 block discarded – undo
105 105
 	public function __construct(
106 106
 		$messenger_name,
107 107
 		$message_type_name,
108
-		$data 	 = array(),
108
+		$data = array(),
109 109
 		$context = '',
110 110
 		$preview = false,
111 111
 		$status  = EEM_Message::status_incomplete
112 112
 	) {
113
-		$this->_messenger_name 		= $messenger_name;
114
-		$this->_message_type_name 	= $message_type_name;
115
-		$this->_data 				= is_array( $data ) ? $data : array( $data );
113
+		$this->_messenger_name = $messenger_name;
114
+		$this->_message_type_name = $message_type_name;
115
+		$this->_data = is_array($data) ? $data : array($data);
116 116
 		$this->_context 			= $context;
117 117
 		$this->_preview 			= $preview;
118 118
 		$this->_status 				= $status;
@@ -170,8 +170,8 @@  discard block
 block discarded – undo
170 170
 	/**
171 171
 	 * @param boolean $preview
172 172
 	 */
173
-	public function set_preview( $preview ) {
174
-		$this->_preview = filter_var( $preview, FILTER_VALIDATE_BOOLEAN );
173
+	public function set_preview($preview) {
174
+		$this->_preview = filter_var($preview, FILTER_VALIDATE_BOOLEAN);
175 175
 	}
176 176
 
177 177
 
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 	 * @param array $properties
203 203
 	 * @return string
204 204
 	 */
205
-	protected function _generate_message( $properties = array() ) {
205
+	protected function _generate_message($properties = array()) {
206 206
 		$message = EE_Message_Factory::create(
207 207
 			array_merge(
208 208
 				array(
@@ -216,12 +216,12 @@  discard block
 block discarded – undo
216 216
 		);
217 217
 		// validate the message, and if it's good, set some properties
218 218
 		try {
219
-			$message->is_valid_for_sending_or_generation( true );
219
+			$message->is_valid_for_sending_or_generation(true);
220 220
 			$this->_valid = true;
221 221
 			$this->_messenger = $message->messenger_object();
222 222
 			$this->_message_type = $message->message_type_object();
223 223
 			$this->_send_now = $message->send_now();
224
-		} catch ( Exception $e ) {
224
+		} catch (Exception $e) {
225 225
 			$this->_valid = false;
226 226
 			$this->_error_msg[] = $e->getMessage();
227 227
 		}
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 	 */
238 238
 	public function get_EE_Message() {
239 239
 		// already set ?
240
-		if ( $this->_message instanceof EE_Message ) {
240
+		if ($this->_message instanceof EE_Message) {
241 241
 			return $this->_message;
242 242
 		}
243 243
 		// no? then let's create one
@@ -255,15 +255,15 @@  discard block
 block discarded – undo
255 255
 	 * @param   bool    $preview    Used to indicate that the preview data handler is to be returned.
256 256
 	 * @return  string
257 257
 	 */
258
-	public function get_data_handler_class_name( $preview = false ) {
259
-		if ( $this->_data_handler_class_name === '' && $this->valid() ) {
260
-			$ref = $preview ? 'Preview' : $this->_message_type->get_data_handler( $this->_data );
258
+	public function get_data_handler_class_name($preview = false) {
259
+		if ($this->_data_handler_class_name === '' && $this->valid()) {
260
+			$ref = $preview ? 'Preview' : $this->_message_type->get_data_handler($this->_data);
261 261
 			//make sure internal data is updated.
262 262
 			$this->_data = $this->_message_type->get_data();
263 263
 
264 264
 			//verify
265
-			$this->_data_handler_class_name = EE_Message_To_Generate::verify_and_retrieve_class_name_for_data_handler_reference( $ref );
266
-			if ( $this->_data_handler_class_name === '' ) {
265
+			$this->_data_handler_class_name = EE_Message_To_Generate::verify_and_retrieve_class_name_for_data_handler_reference($ref);
266
+			if ($this->_data_handler_class_name === '') {
267 267
 				$this->_valid = false;
268 268
 			}
269 269
 		}
@@ -279,9 +279,9 @@  discard block
 block discarded – undo
279 279
 	 * @param string $data_handler_reference
280 280
 	 * @return string
281 281
 	 */
282
-	public static function verify_and_retrieve_class_name_for_data_handler_reference( $data_handler_reference ) {
283
-		$class_name = 'EE_Messages_' . $data_handler_reference . '_incoming_data';
284
-		if ( ! class_exists( $class_name ) ) {
282
+	public static function verify_and_retrieve_class_name_for_data_handler_reference($data_handler_reference) {
283
+		$class_name = 'EE_Messages_'.$data_handler_reference.'_incoming_data';
284
+		if ( ! class_exists($class_name)) {
285 285
 			EE_Error::add_error(
286 286
 				sprintf(
287 287
 					__(
Please login to merge, or discard this patch.
validators/email/EE_Messages_Email_Pending_Approval_Validator.class.php 2 patches
Spacing   +5 added lines, -5 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
 /**
@@ -30,11 +30,11 @@  discard block
 block discarded – undo
30 30
 class EE_Messages_Email_Pending_Approval_Validator extends EE_Messages_Validator {
31 31
 
32 32
 
33
-	public function __construct( $fields, $context ) {
33
+	public function __construct($fields, $context) {
34 34
 		$this->_m_name = 'email';
35 35
 		$this->_mt_name = 'pending_approval';
36 36
 
37
-		parent::__construct( $fields, $context );
37
+		parent::__construct($fields, $context);
38 38
 	}
39 39
 
40 40
 	/**
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
 			'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'),
48 48
 			'required' => array('[EVENT_LIST]')
49 49
 			);
50
-		$this->_messenger->set_validator_config( $new_config );
50
+		$this->_messenger->set_validator_config($new_config);
51 51
 
52
-		if ( $this->_context != 'admin' )
52
+		if ($this->_context != 'admin')
53 53
 			$this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
54 54
 
55 55
 		$this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
Please login to merge, or discard this patch.
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@  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 7
 /**
7 8
  * Event Espresso
@@ -55,8 +56,9 @@  discard block
 block discarded – undo
55 56
 			);
56 57
 		$this->_messenger->set_validator_config( $new_config );
57 58
 
58
-		if ( $this->_context != 'admin' )
59
-			$this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
59
+		if ( $this->_context != 'admin' ) {
60
+					$this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
61
+		}
60 62
 
61 63
 		$this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
62 64
 	}
Please login to merge, or discard this patch.
email/EE_Messages_Email_Not_Approved_Registration_Validator.class.php 2 patches
Spacing   +5 added lines, -5 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
 /**
@@ -30,11 +30,11 @@  discard block
 block discarded – undo
30 30
 class EE_Messages_Email_Not_Approved_Registration_Validator extends EE_Messages_Validator {
31 31
 
32 32
 
33
-	public function __construct( $fields, $context ) {
33
+	public function __construct($fields, $context) {
34 34
 		$this->_m_name = 'email';
35 35
 		$this->_mt_name = 'not_approved_registration';
36 36
 
37
-		parent::__construct( $fields, $context );
37
+		parent::__construct($fields, $context);
38 38
 	}
39 39
 
40 40
 	/**
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
 			'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'),
47 47
 			'required' => array('[EVENT_LIST]')
48 48
 			);
49
-		$this->_messenger->set_validator_config( $new_config );
49
+		$this->_messenger->set_validator_config($new_config);
50 50
 
51
-		if ( $this->_context != 'admin' )
51
+		if ($this->_context != 'admin')
52 52
 			$this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
53 53
 
54 54
 		$this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
Please login to merge, or discard this patch.
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@  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 7
 /**
7 8
  * Event Espresso
@@ -55,8 +56,9 @@  discard block
 block discarded – undo
55 56
 			);
56 57
 		$this->_messenger->set_validator_config( $new_config );
57 58
 
58
-		if ( $this->_context != 'admin' )
59
-			$this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
59
+		if ( $this->_context != 'admin' ) {
60
+					$this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
61
+		}
60 62
 
61 63
 		$this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
62 64
 	}
Please login to merge, or discard this patch.