@@ -8,9 +8,9 @@ discard block |
||
8 | 8 | * @param $class_file |
9 | 9 | * @return array |
10 | 10 | */ |
11 | -function espresso_invoice_template_files( $class_file) { |
|
11 | +function espresso_invoice_template_files($class_file) { |
|
12 | 12 | // read our template dir and build an array of files |
13 | - $dhandle = opendir(dirname($class_file) . '/lib/templates/css/'); //If the template files have been moved to the uploads folder |
|
13 | + $dhandle = opendir(dirname($class_file).'/lib/templates/css/'); //If the template files have been moved to the uploads folder |
|
14 | 14 | //} else return FALSE; |
15 | 15 | |
16 | 16 | $files = array(); |
@@ -50,8 +50,8 @@ discard block |
||
50 | 50 | * @param string $selected |
51 | 51 | * @return string |
52 | 52 | */ |
53 | -function espresso_invoice_is_selected( $input_item, $selected='') { |
|
54 | - if ( $input_item === $selected ) { |
|
53 | +function espresso_invoice_is_selected($input_item, $selected = '') { |
|
54 | + if ($input_item === $selected) { |
|
55 | 55 | return 'selected="selected"'; |
56 | 56 | } else { |
57 | 57 | return ''; |
@@ -1,15 +1,15 @@ |
||
1 | 1 | <?php |
2 | 2 | //echo '<br/><h6 style="color:#2EA2CC;">'. __FILE__ . ' <span style="font-weight:normal;color:#E76700"> Line #: ' . __LINE__ . '</span></h6>'; |
3 | 3 | |
4 | -if ( is_single() || ( is_archive() && espresso_display_datetimes_in_event_list() ) ) : |
|
4 | +if (is_single() || (is_archive() && espresso_display_datetimes_in_event_list())) : |
|
5 | 5 | global $post; |
6 | -do_action( 'AHEE_event_details_before_event_date', $post ); |
|
6 | +do_action('AHEE_event_details_before_event_date', $post); |
|
7 | 7 | ?> |
8 | 8 | <div class="event-datetimes"> |
9 | - <?php espresso_list_of_event_dates( $post->ID );?> |
|
9 | + <?php espresso_list_of_event_dates($post->ID); ?> |
|
10 | 10 | </div> |
11 | 11 | <!-- .event-datetimes --> |
12 | 12 | <?php |
13 | -do_action( 'AHEE_event_details_after_event_date', $post ); |
|
13 | +do_action('AHEE_event_details_after_event_date', $post); |
|
14 | 14 | endif; |
15 | 15 | ?> |
16 | 16 | \ No newline at end of file |
@@ -19,7 +19,7 @@ |
||
19 | 19 | public function __construct($table_column, $nicename, $nullable, $default_value = null) |
20 | 20 | { |
21 | 21 | parent::__construct($table_column, $nicename, $nullable, $default_value); |
22 | - $this->setSchemaType(array('object','string')); |
|
22 | + $this->setSchemaType(array('object', 'string')); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 |
@@ -9,72 +9,72 @@ |
||
9 | 9 | class EE_Serialized_Text_Field extends EE_Text_Field_Base |
10 | 10 | { |
11 | 11 | |
12 | - /** |
|
13 | - * @param string $table_column |
|
14 | - * @param string $nicename |
|
15 | - * @param bool $nullable |
|
16 | - * @param null $default_value |
|
17 | - */ |
|
18 | - public function __construct($table_column, $nicename, $nullable, $default_value = null) |
|
19 | - { |
|
20 | - parent::__construct($table_column, $nicename, $nullable, $default_value); |
|
21 | - $this->setSchemaType(array('object','string')); |
|
22 | - } |
|
12 | + /** |
|
13 | + * @param string $table_column |
|
14 | + * @param string $nicename |
|
15 | + * @param bool $nullable |
|
16 | + * @param null $default_value |
|
17 | + */ |
|
18 | + public function __construct($table_column, $nicename, $nullable, $default_value = null) |
|
19 | + { |
|
20 | + parent::__construct($table_column, $nicename, $nullable, $default_value); |
|
21 | + $this->setSchemaType(array('object','string')); |
|
22 | + } |
|
23 | 23 | |
24 | 24 | |
25 | - /** |
|
26 | - * Value SHOULD be an array, and we want to now convert it to a serialized string |
|
27 | - * |
|
28 | - * @param array $value_of_field_on_model_object |
|
29 | - * @return string |
|
30 | - */ |
|
31 | - public function prepare_for_use_in_db($value_of_field_on_model_object) |
|
32 | - { |
|
33 | - return maybe_serialize($value_of_field_on_model_object); |
|
34 | - } |
|
25 | + /** |
|
26 | + * Value SHOULD be an array, and we want to now convert it to a serialized string |
|
27 | + * |
|
28 | + * @param array $value_of_field_on_model_object |
|
29 | + * @return string |
|
30 | + */ |
|
31 | + public function prepare_for_use_in_db($value_of_field_on_model_object) |
|
32 | + { |
|
33 | + return maybe_serialize($value_of_field_on_model_object); |
|
34 | + } |
|
35 | 35 | |
36 | - public function prepare_for_set($value_inputted_for_field_on_model_object) |
|
37 | - { |
|
38 | - $value_inputted_for_field_on_model_object = EEH_Array::maybe_unserialize($value_inputted_for_field_on_model_object); |
|
39 | - if (is_string($value_inputted_for_field_on_model_object)) { |
|
40 | - return parent::prepare_for_set($value_inputted_for_field_on_model_object); |
|
41 | - } elseif (is_array($value_inputted_for_field_on_model_object)) { |
|
42 | - return array_map(array($this, 'prepare_for_set'), $value_inputted_for_field_on_model_object); |
|
43 | - } else {// so they passed NULL or an INT or something wack |
|
44 | - return $value_inputted_for_field_on_model_object; |
|
45 | - } |
|
46 | - } |
|
36 | + public function prepare_for_set($value_inputted_for_field_on_model_object) |
|
37 | + { |
|
38 | + $value_inputted_for_field_on_model_object = EEH_Array::maybe_unserialize($value_inputted_for_field_on_model_object); |
|
39 | + if (is_string($value_inputted_for_field_on_model_object)) { |
|
40 | + return parent::prepare_for_set($value_inputted_for_field_on_model_object); |
|
41 | + } elseif (is_array($value_inputted_for_field_on_model_object)) { |
|
42 | + return array_map(array($this, 'prepare_for_set'), $value_inputted_for_field_on_model_object); |
|
43 | + } else {// so they passed NULL or an INT or something wack |
|
44 | + return $value_inputted_for_field_on_model_object; |
|
45 | + } |
|
46 | + } |
|
47 | 47 | |
48 | - /** |
|
49 | - * Value provided should definetely be a serialized string. We should unserialize into an array |
|
50 | - * |
|
51 | - * @param string $value_found_in_db_for_model_object |
|
52 | - * @return array |
|
53 | - */ |
|
54 | - public function prepare_for_set_from_db($value_found_in_db_for_model_object) |
|
55 | - { |
|
56 | - return EEH_Array::maybe_unserialize($value_found_in_db_for_model_object); |
|
57 | - } |
|
48 | + /** |
|
49 | + * Value provided should definetely be a serialized string. We should unserialize into an array |
|
50 | + * |
|
51 | + * @param string $value_found_in_db_for_model_object |
|
52 | + * @return array |
|
53 | + */ |
|
54 | + public function prepare_for_set_from_db($value_found_in_db_for_model_object) |
|
55 | + { |
|
56 | + return EEH_Array::maybe_unserialize($value_found_in_db_for_model_object); |
|
57 | + } |
|
58 | 58 | |
59 | - /** |
|
60 | - * Gets a string representation of the array |
|
61 | - * |
|
62 | - * @param type $value_on_field_to_be_outputted |
|
63 | - * @param string $schema , possible values are ',', others can be added |
|
64 | - * @return string |
|
65 | - */ |
|
66 | - public function prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema = null) |
|
67 | - { |
|
68 | - switch ($schema) { |
|
69 | - case 'print_r': |
|
70 | - $pretty_value = print_r($value_on_field_to_be_outputted, true); |
|
71 | - break; |
|
72 | - case 'as_table': |
|
73 | - $pretty_value = EEH_Template::layout_array_as_table($value_on_field_to_be_outputted); |
|
74 | - break; |
|
75 | - default: |
|
76 | - $pretty_value = implode(", ", $value_on_field_to_be_outputted); |
|
77 | - } |
|
78 | - return $pretty_value; |
|
79 | - } |
|
59 | + /** |
|
60 | + * Gets a string representation of the array |
|
61 | + * |
|
62 | + * @param type $value_on_field_to_be_outputted |
|
63 | + * @param string $schema , possible values are ',', others can be added |
|
64 | + * @return string |
|
65 | + */ |
|
66 | + public function prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema = null) |
|
67 | + { |
|
68 | + switch ($schema) { |
|
69 | + case 'print_r': |
|
70 | + $pretty_value = print_r($value_on_field_to_be_outputted, true); |
|
71 | + break; |
|
72 | + case 'as_table': |
|
73 | + $pretty_value = EEH_Template::layout_array_as_table($value_on_field_to_be_outputted); |
|
74 | + break; |
|
75 | + default: |
|
76 | + $pretty_value = implode(", ", $value_on_field_to_be_outputted); |
|
77 | + } |
|
78 | + return $pretty_value; |
|
79 | + } |
|
80 | 80 | } |
@@ -3,16 +3,16 @@ |
||
3 | 3 | |
4 | 4 | class EE_DB_Only_Float_Field extends EE_DB_Only_Field_Base |
5 | 5 | { |
6 | - /** |
|
7 | - * @param string $table_column |
|
8 | - * @param string $nicename |
|
9 | - * @param bool $nullable |
|
10 | - * @param null $default_value |
|
11 | - */ |
|
12 | - public function __construct($table_column, $nicename, $nullable, $default_value = null) |
|
13 | - { |
|
14 | - parent::__construct($table_column, $nicename, $nullable, $default_value); |
|
15 | - $this->setSchemaType('number'); |
|
16 | - } |
|
6 | + /** |
|
7 | + * @param string $table_column |
|
8 | + * @param string $nicename |
|
9 | + * @param bool $nullable |
|
10 | + * @param null $default_value |
|
11 | + */ |
|
12 | + public function __construct($table_column, $nicename, $nullable, $default_value = null) |
|
13 | + { |
|
14 | + parent::__construct($table_column, $nicename, $nullable, $default_value); |
|
15 | + $this->setSchemaType('number'); |
|
16 | + } |
|
17 | 17 | |
18 | 18 | } |
@@ -1,15 +1,15 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | //echo '<br/><h6 style="color:#2EA2CC;">'. __FILE__ . ' <span style="font-weight:normal;color:#E76700"> Line #: ' . __LINE__ . '</span></h6>'; |
3 | 3 | global $post; |
4 | -do_action( 'AHEE_event_details_before_featured_img', $post ); |
|
4 | +do_action('AHEE_event_details_before_featured_img', $post); |
|
5 | 5 | |
6 | -if ( has_post_thumbnail( $post->ID )) : |
|
7 | - if ( $img_ID = get_post_thumbnail_id( $post->ID )) : |
|
8 | - if ( $featured_img = wp_get_attachment_image_src( $img_ID, 'large' )) : |
|
9 | - $caption = esc_attr( get_post( get_post( $img_ID ))->post_excerpt ); |
|
6 | +if (has_post_thumbnail($post->ID)) : |
|
7 | + if ($img_ID = get_post_thumbnail_id($post->ID)) : |
|
8 | + if ($featured_img = wp_get_attachment_image_src($img_ID, 'large')) : |
|
9 | + $caption = esc_attr(get_post(get_post($img_ID))->post_excerpt); |
|
10 | 10 | ?> |
11 | 11 | <div id="ee-event-img-dv-<?php echo $post->ID; ?>" class="ee-event-img-dv"> |
12 | - <a class="ee-event-img-lnk" href="<?php the_permalink(); ?>"<?php echo \EED_Events_Archive::link_target();?>> |
|
12 | + <a class="ee-event-img-lnk" href="<?php the_permalink(); ?>"<?php echo \EED_Events_Archive::link_target(); ?>> |
|
13 | 13 | <img class="ee-event-img" src="<?php echo $featured_img[0]; ?>" width="<?php echo $featured_img[1]; ?>" height="<?php echo $featured_img[2]; ?>" alt="<?php echo $caption; ?>"/> |
14 | 14 | </a> |
15 | 15 | </div> |
@@ -18,4 +18,4 @@ discard block |
||
18 | 18 | endif; |
19 | 19 | endif; |
20 | 20 | ?> |
21 | -<?php do_action( 'AHEE_event_details_after_featured_img', $post );?> |
|
21 | +<?php do_action('AHEE_event_details_after_featured_img', $post); ?> |
@@ -19,11 +19,11 @@ discard block |
||
19 | 19 | <div id="espresso-event-details-dv" class="" > |
20 | 20 | <?php |
21 | 21 | // Start the Loop. |
22 | - while ( have_posts() ) : the_post(); |
|
22 | + while (have_posts()) : the_post(); |
|
23 | 23 | // Include the post TYPE-specific template for the content. |
24 | - espresso_get_template_part( 'content', 'espresso_events' ); |
|
24 | + espresso_get_template_part('content', 'espresso_events'); |
|
25 | 25 | // If comments are open or we have at least one comment, load up the comment template. |
26 | - if ( comments_open() || get_comments_number() ) { |
|
26 | + if (comments_open() || get_comments_number()) { |
|
27 | 27 | comments_template(); |
28 | 28 | } |
29 | 29 | endwhile; |
@@ -35,6 +35,6 @@ discard block |
||
35 | 35 | </div><!-- #primary --> |
36 | 36 | |
37 | 37 | <?php |
38 | -get_sidebar( 'content' ); |
|
38 | +get_sidebar('content'); |
|
39 | 39 | get_sidebar(); |
40 | 40 | get_footer(); |
41 | 41 | \ No newline at end of file |
@@ -57,7 +57,7 @@ |
||
57 | 57 | public function getCapCheck() |
58 | 58 | { |
59 | 59 | // need cap for non-AJAX admin requests |
60 | - if (! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) { |
|
60 | + if ( ! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) { |
|
61 | 61 | // there's no specific caps for editing/creating transactions, |
62 | 62 | // so that's why we are using ee_edit_registrations |
63 | 63 | return new CapCheck('ee_edit_registrations', 'create_new_transaction'); |
@@ -20,60 +20,60 @@ |
||
20 | 20 | class CreateTransactionCommand extends Command implements CommandRequiresCapCheckInterface |
21 | 21 | { |
22 | 22 | |
23 | - /** |
|
24 | - * @var EE_Checkout $checkout |
|
25 | - */ |
|
26 | - protected $checkout; |
|
23 | + /** |
|
24 | + * @var EE_Checkout $checkout |
|
25 | + */ |
|
26 | + protected $checkout; |
|
27 | 27 | |
28 | - /** |
|
29 | - * @var array $transaction_details |
|
30 | - */ |
|
31 | - protected $transaction_details; |
|
28 | + /** |
|
29 | + * @var array $transaction_details |
|
30 | + */ |
|
31 | + protected $transaction_details; |
|
32 | 32 | |
33 | 33 | |
34 | - /** |
|
35 | - * CreateTransactionCommand constructor. |
|
36 | - * |
|
37 | - * @param EE_Checkout $checkout |
|
38 | - * @param array $transaction_details |
|
39 | - */ |
|
40 | - public function __construct(EE_Checkout $checkout = null, array $transaction_details = array()) |
|
41 | - { |
|
42 | - $this->checkout = $checkout; |
|
43 | - $this->transaction_details = $transaction_details; |
|
44 | - } |
|
34 | + /** |
|
35 | + * CreateTransactionCommand constructor. |
|
36 | + * |
|
37 | + * @param EE_Checkout $checkout |
|
38 | + * @param array $transaction_details |
|
39 | + */ |
|
40 | + public function __construct(EE_Checkout $checkout = null, array $transaction_details = array()) |
|
41 | + { |
|
42 | + $this->checkout = $checkout; |
|
43 | + $this->transaction_details = $transaction_details; |
|
44 | + } |
|
45 | 45 | |
46 | 46 | |
47 | - /** |
|
48 | - * @return CapCheckInterface |
|
49 | - * @throws InvalidDataTypeException |
|
50 | - */ |
|
51 | - public function getCapCheck() |
|
52 | - { |
|
53 | - // need cap for non-AJAX admin requests |
|
54 | - if (! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) { |
|
55 | - // there's no specific caps for editing/creating transactions, |
|
56 | - // so that's why we are using ee_edit_registrations |
|
57 | - return new CapCheck('ee_edit_registrations', 'create_new_transaction'); |
|
58 | - } |
|
59 | - return new PublicCapabilities('', 'create_new_transaction'); |
|
60 | - } |
|
47 | + /** |
|
48 | + * @return CapCheckInterface |
|
49 | + * @throws InvalidDataTypeException |
|
50 | + */ |
|
51 | + public function getCapCheck() |
|
52 | + { |
|
53 | + // need cap for non-AJAX admin requests |
|
54 | + if (! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) { |
|
55 | + // there's no specific caps for editing/creating transactions, |
|
56 | + // so that's why we are using ee_edit_registrations |
|
57 | + return new CapCheck('ee_edit_registrations', 'create_new_transaction'); |
|
58 | + } |
|
59 | + return new PublicCapabilities('', 'create_new_transaction'); |
|
60 | + } |
|
61 | 61 | |
62 | 62 | |
63 | - /** |
|
64 | - * @return EE_Checkout |
|
65 | - */ |
|
66 | - public function checkout() |
|
67 | - { |
|
68 | - return $this->checkout; |
|
69 | - } |
|
63 | + /** |
|
64 | + * @return EE_Checkout |
|
65 | + */ |
|
66 | + public function checkout() |
|
67 | + { |
|
68 | + return $this->checkout; |
|
69 | + } |
|
70 | 70 | |
71 | 71 | |
72 | - /** |
|
73 | - * @return array |
|
74 | - */ |
|
75 | - public function transactionDetails() |
|
76 | - { |
|
77 | - return $this->transaction_details; |
|
78 | - } |
|
72 | + /** |
|
73 | + * @return array |
|
74 | + */ |
|
75 | + public function transactionDetails() |
|
76 | + { |
|
77 | + return $this->transaction_details; |
|
78 | + } |
|
79 | 79 | } |
@@ -81,7 +81,7 @@ |
||
81 | 81 | public function getCapCheck() |
82 | 82 | { |
83 | 83 | // need cap for non-AJAX admin requests |
84 | - if (! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) { |
|
84 | + if ( ! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) { |
|
85 | 85 | return new CapCheck('ee_edit_contacts', 'create_new_contact'); |
86 | 86 | } |
87 | 87 | return new PublicCapabilities('', 'create_new_contact'); |
@@ -20,62 +20,62 @@ |
||
20 | 20 | class CreateAttendeeCommand extends Command implements CommandRequiresCapCheckInterface |
21 | 21 | { |
22 | 22 | |
23 | - /** |
|
24 | - * array of details where keys are names of EEM_Attendee model fields |
|
25 | - * |
|
26 | - * @var array $attendee_details |
|
27 | - */ |
|
28 | - protected $attendee_details; |
|
23 | + /** |
|
24 | + * array of details where keys are names of EEM_Attendee model fields |
|
25 | + * |
|
26 | + * @var array $attendee_details |
|
27 | + */ |
|
28 | + protected $attendee_details; |
|
29 | 29 | |
30 | - /** |
|
31 | - * an existing registration to associate this attendee with |
|
32 | - * |
|
33 | - * @var EE_Registration $registration |
|
34 | - */ |
|
35 | - protected $registration; |
|
30 | + /** |
|
31 | + * an existing registration to associate this attendee with |
|
32 | + * |
|
33 | + * @var EE_Registration $registration |
|
34 | + */ |
|
35 | + protected $registration; |
|
36 | 36 | |
37 | 37 | |
38 | - /** |
|
39 | - * CreateAttendeeCommand constructor. |
|
40 | - * |
|
41 | - * @param array $attendee_details |
|
42 | - * @param EE_Registration $registration |
|
43 | - */ |
|
44 | - public function __construct(array $attendee_details, EE_Registration $registration) |
|
45 | - { |
|
46 | - $this->attendee_details = $attendee_details; |
|
47 | - $this->registration = $registration; |
|
48 | - } |
|
38 | + /** |
|
39 | + * CreateAttendeeCommand constructor. |
|
40 | + * |
|
41 | + * @param array $attendee_details |
|
42 | + * @param EE_Registration $registration |
|
43 | + */ |
|
44 | + public function __construct(array $attendee_details, EE_Registration $registration) |
|
45 | + { |
|
46 | + $this->attendee_details = $attendee_details; |
|
47 | + $this->registration = $registration; |
|
48 | + } |
|
49 | 49 | |
50 | 50 | |
51 | - /** |
|
52 | - * @return array |
|
53 | - */ |
|
54 | - public function attendeeDetails() |
|
55 | - { |
|
56 | - return $this->attendee_details; |
|
57 | - } |
|
51 | + /** |
|
52 | + * @return array |
|
53 | + */ |
|
54 | + public function attendeeDetails() |
|
55 | + { |
|
56 | + return $this->attendee_details; |
|
57 | + } |
|
58 | 58 | |
59 | 59 | |
60 | - /** |
|
61 | - * @return EE_Registration |
|
62 | - */ |
|
63 | - public function registration() |
|
64 | - { |
|
65 | - return $this->registration; |
|
66 | - } |
|
60 | + /** |
|
61 | + * @return EE_Registration |
|
62 | + */ |
|
63 | + public function registration() |
|
64 | + { |
|
65 | + return $this->registration; |
|
66 | + } |
|
67 | 67 | |
68 | 68 | |
69 | - /** |
|
70 | - * @return CapCheckInterface |
|
71 | - * @throws InvalidDataTypeException |
|
72 | - */ |
|
73 | - public function getCapCheck() |
|
74 | - { |
|
75 | - // need cap for non-AJAX admin requests |
|
76 | - if (! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) { |
|
77 | - return new CapCheck('ee_edit_contacts', 'create_new_contact'); |
|
78 | - } |
|
79 | - return new PublicCapabilities('', 'create_new_contact'); |
|
80 | - } |
|
69 | + /** |
|
70 | + * @return CapCheckInterface |
|
71 | + * @throws InvalidDataTypeException |
|
72 | + */ |
|
73 | + public function getCapCheck() |
|
74 | + { |
|
75 | + // need cap for non-AJAX admin requests |
|
76 | + if (! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) { |
|
77 | + return new CapCheck('ee_edit_contacts', 'create_new_contact'); |
|
78 | + } |
|
79 | + return new PublicCapabilities('', 'create_new_contact'); |
|
80 | + } |
|
81 | 81 | } |
@@ -9,12 +9,12 @@ |
||
9 | 9 | interface EEI_Line_Item_Display |
10 | 10 | { |
11 | 11 | |
12 | - /** |
|
13 | - * @param EE_Line_Item $line_item |
|
14 | - * @param array $options |
|
15 | - * @return mixed |
|
16 | - */ |
|
17 | - public function display_line_item(EE_Line_Item $line_item, $options = array()); |
|
12 | + /** |
|
13 | + * @param EE_Line_Item $line_item |
|
14 | + * @param array $options |
|
15 | + * @return mixed |
|
16 | + */ |
|
17 | + public function display_line_item(EE_Line_Item $line_item, $options = array()); |
|
18 | 18 | |
19 | 19 | } |
20 | 20 |