| @@ -18,9 +18,9 @@ discard block | ||
| 18 | 18 | global $post_type; | 
| 19 | 19 | |
| 20 | 20 |  if (!isset($field_info->post_type)) {
 | 
| 21 | - $post_type = sanitize_text_field($_REQUEST['listing_type']); | |
| 21 | + $post_type = sanitize_text_field($_REQUEST['listing_type']); | |
| 22 | 22 | } else | 
| 23 | - $post_type = $field_info->post_type; | |
| 23 | + $post_type = $field_info->post_type; | |
| 24 | 24 | |
| 25 | 25 | $field_info = stripslashes_deep($field_info); // strip slashes from labels | 
| 26 | 26 | |
| @@ -28,7 +28,7 @@ discard block | ||
| 28 | 28 | |
| 29 | 29 | $field_admin_title = ''; | 
| 30 | 30 | if (isset($field_info->admin_title)) | 
| 31 | - $field_admin_title = $field_info->admin_title; | |
| 31 | + $field_admin_title = $field_info->admin_title; | |
| 32 | 32 | |
| 33 | 33 | $default = isset($field_info->is_admin) ? $field_info->is_admin : ''; | 
| 34 | 34 | |
| @@ -47,8 +47,8 @@ discard block | ||
| 47 | 47 |           ondblclick="show_hide('field_frm<?php echo $result_str; ?>')">
 | 
| 48 | 48 | <?php | 
| 49 | 49 | |
| 50 | -        $nonce = wp_create_nonce('custom_fields_' . $result_str);
 | |
| 51 | - ?> | |
| 50 | +		$nonce = wp_create_nonce('custom_fields_' . $result_str);
 | |
| 51 | + ?> | |
| 52 | 52 | |
| 53 | 53 | <?php if ($default): ?> | 
| 54 | 54 |              <div title="<?php _e('Drag and drop to sort', 'geodirectory'); ?>" class="handlediv move"></div>
 | 
| @@ -57,42 +57,42 @@ discard block | ||
| 57 | 57 |                   onclick="delete_field('<?php echo $result_str; ?>', '<?php echo $nonce; ?>')"
 | 
| 58 | 58 | class="handlediv close"></div> | 
| 59 | 59 | <?php endif; | 
| 60 | -        if ($field_type == 'fieldset') {
 | |
| 61 | - ?> | |
| 60 | +		if ($field_type == 'fieldset') {
 | |
| 61 | + ?> | |
| 62 | 62 | |
| 63 | 63 | <b style="cursor:pointer;" | 
| 64 | 64 |                 onclick="show_hide('field_frm<?php echo $result_str;?>')"><?php echo geodir_ucwords(__('Fieldset:', 'geodirectory') . ' ' . $field_admin_title);?></b>
 | 
| 65 | 65 | <?php | 
| 66 | -        } else {
 | |
| 67 | - ?> | |
| 66 | +		} else {
 | |
| 67 | + ?> | |
| 68 | 68 | <b style="cursor:pointer;" | 
| 69 | 69 |                 onclick="show_hide('field_frm<?php echo $result_str;?>')"><?php echo geodir_ucwords(__('Field:', 'geodirectory') . ' ' . $field_admin_title . ' (' . $field_type . ')');?></b>
 | 
| 70 | 70 | <?php | 
| 71 | - } | |
| 72 | - ?> | |
| 71 | + } | |
| 72 | + ?> | |
| 73 | 73 | </div> | 
| 74 | 74 | |
| 75 | 75 | <div id="field_frm<?php echo $result_str; ?>" class="field_frm" | 
| 76 | 76 |           style="display:<?php if ($field_ins_upd == 'submit') {
 | 
| 77 | - echo 'block;'; | |
| 78 | -         } else {
 | |
| 79 | - echo 'none;'; | |
| 80 | - } ?>"> | |
| 77 | + echo 'block;'; | |
| 78 | +		 } else {
 | |
| 79 | + echo 'none;'; | |
| 80 | + } ?>"> | |
| 81 | 81 | <input type="hidden" name="_wpnonce" value="<?php echo esc_attr($nonce); ?>"/> | 
| 82 | 82 | <input type="hidden" name="listing_type" id="listing_type" value="<?php echo $post_type; ?>"/> | 
| 83 | 83 | <input type="hidden" name="field_type" id="field_type" value="<?php echo $field_type; ?>"/> | 
| 84 | 84 | <input type="hidden" name="field_id" id="field_id" value="<?php echo esc_attr($result_str); ?>"/> | 
| 85 | 85 |          <input type="hidden" name="data_type" id="data_type" value="<?php if (isset($field_info->data_type)) {
 | 
| 86 | - echo $field_info->data_type; | |
| 87 | - } ?>"/> | |
| 86 | + echo $field_info->data_type; | |
| 87 | + } ?>"/> | |
| 88 | 88 | <input type="hidden" name="is_active" id="is_active" value="1"/> | 
| 89 | 89 | |
| 90 | 90 | <table class="widefat post fixed" border="0" style="width:100%;"> | 
| 91 | 91 |              <?php if ($field_type != 'text' || $default) { ?>
 | 
| 92 | 92 | |
| 93 | 93 |                  <input type="hidden" name="data_type" id="data_type" value="<?php if (isset($field_info->data_type)) {
 | 
| 94 | - echo esc_attr($field_info->data_type); | |
| 95 | - } ?>"/> | |
| 94 | + echo esc_attr($field_info->data_type); | |
| 95 | + } ?>"/> | |
| 96 | 96 | |
| 97 | 97 |              <?php } else { ?>
 | 
| 98 | 98 | |
| @@ -104,16 +104,16 @@ discard block | ||
| 104 | 104 | onchange="javascript:gd_data_type_changed(this, '<?php echo $result_str; ?>');"> | 
| 105 | 105 | <option | 
| 106 | 106 |                                  value="XVARCHAR" <?php if (isset($field_info->data_type) && $field_info->data_type == 'VARCHAR') {
 | 
| 107 | - echo 'selected="selected"'; | |
| 108 | -                            } ?>><?php _e('CHARACTER', 'geodirectory'); ?></option>
 | |
| 107 | + echo 'selected="selected"'; | |
| 108 | +							} ?>><?php _e('CHARACTER', 'geodirectory'); ?></option>
 | |
| 109 | 109 | <option | 
| 110 | 110 |                                  value="INT" <?php if (isset($field_info->data_type) && $field_info->data_type == 'INT') {
 | 
| 111 | - echo 'selected="selected"'; | |
| 112 | -                            } ?>><?php _e('NUMBER', 'geodirectory'); ?></option>
 | |
| 111 | + echo 'selected="selected"'; | |
| 112 | +							} ?>><?php _e('NUMBER', 'geodirectory'); ?></option>
 | |
| 113 | 113 | <option | 
| 114 | 114 |                                  value="FLOAT" <?php if (isset($field_info->data_type) && $field_info->data_type == 'FLOAT') {
 | 
| 115 | - echo 'selected="selected"'; | |
| 116 | -                            } ?>><?php _e('DECIMAL', 'geodirectory'); ?></option>
 | |
| 115 | + echo 'selected="selected"'; | |
| 116 | +							} ?>><?php _e('DECIMAL', 'geodirectory'); ?></option>
 | |
| 117 | 117 | </select> | 
| 118 | 118 |                          <br/> <span><?php _e('Select Custom Field type', 'geodirectory'); ?></span>
 | 
| 119 | 119 | |
| @@ -127,8 +127,8 @@ discard block | ||
| 127 | 127 | <select name="decimal_point" id="decimal_point"> | 
| 128 | 128 |                              <option value=""><?php echo _e('Select', 'geodirectory'); ?></option>
 | 
| 129 | 129 |                              <?php for ($i = 1; $i <= 10; $i++) {
 | 
| 130 | - $decimal_point = isset($field_info->decimal_point) ? $field_info->decimal_point : ''; | |
| 131 | - $selected = $i == $decimal_point ? 'selected="selected"' : ''; ?> | |
| 130 | + $decimal_point = isset($field_info->decimal_point) ? $field_info->decimal_point : ''; | |
| 131 | + $selected = $i == $decimal_point ? 'selected="selected"' : ''; ?> | |
| 132 | 132 | <option value="<?php echo $i; ?>" <?php echo $selected; ?>><?php echo $i; ?></option> | 
| 133 | 133 | <?php } ?> | 
| 134 | 134 | </select> | 
| @@ -143,8 +143,8 @@ discard block | ||
| 143 | 143 | <td align="left"> | 
| 144 | 144 | <input type="text" name="admin_title" id="admin_title" | 
| 145 | 145 |                             value="<?php if (isset($field_info->admin_title)) {
 | 
| 146 | - echo esc_attr($field_info->admin_title); | |
| 147 | - } ?>"/> | |
| 146 | + echo esc_attr($field_info->admin_title); | |
| 147 | + } ?>"/> | |
| 148 | 148 |                      <br/><span><?php _e('Personal comment, it would not be displayed anywhere except in custom field settings', 'geodirectory'); ?></span>
 | 
| 149 | 149 | </td> | 
| 150 | 150 | </tr> | 
| @@ -153,8 +153,8 @@ discard block | ||
| 153 | 153 | <td align="left"> | 
| 154 | 154 | <input type="text" name="site_title" id="site_title" | 
| 155 | 155 |                             value="<?php if (isset($field_info->site_title)) {
 | 
| 156 | - echo esc_attr($field_info->site_title); | |
| 157 | - } ?>"/> | |
| 156 | + echo esc_attr($field_info->site_title); | |
| 157 | + } ?>"/> | |
| 158 | 158 |                      <br/><span><?php _e('Section title which you wish to display in frontend', 'geodirectory'); ?></span>
 | 
| 159 | 159 | </td> | 
| 160 | 160 | </tr> | 
| @@ -163,23 +163,23 @@ discard block | ||
| 163 | 163 | <td align="left"> | 
| 164 | 164 | <input type="text" name="admin_desc" id="admin_desc" | 
| 165 | 165 |                             value="<?php if (isset($field_info->admin_desc)) {
 | 
| 166 | - echo esc_attr($field_info->admin_desc); | |
| 167 | - } ?>"/> | |
| 166 | + echo esc_attr($field_info->admin_desc); | |
| 167 | + } ?>"/> | |
| 168 | 168 |                      <br/><span><?php _e('Section description which will appear in frontend', 'geodirectory'); ?></span>
 | 
| 169 | 169 | </td> | 
| 170 | 170 | </tr> | 
| 171 | 171 |              <?php if ($field_type != 'fieldset' && $field_type != 'taxonomy') {
 | 
| 172 | - ?> | |
| 172 | + ?> | |
| 173 | 173 | |
| 174 | 174 | <tr> | 
| 175 | 175 |                      <td><strong><?php _e('HTML variable name :', 'geodirectory');?></strong></td>
 | 
| 176 | 176 | <td align="left"> | 
| 177 | 177 | <input type="text" name="htmlvar_name" id="htmlvar_name" | 
| 178 | 178 |                                 value="<?php if (isset($field_info->htmlvar_name)) {
 | 
| 179 | -                                   echo preg_replace('/geodir_/', '', $field_info->htmlvar_name, 1);
 | |
| 180 | -                               }?>" <?php if ($default) {
 | |
