@@ -27,12 +27,12 @@ |
||
27 | 27 | if (!empty($wpdb->collate)) $collate .= " COLLATE $wpdb->collate"; |
28 | 28 | } |
29 | 29 | |
30 | - /** |
|
31 | - * Include any functions needed for upgrades. |
|
32 | - * |
|
33 | - * @since 1.0.0 |
|
34 | - */ |
|
35 | - require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); |
|
30 | + /** |
|
31 | + * Include any functions needed for upgrades. |
|
32 | + * |
|
33 | + * @since 1.0.0 |
|
34 | + */ |
|
35 | + require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); |
|
36 | 36 | |
37 | 37 | |
38 | 38 | // rename tables if we need to |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * GeoDirectory Installation related functions. |
|
4 | - * |
|
5 | - * Plugin install script which adds default pages, taxonomies, and database tables. |
|
6 | - * |
|
7 | - * @since 1.0.0 |
|
8 | - * @package GeoDirectory |
|
9 | - */ |
|
3 | + * GeoDirectory Installation related functions. |
|
4 | + * |
|
5 | + * Plugin install script which adds default pages, taxonomies, and database tables. |
|
6 | + * |
|
7 | + * @since 1.0.0 |
|
8 | + * @package GeoDirectory |
|
9 | + */ |
|
10 | 10 | |
11 | 11 | /** |
12 | 12 | * Include custom database table related functions. |
@@ -7,12 +7,12 @@ |
||
7 | 7 | */ |
8 | 8 | |
9 | 9 | if (isset($_REQUEST['create_field'])) { |
10 | - /** |
|
11 | - * Includes file to create custom fields. |
|
12 | - * |
|
13 | - * @since 1.0.0 |
|
14 | - */ |
|
15 | - include_once(geodir_plugin_path() . '/geodirectory-admin/option-pages/create_field.php'); |
|
10 | + /** |
|
11 | + * Includes file to create custom fields. |
|
12 | + * |
|
13 | + * @since 1.0.0 |
|
14 | + */ |
|
15 | + include_once(geodir_plugin_path() . '/geodirectory-admin/option-pages/create_field.php'); |
|
16 | 16 | die; |
17 | 17 | } |
18 | 18 |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Creates custom fields |
|
4 | - * |
|
5 | - * @since 1.0.0 |
|
6 | - * @package GeoDirectory |
|
7 | - */ |
|
3 | + * Creates custom fields |
|
4 | + * |
|
5 | + * @since 1.0.0 |
|
6 | + * @package GeoDirectory |
|
7 | + */ |
|
8 | 8 | $data_type = ''; |
9 | 9 | |
10 | 10 | if (isset($_REQUEST['data_type'])) |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | 'radiogroup' => '' |
45 | 45 | ), |
46 | 46 | |
47 | - array( |
|
47 | + array( |
|
48 | 48 | 'name' => __('Add country and city slug in listing urls', 'geodirectory'), |
49 | 49 | 'desc' => __('Add country and city slug in listing urls (/country/city/)', 'geodirectory'), |
50 | 50 | 'id' => 'geodir_show_location_url', |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | 'value' => 'country_city', |
54 | 54 | 'radiogroup' => '' |
55 | 55 | ), |
56 | - array( |
|
56 | + array( |
|
57 | 57 | 'name' => __('Add region and city slug in listing urls', 'geodirectory'), |
58 | 58 | 'desc' => __('Add region and city slug in listing urls (/region/city/)', 'geodirectory'), |
59 | 59 | 'id' => 'geodir_show_location_url', |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | global $wpdb, $gd_session; |
122 | 122 | |
123 | 123 | if (isset($_REQUEST['gd_listing_view']) && $_REQUEST['gd_listing_view'] != '') { |
124 | - $gd_session->set('gd_listing_view', $_REQUEST['gd_listing_view']); |
|
124 | + $gd_session->set('gd_listing_view', $_REQUEST['gd_listing_view']); |
|
125 | 125 | echo '1'; |
126 | 126 | } |
127 | 127 | |
@@ -364,17 +364,17 @@ discard block |
||
364 | 364 | if (isset($_REQUEST['ajax_action']) && $_REQUEST['ajax_action'] == 'geodir_get_term_list') { |
365 | 365 | $terms_o = get_terms(sanitize_text_field($_REQUEST['term'])); |
366 | 366 | |
367 | - // Skip terms which has no listing |
|
368 | - if (!empty($terms_o)) { |
|
369 | - $filter_terms = array(); |
|
367 | + // Skip terms which has no listing |
|
368 | + if (!empty($terms_o)) { |
|
369 | + $filter_terms = array(); |
|
370 | 370 | |
371 | - foreach ($terms_o as $term) { |
|
372 | - if ($term->count > 0) { |
|
373 | - $filter_terms[] = $term; |
|
374 | - } |
|
375 | - } |
|
376 | - $terms_o = $filter_terms; |
|
377 | - } |
|
371 | + foreach ($terms_o as $term) { |
|
372 | + if ($term->count > 0) { |
|
373 | + $filter_terms[] = $term; |
|
374 | + } |
|
375 | + } |
|
376 | + $terms_o = $filter_terms; |
|
377 | + } |
|
378 | 378 | |
379 | 379 | $terms = geodir_sort_terms($terms_o, 'count'); |
380 | 380 | geodir_helper_cat_list_output($terms, intval($_REQUEST['limit'])); |
@@ -1,19 +1,19 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Enfold theme compatibility functions. |
|
4 | - * |
|
5 | - * This file lets the GeoDirectory Plugin use the Enfold theme HTML wrappers to fit and work perfectly. |
|
6 | - * |
|
7 | - * @since 1.0.0 |
|
8 | - * @package GeoDirectory |
|
9 | - */ |
|
3 | + * Enfold theme compatibility functions. |
|
4 | + * |
|
5 | + * This file lets the GeoDirectory Plugin use the Enfold theme HTML wrappers to fit and work perfectly. |
|
6 | + * |
|
7 | + * @since 1.0.0 |
|
8 | + * @package GeoDirectory |
|
9 | + */ |
|
10 | 10 | add_action('after_setup_theme', 'enfold_action_calls', 11); |
11 | 11 | /** |
12 | - * Action calls for enfold theme compatibility. |
|
13 | - * |
|
14 | - * @since 1.0.0 |
|
15 | - * @package GeoDirectory |
|
16 | - */ |
|
12 | + * Action calls for enfold theme compatibility. |
|
13 | + * |
|
14 | + * @since 1.0.0 |
|
15 | + * @package GeoDirectory |
|
16 | + */ |
|
17 | 17 | function enfold_action_calls() |
18 | 18 | { |
19 | 19 |
@@ -1,19 +1,19 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Jupiter theme compatibility functions. |
|
4 | - * |
|
5 | - * This file lets the GeoDirectory Plugin use the Jupiter theme HTML wrappers to fit and work perfectly. |
|
6 | - * |
|
7 | - * @since 1.0.0 |
|
8 | - * @package GeoDirectory |
|
9 | - */ |
|
3 | + * Jupiter theme compatibility functions. |
|
4 | + * |
|
5 | + * This file lets the GeoDirectory Plugin use the Jupiter theme HTML wrappers to fit and work perfectly. |
|
6 | + * |
|
7 | + * @since 1.0.0 |
|
8 | + * @package GeoDirectory |
|
9 | + */ |
|
10 | 10 | add_action('after_setup_theme', 'jupiter_action_calls', 11); |
11 | 11 | /** |
12 | - * Action calls for jupiter theme compatibility. |
|
13 | - * |
|
14 | - * @since 1.0.0 |
|
15 | - * @package GeoDirectory |
|
16 | - */ |
|
12 | + * Action calls for jupiter theme compatibility. |
|
13 | + * |
|
14 | + * @since 1.0.0 |
|
15 | + * @package GeoDirectory |
|
16 | + */ |
|
17 | 17 | function jupiter_action_calls() |
18 | 18 | { |
19 | 19 | // REMOVE BREADCRUMB |
@@ -1,11 +1,11 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Admin custom field form |
|
4 | - * |
|
5 | - * @since 1.0.0 |
|
6 | - * |
|
7 | - * @package GeoDirectory |
|
8 | - */ |
|
3 | + * Admin custom field form |
|
4 | + * |
|
5 | + * @since 1.0.0 |
|
6 | + * |
|
7 | + * @package GeoDirectory |
|
8 | + */ |
|
9 | 9 | |
10 | 10 | /** |
11 | 11 | * Displays the custom field form content. |
@@ -36,8 +36,8 @@ discard block |
||
36 | 36 | // Remove Send Enquiry | Send To Friend from listings page |
37 | 37 | $htmlvar_name = isset($field_info->htmlvar_name) && $field_info->htmlvar_name != '' ? $field_info->htmlvar_name : ''; |
38 | 38 | if ($htmlvar_name == 'geodir_email') { |
39 | - $field_info->show_on_listing = 0; |
|
40 | - $display_on_listing = false; |
|
39 | + $field_info->show_on_listing = 0; |
|
40 | + $display_on_listing = false; |
|
41 | 41 | } |
42 | 42 | $field_data_type = isset($field_info->data_type) ? $field_info->data_type : ''; |
43 | 43 | ?> |
@@ -74,10 +74,10 @@ discard block |
||
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; ?>"/> |
@@ -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,8 +163,8 @@ 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> |
@@ -176,8 +176,8 @@ discard block |
||
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) { |
|
179 | + echo preg_replace('/geodir_/', '', $field_info->htmlvar_name, 1); |
|
180 | + }?>" <?php if ($default) { |
|
181 | 181 | echo 'readonly="readonly"'; |
182 | 182 | }?> /> |
183 | 183 | <br/> <span><?php _e('HTML variable name must not be blank', 'geodirectory');?></span> |
@@ -198,9 +198,9 @@ discard block |
||
198 | 198 | </td> |
199 | 199 | </tr> |
200 | 200 | <?php |
201 | - if ($field_type != 'textarea' && $field_type != 'html' && $field_type != 'file' && $field_type != 'fieldset' && $field_type != 'taxonomy' && $field_type != 'address') { |
|
202 | - $default_value = isset($field_info->default_value) ? $field_info->default_value : ''; |
|
203 | - ?> |
|
201 | + if ($field_type != 'textarea' && $field_type != 'html' && $field_type != 'file' && $field_type != 'fieldset' && $field_type != 'taxonomy' && $field_type != 'address') { |
|
202 | + $default_value = isset($field_info->default_value) ? $field_info->default_value : ''; |
|
203 | + ?> |
|
204 | 204 | <tr> |
205 | 205 | <td><strong><?php _e('Default value :', 'geodirectory');?></strong></td> |
206 | 206 | <td align="left"> |
@@ -299,18 +299,18 @@ discard block |
||
299 | 299 | <?php |
300 | 300 | $html = ob_get_clean(); |
301 | 301 | |
302 | - /** |
|
303 | - * Filter the price packages list. |
|
304 | - * |
|
305 | - * Filter the price packages list in custom field form in admin |
|
302 | + /** |
|
303 | + * Filter the price packages list. |
|
304 | + * |
|
305 | + * Filter the price packages list in custom field form in admin |
|
306 | 306 | * custom fields settings. |
307 | - * |
|
308 | - * @since 1.0.0 |
|
309 | - * |
|
310 | - * @param string $html The price packages content. |
|
311 | - * @param object $field_info Current field object. |
|
312 | - */ |
|
313 | - echo $html = apply_filters('geodir_packages_list_on_custom_fields', $html, $field_info); |
|
307 | + * |
|
308 | + * @since 1.0.0 |
|
309 | + * |
|
310 | + * @param string $html The price packages content. |
|
311 | + * @param object $field_info Current field object. |
|
312 | + */ |
|
313 | + echo $html = apply_filters('geodir_packages_list_on_custom_fields', $html, $field_info); |
|
314 | 314 | |
315 | 315 | ?> |
316 | 316 | |
@@ -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> |
@@ -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> |
@@ -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> |
@@ -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> |
@@ -656,8 +656,8 @@ discard block |
||
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/> |
@@ -685,8 +685,8 @@ discard block |
||
685 | 685 | <td align="left" style="overflow:inherit;"> |
686 | 686 | <input type="text" name="extra[date_format]" id="date_format" |
687 | 687 | value="<?php if (isset($extra['date_format'])) { |
688 | - echo esc_attr($extra['date_format']); |
|
689 | - }else{echo "mm/dd/yy";}?>"/> |
|
688 | + echo esc_attr($extra['date_format']); |
|
689 | + }else{echo "mm/dd/yy";}?>"/> |
|
690 | 690 | |
691 | 691 | <div style="position:relative; cursor:pointer;"> |
692 | 692 | <span onclick="jQuery('#show_dateformat').toggle();"> |
@@ -770,12 +770,12 @@ discard block |
||
770 | 770 | <?php |
771 | 771 | } |
772 | 772 | break; |
773 | - case 'file': { |
|
774 | - $allowed_file_types = geodir_allowed_mime_types(); |
|
773 | + case 'file': { |
|
774 | + $allowed_file_types = geodir_allowed_mime_types(); |
|
775 | 775 | |
776 | - $extra_fields = isset($field_info->extra_fields) && $field_info->extra_fields != '' ? maybe_unserialize($field_info->extra_fields) : ''; |
|
777 | - $gd_file_types = !empty($extra_fields) && !empty($extra_fields['gd_file_types']) ? $extra_fields['gd_file_types'] : array('*'); |
|
778 | - ?> |
|
776 | + $extra_fields = isset($field_info->extra_fields) && $field_info->extra_fields != '' ? maybe_unserialize($field_info->extra_fields) : ''; |
|
777 | + $gd_file_types = !empty($extra_fields) && !empty($extra_fields['gd_file_types']) ? $extra_fields['gd_file_types'] : array('*'); |
|
778 | + ?> |
|
779 | 779 | <tr> |
780 | 780 | <td><strong><?php _e('Allowed file types:', 'geodirectory');?></strong></td> |
781 | 781 | <td align="left"> |
@@ -794,8 +794,8 @@ discard block |
||
794 | 794 | </td> |
795 | 795 | </tr> |
796 | 796 | <?php |
797 | - } |
|
798 | - break; |
|
797 | + } |
|
798 | + break; |
|
799 | 799 | |
800 | 800 | endswitch; ?> |
801 | 801 | <?php if ($field_type != 'fieldset') { |
@@ -809,8 +809,8 @@ discard block |
||
809 | 809 | <td align="left"> |
810 | 810 | <input type="text" name="field_icon" id="field_icon" |
811 | 811 | value="<?php if (isset($field_info->field_icon)) { |
812 | - echo $field_info->field_icon; |
|
813 | - }?>"/> |
|
812 | + echo $field_info->field_icon; |
|
813 | + }?>"/> |
|
814 | 814 | <span> |
815 | 815 | <?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');?> |
816 | 816 | </span> |
@@ -823,8 +823,8 @@ discard block |
||
823 | 823 | <td align="left"> |
824 | 824 | <input type="text" name="css_class" id="css_class" |
825 | 825 | value="<?php if (isset($field_info->css_class)) { |
826 | - echo esc_attr($field_info->css_class); |
|
827 | - }?>"/> |
|
826 | + echo esc_attr($field_info->css_class); |
|
827 | + }?>"/> |
|
828 | 828 | <span> |
829 | 829 | <?php _e('Enter custom css class for field custom style.', 'geodirectory');?> |
830 | 830 | </span> |
@@ -849,18 +849,18 @@ discard block |
||
849 | 849 | <tr> |
850 | 850 | <td colspan="2" align="left"> |
851 | 851 | <h3><?php |
852 | - /** |
|
853 | - * Filter the section title. |
|
854 | - * |
|
855 | - * Filter the section title in custom field form in admin |
|
856 | - * custom fields settings. |
|
857 | - * |
|
858 | - * @since 1.0.0 |
|
859 | - * |
|
860 | - * @param string $title Title of the section. |
|
861 | - * @param string $field_type Current field type. |
|
862 | - */ |
|
863 | - echo apply_filters('geodir_advance_custom_fields_heading', __('Posts sort options', 'geodirectory'), $field_type); |
|
852 | + /** |
|
853 | + * Filter the section title. |
|
854 | + * |
|
855 | + * Filter the section title in custom field form in admin |
|
856 | + * custom fields settings. |
|
857 | + * |
|
858 | + * @since 1.0.0 |
|
859 | + * |
|
860 | + * @param string $title Title of the section. |
|
861 | + * @param string $field_type Current field type. |
|
862 | + */ |
|
863 | + echo apply_filters('geodir_advance_custom_fields_heading', __('Posts sort options', 'geodirectory'), $field_type); |
|
864 | 864 | |
865 | 865 | ?></h3> |
866 | 866 | </td> |