@@ -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 | } |
@@ -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 |
@@ -5,51 +5,51 @@ |
||
5 | 5 | * it does not override any existing definition of the function in WP. |
6 | 6 | */ |
7 | 7 | if ( ! function_exists( 'get_preview_post_link' ) ) { |
8 | - /** |
|
9 | - * Function was added in WordPress 4.4.0 |
|
10 | - * @param null $post |
|
11 | - * @param array $query_args |
|
12 | - * @param string $preview_link |
|
13 | - * @return mixed |
|
14 | - */ |
|
15 | - function get_preview_post_link($post = null, $query_args = array(), $preview_link = '') |
|
16 | - { |
|
17 | - $post = get_post($post); |
|
18 | - if (! $post) { |
|
19 | - return ''; |
|
20 | - } |
|
8 | + /** |
|
9 | + * Function was added in WordPress 4.4.0 |
|
10 | + * @param null $post |
|
11 | + * @param array $query_args |
|
12 | + * @param string $preview_link |
|
13 | + * @return mixed |
|
14 | + */ |
|
15 | + function get_preview_post_link($post = null, $query_args = array(), $preview_link = '') |
|
16 | + { |
|
17 | + $post = get_post($post); |
|
18 | + if (! $post) { |
|
19 | + return ''; |
|
20 | + } |
|
21 | 21 | |
22 | - $post_type_object = get_post_type_object($post->post_type); |
|
23 | - if (is_post_type_viewable($post_type_object)) { |
|
24 | - if (! $preview_link) { |
|
25 | - $preview_link = set_url_scheme(get_permalink($post)); |
|
26 | - } |
|
22 | + $post_type_object = get_post_type_object($post->post_type); |
|
23 | + if (is_post_type_viewable($post_type_object)) { |
|
24 | + if (! $preview_link) { |
|
25 | + $preview_link = set_url_scheme(get_permalink($post)); |
|
26 | + } |
|
27 | 27 | |
28 | - $query_args['preview'] = 'true'; |
|
29 | - $preview_link = add_query_arg($query_args, $preview_link); |
|
30 | - } |
|
28 | + $query_args['preview'] = 'true'; |
|
29 | + $preview_link = add_query_arg($query_args, $preview_link); |
|
30 | + } |
|
31 | 31 | |
32 | - /** |
|
33 | - * Filters the URL used for a post preview. |
|
34 | - * |
|
35 | - * @since 2.0.5 |
|
36 | - * @since 4.0.0 Added the `$post` parameter. |
|
37 | - * @param string $preview_link URL used for the post preview. |
|
38 | - * @param WP_Post $post Post object. |
|
39 | - */ |
|
40 | - return apply_filters('preview_post_link', $preview_link, $post); |
|
41 | - } |
|
32 | + /** |
|
33 | + * Filters the URL used for a post preview. |
|
34 | + * |
|
35 | + * @since 2.0.5 |
|
36 | + * @since 4.0.0 Added the `$post` parameter. |
|
37 | + * @param string $preview_link URL used for the post preview. |
|
38 | + * @param WP_Post $post Post object. |
|
39 | + */ |
|
40 | + return apply_filters('preview_post_link', $preview_link, $post); |
|
41 | + } |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | if ( ! function_exists( 'is_post_type_viewable' ) ) { |
45 | - function is_post_type_viewable( $post_type ) { |
|
46 | - if ( is_scalar( $post_type ) ) { |
|
47 | - $post_type = get_post_type_object( $post_type ); |
|
48 | - if ( ! $post_type ) { |
|
49 | - return false; |
|
50 | - } |
|
51 | - } |
|
45 | + function is_post_type_viewable( $post_type ) { |
|
46 | + if ( is_scalar( $post_type ) ) { |
|
47 | + $post_type = get_post_type_object( $post_type ); |
|
48 | + if ( ! $post_type ) { |
|
49 | + return false; |
|
50 | + } |
|
51 | + } |
|
52 | 52 | |
53 | - return $post_type->publicly_queryable || ( $post_type->_builtin && $post_type->public ); |
|
54 | - } |
|
53 | + return $post_type->publicly_queryable || ( $post_type->_builtin && $post_type->public ); |
|
54 | + } |
|
55 | 55 | } |
56 | 56 | \ No newline at end of file |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | * Note: this file should only be required right before calling the function the shim is for. This is to ensure that |
5 | 5 | * it does not override any existing definition of the function in WP. |
6 | 6 | */ |
7 | -if ( ! function_exists( 'get_preview_post_link' ) ) { |
|
7 | +if ( ! function_exists('get_preview_post_link')) { |
|
8 | 8 | /** |
9 | 9 | * Function was added in WordPress 4.4.0 |
10 | 10 | * @param null $post |
@@ -15,13 +15,13 @@ discard block |
||
15 | 15 | function get_preview_post_link($post = null, $query_args = array(), $preview_link = '') |
16 | 16 | { |
17 | 17 | $post = get_post($post); |
18 | - if (! $post) { |
|
18 | + if ( ! $post) { |
|
19 | 19 | return ''; |
20 | 20 | } |
21 | 21 | |
22 | 22 | $post_type_object = get_post_type_object($post->post_type); |
23 | 23 | if (is_post_type_viewable($post_type_object)) { |
24 | - if (! $preview_link) { |
|
24 | + if ( ! $preview_link) { |
|
25 | 25 | $preview_link = set_url_scheme(get_permalink($post)); |
26 | 26 | } |
27 | 27 | |
@@ -41,15 +41,15 @@ discard block |
||
41 | 41 | } |
42 | 42 | } |
43 | 43 | |
44 | -if ( ! function_exists( 'is_post_type_viewable' ) ) { |
|
45 | - function is_post_type_viewable( $post_type ) { |
|
46 | - if ( is_scalar( $post_type ) ) { |
|
47 | - $post_type = get_post_type_object( $post_type ); |
|
48 | - if ( ! $post_type ) { |
|
44 | +if ( ! function_exists('is_post_type_viewable')) { |
|
45 | + function is_post_type_viewable($post_type) { |
|
46 | + if (is_scalar($post_type)) { |
|
47 | + $post_type = get_post_type_object($post_type); |
|
48 | + if ( ! $post_type) { |
|
49 | 49 | return false; |
50 | 50 | } |
51 | 51 | } |
52 | 52 | |
53 | - return $post_type->publicly_queryable || ( $post_type->_builtin && $post_type->public ); |
|
53 | + return $post_type->publicly_queryable || ($post_type->_builtin && $post_type->public); |
|
54 | 54 | } |
55 | 55 | } |
56 | 56 | \ 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,88 +8,88 @@ |
||
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 __('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 $model_name eg 'Event','Answer','Term', etc. Basically its the model class's name without the |
|
26 | - * "EEM_" |
|
27 | - */ |
|
28 | - public function __construct($table_column, $nicename, $nullable, $default_value, $model_name) |
|
29 | - { |
|
30 | - $this->_model_name_pointed_to = $model_name; |
|
31 | - parent::__construct($table_column, $nicename, $nullable, $default_value); |
|
32 | - } |
|
19 | + /** |
|
20 | + * @param string $table_column name fo column for field |
|
21 | + * @param string $nicename should eb internationalized with __('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 $model_name eg 'Event','Answer','Term', etc. Basically its the model class's name without the |
|
26 | + * "EEM_" |
|
27 | + */ |
|
28 | + public function __construct($table_column, $nicename, $nullable, $default_value, $model_name) |
|
29 | + { |
|
30 | + $this->_model_name_pointed_to = $model_name; |
|
31 | + parent::__construct($table_column, $nicename, $nullable, $default_value); |
|
32 | + } |
|
33 | 33 | |
34 | - /** |
|
35 | - * Returns the name of the model(s) pointed to |
|
36 | - * |
|
37 | - * @deprecated since version 4.6.7 |
|
38 | - * @return mixed string or array of strings |
|
39 | - */ |
|
40 | - public function get_model_name_pointed_to() |
|
41 | - { |
|
42 | - EE_Error::doing_it_wrong( |
|
43 | - 'get_model_name_pointed_to', |
|
44 | - __( |
|
45 | - 'This method has been deprecated in favour of instead using get_model_names_pointed_to, which consistently returns an array', |
|
46 | - 'event_espresso' |
|
47 | - ), |
|
48 | - '4.6.7' |
|
49 | - ); |
|
50 | - return $this->_model_name_pointed_to; |
|
51 | - } |
|
34 | + /** |
|
35 | + * Returns the name of the model(s) pointed to |
|
36 | + * |
|
37 | + * @deprecated since version 4.6.7 |
|
38 | + * @return mixed string or array of strings |
|
39 | + */ |
|
40 | + public function get_model_name_pointed_to() |
|
41 | + { |
|
42 | + EE_Error::doing_it_wrong( |
|
43 | + 'get_model_name_pointed_to', |
|
44 | + __( |
|
45 | + 'This method has been deprecated in favour of instead using get_model_names_pointed_to, which consistently returns an array', |
|
46 | + 'event_espresso' |
|
47 | + ), |
|
48 | + '4.6.7' |
|
49 | + ); |
|
50 | + return $this->_model_name_pointed_to; |
|
51 | + } |
|
52 | 52 | |
53 | - /** |
|
54 | - * Gets the model names pointed to by this field, always as an array |
|
55 | - * (even if there's only one) |
|
56 | - * |
|
57 | - * @return array of model names pointed to by this field |
|
58 | - */ |
|
59 | - public function get_model_names_pointed_to() |
|
60 | - { |
|
61 | - if (is_array($this->_model_name_pointed_to)) { |
|
62 | - return $this->_model_name_pointed_to; |
|
63 | - } else { |
|
64 | - return array($this->_model_name_pointed_to); |
|
65 | - } |
|
66 | - } |
|
53 | + /** |
|
54 | + * Gets the model names pointed to by this field, always as an array |
|
55 | + * (even if there's only one) |
|
56 | + * |
|
57 | + * @return array of model names pointed to by this field |
|
58 | + */ |
|
59 | + public function get_model_names_pointed_to() |
|
60 | + { |
|
61 | + if (is_array($this->_model_name_pointed_to)) { |
|
62 | + return $this->_model_name_pointed_to; |
|
63 | + } else { |
|
64 | + return array($this->_model_name_pointed_to); |
|
65 | + } |
|
66 | + } |
|
67 | 67 | |
68 | - /** |
|
69 | - * Returns the model's classname (eg EE_Event instead of just Event) |
|
70 | - * |
|
71 | - * @return array |
|
72 | - */ |
|
73 | - public function get_model_class_names_pointed_to() |
|
74 | - { |
|
75 | - $model_names = array(); |
|
76 | - if (is_array($this->_model_name_pointed_to)) { |
|
77 | - foreach ($this->_model_name_pointed_to as $model_name) { |
|
78 | - $model_names[] = "EE_" . $model_name; |
|
79 | - } |
|
80 | - } else { |
|
81 | - $model_names = array("EE_" . $this->_model_name_pointed_to); |
|
82 | - } |
|
83 | - return $model_names; |
|
84 | - } |
|
68 | + /** |
|
69 | + * Returns the model's classname (eg EE_Event instead of just Event) |
|
70 | + * |
|
71 | + * @return array |
|
72 | + */ |
|
73 | + public function get_model_class_names_pointed_to() |
|
74 | + { |
|
75 | + $model_names = array(); |
|
76 | + if (is_array($this->_model_name_pointed_to)) { |
|
77 | + foreach ($this->_model_name_pointed_to as $model_name) { |
|
78 | + $model_names[] = "EE_" . $model_name; |
|
79 | + } |
|
80 | + } else { |
|
81 | + $model_names = array("EE_" . $this->_model_name_pointed_to); |
|
82 | + } |
|
83 | + return $model_names; |
|
84 | + } |
|
85 | 85 | |
86 | - public function is_model_obj_of_type_pointed_to($model_obj_or_ID) |
|
87 | - { |
|
88 | - foreach ($this->get_model_class_names_pointed_to() as $model_obj_classname) { |
|
89 | - if ($model_obj_or_ID instanceof $model_obj_classname) { |
|
90 | - return true; |
|
91 | - } |
|
92 | - } |
|
93 | - return false; |
|
94 | - } |
|
86 | + public function is_model_obj_of_type_pointed_to($model_obj_or_ID) |
|
87 | + { |
|
88 | + foreach ($this->get_model_class_names_pointed_to() as $model_obj_classname) { |
|
89 | + if ($model_obj_or_ID instanceof $model_obj_classname) { |
|
90 | + return true; |
|
91 | + } |
|
92 | + } |
|
93 | + return false; |
|
94 | + } |
|
95 | 95 | } |
@@ -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,50 +3,50 @@ |
||
3 | 3 | |
4 | 4 | class EE_Boolean_Field extends EE_Integer_Field |
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('boolean'); |
|
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('boolean'); |
|
16 | + } |
|
17 | 17 | |
18 | - public function prepare_for_set($value_inputted_for_field_on_model_object) |
|
19 | - { |
|
20 | - if ($value_inputted_for_field_on_model_object) { |
|
21 | - return true; |
|
22 | - } else { |
|
23 | - return false; |
|
24 | - } |
|
25 | - } |
|
18 | + public function prepare_for_set($value_inputted_for_field_on_model_object) |
|
19 | + { |
|
20 | + if ($value_inputted_for_field_on_model_object) { |
|
21 | + return true; |
|
22 | + } else { |
|
23 | + return false; |
|
24 | + } |
|
25 | + } |
|
26 | 26 | |
27 | - /** |
|
28 | - * Make sure we're returning booleans |
|
29 | - * |
|
30 | - * @param string $value_inputted_for_field_on_model_object |
|
31 | - * @return boolean |
|
32 | - */ |
|
33 | - public function prepare_for_set_from_db($value_inputted_for_field_on_model_object) |
|
34 | - { |
|
35 | - return intval($value_inputted_for_field_on_model_object) ? true : false; |
|
36 | - } |
|
27 | + /** |
|
28 | + * Make sure we're returning booleans |
|
29 | + * |
|
30 | + * @param string $value_inputted_for_field_on_model_object |
|
31 | + * @return boolean |
|
32 | + */ |
|
33 | + public function prepare_for_set_from_db($value_inputted_for_field_on_model_object) |
|
34 | + { |
|
35 | + return intval($value_inputted_for_field_on_model_object) ? true : false; |
|
36 | + } |
|
37 | 37 | |
38 | - /** |
|
39 | - * Gets a nice Yes/No value for this field |
|
40 | - * |
|
41 | - * @param boolean $value_on_field_to_be_outputted |
|
42 | - * @return string Yes or No |
|
43 | - */ |
|
44 | - public function prepare_for_pretty_echoing($value_on_field_to_be_outputted) |
|
45 | - { |
|
46 | - return apply_filters( |
|
47 | - 'FHEE__EE_Boolean_Field__prepare_for_pretty_echoing__return', |
|
48 | - $value_on_field_to_be_outputted ? __('Yes', 'event_espresso') : __('No', 'event_espresso'), |
|
49 | - $value_on_field_to_be_outputted |
|
50 | - ); |
|
51 | - } |
|
38 | + /** |
|
39 | + * Gets a nice Yes/No value for this field |
|
40 | + * |
|
41 | + * @param boolean $value_on_field_to_be_outputted |
|
42 | + * @return string Yes or No |
|
43 | + */ |
|
44 | + public function prepare_for_pretty_echoing($value_on_field_to_be_outputted) |
|
45 | + { |
|
46 | + return apply_filters( |
|
47 | + 'FHEE__EE_Boolean_Field__prepare_for_pretty_echoing__return', |
|
48 | + $value_on_field_to_be_outputted ? __('Yes', 'event_espresso') : __('No', 'event_espresso'), |
|
49 | + $value_on_field_to_be_outputted |
|
50 | + ); |
|
51 | + } |
|
52 | 52 | } |
@@ -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 | } |
@@ -8,45 +8,45 @@ |
||
8 | 8 | interface EnqueueAssetsInterface |
9 | 9 | { |
10 | 10 | |
11 | - /** |
|
12 | - * a place to register scripts and stylesheets with WordPress core |
|
13 | - * IMPORTANT !!! |
|
14 | - * ALL JavaScript files need to be registered for loading in the footer |
|
15 | - * by setting the 5th parameter of wp_register_script() to ` true ` |
|
16 | - * |
|
17 | - * @return void |
|
18 | - */ |
|
19 | - public function registerScriptsAndStylesheets(); |
|
20 | - |
|
21 | - /** |
|
22 | - * a place to enqueue previously registered stylesheets |
|
23 | - * this will be called during the wp_enqueue_scripts hook for frontend requests |
|
24 | - * |
|
25 | - * @return void |
|
26 | - */ |
|
27 | - public function enqueueStylesheets(); |
|
28 | - |
|
29 | - /** |
|
30 | - * a place to enqueue previously registered stylesheets |
|
31 | - * this will be called during the admin_enqueue_scripts hook for admin requests |
|
32 | - * |
|
33 | - * @return void |
|
34 | - */ |
|
35 | - public function enqueueAdminStylesheets(); |
|
36 | - |
|
37 | - /** |
|
38 | - * a place to enqueue previously registered scripts for frontend requests |
|
39 | - * |
|
40 | - * @return void |
|
41 | - */ |
|
42 | - public function enqueueScripts(); |
|
43 | - |
|
44 | - /** |
|
45 | - * a place to enqueue previously registered scripts for admin requests |
|
46 | - * |
|
47 | - * @return void |
|
48 | - */ |
|
49 | - public function enqueueAdminScripts(); |
|
11 | + /** |
|
12 | + * a place to register scripts and stylesheets with WordPress core |
|
13 | + * IMPORTANT !!! |
|
14 | + * ALL JavaScript files need to be registered for loading in the footer |
|
15 | + * by setting the 5th parameter of wp_register_script() to ` true ` |
|
16 | + * |
|
17 | + * @return void |
|
18 | + */ |
|
19 | + public function registerScriptsAndStylesheets(); |
|
20 | + |
|
21 | + /** |
|
22 | + * a place to enqueue previously registered stylesheets |
|
23 | + * this will be called during the wp_enqueue_scripts hook for frontend requests |
|
24 | + * |
|
25 | + * @return void |
|
26 | + */ |
|
27 | + public function enqueueStylesheets(); |
|
28 | + |
|
29 | + /** |
|
30 | + * a place to enqueue previously registered stylesheets |
|
31 | + * this will be called during the admin_enqueue_scripts hook for admin requests |
|
32 | + * |
|
33 | + * @return void |
|
34 | + */ |
|
35 | + public function enqueueAdminStylesheets(); |
|
36 | + |
|
37 | + /** |
|
38 | + * a place to enqueue previously registered scripts for frontend requests |
|
39 | + * |
|
40 | + * @return void |
|
41 | + */ |
|
42 | + public function enqueueScripts(); |
|
43 | + |
|
44 | + /** |
|
45 | + * a place to enqueue previously registered scripts for admin requests |
|
46 | + * |
|
47 | + * @return void |
|
48 | + */ |
|
49 | + public function enqueueAdminScripts(); |
|
50 | 50 | |
51 | 51 | } |
52 | 52 | // End of file EnqueueAssetsInterface.php |