| 181 | - echo 'readonly="readonly"'; | |
| 182 | - }?> /> | |
| 179 | +								   echo preg_replace('/geodir_/', '', $field_info->htmlvar_name, 1);
 | |
| 180 | +							   }?>" <?php if ($default) {
 | |
| 181 | + echo 'readonly="readonly"'; | |
| 182 | + }?> /> | |
| 183 | 183 |                          <br/> <span><?php _e('HTML variable name must not be blank', 'geodirectory');?></span>
 | 
| 184 | 184 |                          <br/> <span><?php _e('This should be a unique name', 'geodirectory');?></span>
 | 
| 185 | 185 | <br/> | 
| @@ -191,8 +191,8 @@ discard block | ||
| 191 | 191 |                  <td><strong><?php _e('Admin label :', 'geodirectory'); ?></strong></td>
 | 
| 192 | 192 | <td align="left"><input type="text" name="clabels" id="clabels" | 
| 193 | 193 |                                          value="<?php if (isset($field_info->clabels)) {
 | 
| 194 | - echo esc_attr($field_info->clabels); | |
| 195 | - } ?>"/> | |
| 194 | + echo esc_attr($field_info->clabels); | |
| 195 | + } ?>"/> | |
| 196 | 196 | <br/> | 
| 197 | 197 |                      <span><?php _e('Section Title which will appear in backend', 'geodirectory'); ?></span>
 | 
| 198 | 198 | </td> | 
| @@ -223,8 +223,8 @@ discard block | ||
| 223 | 223 |                  <td><strong><?php _e('Display order :', 'geodirectory'); ?></strong></td>
 | 
| 224 | 224 | <td align="left"><input type="text" readonly="readonly" name="sort_order" id="sort_order" | 
| 225 | 225 |                                          value="<?php if (isset($field_info->sort_order)) {
 | 
| 226 | - echo esc_attr($field_info->sort_order); | |
| 227 | - } ?>"/> | |
| 226 | + echo esc_attr($field_info->sort_order); | |
| 227 | + } ?>"/> | |
| 228 | 228 | <br/> | 
| 229 | 229 |                      <span><?php _e('Enter the display order of this field in backend. e.g. 5', 'geodirectory'); ?></span>
 | 
| 230 | 230 | </td> | 
| @@ -235,11 +235,11 @@ discard block | ||
| 235 | 235 | <td align="left"> | 
| 236 | 236 | <select name="is_default" id="is_default"> | 
| 237 | 237 |                          <option value="0" <?php if (!isset($field_info->is_default) || $field_info->is_default == '0') {
 | 
| 238 | - echo 'selected="selected"'; | |
| 239 | -                        } ?>><?php _e('No', 'geodirectory'); ?></option>
 | |
| 238 | + echo 'selected="selected"'; | |
| 239 | +						} ?>><?php _e('No', 'geodirectory'); ?></option>
 | |
| 240 | 240 |                          <option value="1" <?php if (isset($field_info->is_default) && $field_info->is_default == '1') {
 | 
| 241 | - echo 'selected="selected"'; | |
| 242 | -                        } ?>><?php _e('Yes', 'geodirectory'); ?></option>
 | |
| 241 | + echo 'selected="selected"'; | |
| 242 | +						} ?>><?php _e('Yes', 'geodirectory'); ?></option>
 | |
| 243 | 243 | </select> | 
| 244 | 244 | <br/> | 
| 245 | 245 |                      <span><?php _e('Select yes or no. If no is selected then the field will be displayed as main form field or additional field', 'geodirectory'); ?></span>
 | 
| @@ -254,13 +254,13 @@ discard block | ||
| 254 | 254 | <td> | 
| 255 | 255 | |
| 256 | 256 | <?php | 
| 257 | - $selected = ''; | |
| 258 | - if (isset($field_info->extra_fields)) | |
| 259 | - $advanced_editor = unserialize($field_info->extra_fields); | |
| 257 | + $selected = ''; | |
| 258 | + if (isset($field_info->extra_fields)) | |
| 259 | + $advanced_editor = unserialize($field_info->extra_fields); | |
| 260 | 260 | |
| 261 | -                    if (!empty($advanced_editor) && is_array($advanced_editor) && in_array('1', $advanced_editor))
 | |
| 262 | - $selected = 'checked="checked"'; | |
| 263 | - ?> | |
| 261 | +					if (!empty($advanced_editor) && is_array($advanced_editor) && in_array('1', $advanced_editor))
 | |
| 262 | + $selected = 'checked="checked"'; | |
| 263 | + ?> | |
| 264 | 264 | |
| 265 | 265 | <input type="checkbox" name="advanced_editor[]" id="advanced_editor" | 
| 266 | 266 | value="1" <?php echo $selected; ?>/> | 
| @@ -268,42 +268,42 @@ discard block | ||
| 268 | 268 | </td> | 
| 269 | 269 | |
| 270 | 270 | </tr><?php | 
| 271 | - } ?> | |
| 271 | + } ?> | |
| 272 | 272 | |
| 273 | 273 | <?php | 
| 274 | 274 | |
| 275 | - $pricearr = array(); | |
| 276 | -            if (isset($field_info->packages) && $field_info->packages != '') {
 | |
| 277 | -                $pricearr = explode(',', trim($field_info->packages, ','));
 | |
| 278 | -            } else {
 | |
| 279 | - $package_info = array(); | |
| 275 | + $pricearr = array(); | |
| 276 | +			if (isset($field_info->packages) && $field_info->packages != '') {
 | |
| 277 | +				$pricearr = explode(',', trim($field_info->packages, ','));
 | |
| 278 | +			} else {
 | |
| 279 | + $package_info = array(); | |
| 280 | 280 | |
| 281 | - $package_info = geodir_post_package_info($package_info, '', $post_type); | |
| 282 | - $pricearr[] = $package_info->pid; | |
| 283 | - } | |
| 281 | + $package_info = geodir_post_package_info($package_info, '', $post_type); | |
| 282 | + $pricearr[] = $package_info->pid; | |
| 283 | + } | |
| 284 | 284 | |
| 285 | - ob_start() | |
| 286 | - ?> | |
| 285 | + ob_start() | |
| 286 | + ?> | |
| 287 | 287 | |
| 288 | 288 | <select style="display:none" name="show_on_pkg[]" id="show_on_pkg" multiple="multiple"> | 
| 289 | 289 | <?php | 
| 290 | -                if (!empty($pricearr)) {
 | |
| 291 | -                    foreach ($pricearr as $val) {
 | |
| 292 | - ?> | |
| 290 | +				if (!empty($pricearr)) {
 | |
| 291 | +					foreach ($pricearr as $val) {
 | |
| 292 | + ?> | |
| 293 | 293 | <option selected="selected" value="<?php echo esc_attr($val); ?>" ><?php echo $val; ?></option><?php | 
| 294 | - } | |
| 295 | - } | |
| 296 | - ?> | |
| 294 | + } | |
| 295 | + } | |
| 296 | + ?> | |
| 297 | 297 | </select> | 
| 298 | 298 | |
| 299 | 299 | <?php | 
| 300 | - $html = ob_get_clean(); | |
| 300 | + $html = ob_get_clean(); | |
| 301 | 301 | |
| 302 | 302 | /** | 
| 303 | 303 | * Filter the price packages list. | 
| 304 | 304 | * | 
| 305 | 305 | * Filter the price packages list in custom field form in admin | 
| 306 | - * custom fields settings. | |
| 306 | + * custom fields settings. | |
| 307 | 307 | * | 
| 308 | 308 | * @since 1.0.0 | 
| 309 | 309 | * | 
| @@ -311,27 +311,27 @@ discard block | ||
| 311 | 311 | * @param object $field_info Current field object. | 
| 312 | 312 | */ | 
| 313 | 313 |  			echo $html = apply_filters('geodir_packages_list_on_custom_fields', $html, $field_info);
 | 
| 314 | - $field_display = $field_type == 'address' && $field_info->htmlvar_name == 'post' ? 'style="display:none"' : ''; | |
| 315 | - ?> | |
| 314 | + $field_display = $field_type == 'address' && $field_info->htmlvar_name == 'post' ? 'style="display:none"' : ''; | |
| 315 | + ?> | |
| 316 | 316 | |
| 317 | 317 | <tr <?php echo $field_display; ?>> | 
| 318 | 318 |                  <td><strong><?php _e('Is active :', 'geodirectory'); ?></strong></td>
 | 
| 319 | 319 | <td align="left"> | 
| 320 | 320 | <select name="is_active" id="is_active"> | 
| 321 | 321 |                          <option value="1" <?php if (isset($field_info->is_active) && $field_info->is_active == '1') {
 | 
| 322 | - echo 'selected="selected"'; | |
| 323 | -                        } ?>><?php _e('Yes', 'geodirectory'); ?></option>
 | |
| 322 | + echo 'selected="selected"'; | |
| 323 | +						} ?>><?php _e('Yes', 'geodirectory'); ?></option>
 | |
| 324 | 324 | <option | 
| 325 | 325 |                              value="0" <?php if ((isset($field_info->is_active) && $field_info->is_active == '0') || !isset($field_info->is_active)) {
 | 
| 326 | - echo 'selected="selected"'; | |
| 327 | -                        } ?>><?php _e('No', 'geodirectory'); ?></option>
 | |
| 326 | + echo 'selected="selected"'; | |
| 327 | +						} ?>><?php _e('No', 'geodirectory'); ?></option>
 | |
| 328 | 328 | </select> | 
| 329 | 329 | <br/> | 
| 330 | 330 |                      <span><?php _e('Select yes or no. If no is selected then the field will not be displayed anywhere', 'geodirectory'); ?></span>
 | 
| 331 | 331 | </td> | 
| 332 | 332 | </tr> | 
| 333 | 333 |              <?php if (!$default) { /* field for admin use only */
 | 
| 334 | - $for_admin_use = isset($field_info->for_admin_use) && $field_info->for_admin_use == '1' ? true : false; ?> | |
| 334 | + $for_admin_use = isset($field_info->for_admin_use) && $field_info->for_admin_use == '1' ? true : false; ?> | |
| 335 | 335 | <tr> | 
| 336 | 336 |                      <td><strong><?php _e('For admin use only? :', 'geodirectory'); ?></strong></td>
 | 
| 337 | 337 | <td align="left"> | 
| @@ -353,12 +353,12 @@ discard block | ||
| 353 | 353 | <select name="is_required" id="is_required"> | 
| 354 | 354 | <option | 
| 355 | 355 |                                  value="1" <?php if (isset($field_info->is_required) && $field_info->is_required == '1') {
 | 
| 356 | - echo 'selected="selected"'; | |
| 357 | -                            } ?>><?php _e('Yes', 'geodirectory'); ?></option>
 | |
| 356 | + echo 'selected="selected"'; | |
| 357 | +							} ?>><?php _e('Yes', 'geodirectory'); ?></option>
 | |
| 358 | 358 | <option | 
| 359 | 359 |                                  value="0" <?php if ((isset($field_info->is_required) && $field_info->is_required == '0') || !isset($field_info->is_required)) {
 | 
| 360 | - echo 'selected="selected"'; | |
| 361 | -                            } ?>><?php _e('No', 'geodirectory'); ?></option>
 | |
