| @@ -76,10 +76,8 @@ | ||
| 76 | 76 | * |
| 77 | 77 | * @since 2.04 |
| 78 | 78 | * |
| 79 | 79 | * @param stdClass $entry |
| 80 | - * | |
| 81 | - * @return void | |
| 82 | 80 | */ |
| 83 | 81 | protected function init_saved_value( $entry ) { |
| 84 | 82 | if ( $this->field->type === 'html' ) { |
| 85 | 83 | $this->saved_value = $this->field->description; |
| @@ -97,10 +95,8 @@ | ||
| 97 | 95 | * |
| 98 | 96 | * @since 2.05 |
| 99 | 97 | * |
| 100 | 98 | * @param array $atts |
| 101 | - * | |
| 102 | - * @return void | |
| 103 | 99 | */ |
| 104 | 100 | public function prepare_displayed_value( $atts = array() ) { |
| 105 | 101 | $this->displayed_value = $this->saved_value; |
| 106 | 102 | unset( $atts['class'] ); // This class shouldn't affect values. |
| @@ -111,10 +107,8 @@ | ||
| 111 | 107 | /** |
| 112 | 108 | * Get a value from the field settings |
| 113 | 109 | * |
| 114 | 110 | * @since 2.05.06 |
| 115 | - * | |
| 116 | - * @param string $value | |
| 117 | 111 | */ |
| 118 | 112 | public function get_field_option( $value ) { |
| 119 | 113 | return FrmField::get_option( $this->field, $value ); |
| 120 | 114 | } |
| @@ -120,10 +114,8 @@ | ||
| 120 | 114 | } |
| 121 | 115 | |
| 122 | 116 | /** |
| 123 | 117 | * @since 4.03 |
| 124 | - * | |
| 125 | - * @param string $option | |
| 126 | 118 | */ |
| 127 | 119 | public function get_field_attr( $option ) { |
| 128 | 120 | return is_object( $this->field ) ? $this->field->{$option} : ''; |
| 129 | 121 | } |
| @@ -129,10 +121,8 @@ | ||
| 129 | 121 | } |
| 130 | 122 | |
| 131 | 123 | /** |
| 132 | 124 | * @since 4.03 |
| 133 | - * | |
| 134 | - * @return stdClass | |
| 135 | 125 | */ |
| 136 | 126 | public function get_field() { |
| 137 | 127 | return $this->field; |
| 138 | 128 | } |
| @@ -217,10 +207,8 @@ | ||
| 217 | 207 | * |
| 218 | 208 | * @since 2.04 |
| 219 | 209 | * |
| 220 | 210 | * @param array $atts |
| 221 | - * | |
| 222 | - * @return void | |
| 223 | 211 | */ |
| 224 | 212 | protected function filter_displayed_value( $atts ) { |
| 225 | 213 | if ( ! is_object( $this->entry ) || empty( $this->entry->metas ) ) { |
| 226 | 214 | $this->entry = FrmEntry::getOne( $this->entry_id, true ); |
| @@ -266,19 +254,16 @@ | ||
| 266 | 254 | $this->displayed_value = apply_filters( 'frm_display_value', $this->displayed_value, $this->field, $atts ); |
| 267 | 255 | } |
| 268 | 256 | |
| 269 | 257 | /** |
| 270 | - * Clean a field's saved value. | |
| 258 | + * Clean a field's saved value | |
| 271 | 259 | * |
| 272 | 260 | * @since 2.04 |
| 273 | - * | |
| 274 | - * @return void | |
| 275 | 261 | */ |
| 276 | 262 | protected function clean_saved_value() { |
| 277 | 263 | if ( $this->saved_value !== '' ) { |
| 278 | 264 | if ( ! is_array( $this->saved_value ) && ! is_object( $this->saved_value ) ) { |
| 279 | - $field_type = FrmField::get_field_type( $this->field ); | |
| 280 | - FrmFieldsHelper::prepare_field_value( $this->saved_value, $field_type ); | |
| 265 | + FrmAppHelper::unserialize_or_decode( $this->saved_value ); | |
| 281 | 266 | } |
| 282 | 267 | |
| 283 | 268 | if ( is_array( $this->saved_value ) && empty( $this->saved_value ) ) { |
| 284 | 269 | $this->saved_value = ''; |