@@ -18,52 +18,52 @@ |
||
18 | 18 | * and/or use any of the template tags functions found in: |
19 | 19 | * \wp-content\plugins\event-espresso-core\public\template_tags.php |
20 | 20 | ************************** IMPORTANT **************************/ |
21 | -add_filter( 'FHEE__content_espresso_events__template_loaded', '__return_true' ); |
|
21 | +add_filter('FHEE__content_espresso_events__template_loaded', '__return_true'); |
|
22 | 22 | |
23 | 23 | //echo '<br/><h6 style="color:#2EA2CC;">'. __FILE__ . ' <span style="font-weight:normal;color:#E76700"> Line #: ' . __LINE__ . '</span></h6>'; |
24 | 24 | |
25 | 25 | global $post; |
26 | -$event_class = has_excerpt( $post->ID ) ? ' has-excerpt' : ''; |
|
27 | -$event_class = apply_filters( 'FHEE__content_espresso_events__event_class', $event_class ); |
|
26 | +$event_class = has_excerpt($post->ID) ? ' has-excerpt' : ''; |
|
27 | +$event_class = apply_filters('FHEE__content_espresso_events__event_class', $event_class); |
|
28 | 28 | ?> |
29 | -<?php do_action( 'AHEE_event_details_before_post', $post ); ?> |
|
30 | -<article id="post-<?php the_ID(); ?>" <?php post_class( $event_class ); ?>> |
|
29 | +<?php do_action('AHEE_event_details_before_post', $post); ?> |
|
30 | +<article id="post-<?php the_ID(); ?>" <?php post_class($event_class); ?>> |
|
31 | 31 | |
32 | -<?php if ( is_single() ) : ?> |
|
32 | +<?php if (is_single()) : ?> |
|
33 | 33 | |
34 | - <div id="espresso-event-header-dv-<?php echo $post->ID;?>" class="espresso-event-header-dv"> |
|
35 | - <?php espresso_get_template_part( 'content', 'espresso_events-thumbnail' ); ?> |
|
36 | - <?php espresso_get_template_part( 'content', 'espresso_events-header' ); ?> |
|
34 | + <div id="espresso-event-header-dv-<?php echo $post->ID; ?>" class="espresso-event-header-dv"> |
|
35 | + <?php espresso_get_template_part('content', 'espresso_events-thumbnail'); ?> |
|
36 | + <?php espresso_get_template_part('content', 'espresso_events-header'); ?> |
|
37 | 37 | </div> |
38 | 38 | |
39 | 39 | <div class="espresso-event-wrapper-dv"> |
40 | - <?php espresso_get_template_part( 'content', 'espresso_events-tickets' ); ?> |
|
41 | - <?php espresso_get_template_part( 'content', 'espresso_events-datetimes' ); ?> |
|
42 | - <?php espresso_get_template_part( 'content', 'espresso_events-details' ); ?> |
|
43 | - <?php espresso_get_template_part( 'content', 'espresso_events-venues' ); ?> |
|
40 | + <?php espresso_get_template_part('content', 'espresso_events-tickets'); ?> |
|
41 | + <?php espresso_get_template_part('content', 'espresso_events-datetimes'); ?> |
|
42 | + <?php espresso_get_template_part('content', 'espresso_events-details'); ?> |
|
43 | + <?php espresso_get_template_part('content', 'espresso_events-venues'); ?> |
|
44 | 44 | <footer class="event-meta"> |
45 | - <?php do_action( 'AHEE_event_details_footer_top', $post ); ?> |
|
46 | - <?php do_action( 'AHEE_event_details_footer_bottom', $post ); ?> |
|
45 | + <?php do_action('AHEE_event_details_footer_top', $post); ?> |
|
46 | + <?php do_action('AHEE_event_details_footer_bottom', $post); ?> |
|
47 | 47 | </footer> |
48 | 48 | </div> |
49 | 49 | |
50 | -<?php elseif ( is_archive() ) : ?> |
|
50 | +<?php elseif (is_archive()) : ?> |
|
51 | 51 | |
52 | - <div id="espresso-event-list-header-dv-<?php echo $post->ID;?>" class="espresso-event-header-dv"> |
|
53 | - <?php espresso_get_template_part( 'content', 'espresso_events-thumbnail' ); ?> |
|
54 | - <?php espresso_get_template_part( 'content', 'espresso_events-header' ); ?> |
|
52 | + <div id="espresso-event-list-header-dv-<?php echo $post->ID; ?>" class="espresso-event-header-dv"> |
|
53 | + <?php espresso_get_template_part('content', 'espresso_events-thumbnail'); ?> |
|
54 | + <?php espresso_get_template_part('content', 'espresso_events-header'); ?> |
|
55 | 55 | </div> |
56 | 56 | |
57 | 57 | <div class="espresso-event-list-wrapper-dv"> |
58 | - <?php espresso_get_template_part( 'content', 'espresso_events-tickets' ); ?> |
|
59 | - <?php espresso_get_template_part( 'content', 'espresso_events-datetimes' ); ?> |
|
60 | - <?php espresso_get_template_part( 'content', 'espresso_events-details' ); ?> |
|
61 | - <?php espresso_get_template_part( 'content', 'espresso_events-venues' ); ?> |
|
58 | + <?php espresso_get_template_part('content', 'espresso_events-tickets'); ?> |
|
59 | + <?php espresso_get_template_part('content', 'espresso_events-datetimes'); ?> |
|
60 | + <?php espresso_get_template_part('content', 'espresso_events-details'); ?> |
|
61 | + <?php espresso_get_template_part('content', 'espresso_events-venues'); ?> |
|
62 | 62 | </div> |
63 | 63 | |
64 | 64 | <?php endif; ?> |
65 | 65 | |
66 | 66 | </article> |
67 | 67 | <!-- #post --> |
68 | -<?php do_action( 'AHEE_event_details_after_post', $post ); |
|
68 | +<?php do_action('AHEE_event_details_after_post', $post); |
|
69 | 69 |
@@ -34,37 +34,37 @@ |
||
34 | 34 | */ |
35 | 35 | class Post implements RequestMethod |
36 | 36 | { |
37 | - /** |
|
38 | - * URL to which requests are POSTed. |
|
39 | - * @const string |
|
40 | - */ |
|
41 | - const SITE_VERIFY_URL = 'https://www.google.com/recaptcha/api/siteverify'; |
|
37 | + /** |
|
38 | + * URL to which requests are POSTed. |
|
39 | + * @const string |
|
40 | + */ |
|
41 | + const SITE_VERIFY_URL = 'https://www.google.com/recaptcha/api/siteverify'; |
|
42 | 42 | |
43 | - /** |
|
44 | - * Submit the POST request with the specified parameters. |
|
45 | - * |
|
46 | - * @param RequestParameters $params Request parameters |
|
47 | - * @return string Body of the reCAPTCHA response |
|
48 | - */ |
|
49 | - public function submit(RequestParameters $params) |
|
50 | - { |
|
51 | - /** |
|
52 | - * PHP 5.6.0 changed the way you specify the peer name for SSL context options. |
|
53 | - * Using "CN_name" will still work, but it will raise deprecated errors. |
|
54 | - */ |
|
55 | - $peer_key = version_compare(PHP_VERSION, '5.6.0', '<') ? 'CN_name' : 'peer_name'; |
|
56 | - $options = array( |
|
57 | - 'http' => array( |
|
58 | - 'header' => "Content-type: application/x-www-form-urlencoded\r\n", |
|
59 | - 'method' => 'POST', |
|
60 | - 'content' => $params->toQueryString(), |
|
61 | - // Force the peer to validate (not needed in 5.6.0+, but still works |
|
62 | - 'verify_peer' => true, |
|
63 | - // Force the peer validation to use www.google.com |
|
64 | - $peer_key => 'www.google.com', |
|
65 | - ), |
|
66 | - ); |
|
67 | - $context = stream_context_create($options); |
|
68 | - return file_get_contents(self::SITE_VERIFY_URL, false, $context); |
|
69 | - } |
|
43 | + /** |
|
44 | + * Submit the POST request with the specified parameters. |
|
45 | + * |
|
46 | + * @param RequestParameters $params Request parameters |
|
47 | + * @return string Body of the reCAPTCHA response |
|
48 | + */ |
|
49 | + public function submit(RequestParameters $params) |
|
50 | + { |
|
51 | + /** |
|
52 | + * PHP 5.6.0 changed the way you specify the peer name for SSL context options. |
|
53 | + * Using "CN_name" will still work, but it will raise deprecated errors. |
|
54 | + */ |
|
55 | + $peer_key = version_compare(PHP_VERSION, '5.6.0', '<') ? 'CN_name' : 'peer_name'; |
|
56 | + $options = array( |
|
57 | + 'http' => array( |
|
58 | + 'header' => "Content-type: application/x-www-form-urlencoded\r\n", |
|
59 | + 'method' => 'POST', |
|
60 | + 'content' => $params->toQueryString(), |
|
61 | + // Force the peer to validate (not needed in 5.6.0+, but still works |
|
62 | + 'verify_peer' => true, |
|
63 | + // Force the peer validation to use www.google.com |
|
64 | + $peer_key => 'www.google.com', |
|
65 | + ), |
|
66 | + ); |
|
67 | + $context = stream_context_create($options); |
|
68 | + return file_get_contents(self::SITE_VERIFY_URL, false, $context); |
|
69 | + } |
|
70 | 70 | } |
@@ -32,11 +32,11 @@ |
||
32 | 32 | interface RequestMethod |
33 | 33 | { |
34 | 34 | |
35 | - /** |
|
36 | - * Submit the request with the specified parameters. |
|
37 | - * |
|
38 | - * @param RequestParameters $params Request parameters |
|
39 | - * @return string Body of the reCAPTCHA response |
|
40 | - */ |
|
41 | - public function submit(RequestParameters $params); |
|
35 | + /** |
|
36 | + * Submit the request with the specified parameters. |
|
37 | + * |
|
38 | + * @param RequestParameters $params Request parameters |
|
39 | + * @return string Body of the reCAPTCHA response |
|
40 | + */ |
|
41 | + public function submit(RequestParameters $params); |
|
42 | 42 | } |
@@ -20,13 +20,13 @@ |
||
20 | 20 | { |
21 | 21 | |
22 | 22 | |
23 | - /** |
|
24 | - * @return string |
|
25 | - */ |
|
26 | - public function capability() |
|
27 | - { |
|
28 | - return ''; |
|
29 | - } |
|
23 | + /** |
|
24 | + * @return string |
|
25 | + */ |
|
26 | + public function capability() |
|
27 | + { |
|
28 | + return ''; |
|
29 | + } |
|
30 | 30 | |
31 | 31 | |
32 | 32 | } |
@@ -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 |
@@ -70,10 +70,10 @@ |
||
70 | 70 | $model_names = array(); |
71 | 71 | if (is_array($this->_model_name_pointed_to)) { |
72 | 72 | foreach ($this->_model_name_pointed_to as $model_name) { |
73 | - $model_names[] = "EE_" . $model_name; |
|
73 | + $model_names[] = "EE_".$model_name; |
|
74 | 74 | } |
75 | 75 | } else { |
76 | - $model_names = array("EE_" . $this->_model_name_pointed_to); |
|
76 | + $model_names = array("EE_".$this->_model_name_pointed_to); |
|
77 | 77 | } |
78 | 78 | return $model_names; |
79 | 79 | } |
@@ -8,89 +8,89 @@ |
||
8 | 8 | */ |
9 | 9 | abstract class EE_Field_With_Model_Name extends EE_Model_Field_Base |
10 | 10 | { |
11 | - /** |
|
12 | - * Usually the name of a single model. However, as in the case for custom post types, |
|
13 | - * it can actually be an array of models |
|
14 | - * |
|
15 | - * @var string or array |
|
16 | - */ |
|
17 | - protected $_model_name_pointed_to; |
|
11 | + /** |
|
12 | + * Usually the name of a single model. However, as in the case for custom post types, |
|
13 | + * it can actually be an array of models |
|
14 | + * |
|
15 | + * @var string or array |
|
16 | + */ |
|
17 | + protected $_model_name_pointed_to; |
|
18 | 18 | |
19 | - /** |
|
20 | - * @param string $table_column name fo column for field |
|
21 | - * @param string $nicename should eb internationalized with esc_html__('blah','event_espresso') |
|
22 | - * @param boolean $nullable |
|
23 | - * @param mixed $default_value if this is a integer field, it shoudl be an int. if it's a string field, it shoul |
|
24 | - * dbe a string |
|
25 | - * @param string|string[] $model_name eg 'Event','Answer','Term', etc. Basically its the model class's name |
|
26 | - * without the |
|
27 | - * "EEM_" |
|
28 | - */ |
|
29 | - public function __construct($table_column, $nicename, $nullable, $default_value, $model_name) |
|
30 | - { |
|
31 | - $this->_model_name_pointed_to = $model_name; |
|
32 | - parent::__construct($table_column, $nicename, $nullable, $default_value); |
|
33 | - } |
|
19 | + /** |
|
20 | + * @param string $table_column name fo column for field |
|
21 | + * @param string $nicename should eb internationalized with esc_html__('blah','event_espresso') |
|
22 | + * @param boolean $nullable |
|
23 | + * @param mixed $default_value if this is a integer field, it shoudl be an int. if it's a string field, it shoul |
|
24 | + * dbe a string |
|
25 | + * @param string|string[] $model_name eg 'Event','Answer','Term', etc. Basically its the model class's name |
|
26 | + * without the |
|
27 | + * "EEM_" |
|
28 | + */ |
|
29 | + public function __construct($table_column, $nicename, $nullable, $default_value, $model_name) |
|
30 | + { |
|
31 | + $this->_model_name_pointed_to = $model_name; |
|
32 | + parent::__construct($table_column, $nicename, $nullable, $default_value); |
|
33 | + } |
|
34 | 34 | |
35 | - /** |
|
36 | - * Returns the name of the model(s) pointed to |
|
37 | - * |
|
38 | - * @deprecated since version 4.6.7 |
|
39 | - * @return mixed string or array of strings |
|
40 | - */ |
|
41 | - public function get_model_name_pointed_to() |
|
42 | - { |
|
43 | - EE_Error::doing_it_wrong( |
|
44 | - 'get_model_name_pointed_to', |
|
45 | - esc_html__( |
|
46 | - 'This method has been deprecated in favour of instead using get_model_names_pointed_to, which consistently returns an array', |
|
47 | - 'event_espresso' |
|
48 | - ), |
|
49 | - '4.6.7' |
|
50 | - ); |
|
51 | - return $this->_model_name_pointed_to; |
|
52 | - } |
|
35 | + /** |
|
36 | + * Returns the name of the model(s) pointed to |
|
37 | + * |
|
38 | + * @deprecated since version 4.6.7 |
|
39 | + * @return mixed string or array of strings |
|
40 | + */ |
|
41 | + public function get_model_name_pointed_to() |
|
42 | + { |
|
43 | + EE_Error::doing_it_wrong( |
|
44 | + 'get_model_name_pointed_to', |
|
45 | + esc_html__( |
|
46 | + 'This method has been deprecated in favour of instead using get_model_names_pointed_to, which consistently returns an array', |
|
47 | + 'event_espresso' |
|
48 | + ), |
|
49 | + '4.6.7' |
|
50 | + ); |
|
51 | + return $this->_model_name_pointed_to; |
|
52 | + } |
|
53 | 53 | |
54 | - /** |
|
55 | - * Gets the model names pointed to by this field, always as an array |
|
56 | - * (even if there's only one) |
|
57 | - * |
|
58 | - * @return array of model names pointed to by this field |
|
59 | - */ |
|
60 | - public function get_model_names_pointed_to() |
|
61 | - { |
|
62 | - if (is_array($this->_model_name_pointed_to)) { |
|
63 | - return $this->_model_name_pointed_to; |
|
64 | - } else { |
|
65 | - return array($this->_model_name_pointed_to); |
|
66 | - } |
|
67 | - } |
|
54 | + /** |
|
55 | + * Gets the model names pointed to by this field, always as an array |
|
56 | + * (even if there's only one) |
|
57 | + * |
|
58 | + * @return array of model names pointed to by this field |
|
59 | + */ |
|
60 | + public function get_model_names_pointed_to() |
|
61 | + { |
|
62 | + if (is_array($this->_model_name_pointed_to)) { |
|
63 | + return $this->_model_name_pointed_to; |
|
64 | + } else { |
|
65 | + return array($this->_model_name_pointed_to); |
|
66 | + } |
|
67 | + } |
|
68 | 68 | |
69 | - /** |
|
70 | - * Returns the model's classname (eg EE_Event instead of just Event) |
|
71 | - * |
|
72 | - * @return array |
|
73 | - */ |
|
74 | - public function get_model_class_names_pointed_to() |
|
75 | - { |
|
76 | - $model_names = array(); |
|
77 | - if (is_array($this->_model_name_pointed_to)) { |
|
78 | - foreach ($this->_model_name_pointed_to as $model_name) { |
|
79 | - $model_names[] = "EE_" . $model_name; |
|
80 | - } |
|
81 | - } else { |
|
82 | - $model_names = array("EE_" . $this->_model_name_pointed_to); |
|
83 | - } |
|
84 | - return $model_names; |
|
85 | - } |
|
69 | + /** |
|
70 | + * Returns the model's classname (eg EE_Event instead of just Event) |
|
71 | + * |
|
72 | + * @return array |
|
73 | + */ |
|
74 | + public function get_model_class_names_pointed_to() |
|
75 | + { |
|
76 | + $model_names = array(); |
|
77 | + if (is_array($this->_model_name_pointed_to)) { |
|
78 | + foreach ($this->_model_name_pointed_to as $model_name) { |
|
79 | + $model_names[] = "EE_" . $model_name; |
|
80 | + } |
|
81 | + } else { |
|
82 | + $model_names = array("EE_" . $this->_model_name_pointed_to); |
|
83 | + } |
|
84 | + return $model_names; |
|
85 | + } |
|
86 | 86 | |
87 | - public function is_model_obj_of_type_pointed_to($model_obj_or_ID) |
|
88 | - { |
|
89 | - foreach ($this->get_model_class_names_pointed_to() as $model_obj_classname) { |
|
90 | - if ($model_obj_or_ID instanceof $model_obj_classname) { |
|
91 | - return true; |
|
92 | - } |
|
93 | - } |
|
94 | - return false; |
|
95 | - } |
|
87 | + public function is_model_obj_of_type_pointed_to($model_obj_or_ID) |
|
88 | + { |
|
89 | + foreach ($this->get_model_class_names_pointed_to() as $model_obj_classname) { |
|
90 | + if ($model_obj_or_ID instanceof $model_obj_classname) { |
|
91 | + return true; |
|
92 | + } |
|
93 | + } |
|
94 | + return false; |
|
95 | + } |
|
96 | 96 | } |
@@ -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 | } |
@@ -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 |