| 360 | + echo 'selected="selected"'; | |
| 361 | +							} ?>><?php _e('No', 'geodirectory'); ?></option>
 | |
| 362 | 362 | </select> | 
| 363 | 363 |                          <br/> <span><?php _e('Select yes to set field as required', 'geodirectory'); ?></span>
 | 
| 364 | 364 | </td> | 
| @@ -370,8 +370,8 @@ discard block | ||
| 370 | 370 | <td align="left"> | 
| 371 | 371 | <input type="text" name="required_msg" id="required_msg" | 
| 372 | 372 |                             value="<?php if (isset($field_info->required_msg)) {
 | 
| 373 | - echo esc_attr($field_info->required_msg); | |
| 374 | - } ?>"/> | |
| 373 | + echo esc_attr($field_info->required_msg); | |
| 374 | + } ?>"/> | |
| 375 | 375 | <span> | 
| 376 | 376 |                          <?php _e('Enter text for error message if field required and have not full fill requirement.', 'geodirectory'); ?>
 | 
| 377 | 377 | </span> | 
| @@ -385,8 +385,8 @@ discard block | ||
| 385 | 385 | <td align="left"> | 
| 386 | 386 | <input type="text" name="validation_pattern" id="validation_pattern" | 
| 387 | 387 |                             value="<?php if (isset($field_info->validation_pattern)) {
 | 
| 388 | - echo esc_attr($field_info->validation_pattern); | |
| 389 | - } ?>"/> | |
| 388 | + echo esc_attr($field_info->validation_pattern); | |
| 389 | + } ?>"/> | |
| 390 | 390 | <span> | 
| 391 | 391 |                          <?php _e('Enter regex expression for HTML5 pattern validation.', 'geodirectory'); ?>
 | 
| 392 | 392 | </span> | 
| @@ -399,8 +399,8 @@ discard block | ||
| 399 | 399 | <td align="left"> | 
| 400 | 400 | <input type="text" name="validation_msg" id="validation_msg" | 
| 401 | 401 |                             value="<?php if (isset($field_info->validation_msg)) {
 | 
| 402 | - echo esc_attr($field_info->validation_msg); | |
| 403 | - } ?>"/> | |
| 402 | + echo esc_attr($field_info->validation_msg); | |
| 403 | + } ?>"/> | |
| 404 | 404 | <span> | 
| 405 | 405 |                          <?php _e('Enter a extra validation message to show to the user if validation fails.', 'geodirectory'); ?>
 | 
| 406 | 406 | </span> | 
| @@ -415,12 +415,12 @@ discard block | ||
| 415 | 415 | <select name="show_on_listing" id="show_on_listing"> | 
| 416 | 416 | <option | 
| 417 | 417 |                              value="1" <?php if (isset($field_info->show_on_listing) && $field_info->show_on_listing == '1') {
 | 
| 418 | - echo 'selected="selected"'; | |
| 419 | -                        } ?>><?php _e('Yes', 'geodirectory'); ?></option>
 | |
| 418 | + echo 'selected="selected"'; | |
| 419 | +						} ?>><?php _e('Yes', 'geodirectory'); ?></option>
 | |
| 420 | 420 | <option | 
| 421 | 421 |                              value="0" <?php if ((isset($field_info->show_on_listing) && ($field_info->show_on_listing == '0' || $field_info->show_on_listing == '')) || !isset($field_info->show_on_listing)) {
 | 
| 422 | - echo 'selected="selected"'; | |
| 423 | -                        } ?>><?php _e('No', 'geodirectory'); ?></option>
 | |
| 422 | + echo 'selected="selected"'; | |
| 423 | +						} ?>><?php _e('No', 'geodirectory'); ?></option>
 | |
| 424 | 424 | </select> | 
| 425 | 425 |                      <br/> <span><?php _e('Want to show this on listing page ?', 'geodirectory'); ?></span>
 | 
| 426 | 426 | </td> | 
| @@ -432,12 +432,12 @@ discard block | ||
| 432 | 432 | <select name="show_on_detail" id="show_on_detail"> | 
| 433 | 433 | <option | 
| 434 | 434 |                              value="1" <?php if (isset($field_info->show_on_detail) && $field_info->show_on_detail == '1') {
 | 
| 435 | - echo 'selected="selected"'; | |
| 436 | -                        } ?>><?php _e('Yes', 'geodirectory'); ?></option>
 | |
| 435 | + echo 'selected="selected"'; | |
| 436 | +						} ?>><?php _e('Yes', 'geodirectory'); ?></option>
 | |
| 437 | 437 | <option | 
| 438 | 438 |                              value="0" <?php if ((isset($field_info->show_on_detail) && ($field_info->show_on_detail == '0' || $field_info->show_on_detail == '')) || !isset($field_info->show_on_detail)) {
 | 
| 439 | - echo 'selected="selected"'; | |
| 440 | -                        } ?>><?php _e('No', 'geodirectory'); ?></option>
 | |
| 439 | + echo 'selected="selected"'; | |
| 440 | +						} ?>><?php _e('No', 'geodirectory'); ?></option>
 | |
| 441 | 441 | </select> | 
| 442 | 442 | <br/> | 
| 443 | 443 |                      <span><?php _e('Want to show this in More Info tab on detail page?', 'geodirectory'); ?></span>
 | 
| @@ -450,12 +450,12 @@ discard block | ||
| 450 | 450 | <select name="show_as_tab" id="show_as_tab"> | 
| 451 | 451 | <option | 
| 452 | 452 |                                  value="1" <?php if (isset($field_info->show_as_tab) && $field_info->show_as_tab == '1') {
 | 
| 453 | - echo 'selected="selected"'; | |
| 454 | -                            } ?>><?php _e('Yes', 'geodirectory'); ?></option>
 | |
| 453 | + echo 'selected="selected"'; | |
| 454 | +							} ?>><?php _e('Yes', 'geodirectory'); ?></option>
 | |
| 455 | 455 | <option | 
| 456 | 456 |                                  value="0" <?php if ((isset($field_info->show_as_tab) && ($field_info->show_as_tab == '0' || $field_info->show_as_tab == '')) || !isset($field_info->show_as_tab)) {
 | 
| 457 | - echo 'selected="selected"'; | |
| 458 | -                            } ?>><?php _e('No', 'geodirectory'); ?></option>
 | |
| 457 | + echo 'selected="selected"'; | |
| 458 | +							} ?>><?php _e('No', 'geodirectory'); ?></option>
 | |
| 459 | 459 | </select> | 
| 460 | 460 |                          <br/><span><?php _e('Want to display this as a tab on detail page? If "Yes" then "Show on detail page?" must be Yes.', 'geodirectory'); ?></span>
 | 
| 461 | 461 | </td> | 
| @@ -464,23 +464,23 @@ discard block | ||
| 464 | 464 | |
| 465 | 465 | <?php | 
| 466 | 466 | |
| 467 | - switch ($field_type): | |
| 468 | -                case 'taxonomy': {
 | |
| 469 | - ?> | |
| 467 | + switch ($field_type): | |
| 468 | +				case 'taxonomy': {
 | |
| 469 | + ?> | |
| 470 | 470 | <tr> | 
| 471 | 471 |                          <td><strong><?php _e('Select taxonomy:', 'geodirectory');?></strong></td>
 | 
| 472 | 472 | <td align="left"> | 
| 473 | 473 | <select name="htmlvar_name" id="htmlvar_name"> | 
| 474 | 474 | <?php | 
| 475 | - $gd_taxonomy = geodir_get_taxonomies($post_type); | |
| 475 | + $gd_taxonomy = geodir_get_taxonomies($post_type); | |
| 476 | 476 | |
| 477 | -                                foreach ($gd_taxonomy as $gd_tax) {
 | |
| 478 | - ?> | |
| 477 | +								foreach ($gd_taxonomy as $gd_tax) {
 | |
| 478 | + ?> | |
| 479 | 479 |                                      <option <?php if (isset($field_info->htmlvar_name) && $field_info->htmlvar_name == $gd_tax) {
 | 
| 480 | - echo 'selected="selected"'; | |
| 481 | - }?> id="<?php echo $gd_tax;?>"><?php echo $gd_tax;?></option><?php | |
| 482 | - } | |
| 483 | - ?> | |
| 480 | + echo 'selected="selected"'; | |
| 481 | + }?> id="<?php echo $gd_tax;?>"><?php echo $gd_tax;?></option><?php | |
| 482 | + } | |
| 483 | + ?> | |
| 484 | 484 | </select> | 
| 485 | 485 | |
| 486 | 486 | <br/> | 
| @@ -494,20 +494,20 @@ discard block | ||
| 494 | 494 | |
| 495 | 495 | <select name="cat_display_type" id="cat_display_type"> | 
| 496 | 496 |                                  <option <?php if (isset($field_info->extra_fields) && unserialize($field_info->extra_fields) == 'ajax_chained') {
 | 
| 497 | - echo 'selected="selected"'; | |
| 498 | -                                }?> value="ajax_chained"><?php _e('Ajax Chained', 'geodirectory');?></option>
 | |
| 497 | + echo 'selected="selected"'; | |
| 498 | +								}?> value="ajax_chained"><?php _e('Ajax Chained', 'geodirectory');?></option>
 | |
| 499 | 499 |                                  <option <?php if (isset($field_info->extra_fields) && unserialize($field_info->extra_fields) == 'select') {
 | 
| 500 | - echo 'selected="selected"'; | |
| 501 | -                                }?> value="select"><?php _e('Select', 'geodirectory');?></option>
 | |
| 500 | + echo 'selected="selected"'; | |
| 501 | +								}?> value="select"><?php _e('Select', 'geodirectory');?></option>
 | |
| 502 | 502 |                                  <option <?php if (isset($field_info->extra_fields) && unserialize($field_info->extra_fields) == 'multiselect') {
 | 
| 503 | - echo 'selected="selected"'; | |
| 504 | -                                }?> value="multiselect"><?php _e('Multiselect', 'geodirectory');?></option>
 | |
| 503 | + echo 'selected="selected"'; | |
| 504 | +								}?> value="multiselect"><?php _e('Multiselect', 'geodirectory');?></option>
 | |
| 505 | 505 |                                  <option <?php if (isset($field_info->extra_fields) && unserialize($field_info->extra_fields) == 'checkbox') {
 | 
| 506 | - echo 'selected="selected"'; | |
| 507 | -                                }?> value="checkbox"><?php _e('Checkbox', 'geodirectory');?></option>
 | |
| 506 | + echo 'selected="selected"'; | |
| 507 | +								}?> value="checkbox"><?php _e('Checkbox', 'geodirectory');?></option>
 | |
| 508 | 508 |                                  <option <?php if (isset($field_info->extra_fields) && unserialize($field_info->extra_fields) == 'radio') {
 | 
| 509 | - echo 'selected="selected"'; | |
| 510 | -                                }?> value="radio"><?php _e('Radio', 'geodirectory');?></option>
 | |
