| @@ 786-798 (lines=13) @@ | ||
| 783 | $html_val = __('No', 'geodirectory'); |
|
| 784 | } else if ($post->{$cf['htmlvar_name']} == 't' || $post->{$cf['htmlvar_name']} == '1') { |
|
| 785 | $html_val = __('Yes', 'geodirectory'); |
|
| 786 | } else { |
|
| 787 | if (!empty($cf['option_values'])) { |
|
| 788 | $cf_option_values = geodir_string_values_to_options(stripslashes_deep($cf['option_values']), true); |
|
| 789 | ||
| 790 | if (!empty($cf_option_values)) { |
|
| 791 | foreach ($cf_option_values as $cf_option_value) { |
|
| 792 | if (isset($cf_option_value['value']) && $cf_option_value['value'] == $post->{$cf['htmlvar_name']}) { |
|
| 793 | $html_val = $cf_option_value['label']; |
|
| 794 | } |
|
| 795 | } |
|
| 796 | } |
|
| 797 | } |
|
| 798 | } |
|
| 799 | ||
| 800 | $field_icon = geodir_field_icon_proccess($cf); |
|
| 801 | if (strpos($field_icon, 'http') !== false) { |
|
| @@ 891-901 (lines=11) @@ | ||
| 888 | if ($post->{$cf['htmlvar_name']}): |
|
| 889 | $field_value = __($post->{$cf['htmlvar_name']}, 'geodirectory'); |
|
| 890 | ||
| 891 | if (!empty($cf['option_values'])) { |
|
| 892 | $cf_option_values = geodir_string_values_to_options(stripslashes_deep($cf['option_values']), true); |
|
| 893 | ||
| 894 | if (!empty($cf_option_values)) { |
|
| 895 | foreach ($cf_option_values as $cf_option_value) { |
|
| 896 | if (isset($cf_option_value['value']) && $cf_option_value['value'] == $post->{$cf['htmlvar_name']}) { |
|
| 897 | $field_value = $cf_option_value['label']; // no longer needed here. Removed comment because it displays number instead of label if option vales set like "Good/1,Fair/2". |
|
| 898 | } |
|
| 899 | } |
|
| 900 | } |
|
| 901 | } |
|
| 902 | ||
| 903 | $field_icon = geodir_field_icon_proccess($cf); |
|
| 904 | if (strpos($field_icon, 'http') !== false) { |
|
| @@ 1014-1024 (lines=11) @@ | ||
| 1011 | } |
|
| 1012 | ||
| 1013 | $option_values = array(); |
|
| 1014 | if (!empty($cf['option_values'])) { |
|
| 1015 | $cf_option_values = geodir_string_values_to_options(stripslashes_deep($cf['option_values']), true); |
|
| 1016 | ||
| 1017 | if (!empty($cf_option_values)) { |
|
| 1018 | foreach ($cf_option_values as $cf_option_value) { |
|
| 1019 | if (isset($cf_option_value['value']) && in_array($cf_option_value['value'], $field_values)) { |
|
| 1020 | $option_values[] = $cf_option_value['label']; |
|
| 1021 | } |
|
| 1022 | } |
|
| 1023 | } |
|
| 1024 | } |
|
| 1025 | ||
| 1026 | ||
| 1027 | $html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $cf['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-select" style="' . $field_icon . '">' . $field_icon_af; |
|
| @@ 204-215 (lines=12) @@ | ||
| 201 | $value = __( 'No', 'geodirectory' ); |
|
| 202 | } else if ( $gd_post->{$field_name} == 't' || $gd_post->{$field_name} == '1') { |
|
| 203 | $value = __( 'Yes', 'geodirectory' ); |
|
| 204 | } else { |
|
| 205 | if ( !empty( $field['option_values'] ) ) { |
|
| 206 | $cf_option_values = geodir_string_values_to_options(stripslashes_deep( $field['option_values'] ), true ); |
|
| 207 | if ( ! empty( $cf_option_values ) ) { |
|
| 208 | foreach ( $cf_option_values as $cf_option_value ) { |
|
| 209 | if ( isset( $cf_option_value['value'] ) && $cf_option_value['value'] == $gd_post->{$field_name} ) { |
|
| 210 | $value = $cf_option_value['label']; |
|
| 211 | } |
|
| 212 | } |
|
| 213 | } |
|
| 214 | } |
|
| 215 | } |
|
| 216 | } |
|
| 217 | break; |
|
| 218 | case 'select': |
|
| @@ 220-229 (lines=10) @@ | ||
| 217 | break; |
|
| 218 | case 'select': |
|
| 219 | $value = __( $gd_post->{$field_name}, 'geodirectory'); |
|
| 220 | if ( !empty( $field['option_values'] ) ) { |
|
| 221 | $cf_option_values = geodir_string_values_to_options(stripslashes_deep( $field['option_values'] ), true ); |
|
| 222 | if ( ! empty( $cf_option_values ) ) { |
|
| 223 | foreach ( $cf_option_values as $cf_option_value ) { |
|
| 224 | if ( isset( $cf_option_value['value'] ) && $cf_option_value['value'] == $gd_post->{$field_name} ) { |
|
| 225 | $value = $cf_option_value['label']; |
|
| 226 | } |
|
| 227 | } |
|
| 228 | } |
|
| 229 | } |
|
| 230 | break; |
|
| 231 | case 'multiselect': |
|
| 232 | $field_values = explode( ',', trim( $gd_post->{$field_name}, "," ) ); |
|
| @@ 237-247 (lines=11) @@ | ||
| 234 | $field_values = array_map( 'trim', $field_values ); |
|
| 235 | } |
|
| 236 | $values = array(); |
|
| 237 | if ( ! empty( $field['option_values'] ) ) { |
|
| 238 | $cf_option_values = geodir_string_values_to_options(stripslashes_deep( $field['option_values'] ), true ); |
|
| 239 | ||
| 240 | if ( ! empty( $cf_option_values ) ) { |
|
| 241 | foreach ( $cf_option_values as $cf_option_value ) { |
|
| 242 | if ( isset( $cf_option_value['value'] ) && in_array( $cf_option_value['value'], $field_values ) ) { |
|
| 243 | $values[] = $cf_option_value['label']; |
|
| 244 | } |
|
| 245 | } |
|
| 246 | } |
|
| 247 | } |
|
| 248 | $value = ! empty( $values ) ? implode( ', ', $values ) : ''; |
|
| 249 | break; |
|
| 250 | case 'time': |
|