@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | { |
38 | 38 | $is_detail_page = false; |
39 | 39 | |
40 | - if((is_single() && geodir_is_geodir_page()) || (is_page() && geodir_is_page('preview') )) { |
|
40 | + if ((is_single() && geodir_is_geodir_page()) || (is_page() && geodir_is_page('preview'))) { |
|
41 | 41 | $is_detail_page = true; |
42 | 42 | } |
43 | 43 | |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | 'siteurl' => get_option('siteurl'), |
52 | 52 | 'geodir_plugin_url' => geodir_plugin_url(), |
53 | 53 | 'geodir_ajax_url' => geodir_get_ajax_url(), |
54 | - 'geodir_gd_modal' => (int)get_option('geodir_disable_gb_modal'), |
|
54 | + 'geodir_gd_modal' => (int) get_option('geodir_disable_gb_modal'), |
|
55 | 55 | 'is_rtl' => is_rtl() ? 1 : 0 // fix rtl issue |
56 | 56 | ); |
57 | 57 | |
@@ -72,25 +72,25 @@ discard block |
||
72 | 72 | * |
73 | 73 | * } |
74 | 74 | */ |
75 | - $geodir_vars_data = apply_filters('geodir_vars_data',$geodir_vars_data); |
|
75 | + $geodir_vars_data = apply_filters('geodir_vars_data', $geodir_vars_data); |
|
76 | 76 | |
77 | 77 | wp_localize_script('geodirectory-script', 'geodir_var', $geodir_vars_data); |
78 | 78 | |
79 | 79 | |
80 | 80 | |
81 | 81 | |
82 | - wp_register_script('geodirectory-jquery-flexslider-js', geodir_plugin_url() . '/geodirectory-assets/js/jquery.flexslider.min.js', array(), GEODIRECTORY_VERSION,true); |
|
83 | - if($is_detail_page){wp_enqueue_script('geodirectory-jquery-flexslider-js');} |
|
82 | + wp_register_script('geodirectory-jquery-flexslider-js', geodir_plugin_url() . '/geodirectory-assets/js/jquery.flexslider.min.js', array(), GEODIRECTORY_VERSION, true); |
|
83 | + if ($is_detail_page) {wp_enqueue_script('geodirectory-jquery-flexslider-js'); } |
|
84 | 84 | |
85 | 85 | |
86 | 86 | |
87 | - wp_register_script('geodirectory-lightbox-jquery', geodir_plugin_url() . '/geodirectory-assets/js/jquery.lightbox-0.5.min.js', array(), GEODIRECTORY_VERSION,true); |
|
87 | + wp_register_script('geodirectory-lightbox-jquery', geodir_plugin_url() . '/geodirectory-assets/js/jquery.lightbox-0.5.min.js', array(), GEODIRECTORY_VERSION, true); |
|
88 | 88 | wp_enqueue_script('geodirectory-lightbox-jquery'); |
89 | 89 | |
90 | 90 | |
91 | 91 | |
92 | - wp_register_script('geodirectory-jquery-simplemodal', geodir_plugin_url() . '/geodirectory-assets/js/jquery.simplemodal.min.js', array(), GEODIRECTORY_VERSION,true); |
|
93 | - if($is_detail_page){wp_enqueue_script('geodirectory-jquery-simplemodal');} |
|
92 | + wp_register_script('geodirectory-jquery-simplemodal', geodir_plugin_url() . '/geodirectory-assets/js/jquery.simplemodal.min.js', array(), GEODIRECTORY_VERSION, true); |
|
93 | + if ($is_detail_page) {wp_enqueue_script('geodirectory-jquery-simplemodal'); } |
|
94 | 94 | |
95 | 95 | |
96 | 96 | //if( get_option('geodir_enqueue_google_api_script')==1) |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | wp_enqueue_script( 'geodirectory-googlemap-script' ); |
112 | 112 | } |
113 | 113 | */ |
114 | - wp_register_script('geodirectory-goMap-script', geodir_plugin_url() . '/geodirectory-assets/js/goMap.min.js', array(), GEODIRECTORY_VERSION,true); |
|
114 | + wp_register_script('geodirectory-goMap-script', geodir_plugin_url() . '/geodirectory-assets/js/goMap.min.js', array(), GEODIRECTORY_VERSION, true); |
|
115 | 115 | wp_enqueue_script('geodirectory-goMap-script'); |
116 | 116 | |
117 | 117 | |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | wp_enqueue_script('plupload-all'); |
134 | 134 | wp_enqueue_script('jquery-ui-sortable'); |
135 | 135 | |
136 | - wp_register_script('geodirectory-plupload-script', geodir_plugin_url() . '/geodirectory-assets/js/geodirectory-plupload.min.js#asyncload', array(), GEODIRECTORY_VERSION,true); |
|
136 | + wp_register_script('geodirectory-plupload-script', geodir_plugin_url() . '/geodirectory-assets/js/geodirectory-plupload.min.js#asyncload', array(), GEODIRECTORY_VERSION, true); |
|
137 | 137 | wp_enqueue_script('geodirectory-plupload-script'); |
138 | 138 | |
139 | 139 | // SCRIPT FOR UPLOAD END |
@@ -245,12 +245,12 @@ discard block |
||
245 | 245 | */ |
246 | 246 | function geodir_add_async_forscript($url) |
247 | 247 | { |
248 | - if (strpos($url, '#asyncload')===false) |
|
248 | + if (strpos($url, '#asyncload') === false) |
|
249 | 249 | return $url; |
250 | 250 | else if (is_admin()) |
251 | 251 | return str_replace('#asyncload', '', $url); |
252 | 252 | else |
253 | - return str_replace('#asyncload', '', $url)."' async='async"; |
|
253 | + return str_replace('#asyncload', '', $url) . "' async='async"; |
|
254 | 254 | } |
255 | 255 | add_filter('clean_url', 'geodir_add_async_forscript', 11, 1); |
256 | 256 | |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | { |
265 | 265 | |
266 | 266 | |
267 | - if(get_option('geodir_scss_core')) { |
|
267 | + if (get_option('geodir_scss_core')) { |
|
268 | 268 | |
269 | 269 | |
270 | 270 | wp_register_style('geodirectory-frontend-style', geodir_plugin_url() . '/geodirectory-assets/css/style.css', array(), GEODIRECTORY_VERSION); |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | wp_register_style('geodir-chosen-style', geodir_plugin_url() . '/geodirectory-assets/css/chosen.css', array(), GEODIRECTORY_VERSION); |
299 | 299 | wp_enqueue_style('geodir-chosen-style'); |
300 | 300 | |
301 | - }else{ |
|
301 | + } else { |
|
302 | 302 | wp_register_style('geodir-core-scss', geodir_plugin_url() . '/geodirectory-assets/css/gd_core_frontend.css', array(), GEODIRECTORY_VERSION); |
303 | 303 | wp_enqueue_style('geodir-core-scss'); |
304 | 304 | |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | |
307 | 307 | } |
308 | 308 | |
309 | - if(is_rtl()){ |
|
309 | + if (is_rtl()) { |
|
310 | 310 | wp_register_style('geodirectory-frontend-rtl-style', geodir_plugin_url() . '/geodirectory-assets/css/rtl-frontend.css', array(), GEODIRECTORY_VERSION); |
311 | 311 | wp_enqueue_style('geodirectory-frontend-rtl-style'); |
312 | 312 | } |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | if ($max_page > 1 || $always_show) { |
379 | 379 | // Extra pagination info |
380 | 380 | $geodir_pagination_more_info = get_option('geodir_pagination_advance_info'); |
381 | - $start_no = ( $paged - 1 ) * $posts_per_page + 1; |
|
381 | + $start_no = ($paged - 1) * $posts_per_page + 1; |
|
382 | 382 | $end_no = min($paged * $posts_per_page, $numposts); |
383 | 383 | |
384 | 384 | if ($geodir_pagination_more_info != '') { |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | jQuery(function ($) { |
446 | 446 | $("#distance_slider").slider({ |
447 | 447 | range: true, |
448 | - values: [0, <?php echo ($_REQUEST['sdist']!='') ? sanitize_text_field($_REQUEST['sdist']) : "0"; ?>], |
|
448 | + values: [0, <?php echo ($_REQUEST['sdist'] != '') ? sanitize_text_field($_REQUEST['sdist']) : "0"; ?>], |
|
449 | 449 | min: 0, |
450 | 450 | max: <?php echo $dist; ?>, |
451 | 451 | step: <?php echo $dist_dif; ?>, |
@@ -510,7 +510,7 @@ discard block |
||
510 | 510 | |
511 | 511 | |
512 | 512 | <script type="text/javascript"> |
513 | - var default_location = '<?php if($search_location = geodir_get_default_location()) echo $search_location->city ;?>'; |
|
513 | + var default_location = '<?php if ($search_location = geodir_get_default_location()) echo $search_location->city; ?>'; |
|
514 | 514 | var latlng; |
515 | 515 | var Sgeocoder; |
516 | 516 | var address; |
@@ -523,7 +523,7 @@ discard block |
||
523 | 523 | var $form = jQuery(this).closest('form'); |
524 | 524 | |
525 | 525 | if (jQuery("#sdist input[type='radio']:checked").length != 0) dist = jQuery("#sdist input[type='radio']:checked").val(); |
526 | - if (jQuery('.search_text', $form).val() == '' || jQuery('.search_text', $form).val() == '<?php echo $default_search_for_text;?>') jQuery('.search_text', $form).val(s); |
|
526 | + if (jQuery('.search_text', $form).val() == '' || jQuery('.search_text', $form).val() == '<?php echo $default_search_for_text; ?>') jQuery('.search_text', $form).val(s); |
|
527 | 527 | |
528 | 528 | // Disable location based search for disabled location post type. |
529 | 529 | if (jQuery('.search_by_post', $form).val() != '' && typeof gd_cpt_no_location == 'function') { |
@@ -537,7 +537,7 @@ discard block |
||
537 | 537 | } |
538 | 538 | } |
539 | 539 | |
540 | - if (dist > 0 || (jQuery('select[name="sort_by"]').val() == 'nearest' || jQuery('select[name="sort_by"]', $form).val() == 'farthest') || (jQuery(".snear", $form).val() != '' && jQuery(".snear", $form).val() != '<?php echo $default_near_text;?>')) { |
|
540 | + if (dist > 0 || (jQuery('select[name="sort_by"]').val() == 'nearest' || jQuery('select[name="sort_by"]', $form).val() == 'farthest') || (jQuery(".snear", $form).val() != '' && jQuery(".snear", $form).val() != '<?php echo $default_near_text; ?>')) { |
|
541 | 541 | geodir_setsearch($form); |
542 | 542 | } else { |
543 | 543 | jQuery(".snear", $form).val(''); |
@@ -557,7 +557,7 @@ discard block |
||
557 | 557 | }); |
558 | 558 | |
559 | 559 | function geodir_setsearch($form) { |
560 | - if ((dist > 0 || (jQuery('select[name="sort_by"]', $form).val() == 'nearest' || jQuery('select[name="sort_by"]', $form).val() == 'farthest')) && (jQuery(".snear", $form).val() == '' || jQuery(".snear", $form).val() == '<?php echo $default_near_text;?>')) jQuery(".snear", $form).val(default_location); |
|
560 | + if ((dist > 0 || (jQuery('select[name="sort_by"]', $form).val() == 'nearest' || jQuery('select[name="sort_by"]', $form).val() == 'farthest')) && (jQuery(".snear", $form).val() == '' || jQuery(".snear", $form).val() == '<?php echo $default_near_text; ?>')) jQuery(".snear", $form).val(default_location); |
|
561 | 561 | geocodeAddress($form); |
562 | 562 | } |
563 | 563 | |
@@ -570,8 +570,8 @@ discard block |
||
570 | 570 | function geocodeAddress($form) { |
571 | 571 | Sgeocoder = new google.maps.Geocoder(); // Call the geocode function |
572 | 572 | |
573 | - if (jQuery('.snear', $form).val() == '' || ( jQuery('.sgeo_lat').val() != '' && jQuery('.sgeo_lon').val() != '' ) || jQuery('.snear', $form).val().match("^<?php _e('In:','geodirectory');?>")) { |
|
574 | - if (jQuery('.snear', $form).val().match("^<?php _e('In:','geodirectory');?>")) { |
|
573 | + if (jQuery('.snear', $form).val() == '' || ( jQuery('.sgeo_lat').val() != '' && jQuery('.sgeo_lon').val() != '' ) || jQuery('.snear', $form).val().match("^<?php _e('In:', 'geodirectory'); ?>")) { |
|
574 | + if (jQuery('.snear', $form).val().match("^<?php _e('In:', 'geodirectory'); ?>")) { |
|
575 | 575 | jQuery(".snear", $form).val(''); |
576 | 576 | } |
577 | 577 | jQuery($form).submit(); |
@@ -579,24 +579,24 @@ discard block |
||
579 | 579 | |
580 | 580 | var address = jQuery(".snear", $form).val(); |
581 | 581 | |
582 | - if (jQuery('.snear', $form).val() == '<?php echo $default_near_text;?>') { |
|
582 | + if (jQuery('.snear', $form).val() == '<?php echo $default_near_text; ?>') { |
|
583 | 583 | initialise2(); |
584 | 584 | } else { |
585 | 585 | |
586 | 586 | Sgeocoder.geocode({'address': address<?php |
587 | - if($near_add = get_option('geodir_search_near_addition')){echo '+", '.$near_add.'"';} |
|
588 | - if($near_add2 = |
|
587 | + if ($near_add = get_option('geodir_search_near_addition')) {echo '+", ' . $near_add . '"'; } |
|
588 | + if ($near_add2 = |
|
589 | 589 | /** |
590 | 590 | * Adds any extra info to the near search box query when trying to geolocate it via google api. |
591 | 591 | * |
592 | 592 | * @since 1.0.0 |
593 | 593 | */ |
594 | - apply_filters('geodir_search_near_addition','')){echo $near_add2;}//gt_advanced_near_search();?>}, |
|
594 | + apply_filters('geodir_search_near_addition', '')) {echo $near_add2; }//gt_advanced_near_search();?>}, |
|
595 | 595 | function (results, status) { |
596 | 596 | if (status == google.maps.GeocoderStatus.OK) { |
597 | 597 | updateSearchPosition(results[0].geometry.location, $form); |
598 | 598 | } else { |
599 | - alert("<?php _e('Search was not successful for the following reason:','geodirectory');?>" + status); |
|
599 | + alert("<?php _e('Search was not successful for the following reason:', 'geodirectory'); ?>" + status); |
|
600 | 600 | } |
601 | 601 | }); |
602 | 602 | } |
@@ -627,19 +627,19 @@ discard block |
||
627 | 627 | var msg; |
628 | 628 | switch (err.code) { |
629 | 629 | case err.UNKNOWN_ERROR: |
630 | - msg = "<?php _e('Unable to find your location','geodirectory');?>"; |
|
630 | + msg = "<?php _e('Unable to find your location', 'geodirectory'); ?>"; |
|
631 | 631 | break; |
632 | 632 | case err.PERMISSION_DENINED: |
633 | - msg = "<?php _e('Permission denied in finding your location','geodirectory');?>"; |
|
633 | + msg = "<?php _e('Permission denied in finding your location', 'geodirectory'); ?>"; |
|
634 | 634 | break; |
635 | 635 | case err.POSITION_UNAVAILABLE: |
636 | - msg = "<?php _e('Your location is currently unknown','geodirectory');?>"; |
|
636 | + msg = "<?php _e('Your location is currently unknown', 'geodirectory'); ?>"; |
|
637 | 637 | break; |
638 | 638 | case err.BREAK: |
639 | - msg = "<?php _e('Attempt to find location took too long','geodirectory');?>"; |
|
639 | + msg = "<?php _e('Attempt to find location took too long', 'geodirectory'); ?>"; |
|
640 | 640 | break; |
641 | 641 | default: |
642 | - msg = "<?php _e('Location detection not supported in browser','geodirectory');?>"; |
|
642 | + msg = "<?php _e('Location detection not supported in browser', 'geodirectory'); ?>"; |
|
643 | 643 | } |
644 | 644 | jQuery('#info').html(msg); |
645 | 645 | } |
@@ -679,7 +679,7 @@ discard block |
||
679 | 679 | * @param object $post The post object. |
680 | 680 | * @param string $link The link to the post. |
681 | 681 | */ |
682 | - return apply_filters('geodir_featured_badge_on_image', '<a href="' . $link . '"><span class="geodir_featured_img"> </span></a>',$post,$link); |
|
682 | + return apply_filters('geodir_featured_badge_on_image', '<a href="' . $link . '"><span class="geodir_featured_img"> </span></a>', $post, $link); |
|
683 | 683 | break; |
684 | 684 | case 'new' : |
685 | 685 | /** |
@@ -689,7 +689,7 @@ discard block |
||
689 | 689 | * @param object $post The post object. |
690 | 690 | * @param string $link The link to the post. |
691 | 691 | */ |
692 | - return apply_filters('geodir_new_badge_on_image', '<a href="' . $link . '"><span class="geodir_new_listing"> </span></a>',$post,$link); |
|
692 | + return apply_filters('geodir_new_badge_on_image', '<a href="' . $link . '"><span class="geodir_new_listing"> </span></a>', $post, $link); |
|
693 | 693 | break; |
694 | 694 | |
695 | 695 | } |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | */ |
23 | 23 | function geodir_core_dequeue_script() |
24 | 24 | { |
25 | - wp_dequeue_script('flexslider'); |
|
25 | + wp_dequeue_script('flexslider'); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | add_action('wp_print_scripts', 'geodir_core_dequeue_script', 100); |
@@ -35,159 +35,159 @@ discard block |
||
35 | 35 | */ |
36 | 36 | function geodir_templates_scripts() |
37 | 37 | { |
38 | - $is_detail_page = false; |
|
38 | + $is_detail_page = false; |
|
39 | 39 | |
40 | - if((is_single() && geodir_is_geodir_page()) || (is_page() && geodir_is_page('preview') )) { |
|
41 | - $is_detail_page = true; |
|
42 | - } |
|
40 | + if((is_single() && geodir_is_geodir_page()) || (is_page() && geodir_is_page('preview') )) { |
|
41 | + $is_detail_page = true; |
|
42 | + } |
|
43 | 43 | |
44 | - wp_enqueue_script('jquery'); |
|
44 | + wp_enqueue_script('jquery'); |
|
45 | 45 | |
46 | - wp_register_script('geodirectory-script', geodir_plugin_url() . '/geodirectory-assets/js/geodirectory.min.js#asyncload', array(), GEODIRECTORY_VERSION); |
|
47 | - wp_enqueue_script('geodirectory-script'); |
|
46 | + wp_register_script('geodirectory-script', geodir_plugin_url() . '/geodirectory-assets/js/geodirectory.min.js#asyncload', array(), GEODIRECTORY_VERSION); |
|
47 | + wp_enqueue_script('geodirectory-script'); |
|
48 | 48 | |
49 | 49 | |
50 | - $geodir_vars_data = array( |
|
51 | - 'siteurl' => get_option('siteurl'), |
|
52 | - 'geodir_plugin_url' => geodir_plugin_url(), |
|
53 | - 'geodir_ajax_url' => geodir_get_ajax_url(), |
|
54 | - 'geodir_gd_modal' => (int)get_option('geodir_disable_gb_modal'), |
|
55 | - 'is_rtl' => is_rtl() ? 1 : 0 // fix rtl issue |
|
56 | - ); |
|
50 | + $geodir_vars_data = array( |
|
51 | + 'siteurl' => get_option('siteurl'), |
|
52 | + 'geodir_plugin_url' => geodir_plugin_url(), |
|
53 | + 'geodir_ajax_url' => geodir_get_ajax_url(), |
|
54 | + 'geodir_gd_modal' => (int)get_option('geodir_disable_gb_modal'), |
|
55 | + 'is_rtl' => is_rtl() ? 1 : 0 // fix rtl issue |
|
56 | + ); |
|
57 | 57 | |
58 | - /** |
|
59 | - * Filter the `geodir_var` data array that outputs the wp_localize_script() translations and variables. |
|
60 | - * |
|
61 | - * This is used by addons to add JS translatable variables. |
|
62 | - * |
|
63 | - * @since 1.4.4 |
|
64 | - * @param array $geodir_vars_data { |
|
65 | - * geodir var data used by addons to add JS translatable variables. |
|
66 | - * |
|
67 | - * @type string $siteurl Site url. |
|
68 | - * @type string $geodir_plugin_url Geodirectory core plugin url. |
|
69 | - * @type string $geodir_ajax_url Geodirectory plugin ajax url. |
|
70 | - * @type int $geodir_gd_modal Disable GD modal that displays slideshow images in popup?. |
|
71 | - * @type int $is_rtl Checks if current locale is RTL. |
|
72 | - * |
|
73 | - * } |
|
74 | - */ |
|
75 | - $geodir_vars_data = apply_filters('geodir_vars_data',$geodir_vars_data); |
|
58 | + /** |
|
59 | + * Filter the `geodir_var` data array that outputs the wp_localize_script() translations and variables. |
|
60 | + * |
|
61 | + * This is used by addons to add JS translatable variables. |
|
62 | + * |
|
63 | + * @since 1.4.4 |
|
64 | + * @param array $geodir_vars_data { |
|
65 | + * geodir var data used by addons to add JS translatable variables. |
|
66 | + * |
|
67 | + * @type string $siteurl Site url. |
|
68 | + * @type string $geodir_plugin_url Geodirectory core plugin url. |
|
69 | + * @type string $geodir_ajax_url Geodirectory plugin ajax url. |
|
70 | + * @type int $geodir_gd_modal Disable GD modal that displays slideshow images in popup?. |
|
71 | + * @type int $is_rtl Checks if current locale is RTL. |
|
72 | + * |
|
73 | + * } |
|
74 | + */ |
|
75 | + $geodir_vars_data = apply_filters('geodir_vars_data',$geodir_vars_data); |
|
76 | 76 | |
77 | - wp_localize_script('geodirectory-script', 'geodir_var', $geodir_vars_data); |
|
77 | + wp_localize_script('geodirectory-script', 'geodir_var', $geodir_vars_data); |
|
78 | 78 | |
79 | 79 | |
80 | 80 | |
81 | 81 | |
82 | - wp_register_script('geodirectory-jquery-flexslider-js', geodir_plugin_url() . '/geodirectory-assets/js/jquery.flexslider.min.js', array(), GEODIRECTORY_VERSION,true); |
|
83 | - if($is_detail_page){wp_enqueue_script('geodirectory-jquery-flexslider-js');} |
|
82 | + wp_register_script('geodirectory-jquery-flexslider-js', geodir_plugin_url() . '/geodirectory-assets/js/jquery.flexslider.min.js', array(), GEODIRECTORY_VERSION,true); |
|
83 | + if($is_detail_page){wp_enqueue_script('geodirectory-jquery-flexslider-js');} |
|
84 | 84 | |
85 | 85 | |
86 | 86 | |
87 | - wp_register_script('geodirectory-lightbox-jquery', geodir_plugin_url() . '/geodirectory-assets/js/jquery.lightbox-0.5.min.js', array(), GEODIRECTORY_VERSION,true); |
|
88 | - wp_enqueue_script('geodirectory-lightbox-jquery'); |
|
87 | + wp_register_script('geodirectory-lightbox-jquery', geodir_plugin_url() . '/geodirectory-assets/js/jquery.lightbox-0.5.min.js', array(), GEODIRECTORY_VERSION,true); |
|
88 | + wp_enqueue_script('geodirectory-lightbox-jquery'); |
|
89 | 89 | |
90 | 90 | |
91 | 91 | |
92 | - wp_register_script('geodirectory-jquery-simplemodal', geodir_plugin_url() . '/geodirectory-assets/js/jquery.simplemodal.min.js', array(), GEODIRECTORY_VERSION,true); |
|
93 | - if($is_detail_page){wp_enqueue_script('geodirectory-jquery-simplemodal');} |
|
92 | + wp_register_script('geodirectory-jquery-simplemodal', geodir_plugin_url() . '/geodirectory-assets/js/jquery.simplemodal.min.js', array(), GEODIRECTORY_VERSION,true); |
|
93 | + if($is_detail_page){wp_enqueue_script('geodirectory-jquery-simplemodal');} |
|
94 | 94 | |
95 | 95 | |
96 | - //if( get_option('geodir_enqueue_google_api_script')==1) |
|
96 | + //if( get_option('geodir_enqueue_google_api_script')==1) |
|
97 | 97 | |
98 | - $map_lang = "&language=" . geodir_get_map_default_language(); |
|
99 | - /** |
|
100 | - * Filter the variables that are added to the end of the google maps script call. |
|
101 | - * |
|
102 | - * This i used to change things like google maps language etc. |
|
103 | - * |
|
104 | - * @since 1.0.0 |
|
105 | - * @param string $var The string to filter, default is empty string. |
|
106 | - */ |
|
107 | - $map_extra = apply_filters('geodir_googlemap_script_extra', ''); |
|
108 | - wp_enqueue_script('geodirectory-googlemap-script', '//maps.google.com/maps/api/js?' . $map_lang . $map_extra, '', NULL); |
|
109 | - /* { |
|
98 | + $map_lang = "&language=" . geodir_get_map_default_language(); |
|
99 | + /** |
|
100 | + * Filter the variables that are added to the end of the google maps script call. |
|
101 | + * |
|
102 | + * This i used to change things like google maps language etc. |
|
103 | + * |
|
104 | + * @since 1.0.0 |
|
105 | + * @param string $var The string to filter, default is empty string. |
|
106 | + */ |
|
107 | + $map_extra = apply_filters('geodir_googlemap_script_extra', ''); |
|
108 | + wp_enqueue_script('geodirectory-googlemap-script', '//maps.google.com/maps/api/js?' . $map_lang . $map_extra, '', NULL); |
|
109 | + /* { |
|
110 | 110 | wp_register_script( 'geodirectory-googlemap-script', "//maps.google.com/maps/api/js?sensor=false&language=en" ); |
111 | 111 | wp_enqueue_script( 'geodirectory-googlemap-script' ); |
112 | 112 | } |
113 | 113 | */ |
114 | - wp_register_script('geodirectory-goMap-script', geodir_plugin_url() . '/geodirectory-assets/js/goMap.min.js', array(), GEODIRECTORY_VERSION,true); |
|
115 | - wp_enqueue_script('geodirectory-goMap-script'); |
|
114 | + wp_register_script('geodirectory-goMap-script', geodir_plugin_url() . '/geodirectory-assets/js/goMap.min.js', array(), GEODIRECTORY_VERSION,true); |
|
115 | + wp_enqueue_script('geodirectory-goMap-script'); |
|
116 | 116 | |
117 | 117 | |
118 | - wp_register_script('chosen', geodir_plugin_url() . '/geodirectory-assets/js/chosen.jquery.min.js', array(), GEODIRECTORY_VERSION); |
|
119 | - wp_enqueue_script('chosen'); |
|
118 | + wp_register_script('chosen', geodir_plugin_url() . '/geodirectory-assets/js/chosen.jquery.min.js', array(), GEODIRECTORY_VERSION); |
|
119 | + wp_enqueue_script('chosen'); |
|
120 | 120 | |
121 | - wp_register_script('geodirectory-choose-ajax', geodir_plugin_url() . '/geodirectory-assets/js/ajax-chosen.min.js', array(), GEODIRECTORY_VERSION); |
|
122 | - wp_enqueue_script('geodirectory-choose-ajax'); |
|
121 | + wp_register_script('geodirectory-choose-ajax', geodir_plugin_url() . '/geodirectory-assets/js/ajax-chosen.min.js', array(), GEODIRECTORY_VERSION); |
|
122 | + wp_enqueue_script('geodirectory-choose-ajax'); |
|
123 | 123 | |
124 | - wp_enqueue_script('geodirectory-jquery-ui-timepicker-js', geodir_plugin_url() . '/geodirectory-assets/js/jquery.ui.timepicker.min.js#asyncload', array('jquery-ui-datepicker', 'jquery-ui-slider', 'jquery-effects-core', 'jquery-effects-slide'), '', true); |
|
124 | + wp_enqueue_script('geodirectory-jquery-ui-timepicker-js', geodir_plugin_url() . '/geodirectory-assets/js/jquery.ui.timepicker.min.js#asyncload', array('jquery-ui-datepicker', 'jquery-ui-slider', 'jquery-effects-core', 'jquery-effects-slide'), '', true); |
|
125 | 125 | |
126 | 126 | |
127 | - if (is_page() && geodir_is_page('add-listing')) { |
|
127 | + if (is_page() && geodir_is_page('add-listing')) { |
|
128 | 128 | |
129 | 129 | |
130 | 130 | |
131 | 131 | |
132 | - // SCRIPT FOR UPLOAD |
|
133 | - wp_enqueue_script('plupload-all'); |
|
134 | - wp_enqueue_script('jquery-ui-sortable'); |
|
132 | + // SCRIPT FOR UPLOAD |
|
133 | + wp_enqueue_script('plupload-all'); |
|
134 | + wp_enqueue_script('jquery-ui-sortable'); |
|
135 | 135 | |
136 | - wp_register_script('geodirectory-plupload-script', geodir_plugin_url() . '/geodirectory-assets/js/geodirectory-plupload.min.js#asyncload', array(), GEODIRECTORY_VERSION,true); |
|
137 | - wp_enqueue_script('geodirectory-plupload-script'); |
|
136 | + wp_register_script('geodirectory-plupload-script', geodir_plugin_url() . '/geodirectory-assets/js/geodirectory-plupload.min.js#asyncload', array(), GEODIRECTORY_VERSION,true); |
|
137 | + wp_enqueue_script('geodirectory-plupload-script'); |
|
138 | 138 | |
139 | - // SCRIPT FOR UPLOAD END |
|
139 | + // SCRIPT FOR UPLOAD END |
|
140 | 140 | |
141 | - // check_ajax_referer function is used to make sure no files are uplaoded remotly but it will fail if used between https and non https so we do the check below of the urls |
|
142 | - if (str_replace("https", "http", admin_url('admin-ajax.php')) && !empty($_SERVER['HTTPS'])) { |
|
143 | - $ajax_url = admin_url('admin-ajax.php'); |
|
144 | - } elseif (!str_replace("https", "http", admin_url('admin-ajax.php')) && empty($_SERVER['HTTPS'])) { |
|
145 | - $ajax_url = admin_url('admin-ajax.php'); |
|
146 | - } elseif (str_replace("https", "http", admin_url('admin-ajax.php')) && empty($_SERVER['HTTPS'])) { |
|
147 | - $ajax_url = str_replace("https", "http", admin_url('admin-ajax.php')); |
|
148 | - } elseif (!str_replace("https", "http", admin_url('admin-ajax.php')) && !empty($_SERVER['HTTPS'])) { |
|
149 | - $ajax_url = str_replace("http", "https", admin_url('admin-ajax.php')); |
|
150 | - } |
|
141 | + // check_ajax_referer function is used to make sure no files are uplaoded remotly but it will fail if used between https and non https so we do the check below of the urls |
|
142 | + if (str_replace("https", "http", admin_url('admin-ajax.php')) && !empty($_SERVER['HTTPS'])) { |
|
143 | + $ajax_url = admin_url('admin-ajax.php'); |
|
144 | + } elseif (!str_replace("https", "http", admin_url('admin-ajax.php')) && empty($_SERVER['HTTPS'])) { |
|
145 | + $ajax_url = admin_url('admin-ajax.php'); |
|
146 | + } elseif (str_replace("https", "http", admin_url('admin-ajax.php')) && empty($_SERVER['HTTPS'])) { |
|
147 | + $ajax_url = str_replace("https", "http", admin_url('admin-ajax.php')); |
|
148 | + } elseif (!str_replace("https", "http", admin_url('admin-ajax.php')) && !empty($_SERVER['HTTPS'])) { |
|
149 | + $ajax_url = str_replace("http", "https", admin_url('admin-ajax.php')); |
|
150 | + } |
|
151 | 151 | |
152 | - // place js config array for plupload |
|
153 | - $plupload_init = array( |
|
154 | - 'runtimes' => 'html5,silverlight,flash,browserplus,gears,html4', |
|
155 | - 'browse_button' => 'plupload-browse-button', // will be adjusted per uploader |
|
156 | - 'container' => 'plupload-upload-ui', // will be adjusted per uploader |
|
157 | - 'drop_element' => 'dropbox', // will be adjusted per uploader |
|
158 | - 'file_data_name' => 'async-upload', // will be adjusted per uploader |
|
159 | - 'multiple_queues' => true, |
|
160 | - 'max_file_size' => geodir_max_upload_size(), |
|
161 | - 'url' => $ajax_url, |
|
162 | - 'flash_swf_url' => includes_url('js/plupload/plupload.flash.swf'), |
|
163 | - 'silverlight_xap_url' => includes_url('js/plupload/plupload.silverlight.xap'), |
|
164 | - 'filters' => array(array('title' => __('Allowed Files', 'geodirectory'), 'extensions' => '*')), |
|
165 | - 'multipart' => true, |
|
166 | - 'urlstream_upload' => true, |
|
167 | - 'multi_selection' => false, // will be added per uploader |
|
168 | - // additional post data to send to our ajax hook |
|
169 | - 'multipart_params' => array( |
|
170 | - '_ajax_nonce' => "", // will be added per uploader |
|
171 | - 'action' => 'plupload_action', // the ajax action name |
|
172 | - 'imgid' => 0 // will be added per uploader |
|
173 | - ) |
|
174 | - ); |
|
175 | - $base_plupload_config = json_encode($plupload_init); |
|
176 | - |
|
177 | - $gd_plupload_init = array('base_plupload_config' => $base_plupload_config, |
|
178 | - 'upload_img_size' => geodir_max_upload_size()); |
|
179 | - |
|
180 | - wp_localize_script('geodirectory-plupload-script', 'gd_plupload', $gd_plupload_init); |
|
181 | - |
|
182 | - wp_enqueue_script('geodirectory-listing-validation-script', geodir_plugin_url() . '/geodirectory-assets/js/listing_validation.min.js#asyncload'); |
|
183 | - } // End if for add place page |
|
184 | - |
|
185 | - wp_register_script('geodirectory-post-custom-js', geodir_plugin_url() . '/geodirectory-assets/js/post.custom.min.js#asyncload', array(), GEODIRECTORY_VERSION, true); |
|
186 | - if ($is_detail_page) { |
|
152 | + // place js config array for plupload |
|
153 | + $plupload_init = array( |
|
154 | + 'runtimes' => 'html5,silverlight,flash,browserplus,gears,html4', |
|
155 | + 'browse_button' => 'plupload-browse-button', // will be adjusted per uploader |
|
156 | + 'container' => 'plupload-upload-ui', // will be adjusted per uploader |
|
157 | + 'drop_element' => 'dropbox', // will be adjusted per uploader |
|
158 | + 'file_data_name' => 'async-upload', // will be adjusted per uploader |
|
159 | + 'multiple_queues' => true, |
|
160 | + 'max_file_size' => geodir_max_upload_size(), |
|
161 | + 'url' => $ajax_url, |
|
162 | + 'flash_swf_url' => includes_url('js/plupload/plupload.flash.swf'), |
|
163 | + 'silverlight_xap_url' => includes_url('js/plupload/plupload.silverlight.xap'), |
|
164 | + 'filters' => array(array('title' => __('Allowed Files', 'geodirectory'), 'extensions' => '*')), |
|
165 | + 'multipart' => true, |
|
166 | + 'urlstream_upload' => true, |
|
167 | + 'multi_selection' => false, // will be added per uploader |
|
168 | + // additional post data to send to our ajax hook |
|
169 | + 'multipart_params' => array( |
|
170 | + '_ajax_nonce' => "", // will be added per uploader |
|
171 | + 'action' => 'plupload_action', // the ajax action name |
|
172 | + 'imgid' => 0 // will be added per uploader |
|
173 | + ) |
|
174 | + ); |
|
175 | + $base_plupload_config = json_encode($plupload_init); |
|
176 | + |
|
177 | + $gd_plupload_init = array('base_plupload_config' => $base_plupload_config, |
|
178 | + 'upload_img_size' => geodir_max_upload_size()); |
|
179 | + |
|
180 | + wp_localize_script('geodirectory-plupload-script', 'gd_plupload', $gd_plupload_init); |
|
181 | + |
|
182 | + wp_enqueue_script('geodirectory-listing-validation-script', geodir_plugin_url() . '/geodirectory-assets/js/listing_validation.min.js#asyncload'); |
|
183 | + } // End if for add place page |
|
184 | + |
|
185 | + wp_register_script('geodirectory-post-custom-js', geodir_plugin_url() . '/geodirectory-assets/js/post.custom.min.js#asyncload', array(), GEODIRECTORY_VERSION, true); |
|
186 | + if ($is_detail_page) { |
|
187 | 187 | wp_enqueue_script('geodirectory-post-custom-js'); |
188 | 188 | } |
189 | 189 | |
190 | - // font awesome rating script |
|
190 | + // font awesome rating script |
|
191 | 191 | if (get_option('geodir_reviewrating_enable_font_awesome')) { |
192 | 192 | wp_register_script('geodir-barrating-js', geodir_plugin_url() . '/geodirectory-assets/js/jquery.barrating.min.js', array(), GEODIRECTORY_VERSION, true); |
193 | 193 | wp_enqueue_script('geodir-barrating-js'); |
@@ -196,11 +196,11 @@ discard block |
||
196 | 196 | wp_enqueue_script('geodir-jRating-js'); |
197 | 197 | } |
198 | 198 | |
199 | - wp_register_script('geodir-on-document-load', geodir_plugin_url() . '/geodirectory-assets/js/on_document_load.js#asyncload', array(), GEODIRECTORY_VERSION, true); |
|
200 | - wp_enqueue_script('geodir-on-document-load'); |
|
199 | + wp_register_script('geodir-on-document-load', geodir_plugin_url() . '/geodirectory-assets/js/on_document_load.js#asyncload', array(), GEODIRECTORY_VERSION, true); |
|
200 | + wp_enqueue_script('geodir-on-document-load'); |
|
201 | 201 | |
202 | - wp_register_script('google-geometa', geodir_plugin_url() . '/geodirectory-assets/js/geometa.min.js#asyncload', array(), GEODIRECTORY_VERSION, true); |
|
203 | - wp_enqueue_script('google-geometa'); |
|
202 | + wp_register_script('google-geometa', geodir_plugin_url() . '/geodirectory-assets/js/geometa.min.js#asyncload', array(), GEODIRECTORY_VERSION, true); |
|
203 | + wp_enqueue_script('google-geometa'); |
|
204 | 204 | } |
205 | 205 | |
206 | 206 | /** |
@@ -214,8 +214,8 @@ discard block |
||
214 | 214 | */ |
215 | 215 | function geodir_header_scripts() |
216 | 216 | { |
217 | - echo '<style>' . stripslashes(get_option('geodir_coustem_css')) . '</style>'; |
|
218 | - echo stripslashes(get_option('geodir_header_scripts')); |
|
217 | + echo '<style>' . stripslashes(get_option('geodir_coustem_css')) . '</style>'; |
|
218 | + echo stripslashes(get_option('geodir_header_scripts')); |
|
219 | 219 | } |
220 | 220 | |
221 | 221 | |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | function geodir_footer_scripts() |
232 | 232 | { |
233 | 233 | echo stripslashes(get_option('geodir_ga_tracking_code')); |
234 | - echo stripslashes(get_option('geodir_footer_scripts')); |
|
234 | + echo stripslashes(get_option('geodir_footer_scripts')); |
|
235 | 235 | } |
236 | 236 | |
237 | 237 | |
@@ -245,12 +245,12 @@ discard block |
||
245 | 245 | */ |
246 | 246 | function geodir_add_async_forscript($url) |
247 | 247 | { |
248 | - if (strpos($url, '#asyncload')===false) |
|
249 | - return $url; |
|
250 | - else if (is_admin()) |
|
251 | - return str_replace('#asyncload', '', $url); |
|
252 | - else |
|
253 | - return str_replace('#asyncload', '', $url)."' async='async"; |
|
248 | + if (strpos($url, '#asyncload')===false) |
|
249 | + return $url; |
|
250 | + else if (is_admin()) |
|
251 | + return str_replace('#asyncload', '', $url); |
|
252 | + else |
|
253 | + return str_replace('#asyncload', '', $url)."' async='async"; |
|
254 | 254 | } |
255 | 255 | add_filter('clean_url', 'geodir_add_async_forscript', 11, 1); |
256 | 256 | |
@@ -264,55 +264,55 @@ discard block |
||
264 | 264 | { |
265 | 265 | |
266 | 266 | |
267 | - if(get_option('geodir_scss_core')) { |
|
267 | + if(get_option('geodir_scss_core')) { |
|
268 | 268 | |
269 | 269 | |
270 | - wp_register_style('geodirectory-frontend-style', geodir_plugin_url() . '/geodirectory-assets/css/style.css', array(), GEODIRECTORY_VERSION); |
|
271 | - wp_enqueue_style('geodirectory-frontend-style'); |
|
270 | + wp_register_style('geodirectory-frontend-style', geodir_plugin_url() . '/geodirectory-assets/css/style.css', array(), GEODIRECTORY_VERSION); |
|
271 | + wp_enqueue_style('geodirectory-frontend-style'); |
|
272 | 272 | |
273 | - wp_register_style('geodirectory-media-style', geodir_plugin_url() . '/geodirectory-assets/css/media.css', array(), GEODIRECTORY_VERSION); |
|
274 | - wp_enqueue_style('geodirectory-media-style'); |
|
273 | + wp_register_style('geodirectory-media-style', geodir_plugin_url() . '/geodirectory-assets/css/media.css', array(), GEODIRECTORY_VERSION); |
|
274 | + wp_enqueue_style('geodirectory-media-style'); |
|
275 | 275 | |
276 | 276 | |
277 | - wp_register_style('geodirectory-jquery-ui-css', geodir_plugin_url() . '/geodirectory-assets/css/jquery-ui.css', array(), GEODIRECTORY_VERSION); |
|
278 | - wp_enqueue_style('geodirectory-jquery-ui-css'); |
|
277 | + wp_register_style('geodirectory-jquery-ui-css', geodir_plugin_url() . '/geodirectory-assets/css/jquery-ui.css', array(), GEODIRECTORY_VERSION); |
|
278 | + wp_enqueue_style('geodirectory-jquery-ui-css'); |
|
279 | 279 | |
280 | - wp_register_style('geodirectory-jquery-ui-timepicker-css', geodir_plugin_url() . '/geodirectory-assets/css/jquery.ui.timepicker.css', array(), GEODIRECTORY_VERSION); |
|
281 | - wp_enqueue_style('geodirectory-jquery-ui-timepicker-css'); |
|
280 | + wp_register_style('geodirectory-jquery-ui-timepicker-css', geodir_plugin_url() . '/geodirectory-assets/css/jquery.ui.timepicker.css', array(), GEODIRECTORY_VERSION); |
|
281 | + wp_enqueue_style('geodirectory-jquery-ui-timepicker-css'); |
|
282 | 282 | |
283 | - wp_register_style('geodirectory-flexslider-css', geodir_plugin_url() . '/geodirectory-assets/css/flexslider.css', array(), GEODIRECTORY_VERSION); |
|
284 | - wp_enqueue_style('geodirectory-flexslider-css'); |
|
283 | + wp_register_style('geodirectory-flexslider-css', geodir_plugin_url() . '/geodirectory-assets/css/flexslider.css', array(), GEODIRECTORY_VERSION); |
|
284 | + wp_enqueue_style('geodirectory-flexslider-css'); |
|
285 | 285 | |
286 | - wp_register_style('geodirectory-thic-box-css', geodir_plugin_url() . '/geodirectory-assets/css/thic-box.css', array(), GEODIRECTORY_VERSION); |
|
287 | - wp_enqueue_style('geodirectory-thic-box-css'); |
|
286 | + wp_register_style('geodirectory-thic-box-css', geodir_plugin_url() . '/geodirectory-assets/css/thic-box.css', array(), GEODIRECTORY_VERSION); |
|
287 | + wp_enqueue_style('geodirectory-thic-box-css'); |
|
288 | 288 | |
289 | - wp_register_style('geodirectory-pluplodar-css', geodir_plugin_url() . '/geodirectory-assets/css/pluploader.css', array(), GEODIRECTORY_VERSION); |
|
290 | - wp_enqueue_style('geodirectory-pluplodar-css'); |
|
289 | + wp_register_style('geodirectory-pluplodar-css', geodir_plugin_url() . '/geodirectory-assets/css/pluploader.css', array(), GEODIRECTORY_VERSION); |
|
290 | + wp_enqueue_style('geodirectory-pluplodar-css'); |
|
291 | 291 | |
292 | - wp_register_style('geodirectory-lightbox-css', geodir_plugin_url() . '/geodirectory-assets/css/jquery.lightbox-0.5.css', array(), GEODIRECTORY_VERSION); |
|
293 | - wp_enqueue_style('geodirectory-lightbox-css'); |
|
292 | + wp_register_style('geodirectory-lightbox-css', geodir_plugin_url() . '/geodirectory-assets/css/jquery.lightbox-0.5.css', array(), GEODIRECTORY_VERSION); |
|
293 | + wp_enqueue_style('geodirectory-lightbox-css'); |
|
294 | 294 | |
295 | - wp_register_style('geodir-rating-style', geodir_plugin_url() . '/geodirectory-assets/css/jRating.jquery.css', array(), GEODIRECTORY_VERSION); |
|
296 | - wp_enqueue_style('geodir-rating-style'); |
|
295 | + wp_register_style('geodir-rating-style', geodir_plugin_url() . '/geodirectory-assets/css/jRating.jquery.css', array(), GEODIRECTORY_VERSION); |
|
296 | + wp_enqueue_style('geodir-rating-style'); |
|
297 | 297 | |
298 | - wp_register_style('geodir-chosen-style', geodir_plugin_url() . '/geodirectory-assets/css/chosen.css', array(), GEODIRECTORY_VERSION); |
|
299 | - wp_enqueue_style('geodir-chosen-style'); |
|
298 | + wp_register_style('geodir-chosen-style', geodir_plugin_url() . '/geodirectory-assets/css/chosen.css', array(), GEODIRECTORY_VERSION); |
|
299 | + wp_enqueue_style('geodir-chosen-style'); |
|
300 | 300 | |
301 | - }else{ |
|
302 | - wp_register_style('geodir-core-scss', geodir_plugin_url() . '/geodirectory-assets/css/gd_core_frontend.css', array(), GEODIRECTORY_VERSION); |
|
303 | - wp_enqueue_style('geodir-core-scss'); |
|
301 | + }else{ |
|
302 | + wp_register_style('geodir-core-scss', geodir_plugin_url() . '/geodirectory-assets/css/gd_core_frontend.css', array(), GEODIRECTORY_VERSION); |
|
303 | + wp_enqueue_style('geodir-core-scss'); |
|
304 | 304 | |
305 | - wp_register_style('geodir-core-scss-footer', geodir_plugin_url() . '/geodirectory-assets/css/gd_core_frontend_footer.css', array(), GEODIRECTORY_VERSION); |
|
305 | + wp_register_style('geodir-core-scss-footer', geodir_plugin_url() . '/geodirectory-assets/css/gd_core_frontend_footer.css', array(), GEODIRECTORY_VERSION); |
|
306 | 306 | |
307 | - } |
|
307 | + } |
|
308 | 308 | |
309 | - if(is_rtl()){ |
|
310 | - wp_register_style('geodirectory-frontend-rtl-style', geodir_plugin_url() . '/geodirectory-assets/css/rtl-frontend.css', array(), GEODIRECTORY_VERSION); |
|
311 | - wp_enqueue_style('geodirectory-frontend-rtl-style'); |
|
312 | - } |
|
309 | + if(is_rtl()){ |
|
310 | + wp_register_style('geodirectory-frontend-rtl-style', geodir_plugin_url() . '/geodirectory-assets/css/rtl-frontend.css', array(), GEODIRECTORY_VERSION); |
|
311 | + wp_enqueue_style('geodirectory-frontend-rtl-style'); |
|
312 | + } |
|
313 | 313 | |
314 | - wp_register_style('geodirectory-font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css', array(), GEODIRECTORY_VERSION); |
|
315 | - wp_enqueue_style('geodirectory-font-awesome'); |
|
314 | + wp_register_style('geodirectory-font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css', array(), GEODIRECTORY_VERSION); |
|
315 | + wp_enqueue_style('geodirectory-font-awesome'); |
|
316 | 316 | |
317 | 317 | |
318 | 318 | } |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | */ |
327 | 327 | function geodir_get_sidebar() |
328 | 328 | { |
329 | - get_sidebar('geodirectory'); |
|
329 | + get_sidebar('geodirectory'); |
|
330 | 330 | } |
331 | 331 | |
332 | 332 | /** |
@@ -347,35 +347,35 @@ discard block |
||
347 | 347 | function geodir_pagination($before = '', $after = '', $prelabel = '', $nxtlabel = '', $pages_to_show = 5, $always_show = false) |
348 | 348 | { |
349 | 349 | |
350 | - global $wp_query, $posts_per_page, $wpdb, $paged, $blog_id; |
|
350 | + global $wp_query, $posts_per_page, $wpdb, $paged, $blog_id; |
|
351 | 351 | |
352 | - if (empty($prelabel)) { |
|
353 | - $prelabel = '<strong>«</strong>'; |
|
354 | - } |
|
352 | + if (empty($prelabel)) { |
|
353 | + $prelabel = '<strong>«</strong>'; |
|
354 | + } |
|
355 | 355 | |
356 | - if (empty($nxtlabel)) { |
|
357 | - $nxtlabel = '<strong>»</strong>'; |
|
358 | - } |
|
356 | + if (empty($nxtlabel)) { |
|
357 | + $nxtlabel = '<strong>»</strong>'; |
|
358 | + } |
|
359 | 359 | |
360 | - $half_pages_to_show = round($pages_to_show / 2); |
|
360 | + $half_pages_to_show = round($pages_to_show / 2); |
|
361 | 361 | |
362 | - if (geodir_is_page('home') || (get_option('geodir_set_as_home') && is_home())) // dont apply default pagination for geodirectory home page. |
|
363 | - return; |
|
362 | + if (geodir_is_page('home') || (get_option('geodir_set_as_home') && is_home())) // dont apply default pagination for geodirectory home page. |
|
363 | + return; |
|
364 | 364 | |
365 | - if (!is_single()) { |
|
365 | + if (!is_single()) { |
|
366 | 366 | if (function_exists('geodir_location_geo_home_link')) { |
367 | 367 | remove_filter('home_url', 'geodir_location_geo_home_link', 100000); |
368 | 368 | } |
369 | - $numposts = $wp_query->found_posts; |
|
369 | + $numposts = $wp_query->found_posts; |
|
370 | 370 | |
371 | 371 | |
372 | - $max_page = ceil($numposts / $posts_per_page); |
|
372 | + $max_page = ceil($numposts / $posts_per_page); |
|
373 | 373 | |
374 | - if (empty($paged)) { |
|
375 | - $paged = 1; |
|
376 | - } |
|
374 | + if (empty($paged)) { |
|
375 | + $paged = 1; |
|
376 | + } |
|
377 | 377 | |
378 | - if ($max_page > 1 || $always_show) { |
|
378 | + if ($max_page > 1 || $always_show) { |
|
379 | 379 | // Extra pagination info |
380 | 380 | $geodir_pagination_more_info = get_option('geodir_pagination_advance_info'); |
381 | 381 | $start_no = ( $paged - 1 ) * $posts_per_page + 1; |
@@ -392,30 +392,30 @@ discard block |
||
392 | 392 | } |
393 | 393 | |
394 | 394 | echo "$before <div class='Navi'>"; |
395 | - if ($paged >= ($pages_to_show - 1)) { |
|
396 | - echo '<a href="' . str_replace('&paged', '&paged', get_pagenum_link()) . '">«</a>'; |
|
397 | - } |
|
398 | - previous_posts_link($prelabel); |
|
399 | - for ($i = $paged - $half_pages_to_show; $i <= $paged + $half_pages_to_show; $i++) { |
|
400 | - if ($i >= 1 && $i <= $max_page) { |
|
401 | - if ($i == $paged) { |
|
402 | - echo "<strong class='on'>$i</strong>"; |
|
403 | - } else { |
|
404 | - echo ' <a href="' . str_replace('&paged', '&paged', get_pagenum_link($i)) . '">' . $i . '</a> '; |
|
405 | - } |
|
406 | - } |
|
407 | - } |
|
408 | - next_posts_link($nxtlabel, $max_page); |
|
409 | - if (($paged + $half_pages_to_show) < ($max_page)) { |
|
410 | - echo '<a href="' . str_replace('&paged', '&paged', get_pagenum_link($max_page)) . '">»</a>'; |
|
411 | - } |
|
412 | - echo "</div> $after"; |
|
413 | - } |
|
395 | + if ($paged >= ($pages_to_show - 1)) { |
|
396 | + echo '<a href="' . str_replace('&paged', '&paged', get_pagenum_link()) . '">«</a>'; |
|
397 | + } |
|
398 | + previous_posts_link($prelabel); |
|
399 | + for ($i = $paged - $half_pages_to_show; $i <= $paged + $half_pages_to_show; $i++) { |
|
400 | + if ($i >= 1 && $i <= $max_page) { |
|
401 | + if ($i == $paged) { |
|
402 | + echo "<strong class='on'>$i</strong>"; |
|
403 | + } else { |
|
404 | + echo ' <a href="' . str_replace('&paged', '&paged', get_pagenum_link($i)) . '">' . $i . '</a> '; |
|
405 | + } |
|
406 | + } |
|
407 | + } |
|
408 | + next_posts_link($nxtlabel, $max_page); |
|
409 | + if (($paged + $half_pages_to_show) < ($max_page)) { |
|
410 | + echo '<a href="' . str_replace('&paged', '&paged', get_pagenum_link($max_page)) . '">»</a>'; |
|
411 | + } |
|
412 | + echo "</div> $after"; |
|
413 | + } |
|
414 | 414 | |
415 | 415 | if (function_exists('geodir_location_geo_home_link')) { |
416 | 416 | add_filter('home_url', 'geodir_location_geo_home_link', 100000, 2); |
417 | 417 | } |
418 | - } |
|
418 | + } |
|
419 | 419 | } |
420 | 420 | |
421 | 421 | /** |
@@ -426,20 +426,20 @@ discard block |
||
426 | 426 | */ |
427 | 427 | function geodir_listingsearch_scripts() |
428 | 428 | { |
429 | - if (get_option('gd_search_dist') != '') { |
|
430 | - $dist = get_option('gd_search_dist'); |
|
431 | - } else { |
|
432 | - $dist = 500; |
|
433 | - } |
|
434 | - $dist_dif = 1000; |
|
435 | - |
|
436 | - if ($dist <= 5000) $dist_dif = 500; |
|
437 | - if ($dist <= 1000) $dist_dif = 100; |
|
438 | - if ($dist <= 500) $dist_dif = 50; |
|
439 | - if ($dist <= 100) $dist_dif = 10; |
|
440 | - if ($dist <= 50) $dist_dif = 5; |
|
441 | - |
|
442 | - ?> |
|
429 | + if (get_option('gd_search_dist') != '') { |
|
430 | + $dist = get_option('gd_search_dist'); |
|
431 | + } else { |
|
432 | + $dist = 500; |
|
433 | + } |
|
434 | + $dist_dif = 1000; |
|
435 | + |
|
436 | + if ($dist <= 5000) $dist_dif = 500; |
|
437 | + if ($dist <= 1000) $dist_dif = 100; |
|
438 | + if ($dist <= 500) $dist_dif = 50; |
|
439 | + if ($dist <= 100) $dist_dif = 10; |
|
440 | + if ($dist <= 50) $dist_dif = 5; |
|
441 | + |
|
442 | + ?> |
|
443 | 443 | <script type="text/javascript"> |
444 | 444 | |
445 | 445 | jQuery(function ($) { |
@@ -498,15 +498,15 @@ discard block |
||
498 | 498 | function geodir_add_sharelocation_scripts() |
499 | 499 | { |
500 | 500 | |
501 | - $default_search_for_text = SEARCH_FOR_TEXT; |
|
502 | - if (get_option('geodir_search_field_default_text')) |
|
503 | - $default_search_for_text = __(get_option('geodir_search_field_default_text'), 'geodirectory'); |
|
501 | + $default_search_for_text = SEARCH_FOR_TEXT; |
|
502 | + if (get_option('geodir_search_field_default_text')) |
|
503 | + $default_search_for_text = __(get_option('geodir_search_field_default_text'), 'geodirectory'); |
|
504 | 504 | |
505 | - $default_near_text = NEAR_TEXT; |
|
506 | - if (get_option('geodir_near_field_default_text')) |
|
507 | - $default_near_text = __(get_option('geodir_near_field_default_text'), 'geodirectory'); |
|
505 | + $default_near_text = NEAR_TEXT; |
|
506 | + if (get_option('geodir_near_field_default_text')) |
|
507 | + $default_near_text = __(get_option('geodir_near_field_default_text'), 'geodirectory'); |
|
508 | 508 | |
509 | - ?> |
|
509 | + ?> |
|
510 | 510 | |
511 | 511 | |
512 | 512 | <script type="text/javascript"> |
@@ -584,14 +584,14 @@ discard block |
||
584 | 584 | } else { |
585 | 585 | |
586 | 586 | Sgeocoder.geocode({'address': address<?php |
587 | - if($near_add = get_option('geodir_search_near_addition')){echo '+", '.$near_add.'"';} |
|
588 | - if($near_add2 = |
|
589 | - /** |
|
590 | - * Adds any extra info to the near search box query when trying to geolocate it via google api. |
|
591 | - * |
|
592 | - * @since 1.0.0 |
|
593 | - */ |
|
594 | - apply_filters('geodir_search_near_addition','')){echo $near_add2;}//gt_advanced_near_search();?>}, |
|
587 | + if($near_add = get_option('geodir_search_near_addition')){echo '+", '.$near_add.'"';} |
|
588 | + if($near_add2 = |
|
589 | + /** |
|
590 | + * Adds any extra info to the near search box query when trying to geolocate it via google api. |
|
591 | + * |
|
592 | + * @since 1.0.0 |
|
593 | + */ |
|
594 | + apply_filters('geodir_search_near_addition','')){echo $near_add2;}//gt_advanced_near_search();?>}, |
|
595 | 595 | function (results, status) { |
596 | 596 | if (status == google.maps.GeocoderStatus.OK) { |
597 | 597 | updateSearchPosition(results[0].geometry.location, $form); |
@@ -670,29 +670,29 @@ discard block |
||
670 | 670 | */ |
671 | 671 | function geodir_show_badges_on_image($which, $post, $link) |
672 | 672 | { |
673 | - switch ($which) { |
|
674 | - case 'featured': |
|
675 | - /** |
|
676 | - * Filter the featured image badge html that appears in the listings pages over the thumbnail. |
|
677 | - * |
|
678 | - * @since 1.0.0 |
|
679 | - * @param object $post The post object. |
|
680 | - * @param string $link The link to the post. |
|
681 | - */ |
|
682 | - return apply_filters('geodir_featured_badge_on_image', '<a href="' . $link . '"><span class="geodir_featured_img"> </span></a>',$post,$link); |
|
683 | - break; |
|
684 | - case 'new' : |
|
685 | - /** |
|
686 | - * Filter the new image badge html that appears in the listings pages over the thumbnail. |
|
687 | - * |
|
688 | - * @since 1.0.0 |
|
689 | - * @param object $post The post object. |
|
690 | - * @param string $link The link to the post. |
|
691 | - */ |
|
692 | - return apply_filters('geodir_new_badge_on_image', '<a href="' . $link . '"><span class="geodir_new_listing"> </span></a>',$post,$link); |
|
693 | - break; |
|
694 | - |
|
695 | - } |
|
673 | + switch ($which) { |
|
674 | + case 'featured': |
|
675 | + /** |
|
676 | + * Filter the featured image badge html that appears in the listings pages over the thumbnail. |
|
677 | + * |
|
678 | + * @since 1.0.0 |
|
679 | + * @param object $post The post object. |
|
680 | + * @param string $link The link to the post. |
|
681 | + */ |
|
682 | + return apply_filters('geodir_featured_badge_on_image', '<a href="' . $link . '"><span class="geodir_featured_img"> </span></a>',$post,$link); |
|
683 | + break; |
|
684 | + case 'new' : |
|
685 | + /** |
|
686 | + * Filter the new image badge html that appears in the listings pages over the thumbnail. |
|
687 | + * |
|
688 | + * @since 1.0.0 |
|
689 | + * @param object $post The post object. |
|
690 | + * @param string $link The link to the post. |
|
691 | + */ |
|
692 | + return apply_filters('geodir_new_badge_on_image', '<a href="' . $link . '"><span class="geodir_new_listing"> </span></a>',$post,$link); |
|
693 | + break; |
|
694 | + |
|
695 | + } |
|
696 | 696 | } |
697 | 697 | |
698 | 698 | ?> |
699 | 699 | \ No newline at end of file |
@@ -245,13 +245,14 @@ discard block |
||
245 | 245 | */ |
246 | 246 | function geodir_add_async_forscript($url) |
247 | 247 | { |
248 | - if (strpos($url, '#asyncload')===false) |
|
249 | - return $url; |
|
250 | - else if (is_admin()) |
|
251 | - return str_replace('#asyncload', '', $url); |
|
252 | - else |
|
253 | - return str_replace('#asyncload', '', $url)."' async='async"; |
|
254 | -} |
|
248 | + if (strpos($url, '#asyncload')===false) { |
|
249 | + return $url; |
|
250 | + } else if (is_admin()) { |
|
251 | + return str_replace('#asyncload', '', $url); |
|
252 | + } else { |
|
253 | + return str_replace('#asyncload', '', $url)."' async='async"; |
|
254 | + } |
|
255 | + } |
|
255 | 256 | add_filter('clean_url', 'geodir_add_async_forscript', 11, 1); |
256 | 257 | |
257 | 258 | /** |
@@ -298,7 +299,7 @@ discard block |
||
298 | 299 | wp_register_style('geodir-chosen-style', geodir_plugin_url() . '/geodirectory-assets/css/chosen.css', array(), GEODIRECTORY_VERSION); |
299 | 300 | wp_enqueue_style('geodir-chosen-style'); |
300 | 301 | |
301 | - }else{ |
|
302 | + } else{ |
|
302 | 303 | wp_register_style('geodir-core-scss', geodir_plugin_url() . '/geodirectory-assets/css/gd_core_frontend.css', array(), GEODIRECTORY_VERSION); |
303 | 304 | wp_enqueue_style('geodir-core-scss'); |
304 | 305 | |
@@ -359,8 +360,10 @@ discard block |
||
359 | 360 | |
360 | 361 | $half_pages_to_show = round($pages_to_show / 2); |
361 | 362 | |
362 | - if (geodir_is_page('home') || (get_option('geodir_set_as_home') && is_home())) // dont apply default pagination for geodirectory home page. |
|
363 | - return; |
|
363 | + if (geodir_is_page('home') || (get_option('geodir_set_as_home') && is_home())) { |
|
364 | + // dont apply default pagination for geodirectory home page. |
|
365 | + return; |
|
366 | + } |
|
364 | 367 | |
365 | 368 | if (!is_single()) { |
366 | 369 | if (function_exists('geodir_location_geo_home_link')) { |
@@ -433,11 +436,21 @@ discard block |
||
433 | 436 | } |
434 | 437 | $dist_dif = 1000; |
435 | 438 | |
436 | - if ($dist <= 5000) $dist_dif = 500; |
|
437 | - if ($dist <= 1000) $dist_dif = 100; |
|
438 | - if ($dist <= 500) $dist_dif = 50; |
|
439 | - if ($dist <= 100) $dist_dif = 10; |
|
440 | - if ($dist <= 50) $dist_dif = 5; |
|
439 | + if ($dist <= 5000) { |
|
440 | + $dist_dif = 500; |
|
441 | + } |
|
442 | + if ($dist <= 1000) { |
|
443 | + $dist_dif = 100; |
|
444 | + } |
|
445 | + if ($dist <= 500) { |
|
446 | + $dist_dif = 50; |
|
447 | + } |
|
448 | + if ($dist <= 100) { |
|
449 | + $dist_dif = 10; |
|
450 | + } |
|
451 | + if ($dist <= 50) { |
|
452 | + $dist_dif = 5; |
|
453 | + } |
|
441 | 454 | |
442 | 455 | ?> |
443 | 456 | <script type="text/javascript"> |
@@ -499,18 +512,23 @@ discard block |
||
499 | 512 | { |
500 | 513 | |
501 | 514 | $default_search_for_text = SEARCH_FOR_TEXT; |
502 | - if (get_option('geodir_search_field_default_text')) |
|
503 | - $default_search_for_text = __(get_option('geodir_search_field_default_text'), 'geodirectory'); |
|
515 | + if (get_option('geodir_search_field_default_text')) { |
|
516 | + $default_search_for_text = __(get_option('geodir_search_field_default_text'), 'geodirectory'); |
|
517 | + } |
|
504 | 518 | |
505 | 519 | $default_near_text = NEAR_TEXT; |
506 | - if (get_option('geodir_near_field_default_text')) |
|
507 | - $default_near_text = __(get_option('geodir_near_field_default_text'), 'geodirectory'); |
|
520 | + if (get_option('geodir_near_field_default_text')) { |
|
521 | + $default_near_text = __(get_option('geodir_near_field_default_text'), 'geodirectory'); |
|
522 | + } |
|
508 | 523 | |
509 | 524 | ?> |
510 | 525 | |
511 | 526 | |
512 | 527 | <script type="text/javascript"> |
513 | - var default_location = '<?php if($search_location = geodir_get_default_location()) echo $search_location->city ;?>'; |
|
528 | + var default_location = '<?php if($search_location = geodir_get_default_location()) { |
|
529 | + echo $search_location->city ; |
|
530 | +} |
|
531 | +?>'; |
|
514 | 532 | var latlng; |
515 | 533 | var Sgeocoder; |
516 | 534 | var address; |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | } |
48 | 48 | |
49 | 49 | |
50 | - add_action('init', 'gd_fix_cpt_rewrite_slug', 11);// this needs to be kept for a few versions |
|
50 | + add_action('init', 'gd_fix_cpt_rewrite_slug', 11); // this needs to be kept for a few versions |
|
51 | 51 | |
52 | 52 | update_option('geodirectory' . '_db_version', GEODIRECTORY_VERSION); |
53 | 53 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | * @since 1.0.0 |
85 | 85 | * @package GeoDirectory |
86 | 86 | */ |
87 | -function geodir_upgrade_146(){ |
|
87 | +function geodir_upgrade_146() { |
|
88 | 88 | gd_convert_virtual_pages(); |
89 | 89 | } |
90 | 90 | |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | * @since 1.5.0 |
95 | 95 | * @package GeoDirectory |
96 | 96 | */ |
97 | -function geodir_upgrade_150(){ |
|
97 | +function geodir_upgrade_150() { |
|
98 | 98 | gd_fix_cpt_rewrite_slug(); |
99 | 99 | } |
100 | 100 | |
@@ -106,12 +106,12 @@ discard block |
||
106 | 106 | * @since 1.4.8 |
107 | 107 | * @package GeoDirectory |
108 | 108 | */ |
109 | -function geodir_upgrade_148(){ |
|
109 | +function geodir_upgrade_148() { |
|
110 | 110 | /* |
111 | 111 | * Blank the users google password if present as we now use oAuth 2.0 |
112 | 112 | */ |
113 | - update_option('geodir_ga_pass',''); |
|
114 | - update_option('geodir_ga_user',''); |
|
113 | + update_option('geodir_ga_pass', ''); |
|
114 | + update_option('geodir_ga_user', ''); |
|
115 | 115 | |
116 | 116 | } |
117 | 117 | |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | * @since 1.5.3 |
123 | 123 | * @package GeoDirectory |
124 | 124 | */ |
125 | -function geodir_upgrade_153(){ |
|
125 | +function geodir_upgrade_153() { |
|
126 | 126 | geodir_create_page(esc_sql(_x('gd-info', 'page_slug', 'geodirectory')), 'geodir_info_page', __('Info', 'geodirectory'), ''); |
127 | 127 | geodir_create_page(esc_sql(_x('gd-login', 'page_slug', 'geodirectory')), 'geodir_login_page', __('Login', 'geodirectory'), ''); |
128 | 128 | } |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | * @since 1.5.3 |
134 | 134 | * @package GeoDirectory |
135 | 135 | */ |
136 | -function geodir_upgrade_154(){ |
|
136 | +function geodir_upgrade_154() { |
|
137 | 137 | geodir_create_page(esc_sql(_x('gd-home', 'page_slug', 'geodirectory')), 'geodir_home_page', __('GD Home page', 'geodirectory'), ''); |
138 | 138 | } |
139 | 139 | |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | * @since 1.5.2 |
144 | 144 | * @package GeoDirectory |
145 | 145 | */ |
146 | -function geodir_upgrade_152(){ |
|
146 | +function geodir_upgrade_152() { |
|
147 | 147 | gd_fix_address_detail_table_limit(); |
148 | 148 | } |
149 | 149 | |
@@ -641,7 +641,7 @@ discard block |
||
641 | 641 | |
642 | 642 | update_option('gd_theme_compats', $theme_compat); |
643 | 643 | |
644 | - gd_set_theme_compat();// set the compat pack if avail |
|
644 | + gd_set_theme_compat(); // set the compat pack if avail |
|
645 | 645 | } |
646 | 646 | |
647 | 647 | |
@@ -652,7 +652,7 @@ discard block |
||
652 | 652 | * @package GeoDirectory |
653 | 653 | * @global object $wpdb WordPress Database object. |
654 | 654 | */ |
655 | -function gd_convert_virtual_pages(){ |
|
655 | +function gd_convert_virtual_pages() { |
|
656 | 656 | global $wpdb; |
657 | 657 | |
658 | 658 | // Update the add listing page settings |
@@ -663,9 +663,9 @@ discard block |
||
663 | 663 | ) |
664 | 664 | ); |
665 | 665 | |
666 | - if($add_listing_page){ |
|
667 | - wp_update_post( array('ID' => $add_listing_page, 'post_status' => 'publish') ); |
|
668 | - update_option( 'geodir_add_listing_page', $add_listing_page); |
|
666 | + if ($add_listing_page) { |
|
667 | + wp_update_post(array('ID' => $add_listing_page, 'post_status' => 'publish')); |
|
668 | + update_option('geodir_add_listing_page', $add_listing_page); |
|
669 | 669 | } |
670 | 670 | |
671 | 671 | // Update the listing preview page settings |
@@ -676,9 +676,9 @@ discard block |
||
676 | 676 | ) |
677 | 677 | ); |
678 | 678 | |
679 | - if($listing_preview_page){ |
|
680 | - wp_update_post( array('ID' => $listing_preview_page, 'post_status' => 'publish') ); |
|
681 | - update_option( 'geodir_preview_page', $listing_preview_page); |
|
679 | + if ($listing_preview_page) { |
|
680 | + wp_update_post(array('ID' => $listing_preview_page, 'post_status' => 'publish')); |
|
681 | + update_option('geodir_preview_page', $listing_preview_page); |
|
682 | 682 | } |
683 | 683 | |
684 | 684 | // Update the listing success page settings |
@@ -689,9 +689,9 @@ discard block |
||
689 | 689 | ) |
690 | 690 | ); |
691 | 691 | |
692 | - if($listing_success_page){ |
|
693 | - wp_update_post( array('ID' => $listing_success_page, 'post_status' => 'publish') ); |
|
694 | - update_option( 'geodir_success_page', $listing_success_page); |
|
692 | + if ($listing_success_page) { |
|
693 | + wp_update_post(array('ID' => $listing_success_page, 'post_status' => 'publish')); |
|
694 | + update_option('geodir_success_page', $listing_success_page); |
|
695 | 695 | } |
696 | 696 | |
697 | 697 | // Update the listing success page settings |
@@ -702,11 +702,11 @@ discard block |
||
702 | 702 | ) |
703 | 703 | ); |
704 | 704 | |
705 | - if($location_page){ |
|
705 | + if ($location_page) { |
|
706 | 706 | $location_slug = get_option('geodir_location_prefix'); |
707 | - if(!$location_slug ){$location_slug = 'location';} |
|
708 | - wp_update_post( array('ID' => $location_page, 'post_status' => 'publish','post_name' => $location_slug) ); |
|
709 | - update_option( 'geodir_location_page', $location_page); |
|
707 | + if (!$location_slug) {$location_slug = 'location'; } |
|
708 | + wp_update_post(array('ID' => $location_page, 'post_status' => 'publish', 'post_name' => $location_slug)); |
|
709 | + update_option('geodir_location_page', $location_page); |
|
710 | 710 | } |
711 | 711 | |
712 | 712 | } |
@@ -725,13 +725,13 @@ discard block |
||
725 | 725 | $post_types = get_option('geodir_post_types'); |
726 | 726 | |
727 | 727 | |
728 | - if (is_array($post_types)){ |
|
728 | + if (is_array($post_types)) { |
|
729 | 729 | |
730 | 730 | foreach ($post_types as $post_type => $args) { |
731 | 731 | |
732 | 732 | |
733 | - if(isset($args['rewrite']['slug'])){ |
|
734 | - $args['rewrite']['slug'] = str_replace("/%gd_taxonomy%","",$args['rewrite']['slug']); |
|
733 | + if (isset($args['rewrite']['slug'])) { |
|
734 | + $args['rewrite']['slug'] = str_replace("/%gd_taxonomy%", "", $args['rewrite']['slug']); |
|
735 | 735 | } |
736 | 736 | |
737 | 737 | $alt_post_types[$post_type] = $args; |
@@ -739,8 +739,8 @@ discard block |
||
739 | 739 | } |
740 | 740 | } |
741 | 741 | |
742 | - if(!empty($alt_post_types)) { |
|
743 | - update_option('geodir_post_types',$alt_post_types); |
|
742 | + if (!empty($alt_post_types)) { |
|
743 | + update_option('geodir_post_types', $alt_post_types); |
|
744 | 744 | } |
745 | 745 | |
746 | 746 | |
@@ -767,8 +767,8 @@ discard block |
||
767 | 767 | // update each GD CTP |
768 | 768 | try { |
769 | 769 | $wpdb->query("ALTER TABLE " . $wpdb->prefix . "geodir_" . $key . "_detail MODIFY post_city VARCHAR( 50 ) NULL,MODIFY post_region VARCHAR( 50 ) NULL,MODIFY post_country VARCHAR( 50 ) NULL"); |
770 | - } catch(Exception $e) { |
|
771 | - error_log( 'Error: ' . $e->getMessage() ); |
|
770 | + } catch (Exception $e) { |
|
771 | + error_log('Error: ' . $e->getMessage()); |
|
772 | 772 | } |
773 | 773 | } |
774 | 774 | } |
@@ -10,46 +10,46 @@ discard block |
||
10 | 10 | global $wpdb; |
11 | 11 | |
12 | 12 | if (get_option('geodirectory' . '_db_version') != GEODIRECTORY_VERSION) { |
13 | - /** |
|
14 | - * Include custom database table related functions. |
|
15 | - * |
|
16 | - * @since 1.0.0 |
|
17 | - * @package GeoDirectory |
|
18 | - */ |
|
19 | - include_once('geodirectory-admin/admin_db_install.php'); |
|
20 | - add_action('plugins_loaded', 'geodirectory_upgrade_all', 10); |
|
21 | - if (GEODIRECTORY_VERSION <= '1.3.6') { |
|
22 | - add_action('plugins_loaded', 'geodir_upgrade_136', 11); |
|
23 | - } |
|
13 | + /** |
|
14 | + * Include custom database table related functions. |
|
15 | + * |
|
16 | + * @since 1.0.0 |
|
17 | + * @package GeoDirectory |
|
18 | + */ |
|
19 | + include_once('geodirectory-admin/admin_db_install.php'); |
|
20 | + add_action('plugins_loaded', 'geodirectory_upgrade_all', 10); |
|
21 | + if (GEODIRECTORY_VERSION <= '1.3.6') { |
|
22 | + add_action('plugins_loaded', 'geodir_upgrade_136', 11); |
|
23 | + } |
|
24 | 24 | |
25 | - if (GEODIRECTORY_VERSION <= '1.4.6') { |
|
26 | - add_action('init', 'geodir_upgrade_146', 11); |
|
27 | - } |
|
25 | + if (GEODIRECTORY_VERSION <= '1.4.6') { |
|
26 | + add_action('init', 'geodir_upgrade_146', 11); |
|
27 | + } |
|
28 | 28 | |
29 | - if (GEODIRECTORY_VERSION <= '1.4.8') { |
|
30 | - add_action('init', 'geodir_upgrade_148', 11); |
|
31 | - } |
|
29 | + if (GEODIRECTORY_VERSION <= '1.4.8') { |
|
30 | + add_action('init', 'geodir_upgrade_148', 11); |
|
31 | + } |
|
32 | 32 | |
33 | - if (GEODIRECTORY_VERSION <= '1.5.0') { |
|
34 | - add_action('init', 'geodir_upgrade_150', 11); |
|
35 | - } |
|
33 | + if (GEODIRECTORY_VERSION <= '1.5.0') { |
|
34 | + add_action('init', 'geodir_upgrade_150', 11); |
|
35 | + } |
|
36 | 36 | |
37 | - if (GEODIRECTORY_VERSION <= '1.5.2') { |
|
38 | - add_action('init', 'geodir_upgrade_152', 11); |
|
39 | - } |
|
37 | + if (GEODIRECTORY_VERSION <= '1.5.2') { |
|
38 | + add_action('init', 'geodir_upgrade_152', 11); |
|
39 | + } |
|
40 | 40 | |
41 | - if (GEODIRECTORY_VERSION <= '1.5.3') { |
|
42 | - add_action('init', 'geodir_upgrade_153', 11); |
|
43 | - } |
|
41 | + if (GEODIRECTORY_VERSION <= '1.5.3') { |
|
42 | + add_action('init', 'geodir_upgrade_153', 11); |
|
43 | + } |
|
44 | 44 | |
45 | - if (GEODIRECTORY_VERSION <= '1.5.4') { |
|
46 | - add_action('init', 'geodir_upgrade_154', 11); |
|
47 | - } |
|
45 | + if (GEODIRECTORY_VERSION <= '1.5.4') { |
|
46 | + add_action('init', 'geodir_upgrade_154', 11); |
|
47 | + } |
|
48 | 48 | |
49 | 49 | |
50 | - add_action('init', 'gd_fix_cpt_rewrite_slug', 11);// this needs to be kept for a few versions |
|
50 | + add_action('init', 'gd_fix_cpt_rewrite_slug', 11);// this needs to be kept for a few versions |
|
51 | 51 | |
52 | - update_option('geodirectory' . '_db_version', GEODIRECTORY_VERSION); |
|
52 | + update_option('geodirectory' . '_db_version', GEODIRECTORY_VERSION); |
|
53 | 53 | |
54 | 54 | } |
55 | 55 | |
@@ -62,9 +62,9 @@ discard block |
||
62 | 62 | */ |
63 | 63 | function geodirectory_upgrade_all() |
64 | 64 | { |
65 | - geodir_create_tables(); |
|
66 | - geodir_update_review_db(); |
|
67 | - gd_install_theme_compat(); |
|
65 | + geodir_create_tables(); |
|
66 | + geodir_update_review_db(); |
|
67 | + gd_install_theme_compat(); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | /** |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | */ |
76 | 76 | function geodir_upgrade_136() |
77 | 77 | { |
78 | - geodir_fix_review_overall_rating(); |
|
78 | + geodir_fix_review_overall_rating(); |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | /** |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | * @package GeoDirectory |
86 | 86 | */ |
87 | 87 | function geodir_upgrade_146(){ |
88 | - gd_convert_virtual_pages(); |
|
88 | + gd_convert_virtual_pages(); |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | /** |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | * @package GeoDirectory |
96 | 96 | */ |
97 | 97 | function geodir_upgrade_150(){ |
98 | - gd_fix_cpt_rewrite_slug(); |
|
98 | + gd_fix_cpt_rewrite_slug(); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | |
@@ -107,11 +107,11 @@ discard block |
||
107 | 107 | * @package GeoDirectory |
108 | 108 | */ |
109 | 109 | function geodir_upgrade_148(){ |
110 | - /* |
|
110 | + /* |
|
111 | 111 | * Blank the users google password if present as we now use oAuth 2.0 |
112 | 112 | */ |
113 | - update_option('geodir_ga_pass',''); |
|
114 | - update_option('geodir_ga_user',''); |
|
113 | + update_option('geodir_ga_pass',''); |
|
114 | + update_option('geodir_ga_user',''); |
|
115 | 115 | |
116 | 116 | } |
117 | 117 | |
@@ -123,8 +123,8 @@ discard block |
||
123 | 123 | * @package GeoDirectory |
124 | 124 | */ |
125 | 125 | function geodir_upgrade_153(){ |
126 | - geodir_create_page(esc_sql(_x('gd-info', 'page_slug', 'geodirectory')), 'geodir_info_page', __('Info', 'geodirectory'), ''); |
|
127 | - geodir_create_page(esc_sql(_x('gd-login', 'page_slug', 'geodirectory')), 'geodir_login_page', __('Login', 'geodirectory'), ''); |
|
126 | + geodir_create_page(esc_sql(_x('gd-info', 'page_slug', 'geodirectory')), 'geodir_info_page', __('Info', 'geodirectory'), ''); |
|
127 | + geodir_create_page(esc_sql(_x('gd-login', 'page_slug', 'geodirectory')), 'geodir_login_page', __('Login', 'geodirectory'), ''); |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | /** |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | * @package GeoDirectory |
135 | 135 | */ |
136 | 136 | function geodir_upgrade_154(){ |
137 | - geodir_create_page(esc_sql(_x('gd-home', 'page_slug', 'geodirectory')), 'geodir_home_page', __('GD Home page', 'geodirectory'), ''); |
|
137 | + geodir_create_page(esc_sql(_x('gd-home', 'page_slug', 'geodirectory')), 'geodir_home_page', __('GD Home page', 'geodirectory'), ''); |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | /** |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | * @package GeoDirectory |
145 | 145 | */ |
146 | 146 | function geodir_upgrade_152(){ |
147 | - gd_fix_address_detail_table_limit(); |
|
147 | + gd_fix_address_detail_table_limit(); |
|
148 | 148 | } |
149 | 149 | |
150 | 150 | |
@@ -158,12 +158,12 @@ discard block |
||
158 | 158 | */ |
159 | 159 | function geodir_update_review_db() |
160 | 160 | { |
161 | - global $wpdb, $plugin_prefix; |
|
161 | + global $wpdb, $plugin_prefix; |
|
162 | 162 | |
163 | - geodir_fix_review_date(); |
|
164 | - geodir_fix_review_post_status(); |
|
165 | - geodir_fix_review_content(); |
|
166 | - geodir_fix_review_location(); |
|
163 | + geodir_fix_review_date(); |
|
164 | + geodir_fix_review_post_status(); |
|
165 | + geodir_fix_review_content(); |
|
166 | + geodir_fix_review_location(); |
|
167 | 167 | |
168 | 168 | } |
169 | 169 | |
@@ -176,8 +176,8 @@ discard block |
||
176 | 176 | */ |
177 | 177 | function geodir_fix_review_date() |
178 | 178 | { |
179 | - global $wpdb; |
|
180 | - $wpdb->query("UPDATE " . GEODIR_REVIEW_TABLE . " gdr JOIN $wpdb->comments c ON gdr.comment_id=c.comment_ID SET gdr.post_date = c.comment_date WHERE gdr.post_date='0000-00-00 00:00:00'"); |
|
179 | + global $wpdb; |
|
180 | + $wpdb->query("UPDATE " . GEODIR_REVIEW_TABLE . " gdr JOIN $wpdb->comments c ON gdr.comment_id=c.comment_ID SET gdr.post_date = c.comment_date WHERE gdr.post_date='0000-00-00 00:00:00'"); |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | /** |
@@ -189,8 +189,8 @@ discard block |
||
189 | 189 | */ |
190 | 190 | function geodir_fix_review_post_status() |
191 | 191 | { |
192 | - global $wpdb; |
|
193 | - $wpdb->query("UPDATE " . GEODIR_REVIEW_TABLE . " gdr JOIN $wpdb->posts p ON gdr.post_id=p.ID SET gdr.post_status = 1 WHERE gdr.post_status IS NULL AND p.post_status='publish'"); |
|
192 | + global $wpdb; |
|
193 | + $wpdb->query("UPDATE " . GEODIR_REVIEW_TABLE . " gdr JOIN $wpdb->posts p ON gdr.post_id=p.ID SET gdr.post_status = 1 WHERE gdr.post_status IS NULL AND p.post_status='publish'"); |
|
194 | 194 | } |
195 | 195 | |
196 | 196 | /** |
@@ -203,12 +203,12 @@ discard block |
||
203 | 203 | */ |
204 | 204 | function geodir_fix_review_content() |
205 | 205 | { |
206 | - global $wpdb; |
|
207 | - if ($wpdb->query("UPDATE " . GEODIR_REVIEW_TABLE . " gdr JOIN $wpdb->comments c ON gdr.comment_id=c.comment_ID SET gdr.comment_content = c.comment_content WHERE gdr.comment_content IS NULL")) { |
|
208 | - return true; |
|
209 | - } else { |
|
210 | - return false; |
|
211 | - } |
|
206 | + global $wpdb; |
|
207 | + if ($wpdb->query("UPDATE " . GEODIR_REVIEW_TABLE . " gdr JOIN $wpdb->comments c ON gdr.comment_id=c.comment_ID SET gdr.comment_content = c.comment_content WHERE gdr.comment_content IS NULL")) { |
|
208 | + return true; |
|
209 | + } else { |
|
210 | + return false; |
|
211 | + } |
|
212 | 212 | } |
213 | 213 | |
214 | 214 | /** |
@@ -221,20 +221,20 @@ discard block |
||
221 | 221 | */ |
222 | 222 | function geodir_fix_review_location() |
223 | 223 | { |
224 | - global $wpdb; |
|
224 | + global $wpdb; |
|
225 | 225 | |
226 | - $all_postypes = geodir_get_posttypes(); |
|
226 | + $all_postypes = geodir_get_posttypes(); |
|
227 | 227 | |
228 | - if (!empty($all_postypes)) { |
|
229 | - foreach ($all_postypes as $key) { |
|
230 | - // update each GD CTP |
|
228 | + if (!empty($all_postypes)) { |
|
229 | + foreach ($all_postypes as $key) { |
|
230 | + // update each GD CTP |
|
231 | 231 | |
232 | - $wpdb->query("UPDATE " . GEODIR_REVIEW_TABLE . " gdr JOIN " . $wpdb->prefix . "geodir_" . $key . "_detail d ON gdr.post_id=d.post_id SET gdr.post_latitude = d.post_latitude, gdr.post_longitude = d.post_longitude, gdr.post_city = d.post_city, gdr.post_region=d.post_region, gdr.post_country=d.post_country WHERE gdr.post_latitude IS NULL OR gdr.post_city IS NULL"); |
|
232 | + $wpdb->query("UPDATE " . GEODIR_REVIEW_TABLE . " gdr JOIN " . $wpdb->prefix . "geodir_" . $key . "_detail d ON gdr.post_id=d.post_id SET gdr.post_latitude = d.post_latitude, gdr.post_longitude = d.post_longitude, gdr.post_city = d.post_city, gdr.post_region=d.post_region, gdr.post_country=d.post_country WHERE gdr.post_latitude IS NULL OR gdr.post_city IS NULL"); |
|
233 | 233 | |
234 | - } |
|
235 | - return true; |
|
236 | - } |
|
237 | - return false; |
|
234 | + } |
|
235 | + return true; |
|
236 | + } |
|
237 | + return false; |
|
238 | 238 | } |
239 | 239 | |
240 | 240 | /** |
@@ -246,25 +246,25 @@ discard block |
||
246 | 246 | */ |
247 | 247 | function geodir_fix_review_overall_rating() |
248 | 248 | { |
249 | - global $wpdb; |
|
249 | + global $wpdb; |
|
250 | 250 | |
251 | - $all_postypes = geodir_get_posttypes(); |
|
251 | + $all_postypes = geodir_get_posttypes(); |
|
252 | 252 | |
253 | - if (!empty($all_postypes)) { |
|
254 | - foreach ($all_postypes as $key) { |
|
255 | - // update each GD CTP |
|
256 | - $reviews = $wpdb->get_results("SELECT post_id FROM " . $wpdb->prefix . "geodir_" . $key . "_detail d"); |
|
253 | + if (!empty($all_postypes)) { |
|
254 | + foreach ($all_postypes as $key) { |
|
255 | + // update each GD CTP |
|
256 | + $reviews = $wpdb->get_results("SELECT post_id FROM " . $wpdb->prefix . "geodir_" . $key . "_detail d"); |
|
257 | 257 | |
258 | - if (!empty($reviews)) { |
|
259 | - foreach ($reviews as $post_id) { |
|
260 | - geodir_update_postrating($post_id->post_id, $key); |
|
261 | - } |
|
258 | + if (!empty($reviews)) { |
|
259 | + foreach ($reviews as $post_id) { |
|
260 | + geodir_update_postrating($post_id->post_id, $key); |
|
261 | + } |
|
262 | 262 | |
263 | - } |
|
263 | + } |
|
264 | 264 | |
265 | - } |
|
265 | + } |
|
266 | 266 | |
267 | - } |
|
267 | + } |
|
268 | 268 | } |
269 | 269 | |
270 | 270 | |
@@ -281,367 +281,367 @@ discard block |
||
281 | 281 | */ |
282 | 282 | function gd_install_theme_compat() |
283 | 283 | { |
284 | - global $wpdb; |
|
284 | + global $wpdb; |
|
285 | 285 | |
286 | - $theme_compat = array(); |
|
287 | - $theme_compat = get_option('gd_theme_compats'); |
|
286 | + $theme_compat = array(); |
|
287 | + $theme_compat = get_option('gd_theme_compats'); |
|
288 | 288 | //GDF |
289 | - $theme_compat['GeoDirectory_Framework'] = array( |
|
290 | - 'geodir_wrapper_open_id' => 'geodir_wrapper', |
|
291 | - 'geodir_wrapper_open_class' => '', |
|
292 | - 'geodir_wrapper_open_replace' => '', |
|
293 | - 'geodir_wrapper_close_replace' => '</div></div><!-- content ends here-->', |
|
294 | - 'geodir_wrapper_content_open_id' => 'geodir_content', |
|
295 | - 'geodir_wrapper_content_open_class' => '', |
|
296 | - 'geodir_wrapper_content_open_replace' => '', |
|
297 | - 'geodir_wrapper_content_close_replace' => '', |
|
298 | - 'geodir_article_open_id' => '', |
|
299 | - 'geodir_article_open_class' => '', |
|
300 | - 'geodir_article_open_replace' => '', |
|
301 | - 'geodir_article_close_replace' => '', |
|
302 | - 'geodir_sidebar_right_open_id' => '', |
|
303 | - 'geodir_sidebar_right_open_class' => '', |
|
304 | - 'geodir_sidebar_right_open_replace' => '<aside id="gd-sidebar-wrapper" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>', |
|
305 | - 'geodir_sidebar_right_close_replace' => '', |
|
306 | - 'geodir_sidebar_left_open_id' => '', |
|
307 | - 'geodir_sidebar_left_open_class' => '', |
|
308 | - 'geodir_sidebar_left_open_replace' => '<aside id="gd-sidebar-wrapper" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>', |
|
309 | - 'geodir_sidebar_left_close_replace' => '', |
|
310 | - 'geodir_main_content_open_id' => '', |
|
311 | - 'geodir_main_content_open_class' => '', |
|
312 | - 'geodir_main_content_open_replace' => '<!-- removed -->', |
|
313 | - 'geodir_main_content_close_replace' => '<!-- removed -->', |
|
314 | - 'geodir_top_content_add' => '', |
|
315 | - 'geodir_before_main_content_add' => '<div class="clearfix geodir-common">', |
|
316 | - 'geodir_before_widget_filter' => '', |
|
317 | - 'geodir_after_widget_filter' => '', |
|
318 | - 'geodir_theme_compat_css' => '', |
|
319 | - 'geodir_theme_compat_js' => '', |
|
320 | - 'geodir_theme_compat_default_options' => '', |
|
321 | - 'geodir_theme_compat_code' => '' |
|
322 | - ); |
|
289 | + $theme_compat['GeoDirectory_Framework'] = array( |
|
290 | + 'geodir_wrapper_open_id' => 'geodir_wrapper', |
|
291 | + 'geodir_wrapper_open_class' => '', |
|
292 | + 'geodir_wrapper_open_replace' => '', |
|
293 | + 'geodir_wrapper_close_replace' => '</div></div><!-- content ends here-->', |
|
294 | + 'geodir_wrapper_content_open_id' => 'geodir_content', |
|
295 | + 'geodir_wrapper_content_open_class' => '', |
|
296 | + 'geodir_wrapper_content_open_replace' => '', |
|
297 | + 'geodir_wrapper_content_close_replace' => '', |
|
298 | + 'geodir_article_open_id' => '', |
|
299 | + 'geodir_article_open_class' => '', |
|
300 | + 'geodir_article_open_replace' => '', |
|
301 | + 'geodir_article_close_replace' => '', |
|
302 | + 'geodir_sidebar_right_open_id' => '', |
|
303 | + 'geodir_sidebar_right_open_class' => '', |
|
304 | + 'geodir_sidebar_right_open_replace' => '<aside id="gd-sidebar-wrapper" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>', |
|
305 | + 'geodir_sidebar_right_close_replace' => '', |
|
306 | + 'geodir_sidebar_left_open_id' => '', |
|
307 | + 'geodir_sidebar_left_open_class' => '', |
|
308 | + 'geodir_sidebar_left_open_replace' => '<aside id="gd-sidebar-wrapper" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>', |
|
309 | + 'geodir_sidebar_left_close_replace' => '', |
|
310 | + 'geodir_main_content_open_id' => '', |
|
311 | + 'geodir_main_content_open_class' => '', |
|
312 | + 'geodir_main_content_open_replace' => '<!-- removed -->', |
|
313 | + 'geodir_main_content_close_replace' => '<!-- removed -->', |
|
314 | + 'geodir_top_content_add' => '', |
|
315 | + 'geodir_before_main_content_add' => '<div class="clearfix geodir-common">', |
|
316 | + 'geodir_before_widget_filter' => '', |
|
317 | + 'geodir_after_widget_filter' => '', |
|
318 | + 'geodir_theme_compat_css' => '', |
|
319 | + 'geodir_theme_compat_js' => '', |
|
320 | + 'geodir_theme_compat_default_options' => '', |
|
321 | + 'geodir_theme_compat_code' => '' |
|
322 | + ); |
|
323 | 323 | |
324 | 324 | //Directory Theme |
325 | - $theme_compat['Directory_Starter'] = array( |
|
326 | - 'geodir_wrapper_open_id' => 'geodir_wrapper', |
|
327 | - 'geodir_wrapper_open_class' => '', |
|
328 | - 'geodir_wrapper_open_replace' => '', |
|
329 | - 'geodir_wrapper_close_replace' => '</div></div><!-- content ends here-->', |
|
330 | - 'geodir_wrapper_content_open_id' => 'geodir_content', |
|
331 | - 'geodir_wrapper_content_open_class' => '', |
|
332 | - 'geodir_wrapper_content_open_replace' => '', |
|
333 | - 'geodir_wrapper_content_close_replace' => '', |
|
334 | - 'geodir_article_open_id' => '', |
|
335 | - 'geodir_article_open_class' => '', |
|
336 | - 'geodir_article_open_replace' => '', |
|
337 | - 'geodir_article_close_replace' => '', |
|
338 | - 'geodir_sidebar_right_open_id' => '', |
|
339 | - 'geodir_sidebar_right_open_class' => '', |
|
340 | - 'geodir_sidebar_right_open_replace' => '<aside id="gd-sidebar-wrapper" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>', |
|
341 | - 'geodir_sidebar_right_close_replace' => '', |
|
342 | - 'geodir_sidebar_left_open_id' => '', |
|
343 | - 'geodir_sidebar_left_open_class' => '', |
|
344 | - 'geodir_sidebar_left_open_replace' => '<aside id="gd-sidebar-wrapper" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>', |
|
345 | - 'geodir_sidebar_left_close_replace' => '', |
|
346 | - 'geodir_main_content_open_id' => '', |
|
347 | - 'geodir_main_content_open_class' => '', |
|
348 | - 'geodir_main_content_open_replace' => '<!-- removed -->', |
|
349 | - 'geodir_main_content_close_replace' => '<!-- removed -->', |
|
350 | - 'geodir_top_content_add' => '', |
|
351 | - 'geodir_before_main_content_add' => '<div class="clearfix geodir-common">', |
|
352 | - 'geodir_before_widget_filter' => '', |
|
353 | - 'geodir_after_widget_filter' => '', |
|
354 | - 'geodir_theme_compat_css' => '', |
|
355 | - 'geodir_theme_compat_js' => '', |
|
356 | - 'geodir_theme_compat_default_options' => '', |
|
357 | - 'geodir_theme_compat_code' => '' |
|
358 | - ); |
|
325 | + $theme_compat['Directory_Starter'] = array( |
|
326 | + 'geodir_wrapper_open_id' => 'geodir_wrapper', |
|
327 | + 'geodir_wrapper_open_class' => '', |
|
328 | + 'geodir_wrapper_open_replace' => '', |
|
329 | + 'geodir_wrapper_close_replace' => '</div></div><!-- content ends here-->', |
|
330 | + 'geodir_wrapper_content_open_id' => 'geodir_content', |
|
331 | + 'geodir_wrapper_content_open_class' => '', |
|
332 | + 'geodir_wrapper_content_open_replace' => '', |
|
333 | + 'geodir_wrapper_content_close_replace' => '', |
|
334 | + 'geodir_article_open_id' => '', |
|
335 | + 'geodir_article_open_class' => '', |
|
336 | + 'geodir_article_open_replace' => '', |
|
337 | + 'geodir_article_close_replace' => '', |
|
338 | + 'geodir_sidebar_right_open_id' => '', |
|
339 | + 'geodir_sidebar_right_open_class' => '', |
|
340 | + 'geodir_sidebar_right_open_replace' => '<aside id="gd-sidebar-wrapper" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>', |
|
341 | + 'geodir_sidebar_right_close_replace' => '', |
|
342 | + 'geodir_sidebar_left_open_id' => '', |
|
343 | + 'geodir_sidebar_left_open_class' => '', |
|
344 | + 'geodir_sidebar_left_open_replace' => '<aside id="gd-sidebar-wrapper" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>', |
|
345 | + 'geodir_sidebar_left_close_replace' => '', |
|
346 | + 'geodir_main_content_open_id' => '', |
|
347 | + 'geodir_main_content_open_class' => '', |
|
348 | + 'geodir_main_content_open_replace' => '<!-- removed -->', |
|
349 | + 'geodir_main_content_close_replace' => '<!-- removed -->', |
|
350 | + 'geodir_top_content_add' => '', |
|
351 | + 'geodir_before_main_content_add' => '<div class="clearfix geodir-common">', |
|
352 | + 'geodir_before_widget_filter' => '', |
|
353 | + 'geodir_after_widget_filter' => '', |
|
354 | + 'geodir_theme_compat_css' => '', |
|
355 | + 'geodir_theme_compat_js' => '', |
|
356 | + 'geodir_theme_compat_default_options' => '', |
|
357 | + 'geodir_theme_compat_code' => '' |
|
358 | + ); |
|
359 | 359 | |
360 | 360 | //Jobby |
361 | - $theme_compat['Jobby'] = $theme_compat['Directory_Starter']; |
|
361 | + $theme_compat['Jobby'] = $theme_compat['Directory_Starter']; |
|
362 | 362 | |
363 | 363 | //GeoProperty |
364 | - $theme_compat['GeoProperty'] = $theme_compat['Directory_Starter']; |
|
364 | + $theme_compat['GeoProperty'] = $theme_compat['Directory_Starter']; |
|
365 | 365 | |
366 | 366 | //Avada |
367 | - $theme_compat['Avada'] = array( |
|
368 | - 'geodir_wrapper_open_id' => '', |
|
369 | - 'geodir_wrapper_open_class' => '', |
|
370 | - 'geodir_wrapper_open_replace' => '<!-- removed -->', |
|
371 | - 'geodir_wrapper_close_replace' => '<!-- removed -->', |
|
372 | - 'geodir_wrapper_content_open_id' => 'content', |
|
373 | - 'geodir_wrapper_content_open_class' => '', |
|
374 | - 'geodir_wrapper_content_open_replace' => '', |
|
375 | - 'geodir_wrapper_content_close_replace' => '', |
|
376 | - 'geodir_article_open_id' => '', |
|
377 | - 'geodir_article_open_class' => '', |
|
378 | - 'geodir_article_open_replace' => '', |
|
379 | - 'geodir_article_close_replace' => '', |
|
380 | - 'geodir_sidebar_right_open_id' => '', |
|
381 | - 'geodir_sidebar_right_open_class' => '', |
|
382 | - 'geodir_sidebar_right_open_replace' => '<div id="sidebar" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>', |
|
383 | - 'geodir_sidebar_right_close_replace' => '</div><!-- end sidebar -->', |
|
384 | - 'geodir_sidebar_left_open_id' => '', |
|
385 | - 'geodir_sidebar_left_open_class' => '', |
|
386 | - 'geodir_sidebar_left_open_replace' => '<div id="sidebar" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>', |
|
387 | - 'geodir_sidebar_left_close_replace' => '</div><!-- end sidebar -->', |
|
388 | - 'geodir_main_content_open_id' => '', |
|
389 | - 'geodir_main_content_open_class' => '', |
|
390 | - 'geodir_main_content_open_replace' => '<!-- removed -->', |
|
391 | - 'geodir_main_content_close_replace' => '<!-- removed -->', |
|
392 | - 'geodir_top_content_add' => '', |
|
393 | - 'geodir_before_main_content_add' => '', |
|
394 | - 'geodir_before_widget_filter' => '', |
|
395 | - 'geodir_after_widget_filter' => '', |
|
396 | - 'geodir_theme_compat_css' => stripslashes('.geodir-sidebar-left{float:left}select,textarea{border-style:solid;border-width:1px}.top-menu li > div{visibility:visible}.geodir-chosen-container-single .chosen-single{height:auto}ul li#menu-item-gd-location-switcher ul{width:222px}ul li#menu-item-gd-location-switcher ul li{padding-right:0!important}#mobile-nav li#mobile-menu-item-gd-location-switcher li a{padding-left:10px;padding-right:10px}#menu-item-gd-location-switcher dd,#mobile-menu-item-gd-location-switcher{margin-left:0}#menu-item-gd-location-switcher dd a{display:block}.geodir-chosen-container .chosen-results li.highlighted{background-color:#eee;background-image:none;color:#444}#mobile-nav li.mobile-nav-item li a:before{content:\'\';margin:0}#mobile-nav li.mobile-nav-item li a{padding:10px;width:auto}.geodir-listing-search{text-align:center}.geodir-search{float:none;margin:0}.geodir-search select,.geodir-search .search_by_post,.geodir-search input[type="text"],.geodir-search button[type="button"], .geodir-search input[type="button"],.geodir-search input[type="submit"]{display:inline-block;float:none}.geodir-cat-list ul li,.map_category ul li{list-style-type:none}.wpgeo-avada .page-title ul li:after{content:\'\'}.top_banner_section{margin-bottom:0}.geodir-category-list-in{margin:0;padding:15px}.geodir_full_page .geodir-cat-list .widget-title{margin-top:0}.geodir_full_page .geodir-cat-list ul li{padding-left:0}.geodir-loc-bar{border:none;margin:0;padding:0}.geodir-loc-bar-in{padding:15px 0}.geodir_full_page section.widget{margin-bottom:20px}.sidebar .geodir-loginbox-list li{margin-bottom:10px;padding-bottom:10px}.sidebar .geodir-loginbox-list li a{display:block}.sidebar .geodir-chosen-container .chosen-results li{margin:0;padding:5px 6px}.sidebar .geodir-chosen-container .chosen-results li.highlighted{background:#eee;background-image:none;color:#000}.sidebar .geodir_category_list_view li.geodir-gridview{display:inline-block;margin-bottom:15px}.wpgeo-avada.double-sidebars #main #sidebar{margin-left:3%}.wpgeo-avada.double-sidebars #main #sidebar-2{margin-left:-100%}.wpgeo-avada.double-sidebars #content{float:left;margin-left:0}.geodir_full_page section.widget{margin-bottom: 0px;} .sidebar .widget .geodir-hide {display: none;}'), |
|
397 | - 'geodir_theme_compat_js' => '', |
|
398 | - 'geodir_theme_compat_default_options' => '', |
|
399 | - 'geodir_theme_compat_code' => 'Avada' |
|
400 | - ); |
|
367 | + $theme_compat['Avada'] = array( |
|
368 | + 'geodir_wrapper_open_id' => '', |
|
369 | + 'geodir_wrapper_open_class' => '', |
|
370 | + 'geodir_wrapper_open_replace' => '<!-- removed -->', |
|
371 | + 'geodir_wrapper_close_replace' => '<!-- removed -->', |
|
372 | + 'geodir_wrapper_content_open_id' => 'content', |
|
373 | + 'geodir_wrapper_content_open_class' => '', |
|
374 | + 'geodir_wrapper_content_open_replace' => '', |
|
375 | + 'geodir_wrapper_content_close_replace' => '', |
|
376 | + 'geodir_article_open_id' => '', |
|
377 | + 'geodir_article_open_class' => '', |
|
378 | + 'geodir_article_open_replace' => '', |
|
379 | + 'geodir_article_close_replace' => '', |
|
380 | + 'geodir_sidebar_right_open_id' => '', |
|
381 | + 'geodir_sidebar_right_open_class' => '', |
|
382 | + 'geodir_sidebar_right_open_replace' => '<div id="sidebar" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>', |
|
383 | + 'geodir_sidebar_right_close_replace' => '</div><!-- end sidebar -->', |
|
384 | + 'geodir_sidebar_left_open_id' => '', |
|
385 | + 'geodir_sidebar_left_open_class' => '', |
|
386 | + 'geodir_sidebar_left_open_replace' => '<div id="sidebar" class="sidebar [class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>', |
|
387 | + 'geodir_sidebar_left_close_replace' => '</div><!-- end sidebar -->', |
|
388 | + 'geodir_main_content_open_id' => '', |
|
389 | + 'geodir_main_content_open_class' => '', |
|
390 | + 'geodir_main_content_open_replace' => '<!-- removed -->', |
|
391 | + 'geodir_main_content_close_replace' => '<!-- removed -->', |
|
392 | + 'geodir_top_content_add' => '', |
|
393 | + 'geodir_before_main_content_add' => '', |
|
394 | + 'geodir_before_widget_filter' => '', |
|
395 | + 'geodir_after_widget_filter' => '', |
|
396 | + 'geodir_theme_compat_css' => stripslashes('.geodir-sidebar-left{float:left}select,textarea{border-style:solid;border-width:1px}.top-menu li > div{visibility:visible}.geodir-chosen-container-single .chosen-single{height:auto}ul li#menu-item-gd-location-switcher ul{width:222px}ul li#menu-item-gd-location-switcher ul li{padding-right:0!important}#mobile-nav li#mobile-menu-item-gd-location-switcher li a{padding-left:10px;padding-right:10px}#menu-item-gd-location-switcher dd,#mobile-menu-item-gd-location-switcher{margin-left:0}#menu-item-gd-location-switcher dd a{display:block}.geodir-chosen-container .chosen-results li.highlighted{background-color:#eee;background-image:none;color:#444}#mobile-nav li.mobile-nav-item li a:before{content:\'\';margin:0}#mobile-nav li.mobile-nav-item li a{padding:10px;width:auto}.geodir-listing-search{text-align:center}.geodir-search{float:none;margin:0}.geodir-search select,.geodir-search .search_by_post,.geodir-search input[type="text"],.geodir-search button[type="button"], .geodir-search input[type="button"],.geodir-search input[type="submit"]{display:inline-block;float:none}.geodir-cat-list ul li,.map_category ul li{list-style-type:none}.wpgeo-avada .page-title ul li:after{content:\'\'}.top_banner_section{margin-bottom:0}.geodir-category-list-in{margin:0;padding:15px}.geodir_full_page .geodir-cat-list .widget-title{margin-top:0}.geodir_full_page .geodir-cat-list ul li{padding-left:0}.geodir-loc-bar{border:none;margin:0;padding:0}.geodir-loc-bar-in{padding:15px 0}.geodir_full_page section.widget{margin-bottom:20px}.sidebar .geodir-loginbox-list li{margin-bottom:10px;padding-bottom:10px}.sidebar .geodir-loginbox-list li a{display:block}.sidebar .geodir-chosen-container .chosen-results li{margin:0;padding:5px 6px}.sidebar .geodir-chosen-container .chosen-results li.highlighted{background:#eee;background-image:none;color:#000}.sidebar .geodir_category_list_view li.geodir-gridview{display:inline-block;margin-bottom:15px}.wpgeo-avada.double-sidebars #main #sidebar{margin-left:3%}.wpgeo-avada.double-sidebars #main #sidebar-2{margin-left:-100%}.wpgeo-avada.double-sidebars #content{float:left;margin-left:0}.geodir_full_page section.widget{margin-bottom: 0px;} .sidebar .widget .geodir-hide {display: none;}'), |
|
397 | + 'geodir_theme_compat_js' => '', |
|
398 | + 'geodir_theme_compat_default_options' => '', |
|
399 | + 'geodir_theme_compat_code' => 'Avada' |
|
400 | + ); |
|
401 | 401 | |
402 | 402 | //Enfold |
403 | - $theme_compat['Enfold'] = array( |
|
404 | - 'geodir_wrapper_open_id' => '', |
|
405 | - 'geodir_wrapper_open_class' => '', |
|
406 | - 'geodir_wrapper_open_replace' => '', |
|
407 | - 'geodir_wrapper_close_replace' => '</div></div><!-- content ends here-->', |
|
408 | - 'geodir_wrapper_content_open_id' => '', |
|
409 | - 'geodir_wrapper_content_open_class' => '', |
|
410 | - 'geodir_wrapper_content_open_replace' => '', |
|
411 | - 'geodir_wrapper_content_close_replace' => '</div></main>', |
|
412 | - 'geodir_article_open_id' => '', |
|
413 | - 'geodir_article_open_class' => '', |
|
414 | - 'geodir_article_open_replace' => '', |
|
415 | - 'geodir_article_close_replace' => '', |
|
416 | - 'geodir_sidebar_right_open_id' => '', |
|
417 | - 'geodir_sidebar_right_open_class' => '', |
|
418 | - 'geodir_sidebar_right_open_replace' => '', |
|
419 | - 'geodir_sidebar_right_close_replace' => '</div></aside><!-- sidebar ends here-->', |
|
420 | - 'geodir_sidebar_left_open_id' => '', |
|
421 | - 'geodir_sidebar_left_open_class' => '', |
|
422 | - 'geodir_sidebar_left_open_replace' => '', |
|
423 | - 'geodir_sidebar_left_close_replace' => '</div></aside><!-- sidebar ends here-->', |
|
424 | - 'geodir_main_content_open_id' => '', |
|
425 | - 'geodir_main_content_open_class' => '', |
|
426 | - 'geodir_main_content_open_replace' => '', |
|
427 | - 'geodir_main_content_close_replace' => '', |
|
428 | - 'geodir_top_content_add' => '', |
|
429 | - 'geodir_before_main_content_add' => '', |
|
430 | - 'geodir_before_widget_filter' => '', |
|
431 | - 'geodir_after_widget_filter' => '', |
|
432 | - 'geodir_theme_compat_css' => stripslashes('.geodir_full_page .top_banner_section{margin-bottom:0}.widget .geodir-cat-list ul li{clear:none}.wpgeo-enfold .av-main-nav ul{width:222px}.geodir-listing-search .geodir-loc-bar{border-top:none;padding:0}#main .geodir-listing-search,.geodir-listing-search .geodir-loc-bar{margin-bottom:0}#main .geodir-loc-bar-in,#main .geodir-category-list-in{background-color:#fcfcfc;margin:20px 0;padding:20px}#main .geodir_full_page .geodir-loc-bar-in,#main .geodir_full_page .geodir-loc-bar,#main .geodir_full_page .geodir-category-list-in{margin-top:0;margin-bottom:0}#main .geodir-loc-bar-in{padding:20px}#main .geodir-search{margin:0;width:100%}#main .geodir-search select{margin:0 3% 0 0;padding:8px 10px;width:13%}#main .geodir-search input[type="text"]{margin:0 3% 0 0;padding:10px;width:32.4%}#main .geodir-search input[type="button"],#main .geodir-search input[type="submit"]{font-size:inherit;line-height:2.25;margin:0;padding:7px;width:13%}.enfold-home-top section.widget{margin:0;padding:0}.enfold-home-top .top_banner_section{margin-bottom:0}.enfold-home-top .geodir-loc-bar{background:#fcfcfc;border:none;margin:0;padding:0}#main .enfold-home-top .geodir-loc-bar-in{background:none;border:none;margin:0 auto;padding:20px 0}#main .geodir-breadcrumb{border-bottom-style:solid;border-bottom-width:1px}#gd-tabs dt{clear:none}#geodir_slider ul li{list-style-type:none;margin:0;padding:0}#respond{clear:both}#comments .comments-title span{display:inline;font-size:inherit;font-weight:700}#reviewsTab .comments-area .bypostauthor cite span{display:inline}#top #comments .commentlist .comment,#top #comments .commentlist .comment > div{min-height:0}.commentlist .commenttext{padding-top:15px}#comment_imagesdropbox{margin-bottom:20px}.wpgeo-enfold .geodir_category_list_view li{margin-left:0;padding:0}.widget ul.geodir-loginbox-list{overflow:visible}.geodir_category_list_view li .geodir-post-img{display:block}.wpgeo-enfold .geodir_event_listing_calendar tr.title{background:#ccc}@media only screen and (max-width:480px){.geodir_category_list_view li .geodir-content,.geodir_category_list_view li .geodir-post-img,.geodir_category_list_view li .geodir-addinfo{float:none;width:100%;margin:10px 0}#main .geodir-search input[type="text"],#main .geodir-search input[type="button"],#main .geodir-search input[type="submit"],#main .geodir-search select{margin:10px 0;width:100%}}#main .geodir_full_page section:last-child .geodir-loc-bar{margin-bottom: -1px;border-bottom: none;}'), |
|
433 | - 'geodir_theme_compat_js' => '', |
|
434 | - 'geodir_theme_compat_default_options' => '', |
|
435 | - 'geodir_theme_compat_code' => 'Enfold' |
|
436 | - ); |
|
403 | + $theme_compat['Enfold'] = array( |
|
404 | + 'geodir_wrapper_open_id' => '', |
|
405 | + 'geodir_wrapper_open_class' => '', |
|
406 | + 'geodir_wrapper_open_replace' => '', |
|
407 | + 'geodir_wrapper_close_replace' => '</div></div><!-- content ends here-->', |
|
408 | + 'geodir_wrapper_content_open_id' => '', |
|
409 | + 'geodir_wrapper_content_open_class' => '', |
|
410 | + 'geodir_wrapper_content_open_replace' => '', |
|
411 | + 'geodir_wrapper_content_close_replace' => '</div></main>', |
|
412 | + 'geodir_article_open_id' => '', |
|
413 | + 'geodir_article_open_class' => '', |
|
414 | + 'geodir_article_open_replace' => '', |
|
415 | + 'geodir_article_close_replace' => '', |
|
416 | + 'geodir_sidebar_right_open_id' => '', |
|
417 | + 'geodir_sidebar_right_open_class' => '', |
|
418 | + 'geodir_sidebar_right_open_replace' => '', |
|
419 | + 'geodir_sidebar_right_close_replace' => '</div></aside><!-- sidebar ends here-->', |
|
420 | + 'geodir_sidebar_left_open_id' => '', |
|
421 | + 'geodir_sidebar_left_open_class' => '', |
|
422 | + 'geodir_sidebar_left_open_replace' => '', |
|
423 | + 'geodir_sidebar_left_close_replace' => '</div></aside><!-- sidebar ends here-->', |
|
424 | + 'geodir_main_content_open_id' => '', |
|
425 | + 'geodir_main_content_open_class' => '', |
|
426 | + 'geodir_main_content_open_replace' => '', |
|
427 | + 'geodir_main_content_close_replace' => '', |
|
428 | + 'geodir_top_content_add' => '', |
|
429 | + 'geodir_before_main_content_add' => '', |
|
430 | + 'geodir_before_widget_filter' => '', |
|
431 | + 'geodir_after_widget_filter' => '', |
|
432 | + 'geodir_theme_compat_css' => stripslashes('.geodir_full_page .top_banner_section{margin-bottom:0}.widget .geodir-cat-list ul li{clear:none}.wpgeo-enfold .av-main-nav ul{width:222px}.geodir-listing-search .geodir-loc-bar{border-top:none;padding:0}#main .geodir-listing-search,.geodir-listing-search .geodir-loc-bar{margin-bottom:0}#main .geodir-loc-bar-in,#main .geodir-category-list-in{background-color:#fcfcfc;margin:20px 0;padding:20px}#main .geodir_full_page .geodir-loc-bar-in,#main .geodir_full_page .geodir-loc-bar,#main .geodir_full_page .geodir-category-list-in{margin-top:0;margin-bottom:0}#main .geodir-loc-bar-in{padding:20px}#main .geodir-search{margin:0;width:100%}#main .geodir-search select{margin:0 3% 0 0;padding:8px 10px;width:13%}#main .geodir-search input[type="text"]{margin:0 3% 0 0;padding:10px;width:32.4%}#main .geodir-search input[type="button"],#main .geodir-search input[type="submit"]{font-size:inherit;line-height:2.25;margin:0;padding:7px;width:13%}.enfold-home-top section.widget{margin:0;padding:0}.enfold-home-top .top_banner_section{margin-bottom:0}.enfold-home-top .geodir-loc-bar{background:#fcfcfc;border:none;margin:0;padding:0}#main .enfold-home-top .geodir-loc-bar-in{background:none;border:none;margin:0 auto;padding:20px 0}#main .geodir-breadcrumb{border-bottom-style:solid;border-bottom-width:1px}#gd-tabs dt{clear:none}#geodir_slider ul li{list-style-type:none;margin:0;padding:0}#respond{clear:both}#comments .comments-title span{display:inline;font-size:inherit;font-weight:700}#reviewsTab .comments-area .bypostauthor cite span{display:inline}#top #comments .commentlist .comment,#top #comments .commentlist .comment > div{min-height:0}.commentlist .commenttext{padding-top:15px}#comment_imagesdropbox{margin-bottom:20px}.wpgeo-enfold .geodir_category_list_view li{margin-left:0;padding:0}.widget ul.geodir-loginbox-list{overflow:visible}.geodir_category_list_view li .geodir-post-img{display:block}.wpgeo-enfold .geodir_event_listing_calendar tr.title{background:#ccc}@media only screen and (max-width:480px){.geodir_category_list_view li .geodir-content,.geodir_category_list_view li .geodir-post-img,.geodir_category_list_view li .geodir-addinfo{float:none;width:100%;margin:10px 0}#main .geodir-search input[type="text"],#main .geodir-search input[type="button"],#main .geodir-search input[type="submit"],#main .geodir-search select{margin:10px 0;width:100%}}#main .geodir_full_page section:last-child .geodir-loc-bar{margin-bottom: -1px;border-bottom: none;}'), |
|
433 | + 'geodir_theme_compat_js' => '', |
|
434 | + 'geodir_theme_compat_default_options' => '', |
|
435 | + 'geodir_theme_compat_code' => 'Enfold' |
|
436 | + ); |
|
437 | 437 | |
438 | 438 | // X |
439 | - $theme_compat['X'] = array( |
|
440 | - 'geodir_wrapper_open_id' => '', |
|
441 | - 'geodir_wrapper_open_class' => '', |
|
442 | - 'geodir_wrapper_open_replace' => '', |
|
443 | - 'geodir_wrapper_close_replace' => '', |
|
444 | - 'geodir_wrapper_content_open_id' => '', |
|
445 | - 'geodir_wrapper_content_open_class' => '', |
|
446 | - 'geodir_wrapper_content_open_replace' => '', |
|
447 | - 'geodir_wrapper_content_close_replace' => '', |
|
448 | - 'geodir_article_open_id' => '', |
|
449 | - 'geodir_article_open_class' => '', |
|
450 | - 'geodir_article_open_replace' => '', |
|
451 | - 'geodir_article_close_replace' => '', |
|
452 | - 'geodir_sidebar_right_open_id' => '', |
|
453 | - 'geodir_sidebar_right_open_class' => '', |
|
454 | - 'geodir_sidebar_right_open_replace' => '', |
|
455 | - 'geodir_sidebar_right_close_replace' => '', |
|
456 | - 'geodir_sidebar_left_open_id' => '', |
|
457 | - 'geodir_sidebar_left_open_class' => '', |
|
458 | - 'geodir_sidebar_left_open_replace' => '', |
|
459 | - 'geodir_sidebar_left_close_replace' => '', |
|
460 | - 'geodir_main_content_open_id' => '', |
|
461 | - 'geodir_main_content_open_class' => '', |
|
462 | - 'geodir_main_content_open_replace' => '', |
|
463 | - 'geodir_main_content_close_replace' => '', |
|
464 | - 'geodir_top_content_add' => '', |
|
465 | - 'geodir_before_main_content_add' => '', |
|
466 | - 'geodir_before_widget_filter' => '', |
|
467 | - 'geodir_after_widget_filter' => '', |
|
468 | - 'geodir_theme_compat_css' => stripslashes('.x-colophon.bottom{clear:both}#geodir-main-content,.geodir_flex-container{margin-top:16px}.geodir-x ul{list-style:none}.widget ul.geodir_category_list_view{border:none}.geodir_category_list_view li.geodir-gridview:last-child{border-bottom:1px solid #e1e1e1}.home .x-header-landmark{display:none}.geodir-x .x-main .geodir_advance_search_widget{margin:0}.geodir-x .top_banner_section{margin-bottom:0}.geodir-loc-bar{background:rgba(0,0,0,0.05);margin:0;padding:0}.geodir-loc-bar-in{background:none;border:none;padding:10px}.geodir-search{margin:0;width:100%}.widget .geodir-search select,.geodir-search input[type="text"],.geodir-search input[type="button"],.geodir-search input[type="submit"]{border:1px solid #ccc;box-shadow:none;height:auto;line-height:21px;margin:0 1% 0 0;padding:5px 10px}.widget .geodir-search select,.geodir-search input[type="text"]{width:28%}.geodir-search input[type="submit"],.geodir-search input[type="button"]{line-height:19px;margin-right:0;width:11%}.geodir-search input:hover[type="submit"],.geodir-search input:hover[type="button"]{background:#333;color:#fff}.geodir-cat-list .widget-title{margin-top:0}.geodir-x .geodir-category-list-in{background:rgba(0,0,0,0.05);border:none}.widget .geodir-cat-list ul.geodir-popular-cat-list{border:none;border-radius:0;box-shadow:none}.geodir_full_page .geodir-cat-list ul li{border:none}.geodir_full_page .geodir-cat-list ul li a{border:none}.post-type-archive .geodir-loc-bar{border:none;margin-top:20px}#menu-item-gd-location-switcher dd{margin-left:0}.geodir-chosen-container-single .chosen-single{height:auto}.widget ul.geodir-loginbox-list{overflow:visible}.geodir_full_page section.widget{clear:both}.x-ethos .entry-title{margin-bottom:20px}.x-ethos .geodir-chosen-container-single .chosen-single{padding:0 0 0 8px}.x-ethos .widget ul li a,.x-ethos .geodir_category_list_view li{color:#333}@media only screen and (max-width:767px){.widget .geodir-search select,.geodir-search input[type="text"],.geodir-search input[type="button"],.geodir-search input[type="submit"]{margin:0 0 10px;width:100%}}.geodir_full_page .geodir-loc-bar-in,.geodir_full_page .geodir-loc-bar,.geodir_full_page .geodir-category-list-in{margin-top:0;margin-bottom:0}.geodir_full_page .geodir-loc-bar-in,.geodir_full_page .geodir-category-list-in{border-bottom:1px solid rgba(0,0,0,0.1)}.geodir_full_page .geodir-listing-search{text-align:center}.geodir_full_page .geodir-search{float:none;margin:0}.geodir_full_page .geodir-search select,.geodir_full_page .geodir-search .search_by_post,.geodir_full_page .geodir-search input[type="text"],.geodir_full_page .geodir-search input[type="button"],.geodir_full_page .geodir-search input[type="submit"]{display:inline-block;float:none}'), |
|
469 | - 'geodir_theme_compat_js' => '', |
|
470 | - 'geodir_theme_compat_default_options' => '', |
|
471 | - 'geodir_theme_compat_code' => 'X' |
|
472 | - ); |
|
439 | + $theme_compat['X'] = array( |
|
440 | + 'geodir_wrapper_open_id' => '', |
|
441 | + 'geodir_wrapper_open_class' => '', |
|
442 | + 'geodir_wrapper_open_replace' => '', |
|
443 | + 'geodir_wrapper_close_replace' => '', |
|
444 | + 'geodir_wrapper_content_open_id' => '', |
|
445 | + 'geodir_wrapper_content_open_class' => '', |
|
446 | + 'geodir_wrapper_content_open_replace' => '', |
|
447 | + 'geodir_wrapper_content_close_replace' => '', |
|
448 | + 'geodir_article_open_id' => '', |
|
449 | + 'geodir_article_open_class' => '', |
|
450 | + 'geodir_article_open_replace' => '', |
|
451 | + 'geodir_article_close_replace' => '', |
|
452 | + 'geodir_sidebar_right_open_id' => '', |
|
453 | + 'geodir_sidebar_right_open_class' => '', |
|
454 | + 'geodir_sidebar_right_open_replace' => '', |
|
455 | + 'geodir_sidebar_right_close_replace' => '', |
|
456 | + 'geodir_sidebar_left_open_id' => '', |
|
457 | + 'geodir_sidebar_left_open_class' => '', |
|
458 | + 'geodir_sidebar_left_open_replace' => '', |
|
459 | + 'geodir_sidebar_left_close_replace' => '', |
|
460 | + 'geodir_main_content_open_id' => '', |
|
461 | + 'geodir_main_content_open_class' => '', |
|
462 | + 'geodir_main_content_open_replace' => '', |
|
463 | + 'geodir_main_content_close_replace' => '', |
|
464 | + 'geodir_top_content_add' => '', |
|
465 | + 'geodir_before_main_content_add' => '', |
|
466 | + 'geodir_before_widget_filter' => '', |
|
467 | + 'geodir_after_widget_filter' => '', |
|
468 | + 'geodir_theme_compat_css' => stripslashes('.x-colophon.bottom{clear:both}#geodir-main-content,.geodir_flex-container{margin-top:16px}.geodir-x ul{list-style:none}.widget ul.geodir_category_list_view{border:none}.geodir_category_list_view li.geodir-gridview:last-child{border-bottom:1px solid #e1e1e1}.home .x-header-landmark{display:none}.geodir-x .x-main .geodir_advance_search_widget{margin:0}.geodir-x .top_banner_section{margin-bottom:0}.geodir-loc-bar{background:rgba(0,0,0,0.05);margin:0;padding:0}.geodir-loc-bar-in{background:none;border:none;padding:10px}.geodir-search{margin:0;width:100%}.widget .geodir-search select,.geodir-search input[type="text"],.geodir-search input[type="button"],.geodir-search input[type="submit"]{border:1px solid #ccc;box-shadow:none;height:auto;line-height:21px;margin:0 1% 0 0;padding:5px 10px}.widget .geodir-search select,.geodir-search input[type="text"]{width:28%}.geodir-search input[type="submit"],.geodir-search input[type="button"]{line-height:19px;margin-right:0;width:11%}.geodir-search input:hover[type="submit"],.geodir-search input:hover[type="button"]{background:#333;color:#fff}.geodir-cat-list .widget-title{margin-top:0}.geodir-x .geodir-category-list-in{background:rgba(0,0,0,0.05);border:none}.widget .geodir-cat-list ul.geodir-popular-cat-list{border:none;border-radius:0;box-shadow:none}.geodir_full_page .geodir-cat-list ul li{border:none}.geodir_full_page .geodir-cat-list ul li a{border:none}.post-type-archive .geodir-loc-bar{border:none;margin-top:20px}#menu-item-gd-location-switcher dd{margin-left:0}.geodir-chosen-container-single .chosen-single{height:auto}.widget ul.geodir-loginbox-list{overflow:visible}.geodir_full_page section.widget{clear:both}.x-ethos .entry-title{margin-bottom:20px}.x-ethos .geodir-chosen-container-single .chosen-single{padding:0 0 0 8px}.x-ethos .widget ul li a,.x-ethos .geodir_category_list_view li{color:#333}@media only screen and (max-width:767px){.widget .geodir-search select,.geodir-search input[type="text"],.geodir-search input[type="button"],.geodir-search input[type="submit"]{margin:0 0 10px;width:100%}}.geodir_full_page .geodir-loc-bar-in,.geodir_full_page .geodir-loc-bar,.geodir_full_page .geodir-category-list-in{margin-top:0;margin-bottom:0}.geodir_full_page .geodir-loc-bar-in,.geodir_full_page .geodir-category-list-in{border-bottom:1px solid rgba(0,0,0,0.1)}.geodir_full_page .geodir-listing-search{text-align:center}.geodir_full_page .geodir-search{float:none;margin:0}.geodir_full_page .geodir-search select,.geodir_full_page .geodir-search .search_by_post,.geodir_full_page .geodir-search input[type="text"],.geodir_full_page .geodir-search input[type="button"],.geodir_full_page .geodir-search input[type="submit"]{display:inline-block;float:none}'), |
|
469 | + 'geodir_theme_compat_js' => '', |
|
470 | + 'geodir_theme_compat_default_options' => '', |
|
471 | + 'geodir_theme_compat_code' => 'X' |
|
472 | + ); |
|
473 | 473 | |
474 | 474 | // Divi |
475 | - $theme_compat['Divi'] = array( |
|
476 | - 'geodir_wrapper_open_id' => 'main-content', |
|
477 | - 'geodir_wrapper_open_class' => '', |
|
478 | - 'geodir_wrapper_open_replace' => '', |
|
479 | - 'geodir_wrapper_close_replace' => '', |
|
480 | - 'geodir_wrapper_content_open_id' => 'left-area', |
|
481 | - 'geodir_wrapper_content_open_class' => '', |
|
482 | - 'geodir_wrapper_content_open_replace' => '<div class="container"><div id="content-area" class="clearfix"><div id="[id]" class="[class]" role="main" >', |
|
483 | - 'geodir_wrapper_content_close_replace' => '', |
|
484 | - 'geodir_article_open_id' => '', |
|
485 | - 'geodir_article_open_class' => '', |
|
486 | - 'geodir_article_open_replace' => '', |
|
487 | - 'geodir_article_close_replace' => '', |
|
488 | - 'geodir_sidebar_right_open_id' => 'sidebar', |
|
489 | - 'geodir_sidebar_right_open_class' => '', |
|
490 | - 'geodir_sidebar_right_open_replace' => '<aside id="[id]" class="" role="complementary" itemscope itemtype="[itemtype]" >', |
|
491 | - 'geodir_sidebar_right_close_replace' => '</aside><!-- sidebar ends here--></div></div>', |
|
492 | - 'geodir_sidebar_left_open_id' => 'sidebar', |
|
493 | - 'geodir_sidebar_left_open_class' => '', |
|
494 | - 'geodir_sidebar_left_open_replace' => '<aside id="[id]" class="" role="complementary" itemscope itemtype="[itemtype]" >', |
|
495 | - 'geodir_sidebar_left_close_replace' => '</aside><!-- sidebar ends here--></div></div>', |
|
496 | - 'geodir_main_content_open_id' => '', |
|
497 | - 'geodir_main_content_open_class' => '', |
|
498 | - 'geodir_main_content_open_replace' => '', |
|
499 | - 'geodir_main_content_close_replace' => '', |
|
500 | - 'geodir_top_content_add' => '', |
|
501 | - 'geodir_before_main_content_add' => '', |
|
502 | - 'geodir_before_widget_filter' => '', |
|
503 | - 'geodir_after_widget_filter' => '', |
|
504 | - 'geodir_theme_compat_css' => stripslashes('#left-area ul.geodir-direction-nav{list-style-type:none}#sidebar .geodir-company_info{margin-left:30px}#sidebar .geodir-widget{float:none;margin:0 0 30px 30px}.geodir_full_page .geodir-loc-bar{padding:0;margin:0;border:none}.geodir_full_page .geodir-category-list-in{margin-top:0}.geodir_full_page .top_banner_section{margin-bottom:0}.archive .entry-header,.geodir-breadcrumb{border-bottom:1px solid #e2e2e2}.archive .entry-header h1,ul#breadcrumbs{margin:0 auto;width:1080px}#left-area ul.geodir_category_list_view{padding:10px 0}.nav li#menu-item-gd-location-switcher ul{width:222px}#menu-item-gd-location-switcher li.gd-location-switcher-menu-item{padding-right:0}#menu-item-gd-location-switcher dd{margin-left:0}#menu-item-gd-location-switcher .geodir_location_tab_container dd a{padding:5px;width:auto}@media only screen and ( max-width: 980px ){.geodir-loc-bar-in,.geodir-cat-list,ul#breadcrumbs{width:690px}}@media only screen and ( max-width: 767px ){.geodir-loc-bar-in,.geodir-cat-list,ul#breadcrumbs{width:400px}}@media only screen and ( max-width: 479px ){.geodir-loc-bar-in,.geodir-cat-list,ul#breadcrumbs{width:280px}}.geodir_full_page .geodir-listing-search{text-align:center}.geodir_full_page .geodir-search{float:none;margin:0}.geodir_full_page .geodir-search select,.geodir_full_page .geodir-search .search_by_post,.geodir_full_page .geodir-search input[type="text"],.geodir_full_page .geodir-search input[type="button"],.geodir_full_page .geodir-search input[type="submit"]{display:inline-block;float:none}'), |
|
505 | - 'geodir_theme_compat_js' => '', |
|
506 | - 'geodir_theme_compat_default_options' => '', |
|
507 | - 'geodir_theme_compat_code' => 'Divi' |
|
508 | - ); |
|
475 | + $theme_compat['Divi'] = array( |
|
476 | + 'geodir_wrapper_open_id' => 'main-content', |
|
477 | + 'geodir_wrapper_open_class' => '', |
|
478 | + 'geodir_wrapper_open_replace' => '', |
|
479 | + 'geodir_wrapper_close_replace' => '', |
|
480 | + 'geodir_wrapper_content_open_id' => 'left-area', |
|
481 | + 'geodir_wrapper_content_open_class' => '', |
|
482 | + 'geodir_wrapper_content_open_replace' => '<div class="container"><div id="content-area" class="clearfix"><div id="[id]" class="[class]" role="main" >', |
|
483 | + 'geodir_wrapper_content_close_replace' => '', |
|
484 | + 'geodir_article_open_id' => '', |
|
485 | + 'geodir_article_open_class' => '', |
|
486 | + 'geodir_article_open_replace' => '', |
|
487 | + 'geodir_article_close_replace' => '', |
|
488 | + 'geodir_sidebar_right_open_id' => 'sidebar', |
|
489 | + 'geodir_sidebar_right_open_class' => '', |
|
490 | + 'geodir_sidebar_right_open_replace' => '<aside id="[id]" class="" role="complementary" itemscope itemtype="[itemtype]" >', |
|
491 | + 'geodir_sidebar_right_close_replace' => '</aside><!-- sidebar ends here--></div></div>', |
|
492 | + 'geodir_sidebar_left_open_id' => 'sidebar', |
|
493 | + 'geodir_sidebar_left_open_class' => '', |
|
494 | + 'geodir_sidebar_left_open_replace' => '<aside id="[id]" class="" role="complementary" itemscope itemtype="[itemtype]" >', |
|
495 | + 'geodir_sidebar_left_close_replace' => '</aside><!-- sidebar ends here--></div></div>', |
|
496 | + 'geodir_main_content_open_id' => '', |
|
497 | + 'geodir_main_content_open_class' => '', |
|
498 | + 'geodir_main_content_open_replace' => '', |
|
499 | + 'geodir_main_content_close_replace' => '', |
|
500 | + 'geodir_top_content_add' => '', |
|
501 | + 'geodir_before_main_content_add' => '', |
|
502 | + 'geodir_before_widget_filter' => '', |
|
503 | + 'geodir_after_widget_filter' => '', |
|
504 | + 'geodir_theme_compat_css' => stripslashes('#left-area ul.geodir-direction-nav{list-style-type:none}#sidebar .geodir-company_info{margin-left:30px}#sidebar .geodir-widget{float:none;margin:0 0 30px 30px}.geodir_full_page .geodir-loc-bar{padding:0;margin:0;border:none}.geodir_full_page .geodir-category-list-in{margin-top:0}.geodir_full_page .top_banner_section{margin-bottom:0}.archive .entry-header,.geodir-breadcrumb{border-bottom:1px solid #e2e2e2}.archive .entry-header h1,ul#breadcrumbs{margin:0 auto;width:1080px}#left-area ul.geodir_category_list_view{padding:10px 0}.nav li#menu-item-gd-location-switcher ul{width:222px}#menu-item-gd-location-switcher li.gd-location-switcher-menu-item{padding-right:0}#menu-item-gd-location-switcher dd{margin-left:0}#menu-item-gd-location-switcher .geodir_location_tab_container dd a{padding:5px;width:auto}@media only screen and ( max-width: 980px ){.geodir-loc-bar-in,.geodir-cat-list,ul#breadcrumbs{width:690px}}@media only screen and ( max-width: 767px ){.geodir-loc-bar-in,.geodir-cat-list,ul#breadcrumbs{width:400px}}@media only screen and ( max-width: 479px ){.geodir-loc-bar-in,.geodir-cat-list,ul#breadcrumbs{width:280px}}.geodir_full_page .geodir-listing-search{text-align:center}.geodir_full_page .geodir-search{float:none;margin:0}.geodir_full_page .geodir-search select,.geodir_full_page .geodir-search .search_by_post,.geodir_full_page .geodir-search input[type="text"],.geodir_full_page .geodir-search input[type="button"],.geodir_full_page .geodir-search input[type="submit"]{display:inline-block;float:none}'), |
|
505 | + 'geodir_theme_compat_js' => '', |
|
506 | + 'geodir_theme_compat_default_options' => '', |
|
507 | + 'geodir_theme_compat_code' => 'Divi' |
|
508 | + ); |
|
509 | 509 | |
510 | 510 | // Genesis |
511 | - $theme_compat['Genesis'] = array( |
|
512 | - 'geodir_wrapper_open_id' => '', |
|
513 | - 'geodir_wrapper_open_class' => 'content-sidebar-wrap', |
|
514 | - 'geodir_wrapper_open_replace' => '', |
|
515 | - 'geodir_wrapper_close_replace' => '', |
|
516 | - 'geodir_wrapper_content_open_id' => '', |
|
517 | - 'geodir_wrapper_content_open_class' => 'content', |
|
518 | - 'geodir_wrapper_content_open_replace' => '<div class="[class]" role="main" >', |
|
519 | - 'geodir_wrapper_content_close_replace' => '', |
|
520 | - 'geodir_article_open_id' => '', |
|
521 | - 'geodir_article_open_class' => '', |
|
522 | - 'geodir_article_open_replace' => '', |
|
523 | - 'geodir_article_close_replace' => '', |
|
524 | - 'geodir_sidebar_right_open_id' => '', |
|
525 | - 'geodir_sidebar_right_open_class' => 'sidebar sidebar-primary widget-area', |
|
526 | - 'geodir_sidebar_right_open_replace' => '<aside id="[id]" class="[class]" role="complementary" itemscope itemtype="[itemtype]">', |
|
527 | - 'geodir_sidebar_right_close_replace' => '', |
|
528 | - 'geodir_sidebar_left_open_id' => '', |
|
529 | - 'geodir_sidebar_left_open_class' => 'sidebar sidebar-secondary widget-area', |
|
530 | - 'geodir_sidebar_left_open_replace' => '<aside id="[id]" class="[class]" role="complementary" itemscope itemtype="[itemtype]">', |
|
531 | - 'geodir_sidebar_left_close_replace' => '', |
|
532 | - 'geodir_main_content_open_id' => '', |
|
533 | - 'geodir_main_content_open_class' => '', |
|
534 | - 'geodir_main_content_open_replace' => '<main id="[id]" class="entry [class]" role="main">', |
|
535 | - 'geodir_main_content_close_replace' => '', |
|
536 | - 'geodir_top_content_add' => '', |
|
537 | - 'geodir_before_main_content_add' => '', |
|
538 | - 'geodir_before_widget_filter' => '', |
|
539 | - 'geodir_after_widget_filter' => '', |
|
540 | - 'geodir_location_switcher_menu_li_class_filter' => 'menu-item menu-item-gd-location-switcher menu-item-has-children gd-location-switcher', |
|
541 | - 'geodir_theme_compat_css' => stripslashes('.full-width-content #geodir-wrapper-content{width:100%}.geodir_full_page .geodir-listing-search{text-align:center}.geodir_full_page .geodir-search{float:none;margin:0}.geodir_full_page .geodir-search select,.geodir_full_page .geodir-search .search_by_post,.geodir_full_page .geodir-search input[type="text"],.geodir_full_page .geodir-search input[type="button"],.geodir_full_page .geodir-search input[type="submit"]{display:inline-block;float:none}.content{float:left}.sidebar-content .content,.sidebar-content #geodir-wrapper-content{float:right}.sidebar .geodir-company_info{background-color:#fff;border:none}.geodir_full_page .geodir-loc-bar{padding:0;margin:0;border:none}.geodir_full_page .geodir-category-list-in{margin-top:0}.geodir_full_page .top_banner_section{margin-bottom:0}.geodir-breadcrumb-bar{margin-bottom:-35px} .search-page .entry-title,.listings-page .entry-title{font-size: 20px;}.site-inner .geodir-breadcrumb-bar{margin-bottom:0px}'), |
|
542 | - 'geodir_theme_compat_js' => '', |
|
543 | - 'geodir_theme_compat_default_options' => '', |
|
544 | - 'geodir_theme_compat_code' => 'Genesis' |
|
545 | - ); |
|
511 | + $theme_compat['Genesis'] = array( |
|
512 | + 'geodir_wrapper_open_id' => '', |
|
513 | + 'geodir_wrapper_open_class' => 'content-sidebar-wrap', |
|
514 | + 'geodir_wrapper_open_replace' => '', |
|
515 | + 'geodir_wrapper_close_replace' => '', |
|
516 | + 'geodir_wrapper_content_open_id' => '', |
|
517 | + 'geodir_wrapper_content_open_class' => 'content', |
|
518 | + 'geodir_wrapper_content_open_replace' => '<div class="[class]" role="main" >', |
|
519 | + 'geodir_wrapper_content_close_replace' => '', |
|
520 | + 'geodir_article_open_id' => '', |
|
521 | + 'geodir_article_open_class' => '', |
|
522 | + 'geodir_article_open_replace' => '', |
|
523 | + 'geodir_article_close_replace' => '', |
|
524 | + 'geodir_sidebar_right_open_id' => '', |
|
525 | + 'geodir_sidebar_right_open_class' => 'sidebar sidebar-primary widget-area', |
|
526 | + 'geodir_sidebar_right_open_replace' => '<aside id="[id]" class="[class]" role="complementary" itemscope itemtype="[itemtype]">', |
|
527 | + 'geodir_sidebar_right_close_replace' => '', |
|
528 | + 'geodir_sidebar_left_open_id' => '', |
|
529 | + 'geodir_sidebar_left_open_class' => 'sidebar sidebar-secondary widget-area', |
|
530 | + 'geodir_sidebar_left_open_replace' => '<aside id="[id]" class="[class]" role="complementary" itemscope itemtype="[itemtype]">', |
|
531 | + 'geodir_sidebar_left_close_replace' => '', |
|
532 | + 'geodir_main_content_open_id' => '', |
|
533 | + 'geodir_main_content_open_class' => '', |
|
534 | + 'geodir_main_content_open_replace' => '<main id="[id]" class="entry [class]" role="main">', |
|
535 | + 'geodir_main_content_close_replace' => '', |
|
536 | + 'geodir_top_content_add' => '', |
|
537 | + 'geodir_before_main_content_add' => '', |
|
538 | + 'geodir_before_widget_filter' => '', |
|
539 | + 'geodir_after_widget_filter' => '', |
|
540 | + 'geodir_location_switcher_menu_li_class_filter' => 'menu-item menu-item-gd-location-switcher menu-item-has-children gd-location-switcher', |
|
541 | + 'geodir_theme_compat_css' => stripslashes('.full-width-content #geodir-wrapper-content{width:100%}.geodir_full_page .geodir-listing-search{text-align:center}.geodir_full_page .geodir-search{float:none;margin:0}.geodir_full_page .geodir-search select,.geodir_full_page .geodir-search .search_by_post,.geodir_full_page .geodir-search input[type="text"],.geodir_full_page .geodir-search input[type="button"],.geodir_full_page .geodir-search input[type="submit"]{display:inline-block;float:none}.content{float:left}.sidebar-content .content,.sidebar-content #geodir-wrapper-content{float:right}.sidebar .geodir-company_info{background-color:#fff;border:none}.geodir_full_page .geodir-loc-bar{padding:0;margin:0;border:none}.geodir_full_page .geodir-category-list-in{margin-top:0}.geodir_full_page .top_banner_section{margin-bottom:0}.geodir-breadcrumb-bar{margin-bottom:-35px} .search-page .entry-title,.listings-page .entry-title{font-size: 20px;}.site-inner .geodir-breadcrumb-bar{margin-bottom:0px}'), |
|
542 | + 'geodir_theme_compat_js' => '', |
|
543 | + 'geodir_theme_compat_default_options' => '', |
|
544 | + 'geodir_theme_compat_code' => 'Genesis' |
|
545 | + ); |
|
546 | 546 | |
547 | 547 | // Jupiter |
548 | - $theme_compat['Jupiter'] = array( |
|
549 | - 'geodir_wrapper_open_id' => '', |
|
550 | - 'geodir_wrapper_open_class' => '', |
|
551 | - 'geodir_wrapper_open_replace' => '<div id="theme-page"><div class="mk-main-wrapper-holder"><div class="theme-page-wrapper mk-main-wrapper mk-grid vc_row-fluid">', |
|
552 | - 'geodir_wrapper_close_replace' => '</div></div></div>', |
|
553 | - 'geodir_wrapper_content_open_id' => '', |
|
554 | - 'geodir_wrapper_content_open_class' => '', |
|
555 | - 'geodir_wrapper_content_open_replace' => '', |
|
556 | - 'geodir_wrapper_content_close_replace' => '', |
|
557 | - 'geodir_article_open_id' => '', |
|
558 | - 'geodir_article_open_class' => '', |
|
559 | - 'geodir_article_open_replace' => '', |
|
560 | - 'geodir_article_close_replace' => '', |
|
561 | - 'geodir_sidebar_right_open_id' => 'mk-sidebar', |
|
562 | - 'geodir_sidebar_right_open_class' => 'mk-builtin geodir-sidebar-right geodir-listings-sidebar-right', |
|
563 | - 'geodir_sidebar_right_open_replace' => '', |
|
564 | - 'geodir_sidebar_right_close_replace' => '', |
|
565 | - 'geodir_sidebar_left_open_id' => 'mk-sidebar', |
|
566 | - 'geodir_sidebar_left_open_class' => 'mk-builtin geodir-sidebar-right geodir-listings-sidebar-right', |
|
567 | - 'geodir_sidebar_left_open_replace' => '', |
|
568 | - 'geodir_sidebar_left_close_replace' => '', |
|
569 | - 'geodir_main_content_open_id' => '', |
|
570 | - 'geodir_main_content_open_class' => '', |
|
571 | - 'geodir_main_content_open_replace' => '', |
|
572 | - 'geodir_main_content_close_replace' => '', |
|
573 | - 'geodir_top_content_add' => '', |
|
574 | - 'geodir_before_main_content_add' => '', |
|
575 | - 'geodir_before_widget_filter' => '', |
|
576 | - 'geodir_after_widget_filter' => '', |
|
577 | - 'geodir_before_title_filter' => '<h3 class="widgettitle geodir-widget-title">', |
|
578 | - 'geodir_after_title_filter' => '', |
|
579 | - 'geodir_menu_li_class_filter' => 'menu-item menu-item-has-children no-mega-menu', |
|
580 | - 'geodir_sub_menu_ul_class_filter' => '', |
|
581 | - 'geodir_sub_menu_li_class_filter' => '', |
|
582 | - 'geodir_menu_a_class_filter' => 'menu-item-link', |
|
583 | - 'geodir_sub_menu_a_class_filter' => 'menu-item-link one-page-nav-item', |
|
584 | - 'geodir_location_switcher_menu_li_class_filter' => 'menu-item menu-item-type-social menu-item-type-social gd-location-switcher menu-item-has-children no-mega-menu', |
|
585 | - 'geodir_location_switcher_menu_a_class_filter' => 'menu-item-link', |
|
586 | - 'geodir_location_switcher_menu_sub_ul_class_filter' => '', |
|
587 | - 'geodir_location_switcher_menu_sub_li_class_filter' => '', |
|
588 | - 'geodir_theme_compat_css' => stripslashes('.geodir-widget li,.geodir_category_list_view li{margin:0}#theme-page h3.geodir-entry-title{font-size:14px}#menu-item-gd-location-switcher dd{line-height:44px}#menu-item-gd-location-switcher .geodir_location_sugestion{line-height:20px}.geodir_loginbox{overflow:visible}.geodir_full_page .geodir-listing-search{text-align:center}.geodir_full_page .geodir-search{float:none;margin:0}.geodir_full_page .geodir-search select,.geodir_full_page .geodir-search .search_by_post,.geodir_full_page .geodir-search input[type="text"],.geodir_full_page .geodir-search input[type="button"],.geodir_full_page .geodir-search input[type="submit"]{display:inline-block;float:none}'), |
|
589 | - 'geodir_theme_compat_js' => '', |
|
590 | - 'geodir_theme_compat_default_options' => '', |
|
591 | - 'geodir_theme_compat_code' => 'Jupiter' |
|
592 | - ); |
|
548 | + $theme_compat['Jupiter'] = array( |
|
549 | + 'geodir_wrapper_open_id' => '', |
|
550 | + 'geodir_wrapper_open_class' => '', |
|
551 | + 'geodir_wrapper_open_replace' => '<div id="theme-page"><div class="mk-main-wrapper-holder"><div class="theme-page-wrapper mk-main-wrapper mk-grid vc_row-fluid">', |
|
552 | + 'geodir_wrapper_close_replace' => '</div></div></div>', |
|
553 | + 'geodir_wrapper_content_open_id' => '', |
|
554 | + 'geodir_wrapper_content_open_class' => '', |
|
555 | + 'geodir_wrapper_content_open_replace' => '', |
|
556 | + 'geodir_wrapper_content_close_replace' => '', |
|
557 | + 'geodir_article_open_id' => '', |
|
558 | + 'geodir_article_open_class' => '', |
|
559 | + 'geodir_article_open_replace' => '', |
|
560 | + 'geodir_article_close_replace' => '', |
|
561 | + 'geodir_sidebar_right_open_id' => 'mk-sidebar', |
|
562 | + 'geodir_sidebar_right_open_class' => 'mk-builtin geodir-sidebar-right geodir-listings-sidebar-right', |
|
563 | + 'geodir_sidebar_right_open_replace' => '', |
|
564 | + 'geodir_sidebar_right_close_replace' => '', |
|
565 | + 'geodir_sidebar_left_open_id' => 'mk-sidebar', |
|
566 | + 'geodir_sidebar_left_open_class' => 'mk-builtin geodir-sidebar-right geodir-listings-sidebar-right', |
|
567 | + 'geodir_sidebar_left_open_replace' => '', |
|
568 | + 'geodir_sidebar_left_close_replace' => '', |
|
569 | + 'geodir_main_content_open_id' => '', |
|
570 | + 'geodir_main_content_open_class' => '', |
|
571 | + 'geodir_main_content_open_replace' => '', |
|
572 | + 'geodir_main_content_close_replace' => '', |
|
573 | + 'geodir_top_content_add' => '', |
|
574 | + 'geodir_before_main_content_add' => '', |
|
575 | + 'geodir_before_widget_filter' => '', |
|
576 | + 'geodir_after_widget_filter' => '', |
|
577 | + 'geodir_before_title_filter' => '<h3 class="widgettitle geodir-widget-title">', |
|
578 | + 'geodir_after_title_filter' => '', |
|
579 | + 'geodir_menu_li_class_filter' => 'menu-item menu-item-has-children no-mega-menu', |
|
580 | + 'geodir_sub_menu_ul_class_filter' => '', |
|
581 | + 'geodir_sub_menu_li_class_filter' => '', |
|
582 | + 'geodir_menu_a_class_filter' => 'menu-item-link', |
|
583 | + 'geodir_sub_menu_a_class_filter' => 'menu-item-link one-page-nav-item', |
|
584 | + 'geodir_location_switcher_menu_li_class_filter' => 'menu-item menu-item-type-social menu-item-type-social gd-location-switcher menu-item-has-children no-mega-menu', |
|
585 | + 'geodir_location_switcher_menu_a_class_filter' => 'menu-item-link', |
|
586 | + 'geodir_location_switcher_menu_sub_ul_class_filter' => '', |
|
587 | + 'geodir_location_switcher_menu_sub_li_class_filter' => '', |
|
588 | + 'geodir_theme_compat_css' => stripslashes('.geodir-widget li,.geodir_category_list_view li{margin:0}#theme-page h3.geodir-entry-title{font-size:14px}#menu-item-gd-location-switcher dd{line-height:44px}#menu-item-gd-location-switcher .geodir_location_sugestion{line-height:20px}.geodir_loginbox{overflow:visible}.geodir_full_page .geodir-listing-search{text-align:center}.geodir_full_page .geodir-search{float:none;margin:0}.geodir_full_page .geodir-search select,.geodir_full_page .geodir-search .search_by_post,.geodir_full_page .geodir-search input[type="text"],.geodir_full_page .geodir-search input[type="button"],.geodir_full_page .geodir-search input[type="submit"]{display:inline-block;float:none}'), |
|
589 | + 'geodir_theme_compat_js' => '', |
|
590 | + 'geodir_theme_compat_default_options' => '', |
|
591 | + 'geodir_theme_compat_code' => 'Jupiter' |
|
592 | + ); |
|
593 | 593 | |
594 | 594 | // Multi News |
595 | - $theme_compat['Multi_News'] = array( |
|
596 | - 'geodir_wrapper_open_id' => '', |
|
597 | - 'geodir_wrapper_open_class' => 'main-container clearfix', |
|
598 | - 'geodir_wrapper_open_replace' => '', |
|
599 | - 'geodir_wrapper_close_replace' => '', |
|
600 | - 'geodir_wrapper_content_open_id' => '', |
|
601 | - 'geodir_wrapper_content_open_class' => '', |
|
602 | - 'geodir_wrapper_content_open_replace' => '<div class="main-left" ><div class="main-content "><div class="site-content page-wrap">', |
|
603 | - 'geodir_wrapper_content_close_replace' => '</div></div></div>', |
|
604 | - 'geodir_article_open_id' => '', |
|
605 | - 'geodir_article_open_class' => '', |
|
606 | - 'geodir_article_open_replace' => '', |
|
607 | - 'geodir_article_close_replace' => '', |
|
608 | - 'geodir_sidebar_right_open_id' => '', |
|
609 | - 'geodir_sidebar_right_open_class' => '', |
|
610 | - 'geodir_sidebar_right_open_replace' => '<aside class="sidebar" role="complementary" itemscope itemtype="[itemtype]" >', |
|
611 | - 'geodir_sidebar_right_close_replace' => '', |
|
612 | - 'geodir_sidebar_left_open_id' => '', |
|
613 | - 'geodir_sidebar_left_open_class' => '', |
|
614 | - 'geodir_sidebar_left_open_replace' => '<aside class="secondary-sidebar" role="complementary" itemscope itemtype="[itemtype]" >', |
|
615 | - 'geodir_sidebar_left_close_replace' => '', |
|
616 | - 'geodir_main_content_open_id' => '', |
|
617 | - 'geodir_main_content_open_class' => '', |
|
618 | - 'geodir_main_content_open_replace' => '<div class="site-content page-wrap">', |
|
619 | - 'geodir_main_content_close_replace' => '</div>', |
|
620 | - 'geodir_top_content_add' => '', |
|
621 | - 'geodir_before_main_content_add' => '', |
|
622 | - 'geodir_full_page_class_filter' => 'section full-width-section', |
|
623 | - 'geodir_before_widget_filter' => '', |
|
624 | - 'geodir_after_widget_filter' => '', |
|
625 | - 'geodir_before_title_filter' => '<div class="widget-title"><h2>', |
|
626 | - 'geodir_after_title_filter' => '</h2></div>', |
|
627 | - 'geodir_menu_li_class_filter' => '', |
|
628 | - 'geodir_sub_menu_ul_class_filter' => '', |
|
629 | - 'geodir_sub_menu_li_class_filter' => '', |
|
630 | - 'geodir_menu_a_class_filter' => '', |
|
631 | - 'geodir_sub_menu_a_class_filter' => '', |
|
632 | - 'geodir_location_switcher_menu_li_class_filter' => '', |
|
633 | - 'geodir_location_switcher_menu_a_class_filter' => '', |
|
634 | - 'geodir_location_switcher_menu_sub_ul_class_filter' => '', |
|
635 | - 'geodir_location_switcher_menu_sub_li_class_filter' => '', |
|
636 | - 'geodir_theme_compat_css' => stripslashes('.full-width-section .geodir-search{margin:0;width:100%}.geodir_full_page .geodir-search{margin:0 auto;float:none}.geodir-search input[type=button],.geodir-search input[type=submit]{width:13%}.geodir-search input[type=text]{border:1px solid #ddd;border-radius:0;padding:0 8px}.geodir-category-list-in,.geodir-loc-bar-in{background:#f2f2f2;border-color:#dbdbdb}.geodir-category-list-in{margin-top:0}.geodir-cat-list .widget-title h2{margin:-13px -13px 13px}.widget .geodir-cat-list ul li.geodir-pcat-show a:before{display:none!important}.widget .geodir-cat-list ul li.geodir-pcat-show i{margin-right:5px}.container .geodir-search select{margin:0 3% 0 0;padding:8px 10px;width:13%}#geodir_carousel,#geodir_slider{border-radius:0;-webkit-border-radius:0;-moz-border-radius:0;margin-bottom:20px!important;border:1px solid #e1e1e1;box-shadow:none}#geodir_carousel{padding:10px}.geodir-tabs-content ol.commentlist{margin:40px 0;padding:0}li#post_mapTab{min-height:400px}#reviewsTab ol.commentlist li{border-bottom:none}#reviewsTab ol.commentlist li article.comment{border-bottom:1px solid #e1e1e1;padding-bottom:10px}.comment-content .rating{display:none}.comment-respond .gd_rating{margin-bottom:20px}div.geodir-rating{width:85px!important}.comment-respond .comment-notes{margin-bottom:10px}.average-review span,.comment-form label,.dtreviewed,.geodir-details-sidebar-user-links a,.geodir-viewall,.geodir_more_info span,.reviewer,dl.geodir-tab-head dd a{font-family:"Archivo Narrow",sans-serif}section.comment-content{margin:0 0 0 12%}#reviewsTab .comments-area .comment-content{width:auto}section.comment-content .description,section.comment-content p{margin:15px 0}dl.geodir-tab-head dd a{background:#f3f3f3;margin-top:-1px;font-size:14px;padding:0 15px}dl.geodir-tab-head dd.geodir-tab-active a{padding-bottom:1px}.geodir-widget .geodir_list_heading,.geodir-widget h3.widget-title{padding:0 15px;background:#e9e9e9;border:1px solid #dbdbdb;height:38px;line-height:38px;color:#2d2d2d}.geodir-widget .geodir_list_heading h3{background:0 0;border:none}.geodir-widget .geodir_list_heading{margin:-13px -14px 13px}.geodir-map-listing-page{border-width:1px 0 0;border-style:solid;border-color:#dbdbdb}.geodir-sidebar-wrap .geodir-company_info{margin:15px}.geodir-details-sidebar-social-sharing iframe{float:left}.geodir-details-sidebar-rating{overflow:hidden}.geodir-details-sidebar-rating .gd_rating_show,.geodir-details-sidebar-rating .geodir-rating{float:left;margin-right:15px}.geodir-details-sidebar-rating span.item{float:left;margin-top:5px}.geodir-details-sidebar-rating .average-review{top:-4px;position:relative}.geodir-details-sidebar-rating span.item img{margin-top:5px}.geodir_full_page{background:#fff;border:1px solid #e1e1e1;-webkit-box-shadow:0 1px 0 #e5e5e5;box-shadow:0 1px 0 #e5e5e5;padding:15px;margin-bottom:20px;clear:both}.geodir_map_container .main_list img{margin:0 5px}.geodir_category_list_view li.geodir-gridview .geodir-post-img .geodir_thumbnail{margin-bottom:10px}.geodir-addinfo .geodir-pinpoint,.geodir-addinfo a i{margin-right:5px}.geodir_category_list_view li.geodir-gridview h3{font-size:18px;margin-bottom:10px}#related_listingTab ul.geodir_category_list_view{padding:0!important}#reviewsTab #comments .gd_rating{margin-top:5px}.widget .geodir_category_list_view li .geodir-entry-content,.widget .geodir_category_list_view li a:before{display:none!important}.geodir_category_list_view li .geodir-entry-title{margin-bottom:10px}.widget ul.geodir_category_list_view{padding:15px}.sidebar .widget .geodir_category_list_view li{width:calc(100% - 25px)}.widget .geodir-loginbox-list li{overflow:visible!important}.widget ul.chosen-results{margin:0!important}.main_list_selecter{margin-right:5px}.geodir-viewall{float:right;width:auto!important}.widget-title h2{padding:0 15px;background:#e9e9e9;border:1px solid #dbdbdb;height:38px;line-height:38px}.widget:first-child .geodir_list_heading .widget-title{margin-top:0}.geodir_list_heading .widget-title{float:left;width:80%;margin-top:0}.geodir_list_heading .widget-title h2{padding:0 px;background:0 0;border:none;height:auto;line-height:auto}.chosen-default:before{content:none;display:none;position:absolute;margin-left:-1000000px;float:left}#geodir-wrapper .entry-crumbs{margin-bottom:20px}.geodir-search .mom-select{float:left;width:150px;margin:5px;border:1px solid #ddd;height:40px}.iprelative .gm-style .gm-style-iw{width:100%!important}'), |
|
637 | - 'geodir_theme_compat_js' => 'jQuery(document).ready(function(e){e(".geodir_full_page").length&&""===e.trim(e(".geodir_full_page").html())&&e(".geodir_full_page").css({display:"none"})});', |
|
638 | - 'geodir_theme_compat_default_options' => '', |
|
639 | - 'geodir_theme_compat_code' => 'Multi_News' |
|
640 | - ); |
|
641 | - |
|
642 | - update_option('gd_theme_compats', $theme_compat); |
|
643 | - |
|
644 | - gd_set_theme_compat();// set the compat pack if avail |
|
595 | + $theme_compat['Multi_News'] = array( |
|
596 | + 'geodir_wrapper_open_id' => '', |
|
597 | + 'geodir_wrapper_open_class' => 'main-container clearfix', |
|
598 | + 'geodir_wrapper_open_replace' => '', |
|
599 | + 'geodir_wrapper_close_replace' => '', |
|
600 | + 'geodir_wrapper_content_open_id' => '', |
|
601 | + 'geodir_wrapper_content_open_class' => '', |
|
602 | + 'geodir_wrapper_content_open_replace' => '<div class="main-left" ><div class="main-content "><div class="site-content page-wrap">', |
|
603 | + 'geodir_wrapper_content_close_replace' => '</div></div></div>', |
|
604 | + 'geodir_article_open_id' => '', |
|
605 | + 'geodir_article_open_class' => '', |
|
606 | + 'geodir_article_open_replace' => '', |
|
607 | + 'geodir_article_close_replace' => '', |
|
608 | + 'geodir_sidebar_right_open_id' => '', |
|
609 | + 'geodir_sidebar_right_open_class' => '', |
|
610 | + 'geodir_sidebar_right_open_replace' => '<aside class="sidebar" role="complementary" itemscope itemtype="[itemtype]" >', |
|
611 | + 'geodir_sidebar_right_close_replace' => '', |
|
612 | + 'geodir_sidebar_left_open_id' => '', |
|
613 | + 'geodir_sidebar_left_open_class' => '', |
|
614 | + 'geodir_sidebar_left_open_replace' => '<aside class="secondary-sidebar" role="complementary" itemscope itemtype="[itemtype]" >', |
|
615 | + 'geodir_sidebar_left_close_replace' => '', |
|
616 | + 'geodir_main_content_open_id' => '', |
|
617 | + 'geodir_main_content_open_class' => '', |
|
618 | + 'geodir_main_content_open_replace' => '<div class="site-content page-wrap">', |
|
619 | + 'geodir_main_content_close_replace' => '</div>', |
|
620 | + 'geodir_top_content_add' => '', |
|
621 | + 'geodir_before_main_content_add' => '', |
|
622 | + 'geodir_full_page_class_filter' => 'section full-width-section', |
|
623 | + 'geodir_before_widget_filter' => '', |
|
624 | + 'geodir_after_widget_filter' => '', |
|
625 | + 'geodir_before_title_filter' => '<div class="widget-title"><h2>', |
|
626 | + 'geodir_after_title_filter' => '</h2></div>', |
|
627 | + 'geodir_menu_li_class_filter' => '', |
|
628 | + 'geodir_sub_menu_ul_class_filter' => '', |
|
629 | + 'geodir_sub_menu_li_class_filter' => '', |
|
630 | + 'geodir_menu_a_class_filter' => '', |
|
631 | + 'geodir_sub_menu_a_class_filter' => '', |
|
632 | + 'geodir_location_switcher_menu_li_class_filter' => '', |
|
633 | + 'geodir_location_switcher_menu_a_class_filter' => '', |
|
634 | + 'geodir_location_switcher_menu_sub_ul_class_filter' => '', |
|
635 | + 'geodir_location_switcher_menu_sub_li_class_filter' => '', |
|
636 | + 'geodir_theme_compat_css' => stripslashes('.full-width-section .geodir-search{margin:0;width:100%}.geodir_full_page .geodir-search{margin:0 auto;float:none}.geodir-search input[type=button],.geodir-search input[type=submit]{width:13%}.geodir-search input[type=text]{border:1px solid #ddd;border-radius:0;padding:0 8px}.geodir-category-list-in,.geodir-loc-bar-in{background:#f2f2f2;border-color:#dbdbdb}.geodir-category-list-in{margin-top:0}.geodir-cat-list .widget-title h2{margin:-13px -13px 13px}.widget .geodir-cat-list ul li.geodir-pcat-show a:before{display:none!important}.widget .geodir-cat-list ul li.geodir-pcat-show i{margin-right:5px}.container .geodir-search select{margin:0 3% 0 0;padding:8px 10px;width:13%}#geodir_carousel,#geodir_slider{border-radius:0;-webkit-border-radius:0;-moz-border-radius:0;margin-bottom:20px!important;border:1px solid #e1e1e1;box-shadow:none}#geodir_carousel{padding:10px}.geodir-tabs-content ol.commentlist{margin:40px 0;padding:0}li#post_mapTab{min-height:400px}#reviewsTab ol.commentlist li{border-bottom:none}#reviewsTab ol.commentlist li article.comment{border-bottom:1px solid #e1e1e1;padding-bottom:10px}.comment-content .rating{display:none}.comment-respond .gd_rating{margin-bottom:20px}div.geodir-rating{width:85px!important}.comment-respond .comment-notes{margin-bottom:10px}.average-review span,.comment-form label,.dtreviewed,.geodir-details-sidebar-user-links a,.geodir-viewall,.geodir_more_info span,.reviewer,dl.geodir-tab-head dd a{font-family:"Archivo Narrow",sans-serif}section.comment-content{margin:0 0 0 12%}#reviewsTab .comments-area .comment-content{width:auto}section.comment-content .description,section.comment-content p{margin:15px 0}dl.geodir-tab-head dd a{background:#f3f3f3;margin-top:-1px;font-size:14px;padding:0 15px}dl.geodir-tab-head dd.geodir-tab-active a{padding-bottom:1px}.geodir-widget .geodir_list_heading,.geodir-widget h3.widget-title{padding:0 15px;background:#e9e9e9;border:1px solid #dbdbdb;height:38px;line-height:38px;color:#2d2d2d}.geodir-widget .geodir_list_heading h3{background:0 0;border:none}.geodir-widget .geodir_list_heading{margin:-13px -14px 13px}.geodir-map-listing-page{border-width:1px 0 0;border-style:solid;border-color:#dbdbdb}.geodir-sidebar-wrap .geodir-company_info{margin:15px}.geodir-details-sidebar-social-sharing iframe{float:left}.geodir-details-sidebar-rating{overflow:hidden}.geodir-details-sidebar-rating .gd_rating_show,.geodir-details-sidebar-rating .geodir-rating{float:left;margin-right:15px}.geodir-details-sidebar-rating span.item{float:left;margin-top:5px}.geodir-details-sidebar-rating .average-review{top:-4px;position:relative}.geodir-details-sidebar-rating span.item img{margin-top:5px}.geodir_full_page{background:#fff;border:1px solid #e1e1e1;-webkit-box-shadow:0 1px 0 #e5e5e5;box-shadow:0 1px 0 #e5e5e5;padding:15px;margin-bottom:20px;clear:both}.geodir_map_container .main_list img{margin:0 5px}.geodir_category_list_view li.geodir-gridview .geodir-post-img .geodir_thumbnail{margin-bottom:10px}.geodir-addinfo .geodir-pinpoint,.geodir-addinfo a i{margin-right:5px}.geodir_category_list_view li.geodir-gridview h3{font-size:18px;margin-bottom:10px}#related_listingTab ul.geodir_category_list_view{padding:0!important}#reviewsTab #comments .gd_rating{margin-top:5px}.widget .geodir_category_list_view li .geodir-entry-content,.widget .geodir_category_list_view li a:before{display:none!important}.geodir_category_list_view li .geodir-entry-title{margin-bottom:10px}.widget ul.geodir_category_list_view{padding:15px}.sidebar .widget .geodir_category_list_view li{width:calc(100% - 25px)}.widget .geodir-loginbox-list li{overflow:visible!important}.widget ul.chosen-results{margin:0!important}.main_list_selecter{margin-right:5px}.geodir-viewall{float:right;width:auto!important}.widget-title h2{padding:0 15px;background:#e9e9e9;border:1px solid #dbdbdb;height:38px;line-height:38px}.widget:first-child .geodir_list_heading .widget-title{margin-top:0}.geodir_list_heading .widget-title{float:left;width:80%;margin-top:0}.geodir_list_heading .widget-title h2{padding:0 px;background:0 0;border:none;height:auto;line-height:auto}.chosen-default:before{content:none;display:none;position:absolute;margin-left:-1000000px;float:left}#geodir-wrapper .entry-crumbs{margin-bottom:20px}.geodir-search .mom-select{float:left;width:150px;margin:5px;border:1px solid #ddd;height:40px}.iprelative .gm-style .gm-style-iw{width:100%!important}'), |
|
637 | + 'geodir_theme_compat_js' => 'jQuery(document).ready(function(e){e(".geodir_full_page").length&&""===e.trim(e(".geodir_full_page").html())&&e(".geodir_full_page").css({display:"none"})});', |
|
638 | + 'geodir_theme_compat_default_options' => '', |
|
639 | + 'geodir_theme_compat_code' => 'Multi_News' |
|
640 | + ); |
|
641 | + |
|
642 | + update_option('gd_theme_compats', $theme_compat); |
|
643 | + |
|
644 | + gd_set_theme_compat();// set the compat pack if avail |
|
645 | 645 | } |
646 | 646 | |
647 | 647 | |
@@ -653,61 +653,61 @@ discard block |
||
653 | 653 | * @global object $wpdb WordPress Database object. |
654 | 654 | */ |
655 | 655 | function gd_convert_virtual_pages(){ |
656 | - global $wpdb; |
|
657 | - |
|
658 | - // Update the add listing page settings |
|
659 | - $add_listing_page = $wpdb->get_var( |
|
660 | - $wpdb->prepare( |
|
661 | - "SELECT ID FROM " . $wpdb->posts . " WHERE post_name = %s AND post_status='virtual' LIMIT 1;", |
|
662 | - array('add-listing') |
|
663 | - ) |
|
664 | - ); |
|
665 | - |
|
666 | - if($add_listing_page){ |
|
667 | - wp_update_post( array('ID' => $add_listing_page, 'post_status' => 'publish') ); |
|
668 | - update_option( 'geodir_add_listing_page', $add_listing_page); |
|
669 | - } |
|
670 | - |
|
671 | - // Update the listing preview page settings |
|
672 | - $listing_preview_page = $wpdb->get_var( |
|
673 | - $wpdb->prepare( |
|
674 | - "SELECT ID FROM " . $wpdb->posts . " WHERE post_name = %s AND post_status='virtual' LIMIT 1;", |
|
675 | - array('listing-preview') |
|
676 | - ) |
|
677 | - ); |
|
678 | - |
|
679 | - if($listing_preview_page){ |
|
680 | - wp_update_post( array('ID' => $listing_preview_page, 'post_status' => 'publish') ); |
|
681 | - update_option( 'geodir_preview_page', $listing_preview_page); |
|
682 | - } |
|
683 | - |
|
684 | - // Update the listing success page settings |
|
685 | - $listing_success_page = $wpdb->get_var( |
|
686 | - $wpdb->prepare( |
|
687 | - "SELECT ID FROM " . $wpdb->posts . " WHERE post_name = %s AND post_status='virtual' LIMIT 1;", |
|
688 | - array('listing-success') |
|
689 | - ) |
|
690 | - ); |
|
691 | - |
|
692 | - if($listing_success_page){ |
|
693 | - wp_update_post( array('ID' => $listing_success_page, 'post_status' => 'publish') ); |
|
694 | - update_option( 'geodir_success_page', $listing_success_page); |
|
695 | - } |
|
696 | - |
|
697 | - // Update the listing success page settings |
|
698 | - $location_page = $wpdb->get_var( |
|
699 | - $wpdb->prepare( |
|
700 | - "SELECT ID FROM " . $wpdb->posts . " WHERE post_name = %s AND post_status='virtual' LIMIT 1;", |
|
701 | - array('location') |
|
702 | - ) |
|
703 | - ); |
|
704 | - |
|
705 | - if($location_page){ |
|
706 | - $location_slug = get_option('geodir_location_prefix'); |
|
707 | - if(!$location_slug ){$location_slug = 'location';} |
|
708 | - wp_update_post( array('ID' => $location_page, 'post_status' => 'publish','post_name' => $location_slug) ); |
|
709 | - update_option( 'geodir_location_page', $location_page); |
|
710 | - } |
|
656 | + global $wpdb; |
|
657 | + |
|
658 | + // Update the add listing page settings |
|
659 | + $add_listing_page = $wpdb->get_var( |
|
660 | + $wpdb->prepare( |
|
661 | + "SELECT ID FROM " . $wpdb->posts . " WHERE post_name = %s AND post_status='virtual' LIMIT 1;", |
|
662 | + array('add-listing') |
|
663 | + ) |
|
664 | + ); |
|
665 | + |
|
666 | + if($add_listing_page){ |
|
667 | + wp_update_post( array('ID' => $add_listing_page, 'post_status' => 'publish') ); |
|
668 | + update_option( 'geodir_add_listing_page', $add_listing_page); |
|
669 | + } |
|
670 | + |
|
671 | + // Update the listing preview page settings |
|
672 | + $listing_preview_page = $wpdb->get_var( |
|
673 | + $wpdb->prepare( |
|
674 | + "SELECT ID FROM " . $wpdb->posts . " WHERE post_name = %s AND post_status='virtual' LIMIT 1;", |
|
675 | + array('listing-preview') |
|
676 | + ) |
|
677 | + ); |
|
678 | + |
|
679 | + if($listing_preview_page){ |
|
680 | + wp_update_post( array('ID' => $listing_preview_page, 'post_status' => 'publish') ); |
|
681 | + update_option( 'geodir_preview_page', $listing_preview_page); |
|
682 | + } |
|
683 | + |
|
684 | + // Update the listing success page settings |
|
685 | + $listing_success_page = $wpdb->get_var( |
|
686 | + $wpdb->prepare( |
|
687 | + "SELECT ID FROM " . $wpdb->posts . " WHERE post_name = %s AND post_status='virtual' LIMIT 1;", |
|
688 | + array('listing-success') |
|
689 | + ) |
|
690 | + ); |
|
691 | + |
|
692 | + if($listing_success_page){ |
|
693 | + wp_update_post( array('ID' => $listing_success_page, 'post_status' => 'publish') ); |
|
694 | + update_option( 'geodir_success_page', $listing_success_page); |
|
695 | + } |
|
696 | + |
|
697 | + // Update the listing success page settings |
|
698 | + $location_page = $wpdb->get_var( |
|
699 | + $wpdb->prepare( |
|
700 | + "SELECT ID FROM " . $wpdb->posts . " WHERE post_name = %s AND post_status='virtual' LIMIT 1;", |
|
701 | + array('location') |
|
702 | + ) |
|
703 | + ); |
|
704 | + |
|
705 | + if($location_page){ |
|
706 | + $location_slug = get_option('geodir_location_prefix'); |
|
707 | + if(!$location_slug ){$location_slug = 'location';} |
|
708 | + wp_update_post( array('ID' => $location_page, 'post_status' => 'publish','post_name' => $location_slug) ); |
|
709 | + update_option( 'geodir_location_page', $location_page); |
|
710 | + } |
|
711 | 711 | |
712 | 712 | } |
713 | 713 | |
@@ -721,31 +721,31 @@ discard block |
||
721 | 721 | function gd_fix_cpt_rewrite_slug() |
722 | 722 | { |
723 | 723 | |
724 | - $alt_post_types = array(); |
|
725 | - $post_types = get_option('geodir_post_types'); |
|
724 | + $alt_post_types = array(); |
|
725 | + $post_types = get_option('geodir_post_types'); |
|
726 | 726 | |
727 | 727 | |
728 | - if (is_array($post_types)){ |
|
728 | + if (is_array($post_types)){ |
|
729 | 729 | |
730 | - foreach ($post_types as $post_type => $args) { |
|
730 | + foreach ($post_types as $post_type => $args) { |
|
731 | 731 | |
732 | 732 | |
733 | - if(isset($args['rewrite']['slug'])){ |
|
734 | - $args['rewrite']['slug'] = str_replace("/%gd_taxonomy%","",$args['rewrite']['slug']); |
|
735 | - } |
|
733 | + if(isset($args['rewrite']['slug'])){ |
|
734 | + $args['rewrite']['slug'] = str_replace("/%gd_taxonomy%","",$args['rewrite']['slug']); |
|
735 | + } |
|
736 | 736 | |
737 | - $alt_post_types[$post_type] = $args; |
|
737 | + $alt_post_types[$post_type] = $args; |
|
738 | 738 | |
739 | - } |
|
740 | - } |
|
739 | + } |
|
740 | + } |
|
741 | 741 | |
742 | - if(!empty($alt_post_types)) { |
|
743 | - update_option('geodir_post_types',$alt_post_types); |
|
744 | - } |
|
742 | + if(!empty($alt_post_types)) { |
|
743 | + update_option('geodir_post_types',$alt_post_types); |
|
744 | + } |
|
745 | 745 | |
746 | 746 | |
747 | - // flush the rewrite rules |
|
748 | - flush_rewrite_rules(); |
|
747 | + // flush the rewrite rules |
|
748 | + flush_rewrite_rules(); |
|
749 | 749 | } |
750 | 750 | |
751 | 751 | |
@@ -758,18 +758,18 @@ discard block |
||
758 | 758 | */ |
759 | 759 | function gd_fix_address_detail_table_limit() |
760 | 760 | { |
761 | - global $wpdb; |
|
762 | - |
|
763 | - $all_postypes = geodir_get_posttypes(); |
|
764 | - |
|
765 | - if (!empty($all_postypes)) { |
|
766 | - foreach ($all_postypes as $key) { |
|
767 | - // update each GD CTP |
|
768 | - try { |
|
769 | - $wpdb->query("ALTER TABLE " . $wpdb->prefix . "geodir_" . $key . "_detail MODIFY post_city VARCHAR( 50 ) NULL,MODIFY post_region VARCHAR( 50 ) NULL,MODIFY post_country VARCHAR( 50 ) NULL"); |
|
770 | - } catch(Exception $e) { |
|
771 | - error_log( 'Error: ' . $e->getMessage() ); |
|
772 | - } |
|
773 | - } |
|
774 | - } |
|
761 | + global $wpdb; |
|
762 | + |
|
763 | + $all_postypes = geodir_get_posttypes(); |
|
764 | + |
|
765 | + if (!empty($all_postypes)) { |
|
766 | + foreach ($all_postypes as $key) { |
|
767 | + // update each GD CTP |
|
768 | + try { |
|
769 | + $wpdb->query("ALTER TABLE " . $wpdb->prefix . "geodir_" . $key . "_detail MODIFY post_city VARCHAR( 50 ) NULL,MODIFY post_region VARCHAR( 50 ) NULL,MODIFY post_country VARCHAR( 50 ) NULL"); |
|
770 | + } catch(Exception $e) { |
|
771 | + error_log( 'Error: ' . $e->getMessage() ); |
|
772 | + } |
|
773 | + } |
|
774 | + } |
|
775 | 775 | } |
@@ -6,26 +6,26 @@ discard block |
||
6 | 6 | * @package GeoDirectory |
7 | 7 | */ |
8 | 8 | if (!function_exists('geodir_create_tables')) { |
9 | - /** |
|
10 | - * Creates custom db tables for storing GeoDirectory plugin data. |
|
11 | - * |
|
12 | - * @since 1.0.0 |
|
13 | - * @package GeoDirectory |
|
14 | - * @global object $wpdb WordPress Database object. |
|
15 | - * @global string $plugin_prefix GeoDirectory plugin table prefix. |
|
16 | - */ |
|
17 | - function geodir_create_tables() |
|
18 | - { |
|
19 | - |
|
20 | - global $wpdb, $plugin_prefix; |
|
21 | - |
|
22 | - $wpdb->hide_errors(); |
|
23 | - |
|
24 | - $collate = ''; |
|
25 | - if ($wpdb->has_cap('collation')) { |
|
26 | - if (!empty($wpdb->charset)) $collate = "DEFAULT CHARACTER SET $wpdb->charset"; |
|
27 | - if (!empty($wpdb->collate)) $collate .= " COLLATE $wpdb->collate"; |
|
28 | - } |
|
9 | + /** |
|
10 | + * Creates custom db tables for storing GeoDirectory plugin data. |
|
11 | + * |
|
12 | + * @since 1.0.0 |
|
13 | + * @package GeoDirectory |
|
14 | + * @global object $wpdb WordPress Database object. |
|
15 | + * @global string $plugin_prefix GeoDirectory plugin table prefix. |
|
16 | + */ |
|
17 | + function geodir_create_tables() |
|
18 | + { |
|
19 | + |
|
20 | + global $wpdb, $plugin_prefix; |
|
21 | + |
|
22 | + $wpdb->hide_errors(); |
|
23 | + |
|
24 | + $collate = ''; |
|
25 | + if ($wpdb->has_cap('collation')) { |
|
26 | + if (!empty($wpdb->charset)) $collate = "DEFAULT CHARACTER SET $wpdb->charset"; |
|
27 | + if (!empty($wpdb->collate)) $collate .= " COLLATE $wpdb->collate"; |
|
28 | + } |
|
29 | 29 | |
30 | 30 | /** |
31 | 31 | * Include any functions needed for upgrades. |
@@ -36,31 +36,31 @@ discard block |
||
36 | 36 | |
37 | 37 | |
38 | 38 | // rename tables if we need to |
39 | - if ($wpdb->query("SHOW TABLES LIKE 'geodir_countries'") > 0 && $wpdb->query("SHOW TABLES LIKE '" . $wpdb->prefix . "geodir_countries'") == 0) { |
|
40 | - $wpdb->query("RENAME TABLE geodir_countries TO " . $wpdb->prefix . "geodir_countries"); |
|
41 | - } |
|
42 | - if ($wpdb->query("SHOW TABLES LIKE 'geodir_custom_fields'") > 0 && $wpdb->query("SHOW TABLES LIKE '" . $wpdb->prefix . "geodir_custom_fields'") == 0) { |
|
43 | - $wpdb->query("RENAME TABLE geodir_custom_fields TO " . $wpdb->prefix . "geodir_custom_fields"); |
|
44 | - } |
|
45 | - if ($wpdb->query("SHOW TABLES LIKE 'geodir_post_icon'") > 0 && $wpdb->query("SHOW TABLES LIKE '" . $wpdb->prefix . "geodir_post_icon'") == 0) { |
|
46 | - $wpdb->query("RENAME TABLE geodir_post_icon TO " . $wpdb->prefix . "geodir_post_icon"); |
|
47 | - } |
|
48 | - if ($wpdb->query("SHOW TABLES LIKE 'geodir_attachments'") > 0 && $wpdb->query("SHOW TABLES LIKE '" . $wpdb->prefix . "geodir_attachments'") == 0) { |
|
49 | - $wpdb->query("RENAME TABLE geodir_attachments TO " . $wpdb->prefix . "geodir_attachments"); |
|
50 | - } |
|
51 | - if ($wpdb->query("SHOW TABLES LIKE 'geodir_post_review'") > 0 && $wpdb->query("SHOW TABLES LIKE '" . $wpdb->prefix . "geodir_post_review'") == 0) { |
|
52 | - $wpdb->query("RENAME TABLE geodir_post_review TO " . $wpdb->prefix . "geodir_post_review"); |
|
53 | - } |
|
54 | - if ($wpdb->query("SHOW TABLES LIKE 'geodir_custom_sort_fields'") > 0 && $wpdb->query("SHOW TABLES LIKE '" . $wpdb->prefix . "geodir_custom_sort_fields'") == 0) { |
|
55 | - $wpdb->query("RENAME TABLE geodir_custom_sort_fields TO " . $wpdb->prefix . "geodir_custom_sort_fields"); |
|
56 | - } |
|
57 | - if ($wpdb->query("SHOW TABLES LIKE 'geodir_gd_place_detail'") > 0 && $wpdb->query("SHOW TABLES LIKE '" . $wpdb->prefix . "geodir_gd_place_detail'") == 0) { |
|
58 | - $wpdb->query("RENAME TABLE geodir_gd_place_detail TO " . $wpdb->prefix . "geodir_gd_place_detail"); |
|
59 | - } |
|
60 | - |
|
61 | - |
|
62 | - // Table for storing Countries |
|
63 | - $GEODIR_COUNTRIES_TABLE = "CREATE TABLE " . GEODIR_COUNTRIES_TABLE . " ( |
|
39 | + if ($wpdb->query("SHOW TABLES LIKE 'geodir_countries'") > 0 && $wpdb->query("SHOW TABLES LIKE '" . $wpdb->prefix . "geodir_countries'") == 0) { |
|
40 | + $wpdb->query("RENAME TABLE geodir_countries TO " . $wpdb->prefix . "geodir_countries"); |
|
41 | + } |
|
42 | + if ($wpdb->query("SHOW TABLES LIKE 'geodir_custom_fields'") > 0 && $wpdb->query("SHOW TABLES LIKE '" . $wpdb->prefix . "geodir_custom_fields'") == 0) { |
|
43 | + $wpdb->query("RENAME TABLE geodir_custom_fields TO " . $wpdb->prefix . "geodir_custom_fields"); |
|
44 | + } |
|
45 | + if ($wpdb->query("SHOW TABLES LIKE 'geodir_post_icon'") > 0 && $wpdb->query("SHOW TABLES LIKE '" . $wpdb->prefix . "geodir_post_icon'") == 0) { |
|
46 | + $wpdb->query("RENAME TABLE geodir_post_icon TO " . $wpdb->prefix . "geodir_post_icon"); |
|
47 | + } |
|
48 | + if ($wpdb->query("SHOW TABLES LIKE 'geodir_attachments'") > 0 && $wpdb->query("SHOW TABLES LIKE '" . $wpdb->prefix . "geodir_attachments'") == 0) { |
|
49 | + $wpdb->query("RENAME TABLE geodir_attachments TO " . $wpdb->prefix . "geodir_attachments"); |
|
50 | + } |
|
51 | + if ($wpdb->query("SHOW TABLES LIKE 'geodir_post_review'") > 0 && $wpdb->query("SHOW TABLES LIKE '" . $wpdb->prefix . "geodir_post_review'") == 0) { |
|
52 | + $wpdb->query("RENAME TABLE geodir_post_review TO " . $wpdb->prefix . "geodir_post_review"); |
|
53 | + } |
|
54 | + if ($wpdb->query("SHOW TABLES LIKE 'geodir_custom_sort_fields'") > 0 && $wpdb->query("SHOW TABLES LIKE '" . $wpdb->prefix . "geodir_custom_sort_fields'") == 0) { |
|
55 | + $wpdb->query("RENAME TABLE geodir_custom_sort_fields TO " . $wpdb->prefix . "geodir_custom_sort_fields"); |
|
56 | + } |
|
57 | + if ($wpdb->query("SHOW TABLES LIKE 'geodir_gd_place_detail'") > 0 && $wpdb->query("SHOW TABLES LIKE '" . $wpdb->prefix . "geodir_gd_place_detail'") == 0) { |
|
58 | + $wpdb->query("RENAME TABLE geodir_gd_place_detail TO " . $wpdb->prefix . "geodir_gd_place_detail"); |
|
59 | + } |
|
60 | + |
|
61 | + |
|
62 | + // Table for storing Countries |
|
63 | + $GEODIR_COUNTRIES_TABLE = "CREATE TABLE " . GEODIR_COUNTRIES_TABLE . " ( |
|
64 | 64 | CountryId smallint AUTO_INCREMENT NOT NULL , |
65 | 65 | Country varchar (50) NOT NULL , |
66 | 66 | FIPS104 varchar (2) NOT NULL , |
@@ -79,21 +79,21 @@ discard block |
||
79 | 79 | Comment varchar (255) NULL , |
80 | 80 | PRIMARY KEY (CountryId)) $collate "; |
81 | 81 | |
82 | - /** |
|
83 | - * Filter the SQL query that creates/updates the country DB table structure. |
|
84 | - * |
|
85 | - * @since 1.0.0 |
|
86 | - * @param string $sql The SQL insert query string. |
|
87 | - */ |
|
88 | - $GEODIR_COUNTRIES_TABLE = apply_filters('geodir_before_country_table_create', $GEODIR_COUNTRIES_TABLE); |
|
89 | - dbDelta($GEODIR_COUNTRIES_TABLE); |
|
82 | + /** |
|
83 | + * Filter the SQL query that creates/updates the country DB table structure. |
|
84 | + * |
|
85 | + * @since 1.0.0 |
|
86 | + * @param string $sql The SQL insert query string. |
|
87 | + */ |
|
88 | + $GEODIR_COUNTRIES_TABLE = apply_filters('geodir_before_country_table_create', $GEODIR_COUNTRIES_TABLE); |
|
89 | + dbDelta($GEODIR_COUNTRIES_TABLE); |
|
90 | 90 | |
91 | 91 | |
92 | - $country_table_empty = $wpdb->get_var("SELECT COUNT(CountryId) FROM " . GEODIR_COUNTRIES_TABLE . ""); |
|
92 | + $country_table_empty = $wpdb->get_var("SELECT COUNT(CountryId) FROM " . GEODIR_COUNTRIES_TABLE . ""); |
|
93 | 93 | |
94 | - if ($country_table_empty == 0) { |
|
94 | + if ($country_table_empty == 0) { |
|
95 | 95 | |
96 | - $countries_insert = "INSERT INTO " . GEODIR_COUNTRIES_TABLE . " (`CountryId`, `Country`, `FIPS104`, `ISO2`, `ISO3`, `ISON`, `Internet`, `Capital`, `MapReference`, `NationalitySingular`, `NationalityPlural`, `Currency`, `CurrencyCode`, `Population`, `Title`, `COMMENT`) VALUES |
|
96 | + $countries_insert = "INSERT INTO " . GEODIR_COUNTRIES_TABLE . " (`CountryId`, `Country`, `FIPS104`, `ISO2`, `ISO3`, `ISON`, `Internet`, `Capital`, `MapReference`, `NationalitySingular`, `NationalityPlural`, `Currency`, `CurrencyCode`, `Population`, `Title`, `COMMENT`) VALUES |
|
97 | 97 | (1, 'Afghanistan', 'AF', 'AF', 'AFG', '4', 'AF', 'Kabul ', 'Asia ', 'Afghan', 'Afghans', 'Afghani ', 'AFA', 26813057, 'Afghanistan', ''), |
98 | 98 | (2, 'Albania', 'AL', 'AL', 'ALB', '8', 'AL', 'Tirana ', 'Europe ', 'Albanian', 'Albanians', 'Lek ', 'ALL', 3510484, 'Albania', ''), |
99 | 99 | (3, 'Algeria', 'AG', 'DZ', 'DZA', '12', 'DZ', 'Algiers ', 'Africa ', 'Algerian', 'Algerians', 'Algerian Dinar ', 'DZD', 31736053, 'Algeria', ''), |
@@ -367,21 +367,21 @@ discard block |
||
367 | 367 | (276, 'Curaçao', 'UC', 'CW', 'CUW', '531', 'CW', 'Willemstad ', 'Central America and the Caribbean', 'Curaçaoan', 'Curaçaoans', 'Netherlands Antillean guilder', 'ANG', 152760, 'Curaçao', ''), |
368 | 368 | (277, 'Caribbean Netherlands', '--', 'BQ', 'BES', '535', 'BQ', '--', 'Central America and the Caribbean', '--', '--', 'United States dollar', 'USD', 21133, 'Caribbean Netherlands', '')"; |
369 | 369 | |
370 | - /** |
|
371 | - * Filter the SQL query that inserts the country DB table data. |
|
372 | - * |
|
373 | - * @since 1.0.0 |
|
374 | - * @param string $sql The SQL insert query string. |
|
375 | - */ |
|
376 | - $countries_insert = apply_filters('geodir_before_country_data_insert', $countries_insert); |
|
377 | - $wpdb->query($countries_insert); |
|
370 | + /** |
|
371 | + * Filter the SQL query that inserts the country DB table data. |
|
372 | + * |
|
373 | + * @since 1.0.0 |
|
374 | + * @param string $sql The SQL insert query string. |
|
375 | + */ |
|
376 | + $countries_insert = apply_filters('geodir_before_country_data_insert', $countries_insert); |
|
377 | + $wpdb->query($countries_insert); |
|
378 | 378 | |
379 | - } |
|
379 | + } |
|
380 | 380 | |
381 | 381 | |
382 | - // Table for storing location attribute - these are user defined |
|
382 | + // Table for storing location attribute - these are user defined |
|
383 | 383 | |
384 | - $icon_table = "CREATE TABLE " . GEODIR_ICON_TABLE . " ( |
|
384 | + $icon_table = "CREATE TABLE " . GEODIR_ICON_TABLE . " ( |
|
385 | 385 | id int NOT NULL AUTO_INCREMENT, |
386 | 386 | post_id int( 10 ) NOT NULL, |
387 | 387 | post_title varchar(254) NOT NULL, |
@@ -390,19 +390,19 @@ discard block |
||
390 | 390 | PRIMARY KEY (id) |
391 | 391 | ) $collate "; |
392 | 392 | |
393 | - /** |
|
394 | - * Filter the SQL query that creates/updates the post_icon DB table structure. |
|
395 | - * |
|
396 | - * @since 1.0.0 |
|
397 | - * @param string $sql The SQL insert query string. |
|
398 | - */ |
|
399 | - $icon_table = apply_filters('geodir_before_icon_table_create', $icon_table); |
|
393 | + /** |
|
394 | + * Filter the SQL query that creates/updates the post_icon DB table structure. |
|
395 | + * |
|
396 | + * @since 1.0.0 |
|
397 | + * @param string $sql The SQL insert query string. |
|
398 | + */ |
|
399 | + $icon_table = apply_filters('geodir_before_icon_table_create', $icon_table); |
|
400 | 400 | |
401 | - dbDelta($icon_table); |
|
401 | + dbDelta($icon_table); |
|
402 | 402 | |
403 | - // Table for storing post custom fields - these are user defined |
|
403 | + // Table for storing post custom fields - these are user defined |
|
404 | 404 | |
405 | - $post_custom_fields = "CREATE TABLE " . GEODIR_CUSTOM_FIELDS_TABLE . " ( |
|
405 | + $post_custom_fields = "CREATE TABLE " . GEODIR_CUSTOM_FIELDS_TABLE . " ( |
|
406 | 406 | id int(11) NOT NULL AUTO_INCREMENT, |
407 | 407 | post_type varchar(100) NULL, |
408 | 408 | data_type varchar(100) NULL DEFAULT NULL, |
@@ -436,18 +436,18 @@ discard block |
||
436 | 436 | PRIMARY KEY (id) |
437 | 437 | ) $collate"; |
438 | 438 | |
439 | - /** |
|
440 | - * Filter the SQL query that creates/updates the custom_fields DB table structure. |
|
441 | - * |
|
442 | - * @since 1.0.0 |
|
443 | - * @param string $sql The SQL insert query string. |
|
444 | - */ |
|
445 | - $post_custom_fields = apply_filters('geodir_before_custom_field_table_create', $post_custom_fields); |
|
439 | + /** |
|
440 | + * Filter the SQL query that creates/updates the custom_fields DB table structure. |
|
441 | + * |
|
442 | + * @since 1.0.0 |
|
443 | + * @param string $sql The SQL insert query string. |
|
444 | + */ |
|
445 | + $post_custom_fields = apply_filters('geodir_before_custom_field_table_create', $post_custom_fields); |
|
446 | 446 | |
447 | - dbDelta($post_custom_fields); |
|
447 | + dbDelta($post_custom_fields); |
|
448 | 448 | |
449 | - // Table for storing place attribute - these are user defined |
|
450 | - $post_detail = "CREATE TABLE " . $plugin_prefix . "gd_place_detail ( |
|
449 | + // Table for storing place attribute - these are user defined |
|
450 | + $post_detail = "CREATE TABLE " . $plugin_prefix . "gd_place_detail ( |
|
451 | 451 | post_id int(11) NOT NULL, |
452 | 452 | post_title text NULL DEFAULT NULL, |
453 | 453 | post_status varchar(20) NULL DEFAULT NULL, |
@@ -473,22 +473,22 @@ discard block |
||
473 | 473 | PRIMARY KEY (post_id) |
474 | 474 | ) $collate "; |
475 | 475 | |
476 | - /** |
|
477 | - * Filter the SQL query that creates/updates the post_detail DB table structure. |
|
478 | - * |
|
479 | - * @since 1.0.0 |
|
480 | - * @param string $sql The SQL insert query string. |
|
481 | - */ |
|
482 | - $post_detail = apply_filters('geodir_before_post_detail_table_create', $post_detail); |
|
476 | + /** |
|
477 | + * Filter the SQL query that creates/updates the post_detail DB table structure. |
|
478 | + * |
|
479 | + * @since 1.0.0 |
|
480 | + * @param string $sql The SQL insert query string. |
|
481 | + */ |
|
482 | + $post_detail = apply_filters('geodir_before_post_detail_table_create', $post_detail); |
|
483 | 483 | |
484 | - dbDelta($post_detail); |
|
484 | + dbDelta($post_detail); |
|
485 | 485 | |
486 | - // alter post_title |
|
487 | - //$wpdb->query("ALTER TABLE ".$wpdb->prefix."geodir_gd_place_detail MODIFY `post_title` text NULL"); |
|
486 | + // alter post_title |
|
487 | + //$wpdb->query("ALTER TABLE ".$wpdb->prefix."geodir_gd_place_detail MODIFY `post_title` text NULL"); |
|
488 | 488 | |
489 | - // Table for storing place images - these are user defined |
|
489 | + // Table for storing place images - these are user defined |
|
490 | 490 | |
491 | - $attechment_table = "CREATE TABLE " . GEODIR_ATTACHMENT_TABLE . " ( |
|
491 | + $attechment_table = "CREATE TABLE " . GEODIR_ATTACHMENT_TABLE . " ( |
|
492 | 492 | ID int(11) NOT NULL AUTO_INCREMENT, |
493 | 493 | post_id int(11) NOT NULL, |
494 | 494 | user_id int(11) DEFAULT NULL, |
@@ -504,18 +504,18 @@ discard block |
||
504 | 504 | PRIMARY KEY (ID) |
505 | 505 | ) $collate "; |
506 | 506 | |
507 | - /** |
|
508 | - * Filter the SQL query that creates/updates the attachments DB table structure. |
|
509 | - * |
|
510 | - * @since 1.0.0 |
|
511 | - * @param string $sql The SQL insert query string. |
|
512 | - */ |
|
513 | - $attechment_table = apply_filters('geodir_before_attachment_table_create', $attechment_table); |
|
507 | + /** |
|
508 | + * Filter the SQL query that creates/updates the attachments DB table structure. |
|
509 | + * |
|
510 | + * @since 1.0.0 |
|
511 | + * @param string $sql The SQL insert query string. |
|
512 | + */ |
|
513 | + $attechment_table = apply_filters('geodir_before_attachment_table_create', $attechment_table); |
|
514 | 514 | |
515 | - dbDelta($attechment_table); |
|
515 | + dbDelta($attechment_table); |
|
516 | 516 | |
517 | 517 | |
518 | - $custom_sort_fields_table = "CREATE TABLE " . GEODIR_CUSTOM_SORT_FIELDS_TABLE . " ( |
|
518 | + $custom_sort_fields_table = "CREATE TABLE " . GEODIR_CUSTOM_SORT_FIELDS_TABLE . " ( |
|
519 | 519 | id int(11) NOT NULL AUTO_INCREMENT, |
520 | 520 | post_type varchar(255) NOT NULL, |
521 | 521 | data_type varchar(255) NOT NULL, |
@@ -533,18 +533,18 @@ discard block |
||
533 | 533 | PRIMARY KEY (id) |
534 | 534 | ) $collate "; |
535 | 535 | |
536 | - /** |
|
537 | - * Filter the SQL query that creates/updates the custom_sort_fields DB table structure. |
|
538 | - * |
|
539 | - * @since 1.0.0 |
|
540 | - * @param string $sql The SQL insert query string. |
|
541 | - */ |
|
542 | - $custom_sort_fields_table = apply_filters('geodir_before_sort_fields_table_create', $custom_sort_fields_table); |
|
536 | + /** |
|
537 | + * Filter the SQL query that creates/updates the custom_sort_fields DB table structure. |
|
538 | + * |
|
539 | + * @since 1.0.0 |
|
540 | + * @param string $sql The SQL insert query string. |
|
541 | + */ |
|
542 | + $custom_sort_fields_table = apply_filters('geodir_before_sort_fields_table_create', $custom_sort_fields_table); |
|
543 | 543 | |
544 | - dbDelta($custom_sort_fields_table); |
|
544 | + dbDelta($custom_sort_fields_table); |
|
545 | 545 | |
546 | 546 | |
547 | - $review_table = "CREATE TABLE " . GEODIR_REVIEW_TABLE . " ( |
|
547 | + $review_table = "CREATE TABLE " . GEODIR_REVIEW_TABLE . " ( |
|
548 | 548 | id int(11) NOT NULL AUTO_INCREMENT, |
549 | 549 | post_id int(11) DEFAULT NULL, |
550 | 550 | post_title varchar( 255 ) NULL DEFAULT NULL, |
@@ -568,191 +568,191 @@ discard block |
||
568 | 568 | PRIMARY KEY (id) |
569 | 569 | ) $collate "; |
570 | 570 | |
571 | - /** |
|
572 | - * Filter the SQL query that creates the review DB table structure. |
|
573 | - * |
|
574 | - * @since 1.0.0 |
|
575 | - * @param string $sql The SQL insert query string. |
|
576 | - */ |
|
577 | - $review_table = apply_filters('geodir_before_review_table_create', $review_table); |
|
578 | - dbDelta($review_table); |
|
571 | + /** |
|
572 | + * Filter the SQL query that creates the review DB table structure. |
|
573 | + * |
|
574 | + * @since 1.0.0 |
|
575 | + * @param string $sql The SQL insert query string. |
|
576 | + */ |
|
577 | + $review_table = apply_filters('geodir_before_review_table_create', $review_table); |
|
578 | + dbDelta($review_table); |
|
579 | 579 | |
580 | 580 | |
581 | 581 | |
582 | - // Alter terms table |
|
583 | - $term_icon_column = $wpdb->get_var("SHOW COLUMNS FROM $wpdb->terms where field='term_icon'"); |
|
584 | - if (!$term_icon_column) { |
|
585 | - $wpdb->query("ALTER TABLE $wpdb->terms ADD `term_icon` TEXT NULL DEFAULT NULL"); |
|
586 | - } |
|
582 | + // Alter terms table |
|
583 | + $term_icon_column = $wpdb->get_var("SHOW COLUMNS FROM $wpdb->terms where field='term_icon'"); |
|
584 | + if (!$term_icon_column) { |
|
585 | + $wpdb->query("ALTER TABLE $wpdb->terms ADD `term_icon` TEXT NULL DEFAULT NULL"); |
|
586 | + } |
|
587 | 587 | |
588 | - //require_once(geodir_plugin_path() . '/upgrade.php'); |
|
588 | + //require_once(geodir_plugin_path() . '/upgrade.php'); |
|
589 | 589 | |
590 | 590 | |
591 | - } |
|
591 | + } |
|
592 | 592 | } // END MAIN FUNCTION geodir_tables_install |
593 | 593 | |
594 | 594 | if (!function_exists('geodir_create_default_fields')) { |
595 | - /** |
|
596 | - * Inserts default custom fields table data into database. |
|
597 | - * |
|
598 | - * @since 1.0.0 |
|
599 | - * @package GeoDirectory |
|
600 | - */ |
|
601 | - function geodir_create_default_fields() |
|
602 | - { |
|
603 | - |
|
604 | - $fields = array(); |
|
605 | - |
|
606 | - $fields[] = array('listing_type' => 'gd_place', |
|
607 | - 'data_type' => 'VARCHAR', |
|
608 | - 'field_type' => 'taxonomy', |
|
609 | - 'admin_title' => __('Category', 'geodirectory'), |
|
610 | - 'admin_desc' => __('SELECT listing category FROM here. SELECT at least one CATEGORY', 'geodirectory'), |
|
611 | - 'site_title' => __('Category', 'geodirectory'), |
|
612 | - 'htmlvar_name' => 'gd_placecategory', |
|
613 | - 'default_value' => '', |
|
614 | - 'is_default' => '1', |
|
615 | - 'is_admin' => '1', |
|
616 | - 'is_required' => '1', |
|
617 | - 'clabels' => __('Category', 'geodirectory')); |
|
618 | - |
|
619 | - $fields[] = array('listing_type' => 'gd_place', |
|
620 | - 'data_type' => 'VARCHAR', |
|
621 | - 'field_type' => 'address', |
|
622 | - 'admin_title' => __('Address', 'geodirectory'), |
|
623 | - 'admin_desc' => ADDRESS_MSG, |
|
624 | - 'site_title' => __('Address', 'geodirectory'), |
|
625 | - 'htmlvar_name' => 'post', |
|
626 | - 'default_value' => '', |
|
627 | - 'option_values' => '', |
|
628 | - 'is_default' => '1', |
|
629 | - 'is_admin' => '1', |
|
630 | - 'is_required' => '1', |
|
631 | - 'required_msg' => __('Address fields are required', 'geodirectory'), |
|
632 | - 'clabels' => __('Address', 'geodirectory'), |
|
633 | - 'extra' => array('show_city' => 1, 'city_lable' => __('City', 'geodirectory'), |
|
634 | - 'show_region' => 1, 'region_lable' => __('Region', 'geodirectory'), |
|
635 | - 'show_country' => 1, 'country_lable' => __('Country', 'geodirectory'), |
|
636 | - 'show_zip' => 1, 'zip_lable' => __('Zip/Post Code', 'geodirectory'), |
|
637 | - 'show_map' => 1, 'map_lable' => __('Set Address On Map', 'geodirectory'), |
|
638 | - 'show_mapview' => 1, 'mapview_lable' => __('Select Map View', 'geodirectory'), |
|
639 | - 'show_mapzoom' => 1, 'mapzoom_lable' => 'hidden', |
|
640 | - 'show_latlng' => 1)); |
|
641 | - |
|
642 | - $fields[] = array('listing_type' => 'gd_place', |
|
643 | - 'data_type' => 'VARCHAR', |
|
644 | - 'field_type' => 'text', |
|
645 | - 'admin_title' => __('Time', 'geodirectory'), |
|
646 | - 'admin_desc' => __('Enter Business or Listing Timing Information.<br/>eg. : 10.00 am to 6 pm every day', 'geodirectory'), |
|
647 | - 'site_title' => __('Time', 'geodirectory'), |
|
648 | - 'htmlvar_name' => 'timing', |
|
649 | - 'default_value' => '', |
|
650 | - 'option_values' => '', |
|
651 | - 'is_default' => '1', |
|
652 | - 'is_admin' => '1', |
|
653 | - 'clabels' => __('Time', 'geodirectory')); |
|
654 | - |
|
655 | - $fields[] = array('listing_type' => 'gd_place', |
|
656 | - 'data_type' => 'VARCHAR', |
|
657 | - 'field_type' => 'phone', |
|
658 | - 'admin_title' => __('Phone', 'geodirectory'), |
|
659 | - 'admin_desc' => __('You can enter phone number,cell phone number etc.', 'geodirectory'), |
|
660 | - 'site_title' => __('Phone', 'geodirectory'), |
|
661 | - 'htmlvar_name' => 'contact', |
|
662 | - 'default_value' => '', |
|
663 | - 'option_values' => '', |
|
664 | - 'is_default' => '1', |
|
665 | - 'is_admin' => '1', |
|
666 | - 'clabels' => __('Phone', 'geodirectory')); |
|
667 | - |
|
668 | - $fields[] = array('listing_type' => 'gd_place', |
|
669 | - 'data_type' => 'VARCHAR', |
|
670 | - 'field_type' => 'email', |
|
671 | - 'admin_title' => __('Email', 'geodirectory'), |
|
672 | - 'admin_desc' => __('You can enter your business or listing email.', 'geodirectory'), |
|
673 | - 'site_title' => __('Email', 'geodirectory'), |
|
674 | - 'htmlvar_name' => 'email', |
|
675 | - 'default_value' => '', |
|
676 | - 'option_values' => '', |
|
677 | - 'is_default' => '1', |
|
678 | - 'is_admin' => '1', |
|
679 | - 'clabels' => __('Email', 'geodirectory')); |
|
680 | - |
|
681 | - $fields[] = array('listing_type' => 'gd_place', |
|
682 | - 'data_type' => 'VARCHAR', |
|
683 | - 'field_type' => 'url', |
|
684 | - 'admin_title' => __('Website', 'geodirectory'), |
|
685 | - 'admin_desc' => __('You can enter your business or listing website.', 'geodirectory'), |
|
686 | - 'site_title' => __('Website', 'geodirectory'), |
|
687 | - 'htmlvar_name' => 'website', |
|
688 | - 'default_value' => '', |
|
689 | - 'option_values' => '', |
|
690 | - 'is_default' => '1', |
|
691 | - 'is_admin' => '1', |
|
692 | - 'clabels' => __('Website', 'geodirectory')); |
|
693 | - |
|
694 | - $fields[] = array('listing_type' => 'gd_place', |
|
695 | - 'data_type' => 'VARCHAR', |
|
696 | - 'field_type' => 'url', |
|
697 | - 'admin_title' => __('Twitter', 'geodirectory'), |
|
698 | - 'admin_desc' => __('You can enter your business or listing twitter url.', 'geodirectory'), |
|
699 | - 'site_title' => __('Twitter', 'geodirectory'), |
|
700 | - 'htmlvar_name' => 'twitter', |
|
701 | - 'default_value' => '', |
|
702 | - 'option_values' => '', |
|
703 | - 'is_default' => '1', |
|
704 | - 'is_admin' => '1', |
|
705 | - 'clabels' => __('Twitter', 'geodirectory')); |
|
706 | - |
|
707 | - $fields[] = array('listing_type' => 'gd_place', |
|
708 | - 'data_type' => 'VARCHAR', |
|
709 | - 'field_type' => 'url', |
|
710 | - 'admin_title' => __('Facebook', 'geodirectory'), |
|
711 | - 'admin_desc' => __('You can enter your business or listing facebook url.', 'geodirectory'), |
|
712 | - 'site_title' => __('Facebook', 'geodirectory'), |
|
713 | - 'htmlvar_name' => 'facebook', |
|
714 | - 'default_value' => '', |
|
715 | - 'option_values' => '', |
|
716 | - 'is_default' => '1', |
|
717 | - 'is_admin' => '1', |
|
718 | - 'clabels' => __('Facebook', 'geodirectory')); |
|
719 | - |
|
720 | - $fields[] = array('listing_type' => 'gd_place', |
|
721 | - 'data_type' => 'TEXT', |
|
722 | - 'field_type' => 'textarea', |
|
723 | - 'admin_title' => __('Video', 'geodirectory'), |
|
724 | - 'admin_desc' => __('Add video code here, YouTube etc.', 'geodirectory'), |
|
725 | - 'site_title' => __('Video', 'geodirectory'), |
|
726 | - 'htmlvar_name' => 'video', |
|
727 | - 'default_value' => '', |
|
728 | - 'option_values' => '', |
|
729 | - 'is_default' => '0', |
|
730 | - 'is_admin' => '1', |
|
731 | - 'clabels' => __('Video', 'geodirectory')); |
|
732 | - |
|
733 | - $fields[] = array('listing_type' => 'gd_place', |
|
734 | - 'data_type' => 'TEXT', |
|
735 | - 'field_type' => 'textarea', |
|
736 | - 'admin_title' => __('Special Offers', 'geodirectory'), |
|
737 | - 'admin_desc' => __('Note: List out any special offers (optional)', 'geodirectory'), |
|
738 | - 'site_title' => __('Special Offers', 'geodirectory'), |
|
739 | - 'htmlvar_name' => 'special_offers', |
|
740 | - 'default_value' => '', |
|
741 | - 'option_values' => '', |
|
742 | - 'is_default' => '0', |
|
743 | - 'is_admin' => '1', |
|
744 | - 'clabels' => __('Special Offers', 'geodirectory')); |
|
745 | - |
|
746 | - /** |
|
747 | - * Filter the array of default custom fields DB table data. |
|
748 | - * |
|
749 | - * @since 1.0.0 |
|
750 | - * @param string $fields The default custom fields as an array. |
|
751 | - */ |
|
752 | - $fields = apply_filters('geodir_before_default_custom_fields_saved', $fields); |
|
753 | - foreach ($fields as $field_index => $field) { |
|
754 | - geodir_custom_field_save($field); |
|
755 | - |
|
756 | - } |
|
757 | - } |
|
595 | + /** |
|
596 | + * Inserts default custom fields table data into database. |
|
597 | + * |
|
598 | + * @since 1.0.0 |
|
599 | + * @package GeoDirectory |
|
600 | + */ |
|
601 | + function geodir_create_default_fields() |
|
602 | + { |
|
603 | + |
|
604 | + $fields = array(); |
|
605 | + |
|
606 | + $fields[] = array('listing_type' => 'gd_place', |
|
607 | + 'data_type' => 'VARCHAR', |
|
608 | + 'field_type' => 'taxonomy', |
|
609 | + 'admin_title' => __('Category', 'geodirectory'), |
|
610 | + 'admin_desc' => __('SELECT listing category FROM here. SELECT at least one CATEGORY', 'geodirectory'), |
|
611 | + 'site_title' => __('Category', 'geodirectory'), |
|
612 | + 'htmlvar_name' => 'gd_placecategory', |
|
613 | + 'default_value' => '', |
|
614 | + 'is_default' => '1', |
|
615 | + 'is_admin' => '1', |
|
616 | + 'is_required' => '1', |
|
617 | + 'clabels' => __('Category', 'geodirectory')); |
|
618 | + |
|
619 | + $fields[] = array('listing_type' => 'gd_place', |
|
620 | + 'data_type' => 'VARCHAR', |
|
621 | + 'field_type' => 'address', |
|
622 | + 'admin_title' => __('Address', 'geodirectory'), |
|
623 | + 'admin_desc' => ADDRESS_MSG, |
|
624 | + 'site_title' => __('Address', 'geodirectory'), |
|
625 | + 'htmlvar_name' => 'post', |
|
626 | + 'default_value' => '', |
|
627 | + 'option_values' => '', |
|
628 | + 'is_default' => '1', |
|
629 | + 'is_admin' => '1', |
|
630 | + 'is_required' => '1', |
|
631 | + 'required_msg' => __('Address fields are required', 'geodirectory'), |
|
632 | + 'clabels' => __('Address', 'geodirectory'), |
|
633 | + 'extra' => array('show_city' => 1, 'city_lable' => __('City', 'geodirectory'), |
|
634 | + 'show_region' => 1, 'region_lable' => __('Region', 'geodirectory'), |
|
635 | + 'show_country' => 1, 'country_lable' => __('Country', 'geodirectory'), |
|
636 | + 'show_zip' => 1, 'zip_lable' => __('Zip/Post Code', 'geodirectory'), |
|
637 | + 'show_map' => 1, 'map_lable' => __('Set Address On Map', 'geodirectory'), |
|
638 | + 'show_mapview' => 1, 'mapview_lable' => __('Select Map View', 'geodirectory'), |
|
639 | + 'show_mapzoom' => 1, 'mapzoom_lable' => 'hidden', |
|
640 | + 'show_latlng' => 1)); |
|
641 | + |
|
642 | + $fields[] = array('listing_type' => 'gd_place', |
|
643 | + 'data_type' => 'VARCHAR', |
|
644 | + 'field_type' => 'text', |
|
645 | + 'admin_title' => __('Time', 'geodirectory'), |
|
646 | + 'admin_desc' => __('Enter Business or Listing Timing Information.<br/>eg. : 10.00 am to 6 pm every day', 'geodirectory'), |
|
647 | + 'site_title' => __('Time', 'geodirectory'), |
|
648 | + 'htmlvar_name' => 'timing', |
|
649 | + 'default_value' => '', |
|
650 | + 'option_values' => '', |
|
651 | + 'is_default' => '1', |
|
652 | + 'is_admin' => '1', |
|
653 | + 'clabels' => __('Time', 'geodirectory')); |
|
654 | + |
|
655 | + $fields[] = array('listing_type' => 'gd_place', |
|
656 | + 'data_type' => 'VARCHAR', |
|
657 | + 'field_type' => 'phone', |
|
658 | + 'admin_title' => __('Phone', 'geodirectory'), |
|
659 | + 'admin_desc' => __('You can enter phone number,cell phone number etc.', 'geodirectory'), |
|
660 | + 'site_title' => __('Phone', 'geodirectory'), |
|
661 | + 'htmlvar_name' => 'contact', |
|
662 | + 'default_value' => '', |
|
663 | + 'option_values' => '', |
|
664 | + 'is_default' => '1', |
|
665 | + 'is_admin' => '1', |
|
666 | + 'clabels' => __('Phone', 'geodirectory')); |
|
667 | + |
|
668 | + $fields[] = array('listing_type' => 'gd_place', |
|
669 | + 'data_type' => 'VARCHAR', |
|
670 | + 'field_type' => 'email', |
|
671 | + 'admin_title' => __('Email', 'geodirectory'), |
|
672 | + 'admin_desc' => __('You can enter your business or listing email.', 'geodirectory'), |
|
673 | + 'site_title' => __('Email', 'geodirectory'), |
|
674 | + 'htmlvar_name' => 'email', |
|
675 | + 'default_value' => '', |
|
676 | + 'option_values' => '', |
|
677 | + 'is_default' => '1', |
|
678 | + 'is_admin' => '1', |
|
679 | + 'clabels' => __('Email', 'geodirectory')); |
|
680 | + |
|
681 | + $fields[] = array('listing_type' => 'gd_place', |
|
682 | + 'data_type' => 'VARCHAR', |
|
683 | + 'field_type' => 'url', |
|
684 | + 'admin_title' => __('Website', 'geodirectory'), |
|
685 | + 'admin_desc' => __('You can enter your business or listing website.', 'geodirectory'), |
|
686 | + 'site_title' => __('Website', 'geodirectory'), |
|
687 | + 'htmlvar_name' => 'website', |
|
688 | + 'default_value' => '', |
|
689 | + 'option_values' => '', |
|
690 | + 'is_default' => '1', |
|
691 | + 'is_admin' => '1', |
|
692 | + 'clabels' => __('Website', 'geodirectory')); |
|
693 | + |
|
694 | + $fields[] = array('listing_type' => 'gd_place', |
|
695 | + 'data_type' => 'VARCHAR', |
|
696 | + 'field_type' => 'url', |
|
697 | + 'admin_title' => __('Twitter', 'geodirectory'), |
|
698 | + 'admin_desc' => __('You can enter your business or listing twitter url.', 'geodirectory'), |
|
699 | + 'site_title' => __('Twitter', 'geodirectory'), |
|
700 | + 'htmlvar_name' => 'twitter', |
|
701 | + 'default_value' => '', |
|
702 | + 'option_values' => '', |
|
703 | + 'is_default' => '1', |
|
704 | + 'is_admin' => '1', |
|
705 | + 'clabels' => __('Twitter', 'geodirectory')); |
|
706 | + |
|
707 | + $fields[] = array('listing_type' => 'gd_place', |
|
708 | + 'data_type' => 'VARCHAR', |
|
709 | + 'field_type' => 'url', |
|
710 | + 'admin_title' => __('Facebook', 'geodirectory'), |
|
711 | + 'admin_desc' => __('You can enter your business or listing facebook url.', 'geodirectory'), |
|
712 | + 'site_title' => __('Facebook', 'geodirectory'), |
|
713 | + 'htmlvar_name' => 'facebook', |
|
714 | + 'default_value' => '', |
|
715 | + 'option_values' => '', |
|
716 | + 'is_default' => '1', |
|
717 | + 'is_admin' => '1', |
|
718 | + 'clabels' => __('Facebook', 'geodirectory')); |
|
719 | + |
|
720 | + $fields[] = array('listing_type' => 'gd_place', |
|
721 | + 'data_type' => 'TEXT', |
|
722 | + 'field_type' => 'textarea', |
|
723 | + 'admin_title' => __('Video', 'geodirectory'), |
|
724 | + 'admin_desc' => __('Add video code here, YouTube etc.', 'geodirectory'), |
|
725 | + 'site_title' => __('Video', 'geodirectory'), |
|
726 | + 'htmlvar_name' => 'video', |
|
727 | + 'default_value' => '', |
|
728 | + 'option_values' => '', |
|
729 | + 'is_default' => '0', |
|
730 | + 'is_admin' => '1', |
|
731 | + 'clabels' => __('Video', 'geodirectory')); |
|
732 | + |
|
733 | + $fields[] = array('listing_type' => 'gd_place', |
|
734 | + 'data_type' => 'TEXT', |
|
735 | + 'field_type' => 'textarea', |
|
736 | + 'admin_title' => __('Special Offers', 'geodirectory'), |
|
737 | + 'admin_desc' => __('Note: List out any special offers (optional)', 'geodirectory'), |
|
738 | + 'site_title' => __('Special Offers', 'geodirectory'), |
|
739 | + 'htmlvar_name' => 'special_offers', |
|
740 | + 'default_value' => '', |
|
741 | + 'option_values' => '', |
|
742 | + 'is_default' => '0', |
|
743 | + 'is_admin' => '1', |
|
744 | + 'clabels' => __('Special Offers', 'geodirectory')); |
|
745 | + |
|
746 | + /** |
|
747 | + * Filter the array of default custom fields DB table data. |
|
748 | + * |
|
749 | + * @since 1.0.0 |
|
750 | + * @param string $fields The default custom fields as an array. |
|
751 | + */ |
|
752 | + $fields = apply_filters('geodir_before_default_custom_fields_saved', $fields); |
|
753 | + foreach ($fields as $field_index => $field) { |
|
754 | + geodir_custom_field_save($field); |
|
755 | + |
|
756 | + } |
|
757 | + } |
|
758 | 758 | } |
759 | 759 | \ No newline at end of file |
@@ -23,8 +23,12 @@ |
||
23 | 23 | |
24 | 24 | $collate = ''; |
25 | 25 | if ($wpdb->has_cap('collation')) { |
26 | - if (!empty($wpdb->charset)) $collate = "DEFAULT CHARACTER SET $wpdb->charset"; |
|
27 | - if (!empty($wpdb->collate)) $collate .= " COLLATE $wpdb->collate"; |
|
26 | + if (!empty($wpdb->charset)) { |
|
27 | + $collate = "DEFAULT CHARACTER SET $wpdb->charset"; |
|
28 | + } |
|
29 | + if (!empty($wpdb->collate)) { |
|
30 | + $collate .= " COLLATE $wpdb->collate"; |
|
31 | + } |
|
28 | 32 | } |
29 | 33 | |
30 | 34 | /** |
@@ -1,12 +1,12 @@ discard block |
||
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. |
@@ -24,8 +24,8 @@ discard block |
||
24 | 24 | function geodir_activation() |
25 | 25 | { |
26 | 26 | |
27 | - geodir_install(); |
|
28 | - add_action('wp_loaded', 'geodir_flush_activation'); |
|
27 | + geodir_install(); |
|
28 | + add_action('wp_loaded', 'geodir_flush_activation'); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | /** |
@@ -36,9 +36,9 @@ discard block |
||
36 | 36 | */ |
37 | 37 | function geodir_flush_activation() |
38 | 38 | { |
39 | - // Remove rewrite rules and then recreate rewrite rules. |
|
40 | - // flush late so everything is loaded |
|
41 | - flush_rewrite_rules(); |
|
39 | + // Remove rewrite rules and then recreate rewrite rules. |
|
40 | + // flush late so everything is loaded |
|
41 | + flush_rewrite_rules(); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | /** |
@@ -50,44 +50,44 @@ discard block |
||
50 | 50 | */ |
51 | 51 | function geodir_install() |
52 | 52 | { |
53 | - global $geodir_settings; |
|
54 | - |
|
55 | - /** |
|
56 | - * Called before the GD installation scripts have run. |
|
57 | - * |
|
58 | - * @since 1.0.0 |
|
59 | - * @see 'geodir_installation_end' |
|
60 | - */ |
|
61 | - do_action('geodir_installation_start'); |
|
62 | - |
|
63 | - // Do install |
|
64 | - if (!get_option('geodir_default_data_installed')) { |
|
65 | - geodir_create_tables(); // in admin db install.php |
|
66 | - geodir_register_defaults(); // geodir_functions/ taxonomy_functions.php |
|
67 | - geodir_create_default_fields(); |
|
68 | - //geodir_default_taxonomies(); |
|
69 | - geodir_set_default_options(); |
|
70 | - geodir_create_pages(); |
|
71 | - geodir_set_default_widgets(); |
|
72 | - gd_install_theme_compat(); |
|
73 | - |
|
74 | - update_option('geodir_default_data_installed', 1); |
|
75 | - |
|
76 | - } |
|
77 | - |
|
78 | - if (!get_option('geodir_default_data_installed_1.2.8')) { |
|
79 | - //geodir_create_tables(); // in admin db install.php |
|
80 | - update_option('geodir_default_data_installed_1.2.8', 1); |
|
81 | - } |
|
82 | - |
|
83 | - geodir_installation_end(); |
|
84 | - /** |
|
85 | - * Called after the GD installation scripts have run. |
|
86 | - * |
|
87 | - * @since 1.0.0 |
|
88 | - * @see 'geodir_installation_start' |
|
89 | - */ |
|
90 | - do_action('geodir_installation_end'); |
|
53 | + global $geodir_settings; |
|
54 | + |
|
55 | + /** |
|
56 | + * Called before the GD installation scripts have run. |
|
57 | + * |
|
58 | + * @since 1.0.0 |
|
59 | + * @see 'geodir_installation_end' |
|
60 | + */ |
|
61 | + do_action('geodir_installation_start'); |
|
62 | + |
|
63 | + // Do install |
|
64 | + if (!get_option('geodir_default_data_installed')) { |
|
65 | + geodir_create_tables(); // in admin db install.php |
|
66 | + geodir_register_defaults(); // geodir_functions/ taxonomy_functions.php |
|
67 | + geodir_create_default_fields(); |
|
68 | + //geodir_default_taxonomies(); |
|
69 | + geodir_set_default_options(); |
|
70 | + geodir_create_pages(); |
|
71 | + geodir_set_default_widgets(); |
|
72 | + gd_install_theme_compat(); |
|
73 | + |
|
74 | + update_option('geodir_default_data_installed', 1); |
|
75 | + |
|
76 | + } |
|
77 | + |
|
78 | + if (!get_option('geodir_default_data_installed_1.2.8')) { |
|
79 | + //geodir_create_tables(); // in admin db install.php |
|
80 | + update_option('geodir_default_data_installed_1.2.8', 1); |
|
81 | + } |
|
82 | + |
|
83 | + geodir_installation_end(); |
|
84 | + /** |
|
85 | + * Called after the GD installation scripts have run. |
|
86 | + * |
|
87 | + * @since 1.0.0 |
|
88 | + * @see 'geodir_installation_start' |
|
89 | + */ |
|
90 | + do_action('geodir_installation_end'); |
|
91 | 91 | |
92 | 92 | |
93 | 93 | } |
@@ -104,16 +104,16 @@ discard block |
||
104 | 104 | function geodir_create_pages() |
105 | 105 | { |
106 | 106 | |
107 | - //geodir_create_page( esc_sql( _x('home-map', 'page_slug', 'geodirectory') ), 'geodir_home_map_page', __('Home Map', 'geodirectory'), '',0,'publish' ); |
|
108 | - geodir_create_page(esc_sql(_x('gd-home', 'page_slug', 'geodirectory')), 'geodir_home_page', __('GD Home page', 'geodirectory'), ''); |
|
109 | - geodir_create_page(esc_sql(_x('add-listing', 'page_slug', 'geodirectory')), 'geodir_add_listing_page', __('Add Listing', 'geodirectory'), ''); |
|
110 | - geodir_create_page(esc_sql(_x('listing-preview', 'page_slug', 'geodirectory')), 'geodir_preview_page', __('Listing Preview', 'geodirectory'), ''); |
|
111 | - geodir_create_page(esc_sql(_x('listing-success', 'page_slug', 'geodirectory')), 'geodir_success_page', __('Listing Success', 'geodirectory'), ''); |
|
112 | - geodir_create_page(esc_sql(_x('location', 'page_slug', 'geodirectory')), 'geodir_location_page', __('Location', 'geodirectory'), ''); |
|
107 | + //geodir_create_page( esc_sql( _x('home-map', 'page_slug', 'geodirectory') ), 'geodir_home_map_page', __('Home Map', 'geodirectory'), '',0,'publish' ); |
|
108 | + geodir_create_page(esc_sql(_x('gd-home', 'page_slug', 'geodirectory')), 'geodir_home_page', __('GD Home page', 'geodirectory'), ''); |
|
109 | + geodir_create_page(esc_sql(_x('add-listing', 'page_slug', 'geodirectory')), 'geodir_add_listing_page', __('Add Listing', 'geodirectory'), ''); |
|
110 | + geodir_create_page(esc_sql(_x('listing-preview', 'page_slug', 'geodirectory')), 'geodir_preview_page', __('Listing Preview', 'geodirectory'), ''); |
|
111 | + geodir_create_page(esc_sql(_x('listing-success', 'page_slug', 'geodirectory')), 'geodir_success_page', __('Listing Success', 'geodirectory'), ''); |
|
112 | + geodir_create_page(esc_sql(_x('location', 'page_slug', 'geodirectory')), 'geodir_location_page', __('Location', 'geodirectory'), ''); |
|
113 | 113 | |
114 | - //New since 1.5.3 |
|
115 | - geodir_create_page(esc_sql(_x('gd-info', 'page_slug', 'geodirectory')), 'geodir_info_page', __('Info', 'geodirectory'), ''); |
|
116 | - geodir_create_page(esc_sql(_x('gd-login', 'page_slug', 'geodirectory')), 'geodir_login_page', __('Login', 'geodirectory'), ''); |
|
114 | + //New since 1.5.3 |
|
115 | + geodir_create_page(esc_sql(_x('gd-info', 'page_slug', 'geodirectory')), 'geodir_info_page', __('Info', 'geodirectory'), ''); |
|
116 | + geodir_create_page(esc_sql(_x('gd-login', 'page_slug', 'geodirectory')), 'geodir_login_page', __('Login', 'geodirectory'), ''); |
|
117 | 117 | |
118 | 118 | |
119 | 119 | } |
@@ -129,11 +129,11 @@ discard block |
||
129 | 129 | */ |
130 | 130 | function geodir_installation_end() |
131 | 131 | { |
132 | - //update_option( "geodir_db_version", GEODIRECTORY_VERSION ); |
|
132 | + //update_option( "geodir_db_version", GEODIRECTORY_VERSION ); |
|
133 | 133 | |
134 | - update_option("geodir_installed", 1); |
|
135 | - update_option("geodir_installation_redirect", 1); |
|
136 | - update_option('skip_install_geodir_pages', 0); |
|
134 | + update_option("geodir_installed", 1); |
|
135 | + update_option("geodir_installation_redirect", 1); |
|
136 | + update_option('skip_install_geodir_pages', 0); |
|
137 | 137 | } |
138 | 138 | |
139 | 139 | /** |
@@ -147,45 +147,45 @@ discard block |
||
147 | 147 | */ |
148 | 148 | function geodir_set_default_options() |
149 | 149 | { |
150 | - global $geodir_settings; |
|
151 | - /** |
|
152 | - * Contains settings array for general tab. |
|
153 | - * |
|
154 | - * @since 1.0.0 |
|
155 | - * @package GeoDirectory |
|
156 | - */ |
|
157 | - include_once("option-pages/general_settings_array.php"); |
|
158 | - /** |
|
159 | - * Contains settings array for design tab. |
|
160 | - * |
|
161 | - * @since 1.0.0 |
|
162 | - * @package GeoDirectory |
|
163 | - */ |
|
164 | - include_once("option-pages/design_settings_array.php"); |
|
165 | - /** |
|
166 | - * Contains settings array for notifications tab. |
|
167 | - * |
|
168 | - * @since 1.0.0 |
|
169 | - * @package GeoDirectory |
|
170 | - */ |
|
171 | - include_once("option-pages/notifications_settings_array.php"); |
|
172 | - /** |
|
173 | - * Contains settings array for permalink tab. |
|
174 | - * |
|
175 | - * @since 1.0.0 |
|
176 | - * @package GeoDirectory |
|
177 | - */ |
|
178 | - include_once("option-pages/permalink_settings_array.php"); |
|
179 | - /** |
|
180 | - * Contains settings array for title / meta tab. |
|
181 | - * |
|
182 | - * @since 1.5.4 |
|
183 | - * @package GeoDirectory |
|
184 | - */ |
|
185 | - include_once("option-pages/title_meta_settings_array.php"); |
|
186 | - foreach ($geodir_settings as $value) { |
|
187 | - geodir_update_options($value, true); |
|
188 | - } |
|
150 | + global $geodir_settings; |
|
151 | + /** |
|
152 | + * Contains settings array for general tab. |
|
153 | + * |
|
154 | + * @since 1.0.0 |
|
155 | + * @package GeoDirectory |
|
156 | + */ |
|
157 | + include_once("option-pages/general_settings_array.php"); |
|
158 | + /** |
|
159 | + * Contains settings array for design tab. |
|
160 | + * |
|
161 | + * @since 1.0.0 |
|
162 | + * @package GeoDirectory |
|
163 | + */ |
|
164 | + include_once("option-pages/design_settings_array.php"); |
|
165 | + /** |
|
166 | + * Contains settings array for notifications tab. |
|
167 | + * |
|
168 | + * @since 1.0.0 |
|
169 | + * @package GeoDirectory |
|
170 | + */ |
|
171 | + include_once("option-pages/notifications_settings_array.php"); |
|
172 | + /** |
|
173 | + * Contains settings array for permalink tab. |
|
174 | + * |
|
175 | + * @since 1.0.0 |
|
176 | + * @package GeoDirectory |
|
177 | + */ |
|
178 | + include_once("option-pages/permalink_settings_array.php"); |
|
179 | + /** |
|
180 | + * Contains settings array for title / meta tab. |
|
181 | + * |
|
182 | + * @since 1.5.4 |
|
183 | + * @package GeoDirectory |
|
184 | + */ |
|
185 | + include_once("option-pages/title_meta_settings_array.php"); |
|
186 | + foreach ($geodir_settings as $value) { |
|
187 | + geodir_update_options($value, true); |
|
188 | + } |
|
189 | 189 | |
190 | 190 | } |
191 | 191 | |
@@ -199,103 +199,103 @@ discard block |
||
199 | 199 | function geodir_set_default_widgets() |
200 | 200 | { |
201 | 201 | |
202 | - $widget_option_list = array(); |
|
203 | - $widgetinfo = array(); |
|
204 | - $sidebarvalue_array = array(); |
|
205 | - $sidebars_widgets = array(); |
|
202 | + $widget_option_list = array(); |
|
203 | + $widgetinfo = array(); |
|
204 | + $sidebarvalue_array = array(); |
|
205 | + $sidebars_widgets = array(); |
|
206 | 206 | |
207 | - /*===========================*/ |
|
208 | - /* Widgets ON HOME PAGE */ |
|
209 | - /*===========================*/ |
|
207 | + /*===========================*/ |
|
208 | + /* Widgets ON HOME PAGE */ |
|
209 | + /*===========================*/ |
|
210 | 210 | |
211 | - $widget_option_list['geodir_home_top'] = |
|
212 | - array('popular_post_category' => array("title" => __('Popular Categories', 'geodirectory')), |
|
213 | - 'geodir_map_v3_home_map' => array("autozoom" => 1, "width" => '100%', "heigh" => '425'), |
|
214 | - 'geodir_advance_search' => array()); |
|
211 | + $widget_option_list['geodir_home_top'] = |
|
212 | + array('popular_post_category' => array("title" => __('Popular Categories', 'geodirectory')), |
|
213 | + 'geodir_map_v3_home_map' => array("autozoom" => 1, "width" => '100%', "heigh" => '425'), |
|
214 | + 'geodir_advance_search' => array()); |
|
215 | 215 | |
216 | - $widget_option_list['geodir_home_content'] = |
|
217 | - array('popular_post_view' => array("title" => __('Popular Places', 'geodirectory'), "layout" => 'list', "add_location_filter" => '1')); |
|
216 | + $widget_option_list['geodir_home_content'] = |
|
217 | + array('popular_post_view' => array("title" => __('Popular Places', 'geodirectory'), "layout" => 'list', "add_location_filter" => '1')); |
|
218 | 218 | |
219 | - $widget_option_list['geodir_home_right'] = |
|
220 | - array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')), |
|
221 | - 'popular_post_view' => array("title" => __('Latest Places', 'geodirectory'), "add_location_filter" => '1')); |
|
219 | + $widget_option_list['geodir_home_right'] = |
|
220 | + array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')), |
|
221 | + 'popular_post_view' => array("title" => __('Latest Places', 'geodirectory'), "add_location_filter" => '1')); |
|
222 | 222 | |
223 | - /*===========================*/ |
|
224 | - /* Widgets ON LISTING PAGE */ |
|
225 | - /*===========================*/ |
|
223 | + /*===========================*/ |
|
224 | + /* Widgets ON LISTING PAGE */ |
|
225 | + /*===========================*/ |
|
226 | 226 | |
227 | - $widget_option_list['geodir_listing_top'] = |
|
228 | - array('popular_post_category' => array("title" => __('Popular Categories', 'geodirectory')), |
|
229 | - 'geodir_advance_search' => array()); |
|
227 | + $widget_option_list['geodir_listing_top'] = |
|
228 | + array('popular_post_category' => array("title" => __('Popular Categories', 'geodirectory')), |
|
229 | + 'geodir_advance_search' => array()); |
|
230 | 230 | |
231 | - $widget_option_list['geodir_listing_right_sidebar'] = |
|
232 | - array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')), |
|
233 | - 'geodir_map_v3_listing_map' => array("autozoom" => 1, "sticky" => 1), |
|
234 | - 'popular_post_view' => array("title" => __('Latest Places', 'geodirectory'), "add_location_filter" => '1')); |
|
231 | + $widget_option_list['geodir_listing_right_sidebar'] = |
|
232 | + array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')), |
|
233 | + 'geodir_map_v3_listing_map' => array("autozoom" => 1, "sticky" => 1), |
|
234 | + 'popular_post_view' => array("title" => __('Latest Places', 'geodirectory'), "add_location_filter" => '1')); |
|
235 | 235 | |
236 | 236 | |
237 | - /*===========================*/ |
|
238 | - /* Widgets ON SEARCH PAGE */ |
|
239 | - /*===========================*/ |
|
237 | + /*===========================*/ |
|
238 | + /* Widgets ON SEARCH PAGE */ |
|
239 | + /*===========================*/ |
|
240 | 240 | |
241 | - $widget_option_list['geodir_search_top'] = |
|
242 | - array('popular_post_category' => array("title" => __('Popular Categories', 'geodirectory')), |
|
243 | - 'geodir_advance_search' => array()); |
|
241 | + $widget_option_list['geodir_search_top'] = |
|
242 | + array('popular_post_category' => array("title" => __('Popular Categories', 'geodirectory')), |
|
243 | + 'geodir_advance_search' => array()); |
|
244 | 244 | |
245 | - $widget_option_list['geodir_search_right_sidebar'] = |
|
246 | - array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')), |
|
247 | - 'geodir_map_v3_listing_map' => array("autozoom" => 1, "sticky" => 1), |
|
248 | - 'popular_post_view' => array("title" => __('Latest Places', 'geodirectory'), "add_location_filter" => '1')); |
|
245 | + $widget_option_list['geodir_search_right_sidebar'] = |
|
246 | + array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')), |
|
247 | + 'geodir_map_v3_listing_map' => array("autozoom" => 1, "sticky" => 1), |
|
248 | + 'popular_post_view' => array("title" => __('Latest Places', 'geodirectory'), "add_location_filter" => '1')); |
|
249 | 249 | |
250 | - /*===========================*/ |
|
251 | - /* Widgets ON DETAIL/SINGLE PAGE */ |
|
252 | - /*===========================*/ |
|
250 | + /*===========================*/ |
|
251 | + /* Widgets ON DETAIL/SINGLE PAGE */ |
|
252 | + /*===========================*/ |
|
253 | 253 | |
254 | - $widget_option_list['geodir_detail_sidebar'] = |
|
255 | - array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')), |
|
256 | - 'geodir_map_v3_listing_map' => array("autozoom" => 1, "sticky" => 1), |
|
257 | - 'popular_post_view' => array("title" => __('Latest Places', 'geodirectory'), "add_location_filter" => '1')); |
|
254 | + $widget_option_list['geodir_detail_sidebar'] = |
|
255 | + array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')), |
|
256 | + 'geodir_map_v3_listing_map' => array("autozoom" => 1, "sticky" => 1), |
|
257 | + 'popular_post_view' => array("title" => __('Latest Places', 'geodirectory'), "add_location_filter" => '1')); |
|
258 | 258 | |
259 | 259 | |
260 | - /*===========================*/ |
|
261 | - /* Widgets ON AUTHOR PAGE */ |
|
262 | - /*===========================*/ |
|
260 | + /*===========================*/ |
|
261 | + /* Widgets ON AUTHOR PAGE */ |
|
262 | + /*===========================*/ |
|
263 | 263 | |
264 | 264 | |
265 | - $widget_option_list['geodir_author_right_sidebar'] = |
|
266 | - array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory'))); |
|
265 | + $widget_option_list['geodir_author_right_sidebar'] = |
|
266 | + array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory'))); |
|
267 | 267 | |
268 | 268 | |
269 | - $sidebars_widgets = get_option('sidebars_widgets'); |
|
269 | + $sidebars_widgets = get_option('sidebars_widgets'); |
|
270 | 270 | |
271 | - foreach ($widget_option_list as $key => $widget_options) { |
|
271 | + foreach ($widget_option_list as $key => $widget_options) { |
|
272 | 272 | |
273 | - foreach ($widget_options as $key2 => $widget_options_obj) { |
|
274 | - $widgetid = 'widget_' . $key2; |
|
273 | + foreach ($widget_options as $key2 => $widget_options_obj) { |
|
274 | + $widgetid = 'widget_' . $key2; |
|
275 | 275 | |
276 | - $widgetinfo[$widgetid][] = $widget_options_obj; |
|
276 | + $widgetinfo[$widgetid][] = $widget_options_obj; |
|
277 | 277 | |
278 | - $sidebarvalue_array[$key][] = $key2 . "-" . (count($widgetinfo[$widgetid])); |
|
278 | + $sidebarvalue_array[$key][] = $key2 . "-" . (count($widgetinfo[$widgetid])); |
|
279 | 279 | |
280 | - $widget_update[$widgetid][count($widgetinfo[$widgetid])] = $widget_options_obj; |
|
280 | + $widget_update[$widgetid][count($widgetinfo[$widgetid])] = $widget_options_obj; |
|
281 | 281 | |
282 | - } |
|
282 | + } |
|
283 | 283 | |
284 | - if (!empty($sidebarvalue_array[$key])) { |
|
284 | + if (!empty($sidebarvalue_array[$key])) { |
|
285 | 285 | |
286 | - $sidebars_widgets = get_option('sidebars_widgets'); |
|
287 | - $sidebars_widgets[$key] = $sidebarvalue_array[$key]; |
|
288 | - update_option('sidebars_widgets', $sidebars_widgets); |
|
286 | + $sidebars_widgets = get_option('sidebars_widgets'); |
|
287 | + $sidebars_widgets[$key] = $sidebarvalue_array[$key]; |
|
288 | + update_option('sidebars_widgets', $sidebars_widgets); |
|
289 | 289 | |
290 | - foreach ($widget_update as $key => $value) { |
|
290 | + foreach ($widget_update as $key => $value) { |
|
291 | 291 | |
292 | - update_option($key, $value); |
|
292 | + update_option($key, $value); |
|
293 | 293 | |
294 | - } |
|
294 | + } |
|
295 | 295 | |
296 | - } |
|
296 | + } |
|
297 | 297 | |
298 | - } |
|
298 | + } |
|
299 | 299 | |
300 | 300 | |
301 | 301 | } |
@@ -13,14 +13,14 @@ |
||
13 | 13 | * @since 1.0.0 |
14 | 14 | */ |
15 | 15 | include_once(geodir_plugin_path() . '/geodirectory-admin/option-pages/create_field.php'); |
16 | - die; |
|
16 | + die; |
|
17 | 17 | } |
18 | 18 | |
19 | 19 | |
20 | 20 | if (isset($_REQUEST['ajax_action']) && $_REQUEST['ajax_action'] != '') { |
21 | - switch ($_REQUEST['ajax_action']): |
|
22 | - case 'get_cat_dl': |
|
23 | - geodir_get_categories_dl($_REQUEST['post_type'], $_REQUEST['selected'], false, true); |
|
24 | - break; |
|
25 | - endswitch; |
|
21 | + switch ($_REQUEST['ajax_action']): |
|
22 | + case 'get_cat_dl': |
|
23 | + geodir_get_categories_dl($_REQUEST['post_type'], $_REQUEST['selected'], false, true); |
|
24 | + break; |
|
25 | + endswitch; |
|
26 | 26 | } |
27 | 27 | \ No newline at end of file |
@@ -16,184 +16,184 @@ |
||
16 | 16 | */ |
17 | 17 | $geodir_settings['permalink_settings'] = apply_filters('geodir_permalink_settings', array( |
18 | 18 | |
19 | - /* Listing Permalink Settings start */ |
|
20 | - array('name' => __('Permalink', 'geodirectory'), 'type' => 'no_tabs', 'desc' => 'Settings to set permalink', 'id' => 'geodir_permalink_settings '), |
|
21 | - |
|
22 | - |
|
23 | - array('name' => __('Listing Detail Permalink Settings', 'geodirectory'), |
|
24 | - 'type' => 'sectionstart', |
|
25 | - 'desc' => '', |
|
26 | - 'id' => 'geodir_permalink'), |
|
27 | - |
|
28 | - array( |
|
29 | - 'name' => __('Add location in urls', 'geodirectory'), |
|
30 | - 'desc' => __('Add location slug in listing urls', 'geodirectory'), |
|
31 | - 'id' => 'geodir_add_location_url', |
|
32 | - 'type' => 'checkbox', |
|
33 | - 'std' => '1', |
|
34 | - 'checkboxgroup' => 'start' |
|
35 | - ), |
|
36 | - |
|
37 | - array( |
|
38 | - 'name' => __('Add full location in listing urls', 'geodirectory'), |
|
39 | - 'desc' => __('Add full location info with country, region and city slug in listing urls', 'geodirectory'), |
|
40 | - 'id' => 'geodir_show_location_url', |
|
41 | - 'type' => 'radio', |
|
42 | - 'value' => 'all', |
|
43 | - 'std' => 'all', |
|
44 | - 'radiogroup' => '' |
|
45 | - ), |
|
46 | - |
|
47 | - array( |
|
48 | - 'name' => __('Add country and city slug in listing urls', 'geodirectory'), |
|
49 | - 'desc' => __('Add country and city slug in listing urls (/country/city/)', 'geodirectory'), |
|
50 | - 'id' => 'geodir_show_location_url', |
|
51 | - 'type' => 'radio', |
|
52 | - 'std' => 'all', |
|
53 | - 'value' => 'country_city', |
|
54 | - 'radiogroup' => '' |
|
55 | - ), |
|
56 | - array( |
|
57 | - 'name' => __('Add region and city slug in listing urls', 'geodirectory'), |
|
58 | - 'desc' => __('Add region and city slug in listing urls (/region/city/)', 'geodirectory'), |
|
59 | - 'id' => 'geodir_show_location_url', |
|
60 | - 'type' => 'radio', |
|
61 | - 'std' => 'all', |
|
62 | - 'value' => 'region_city', |
|
63 | - 'radiogroup' => '' |
|
64 | - ), |
|
65 | - array( |
|
66 | - 'name' => __('Add only city in listing urls', 'geodirectory'), |
|
67 | - 'desc' => __('Add city slug in listing urls', 'geodirectory'), |
|
68 | - 'id' => 'geodir_show_location_url', |
|
69 | - 'type' => 'radio', |
|
70 | - 'std' => 'all', |
|
71 | - 'value' => 'city', |
|
72 | - 'radiogroup' => 'end' |
|
73 | - ), |
|
74 | - |
|
75 | - |
|
76 | - |
|
77 | - array( |
|
78 | - 'name' => __('Add category in listing urls', 'geodirectory'), |
|
79 | - 'desc' => __('Add requested category slugs in listing urls', 'geodirectory'), |
|
80 | - 'id' => 'geodir_add_categories_url', |
|
81 | - 'type' => 'checkbox', |
|
82 | - 'std' => '1', |
|
83 | - ), |
|
84 | - |
|
85 | - array( |
|
86 | - 'name' => __('Listing url prefix', 'geodirectory'), |
|
87 | - 'desc' => __('Listing prefix to show in url', 'geodirectory'), |
|
88 | - 'id' => 'geodir_listing_prefix', |
|
89 | - 'type' => 'text', |
|
90 | - 'css' => 'min-width:300px;', |
|
91 | - 'std' => 'places' |
|
92 | - ), |
|
93 | - |
|
94 | - array( |
|
95 | - 'name' => __('Location url prefix', 'geodirectory'), |
|
96 | - 'desc' => __('Depreciated, now uses the location page slug', 'geodirectory'), |
|
97 | - 'id' => 'geodir_location_prefix', |
|
98 | - 'type' => 'text', |
|
99 | - 'css' => 'min-width:300px;', |
|
100 | - 'std' => 'location' // Default value to show home top section |
|
101 | - ), |
|
102 | - |
|
103 | - array( |
|
104 | - 'name' => __('Location and category url separator', 'geodirectory'), |
|
105 | - 'desc' => __('Separator to show between location and category url slugs in listing urls', 'geodirectory'), |
|
106 | - 'id' => 'geodir_listingurl_separator', |
|
107 | - 'type' => 'text', |
|
108 | - 'css' => 'min-width:300px;', |
|
109 | - 'std' => 'C' // Default value to show home top section |
|
110 | - ), |
|
111 | - |
|
112 | - array( |
|
113 | - 'name' => __('Listing detail url separator', 'geodirectory'), |
|
114 | - 'desc' => __('Separator to show before listing slug in listing detail urls', 'geodirectory'), |
|
115 | - 'id' => 'geodir_detailurl_separator', |
|
116 | - 'type' => 'text', |
|
117 | - 'css' => 'min-width:300px;', |
|
118 | - 'std' => 'info' // Default value to show home top section |
|
119 | - ), |
|
120 | - |
|
121 | - |
|
122 | - array('type' => 'sectionend', 'id' => 'geodir_permalink'), |
|
123 | - |
|
124 | - array('name' => __('GeoDirectory Pages', 'geodirectory'), |
|
125 | - 'type' => 'sectionstart', |
|
126 | - 'desc' => '', |
|
127 | - 'id' => 'geodir_pages'), |
|
128 | - |
|
129 | - array( |
|
130 | - 'name' => __('GD Home page', 'geodirectory'), |
|
131 | - 'desc' => __('Select the page to use for the GD homepage (you must also set this page in Settings>Reading>Front page for it to work)', 'geodirectory'), |
|
132 | - 'id' => 'geodir_home_page', |
|
133 | - 'type' => 'single_select_page', |
|
134 | - 'class' => 'chosen_select' |
|
135 | - ), |
|
136 | - |
|
137 | - array( |
|
138 | - 'name' => __('Add listing page', 'geodirectory'), |
|
139 | - 'desc' => __('Select the page to use for adding listings', 'geodirectory'), |
|
140 | - 'id' => 'geodir_add_listing_page', |
|
141 | - 'type' => 'single_select_page', |
|
142 | - 'class' => 'chosen_select' |
|
143 | - ), |
|
144 | - |
|
145 | - array( |
|
146 | - 'name' => __('Listing preview page', 'geodirectory'), |
|
147 | - 'desc' => __('Select the page to use for listing preview', 'geodirectory'), |
|
148 | - 'id' => 'geodir_preview_page', |
|
149 | - 'type' => 'single_select_page', |
|
150 | - 'class' => 'chosen_select' |
|
151 | - ), |
|
152 | - |
|
153 | - array( |
|
154 | - 'name' => __('Listing success page', 'geodirectory'), |
|
155 | - 'desc' => __('Select the page to use for listing success', 'geodirectory'), |
|
156 | - 'id' => 'geodir_success_page', |
|
157 | - 'type' => 'single_select_page', |
|
158 | - 'class' => 'chosen_select' |
|
159 | - ), |
|
160 | - |
|
161 | - array( |
|
162 | - 'name' => __('Location page', 'geodirectory'), |
|
163 | - 'desc' => __('Select the page to use for locations', 'geodirectory'), |
|
164 | - 'id' => 'geodir_location_page', |
|
165 | - 'type' => 'single_select_page', |
|
166 | - 'class' => 'chosen_select' |
|
167 | - ), |
|
168 | - |
|
169 | - array( |
|
170 | - 'name' => __('Terms and Conditions page', 'geodirectory'), |
|
171 | - 'desc' => __('Select the page to use for Terms and Conditions (if enabled)', 'geodirectory'), |
|
172 | - 'id' => 'geodir_term_condition_page', |
|
173 | - 'type' => 'single_select_page', |
|
174 | - 'class' => 'chosen_select' |
|
175 | - ), |
|
176 | - |
|
177 | - array( |
|
178 | - 'name' => __('Info page', 'geodirectory'), |
|
179 | - 'desc' => __('Select the page to use for Gd general Info', 'geodirectory'), |
|
180 | - 'id' => 'geodir_info_page', |
|
181 | - 'type' => 'single_select_page', |
|
182 | - 'class' => 'chosen_select' |
|
183 | - ), |
|
184 | - |
|
185 | - array( |
|
186 | - 'name' => __('Login page', 'geodirectory'), |
|
187 | - 'desc' => __('Select the page to use for Login / Register', 'geodirectory'), |
|
188 | - 'id' => 'geodir_login_page', |
|
189 | - 'type' => 'single_select_page', |
|
190 | - 'class' => 'chosen_select' |
|
191 | - ), |
|
192 | - |
|
193 | - |
|
194 | - array('type' => 'sectionend', 'id' => 'geodir_pages'), |
|
195 | - |
|
196 | - /* Listing Detail Permalink Settings End */ |
|
19 | + /* Listing Permalink Settings start */ |
|
20 | + array('name' => __('Permalink', 'geodirectory'), 'type' => 'no_tabs', 'desc' => 'Settings to set permalink', 'id' => 'geodir_permalink_settings '), |
|
21 | + |
|
22 | + |
|
23 | + array('name' => __('Listing Detail Permalink Settings', 'geodirectory'), |
|
24 | + 'type' => 'sectionstart', |
|
25 | + 'desc' => '', |
|
26 | + 'id' => 'geodir_permalink'), |
|
27 | + |
|
28 | + array( |
|
29 | + 'name' => __('Add location in urls', 'geodirectory'), |
|
30 | + 'desc' => __('Add location slug in listing urls', 'geodirectory'), |
|
31 | + 'id' => 'geodir_add_location_url', |
|
32 | + 'type' => 'checkbox', |
|
33 | + 'std' => '1', |
|
34 | + 'checkboxgroup' => 'start' |
|
35 | + ), |
|
36 | + |
|
37 | + array( |
|
38 | + 'name' => __('Add full location in listing urls', 'geodirectory'), |
|
39 | + 'desc' => __('Add full location info with country, region and city slug in listing urls', 'geodirectory'), |
|
40 | + 'id' => 'geodir_show_location_url', |
|
41 | + 'type' => 'radio', |
|
42 | + 'value' => 'all', |
|
43 | + 'std' => 'all', |
|
44 | + 'radiogroup' => '' |
|
45 | + ), |
|
46 | + |
|
47 | + array( |
|
48 | + 'name' => __('Add country and city slug in listing urls', 'geodirectory'), |
|
49 | + 'desc' => __('Add country and city slug in listing urls (/country/city/)', 'geodirectory'), |
|
50 | + 'id' => 'geodir_show_location_url', |
|
51 | + 'type' => 'radio', |
|
52 | + 'std' => 'all', |
|
53 | + 'value' => 'country_city', |
|
54 | + 'radiogroup' => '' |
|
55 | + ), |
|
56 | + array( |
|
57 | + 'name' => __('Add region and city slug in listing urls', 'geodirectory'), |
|
58 | + 'desc' => __('Add region and city slug in listing urls (/region/city/)', 'geodirectory'), |
|
59 | + 'id' => 'geodir_show_location_url', |
|
60 | + 'type' => 'radio', |
|
61 | + 'std' => 'all', |
|
62 | + 'value' => 'region_city', |
|
63 | + 'radiogroup' => '' |
|
64 | + ), |
|
65 | + array( |
|
66 | + 'name' => __('Add only city in listing urls', 'geodirectory'), |
|
67 | + 'desc' => __('Add city slug in listing urls', 'geodirectory'), |
|
68 | + 'id' => 'geodir_show_location_url', |
|
69 | + 'type' => 'radio', |
|
70 | + 'std' => 'all', |
|
71 | + 'value' => 'city', |
|
72 | + 'radiogroup' => 'end' |
|
73 | + ), |
|
74 | + |
|
75 | + |
|
76 | + |
|
77 | + array( |
|
78 | + 'name' => __('Add category in listing urls', 'geodirectory'), |
|
79 | + 'desc' => __('Add requested category slugs in listing urls', 'geodirectory'), |
|
80 | + 'id' => 'geodir_add_categories_url', |
|
81 | + 'type' => 'checkbox', |
|
82 | + 'std' => '1', |
|
83 | + ), |
|
84 | + |
|
85 | + array( |
|
86 | + 'name' => __('Listing url prefix', 'geodirectory'), |
|
87 | + 'desc' => __('Listing prefix to show in url', 'geodirectory'), |
|
88 | + 'id' => 'geodir_listing_prefix', |
|
89 | + 'type' => 'text', |
|
90 | + 'css' => 'min-width:300px;', |
|
91 | + 'std' => 'places' |
|
92 | + ), |
|
93 | + |
|
94 | + array( |
|
95 | + 'name' => __('Location url prefix', 'geodirectory'), |
|
96 | + 'desc' => __('Depreciated, now uses the location page slug', 'geodirectory'), |
|
97 | + 'id' => 'geodir_location_prefix', |
|
98 | + 'type' => 'text', |
|
99 | + 'css' => 'min-width:300px;', |
|
100 | + 'std' => 'location' // Default value to show home top section |
|
101 | + ), |
|
102 | + |
|
103 | + array( |
|
104 | + 'name' => __('Location and category url separator', 'geodirectory'), |
|
105 | + 'desc' => __('Separator to show between location and category url slugs in listing urls', 'geodirectory'), |
|
106 | + 'id' => 'geodir_listingurl_separator', |
|
107 | + 'type' => 'text', |
|
108 | + 'css' => 'min-width:300px;', |
|
109 | + 'std' => 'C' // Default value to show home top section |
|
110 | + ), |
|
111 | + |
|
112 | + array( |
|
113 | + 'name' => __('Listing detail url separator', 'geodirectory'), |
|
114 | + 'desc' => __('Separator to show before listing slug in listing detail urls', 'geodirectory'), |
|
115 | + 'id' => 'geodir_detailurl_separator', |
|
116 | + 'type' => 'text', |
|
117 | + 'css' => 'min-width:300px;', |
|
118 | + 'std' => 'info' // Default value to show home top section |
|
119 | + ), |
|
120 | + |
|
121 | + |
|
122 | + array('type' => 'sectionend', 'id' => 'geodir_permalink'), |
|
123 | + |
|
124 | + array('name' => __('GeoDirectory Pages', 'geodirectory'), |
|
125 | + 'type' => 'sectionstart', |
|
126 | + 'desc' => '', |
|
127 | + 'id' => 'geodir_pages'), |
|
128 | + |
|
129 | + array( |
|
130 | + 'name' => __('GD Home page', 'geodirectory'), |
|
131 | + 'desc' => __('Select the page to use for the GD homepage (you must also set this page in Settings>Reading>Front page for it to work)', 'geodirectory'), |
|
132 | + 'id' => 'geodir_home_page', |
|
133 | + 'type' => 'single_select_page', |
|
134 | + 'class' => 'chosen_select' |
|
135 | + ), |
|
136 | + |
|
137 | + array( |
|
138 | + 'name' => __('Add listing page', 'geodirectory'), |
|
139 | + 'desc' => __('Select the page to use for adding listings', 'geodirectory'), |
|
140 | + 'id' => 'geodir_add_listing_page', |
|
141 | + 'type' => 'single_select_page', |
|
142 | + 'class' => 'chosen_select' |
|
143 | + ), |
|
144 | + |
|
145 | + array( |
|
146 | + 'name' => __('Listing preview page', 'geodirectory'), |
|
147 | + 'desc' => __('Select the page to use for listing preview', 'geodirectory'), |
|
148 | + 'id' => 'geodir_preview_page', |
|
149 | + 'type' => 'single_select_page', |
|
150 | + 'class' => 'chosen_select' |
|
151 | + ), |
|
152 | + |
|
153 | + array( |
|
154 | + 'name' => __('Listing success page', 'geodirectory'), |
|
155 | + 'desc' => __('Select the page to use for listing success', 'geodirectory'), |
|
156 | + 'id' => 'geodir_success_page', |
|
157 | + 'type' => 'single_select_page', |
|
158 | + 'class' => 'chosen_select' |
|
159 | + ), |
|
160 | + |
|
161 | + array( |
|
162 | + 'name' => __('Location page', 'geodirectory'), |
|
163 | + 'desc' => __('Select the page to use for locations', 'geodirectory'), |
|
164 | + 'id' => 'geodir_location_page', |
|
165 | + 'type' => 'single_select_page', |
|
166 | + 'class' => 'chosen_select' |
|
167 | + ), |
|
168 | + |
|
169 | + array( |
|
170 | + 'name' => __('Terms and Conditions page', 'geodirectory'), |
|
171 | + 'desc' => __('Select the page to use for Terms and Conditions (if enabled)', 'geodirectory'), |
|
172 | + 'id' => 'geodir_term_condition_page', |
|
173 | + 'type' => 'single_select_page', |
|
174 | + 'class' => 'chosen_select' |
|
175 | + ), |
|
176 | + |
|
177 | + array( |
|
178 | + 'name' => __('Info page', 'geodirectory'), |
|
179 | + 'desc' => __('Select the page to use for Gd general Info', 'geodirectory'), |
|
180 | + 'id' => 'geodir_info_page', |
|
181 | + 'type' => 'single_select_page', |
|
182 | + 'class' => 'chosen_select' |
|
183 | + ), |
|
184 | + |
|
185 | + array( |
|
186 | + 'name' => __('Login page', 'geodirectory'), |
|
187 | + 'desc' => __('Select the page to use for Login / Register', 'geodirectory'), |
|
188 | + 'id' => 'geodir_login_page', |
|
189 | + 'type' => 'single_select_page', |
|
190 | + 'class' => 'chosen_select' |
|
191 | + ), |
|
192 | + |
|
193 | + |
|
194 | + array('type' => 'sectionend', 'id' => 'geodir_pages'), |
|
195 | + |
|
196 | + /* Listing Detail Permalink Settings End */ |
|
197 | 197 | |
198 | 198 | |
199 | 199 | )); // End Design settings |
@@ -18,11 +18,11 @@ discard block |
||
18 | 18 | */ |
19 | 19 | function geodir_divi_signup_body_class($classes) |
20 | 20 | { |
21 | - if (geodir_is_page('login')) { |
|
22 | - $classes = str_replace('et_right_sidebar', 'et_full_width_page', $classes); |
|
23 | - $classes[] = 'divi-gd-signup'; |
|
24 | - } |
|
25 | - return $classes; |
|
21 | + if (geodir_is_page('login')) { |
|
22 | + $classes = str_replace('et_right_sidebar', 'et_full_width_page', $classes); |
|
23 | + $classes[] = 'divi-gd-signup'; |
|
24 | + } |
|
25 | + return $classes; |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | add_action('geodir_wrapper_close', 'geodir_divi_action_wrapper_close', 11); |
@@ -34,8 +34,8 @@ discard block |
||
34 | 34 | */ |
35 | 35 | function geodir_divi_action_wrapper_close() |
36 | 36 | { |
37 | - if (geodir_is_page('login')) { |
|
38 | - // We need to close extra divs generated by WRAPPER BEFORE MAIN CONTENT (below) because there is no sidebar on this page |
|
39 | - echo '</div></div>'; |
|
40 | - } |
|
37 | + if (geodir_is_page('login')) { |
|
38 | + // We need to close extra divs generated by WRAPPER BEFORE MAIN CONTENT (below) because there is no sidebar on this page |
|
39 | + echo '</div></div>'; |
|
40 | + } |
|
41 | 41 | } |
42 | 42 | \ No newline at end of file |
@@ -17,26 +17,26 @@ discard block |
||
17 | 17 | function gd_compat_php_genesis() |
18 | 18 | { |
19 | 19 | // REPLACE GENESIS BREADCRUMBS WITH GD BREADCRUMBS |
20 | - remove_action('geodir_detail_before_main_content', 'geodir_breadcrumb', 20); |
|
21 | - remove_action('geodir_listings_before_main_content', 'geodir_breadcrumb', 20); |
|
22 | - remove_action('geodir_author_before_main_content', 'geodir_breadcrumb', 20); |
|
23 | - remove_action('geodir_search_before_main_content', 'geodir_breadcrumb', 20); |
|
24 | - remove_action('geodir_home_before_main_content', 'geodir_breadcrumb', 20); |
|
25 | - remove_action('geodir_location_before_main_content', 'geodir_breadcrumb', 20); |
|
20 | + remove_action('geodir_detail_before_main_content', 'geodir_breadcrumb', 20); |
|
21 | + remove_action('geodir_listings_before_main_content', 'geodir_breadcrumb', 20); |
|
22 | + remove_action('geodir_author_before_main_content', 'geodir_breadcrumb', 20); |
|
23 | + remove_action('geodir_search_before_main_content', 'geodir_breadcrumb', 20); |
|
24 | + remove_action('geodir_home_before_main_content', 'geodir_breadcrumb', 20); |
|
25 | + remove_action('geodir_location_before_main_content', 'geodir_breadcrumb', 20); |
|
26 | 26 | |
27 | 27 | |
28 | - // make top section wide |
|
29 | - remove_action('geodir_home_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10); |
|
30 | - remove_action('geodir_location_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10); |
|
31 | - remove_action('geodir_author_before_main_content', 'geodir_action_geodir_sidebar_author_top', 10); |
|
32 | - remove_action('geodir_search_before_main_content', 'geodir_action_geodir_sidebar_search_top', 10); |
|
33 | - remove_action('geodir_detail_before_main_content', 'geodir_action_geodir_sidebar_detail_top', 10); |
|
34 | - remove_action('geodir_listings_before_main_content', 'geodir_action_geodir_sidebar_listings_top', 10); |
|
28 | + // make top section wide |
|
29 | + remove_action('geodir_home_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10); |
|
30 | + remove_action('geodir_location_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10); |
|
31 | + remove_action('geodir_author_before_main_content', 'geodir_action_geodir_sidebar_author_top', 10); |
|
32 | + remove_action('geodir_search_before_main_content', 'geodir_action_geodir_sidebar_search_top', 10); |
|
33 | + remove_action('geodir_detail_before_main_content', 'geodir_action_geodir_sidebar_detail_top', 10); |
|
34 | + remove_action('geodir_listings_before_main_content', 'geodir_action_geodir_sidebar_listings_top', 10); |
|
35 | 35 | |
36 | - // REMOVE PAGE TITLES |
|
37 | - remove_action('geodir_listings_page_title', 'geodir_action_listings_title', 10); |
|
38 | - remove_action('geodir_search_page_title', 'geodir_action_search_page_title', 10); |
|
39 | - remove_action('geodir_author_page_title', 'geodir_action_author_page_title', 10); |
|
36 | + // REMOVE PAGE TITLES |
|
37 | + remove_action('geodir_listings_page_title', 'geodir_action_listings_title', 10); |
|
38 | + remove_action('geodir_search_page_title', 'geodir_action_search_page_title', 10); |
|
39 | + remove_action('geodir_author_page_title', 'geodir_action_author_page_title', 10); |
|
40 | 40 | |
41 | 41 | |
42 | 42 | } |
@@ -53,25 +53,25 @@ discard block |
||
53 | 53 | function gd_genesis_compat_left_sidebars() |
54 | 54 | { |
55 | 55 | |
56 | - if (is_page_geodir_home()) { |
|
57 | - remove_action('geodir_home_sidebar_left', 'geodir_action_home_sidebar_left', 10); |
|
58 | - add_action('geodir_wrapper_close', 'geodir_action_home_sidebar_left', 11); |
|
59 | - } elseif (geodir_is_page('location')) { |
|
60 | - remove_action('geodir_location_sidebar_left', 'geodir_action_home_sidebar_left', 10); |
|
61 | - add_action('geodir_wrapper_close', 'geodir_action_home_sidebar_left', 11); |
|
62 | - } elseif (geodir_is_page('listing')) { |
|
63 | - remove_action('geodir_listings_sidebar_left', 'geodir_action_listings_sidebar_left', 10); |
|
64 | - add_action('geodir_wrapper_close', 'geodir_action_listings_sidebar_left', 11); |
|
65 | - } elseif (geodir_is_page('detail') && get_option('geodir_detail_sidebar_left_section')) { |
|
66 | - //remove_action( 'geodir_detail_sidebar', 'geodir_action_details_sidebar', 10 ); |
|
67 | - //add_action( 'geodir_wrapper_close', 'geodir_action_details_sidebar', 11 ); |
|
68 | - } elseif (geodir_is_page('search')) { |
|
69 | - remove_action('geodir_search_sidebar_left', 'geodir_action_search_sidebar_left', 10); |
|
70 | - add_action('geodir_wrapper_close', 'geodir_action_search_sidebar_left', 11); |
|
71 | - } elseif (geodir_is_page('author')) { |
|
72 | - remove_action('geodir_author_sidebar_left', 'geodir_action_author_sidebar_left', 10); |
|
73 | - add_action('geodir_wrapper_close', 'geodir_action_author_sidebar_left', 11); |
|
74 | - } |
|
56 | + if (is_page_geodir_home()) { |
|
57 | + remove_action('geodir_home_sidebar_left', 'geodir_action_home_sidebar_left', 10); |
|
58 | + add_action('geodir_wrapper_close', 'geodir_action_home_sidebar_left', 11); |
|
59 | + } elseif (geodir_is_page('location')) { |
|
60 | + remove_action('geodir_location_sidebar_left', 'geodir_action_home_sidebar_left', 10); |
|
61 | + add_action('geodir_wrapper_close', 'geodir_action_home_sidebar_left', 11); |
|
62 | + } elseif (geodir_is_page('listing')) { |
|
63 | + remove_action('geodir_listings_sidebar_left', 'geodir_action_listings_sidebar_left', 10); |
|
64 | + add_action('geodir_wrapper_close', 'geodir_action_listings_sidebar_left', 11); |
|
65 | + } elseif (geodir_is_page('detail') && get_option('geodir_detail_sidebar_left_section')) { |
|
66 | + //remove_action( 'geodir_detail_sidebar', 'geodir_action_details_sidebar', 10 ); |
|
67 | + //add_action( 'geodir_wrapper_close', 'geodir_action_details_sidebar', 11 ); |
|
68 | + } elseif (geodir_is_page('search')) { |
|
69 | + remove_action('geodir_search_sidebar_left', 'geodir_action_search_sidebar_left', 10); |
|
70 | + add_action('geodir_wrapper_close', 'geodir_action_search_sidebar_left', 11); |
|
71 | + } elseif (geodir_is_page('author')) { |
|
72 | + remove_action('geodir_author_sidebar_left', 'geodir_action_author_sidebar_left', 10); |
|
73 | + add_action('geodir_wrapper_close', 'geodir_action_author_sidebar_left', 11); |
|
74 | + } |
|
75 | 75 | |
76 | 76 | |
77 | 77 | } |
@@ -88,65 +88,65 @@ discard block |
||
88 | 88 | */ |
89 | 89 | function geodir_set_body_scs($classes) |
90 | 90 | { |
91 | - $remove_class = false; |
|
92 | - $new_class = ''; |
|
93 | - if (is_page_geodir_home() || geodir_is_page('location')) { |
|
94 | - $remove_class = true; |
|
95 | - if (get_option('geodir_show_home_left_section')) { |
|
96 | - $new_class .= 'sidebar-'; |
|
97 | - } |
|
98 | - if (get_option('geodir_show_home_contant_section')) { |
|
99 | - $new_class .= 'content'; |
|
100 | - } |
|
101 | - if (get_option('geodir_show_home_right_section')) { |
|
102 | - $new_class .= '-sidebar'; |
|
103 | - } |
|
104 | - } elseif (geodir_is_page('listing')) { |
|
105 | - $remove_class = true; |
|
106 | - if (get_option('geodir_show_listing_left_section')) { |
|
107 | - $new_class .= 'sidebar-'; |
|
108 | - } |
|
109 | - $new_class .= 'content'; |
|
110 | - if (get_option('geodir_show_listing_right_section')) { |
|
111 | - $new_class .= '-sidebar'; |
|
112 | - } |
|
113 | - } elseif (geodir_is_page('detail')) { |
|
114 | - $remove_class = true; |
|
115 | - if (get_option('geodir_detail_sidebar_left_section')) { |
|
116 | - $new_class .= 'sidebar-content gd-details-sidebar-left'; |
|
117 | - } else { |
|
118 | - $new_class .= 'content-sidebar'; |
|
119 | - } |
|
120 | - } elseif (geodir_is_page('search')) { |
|
121 | - $remove_class = true; |
|
122 | - if (get_option('geodir_show_search_left_section')) { |
|
123 | - $new_class .= 'sidebar-'; |
|
124 | - } |
|
125 | - $new_class .= 'content'; |
|
126 | - if (get_option('geodir_show_search_right_section')) { |
|
127 | - $new_class .= '-sidebar'; |
|
128 | - } |
|
129 | - } elseif (geodir_is_page('author')) { |
|
130 | - $remove_class = true; |
|
131 | - if (get_option('geodir_show_author_left_section')) { |
|
132 | - $new_class .= 'sidebar-'; |
|
133 | - } |
|
134 | - $new_class .= 'content'; |
|
135 | - if (get_option('geodir_show_author_right_section')) { |
|
136 | - $new_class .= '-sidebar'; |
|
137 | - } |
|
138 | - } elseif (geodir_is_page('add-listing')) { |
|
139 | - $remove_class = true; |
|
140 | - $new_class .= 'content-sidebar'; |
|
141 | - } |
|
142 | - |
|
143 | - if ($remove_class) { |
|
144 | - $classes = array_diff($classes, array('content-sidebar', 'sidebar-content', 'content-sidebar-sidebar', 'sidebar-sidebar-content', 'sidebar-content-sidebar', 'full-width-content')); |
|
145 | - //str_replace(array('content-sidebar','sidebar-content','content-sidebar-sidebar','sidebar-sidebar-content','sidebar-content-sidebar','full-width-content'),array('','','','','',''),$classes); |
|
146 | - $classes[] = $new_class; |
|
147 | - } |
|
148 | - |
|
149 | - return $classes; |
|
91 | + $remove_class = false; |
|
92 | + $new_class = ''; |
|
93 | + if (is_page_geodir_home() || geodir_is_page('location')) { |
|
94 | + $remove_class = true; |
|
95 | + if (get_option('geodir_show_home_left_section')) { |
|
96 | + $new_class .= 'sidebar-'; |
|
97 | + } |
|
98 | + if (get_option('geodir_show_home_contant_section')) { |
|
99 | + $new_class .= 'content'; |
|
100 | + } |
|
101 | + if (get_option('geodir_show_home_right_section')) { |
|
102 | + $new_class .= '-sidebar'; |
|
103 | + } |
|
104 | + } elseif (geodir_is_page('listing')) { |
|
105 | + $remove_class = true; |
|
106 | + if (get_option('geodir_show_listing_left_section')) { |
|
107 | + $new_class .= 'sidebar-'; |
|
108 | + } |
|
109 | + $new_class .= 'content'; |
|
110 | + if (get_option('geodir_show_listing_right_section')) { |
|
111 | + $new_class .= '-sidebar'; |
|
112 | + } |
|
113 | + } elseif (geodir_is_page('detail')) { |
|
114 | + $remove_class = true; |
|
115 | + if (get_option('geodir_detail_sidebar_left_section')) { |
|
116 | + $new_class .= 'sidebar-content gd-details-sidebar-left'; |
|
117 | + } else { |
|
118 | + $new_class .= 'content-sidebar'; |
|
119 | + } |
|
120 | + } elseif (geodir_is_page('search')) { |
|
121 | + $remove_class = true; |
|
122 | + if (get_option('geodir_show_search_left_section')) { |
|
123 | + $new_class .= 'sidebar-'; |
|
124 | + } |
|
125 | + $new_class .= 'content'; |
|
126 | + if (get_option('geodir_show_search_right_section')) { |
|
127 | + $new_class .= '-sidebar'; |
|
128 | + } |
|
129 | + } elseif (geodir_is_page('author')) { |
|
130 | + $remove_class = true; |
|
131 | + if (get_option('geodir_show_author_left_section')) { |
|
132 | + $new_class .= 'sidebar-'; |
|
133 | + } |
|
134 | + $new_class .= 'content'; |
|
135 | + if (get_option('geodir_show_author_right_section')) { |
|
136 | + $new_class .= '-sidebar'; |
|
137 | + } |
|
138 | + } elseif (geodir_is_page('add-listing')) { |
|
139 | + $remove_class = true; |
|
140 | + $new_class .= 'content-sidebar'; |
|
141 | + } |
|
142 | + |
|
143 | + if ($remove_class) { |
|
144 | + $classes = array_diff($classes, array('content-sidebar', 'sidebar-content', 'content-sidebar-sidebar', 'sidebar-sidebar-content', 'sidebar-content-sidebar', 'full-width-content')); |
|
145 | + //str_replace(array('content-sidebar','sidebar-content','content-sidebar-sidebar','sidebar-sidebar-content','sidebar-content-sidebar','full-width-content'),array('','','','','',''),$classes); |
|
146 | + $classes[] = $new_class; |
|
147 | + } |
|
148 | + |
|
149 | + return $classes; |
|
150 | 150 | |
151 | 151 | } |
152 | 152 | |
@@ -160,17 +160,17 @@ discard block |
||
160 | 160 | function gd_genesis_compat_add_top_section_back() |
161 | 161 | { |
162 | 162 | |
163 | - if (is_page_geodir_home() || geodir_is_page('location')) { |
|
164 | - geodir_action_geodir_sidebar_home_top(); |
|
165 | - } elseif (geodir_is_page('listing')) { |
|
166 | - geodir_action_geodir_sidebar_listings_top(); |
|
167 | - } elseif (geodir_is_page('detail')) { |
|
168 | - geodir_action_geodir_sidebar_detail_top(); |
|
169 | - } elseif (geodir_is_page('search')) { |
|
170 | - geodir_action_geodir_sidebar_search_top(); |
|
171 | - } elseif (geodir_is_page('author')) { |
|
172 | - geodir_action_geodir_sidebar_author_top(); |
|
173 | - } |
|
163 | + if (is_page_geodir_home() || geodir_is_page('location')) { |
|
164 | + geodir_action_geodir_sidebar_home_top(); |
|
165 | + } elseif (geodir_is_page('listing')) { |
|
166 | + geodir_action_geodir_sidebar_listings_top(); |
|
167 | + } elseif (geodir_is_page('detail')) { |
|
168 | + geodir_action_geodir_sidebar_detail_top(); |
|
169 | + } elseif (geodir_is_page('search')) { |
|
170 | + geodir_action_geodir_sidebar_search_top(); |
|
171 | + } elseif (geodir_is_page('author')) { |
|
172 | + geodir_action_geodir_sidebar_author_top(); |
|
173 | + } |
|
174 | 174 | |
175 | 175 | |
176 | 176 | } |
@@ -183,12 +183,12 @@ discard block |
||
183 | 183 | */ |
184 | 184 | function geodir_replace_breadcrumb() |
185 | 185 | { |
186 | - if (is_front_page() && get_option('geodir_set_as_home') && !geodir_is_page('login')) { |
|
187 | - } else { |
|
188 | - echo '<div class="geodir-breadcrumb-bar"><div class="wrap">'; |
|
189 | - geodir_breadcrumb(); |
|
190 | - echo '</div></div>'; |
|
191 | - } |
|
186 | + if (is_front_page() && get_option('geodir_set_as_home') && !geodir_is_page('login')) { |
|
187 | + } else { |
|
188 | + echo '<div class="geodir-breadcrumb-bar"><div class="wrap">'; |
|
189 | + geodir_breadcrumb(); |
|
190 | + echo '</div></div>'; |
|
191 | + } |
|
192 | 192 | } |
193 | 193 | |
194 | 194 | // Force Full Width on signup page |
@@ -201,9 +201,9 @@ discard block |
||
201 | 201 | */ |
202 | 202 | function geodir_genesis_meta() |
203 | 203 | { |
204 | - if (geodir_is_page('login')) { |
|
205 | - add_filter('genesis_pre_get_option_site_layout', '__genesis_return_full_width_content'); |
|
206 | - } |
|
204 | + if (geodir_is_page('login')) { |
|
205 | + add_filter('genesis_pre_get_option_site_layout', '__genesis_return_full_width_content'); |
|
206 | + } |
|
207 | 207 | } |
208 | 208 | |
209 | 209 | add_action('geodir_add_listing_page_title', 'geodir_add_listing_page_title_genesis_before', 8); |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | function geodir_add_listing_page_title_genesis_before() |
217 | 217 | { |
218 | 218 | |
219 | - echo "<div class='entry' >"; |
|
219 | + echo "<div class='entry' >"; |
|
220 | 220 | } |
221 | 221 | |
222 | 222 | |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | function geodir_add_listing_form_genesis_after() |
231 | 231 | { |
232 | 232 | |
233 | - echo "</div>"; |
|
233 | + echo "</div>"; |
|
234 | 234 | } |
235 | 235 | |
236 | 236 | |
@@ -249,38 +249,38 @@ discard block |
||
249 | 249 | { |
250 | 250 | |
251 | 251 | |
252 | - $title = ''; |
|
253 | - $subtitle = ''; |
|
254 | - |
|
255 | - if (geodir_is_page('listing')) { |
|
256 | - echo '<div class="wrap gd-title-wrap">'; |
|
257 | - geodir_action_listings_title(); |
|
258 | - echo '</div>'; |
|
259 | - } |
|
260 | - |
|
261 | - if (geodir_is_page('add-listing')) { |
|
262 | - echo '<div class="wrap gd-title-wrap">'; |
|
263 | - geodir_action_add_listing_page_title(); |
|
264 | - echo '</div>'; |
|
265 | - } |
|
266 | - |
|
267 | - if (geodir_is_page('author')) { |
|
268 | - echo '<div class="wrap gd-title-wrap">'; |
|
269 | - geodir_action_author_page_title(); |
|
270 | - echo '</div>'; |
|
271 | - } |
|
272 | - |
|
273 | - if (geodir_is_page('detail') || geodir_is_page('preview')) { |
|
274 | - echo '<div class="wrap gd-title-wrap">'; |
|
275 | - echo get_the_title(); |
|
276 | - echo '</div>'; |
|
277 | - } |
|
278 | - |
|
279 | - if (geodir_is_page('search')) { |
|
280 | - echo '<div class="wrap gd-title-wrap">'; |
|
281 | - geodir_action_search_page_title(); |
|
282 | - echo '</div>'; |
|
283 | - } |
|
252 | + $title = ''; |
|
253 | + $subtitle = ''; |
|
254 | + |
|
255 | + if (geodir_is_page('listing')) { |
|
256 | + echo '<div class="wrap gd-title-wrap">'; |
|
257 | + geodir_action_listings_title(); |
|
258 | + echo '</div>'; |
|
259 | + } |
|
260 | + |
|
261 | + if (geodir_is_page('add-listing')) { |
|
262 | + echo '<div class="wrap gd-title-wrap">'; |
|
263 | + geodir_action_add_listing_page_title(); |
|
264 | + echo '</div>'; |
|
265 | + } |
|
266 | + |
|
267 | + if (geodir_is_page('author')) { |
|
268 | + echo '<div class="wrap gd-title-wrap">'; |
|
269 | + geodir_action_author_page_title(); |
|
270 | + echo '</div>'; |
|
271 | + } |
|
272 | + |
|
273 | + if (geodir_is_page('detail') || geodir_is_page('preview')) { |
|
274 | + echo '<div class="wrap gd-title-wrap">'; |
|
275 | + echo get_the_title(); |
|
276 | + echo '</div>'; |
|
277 | + } |
|
278 | + |
|
279 | + if (geodir_is_page('search')) { |
|
280 | + echo '<div class="wrap gd-title-wrap">'; |
|
281 | + geodir_action_search_page_title(); |
|
282 | + echo '</div>'; |
|
283 | + } |
|
284 | 284 | } |
285 | 285 | |
286 | 286 | |
@@ -293,8 +293,8 @@ discard block |
||
293 | 293 | */ |
294 | 294 | function gd_genesis_listing_page_title_bar() |
295 | 295 | { |
296 | - geodir_action_listings_title(); |
|
297 | - //geodir_action_listings_description(); |
|
296 | + geodir_action_listings_title(); |
|
297 | + //geodir_action_listings_description(); |
|
298 | 298 | } |
299 | 299 | |
300 | 300 | |
@@ -307,19 +307,19 @@ discard block |
||
307 | 307 | */ |
308 | 308 | function gd_compat_php_genesis_geo_1280_fix() |
309 | 309 | { |
310 | - if (function_exists('geo1280_search_bar')) { |
|
311 | - remove_action('genesis_after_header', 'geo1280_search_bar', 20); |
|
312 | - add_action('genesis_after_header', 'geo1280_search_bar_fix', 4); |
|
310 | + if (function_exists('geo1280_search_bar')) { |
|
311 | + remove_action('genesis_after_header', 'geo1280_search_bar', 20); |
|
312 | + add_action('genesis_after_header', 'geo1280_search_bar_fix', 4); |
|
313 | 313 | |
314 | - // |
|
314 | + // |
|
315 | 315 | |
316 | - remove_action('genesis_after_header', 'geodir_replace_breadcrumb', 20); |
|
317 | - remove_action('genesis_before_content_sidebar_wrap', 'geodir_replace_breadcrumb', 20); |
|
318 | - add_action('geodir_wrapper_open', 'geodir_replace_breadcrumb', 105); |
|
316 | + remove_action('genesis_after_header', 'geodir_replace_breadcrumb', 20); |
|
317 | + remove_action('genesis_before_content_sidebar_wrap', 'geodir_replace_breadcrumb', 20); |
|
318 | + add_action('geodir_wrapper_open', 'geodir_replace_breadcrumb', 105); |
|
319 | 319 | |
320 | - remove_action('genesis_before_content_sidebar_wrap', 'geo1280_page_title', 10); |
|
321 | - add_action('geodir_wrapper_open', 'geo1280_page_title', 101); |
|
322 | - } |
|
320 | + remove_action('genesis_before_content_sidebar_wrap', 'geo1280_page_title', 10); |
|
321 | + add_action('geodir_wrapper_open', 'geo1280_page_title', 101); |
|
322 | + } |
|
323 | 323 | } |
324 | 324 | |
325 | 325 | /** |
@@ -331,11 +331,11 @@ discard block |
||
331 | 331 | function geo1280_search_bar_fix() |
332 | 332 | { |
333 | 333 | |
334 | - echo '<div class="geo1280-placeholder"></div>'; |
|
335 | - if (is_active_sidebar('search-bar')) { |
|
336 | - genesis_widget_area('search-bar', array( |
|
337 | - 'before' => '<div class="search-bar widget-area"><div class="wrap">', |
|
338 | - 'after' => '</div></div>', |
|
339 | - )); |
|
340 | - } |
|
334 | + echo '<div class="geo1280-placeholder"></div>'; |
|
335 | + if (is_active_sidebar('search-bar')) { |
|
336 | + genesis_widget_area('search-bar', array( |
|
337 | + 'before' => '<div class="search-bar widget-area"><div class="wrap">', |
|
338 | + 'after' => '</div></div>', |
|
339 | + )); |
|
340 | + } |
|
341 | 341 | } |
@@ -1,43 +1,43 @@ discard block |
||
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 | - // REMOVE BREADCRUMB |
|
20 | - remove_action('geodir_detail_before_main_content', 'geodir_breadcrumb', 20); |
|
21 | - remove_action('geodir_listings_before_main_content', 'geodir_breadcrumb', 20); |
|
22 | - remove_action('geodir_author_before_main_content', 'geodir_breadcrumb', 20); |
|
23 | - remove_action('geodir_search_before_main_content', 'geodir_breadcrumb', 20); |
|
24 | - remove_action('geodir_home_before_main_content', 'geodir_breadcrumb', 20); |
|
25 | - remove_action('geodir_location_before_main_content', 'geodir_breadcrumb', 20); |
|
26 | - |
|
27 | - // REMOVE PAGE TITLES |
|
28 | - remove_action('geodir_listings_page_title', 'geodir_action_listings_title', 10); |
|
29 | - remove_action('geodir_add_listing_page_title', 'geodir_action_add_listing_page_title', 10); |
|
30 | - remove_action('geodir_details_main_content', 'geodir_action_page_title', 20); |
|
31 | - remove_action('geodir_search_page_title', 'geodir_action_search_page_title', 10); |
|
32 | - remove_action('geodir_author_page_title', 'geodir_action_author_page_title', 10); |
|
33 | - |
|
34 | - |
|
35 | - // CAHNGE PAGE TITLES |
|
36 | - remove_action('page_title', 'mk_page_title'); |
|
37 | - add_action('page_title', 'gd_mk_page_title'); |
|
38 | - // CHANGE BREADCRUMS FOR GD PAGES |
|
39 | - remove_action('theme_breadcrumbs', 'mk_theme_breadcrumbs'); |
|
40 | - add_action('theme_breadcrumbs', 'gd_mk_theme_breadcrumbs'); |
|
19 | + // REMOVE BREADCRUMB |
|
20 | + remove_action('geodir_detail_before_main_content', 'geodir_breadcrumb', 20); |
|
21 | + remove_action('geodir_listings_before_main_content', 'geodir_breadcrumb', 20); |
|
22 | + remove_action('geodir_author_before_main_content', 'geodir_breadcrumb', 20); |
|
23 | + remove_action('geodir_search_before_main_content', 'geodir_breadcrumb', 20); |
|
24 | + remove_action('geodir_home_before_main_content', 'geodir_breadcrumb', 20); |
|
25 | + remove_action('geodir_location_before_main_content', 'geodir_breadcrumb', 20); |
|
26 | + |
|
27 | + // REMOVE PAGE TITLES |
|
28 | + remove_action('geodir_listings_page_title', 'geodir_action_listings_title', 10); |
|
29 | + remove_action('geodir_add_listing_page_title', 'geodir_action_add_listing_page_title', 10); |
|
30 | + remove_action('geodir_details_main_content', 'geodir_action_page_title', 20); |
|
31 | + remove_action('geodir_search_page_title', 'geodir_action_search_page_title', 10); |
|
32 | + remove_action('geodir_author_page_title', 'geodir_action_author_page_title', 10); |
|
33 | + |
|
34 | + |
|
35 | + // CAHNGE PAGE TITLES |
|
36 | + remove_action('page_title', 'mk_page_title'); |
|
37 | + add_action('page_title', 'gd_mk_page_title'); |
|
38 | + // CHANGE BREADCRUMS FOR GD PAGES |
|
39 | + remove_action('theme_breadcrumbs', 'mk_theme_breadcrumbs'); |
|
40 | + add_action('theme_breadcrumbs', 'gd_mk_theme_breadcrumbs'); |
|
41 | 41 | |
42 | 42 | |
43 | 43 | } |
@@ -52,19 +52,19 @@ discard block |
||
52 | 52 | function gd_mk_theme_breadcrumbs() |
53 | 53 | { |
54 | 54 | |
55 | - if (is_page_geodir_home() || geodir_is_page('location')) { |
|
56 | - jupiter_geodir_breadcrumb(); |
|
57 | - } elseif (geodir_is_page('listing')) { |
|
58 | - jupiter_geodir_breadcrumb(); |
|
59 | - } elseif (geodir_is_page('detail')) { |
|
60 | - jupiter_geodir_breadcrumb(); |
|
61 | - } elseif (geodir_is_page('search')) { |
|
62 | - jupiter_geodir_breadcrumb(); |
|
63 | - } elseif (geodir_is_page('author')) { |
|
64 | - jupiter_geodir_breadcrumb(); |
|
65 | - } else { |
|
66 | - mk_theme_breadcrumbs(); |
|
67 | - } |
|
55 | + if (is_page_geodir_home() || geodir_is_page('location')) { |
|
56 | + jupiter_geodir_breadcrumb(); |
|
57 | + } elseif (geodir_is_page('listing')) { |
|
58 | + jupiter_geodir_breadcrumb(); |
|
59 | + } elseif (geodir_is_page('detail')) { |
|
60 | + jupiter_geodir_breadcrumb(); |
|
61 | + } elseif (geodir_is_page('search')) { |
|
62 | + jupiter_geodir_breadcrumb(); |
|
63 | + } elseif (geodir_is_page('author')) { |
|
64 | + jupiter_geodir_breadcrumb(); |
|
65 | + } else { |
|
66 | + mk_theme_breadcrumbs(); |
|
67 | + } |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | /** |
@@ -76,35 +76,35 @@ discard block |
||
76 | 76 | */ |
77 | 77 | function gd_mk_page_title() |
78 | 78 | { |
79 | - global $wp; |
|
80 | - |
|
81 | - |
|
82 | - if (is_page_geodir_home() || geodir_is_page('location')) { |
|
83 | - jupiter_geodir_page_title(); |
|
84 | - } elseif (geodir_is_page('listing')) { |
|
85 | - ob_start(); // Start buffering; |
|
86 | - geodir_action_listings_title(); |
|
87 | - $gd_title = ob_get_clean(); |
|
88 | - $title_p = explode('">', $gd_title); |
|
89 | - $title = str_replace('</h1></header>', "", $title_p[2]); |
|
90 | - jupiter_geodir_page_title($title); |
|
91 | - } elseif (geodir_is_page('search')) { |
|
92 | - ob_start(); // Start buffering; |
|
93 | - geodir_action_listings_title(); |
|
94 | - $gd_title = ob_get_clean(); |
|
95 | - $title_p = explode('">', $gd_title); |
|
96 | - $title = str_replace('</h1></header>', "", $title_p[2]); |
|
97 | - jupiter_geodir_page_title($title); |
|
98 | - } elseif (geodir_is_page('author')) { |
|
99 | - ob_start(); // Start buffering; |
|
100 | - geodir_action_author_page_title(); |
|
101 | - $gd_title = ob_get_clean(); |
|
102 | - $gd_title = str_replace('<h1>', "", $gd_title); |
|
103 | - $gd_title = str_replace('</h1>', "", $gd_title); |
|
104 | - jupiter_geodir_page_title($gd_title); |
|
105 | - } else { |
|
106 | - mk_page_title(); |
|
107 | - } |
|
79 | + global $wp; |
|
80 | + |
|
81 | + |
|
82 | + if (is_page_geodir_home() || geodir_is_page('location')) { |
|
83 | + jupiter_geodir_page_title(); |
|
84 | + } elseif (geodir_is_page('listing')) { |
|
85 | + ob_start(); // Start buffering; |
|
86 | + geodir_action_listings_title(); |
|
87 | + $gd_title = ob_get_clean(); |
|
88 | + $title_p = explode('">', $gd_title); |
|
89 | + $title = str_replace('</h1></header>', "", $title_p[2]); |
|
90 | + jupiter_geodir_page_title($title); |
|
91 | + } elseif (geodir_is_page('search')) { |
|
92 | + ob_start(); // Start buffering; |
|
93 | + geodir_action_listings_title(); |
|
94 | + $gd_title = ob_get_clean(); |
|
95 | + $title_p = explode('">', $gd_title); |
|
96 | + $title = str_replace('</h1></header>', "", $title_p[2]); |
|
97 | + jupiter_geodir_page_title($title); |
|
98 | + } elseif (geodir_is_page('author')) { |
|
99 | + ob_start(); // Start buffering; |
|
100 | + geodir_action_author_page_title(); |
|
101 | + $gd_title = ob_get_clean(); |
|
102 | + $gd_title = str_replace('<h1>', "", $gd_title); |
|
103 | + $gd_title = str_replace('</h1>', "", $gd_title); |
|
104 | + jupiter_geodir_page_title($gd_title); |
|
105 | + } else { |
|
106 | + mk_page_title(); |
|
107 | + } |
|
108 | 108 | |
109 | 109 | |
110 | 110 | } |
@@ -119,48 +119,48 @@ discard block |
||
119 | 119 | */ |
120 | 120 | function jupiter_geodir_breadcrumb() |
121 | 121 | { |
122 | - $item = ''; |
|
123 | - ob_start(); // Start buffering; |
|
124 | - geodir_breadcrumb(); |
|
125 | - $gd_crums = ob_get_clean(); |
|
126 | - if ($gd_crums) { |
|
127 | - $gd_crums = str_replace('<div class="geodir-breadcrumb clearfix"><ul id="breadcrumbs"><li>', "", $gd_crums); |
|
128 | - $gd_crums = str_replace('</li></ul></div>', "", $gd_crums); |
|
129 | - $gd_crums = str_replace(' > ', " > ", $gd_crums); |
|
130 | - $gd_crums = str_replace('</li><li>', "", $gd_crums); |
|
131 | - $gd_crums = explode(" > ", $gd_crums); |
|
132 | - $trail_end = array_pop($gd_crums); |
|
133 | - $gd_crums['trail_end'] = $trail_end; |
|
134 | - //print_r($gd_crums);exit; |
|
135 | - //print_r($trail); |
|
136 | - $item = $gd_crums; |
|
137 | - |
|
138 | - } |
|
139 | - if (!$item) { |
|
140 | - return; |
|
141 | - } |
|
142 | - global $mk_options, $post; |
|
143 | - $post_id = global_get_post_id(); |
|
144 | - |
|
145 | - if ($post_id) { |
|
146 | - $local_skining = get_post_meta($post_id, '_enable_local_backgrounds', true); |
|
147 | - $breadcrumb_skin = get_post_meta($post_id, '_breadcrumb_skin', true); |
|
148 | - if ($local_skining == 'true' && !empty($breadcrumb_skin)) { |
|
149 | - $breadcrumb_skin_class = $breadcrumb_skin; |
|
150 | - } else { |
|
151 | - $breadcrumb_skin_class = $mk_options['breadcrumb_skin']; |
|
152 | - } |
|
153 | - } else { |
|
154 | - $breadcrumb_skin_class = $mk_options['breadcrumb_skin']; |
|
155 | - } |
|
156 | - |
|
157 | - |
|
158 | - $delimiter = ' / '; |
|
159 | - |
|
160 | - echo '<div id="mk-breadcrumbs"><div class="mk-breadcrumbs-inner ' . $breadcrumb_skin_class . '-skin">'; |
|
161 | - |
|
162 | - echo implode($delimiter, $item); |
|
163 | - echo "</div></div>"; |
|
122 | + $item = ''; |
|
123 | + ob_start(); // Start buffering; |
|
124 | + geodir_breadcrumb(); |
|
125 | + $gd_crums = ob_get_clean(); |
|
126 | + if ($gd_crums) { |
|
127 | + $gd_crums = str_replace('<div class="geodir-breadcrumb clearfix"><ul id="breadcrumbs"><li>', "", $gd_crums); |
|
128 | + $gd_crums = str_replace('</li></ul></div>', "", $gd_crums); |
|
129 | + $gd_crums = str_replace(' > ', " > ", $gd_crums); |
|
130 | + $gd_crums = str_replace('</li><li>', "", $gd_crums); |
|
131 | + $gd_crums = explode(" > ", $gd_crums); |
|
132 | + $trail_end = array_pop($gd_crums); |
|
133 | + $gd_crums['trail_end'] = $trail_end; |
|
134 | + //print_r($gd_crums);exit; |
|
135 | + //print_r($trail); |
|
136 | + $item = $gd_crums; |
|
137 | + |
|
138 | + } |
|
139 | + if (!$item) { |
|
140 | + return; |
|
141 | + } |
|
142 | + global $mk_options, $post; |
|
143 | + $post_id = global_get_post_id(); |
|
144 | + |
|
145 | + if ($post_id) { |
|
146 | + $local_skining = get_post_meta($post_id, '_enable_local_backgrounds', true); |
|
147 | + $breadcrumb_skin = get_post_meta($post_id, '_breadcrumb_skin', true); |
|
148 | + if ($local_skining == 'true' && !empty($breadcrumb_skin)) { |
|
149 | + $breadcrumb_skin_class = $breadcrumb_skin; |
|
150 | + } else { |
|
151 | + $breadcrumb_skin_class = $mk_options['breadcrumb_skin']; |
|
152 | + } |
|
153 | + } else { |
|
154 | + $breadcrumb_skin_class = $mk_options['breadcrumb_skin']; |
|
155 | + } |
|
156 | + |
|
157 | + |
|
158 | + $delimiter = ' / '; |
|
159 | + |
|
160 | + echo '<div id="mk-breadcrumbs"><div class="mk-breadcrumbs-inner ' . $breadcrumb_skin_class . '-skin">'; |
|
161 | + |
|
162 | + echo implode($delimiter, $item); |
|
163 | + echo "</div></div>"; |
|
164 | 164 | |
165 | 165 | } |
166 | 166 | |
@@ -174,41 +174,41 @@ discard block |
||
174 | 174 | */ |
175 | 175 | function jupiter_geodir_page_title($title = '', $subtitle = '') |
176 | 176 | { |
177 | - global $mk_options; |
|
178 | - |
|
179 | - $post_id = global_get_post_id(); |
|
180 | - $shadow_css = ''; |
|
181 | - if ($mk_options['page_title_shadow'] == 'true') { |
|
182 | - $shadow_css = 'mk-drop-shadow'; |
|
183 | - } |
|
184 | - |
|
185 | - $align = !empty($align) ? $align : 'left'; |
|
186 | - |
|
187 | - //$title = 'xxxx'; |
|
188 | - echo '<section id="mk-page-introduce" class="intro-' . $align . '">'; |
|
189 | - echo '<div class="mk-grid">'; |
|
190 | - if (!empty($title)) { |
|
191 | - echo '<h1 class="page-introduce-title ' . $shadow_css . '">' . $title . '</h1>'; |
|
192 | - |
|
193 | - } |
|
194 | - |
|
195 | - if (!empty($subtitle)) { |
|
196 | - echo '<div class="page-introduce-subtitle">'; |
|
197 | - echo $subtitle; |
|
198 | - echo '</div>'; |
|
199 | - } |
|
200 | - if ($mk_options['disable_breadcrumb'] == 'true') { |
|
201 | - if (get_post_meta($post_id, '_disable_breadcrumb', true) != 'false') { |
|
202 | - /** |
|
203 | - * Calls the theme breadcrumbs for Jupiter theme. |
|
204 | - * |
|
205 | - * @since 1.4.0 |
|
206 | - */ |
|
207 | - do_action('theme_breadcrumbs', $post_id); |
|
208 | - } |
|
209 | - } |
|
210 | - |
|
211 | - echo '<div class="clearboth"></div></div></section>'; |
|
177 | + global $mk_options; |
|
178 | + |
|
179 | + $post_id = global_get_post_id(); |
|
180 | + $shadow_css = ''; |
|
181 | + if ($mk_options['page_title_shadow'] == 'true') { |
|
182 | + $shadow_css = 'mk-drop-shadow'; |
|
183 | + } |
|
184 | + |
|
185 | + $align = !empty($align) ? $align : 'left'; |
|
186 | + |
|
187 | + //$title = 'xxxx'; |
|
188 | + echo '<section id="mk-page-introduce" class="intro-' . $align . '">'; |
|
189 | + echo '<div class="mk-grid">'; |
|
190 | + if (!empty($title)) { |
|
191 | + echo '<h1 class="page-introduce-title ' . $shadow_css . '">' . $title . '</h1>'; |
|
192 | + |
|
193 | + } |
|
194 | + |
|
195 | + if (!empty($subtitle)) { |
|
196 | + echo '<div class="page-introduce-subtitle">'; |
|
197 | + echo $subtitle; |
|
198 | + echo '</div>'; |
|
199 | + } |
|
200 | + if ($mk_options['disable_breadcrumb'] == 'true') { |
|
201 | + if (get_post_meta($post_id, '_disable_breadcrumb', true) != 'false') { |
|
202 | + /** |
|
203 | + * Calls the theme breadcrumbs for Jupiter theme. |
|
204 | + * |
|
205 | + * @since 1.4.0 |
|
206 | + */ |
|
207 | + do_action('theme_breadcrumbs', $post_id); |
|
208 | + } |
|
209 | + } |
|
210 | + |
|
211 | + echo '<div class="clearboth"></div></div></section>'; |
|
212 | 212 | |
213 | 213 | |
214 | 214 | } |