| 509 | + echo 'selected="selected"'; | |
| 510 | +								}?> value="radio"><?php _e('Radio', 'geodirectory');?></option>
 | |
| 511 | 511 | </select> | 
| 512 | 512 | |
| 513 | 513 | <br/> | 
| @@ -515,29 +515,29 @@ discard block | ||
| 515 | 515 | </td> | 
| 516 | 516 | </tr> | 
| 517 | 517 | <?php } // end of additional field for taxonomy field type | 
| 518 | - break; | |
| 519 | -                case 'address': {
 | |
| 520 | -                    if (isset($field_info->extra_fields) && $field_info->extra_fields != '') {
 | |
| 521 | - $address = unserialize($field_info->extra_fields); | |
| 522 | - } | |
| 523 | - ?> | |
| 518 | + break; | |
| 519 | +				case 'address': {
 | |
| 520 | +					if (isset($field_info->extra_fields) && $field_info->extra_fields != '') {
 | |
| 521 | + $address = unserialize($field_info->extra_fields); | |
| 522 | + } | |
| 523 | + ?> | |
| 524 | 524 | <?php | 
| 525 | - /** | |
| 526 | - * Called on the add custom fields settings page before the address field is output. | |
| 527 | - * | |
| 528 | - * @since 1.0.0 | |
| 529 | - * @param array $address The address settings array. | |
| 530 | - * @param object $field_info Extra fields info. | |
| 531 | - */ | |
| 532 | -                    do_action('geodir_address_extra_admin_fields', $address, $field_info); ?>
 | |
| 525 | + /** | |
| 526 | + * Called on the add custom fields settings page before the address field is output. | |
| 527 | + * | |
| 528 | + * @since 1.0.0 | |
| 529 | + * @param array $address The address settings array. | |
| 530 | + * @param object $field_info Extra fields info. | |
| 531 | + */ | |
| 532 | +					do_action('geodir_address_extra_admin_fields', $address, $field_info); ?>
 | |
| 533 | 533 | |
| 534 | 534 | <tr> | 
| 535 | 535 |                          <td><strong><?php _e('Display zip/post code :', 'geodirectory');?></strong></td>
 | 
| 536 | 536 | <td align="left"> | 
| 537 | 537 | <input type="checkbox" name="extra[show_zip]" id="show_zip" | 
| 538 | 538 |                                     value="1" <?php if (isset($address['show_zip']) && $address['show_zip'] == '1') {
 | 
| 539 | - echo 'checked="checked"'; | |
| 540 | - }?>/> | |
| 539 | + echo 'checked="checked"'; | |
| 540 | + }?>/> | |
| 541 | 541 |                              <span><?php _e('Select if you want to show zip/post code field in address section.', 'geodirectory');?></span>
 | 
| 542 | 542 | </td> | 
| 543 | 543 | </tr> | 
| @@ -547,8 +547,8 @@ discard block | ||
| 547 | 547 | <td align="left"> | 
| 548 | 548 | <input type="text" name="extra[zip_lable]" id="zip_lable" | 
| 549 | 549 |                                     value="<?php if (isset($address['zip_lable'])) {
 | 
| 550 | - echo esc_attr($address['zip_lable']); | |
| 551 | - }?>"/> | |
| 550 | + echo esc_attr($address['zip_lable']); | |
| 551 | + }?>"/> | |
| 552 | 552 |                              <span><?php _e('Enter zip/post code field label in address section.', 'geodirectory');?></span>
 | 
| 553 | 553 | </td> | 
| 554 | 554 | </tr> | 
| @@ -558,8 +558,8 @@ discard block | ||
| 558 | 558 | <td align="left"> | 
| 559 | 559 | <input type="checkbox" name="extra[show_map]" id="show_map" | 
| 560 | 560 |                                     value="1" <?php if (isset($address['show_map']) && $address['show_map'] == '1') {
 | 
| 561 | - echo 'checked="checked"'; | |
| 562 | - }?>/> | |
| 561 | + echo 'checked="checked"'; | |
| 562 | + }?>/> | |
| 563 | 563 |                              <span><?php _e('Select if you want to `set address on map` field in address section.', 'geodirectory');?></span>
 | 
| 564 | 564 | </td> | 
| 565 | 565 | </tr> | 
| @@ -569,8 +569,8 @@ discard block | ||
| 569 | 569 | <td align="left"> | 
| 570 | 570 | <input type="text" name="extra[map_lable]" id="map_lable" | 
| 571 | 571 |                                     value="<?php if (isset($address['map_lable'])) {
 | 
| 572 | - echo esc_attr($address['map_lable']); | |
| 573 | - }?>"/> | |
| 572 | + echo esc_attr($address['map_lable']); | |
| 573 | + }?>"/> | |
| 574 | 574 |                              <span><?php _e('Enter text for  `set address on map` button in address section.', 'geodirectory');?></span>
 | 
| 575 | 575 | </td> | 
| 576 | 576 | </tr> | 
| @@ -580,8 +580,8 @@ discard block | ||
| 580 | 580 | <td align="left"> | 
| 581 | 581 | <input type="checkbox" name="extra[show_mapzoom]" id="show_mapzoom" | 
| 582 | 582 |                                     value="1" <?php if (isset($address['show_mapzoom']) && $address['show_mapzoom'] == '1') {
 | 
| 583 | - echo 'checked="checked"'; | |
| 584 | - }?>/> | |
| 583 | + echo 'checked="checked"'; | |
| 584 | + }?>/> | |
| 585 | 585 |                              <span><?php _e('Select if you want to use the user defined map zoom level.', 'geodirectory');?></span>
 | 
| 586 | 586 | </td> | 
| 587 | 587 | </tr> | 
| @@ -591,8 +591,8 @@ discard block | ||
| 591 | 591 | <td align="left"> | 
| 592 | 592 | <input type="checkbox" name="extra[show_mapview]" id="show_mapview" | 
| 593 | 593 |                                     value="1" <?php if (isset($address['show_mapview']) && $address['show_mapview'] == '1') {
 | 
| 594 | - echo 'checked="checked"'; | |
| 595 | - }?>/> | |
| 594 | + echo 'checked="checked"'; | |
| 595 | + }?>/> | |
| 596 | 596 |                              <span><?php _e('Select if you want to `set default map` options in address section.', 'geodirectory');?></span>
 | 
| 597 | 597 | </td> | 
| 598 | 598 | </tr> | 
| @@ -603,8 +603,8 @@ discard block | ||
| 603 | 603 | <td align="left"> | 
| 604 | 604 | <input type="text" name="extra[mapview_lable]" id="mapview_lable" | 
| 605 | 605 |                                     value="<?php if (isset($address['mapview_lable'])) {
 | 
| 606 | - echo esc_attr($address['mapview_lable']); | |
| 607 | - }?>"/> | |
| 606 | + echo esc_attr($address['mapview_lable']); | |
| 607 | + }?>"/> | |
| 608 | 608 |                              <span><?php _e('Enter mapview field label in address section.', 'geodirectory');?></span>
 | 
| 609 | 609 | </td> | 
| 610 | 610 | </tr> | 
| @@ -615,33 +615,33 @@ discard block | ||
| 615 | 615 | <td align="left"> | 
| 616 | 616 | <input type="checkbox" name="extra[show_latlng]" id="show_latlng" | 
| 617 | 617 |                                     value="1" <?php if (isset($address['show_latlng']) && $address['show_latlng'] == '1') {
 | 
| 618 | - echo 'checked="checked"'; | |
| 619 | - }?>/> | |
| 618 | + echo 'checked="checked"'; | |
| 619 | + }?>/> | |
| 620 | 620 |                              <span><?php _e('Select if you want to show latitude and longitude fields in address section from front-end.', 'geodirectory');?></span>
 | 
| 621 | 621 | </td> | 
| 622 | 622 | </tr> | 
| 623 | 623 | <?php } // end of extra fields for address field type | 
| 624 | - break; | |
| 625 | - case 'select': | |
| 626 | - case 'multiselect': | |
| 627 | -                case 'radio' : {
 | |
| 628 | -                    if ($field_type == 'multiselect') {
 | |
| 624 | + break; | |
| 625 | + case 'select': | |
| 626 | + case 'multiselect': | |
| 627 | +				case 'radio' : {
 | |
| 628 | +					if ($field_type == 'multiselect') {
 | |
| 629 | 629 | |
| 630 | - ?> | |
| 630 | + ?> | |
| 631 | 631 | <tr> | 
| 632 | 632 |                              <td><strong><?php _e('Multiselect display type :', 'geodirectory');?></strong></td>
 | 
| 633 | 633 | <td align="left"> | 
| 634 | 634 | |
| 635 | 635 | <select name="multi_display_type" id="multi_display_type"> | 
| 636 | 636 |                                      <option <?php if (isset($field_info->extra_fields) && unserialize($field_info->extra_fields) == 'select') {
 | 
| 637 | - echo 'selected="selected"'; | |
| 638 | -                                    }?> value="select"><?php _e('Select', 'geodirectory');?></option>
 | |
| 637 | + echo 'selected="selected"'; | |
| 638 | +									}?> value="select"><?php _e('Select', 'geodirectory');?></option>
 | |
| 639 | 639 |                                      <option <?php if (isset($field_info->extra_fields) && unserialize($field_info->extra_fields) == 'checkbox') {
 | 
| 640 | - echo 'selected="selected"'; | |
| 641 | -                                    }?> value="checkbox"><?php _e('Checkbox', 'geodirectory');?></option>
 | |
| 640 | + echo 'selected="selected"'; | |
| 641 | +									}?> value="checkbox"><?php _e('Checkbox', 'geodirectory');?></option>
 | |
| 642 | 642 |                                      <option <?php if (isset($field_info->extra_fields) && unserialize($field_info->extra_fields) == 'radio') {
 | 
| 643 | - echo 'selected="selected"'; | |
| 644 | -                                    }?> value="radio"><?php _e('Radio', 'geodirectory');?></option>
 | |
| 643 | + echo 'selected="selected"'; | |
| 644 | +									}?> value="radio"><?php _e('Radio', 'geodirectory');?></option>
 | |
| 645 | 645 | </select> | 
| 646 | 646 | |
| 647 | 647 | <br/> | 
| @@ -649,15 +649,15 @@ discard block | ||
| 649 | 649 | </td> | 
| 650 | 650 | </tr> | 
| 651 | 651 | <?php | 
| 652 | - } | |
| 653 | - ?> | |
| 652 | + } | |
| 653 | + ?> | |
| 654 | 654 | <tr> | 
| 655 | 655 |                          <td><strong><?php _e('Option Values :', 'geodirectory');?></strong></td>
 | 
| 656 | 656 | <td align="left"> | 
| 657 | 657 | <input type="text" name="option_values" id="option_values" | 
| 658 | 658 |                                     value="<?php if (isset($field_info->option_values)) {
 | 
| 659 | - echo esc_attr($field_info->option_values); | |
| 660 | - }?>"/> | |
| 659 | + echo esc_attr($field_info->option_values); | |
| 660 | + }?>"/> | |
| 661 | 661 | <br/> | 
| 662 | 662 |                              <span><?php _e('Option Values should be separated by comma.', 'geodirectory');?></span>
 | 
| 663 | 663 | <br/> | 
| @@ -673,52 +673,52 @@ discard block | ||
| 673 | 673 | </td> | 
| 674 | 674 | </tr> | 
| 675 | 675 | <?php | 
| 676 | - } // end of extra fields for select , multiselect and radio type fields | |
| 677 | - break; | |
| 678 | -                case 'datepicker': {
 | |
| 679 | -                    if (isset($field_info->extra_fields) && $field_info->extra_fields != '') {
 | |
| 680 | - $extra = unserialize($field_info->extra_fields); | |
| 681 | - } | |
| 682 | - ?> | |
| 676 | + } // end of extra fields for select , multiselect and radio type fields | |
| 677 | + break; | |
| 678 | +				case 'datepicker': {
 | |
| 679 | +					if (isset($field_info->extra_fields) && $field_info->extra_fields != '') {
 | |
| 680 | + $extra = unserialize($field_info->extra_fields); | |
| 681 | + } | |
| 682 | + ?> | |
| 683 | 683 | <tr> | 
| 684 | 684 |                          <td><strong><?php _e('Date Format :', 'geodirectory');?></strong></td>
 | 
| 685 | 685 | <td align="left" style="overflow:inherit;"> | 
| 686 | 686 | <?php | 
| 687 | - $date_formats = array( | |
| 688 | - 'm/d/Y', | |
| 689 | - 'd/m/Y', | |
| 690 | - 'Y/m/d', | |
| 691 | - 'm-d-Y', | |
| 692 | - 'd-m-Y', | |
| 693 | - 'Y-m-d', | |
| 694 | - 'F j, Y', | |
| 695 | - ); | |
| 696 | - /** | |
| 697 | - * Filter the custom field date format options. | |
| 698 | - * | |
| 699 | - * @since 1.6.5 | |
| 700 | - * @param array $date_formats The PHP date format array. | |
| 701 | - */ | |
| 702 | -                            $date_formats = apply_filters('geodir_date_formats',$date_formats);
 | |
| 703 | - ?> | |
| 687 | + $date_formats = array( | |
| 688 | + 'm/d/Y', | |
| 689 | + 'd/m/Y', | |
| 690 | + 'Y/m/d', | |
| 691 | + 'm-d-Y', | |
| 692 | + 'd-m-Y', | |
| 693 | + 'Y-m-d', | |
| 694 | + 'F j, Y', | |
| 695 | + ); | |
| 696 | + /** | |
| 697 | + * Filter the custom field date format options. | |
| 698 | + * | |
| 699 | + * @since 1.6.5 | |
| 700 | + * @param array $date_formats The PHP date format array. | |
| 701 | + */ | |
| 702 | +							$date_formats = apply_filters('geodir_date_formats',$date_formats);
 | |
| 703 | + ?> | |
| 704 | 704 | <select name="extra[date_format]" id="date_format"> | 
| 705 | 705 | <?php | 
| 706 | -                                foreach($date_formats as $format){
 | |
| 707 | - $selected = ''; | |
| 708 | -                                    if(esc_attr($extra['date_format'])==$format){
 | |
| 709 | - $selected = "selected='selected'"; | |
| 710 | - } | |
| 711 | -                                    echo "<option $selected value='$format'>$format       (".date_i18n( $format, time()).")</option>";
 | |
| 712 | - } | |
| 713 | - ?> | |
| 706 | +								foreach($date_formats as $format){
 | |
| 707 | + $selected = ''; | |
| 708 | +									if(esc_attr($extra['date_format'])==$format){
 | |
| 709 | + $selected = "selected='selected'"; | |
| 710 | + } | |
| 711 | +									echo "<option $selected value='$format'>$format       (".date_i18n( $format, time()).")</option>";
 | |
| 712 | + } | |
| 713 | + ?> | |
| 714 | 714 | </select> | 
| 715 | 715 | |
| 716 | 716 |                              <span><?php _e('Select the date format.', 'geodirectory');?></span>
 | 
| 717 | 717 | </td> | 
| 718 | 718 | </tr> | 
| 719 | 719 | <?php | 
| 720 | - } | |
| 721 | - break; | |
| 720 | + } | |
| 721 | + break; | |
| 722 | 722 |  				case 'file': {
 | 
| 723 | 723 | $allowed_file_types = geodir_allowed_mime_types(); | 
| 724 | 724 | |
| @@ -746,9 +746,9 @@ discard block | ||
| 746 | 746 | } | 
| 747 | 747 | break; | 
| 748 | 748 | |
| 749 | - endswitch; | |
| 750 | -            if ($field_type != 'fieldset') {
 | |
| 751 | - ?> | |
| 749 | + endswitch; | |
| 750 | +			if ($field_type != 'fieldset') {
 | |
| 751 | + ?> | |
| 752 | 752 | <tr> | 
| 753 | 753 |                      <td colspan="2" align="left"><h3><?php echo __('Custom css', 'geodirectory'); ?></h3></td>
 | 
| 754 | 754 | </tr> | 
| @@ -758,8 +758,8 @@ discard block | ||
| 758 | 758 | <td align="left"> | 
| 759 | 759 | <input type="text" name="field_icon" id="field_icon" | 
| 760 | 760 |                                 value="<?php if (isset($field_info->field_icon)) {
 | 
| 761 | - echo $field_info->field_icon; | |
| 762 | - }?>"/> | |
| 761 | + echo $field_info->field_icon; | |
| 762 | + }?>"/> | |
| 763 | 763 | <span> | 
| 764 | 764 |                          <?php _e('Upload icon using media and enter its url path, or enter <a href="http://fortawesome.github.io/Font-Awesome/icons/" target="_blank" >font awesome </a>class eg:"fa fa-home"', 'geodirectory');?>
 | 
| 765 | 765 | </span> | 
| @@ -772,8 +772,8 @@ discard block | ||
| 772 | 772 | <td align="left"> | 
| 773 | 773 | <input type="text" name="css_class" id="css_class" | 
| 774 | 774 |                                 value="<?php if (isset($field_info->css_class)) {
 | 
| 775 | - echo esc_attr($field_info->css_class); | |
| 776 | - }?>"/> | |
| 775 | + echo esc_attr($field_info->css_class); | |
| 776 | + }?>"/> | |
| 777 | 777 | <span> | 
| 778 | 778 |                          <?php _e('Enter custom css class for field custom style.', 'geodirectory');?>
 | 
| 779 | 779 | </span> | 
| @@ -781,16 +781,16 @@ discard block | ||
| 781 | 781 | </td> | 
| 782 | 782 | </tr> | 
| 783 | 783 | <?php | 
| 784 | - } | |
| 785 | - | |
| 786 | - switch ($field_type): | |
| 787 | - case 'html': | |
| 788 | - case 'file': | |
| 789 | - case 'url': | |
| 790 | - case 'fieldset': | |
| 791 | - break; | |
| 792 | - default: | |
| 793 | - ?> | |
| 784 | + } | |
| 785 | + | |
| 786 | + switch ($field_type): | |
| 787 | + case 'html': | |
| 788 | + case 'file': | |
| 789 | + case 'url': | |
| 790 | + case 'fieldset': | |
| 791 | + break; | |
| 792 | + default: | |
| 793 | + ?> | |
| 794 | 794 | <tr> | 
| 795 | 795 | <td colspan="2" align="left"> | 
| 796 | 796 | <h3><?php | 
| @@ -807,7 +807,7 @@ discard block | ||
| 807 | 807 | */ | 
| 808 | 808 |  								echo apply_filters('geodir_advance_custom_fields_heading', __('Posts sort options', 'geodirectory'), $field_type);
 | 
| 809 | 809 | |
| 810 | - ?></h3> | |
| 810 | + ?></h3> | |
| 811 | 811 | </td> | 
| 812 | 812 | </tr> | 
| 813 | 813 | |
| @@ -817,23 +817,23 @@ discard block | ||
| 817 | 817 | <td>: | 
| 818 | 818 | <input type="checkbox" name="cat_sort[]" id="cat_sort" | 
| 819 | 819 |                                     value="1" <?php if (isset($field_info->cat_sort[0]) && $field_info->cat_sort[0] == '1') {
 | 
| 820 | - echo 'checked="checked"'; | |
| 821 | - } ?>/> | |
| 820 | + echo 'checked="checked"'; | |
| 821 | + } ?>/> | |
| 822 | 822 |                              <span><?php _e('Select if you want to show option in sort.', 'geodirectory'); ?></span>
 | 
| 823 | 823 | </td> | 
| 824 | 824 | </tr> | 
| 825 | 825 | <?php } ?> | 
| 826 | 826 | |
| 827 | 827 | <?php | 
| 828 | - /** | |
| 829 | - * Called at the end of the advanced custom fields settings page loop. | |
| 830 | - * | |
| 831 | - * Can be used to add or deal with different settings types. | |
| 832 | - * | |
| 833 | - * @since 1.0.0 | |
| 834 | - * @param object $field_info The current fields info. | |
| 835 | - */ | |
| 836 | -                    do_action('geodir_advance_custom_fields', $field_info);?>
 | |
| 828 | + /** | |
| 829 | + * Called at the end of the advanced custom fields settings page loop. | |
| 830 | + * | |
| 831 | + * Can be used to add or deal with different settings types. | |
| 832 | + * | |
| 833 | + * @since 1.0.0 | |
| 834 | + * @param object $field_info The current fields info. | |
| 835 | + */ | |
| 836 | +					do_action('geodir_advance_custom_fields', $field_info);?>
 | |
| 837 | 837 | |
| 838 | 838 |                      <?php /*if(!in_array($field_type,array() )){?>
 | 
| 839 | 839 | <tr> | 
| @@ -24,7 +24,7 @@ discard block | ||
| 24 | 24 | |
| 25 | 25 | $field_info = stripslashes_deep($field_info); // strip slashes from labels | 
| 26 | 26 | |
| 27 | -$nonce = wp_create_nonce('custom_fields_' . $result_str);
 | |
| 27 | +$nonce = wp_create_nonce('custom_fields_'.$result_str);
 | |
| 28 | 28 | |
| 29 | 29 | $field_admin_title = ''; | 
| 30 | 30 | if (isset($field_info->admin_title)) | 
| @@ -47,7 +47,7 @@ discard block | ||
| 47 | 47 |           ondblclick="show_hide('field_frm<?php echo $result_str; ?>')">
 | 
| 48 | 48 | <?php | 
| 49 | 49 | |
| 50 | -        $nonce = wp_create_nonce('custom_fields_' . $result_str);
 | |
| 50 | +        $nonce = wp_create_nonce('custom_fields_'.$result_str);
 | |
| 51 | 51 | ?> | 
| 52 | 52 | |
| 53 | 53 | <?php if ($default): ?> | 
| @@ -61,12 +61,12 @@ discard block | ||
| 61 | 61 | ?> | 
| 62 | 62 | |
| 63 | 63 | <b style="cursor:pointer;" | 
| 64 | -               onclick="show_hide('field_frm<?php echo $result_str;?>')"><?php echo geodir_ucwords(__('Fieldset:', 'geodirectory') . ' ' . $field_admin_title);?></b>
 | |
| 64 | +               onclick="show_hide('field_frm<?php echo $result_str; ?>')"><?php echo geodir_ucwords(__('Fieldset:', 'geodirectory').' '.$field_admin_title); ?></b>
 | |
| 65 | 65 | <?php | 
| 66 | 66 |          } else {
 | 
| 67 | 67 | ?> | 
| 68 | 68 | <b style="cursor:pointer;" | 
| 69 | -               onclick="show_hide('field_frm<?php echo $result_str;?>')"><?php echo geodir_ucwords(__('Field:', 'geodirectory') . ' ' . $field_admin_title . ' (' . $field_type . ')');?></b>
 | |
| 69 | +               onclick="show_hide('field_frm<?php echo $result_str; ?>')"><?php echo geodir_ucwords(__('Field:', 'geodirectory').' '.$field_admin_title.' ('.$field_type.')'); ?></b>
 | |
| 70 | 70 | <?php | 
| 71 | 71 | } | 
| 72 | 72 | ?> | 
| @@ -172,7 +172,7 @@ discard block | ||
| 172 | 172 | ?> | 
| 173 | 173 | |
| 174 | 174 | <tr> | 
| 175 | -                    <td><strong><?php _e('HTML variable name :', 'geodirectory');?></strong></td>
 | |
| 175 | +                    <td><strong><?php _e('HTML variable name :', 'geodirectory'); ?></strong></td>
 | |
| 176 | 176 | <td align="left"> | 
| 177 | 177 | <input type="text" name="htmlvar_name" id="htmlvar_name" | 
| 178 | 178 |                                 value="<?php if (isset($field_info->htmlvar_name)) {
 | 
| @@ -180,10 +180,10 @@ discard block | ||
| 180 | 180 |                                 }?>" <?php if ($default) {
 | 
| 181 | 181 | echo 'readonly="readonly"'; | 
| 182 | 182 | }?> /> | 
| 183 | -                        <br/> <span><?php _e('HTML variable name must not be blank', 'geodirectory');?></span>
 | |
| 184 | -                        <br/> <span><?php _e('This should be a unique name', 'geodirectory');?></span>
 | |
| 183 | +                        <br/> <span><?php _e('HTML variable name must not be blank', 'geodirectory'); ?></span>
 | |
| 184 | +                        <br/> <span><?php _e('This should be a unique name', 'geodirectory'); ?></span>
 | |
| 185 | 185 | <br/> | 
| 186 | -                        <span><?php _e('HTML variable name not use spaces, special characters', 'geodirectory');?></span>
 | |
| 186 | +                        <span><?php _e('HTML variable name not use spaces, special characters', 'geodirectory'); ?></span>
 | |
| 187 | 187 | </td> | 
| 188 | 188 | </tr> | 
| 189 | 189 | <?php } ?> | 
| @@ -202,19 +202,19 @@ discard block | ||
| 202 | 202 | $default_value = isset($field_info->default_value) ? $field_info->default_value : ''; | 
| 203 | 203 | ?> | 
| 204 | 204 | <tr> | 
| 205 | -				<td><strong><?php _e('Default value :', 'geodirectory');?></strong></td>
 | |
| 205 | +				<td><strong><?php _e('Default value :', 'geodirectory'); ?></strong></td>
 | |
| 206 | 206 | <td align="left"> | 
| 207 | 207 |  				<?php if ($field_type == 'checkbox') { ?>
 | 
| 208 | 208 | <select name="default_value" id="default_value"> | 
| 209 | 209 |  					<option value=""><?php _e('Unchecked', 'geodirectory'); ?></option>
 | 
| 210 | -					<option value="1" <?php selected(true, (int)$default_value === 1);?>><?php _e('Checked', 'geodirectory'); ?></option>
 | |
| 210 | +					<option value="1" <?php selected(true, (int) $default_value === 1); ?>><?php _e('Checked', 'geodirectory'); ?></option>
 | |
| 211 | 211 | </select> | 
| 212 | 212 |  				<?php } else if ($field_type == 'email') { ?>
 | 
| 213 | -				<input type="email" name="default_value" placeholder="<?php _e('[email protected]', 'geodirectory') ;?>" id="default_value" value="<?php echo esc_attr($default_value);?>" /><br/>
 | |
| 214 | -				<span><?php _e('Enter the default value. Ex: [email protected]', 'geodirectory');?></span>
 | |
| 213 | +				<input type="email" name="default_value" placeholder="<?php _e('[email protected]', 'geodirectory'); ?>" id="default_value" value="<?php echo esc_attr($default_value); ?>" /><br/>
 | |
| 214 | +				<span><?php _e('Enter the default value. Ex: [email protected]', 'geodirectory'); ?></span>
 | |
| 215 | 215 |  				<?php } else { ?>
 | 
| 216 | - <input type="text" name="default_value" id="default_value" value="<?php echo esc_attr($default_value);?>" /><br/> | |
| 217 | -				<span><?php _e('Enter the default value (for "link" this will be used as the link text)', 'geodirectory');?></span>
 | |
| 216 | + <input type="text" name="default_value" id="default_value" value="<?php echo esc_attr($default_value); ?>" /><br/> | |
| 217 | +				<span><?php _e('Enter the default value (for "link" this will be used as the link text)', 'geodirectory'); ?></span>
 | |
| 218 | 218 | <?php } ?> | 
| 219 | 219 | </td> | 
| 220 | 220 | </tr> | 
| @@ -379,7 +379,7 @@ discard block | ||
| 379 | 379 | </td> | 
| 380 | 380 | </tr> | 
| 381 | 381 | |
| 382 | -            <?php if ($field_type == 'text'){?>
 | |
| 382 | +            <?php if ($field_type == 'text') {?>
 | |
| 383 | 383 | <tr> | 
| 384 | 384 |                  <td><strong><?php _e('Validation Pattern:', 'geodirectory'); ?></strong></td>
 | 
| 385 | 385 | <td align="left"> | 
| @@ -409,7 +409,7 @@ discard block | ||
| 409 | 409 | </tr> | 
| 410 | 410 | <?php } ?> | 
| 411 | 411 | |
| 412 | - <tr <?php echo (!$display_on_listing ? 'style="display:none"' : '') ;?>> | |
| 412 | + <tr <?php echo (!$display_on_listing ? 'style="display:none"' : ''); ?>> | |
| 413 | 413 |                  <td><strong><?php _e('Show on listing page ? :', 'geodirectory'); ?></strong></td>
 | 
| 414 | 414 | <td align="left"> | 
| 415 | 415 | <select name="show_on_listing" id="show_on_listing"> | 
| @@ -468,7 +468,7 @@ discard block | ||
| 468 | 468 |                  case 'taxonomy': {
 | 
| 469 | 469 | ?> | 
| 470 | 470 | <tr> | 
| 471 | -                        <td><strong><?php _e('Select taxonomy:', 'geodirectory');?></strong></td>
 | |
| 471 | +                        <td><strong><?php _e('Select taxonomy:', 'geodirectory'); ?></strong></td>
 | |
| 472 | 472 | <td align="left"> | 
| 473 | 473 | <select name="htmlvar_name" id="htmlvar_name"> | 
| 474 | 474 | <?php | 
| @@ -478,40 +478,40 @@ discard block | ||
| 478 | 478 | ?> | 
| 479 | 479 |                                      <option <?php if (isset($field_info->htmlvar_name) && $field_info->htmlvar_name == $gd_tax) {
 | 
| 480 | 480 | echo 'selected="selected"'; | 
| 481 | - }?> id="<?php echo $gd_tax;?>"><?php echo $gd_tax;?></option><?php | |
| 481 | + }?> id="<?php echo $gd_tax; ?>"><?php echo $gd_tax; ?></option><?php | |
| 482 | 482 | } | 
| 483 | 483 | ?> | 
| 484 | 484 | </select> | 
| 485 | 485 | |
| 486 | 486 | <br/> | 
| 487 | -                            <span><?php _e('Selected taxonomy name use as field name index. ex:-( post_category[gd_placecategory] )', 'geodirectory');?></span>
 | |
| 487 | +                            <span><?php _e('Selected taxonomy name use as field name index. ex:-( post_category[gd_placecategory] )', 'geodirectory'); ?></span>
 | |
| 488 | 488 | </td> | 
| 489 | 489 | </tr> | 
| 490 | 490 | |
| 491 | 491 | <tr> | 
| 492 | -                        <td><strong><?php _e('Category display type :', 'geodirectory');?></strong></td>
 | |
| 492 | +                        <td><strong><?php _e('Category display type :', 'geodirectory'); ?></strong></td>
 | |
| 493 | 493 | <td align="left"> | 
| 494 | 494 | |
| 495 | 495 | <select name="cat_display_type" id="cat_display_type"> | 
| 496 | 496 |                                  <option <?php if (isset($field_info->extra_fields) && unserialize($field_info->extra_fields) == 'ajax_chained') {
 | 
| 497 | 497 | echo 'selected="selected"'; | 
| 498 | -                                }?> value="ajax_chained"><?php _e('Ajax Chained', 'geodirectory');?></option>
 | |
| 498 | +                                }?> value="ajax_chained"><?php _e('Ajax Chained', 'geodirectory'); ?></option>
 | |
| 499 | 499 |                                  <option <?php if (isset($field_info->extra_fields) && unserialize($field_info->extra_fields) == 'select') {
 | 
| 500 | 500 | echo 'selected="selected"'; | 
| 501 | -                                }?> value="select"><?php _e('Select', 'geodirectory');?></option>
 | |
| 501 | +                                }?> value="select"><?php _e('Select', 'geodirectory'); ?></option>
 | |
| 502 | 502 |                                  <option <?php if (isset($field_info->extra_fields) && unserialize($field_info->extra_fields) == 'multiselect') {
 | 
| 503 | 503 | echo 'selected="selected"'; | 
| 504 | -                                }?> value="multiselect"><?php _e('Multiselect', 'geodirectory');?></option>
 | |
| 504 | +                                }?> value="multiselect"><?php _e('Multiselect', 'geodirectory'); ?></option>
 | |
| 505 | 505 |                                  <option <?php if (isset($field_info->extra_fields) && unserialize($field_info->extra_fields) == 'checkbox') {
 | 
| 506 | 506 | echo 'selected="selected"'; | 
| 507 | -                                }?> value="checkbox"><?php _e('Checkbox', 'geodirectory');?></option>
 | |
| 507 | +                                }?> value="checkbox"><?php _e('Checkbox', 'geodirectory'); ?></option>
 | |
| 508 | 508 |                                  <option <?php if (isset($field_info->extra_fields) && unserialize($field_info->extra_fields) == 'radio') {
 | 
| 509 | 509 | echo 'selected="selected"'; | 
| 510 | -                                }?> value="radio"><?php _e('Radio', 'geodirectory');?></option>
 | |
| 510 | +                                }?> value="radio"><?php _e('Radio', 'geodirectory'); ?></option>
 | |
| 511 | 511 | </select> | 
| 512 | 512 | |
| 513 | 513 | <br/> | 
| 514 | -                            <span><?php _e('Show categories list as select,multiselect,checkbox or radio', 'geodirectory');?></span>
 | |
| 514 | +                            <span><?php _e('Show categories list as select,multiselect,checkbox or radio', 'geodirectory'); ?></span>
 | |
| 515 | 515 | </td> | 
| 516 | 516 | </tr> | 
| 517 | 517 | <?php } // end of additional field for taxonomy field type | 
| @@ -532,92 +532,92 @@ discard block | ||
| 532 | 532 |                      do_action('geodir_address_extra_admin_fields', $address, $field_info); ?>
 | 
| 533 | 533 | |
| 534 | 534 | <tr> | 
| 535 | -                        <td><strong><?php _e('Display zip/post code :', 'geodirectory');?></strong></td>
 | |
| 535 | +                        <td><strong><?php _e('Display zip/post code :', 'geodirectory'); ?></strong></td>
 | |
| 536 | 536 | <td align="left"> | 
| 537 | 537 | <input type="checkbox" name="extra[show_zip]" id="show_zip" | 
| 538 | 538 |                                     value="1" <?php if (isset($address['show_zip']) && $address['show_zip'] == '1') {
 | 
| 539 | 539 | echo 'checked="checked"'; | 
| 540 | 540 | }?>/> | 
| 541 | -                            <span><?php _e('Select if you want to show zip/post code field in address section.', 'geodirectory');?></span>
 | |
| 541 | +                            <span><?php _e('Select if you want to show zip/post code field in address section.', 'geodirectory'); ?></span>
 | |
| 542 | 542 | </td> | 
| 543 | 543 | </tr> | 
| 544 | 544 | |
| 545 | 545 | <tr> | 
| 546 | -                        <td><strong><?php _e('Zip/Post code label :', 'geodirectory');?></strong></td>
 | |
| 546 | +                        <td><strong><?php _e('Zip/Post code label :', 'geodirectory'); ?></strong></td>
 | |
| 547 | 547 | <td align="left"> | 
| 548 | 548 | <input type="text" name="extra[zip_lable]" id="zip_lable" | 
| 549 | 549 |                                     value="<?php if (isset($address['zip_lable'])) {
 | 
| 550 | 550 | echo esc_attr($address['zip_lable']); | 
| 551 | 551 | }?>"/> | 
| 552 | -                            <span><?php _e('Enter zip/post code field label in address section.', 'geodirectory');?></span>
 | |
| 552 | +                            <span><?php _e('Enter zip/post code field label in address section.', 'geodirectory'); ?></span>
 | |
| 553 | 553 | </td> | 
| 554 | 554 | </tr> | 
| 555 | 555 | |
| 556 | 556 | <tr style="display:none;"> | 
| 557 | -                        <td><strong><?php _e('Display map :', 'geodirectory');?></strong></td>
 | |
| 557 | +                        <td><strong><?php _e('Display map :', 'geodirectory'); ?></strong></td>
 | |
| 558 | 558 | <td align="left"> | 
| 559 | 559 | <input type="checkbox" name="extra[show_map]" id="show_map" | 
| 560 | 560 |                                     value="1" <?php if (isset($address['show_map']) && $address['show_map'] == '1') {
 | 
| 561 | 561 | echo 'checked="checked"'; | 
| 562 | 562 | }?>/> | 
| 563 | -                            <span><?php _e('Select if you want to `set address on map` field in address section.', 'geodirectory');?></span>
 | |
| 563 | +                            <span><?php _e('Select if you want to `set address on map` field in address section.', 'geodirectory'); ?></span>
 | |
| 564 | 564 | </td> | 
| 565 | 565 | </tr> | 
| 566 | 566 | |
| 567 | 567 | <tr> | 
| 568 | -                        <td><strong><?php _e('Map button label :', 'geodirectory');?></strong></td>
 | |
| 568 | +                        <td><strong><?php _e('Map button label :', 'geodirectory'); ?></strong></td>
 | |
| 569 | 569 | <td align="left"> | 
| 570 | 570 | <input type="text" name="extra[map_lable]" id="map_lable" | 
| 571 | 571 |                                     value="<?php if (isset($address['map_lable'])) {
 | 
| 572 | 572 | echo esc_attr($address['map_lable']); | 
| 573 | 573 | }?>"/> | 
| 574 | -                            <span><?php _e('Enter text for  `set address on map` button in address section.', 'geodirectory');?></span>
 | |
| 574 | +                            <span><?php _e('Enter text for  `set address on map` button in address section.', 'geodirectory'); ?></span>
 | |
| 575 | 575 | </td> | 
| 576 | 576 | </tr> | 
| 577 | 577 | |
| 578 | 578 | <tr> | 
| 579 | -                        <td><strong><?php _e('Use user zoom level:', 'geodirectory');?></strong></td>
 | |
| 579 | +                        <td><strong><?php _e('Use user zoom level:', 'geodirectory'); ?></strong></td>
 | |
| 580 | 580 | <td align="left"> | 
| 581 | 581 | <input type="checkbox" name="extra[show_mapzoom]" id="show_mapzoom" | 
| 582 | 582 |                                     value="1" <?php if (isset($address['show_mapzoom']) && $address['show_mapzoom'] == '1') {
 | 
| 583 | 583 | echo 'checked="checked"'; | 
| 584 | 584 | }?>/> | 
| 585 | -                            <span><?php _e('Select if you want to use the user defined map zoom level.', 'geodirectory');?></span>
 | |
| 585 | +                            <span><?php _e('Select if you want to use the user defined map zoom level.', 'geodirectory'); ?></span>
 | |
| 586 | 586 | </td> | 
| 587 | 587 | </tr> | 
| 588 | 588 | |
| 589 | 589 | <tr> | 
| 590 | -                        <td><strong><?php _e('Display map view:', 'geodirectory');?></strong></td>
 | |
| 590 | +                        <td><strong><?php _e('Display map view:', 'geodirectory'); ?></strong></td>
 | |
| 591 | 591 | <td align="left"> | 
| 592 | 592 | <input type="checkbox" name="extra[show_mapview]" id="show_mapview" | 
| 593 | 593 |                                     value="1" <?php if (isset($address['show_mapview']) && $address['show_mapview'] == '1') {
 | 
| 594 | 594 | echo 'checked="checked"'; | 
| 595 | 595 | }?>/> | 
| 596 | -                            <span><?php _e('Select if you want to `set default map` options in address section.', 'geodirectory');?></span>
 | |
| 596 | +                            <span><?php _e('Select if you want to `set default map` options in address section.', 'geodirectory'); ?></span>
 | |
| 597 | 597 | </td> | 
| 598 | 598 | </tr> | 
| 599 | 599 | |
| 600 | 600 | |
| 601 | 601 | <tr> | 
| 602 | -                        <td><strong><?php _e('Map view label :', 'geodirectory');?></strong></td>
 | |
| 602 | +                        <td><strong><?php _e('Map view label :', 'geodirectory'); ?></strong></td>
 | |
| 603 | 603 | <td align="left"> | 
| 604 | 604 | <input type="text" name="extra[mapview_lable]" id="mapview_lable" | 
| 605 | 605 |                                     value="<?php if (isset($address['mapview_lable'])) {
 | 
| 606 | 606 | echo esc_attr($address['mapview_lable']); | 
| 607 | 607 | }?>"/> | 
| 608 | -                            <span><?php _e('Enter mapview field label in address section.', 'geodirectory');?></span>
 | |
| 608 | +                            <span><?php _e('Enter mapview field label in address section.', 'geodirectory'); ?></span>
 | |
| 609 | 609 | </td> | 
| 610 | 610 | </tr> | 
| 611 | 611 | <tr> | 
| 612 | 612 | <td> | 
| 613 | -                            <strong><?php _e('Show latitude and longitude from front-end :', 'geodirectory');?></strong>
 | |
| 613 | +                            <strong><?php _e('Show latitude and longitude from front-end :', 'geodirectory'); ?></strong>
 | |
| 614 | 614 | </td> | 
| 615 | 615 | <td align="left"> | 
| 616 | 616 | <input type="checkbox" name="extra[show_latlng]" id="show_latlng" | 
| 617 | 617 |                                     value="1" <?php if (isset($address['show_latlng']) && $address['show_latlng'] == '1') {
 | 
| 618 | 618 | echo 'checked="checked"'; | 
| 619 | 619 | }?>/> | 
| 620 | -                            <span><?php _e('Select if you want to show latitude and longitude fields in address section from front-end.', 'geodirectory');?></span>
 | |
| 620 | +                            <span><?php _e('Select if you want to show latitude and longitude fields in address section from front-end.', 'geodirectory'); ?></span>
 | |
| 621 | 621 | </td> | 
| 622 | 622 | </tr> | 
| 623 | 623 | <?php } // end of extra fields for address field type | 
| @@ -629,41 +629,41 @@ discard block | ||
| 629 | 629 | |
| 630 | 630 | ?> | 
| 631 | 631 | <tr> | 
| 632 | -                            <td><strong><?php _e('Multiselect display type :', 'geodirectory');?></strong></td>
 | |
| 632 | +                            <td><strong><?php _e('Multiselect display type :', 'geodirectory'); ?></strong></td>
 | |
| 633 | 633 | <td align="left"> | 
| 634 | 634 | |
| 635 | 635 | <select name="multi_display_type" id="multi_display_type"> | 
| 636 | 636 |                                      <option <?php if (isset($field_info->extra_fields) && unserialize($field_info->extra_fields) == 'select') {
 | 
| 637 | 637 | echo 'selected="selected"'; | 
| 638 | -                                    }?> value="select"><?php _e('Select', 'geodirectory');?></option>
 | |
| 638 | +                                    }?> value="select"><?php _e('Select', 'geodirectory'); ?></option>
 | |
| 639 | 639 |                                      <option <?php if (isset($field_info->extra_fields) && unserialize($field_info->extra_fields) == 'checkbox') {
 | 
| 640 | 640 | echo 'selected="selected"'; | 
| 641 | -                                    }?> value="checkbox"><?php _e('Checkbox', 'geodirectory');?></option>
 | |
| 641 | +                                    }?> value="checkbox"><?php _e('Checkbox', 'geodirectory'); ?></option>
 | |
| 642 | 642 |                                      <option <?php if (isset($field_info->extra_fields) && unserialize($field_info->extra_fields) == 'radio') {
 | 
| 643 | 643 | echo 'selected="selected"'; | 
| 644 | -                                    }?> value="radio"><?php _e('Radio', 'geodirectory');?></option>
 | |
| 644 | +                                    }?> value="radio"><?php _e('Radio', 'geodirectory'); ?></option>
 | |
| 645 | 645 | </select> | 
| 646 | 646 | |
| 647 | 647 | <br/> | 
| 648 | -                                <span><?php _e('Show multiselect list as multiselect,checkbox or radio', 'geodirectory');?></span>
 | |
| 648 | +                                <span><?php _e('Show multiselect list as multiselect,checkbox or radio', 'geodirectory'); ?></span>
 | |
| 649 | 649 | </td> | 
| 650 | 650 | </tr> | 
| 651 | 651 | <?php | 
| 652 | 652 | } | 
| 653 | 653 | ?> | 
| 654 | 654 | <tr> | 
| 655 | -                        <td><strong><?php _e('Option Values :', 'geodirectory');?></strong></td>
 | |
| 655 | +                        <td><strong><?php _e('Option Values :', 'geodirectory'); ?></strong></td>
 | |
| 656 | 656 | <td align="left"> | 
| 657 | 657 | <input type="text" name="option_values" id="option_values" | 
| 658 | 658 |                                     value="<?php if (isset($field_info->option_values)) {
 | 
| 659 | 659 | echo esc_attr($field_info->option_values); | 
| 660 | 660 | }?>"/> | 
| 661 | 661 | <br/> | 
| 662 | -                            <span><?php _e('Option Values should be separated by comma.', 'geodirectory');?></span>
 | |
| 662 | +                            <span><?php _e('Option Values should be separated by comma.', 'geodirectory'); ?></span>
 | |
| 663 | 663 | <br/> | 
| 664 | -                            <span><?php _e('If using for a "tick filter" place a / and then either a 1 for true or 0 for false', 'geodirectory');?></span>
 | |
| 664 | +                            <span><?php _e('If using for a "tick filter" place a / and then either a 1 for true or 0 for false', 'geodirectory'); ?></span>
 | |
| 665 | 665 | <br/> | 
| 666 | -                            <span><?php _e('eg: "No Dogs Allowed/0,Dogs Allowed/1" (Select only, not multiselect)', 'geodirectory');?></span>
 | |
| 666 | +                            <span><?php _e('eg: "No Dogs Allowed/0,Dogs Allowed/1" (Select only, not multiselect)', 'geodirectory'); ?></span>
 | |
| 667 | 667 |                              <?php if ($field_type == 'multiselect' || $field_type == 'select') { ?>
 | 
| 668 | 668 | <br/> | 
| 669 | 669 |                                  <span><?php _e('- If using OPTGROUP tag to grouping options, use "{optgroup}OPTGROUP-LABEL|OPTION-1,OPTION-2{/optgroup}"', 'geodirectory'); ?></span>
 | 
| @@ -681,7 +681,7 @@ discard block | ||
| 681 | 681 | } | 
| 682 | 682 | ?> | 
| 683 | 683 | <tr> | 
| 684 | -                        <td><strong><?php _e('Date Format :', 'geodirectory');?></strong></td>
 | |
| 684 | +                        <td><strong><?php _e('Date Format :', 'geodirectory'); ?></strong></td>
 | |
| 685 | 685 | <td align="left" style="overflow:inherit;"> | 
| 686 | 686 | <?php | 
| 687 | 687 | $date_formats = array( | 
| @@ -699,21 +699,21 @@ discard block | ||
| 699 | 699 | * @since 1.6.5 | 
| 700 | 700 | * @param array $date_formats The PHP date format array. | 
| 701 | 701 | */ | 
| 702 | -                            $date_formats = apply_filters('geodir_date_formats',$date_formats);
 | |
| 702 | +                            $date_formats = apply_filters('geodir_date_formats', $date_formats);
 | |
| 703 | 703 | ?> | 
| 704 | 704 | <select name="extra[date_format]" id="date_format"> | 
| 705 | 705 | <?php | 
| 706 | -                                foreach($date_formats as $format){
 | |
| 706 | +                                foreach ($date_formats as $format) {
 | |
| 707 | 707 | $selected = ''; | 
| 708 | -                                    if(esc_attr($extra['date_format'])==$format){
 | |
| 708 | +                                    if (esc_attr($extra['date_format']) == $format) {
 | |
| 709 | 709 | $selected = "selected='selected'"; | 
| 710 | 710 | } | 
| 711 | -                                    echo "<option $selected value='$format'>$format       (".date_i18n( $format, time()).")</option>";
 | |
| 711 | +                                    echo "<option $selected value='$format'>$format       (".date_i18n($format, time()).")</option>";
 | |
| 712 | 712 | } | 
| 713 | 713 | ?> | 
| 714 | 714 | </select> | 
| 715 | 715 | |
| 716 | -                            <span><?php _e('Select the date format.', 'geodirectory');?></span>
 | |
| 716 | +                            <span><?php _e('Select the date format.', 'geodirectory'); ?></span>
 | |
| 717 | 717 | </td> | 
| 718 | 718 | </tr> | 
| 719 | 719 | <?php | 
| @@ -726,20 +726,20 @@ discard block | ||
| 726 | 726 |  					$gd_file_types = !empty($extra_fields) && !empty($extra_fields['gd_file_types']) ? $extra_fields['gd_file_types'] : array('*');
 | 
| 727 | 727 | ?> | 
| 728 | 728 | <tr> | 
| 729 | -					  <td><strong><?php _e('Allowed file types:', 'geodirectory');?></strong></td>
 | |
| 729 | +					  <td><strong><?php _e('Allowed file types:', 'geodirectory'); ?></strong></td>
 | |
| 730 | 730 | <td align="left"> | 
| 731 | 731 | <select name="extra[gd_file_types][]" id="gd_file_types" multiple="multiple" style="height:100px;width:90%;"> | 
| 732 | -								<option value="*" <?php selected(true, in_array('*', $gd_file_types));?>><?php _e('All types', 'geodirectory') ;?></option>
 | |
| 733 | -								<?php foreach ( $allowed_file_types as $format => $types ) { ?>
 | |
| 734 | -								<optgroup label="<?php echo esc_attr( wp_sprintf(__('%s formats', 'geodirectory'), __($format, 'geodirectory') ) ) ;?>">
 | |
| 735 | -									<?php foreach ( $types as $ext => $type ) { ?>
 | |
| 736 | - <option value="<?php echo esc_attr($ext) ;?>" <?php selected(true, in_array($ext, $gd_file_types));?>><?php echo '.' . $ext ;?></option> | |
| 732 | +								<option value="*" <?php selected(true, in_array('*', $gd_file_types)); ?>><?php _e('All types', 'geodirectory'); ?></option>
 | |
| 733 | +								<?php foreach ($allowed_file_types as $format => $types) { ?>
 | |
| 734 | +								<optgroup label="<?php echo esc_attr(wp_sprintf(__('%s formats', 'geodirectory'), __($format, 'geodirectory'))); ?>">
 | |
| 735 | +									<?php foreach ($types as $ext => $type) { ?>
 | |
| 736 | + <option value="<?php echo esc_attr($ext); ?>" <?php selected(true, in_array($ext, $gd_file_types)); ?>><?php echo '.'.$ext; ?></option> | |
| 737 | 737 | <?php } ?> | 
| 738 | 738 | </optgroup> | 
| 739 | 739 | <?php } ?> | 
| 740 | 740 | </select> | 
| 741 | 741 | <br /> | 
| 742 | -							<span><?php _e('Select file types to allowed for file uploading. (Select multiple file types by holding down "Ctrl" key.)', GEODIRPAYMENT_TEXTDOMAIN);?></span>				
 | |
| 742 | +							<span><?php _e('Select file types to allowed for file uploading. (Select multiple file types by holding down "Ctrl" key.)', GEODIRPAYMENT_TEXTDOMAIN); ?></span>				
 | |
| 743 | 743 | </td> | 
| 744 | 744 | </tr> | 
| 745 | 745 | <?php | 
| @@ -754,28 +754,28 @@ discard block | ||
| 754 | 754 | </tr> | 
| 755 | 755 | |
| 756 | 756 | <tr> | 
| 757 | -                    <td><strong><?php _e('Upload icon:', 'geodirectory');?></strong></td>
 | |
| 757 | +                    <td><strong><?php _e('Upload icon:', 'geodirectory'); ?></strong></td>
 | |
| 758 | 758 | <td align="left"> | 
| 759 | 759 | <input type="text" name="field_icon" id="field_icon" | 
| 760 | 760 |                                 value="<?php if (isset($field_info->field_icon)) {
 | 
| 761 | 761 | echo $field_info->field_icon; | 
| 762 | 762 | }?>"/> | 
| 763 | 763 | <span> | 
| 764 | -                        <?php _e('Upload icon using media and enter its url path, or enter <a href="http://fortawesome.github.io/Font-Awesome/icons/" target="_blank" >font awesome </a>class eg:"fa fa-home"', 'geodirectory');?>
 | |
| 764 | +                        <?php _e('Upload icon using media and enter its url path, or enter <a href="http://fortawesome.github.io/Font-Awesome/icons/" target="_blank" >font awesome </a>class eg:"fa fa-home"', 'geodirectory'); ?>
 | |
| 765 | 765 | </span> | 
| 766 | 766 | </td> | 
| 767 | 767 | </td> | 
| 768 | 768 | </tr> | 
| 769 | 769 | |
| 770 | 770 | <tr> | 
| 771 | -                    <td><strong><?php _e('Css class:', 'geodirectory');?></strong></td>
 | |
| 771 | +                    <td><strong><?php _e('Css class:', 'geodirectory'); ?></strong></td>
 | |
| 772 | 772 | <td align="left"> | 
| 773 | 773 | <input type="text" name="css_class" id="css_class" | 
| 774 | 774 |                                 value="<?php if (isset($field_info->css_class)) {
 | 
| 775 | 775 | echo esc_attr($field_info->css_class); | 
| 776 | 776 | }?>"/> | 
| 777 | 777 | <span> | 
| 778 | -                        <?php _e('Enter custom css class for field custom style.', 'geodirectory');?>
 | |
| 778 | +                        <?php _e('Enter custom css class for field custom style.', 'geodirectory'); ?>
 | |
| 779 | 779 | </span> | 
| 780 | 780 | </td> | 
| 781 | 781 | </td> | 
| @@ -833,7 +833,7 @@ discard block | ||
| 833 | 833 | * @since 1.0.0 | 
| 834 | 834 | * @param object $field_info The current fields info. | 
| 835 | 835 | */ | 
| 836 | -                    do_action('geodir_advance_custom_fields', $field_info);?>
 | |
| 836 | +                    do_action('geodir_advance_custom_fields', $field_info); ?>
 | |
| 837 | 837 | |
| 838 | 838 |                      <?php /*if(!in_array($field_type,array() )){?>
 | 
| 839 | 839 | <tr> | 
| @@ -848,10 +848,10 @@ discard block | ||
| 848 | 848 | <tr> | 
| 849 | 849 | <td> </td> | 
| 850 | 850 | <td align="left"> | 
| 851 | -                    <input type="button" class="button" name="save" id="save" value="<?php echo esc_attr(__('Save','geodirectory'));?>"
 | |
| 851 | +                    <input type="button" class="button" name="save" id="save" value="<?php echo esc_attr(__('Save', 'geodirectory')); ?>"
 | |
| 852 | 852 |                             onclick="save_field('<?php echo esc_attr($result_str); ?>')"/>
 | 
| 853 | 853 | <?php if (!$default): ?> | 
| 854 | -                        <a href="javascript:void(0)"><input type="button" name="delete" value="<?php echo esc_attr(__('Delete','geodirectory'));?>"
 | |
| 854 | +                        <a href="javascript:void(0)"><input type="button" name="delete" value="<?php echo esc_attr(__('Delete', 'geodirectory')); ?>"
 | |
| 855 | 855 |                                                              onclick="delete_field('<?php echo esc_attr($result_str); ?>', '<?php echo $nonce; ?>')"
 | 
| 856 | 856 | class="button_n"/></a> | 
| 857 | 857 | <?php endif; ?> |