@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | * @package GeoDirectory |
7 | 7 | */ |
8 | 8 | |
9 | -defined( 'ABSPATH' ) || exit; |
|
9 | +defined('ABSPATH') || exit; |
|
10 | 10 | |
11 | 11 | /** |
12 | 12 | * Abstract class that is intended to be extended by specific privacy class. |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | * |
44 | 44 | * @param string $name Plugin identifier. |
45 | 45 | */ |
46 | - public function __construct( $name = '' ) { |
|
46 | + public function __construct($name = '') { |
|
47 | 47 | $this->name = $name; |
48 | 48 | $this->init(); |
49 | 49 | } |
@@ -52,11 +52,11 @@ discard block |
||
52 | 52 | * Hook in events. |
53 | 53 | */ |
54 | 54 | protected function init() { |
55 | - add_action( 'admin_init', array( $this, 'add_privacy_message' ) ); |
|
55 | + add_action('admin_init', array($this, 'add_privacy_message')); |
|
56 | 56 | // Register data exporters |
57 | - add_filter( 'wp_privacy_personal_data_exporters', array( $this, 'register_exporters' ), 5 ); |
|
57 | + add_filter('wp_privacy_personal_data_exporters', array($this, 'register_exporters'), 5); |
|
58 | 58 | // Register data erasers |
59 | - add_filter( 'wp_privacy_personal_data_erasers', array( $this, 'register_erasers' ) ); |
|
59 | + add_filter('wp_privacy_personal_data_erasers', array($this, 'register_erasers')); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | /** |
@@ -65,8 +65,8 @@ discard block |
||
65 | 65 | public function add_privacy_message() { |
66 | 66 | $content = $this->get_privacy_message(); |
67 | 67 | |
68 | - if ( function_exists( 'wp_add_privacy_policy_content' ) && $content ) { |
|
69 | - wp_add_privacy_policy_content( $this->name, $this->get_privacy_message() ); |
|
68 | + if (function_exists('wp_add_privacy_policy_content') && $content) { |
|
69 | + wp_add_privacy_policy_content($this->name, $this->get_privacy_message()); |
|
70 | 70 | } |
71 | 71 | } |
72 | 72 | |
@@ -86,9 +86,9 @@ discard block |
||
86 | 86 | * @param array $exporters List of exporter callbacks. |
87 | 87 | * @return array |
88 | 88 | */ |
89 | - public function register_exporters( $exporters = array() ) { |
|
90 | - foreach ( $this->exporters as $id => $exporter ) { |
|
91 | - $exporters[ $id ] = $exporter; |
|
89 | + public function register_exporters($exporters = array()) { |
|
90 | + foreach ($this->exporters as $id => $exporter) { |
|
91 | + $exporters[$id] = $exporter; |
|
92 | 92 | } |
93 | 93 | return $exporters; |
94 | 94 | } |
@@ -99,9 +99,9 @@ discard block |
||
99 | 99 | * @param array $erasers List of eraser callbacks. |
100 | 100 | * @return array |
101 | 101 | */ |
102 | - public function register_erasers( $erasers = array() ) { |
|
103 | - foreach ( $this->erasers as $id => $eraser ) { |
|
104 | - $erasers[ $id ] = $eraser; |
|
102 | + public function register_erasers($erasers = array()) { |
|
103 | + foreach ($this->erasers as $id => $eraser) { |
|
104 | + $erasers[$id] = $eraser; |
|
105 | 105 | } |
106 | 106 | return $erasers; |
107 | 107 | } |
@@ -113,8 +113,8 @@ discard block |
||
113 | 113 | * @param string $name Exporter name. |
114 | 114 | * @param string $callback Exporter callback. |
115 | 115 | */ |
116 | - public function add_exporter( $id, $name, $callback ) { |
|
117 | - $this->exporters[ $id ] = array( |
|
116 | + public function add_exporter($id, $name, $callback) { |
|
117 | + $this->exporters[$id] = array( |
|
118 | 118 | 'exporter_friendly_name' => $name, |
119 | 119 | 'callback' => $callback, |
120 | 120 | ); |
@@ -128,8 +128,8 @@ discard block |
||
128 | 128 | * @param string $name Exporter name. |
129 | 129 | * @param string $callback Exporter callback. |
130 | 130 | */ |
131 | - public function add_eraser( $id, $name, $callback ) { |
|
132 | - $this->erasers[ $id ] = array( |
|
131 | + public function add_eraser($id, $name, $callback) { |
|
132 | + $this->erasers[$id] = array( |
|
133 | 133 | 'eraser_friendly_name' => $name, |
134 | 134 | 'callback' => $callback, |
135 | 135 | ); |
@@ -136,7 +136,7 @@ |
||
136 | 136 | |
137 | 137 | global $wp_version; |
138 | 138 | // If curent WP Version >= 4.9.6. |
139 | -if ( version_compare( $wp_version, '4.9.6', '>=' ) ) { |
|
140 | - include_once( 'geodirectory-functions/privacy/abstract-geodir-privacy.php' ); |
|
141 | - include_once( 'geodirectory-functions/privacy/class-geodir-privacy.php' ); |
|
139 | +if (version_compare($wp_version, '4.9.6', '>=')) { |
|
140 | + include_once('geodirectory-functions/privacy/abstract-geodir-privacy.php'); |
|
141 | + include_once('geodirectory-functions/privacy/class-geodir-privacy.php'); |
|
142 | 142 | } |
143 | 143 | \ No newline at end of file |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * @package GeoDirectory |
10 | 10 | */ |
11 | 11 | |
12 | -if ( ! defined( 'ABSPATH' ) ) { |
|
12 | +if (!defined('ABSPATH')) { |
|
13 | 13 | exit; |
14 | 14 | } |
15 | 15 | |
@@ -18,22 +18,22 @@ discard block |
||
18 | 18 | <!DOCTYPE html> |
19 | 19 | <html dir="<?php echo is_rtl() ? 'rtl' : 'ltr'?>"> |
20 | 20 | <head> |
21 | - <meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo( 'charset' ); ?>" /> |
|
21 | + <meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo('charset'); ?>" /> |
|
22 | 22 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
23 | 23 | <meta name="robots" content="noindex,nofollow"> |
24 | - <title><?php echo wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ); ?></title> |
|
24 | + <title><?php echo wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); ?></title> |
|
25 | 25 | </head> |
26 | 26 | <body <?php echo is_rtl() ? 'rightmargin' : 'leftmargin'; ?>="0" marginwidth="0" topmargin="0" marginheight="0" offset="0"> |
27 | 27 | |
28 | - <?php do_action( 'geodir_email_content_before' ); ?> |
|
28 | + <?php do_action('geodir_email_content_before'); ?> |
|
29 | 29 | |
30 | 30 | <?php |
31 | - if ( ! empty( $geodir_email_content ) ) { |
|
32 | - echo wpautop( wptexturize( $geodir_email_content ) ); |
|
31 | + if (!empty($geodir_email_content)) { |
|
32 | + echo wpautop(wptexturize($geodir_email_content)); |
|
33 | 33 | } |
34 | 34 | ?> |
35 | 35 | |
36 | - <?php do_action( 'geodir_email_content_after' ); ?> |
|
36 | + <?php do_action('geodir_email_content_after'); ?> |
|
37 | 37 | |
38 | 38 | </body> |
39 | 39 | </html> |
40 | 40 | \ No newline at end of file |
@@ -28,68 +28,68 @@ |
||
28 | 28 | action="<?php echo get_permalink($post_info->ID); ?>"> |
29 | 29 | |
30 | 30 | <?php |
31 | - wp_nonce_field( 'send_inquiry_'.$post_info->ID ); |
|
32 | - ?> |
|
31 | + wp_nonce_field( 'send_inquiry_'.$post_info->ID ); |
|
32 | + ?> |
|
33 | 33 | <input type="hidden" name="sendact" value="send_inqury"/> |
34 | 34 | <input type="hidden" name="pid" value="<?php echo $post_info->ID;?>"/> |
35 | 35 | |
36 | 36 | <h3><?php |
37 | - /** |
|
38 | - * Filter the title for the send inquiry popup form. |
|
39 | - * |
|
40 | - * @since 1.0.0 |
|
41 | - * @param string $title The title for the form, defaults to global `SEND_INQUIRY` text. |
|
42 | - */ |
|
43 | - echo apply_filters('geodir_send_inquiry_page_title', SEND_INQUIRY);?> </h3> |
|
37 | + /** |
|
38 | + * Filter the title for the send inquiry popup form. |
|
39 | + * |
|
40 | + * @since 1.0.0 |
|
41 | + * @param string $title The title for the form, defaults to global `SEND_INQUIRY` text. |
|
42 | + */ |
|
43 | + echo apply_filters('geodir_send_inquiry_page_title', SEND_INQUIRY);?> </h3> |
|
44 | 44 | |
45 | 45 | <p id="inquiry_send_success" class="sucess_msg" style="display:none;"></p> |
46 | 46 | <?php |
47 | - /** |
|
48 | - * Called before each field in the send inquiry template. |
|
49 | - * |
|
50 | - * @since 1.0.0 |
|
51 | - * @param string $field The field name the actions is called before. |
|
52 | - */ |
|
53 | - do_action('geodir_before_inquiry_form_field', 'inq_name');?> |
|
47 | + /** |
|
48 | + * Called before each field in the send inquiry template. |
|
49 | + * |
|
50 | + * @since 1.0.0 |
|
51 | + * @param string $field The field name the actions is called before. |
|
52 | + */ |
|
53 | + do_action('geodir_before_inquiry_form_field', 'inq_name');?> |
|
54 | 54 | <div class="row clearfix"> |
55 | 55 | <input required field_type="text" name="inq_name" type="text" value="" placeholder="<?php _e('Your Name', 'geodirectory');?>"/> |
56 | 56 | </div> |
57 | 57 | <?php |
58 | - /** |
|
59 | - * Called after each field in the send inquiry template. |
|
60 | - * |
|
61 | - * @since 1.0.0 |
|
62 | - * @param string $field The field name the actions is called after. |
|
63 | - */ |
|
64 | - do_action('geodir_after_inquiry_form_field', 'inq_name');?> |
|
58 | + /** |
|
59 | + * Called after each field in the send inquiry template. |
|
60 | + * |
|
61 | + * @since 1.0.0 |
|
62 | + * @param string $field The field name the actions is called after. |
|
63 | + */ |
|
64 | + do_action('geodir_after_inquiry_form_field', 'inq_name');?> |
|
65 | 65 | <?php |
66 | - /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
67 | - do_action('geodir_before_inquiry_form_field', 'inq_email');?> |
|
66 | + /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
67 | + do_action('geodir_before_inquiry_form_field', 'inq_email');?> |
|
68 | 68 | <div class="row clearfix"> |
69 | 69 | <input required field_type="email" name="inq_email" type="email" value="" placeholder="<?php _e('Email', 'geodirectory');?>"/> |
70 | 70 | </div> |
71 | 71 | <?php |
72 | - /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
73 | - do_action('geodir_after_inquiry_form_field', 'inq_email');?> |
|
72 | + /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
73 | + do_action('geodir_after_inquiry_form_field', 'inq_email');?> |
|
74 | 74 | <?php |
75 | - /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
76 | - do_action('geodir_before_inquiry_form_field', 'inq_phone');?> |
|
75 | + /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
76 | + do_action('geodir_before_inquiry_form_field', 'inq_phone');?> |
|
77 | 77 | <div class="row clearfix"> |
78 | 78 | <input name="inq_phone" id="agt_mail_phone" type="text" value="" placeholder="<?php _e('Phone number', 'geodirectory');?>"/> |
79 | 79 | </div> |
80 | 80 | <?php |
81 | - /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
82 | - do_action('geodir_after_inquiry_form_field', 'inq_phone');?> |
|
81 | + /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
82 | + do_action('geodir_after_inquiry_form_field', 'inq_phone');?> |
|
83 | 83 | <?php |
84 | - /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
85 | - do_action('geodir_before_inquiry_form_field', 'inq_msg');?> |
|
84 | + /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
85 | + do_action('geodir_before_inquiry_form_field', 'inq_msg');?> |
|
86 | 86 | <div class="row clearfix"> |
87 | 87 | <textarea required field_type="textarea" name="inq_msg" cols="" |
88 | 88 | rows="" placeholder="<?php echo SEND_INQUIRY_SAMPLE_CONTENT;?>"></textarea> |
89 | 89 | </div> |
90 | 90 | <?php |
91 | - /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
92 | - do_action('geodir_after_inquiry_form_field', 'inq_msg');?> |
|
91 | + /** This action is documented in geodirectory-templates/popup-forms.php */ |
|
92 | + do_action('geodir_after_inquiry_form_field', 'inq_msg');?> |
|
93 | 93 | <input name="Send" type="submit" value="<?php _e('Send', 'geodirectory');?>" |
94 | 94 | class="button clearfix"/> |
95 | 95 | </form> |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * @param int $post_id The post id requested by the popup. |
20 | 20 | * @param object $post_info The post object requested by the popup. |
21 | 21 | */ |
22 | -do_action('geodir_popup_forms_template_start',$post_id,$post_info); |
|
22 | +do_action('geodir_popup_forms_template_start', $post_id, $post_info); |
|
23 | 23 | |
24 | 24 | if ($_REQUEST['popuptype'] == 'b_send_inquiry') { ?> |
25 | 25 | |
@@ -28,10 +28,10 @@ discard block |
||
28 | 28 | action="<?php echo get_permalink($post_info->ID); ?>"> |
29 | 29 | |
30 | 30 | <?php |
31 | - wp_nonce_field( 'send_inquiry_'.$post_info->ID ); |
|
31 | + wp_nonce_field('send_inquiry_'.$post_info->ID); |
|
32 | 32 | ?> |
33 | 33 | <input type="hidden" name="sendact" value="send_inqury"/> |
34 | - <input type="hidden" name="pid" value="<?php echo $post_info->ID;?>"/> |
|
34 | + <input type="hidden" name="pid" value="<?php echo $post_info->ID; ?>"/> |
|
35 | 35 | |
36 | 36 | <h3><?php |
37 | 37 | /** |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | * @since 1.0.0 |
41 | 41 | * @param string $title The title for the form, defaults to global `SEND_INQUIRY` text. |
42 | 42 | */ |
43 | - echo apply_filters('geodir_send_inquiry_page_title', SEND_INQUIRY);?> </h3> |
|
43 | + echo apply_filters('geodir_send_inquiry_page_title', SEND_INQUIRY); ?> </h3> |
|
44 | 44 | |
45 | 45 | <p id="inquiry_send_success" class="sucess_msg" style="display:none;"></p> |
46 | 46 | <?php |
@@ -50,9 +50,9 @@ discard block |
||
50 | 50 | * @since 1.0.0 |
51 | 51 | * @param string $field The field name the actions is called before. |
52 | 52 | */ |
53 | - do_action('geodir_before_inquiry_form_field', 'inq_name');?> |
|
53 | + do_action('geodir_before_inquiry_form_field', 'inq_name'); ?> |
|
54 | 54 | <div class="row clearfix"> |
55 | - <input required field_type="text" name="inq_name" type="text" value="" placeholder="<?php _e('Your Name', 'geodirectory');?>"/> |
|
55 | + <input required field_type="text" name="inq_name" type="text" value="" placeholder="<?php _e('Your Name', 'geodirectory'); ?>"/> |
|
56 | 56 | </div> |
57 | 57 | <?php |
58 | 58 | /** |
@@ -61,36 +61,36 @@ discard block |
||
61 | 61 | * @since 1.0.0 |
62 | 62 | * @param string $field The field name the actions is called after. |
63 | 63 | */ |
64 | - do_action('geodir_after_inquiry_form_field', 'inq_name');?> |
|
64 | + do_action('geodir_after_inquiry_form_field', 'inq_name'); ?> |
|
65 | 65 | <?php |
66 | 66 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
67 | - do_action('geodir_before_inquiry_form_field', 'inq_email');?> |
|
67 | + do_action('geodir_before_inquiry_form_field', 'inq_email'); ?> |
|
68 | 68 | <div class="row clearfix"> |
69 | - <input required field_type="email" name="inq_email" type="email" value="" placeholder="<?php _e('Email', 'geodirectory');?>"/> |
|
69 | + <input required field_type="email" name="inq_email" type="email" value="" placeholder="<?php _e('Email', 'geodirectory'); ?>"/> |
|
70 | 70 | </div> |
71 | 71 | <?php |
72 | 72 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
73 | - do_action('geodir_after_inquiry_form_field', 'inq_email');?> |
|
73 | + do_action('geodir_after_inquiry_form_field', 'inq_email'); ?> |
|
74 | 74 | <?php |
75 | 75 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
76 | - do_action('geodir_before_inquiry_form_field', 'inq_phone');?> |
|
76 | + do_action('geodir_before_inquiry_form_field', 'inq_phone'); ?> |
|
77 | 77 | <div class="row clearfix"> |
78 | - <input name="inq_phone" id="agt_mail_phone" type="text" value="" placeholder="<?php _e('Phone number', 'geodirectory');?>"/> |
|
78 | + <input name="inq_phone" id="agt_mail_phone" type="text" value="" placeholder="<?php _e('Phone number', 'geodirectory'); ?>"/> |
|
79 | 79 | </div> |
80 | 80 | <?php |
81 | 81 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
82 | - do_action('geodir_after_inquiry_form_field', 'inq_phone');?> |
|
82 | + do_action('geodir_after_inquiry_form_field', 'inq_phone'); ?> |
|
83 | 83 | <?php |
84 | 84 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
85 | - do_action('geodir_before_inquiry_form_field', 'inq_msg');?> |
|
85 | + do_action('geodir_before_inquiry_form_field', 'inq_msg'); ?> |
|
86 | 86 | <div class="row clearfix"> |
87 | 87 | <textarea required field_type="textarea" name="inq_msg" cols="" |
88 | - rows="" placeholder="<?php echo SEND_INQUIRY_SAMPLE_CONTENT;?>"></textarea> |
|
88 | + rows="" placeholder="<?php echo SEND_INQUIRY_SAMPLE_CONTENT; ?>"></textarea> |
|
89 | 89 | </div> |
90 | 90 | <?php |
91 | 91 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
92 | - do_action('geodir_after_inquiry_form_field', 'inq_msg');?> |
|
93 | - <input name="Send" type="submit" value="<?php _e('Send', 'geodirectory');?>" |
|
92 | + do_action('geodir_after_inquiry_form_field', 'inq_msg'); ?> |
|
93 | + <input name="Send" type="submit" value="<?php _e('Send', 'geodirectory'); ?>" |
|
94 | 94 | class="button clearfix"/> |
95 | 95 | </form> |
96 | 96 | </div> <?php |
@@ -17,278 +17,278 @@ |
||
17 | 17 | $geodir_settings['notifications_settings'] = apply_filters('geodir_notifications_settings', array( |
18 | 18 | |
19 | 19 | |
20 | - array('name' => __('Options', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'notification_options'), |
|
21 | - |
|
22 | - |
|
23 | - array('name' => __('Notification Options', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'notification_options'), |
|
24 | - |
|
25 | - array( |
|
26 | - 'name' => __('List of usable shortcodes', 'geodirectory'), |
|
27 | - 'desc' => __('[#client_name#],[#listing_link#],[#posted_date#],[#number_of_days#],[#number_of_grace_days#],[#login_url#],[#username#],[#user_email#],[#site_name_url#],[#renew_link#],[#post_id#],[#site_name#],[#from_email#](in most cases this will be the admin email, except for popup forms)', 'geodirectory'), |
|
28 | - 'id' => 'geodir_list_of_usable_shordcodes', |
|
29 | - 'type' => 'html_content', |
|
30 | - 'css' => 'min-width:300px;', |
|
31 | - 'std' => 'All Places' // Default value for the page title - changed in settings |
|
32 | - ), |
|
33 | - |
|
34 | - array( |
|
35 | - 'name' => __('Use advanced editor? (slow loading)', 'geodirectory'), |
|
36 | - 'desc' => __('Yes', 'geodirectory'), |
|
37 | - 'id' => 'geodir_tiny_editor', |
|
38 | - 'std' => 'yes', |
|
39 | - 'type' => 'radio', |
|
40 | - 'value' => '1', |
|
41 | - 'radiogroup' => 'start' |
|
42 | - ), |
|
43 | - array( |
|
44 | - 'name' => __('Use advanced editor?(slow loading)', 'geodirectory'), |
|
45 | - 'desc' => __('No', 'geodirectory'), |
|
46 | - 'id' => 'geodir_tiny_editor', |
|
47 | - 'std' => 'yes', |
|
48 | - 'type' => 'radio', |
|
49 | - 'value' => '0', |
|
50 | - 'radiogroup' => 'end' |
|
51 | - ), |
|
52 | - |
|
53 | - |
|
54 | - array('type' => 'sectionend', 'id' => 'notification_options'), |
|
55 | - |
|
56 | - |
|
57 | - array('name' => __('Site Bcc Options', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'site_bcc_options'), |
|
58 | - |
|
59 | - array('name' => __('Site Bcc Options', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'site_bcc_options'), |
|
60 | - |
|
61 | - array( |
|
62 | - 'name' => __('New user registration', 'geodirectory'), |
|
63 | - 'desc' => __('Yes', 'geodirectory'), |
|
64 | - 'id' => 'geodir_bcc_new_user', |
|
65 | - 'std' => 'yes', |
|
66 | - 'type' => 'radio', |
|
67 | - 'value' => '1', |
|
68 | - 'radiogroup' => 'start' |
|
69 | - ), |
|
70 | - array( |
|
71 | - 'name' => __('New user registration', 'geodirectory'), |
|
72 | - 'desc' => __('No', 'geodirectory'), |
|
73 | - 'id' => 'geodir_bcc_new_user', |
|
74 | - 'std' => 'yes', |
|
75 | - 'type' => 'radio', |
|
76 | - 'value' => '0', |
|
77 | - 'radiogroup' => 'end' |
|
78 | - ), |
|
79 | - |
|
80 | - array( |
|
81 | - 'name' => __('Send enquiry', 'geodirectory'), |
|
82 | - 'desc' => __('Yes', 'geodirectory'), |
|
83 | - 'id' => 'geodir_bcc_enquiry', |
|
84 | - 'std' => 'yes', |
|
85 | - 'type' => 'radio', |
|
86 | - 'value' => '1', |
|
87 | - 'radiogroup' => 'start' |
|
88 | - ), |
|
89 | - array( |
|
90 | - 'name' => __('Send enquiry', 'geodirectory'), |
|
91 | - 'desc' => __('No', 'geodirectory'), |
|
92 | - 'id' => 'geodir_bcc_enquiry', |
|
93 | - 'std' => 'yes', |
|
94 | - 'type' => 'radio', |
|
95 | - 'value' => '0', |
|
96 | - 'radiogroup' => 'end' |
|
97 | - ), |
|
98 | - |
|
99 | - |
|
100 | - array('type' => 'sectionend', 'id' => 'site_bcc_options'), |
|
101 | - |
|
102 | - |
|
103 | - array('name' => __('Admin Emails', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'admin_emails'), |
|
104 | - |
|
105 | - array('name' => __('Admin Emails', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'admin_emails'), |
|
106 | - |
|
107 | - array( |
|
108 | - 'name' => __('Notify to admin on post submit', 'geodirectory'), |
|
109 | - 'desc' => __('Yes', 'geodirectory'), |
|
110 | - 'id' => 'geodir_notify_post_submit', |
|
111 | - 'std' => '1', |
|
112 | - 'type' => 'radio', |
|
113 | - 'value' => '1', |
|
114 | - 'radiogroup' => 'start' |
|
115 | - ), |
|
116 | - array( |
|
117 | - 'name' => __('Notify to admin on post submit', 'geodirectory'), |
|
118 | - 'desc' => __('No', 'geodirectory'), |
|
119 | - 'id' => 'geodir_notify_post_submit', |
|
120 | - 'std' => '1', |
|
121 | - 'type' => 'radio', |
|
122 | - 'value' => '0', |
|
123 | - 'radiogroup' => 'end' |
|
124 | - ), |
|
125 | - array( |
|
126 | - 'name' => __('Post submit success to admin email', 'geodirectory'), |
|
127 | - 'desc' => '', |
|
128 | - 'id' => 'geodir_post_submited_success_email_subject_admin', |
|
129 | - 'type' => 'text', |
|
130 | - 'css' => 'min-width:300px;', |
|
131 | - 'std' => __('Post Submitted Successfully','geodirectory') // Default value for the page title - changed in settings |
|
132 | - ), |
|
133 | - array( |
|
134 | - 'name' => '', |
|
135 | - 'desc' => '', |
|
136 | - 'id' => 'geodir_post_submited_success_email_content_admin', |
|
137 | - 'css' => 'width:500px; height: 150px;', |
|
138 | - 'type' => 'textarea', |
|
139 | - 'std' => __('<p>Dear Admin,</p><p>A new listing has been published [#listing_link#]. This email is just for your information.</p><br><p>[#site_name#]</p>','geodirectory') |
|
140 | - ), |
|
141 | - array( |
|
142 | - 'name' => __('Notify Admin when listing edited by Author', 'geodirectory'), |
|
143 | - 'desc' => __('Yes', 'geodirectory'), |
|
144 | - 'id' => 'geodir_notify_post_edited', |
|
145 | - 'std' => '0', |
|
146 | - 'type' => 'radio', |
|
147 | - 'value' => '1', |
|
148 | - 'radiogroup' => 'start' |
|
149 | - ), |
|
150 | - array( |
|
151 | - 'name' => __('Notify Admin when listing edited by Author', 'geodirectory'), |
|
152 | - 'desc' => __('No', 'geodirectory'), |
|
153 | - 'id' => 'geodir_notify_post_edited', |
|
154 | - 'std' => '0', |
|
155 | - 'type' => 'radio', |
|
156 | - 'value' => '0', |
|
157 | - 'radiogroup' => 'end' |
|
158 | - ), |
|
159 | - array( |
|
160 | - 'name' => __('Listing edited by Author', 'geodirectory'), |
|
161 | - 'desc' => '', |
|
162 | - 'id' => 'geodir_post_edited_email_subject_admin', |
|
163 | - 'type' => 'text', |
|
164 | - 'css' => 'min-width:300px;', |
|
165 | - 'std' => __('[[#site_name#]] Listing edited by Author', 'geodirectory') |
|
166 | - ), |
|
167 | - array( |
|
168 | - 'name' => '', |
|
169 | - 'desc' => '', |
|
170 | - 'id' => 'geodir_post_edited_email_content_admin', |
|
171 | - 'css' => 'width:500px; height: 150px;', |
|
172 | - 'type' => 'textarea', |
|
173 | - 'std' => __('<p>Dear Admin,</p><p>A listing [#listing_link#] has been edited by it\'s author [#post_author_name#].</p><br><p><b>Listing Details:</b></p><p>Listing ID: [#post_id#]</p><p>Listing URL: [#listing_link#]</p><p>Date: [#current_date#]</p><br><p>This email is just for your information.</p><p>[#site_name#]</p>', 'geodirectory') |
|
174 | - ), |
|
175 | - |
|
176 | - |
|
177 | - array('type' => 'sectionend', 'id' => 'admin_emails'), |
|
178 | - |
|
179 | - |
|
180 | - array('name' => __('Client Emails', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'client_emails'), |
|
181 | - |
|
182 | - array('name' => __('Client Emails', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'client_emails'), |
|
183 | - |
|
184 | - array( |
|
185 | - 'name' => __('Post submit success to client email', 'geodirectory'), |
|
186 | - 'desc' => '', |
|
187 | - 'id' => 'geodir_post_submited_success_email_subject', |
|
188 | - 'type' => 'text', |
|
189 | - 'css' => 'min-width:300px;', |
|
190 | - 'std' => __('Post Submitted Successfully','geodirectory') // Default value for the page title - changed in settings |
|
191 | - ), |
|
192 | - array( |
|
193 | - 'name' => '', |
|
194 | - 'desc' => '', |
|
195 | - 'id' => 'geodir_post_submited_success_email_content', |
|
196 | - 'css' => 'width:500px; height: 150px;', |
|
197 | - 'type' => 'textarea', |
|
198 | - 'std' => __('<p>Dear [#client_name#],</p><p>You submitted the below listing information. This email is just for your information.</p><p>[#listing_link#]</p><br><p>Thank you for your contribution.</p><p>[#site_name#]</p>','geodirectory') |
|
199 | - ), |
|
200 | - |
|
201 | - |
|
202 | - array( |
|
203 | - 'name' => __('User forgot password email', 'geodirectory'), |
|
204 | - 'desc' => '', |
|
205 | - 'id' => 'geodir_forgot_password_subject', |
|
206 | - 'type' => 'text', |
|
207 | - 'css' => 'min-width:300px;', |
|
208 | - 'std' => __('[#site_name#] - Your new password', 'geodirectory') // Default value for the page title - changed in settings |
|
209 | - ), |
|
210 | - array( |
|
211 | - 'name' => '', |
|
212 | - 'desc' => '', |
|
213 | - 'id' => 'geodir_forgot_password_content', |
|
214 | - 'css' => 'width:500px; height: 150px;', |
|
215 | - 'type' => 'textarea', |
|
216 | - 'std' => __("<p>Dear [#client_name#],<p><p>You requested a new password for [#site_name_url#]</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory') |
|
217 | - ), |
|
218 | - |
|
219 | - array( |
|
220 | - 'name' => __('Registration success email', 'geodirectory'), |
|
221 | - 'desc' => '', |
|
222 | - 'id' => 'geodir_registration_success_email_subject', |
|
223 | - 'type' => 'text', |
|
224 | - 'css' => 'min-width:300px;', |
|
225 | - 'std' => __('Your Log In Details', 'geodirectory') // Default value for the page title - changed in settings |
|
226 | - ), |
|
227 | - array( |
|
228 | - 'name' => '', |
|
229 | - 'desc' => '', |
|
230 | - 'id' => 'geodir_registration_success_email_content', |
|
231 | - 'css' => 'width:500px; height: 150px;', |
|
232 | - 'type' => 'textarea', |
|
233 | - 'std' => __("<p>Dear [#client_name#],</p><p>You can log in with the following information:</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory') |
|
234 | - ), |
|
235 | - array( |
|
236 | - 'name' => __('Listing published email', 'geodirectory'), |
|
237 | - 'desc' => '', |
|
238 | - 'id' => 'geodir_post_published_email_subject', |
|
239 | - 'type' => 'text', |
|
240 | - 'css' => 'min-width:300px;', |
|
241 | - 'std' => __('Listing Published Successfully', 'geodirectory') // Default value for the page title - changed in settings |
|
242 | - ), |
|
243 | - array( |
|
244 | - 'name' => '', |
|
245 | - 'desc' => '', |
|
246 | - 'id' => 'geodir_post_published_email_content', |
|
247 | - 'css' => 'width:500px; height: 150px;', |
|
248 | - 'type' => 'textarea', |
|
249 | - 'std' => __("<p>Dear [#client_name#],</p><p>Your listing [#listing_link#] has been published. This email is just for your information.</p><p>[#listing_link#]</p><br><p>Thank you for your contribution.</p><p>[#site_name#]</p>", 'geodirectory') |
|
250 | - ), |
|
251 | - |
|
252 | - array('type' => 'sectionend', 'id' => 'client_emails'), |
|
253 | - |
|
254 | - array('name' => __('Other Emails', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'other_emails'), |
|
255 | - |
|
256 | - array('name' => __('Other Emails', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'other_emails'), |
|
257 | - |
|
258 | - array( |
|
259 | - 'name' => __('Email enquiry', 'geodirectory'), |
|
260 | - 'desc' => '', |
|
261 | - 'id' => 'geodir_email_enquiry_subject', |
|
262 | - 'type' => 'text', |
|
263 | - 'css' => 'min-width:300px;', |
|
264 | - 'std' => __('Website Enquiry', 'geodirectory') |
|
265 | - ), |
|
266 | - array( |
|
267 | - 'name' => '', |
|
268 | - 'desc' => '', |
|
269 | - 'id' => 'geodir_email_enquiry_content', |
|
270 | - 'css' => 'width:500px; height: 150px;', |
|
271 | - 'type' => 'textarea', |
|
272 | - 'std' => __("<p>Dear [#to_name#],<p><p>An enquiry has been sent from <b>[#listing_link#]</b></p><p>===============================</p><p>[#comments#]</p><p>===============================</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory') |
|
273 | - ), |
|
274 | - |
|
275 | - array('type' => 'sectionend', 'id' => 'other_emails'), |
|
276 | - |
|
277 | - |
|
278 | - array('name' => __('Messages', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'messages'), |
|
279 | - |
|
280 | - array('name' => __('Messages', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'messages'), |
|
281 | - |
|
282 | - array( |
|
283 | - 'name' => __('Post submitted success', 'geodirectory'), |
|
284 | - 'desc' => '', |
|
285 | - 'id' => 'geodir_post_added_success_msg_content', |
|
286 | - 'css' => 'width:500px; height: 150px;', |
|
287 | - 'type' => 'textarea', |
|
288 | - 'std' => __('<p>Thank you, your information has been successfully received.</p><p><a href="[#submited_information_link#]" >View your submitted information »</a></p><p>Thank you for visiting us at [#site_name#].</p>','geodirectory') |
|
289 | - ), |
|
290 | - |
|
291 | - |
|
292 | - array('type' => 'sectionend', 'id' => 'messages'), |
|
20 | + array('name' => __('Options', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'notification_options'), |
|
21 | + |
|
22 | + |
|
23 | + array('name' => __('Notification Options', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'notification_options'), |
|
24 | + |
|
25 | + array( |
|
26 | + 'name' => __('List of usable shortcodes', 'geodirectory'), |
|
27 | + 'desc' => __('[#client_name#],[#listing_link#],[#posted_date#],[#number_of_days#],[#number_of_grace_days#],[#login_url#],[#username#],[#user_email#],[#site_name_url#],[#renew_link#],[#post_id#],[#site_name#],[#from_email#](in most cases this will be the admin email, except for popup forms)', 'geodirectory'), |
|
28 | + 'id' => 'geodir_list_of_usable_shordcodes', |
|
29 | + 'type' => 'html_content', |
|
30 | + 'css' => 'min-width:300px;', |
|
31 | + 'std' => 'All Places' // Default value for the page title - changed in settings |
|
32 | + ), |
|
33 | + |
|
34 | + array( |
|
35 | + 'name' => __('Use advanced editor? (slow loading)', 'geodirectory'), |
|
36 | + 'desc' => __('Yes', 'geodirectory'), |
|
37 | + 'id' => 'geodir_tiny_editor', |
|
38 | + 'std' => 'yes', |
|
39 | + 'type' => 'radio', |
|
40 | + 'value' => '1', |
|
41 | + 'radiogroup' => 'start' |
|
42 | + ), |
|
43 | + array( |
|
44 | + 'name' => __('Use advanced editor?(slow loading)', 'geodirectory'), |
|
45 | + 'desc' => __('No', 'geodirectory'), |
|
46 | + 'id' => 'geodir_tiny_editor', |
|
47 | + 'std' => 'yes', |
|
48 | + 'type' => 'radio', |
|
49 | + 'value' => '0', |
|
50 | + 'radiogroup' => 'end' |
|
51 | + ), |
|
52 | + |
|
53 | + |
|
54 | + array('type' => 'sectionend', 'id' => 'notification_options'), |
|
55 | + |
|
56 | + |
|
57 | + array('name' => __('Site Bcc Options', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'site_bcc_options'), |
|
58 | + |
|
59 | + array('name' => __('Site Bcc Options', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'site_bcc_options'), |
|
60 | + |
|
61 | + array( |
|
62 | + 'name' => __('New user registration', 'geodirectory'), |
|
63 | + 'desc' => __('Yes', 'geodirectory'), |
|
64 | + 'id' => 'geodir_bcc_new_user', |
|
65 | + 'std' => 'yes', |
|
66 | + 'type' => 'radio', |
|
67 | + 'value' => '1', |
|
68 | + 'radiogroup' => 'start' |
|
69 | + ), |
|
70 | + array( |
|
71 | + 'name' => __('New user registration', 'geodirectory'), |
|
72 | + 'desc' => __('No', 'geodirectory'), |
|
73 | + 'id' => 'geodir_bcc_new_user', |
|
74 | + 'std' => 'yes', |
|
75 | + 'type' => 'radio', |
|
76 | + 'value' => '0', |
|
77 | + 'radiogroup' => 'end' |
|
78 | + ), |
|
79 | + |
|
80 | + array( |
|
81 | + 'name' => __('Send enquiry', 'geodirectory'), |
|
82 | + 'desc' => __('Yes', 'geodirectory'), |
|
83 | + 'id' => 'geodir_bcc_enquiry', |
|
84 | + 'std' => 'yes', |
|
85 | + 'type' => 'radio', |
|
86 | + 'value' => '1', |
|
87 | + 'radiogroup' => 'start' |
|
88 | + ), |
|
89 | + array( |
|
90 | + 'name' => __('Send enquiry', 'geodirectory'), |
|
91 | + 'desc' => __('No', 'geodirectory'), |
|
92 | + 'id' => 'geodir_bcc_enquiry', |
|
93 | + 'std' => 'yes', |
|
94 | + 'type' => 'radio', |
|
95 | + 'value' => '0', |
|
96 | + 'radiogroup' => 'end' |
|
97 | + ), |
|
98 | + |
|
99 | + |
|
100 | + array('type' => 'sectionend', 'id' => 'site_bcc_options'), |
|
101 | + |
|
102 | + |
|
103 | + array('name' => __('Admin Emails', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'admin_emails'), |
|
104 | + |
|
105 | + array('name' => __('Admin Emails', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'admin_emails'), |
|
106 | + |
|
107 | + array( |
|
108 | + 'name' => __('Notify to admin on post submit', 'geodirectory'), |
|
109 | + 'desc' => __('Yes', 'geodirectory'), |
|
110 | + 'id' => 'geodir_notify_post_submit', |
|
111 | + 'std' => '1', |
|
112 | + 'type' => 'radio', |
|
113 | + 'value' => '1', |
|
114 | + 'radiogroup' => 'start' |
|
115 | + ), |
|
116 | + array( |
|
117 | + 'name' => __('Notify to admin on post submit', 'geodirectory'), |
|
118 | + 'desc' => __('No', 'geodirectory'), |
|
119 | + 'id' => 'geodir_notify_post_submit', |
|
120 | + 'std' => '1', |
|
121 | + 'type' => 'radio', |
|
122 | + 'value' => '0', |
|
123 | + 'radiogroup' => 'end' |
|
124 | + ), |
|
125 | + array( |
|
126 | + 'name' => __('Post submit success to admin email', 'geodirectory'), |
|
127 | + 'desc' => '', |
|
128 | + 'id' => 'geodir_post_submited_success_email_subject_admin', |
|
129 | + 'type' => 'text', |
|
130 | + 'css' => 'min-width:300px;', |
|
131 | + 'std' => __('Post Submitted Successfully','geodirectory') // Default value for the page title - changed in settings |
|
132 | + ), |
|
133 | + array( |
|
134 | + 'name' => '', |
|
135 | + 'desc' => '', |
|
136 | + 'id' => 'geodir_post_submited_success_email_content_admin', |
|
137 | + 'css' => 'width:500px; height: 150px;', |
|
138 | + 'type' => 'textarea', |
|
139 | + 'std' => __('<p>Dear Admin,</p><p>A new listing has been published [#listing_link#]. This email is just for your information.</p><br><p>[#site_name#]</p>','geodirectory') |
|
140 | + ), |
|
141 | + array( |
|
142 | + 'name' => __('Notify Admin when listing edited by Author', 'geodirectory'), |
|
143 | + 'desc' => __('Yes', 'geodirectory'), |
|
144 | + 'id' => 'geodir_notify_post_edited', |
|
145 | + 'std' => '0', |
|
146 | + 'type' => 'radio', |
|
147 | + 'value' => '1', |
|
148 | + 'radiogroup' => 'start' |
|
149 | + ), |
|
150 | + array( |
|
151 | + 'name' => __('Notify Admin when listing edited by Author', 'geodirectory'), |
|
152 | + 'desc' => __('No', 'geodirectory'), |
|
153 | + 'id' => 'geodir_notify_post_edited', |
|
154 | + 'std' => '0', |
|
155 | + 'type' => 'radio', |
|
156 | + 'value' => '0', |
|
157 | + 'radiogroup' => 'end' |
|
158 | + ), |
|
159 | + array( |
|
160 | + 'name' => __('Listing edited by Author', 'geodirectory'), |
|
161 | + 'desc' => '', |
|
162 | + 'id' => 'geodir_post_edited_email_subject_admin', |
|
163 | + 'type' => 'text', |
|
164 | + 'css' => 'min-width:300px;', |
|
165 | + 'std' => __('[[#site_name#]] Listing edited by Author', 'geodirectory') |
|
166 | + ), |
|
167 | + array( |
|
168 | + 'name' => '', |
|
169 | + 'desc' => '', |
|
170 | + 'id' => 'geodir_post_edited_email_content_admin', |
|
171 | + 'css' => 'width:500px; height: 150px;', |
|
172 | + 'type' => 'textarea', |
|
173 | + 'std' => __('<p>Dear Admin,</p><p>A listing [#listing_link#] has been edited by it\'s author [#post_author_name#].</p><br><p><b>Listing Details:</b></p><p>Listing ID: [#post_id#]</p><p>Listing URL: [#listing_link#]</p><p>Date: [#current_date#]</p><br><p>This email is just for your information.</p><p>[#site_name#]</p>', 'geodirectory') |
|
174 | + ), |
|
175 | + |
|
176 | + |
|
177 | + array('type' => 'sectionend', 'id' => 'admin_emails'), |
|
178 | + |
|
179 | + |
|
180 | + array('name' => __('Client Emails', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'client_emails'), |
|
181 | + |
|
182 | + array('name' => __('Client Emails', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'client_emails'), |
|
183 | + |
|
184 | + array( |
|
185 | + 'name' => __('Post submit success to client email', 'geodirectory'), |
|
186 | + 'desc' => '', |
|
187 | + 'id' => 'geodir_post_submited_success_email_subject', |
|
188 | + 'type' => 'text', |
|
189 | + 'css' => 'min-width:300px;', |
|
190 | + 'std' => __('Post Submitted Successfully','geodirectory') // Default value for the page title - changed in settings |
|
191 | + ), |
|
192 | + array( |
|
193 | + 'name' => '', |
|
194 | + 'desc' => '', |
|
195 | + 'id' => 'geodir_post_submited_success_email_content', |
|
196 | + 'css' => 'width:500px; height: 150px;', |
|
197 | + 'type' => 'textarea', |
|
198 | + 'std' => __('<p>Dear [#client_name#],</p><p>You submitted the below listing information. This email is just for your information.</p><p>[#listing_link#]</p><br><p>Thank you for your contribution.</p><p>[#site_name#]</p>','geodirectory') |
|
199 | + ), |
|
200 | + |
|
201 | + |
|
202 | + array( |
|
203 | + 'name' => __('User forgot password email', 'geodirectory'), |
|
204 | + 'desc' => '', |
|
205 | + 'id' => 'geodir_forgot_password_subject', |
|
206 | + 'type' => 'text', |
|
207 | + 'css' => 'min-width:300px;', |
|
208 | + 'std' => __('[#site_name#] - Your new password', 'geodirectory') // Default value for the page title - changed in settings |
|
209 | + ), |
|
210 | + array( |
|
211 | + 'name' => '', |
|
212 | + 'desc' => '', |
|
213 | + 'id' => 'geodir_forgot_password_content', |
|
214 | + 'css' => 'width:500px; height: 150px;', |
|
215 | + 'type' => 'textarea', |
|
216 | + 'std' => __("<p>Dear [#client_name#],<p><p>You requested a new password for [#site_name_url#]</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory') |
|
217 | + ), |
|
218 | + |
|
219 | + array( |
|
220 | + 'name' => __('Registration success email', 'geodirectory'), |
|
221 | + 'desc' => '', |
|
222 | + 'id' => 'geodir_registration_success_email_subject', |
|
223 | + 'type' => 'text', |
|
224 | + 'css' => 'min-width:300px;', |
|
225 | + 'std' => __('Your Log In Details', 'geodirectory') // Default value for the page title - changed in settings |
|
226 | + ), |
|
227 | + array( |
|
228 | + 'name' => '', |
|
229 | + 'desc' => '', |
|
230 | + 'id' => 'geodir_registration_success_email_content', |
|
231 | + 'css' => 'width:500px; height: 150px;', |
|
232 | + 'type' => 'textarea', |
|
233 | + 'std' => __("<p>Dear [#client_name#],</p><p>You can log in with the following information:</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory') |
|
234 | + ), |
|
235 | + array( |
|
236 | + 'name' => __('Listing published email', 'geodirectory'), |
|
237 | + 'desc' => '', |
|
238 | + 'id' => 'geodir_post_published_email_subject', |
|
239 | + 'type' => 'text', |
|
240 | + 'css' => 'min-width:300px;', |
|
241 | + 'std' => __('Listing Published Successfully', 'geodirectory') // Default value for the page title - changed in settings |
|
242 | + ), |
|
243 | + array( |
|
244 | + 'name' => '', |
|
245 | + 'desc' => '', |
|
246 | + 'id' => 'geodir_post_published_email_content', |
|
247 | + 'css' => 'width:500px; height: 150px;', |
|
248 | + 'type' => 'textarea', |
|
249 | + 'std' => __("<p>Dear [#client_name#],</p><p>Your listing [#listing_link#] has been published. This email is just for your information.</p><p>[#listing_link#]</p><br><p>Thank you for your contribution.</p><p>[#site_name#]</p>", 'geodirectory') |
|
250 | + ), |
|
251 | + |
|
252 | + array('type' => 'sectionend', 'id' => 'client_emails'), |
|
253 | + |
|
254 | + array('name' => __('Other Emails', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'other_emails'), |
|
255 | + |
|
256 | + array('name' => __('Other Emails', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'other_emails'), |
|
257 | + |
|
258 | + array( |
|
259 | + 'name' => __('Email enquiry', 'geodirectory'), |
|
260 | + 'desc' => '', |
|
261 | + 'id' => 'geodir_email_enquiry_subject', |
|
262 | + 'type' => 'text', |
|
263 | + 'css' => 'min-width:300px;', |
|
264 | + 'std' => __('Website Enquiry', 'geodirectory') |
|
265 | + ), |
|
266 | + array( |
|
267 | + 'name' => '', |
|
268 | + 'desc' => '', |
|
269 | + 'id' => 'geodir_email_enquiry_content', |
|
270 | + 'css' => 'width:500px; height: 150px;', |
|
271 | + 'type' => 'textarea', |
|
272 | + 'std' => __("<p>Dear [#to_name#],<p><p>An enquiry has been sent from <b>[#listing_link#]</b></p><p>===============================</p><p>[#comments#]</p><p>===============================</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory') |
|
273 | + ), |
|
274 | + |
|
275 | + array('type' => 'sectionend', 'id' => 'other_emails'), |
|
276 | + |
|
277 | + |
|
278 | + array('name' => __('Messages', 'geodirectory'), 'type' => 'title', 'desc' => '', 'id' => 'messages'), |
|
279 | + |
|
280 | + array('name' => __('Messages', 'geodirectory'), 'type' => 'sectionstart', 'id' => 'messages'), |
|
281 | + |
|
282 | + array( |
|
283 | + 'name' => __('Post submitted success', 'geodirectory'), |
|
284 | + 'desc' => '', |
|
285 | + 'id' => 'geodir_post_added_success_msg_content', |
|
286 | + 'css' => 'width:500px; height: 150px;', |
|
287 | + 'type' => 'textarea', |
|
288 | + 'std' => __('<p>Thank you, your information has been successfully received.</p><p><a href="[#submited_information_link#]" >View your submitted information »</a></p><p>Thank you for visiting us at [#site_name#].</p>','geodirectory') |
|
289 | + ), |
|
290 | + |
|
291 | + |
|
292 | + array('type' => 'sectionend', 'id' => 'messages'), |
|
293 | 293 | |
294 | 294 | )); // End Manage NOtifications settings |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | 'id' => 'geodir_post_submited_success_email_subject_admin', |
129 | 129 | 'type' => 'text', |
130 | 130 | 'css' => 'min-width:300px;', |
131 | - 'std' => __('Post Submitted Successfully','geodirectory') // Default value for the page title - changed in settings |
|
131 | + 'std' => __('Post Submitted Successfully', 'geodirectory') // Default value for the page title - changed in settings |
|
132 | 132 | ), |
133 | 133 | array( |
134 | 134 | 'name' => '', |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | 'id' => 'geodir_post_submited_success_email_content_admin', |
137 | 137 | 'css' => 'width:500px; height: 150px;', |
138 | 138 | 'type' => 'textarea', |
139 | - 'std' => __('<p>Dear Admin,</p><p>A new listing has been published [#listing_link#]. This email is just for your information.</p><br><p>[#site_name#]</p>','geodirectory') |
|
139 | + 'std' => __('<p>Dear Admin,</p><p>A new listing has been published [#listing_link#]. This email is just for your information.</p><br><p>[#site_name#]</p>', 'geodirectory') |
|
140 | 140 | ), |
141 | 141 | array( |
142 | 142 | 'name' => __('Notify Admin when listing edited by Author', 'geodirectory'), |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | 'id' => 'geodir_post_submited_success_email_subject', |
188 | 188 | 'type' => 'text', |
189 | 189 | 'css' => 'min-width:300px;', |
190 | - 'std' => __('Post Submitted Successfully','geodirectory') // Default value for the page title - changed in settings |
|
190 | + 'std' => __('Post Submitted Successfully', 'geodirectory') // Default value for the page title - changed in settings |
|
191 | 191 | ), |
192 | 192 | array( |
193 | 193 | 'name' => '', |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | 'id' => 'geodir_post_submited_success_email_content', |
196 | 196 | 'css' => 'width:500px; height: 150px;', |
197 | 197 | 'type' => 'textarea', |
198 | - 'std' => __('<p>Dear [#client_name#],</p><p>You submitted the below listing information. This email is just for your information.</p><p>[#listing_link#]</p><br><p>Thank you for your contribution.</p><p>[#site_name#]</p>','geodirectory') |
|
198 | + 'std' => __('<p>Dear [#client_name#],</p><p>You submitted the below listing information. This email is just for your information.</p><p>[#listing_link#]</p><br><p>Thank you for your contribution.</p><p>[#site_name#]</p>', 'geodirectory') |
|
199 | 199 | ), |
200 | 200 | |
201 | 201 | |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | 'id' => 'geodir_forgot_password_content', |
214 | 214 | 'css' => 'width:500px; height: 150px;', |
215 | 215 | 'type' => 'textarea', |
216 | - 'std' => __("<p>Dear [#client_name#],<p><p>You requested a new password for [#site_name_url#]</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory') |
|
216 | + 'std' => __("<p>Dear [#client_name#],<p><p>You requested a new password for [#site_name_url#]</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>", 'geodirectory') |
|
217 | 217 | ), |
218 | 218 | |
219 | 219 | array( |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | 'id' => 'geodir_registration_success_email_content', |
231 | 231 | 'css' => 'width:500px; height: 150px;', |
232 | 232 | 'type' => 'textarea', |
233 | - 'std' => __("<p>Dear [#client_name#],</p><p>You can log in with the following information:</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory') |
|
233 | + 'std' => __("<p>Dear [#client_name#],</p><p>You can log in with the following information:</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>", 'geodirectory') |
|
234 | 234 | ), |
235 | 235 | array( |
236 | 236 | 'name' => __('Listing published email', 'geodirectory'), |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | 'id' => 'geodir_email_enquiry_content', |
270 | 270 | 'css' => 'width:500px; height: 150px;', |
271 | 271 | 'type' => 'textarea', |
272 | - 'std' => __("<p>Dear [#to_name#],<p><p>An enquiry has been sent from <b>[#listing_link#]</b></p><p>===============================</p><p>[#comments#]</p><p>===============================</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory') |
|
272 | + 'std' => __("<p>Dear [#to_name#],<p><p>An enquiry has been sent from <b>[#listing_link#]</b></p><p>===============================</p><p>[#comments#]</p><p>===============================</p><p>Thank you,<br /><br />[#site_name_url#].</p>", 'geodirectory') |
|
273 | 273 | ), |
274 | 274 | |
275 | 275 | array('type' => 'sectionend', 'id' => 'other_emails'), |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | 'id' => 'geodir_post_added_success_msg_content', |
286 | 286 | 'css' => 'width:500px; height: 150px;', |
287 | 287 | 'type' => 'textarea', |
288 | - 'std' => __('<p>Thank you, your information has been successfully received.</p><p><a href="[#submited_information_link#]" >View your submitted information »</a></p><p>Thank you for visiting us at [#site_name#].</p>','geodirectory') |
|
288 | + 'std' => __('<p>Thank you, your information has been successfully received.</p><p><a href="[#submited_information_link#]" >View your submitted information »</a></p><p>Thank you for visiting us at [#site_name#].</p>', 'geodirectory') |
|
289 | 289 | ), |
290 | 290 | |
291 | 291 |
@@ -20,72 +20,72 @@ discard block |
||
20 | 20 | /** This action is documented in geodirectory-templates/listing-listview.php */ |
21 | 21 | $grid_view_class = apply_filters('geodir_grid_view_widget_columns', $gridview_columns_widget); |
22 | 22 | if ($gd_session->get('gd_listing_view') && !isset($before_widget)) { |
23 | - $grid_view_class = geodir_convert_listing_view_class($gd_session->get('gd_listing_view')); |
|
23 | + $grid_view_class = geodir_convert_listing_view_class($gd_session->get('gd_listing_view')); |
|
24 | 24 | } |
25 | 25 | ?> |
26 | 26 | <ul class="geodir_category_list_view clearfix <?php echo apply_filters('geodir_listing_listview_ul_extra_class', '', 'widget'); ?>"> |
27 | 27 | <?php |
28 | - if (!empty($widget_listings)) { |
|
29 | - /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
30 | - do_action('geodir_before_listing_post_listview'); |
|
31 | - $all_postypes = geodir_get_posttypes(); |
|
32 | - $geodir_days_new = (int)get_option('geodir_listing_new_days'); |
|
33 | - foreach ($widget_listings as $widget_listing) { |
|
34 | - global $gd_widget_listing_type; |
|
35 | - $post = $widget_listing; |
|
28 | + if (!empty($widget_listings)) { |
|
29 | + /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
30 | + do_action('geodir_before_listing_post_listview'); |
|
31 | + $all_postypes = geodir_get_posttypes(); |
|
32 | + $geodir_days_new = (int)get_option('geodir_listing_new_days'); |
|
33 | + foreach ($widget_listings as $widget_listing) { |
|
34 | + global $gd_widget_listing_type; |
|
35 | + $post = $widget_listing; |
|
36 | 36 | |
37 | - $GLOBALS['post'] = $post; |
|
38 | - setup_postdata($post); |
|
37 | + $GLOBALS['post'] = $post; |
|
38 | + setup_postdata($post); |
|
39 | 39 | |
40 | - $gd_widget_listing_type = $post->post_type; |
|
40 | + $gd_widget_listing_type = $post->post_type; |
|
41 | 41 | |
42 | - /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
43 | - $post_view_class = apply_filters('geodir_post_view_extra_class', '', $all_postypes); |
|
42 | + /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
43 | + $post_view_class = apply_filters('geodir_post_view_extra_class', '', $all_postypes); |
|
44 | 44 | |
45 | - /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
46 | - $post_view_article_class = apply_filters('geodir_post_view_article_extra_class', ''); |
|
47 | - ?> |
|
45 | + /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
46 | + $post_view_article_class = apply_filters('geodir_post_view_article_extra_class', ''); |
|
47 | + ?> |
|
48 | 48 | <li class="clearfix <?php if ($grid_view_class) { |
49 | - echo 'geodir-gridview ' . $grid_view_class; |
|
50 | - } else { |
|
51 | - echo ' geodir-listview '; |
|
52 | - } ?> <?php if ($post_view_class) { |
|
53 | - echo $post_view_class; |
|
54 | - } ?>" <?php if (isset($listing_width) && $listing_width) { |
|
55 | - echo "style='width:{$listing_width}%;'"; |
|
56 | - } |
|
49 | + echo 'geodir-gridview ' . $grid_view_class; |
|
50 | + } else { |
|
51 | + echo ' geodir-listview '; |
|
52 | + } ?> <?php if ($post_view_class) { |
|
53 | + echo $post_view_class; |
|
54 | + } ?>" <?php if (isset($listing_width) && $listing_width) { |
|
55 | + echo "style='width:{$listing_width}%;'"; |
|
56 | + } |
|
57 | 57 | |
58 | - echo " data-post-id='$post->ID' "; |
|
59 | - /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
60 | - do_action('geodir_listview_inside_li', $post, 'widget'); |
|
61 | - ?>> |
|
58 | + echo " data-post-id='$post->ID' "; |
|
59 | + /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
60 | + do_action('geodir_listview_inside_li', $post, 'widget'); |
|
61 | + ?>> |
|
62 | 62 | <article class="geodir-category-listing <?php if ($post_view_article_class) { |
63 | - echo $post_view_article_class; |
|
64 | - } ?>"> |
|
63 | + echo $post_view_article_class; |
|
64 | + } ?>"> |
|
65 | 65 | <div class="geodir-post-img <?php echo apply_filters('geodir_listing_listview_thumb_extra_class', '', 'widget'); ?>"> |
66 | 66 | <?php if ($fimage = geodir_show_featured_image($post->ID, 'list-thumb', true, false, $post->featured_image)) { ?> |
67 | 67 | <a href="<?php the_permalink(); ?>"><?php echo $fimage; ?></a> |
68 | 68 | <?php |
69 | - /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
70 | - do_action('geodir_before_badge_on_image', $post); |
|
71 | - if ($post->is_featured) { |
|
72 | - echo geodir_show_badges_on_image('featured', $post, get_permalink()); |
|
73 | - } |
|
69 | + /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
70 | + do_action('geodir_before_badge_on_image', $post); |
|
71 | + if ($post->is_featured) { |
|
72 | + echo geodir_show_badges_on_image('featured', $post, get_permalink()); |
|
73 | + } |
|
74 | 74 | |
75 | 75 | |
76 | - if (round(abs(strtotime($post->post_date) - strtotime(date('Y-m-d'))) / 86400) < $geodir_days_new) { |
|
77 | - echo geodir_show_badges_on_image('new', $post, get_permalink()); |
|
78 | - } |
|
76 | + if (round(abs(strtotime($post->post_date) - strtotime(date('Y-m-d'))) / 86400) < $geodir_days_new) { |
|
77 | + echo geodir_show_badges_on_image('new', $post, get_permalink()); |
|
78 | + } |
|
79 | 79 | |
80 | - /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
81 | - do_action('geodir_after_badge_on_image', $post); |
|
82 | - } |
|
83 | - ?> |
|
80 | + /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
81 | + do_action('geodir_after_badge_on_image', $post); |
|
82 | + } |
|
83 | + ?> |
|
84 | 84 | </div> |
85 | 85 | <div class="geodir-content <?php echo apply_filters('geodir_listing_listview_content_extra_class', '', 'widget'); ?>"> |
86 | 86 | <?php |
87 | - /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
88 | - do_action('geodir_before_listing_post_title', 'listview', $post); ?> |
|
87 | + /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
88 | + do_action('geodir_before_listing_post_title', 'listview', $post); ?> |
|
89 | 89 | <header class="geodir-entry-header"> |
90 | 90 | <?php $title_tag = !empty($title_tag) ? $title_tag : 'h3'; ?> |
91 | 91 | <<?php echo esc_attr($title_tag); ?> class="geodir-entry-title"> |
@@ -95,162 +95,162 @@ discard block |
||
95 | 95 | </header> |
96 | 96 | <!-- .entry-header --> |
97 | 97 | <?php |
98 | - /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
99 | - do_action('geodir_after_listing_post_title', 'listview', $post); ?> |
|
98 | + /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
99 | + do_action('geodir_after_listing_post_title', 'listview', $post); ?> |
|
100 | 100 | <?php /// Print Distance |
101 | - if ( ( isset( $_REQUEST['sgeo_lat'] ) && $_REQUEST['sgeo_lat'] != '' ) || ( $related_nearest && $related_parent_lat ) ) { |
|
102 | - if ( $related_nearest && $related_parent_lat ) { |
|
103 | - $startPoint = array('latitude' => $related_parent_lat, 'longitude' => $related_parent_lon); |
|
104 | - } else { |
|
105 | - $startPoint = array('latitude' => $_REQUEST['sgeo_lat'], 'longitude' => $_REQUEST['sgeo_lon']); |
|
106 | - } |
|
101 | + if ( ( isset( $_REQUEST['sgeo_lat'] ) && $_REQUEST['sgeo_lat'] != '' ) || ( $related_nearest && $related_parent_lat ) ) { |
|
102 | + if ( $related_nearest && $related_parent_lat ) { |
|
103 | + $startPoint = array('latitude' => $related_parent_lat, 'longitude' => $related_parent_lon); |
|
104 | + } else { |
|
105 | + $startPoint = array('latitude' => $_REQUEST['sgeo_lat'], 'longitude' => $_REQUEST['sgeo_lon']); |
|
106 | + } |
|
107 | 107 | |
108 | - $endLat = $post->post_latitude; |
|
109 | - $endLon = $post->post_longitude; |
|
110 | - $endPoint = array('latitude' => $endLat, 'longitude' => $endLon); |
|
111 | - $uom = get_option('geodir_search_dist_1'); |
|
112 | - $distance = geodir_calculateDistanceFromLatLong($startPoint, $endPoint, $uom); |
|
113 | - ?> |
|
108 | + $endLat = $post->post_latitude; |
|
109 | + $endLon = $post->post_longitude; |
|
110 | + $endPoint = array('latitude' => $endLat, 'longitude' => $endLon); |
|
111 | + $uom = get_option('geodir_search_dist_1'); |
|
112 | + $distance = geodir_calculateDistanceFromLatLong($startPoint, $endPoint, $uom); |
|
113 | + ?> |
|
114 | 114 | <h3> |
115 | 115 | <?php |
116 | - if (round($distance, 2) == 0) { |
|
117 | - $uom = get_option('geodir_search_dist_2'); |
|
118 | - $distance = geodir_calculateDistanceFromLatLong($startPoint, $endPoint, $uom); |
|
119 | - if ($uom == 'feet') { |
|
120 | - $uom = __('feet', 'geodirectory'); |
|
121 | - } else { |
|
122 | - $uom = __('meters', 'geodirectory'); |
|
123 | - } |
|
124 | - echo round($distance) . ' ' . __($uom, 'geodirectory') . ' |
|
116 | + if (round($distance, 2) == 0) { |
|
117 | + $uom = get_option('geodir_search_dist_2'); |
|
118 | + $distance = geodir_calculateDistanceFromLatLong($startPoint, $endPoint, $uom); |
|
119 | + if ($uom == 'feet') { |
|
120 | + $uom = __('feet', 'geodirectory'); |
|
121 | + } else { |
|
122 | + $uom = __('meters', 'geodirectory'); |
|
123 | + } |
|
124 | + echo round($distance) . ' ' . __($uom, 'geodirectory') . ' |
|
125 | 125 | <br /> |
126 | 126 | '; |
127 | - } else { |
|
128 | - if ($uom == 'miles') { |
|
129 | - $uom = __('miles', 'geodirectory'); |
|
130 | - } else { |
|
131 | - $uom = __('km', 'geodirectory'); |
|
132 | - } |
|
133 | - echo round($distance, 2) . ' ' . __($uom, 'geodirectory') . ' |
|
127 | + } else { |
|
128 | + if ($uom == 'miles') { |
|
129 | + $uom = __('miles', 'geodirectory'); |
|
130 | + } else { |
|
131 | + $uom = __('km', 'geodirectory'); |
|
132 | + } |
|
133 | + echo round($distance, 2) . ' ' . __($uom, 'geodirectory') . ' |
|
134 | 134 | <br /> |
135 | 135 | '; |
136 | - } |
|
137 | - ?> |
|
136 | + } |
|
137 | + ?> |
|
138 | 138 | </h3> |
139 | 139 | <?php } ?> |
140 | 140 | <?php |
141 | - /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
142 | - do_action('geodir_before_listing_post_excerpt', $post); ?> |
|
141 | + /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
142 | + do_action('geodir_before_listing_post_excerpt', $post); ?> |
|
143 | 143 | <?php echo geodir_show_listing_info('listing'); ?> |
144 | 144 | <?php if (isset($character_count) && $character_count == '0') { |
145 | - } else { ?> |
|
145 | + } else { ?> |
|
146 | 146 | <div class="geodir-entry-content"> |
147 | 147 | <?php |
148 | - /** |
|
149 | - * Filter to hide the listing excerpt |
|
150 | - * |
|
151 | - * @since 1.5.3 |
|
152 | - * @param bool $display Display the excerpt or not. Default true. |
|
153 | - * @param object $post The post object. |
|
154 | - */ |
|
155 | - $show_listing_excerpt = apply_filters('geodir_show_listing_post_excerpt', true, 'widget', $post); |
|
156 | - if ($show_listing_excerpt) { |
|
157 | - if ( isset( $character_count ) && ( $character_count || $character_count == '0' ) ) { |
|
158 | - $content_out = geodir_max_excerpt( $character_count ); |
|
159 | - } else { |
|
160 | - $content_out = get_the_excerpt(); |
|
161 | - } |
|
162 | - if ( ! empty( $content_out ) ) { |
|
163 | - echo "<p>" . $content_out . "</p>"; |
|
164 | - } |
|
165 | - } |
|
166 | - ?> |
|
148 | + /** |
|
149 | + * Filter to hide the listing excerpt |
|
150 | + * |
|
151 | + * @since 1.5.3 |
|
152 | + * @param bool $display Display the excerpt or not. Default true. |
|
153 | + * @param object $post The post object. |
|
154 | + */ |
|
155 | + $show_listing_excerpt = apply_filters('geodir_show_listing_post_excerpt', true, 'widget', $post); |
|
156 | + if ($show_listing_excerpt) { |
|
157 | + if ( isset( $character_count ) && ( $character_count || $character_count == '0' ) ) { |
|
158 | + $content_out = geodir_max_excerpt( $character_count ); |
|
159 | + } else { |
|
160 | + $content_out = get_the_excerpt(); |
|
161 | + } |
|
162 | + if ( ! empty( $content_out ) ) { |
|
163 | + echo "<p>" . $content_out . "</p>"; |
|
164 | + } |
|
165 | + } |
|
166 | + ?> |
|
167 | 167 | </div> |
168 | 168 | <?php } ?> |
169 | 169 | <?php |
170 | - /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
171 | - do_action('geodir_after_listing_post_excerpt', $post); ?> |
|
170 | + /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
171 | + do_action('geodir_after_listing_post_excerpt', $post); ?> |
|
172 | 172 | </div> |
173 | 173 | <!-- gd-content ends here--> |
174 | 174 | <?php |
175 | - /** |
|
176 | - * Called after printing listing content. |
|
177 | - * |
|
178 | - * @since 1.5.3 |
|
179 | - * @param object $post The post object. |
|
180 | - * @param string $view The view type, default 'widget'. |
|
181 | - */ |
|
182 | - do_action( 'geodir_after_listing_content', $post, 'widget' ); ?> |
|
175 | + /** |
|
176 | + * Called after printing listing content. |
|
177 | + * |
|
178 | + * @since 1.5.3 |
|
179 | + * @param object $post The post object. |
|
180 | + * @param string $view The view type, default 'widget'. |
|
181 | + */ |
|
182 | + do_action( 'geodir_after_listing_content', $post, 'widget' ); ?> |
|
183 | 183 | <footer class="geodir-entry-meta <?php echo apply_filters('geodir_listing_listview_meta_extra_class', '', 'widget'); ?>"> |
184 | 184 | <div class="geodir-addinfo clearfix <?php echo apply_filters('geodir_listing_listview_addinfo_extra_class', '', 'widget'); ?>"> |
185 | 185 | <?php |
186 | - /** |
|
187 | - * Called before printing review stars html. |
|
188 | - * |
|
189 | - * @since 1.5.3 |
|
190 | - * @param object $post The post object. |
|
191 | - * @param string $view The view type, default 'widget'. |
|
192 | - */ |
|
193 | - do_action( 'geodir_before_review_html', $post, 'widget' ); |
|
194 | - $review_show = geodir_is_reviews_show('listview'); |
|
195 | - if ($review_show) { |
|
186 | + /** |
|
187 | + * Called before printing review stars html. |
|
188 | + * |
|
189 | + * @since 1.5.3 |
|
190 | + * @param object $post The post object. |
|
191 | + * @param string $view The view type, default 'widget'. |
|
192 | + */ |
|
193 | + do_action( 'geodir_before_review_html', $post, 'widget' ); |
|
194 | + $review_show = geodir_is_reviews_show('listview'); |
|
195 | + if ($review_show) { |
|
196 | 196 | |
197 | - $post_avgratings = geodir_get_post_rating($post->ID); |
|
197 | + $post_avgratings = geodir_get_post_rating($post->ID); |
|
198 | 198 | |
199 | - /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
200 | - do_action('geodir_before_review_rating_stars_on_listview', $post_avgratings, $post->ID); |
|
199 | + /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
200 | + do_action('geodir_before_review_rating_stars_on_listview', $post_avgratings, $post->ID); |
|
201 | 201 | |
202 | - echo geodir_get_rating_stars($post_avgratings, $post->ID); |
|
202 | + echo geodir_get_rating_stars($post_avgratings, $post->ID); |
|
203 | 203 | |
204 | - /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
205 | - do_action('geodir_after_review_rating_stars_on_listview', $post_avgratings, $post->ID); |
|
206 | - ?><a href="<?php comments_link(); ?>" class="geodir-pcomments"><i |
|
204 | + /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
205 | + do_action('geodir_after_review_rating_stars_on_listview', $post_avgratings, $post->ID); |
|
206 | + ?><a href="<?php comments_link(); ?>" class="geodir-pcomments"><i |
|
207 | 207 | class="fa fa-comments"></i> <?php geodir_comments_number($post->rating_count); ?> |
208 | 208 | </a> |
209 | 209 | <?php |
210 | - } |
|
210 | + } |
|
211 | 211 | |
212 | 212 | |
213 | - /** |
|
214 | - * Called after printing favorite html. |
|
215 | - * |
|
216 | - * @since 1.0.0 |
|
217 | - */ |
|
218 | - do_action( 'geodir_after_favorite_html', $post->ID, 'widget' ); |
|
213 | + /** |
|
214 | + * Called after printing favorite html. |
|
215 | + * |
|
216 | + * @since 1.0.0 |
|
217 | + */ |
|
218 | + do_action( 'geodir_after_favorite_html', $post->ID, 'widget' ); |
|
219 | 219 | |
220 | - if ($post->post_author == get_current_user_id()) { |
|
221 | - $addplacelink = get_permalink(geodir_add_listing_page_id()); |
|
222 | - $editlink = geodir_getlink($addplacelink, array('pid' => $post->ID), false); |
|
223 | - $upgradelink = geodir_getlink($editlink, array('upgrade' => '1'), false); |
|
220 | + if ($post->post_author == get_current_user_id()) { |
|
221 | + $addplacelink = get_permalink(geodir_add_listing_page_id()); |
|
222 | + $editlink = geodir_getlink($addplacelink, array('pid' => $post->ID), false); |
|
223 | + $upgradelink = geodir_getlink($editlink, array('upgrade' => '1'), false); |
|
224 | 224 | |
225 | - $ajaxlink = geodir_get_ajax_url(); |
|
226 | - $deletelink = geodir_getlink($ajaxlink, array('geodir_ajax' => 'add_listing', 'ajax_action' => 'delete', 'pid' => $post->ID), false); |
|
227 | - ?> |
|
225 | + $ajaxlink = geodir_get_ajax_url(); |
|
226 | + $deletelink = geodir_getlink($ajaxlink, array('geodir_ajax' => 'add_listing', 'ajax_action' => 'delete', 'pid' => $post->ID), false); |
|
227 | + ?> |
|
228 | 228 | <span class="geodir-authorlink clearfix"> |
229 | 229 | <?php |
230 | - if (isset($_REQUEST['geodir_dashbord']) && $_REQUEST['geodir_dashbord']) { |
|
231 | - /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
232 | - do_action('geodir_before_edit_post_link_on_listing'); |
|
233 | - ?> |
|
230 | + if (isset($_REQUEST['geodir_dashbord']) && $_REQUEST['geodir_dashbord']) { |
|
231 | + /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
232 | + do_action('geodir_before_edit_post_link_on_listing'); |
|
233 | + ?> |
|
234 | 234 | <a href="<?php echo esc_url($editlink); ?>" class="geodir-edit" |
235 | 235 | title="<?php _e('Edit Listing', 'geodirectory'); ?>"> |
236 | 236 | <?php |
237 | - $geodir_listing_edit_icon = apply_filters('geodir_listing_edit_icon', 'fa fa-edit'); |
|
238 | - echo '<i class="'. $geodir_listing_edit_icon .'"></i>'; |
|
239 | - ?> |
|
237 | + $geodir_listing_edit_icon = apply_filters('geodir_listing_edit_icon', 'fa fa-edit'); |
|
238 | + echo '<i class="'. $geodir_listing_edit_icon .'"></i>'; |
|
239 | + ?> |
|
240 | 240 | <?php _e('Edit', 'geodirectory'); ?> |
241 | 241 | </a> |
242 | 242 | <a href="<?php echo esc_url($deletelink); ?>" class="geodir-delete" |
243 | 243 | title="<?php _e('Delete Listing', 'geodirectory'); ?>"> |
244 | 244 | <?php |
245 | - $geodir_listing_delete_icon = apply_filters('geodir_listing_delete_icon', 'fa fa-close'); |
|
246 | - echo '<i class="'. $geodir_listing_delete_icon .'"></i>'; |
|
247 | - ?> |
|
245 | + $geodir_listing_delete_icon = apply_filters('geodir_listing_delete_icon', 'fa fa-close'); |
|
246 | + echo '<i class="'. $geodir_listing_delete_icon .'"></i>'; |
|
247 | + ?> |
|
248 | 248 | <?php _e('Delete', 'geodirectory'); ?> |
249 | 249 | </a> |
250 | 250 | <?php |
251 | - /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
252 | - do_action('geodir_after_edit_post_link_on_listing'); |
|
253 | - } ?> |
|
251 | + /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
252 | + do_action('geodir_after_edit_post_link_on_listing'); |
|
253 | + } ?> |
|
254 | 254 | </span> |
255 | 255 | <?php } ?> |
256 | 256 | </div> |
@@ -260,17 +260,17 @@ discard block |
||
260 | 260 | </article> |
261 | 261 | </li> |
262 | 262 | <?php |
263 | - unset($gd_widget_listing_type); |
|
264 | - } |
|
265 | - /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
266 | - do_action('geodir_after_listing_post_listview'); |
|
267 | - } else { |
|
263 | + unset($gd_widget_listing_type); |
|
264 | + } |
|
265 | + /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
266 | + do_action('geodir_after_listing_post_listview'); |
|
267 | + } else { |
|
268 | 268 | $favorite = isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite' ? true : false; |
269 | 269 | |
270 | 270 | /** This action is documented in geodirectory-templates/listing-listview.php */ |
271 | - do_action('geodir_message_not_found_on_listing', 'widget-listing-listview', $favorite); |
|
272 | - } |
|
273 | - ?> |
|
271 | + do_action('geodir_message_not_found_on_listing', 'widget-listing-listview', $favorite); |
|
272 | + } |
|
273 | + ?> |
|
274 | 274 | </ul> <!-- geodir_category_list_view ends here--> |
275 | 275 | <div class="clear"></div> |
276 | 276 | <?php |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | /** This action is documented in geodirectory-templates/listing-listview.php */ |
30 | 30 | do_action('geodir_before_listing_post_listview'); |
31 | 31 | $all_postypes = geodir_get_posttypes(); |
32 | - $geodir_days_new = (int)get_option('geodir_listing_new_days'); |
|
32 | + $geodir_days_new = (int) get_option('geodir_listing_new_days'); |
|
33 | 33 | foreach ($widget_listings as $widget_listing) { |
34 | 34 | global $gd_widget_listing_type; |
35 | 35 | $post = $widget_listing; |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $post_view_article_class = apply_filters('geodir_post_view_article_extra_class', ''); |
47 | 47 | ?> |
48 | 48 | <li class="clearfix <?php if ($grid_view_class) { |
49 | - echo 'geodir-gridview ' . $grid_view_class; |
|
49 | + echo 'geodir-gridview '.$grid_view_class; |
|
50 | 50 | } else { |
51 | 51 | echo ' geodir-listview '; |
52 | 52 | } ?> <?php if ($post_view_class) { |
@@ -98,8 +98,8 @@ discard block |
||
98 | 98 | /** This action is documented in geodirectory-templates/listing-listview.php */ |
99 | 99 | do_action('geodir_after_listing_post_title', 'listview', $post); ?> |
100 | 100 | <?php /// Print Distance |
101 | - if ( ( isset( $_REQUEST['sgeo_lat'] ) && $_REQUEST['sgeo_lat'] != '' ) || ( $related_nearest && $related_parent_lat ) ) { |
|
102 | - if ( $related_nearest && $related_parent_lat ) { |
|
101 | + if ((isset($_REQUEST['sgeo_lat']) && $_REQUEST['sgeo_lat'] != '') || ($related_nearest && $related_parent_lat)) { |
|
102 | + if ($related_nearest && $related_parent_lat) { |
|
103 | 103 | $startPoint = array('latitude' => $related_parent_lat, 'longitude' => $related_parent_lon); |
104 | 104 | } else { |
105 | 105 | $startPoint = array('latitude' => $_REQUEST['sgeo_lat'], 'longitude' => $_REQUEST['sgeo_lon']); |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | } else { |
122 | 122 | $uom = __('meters', 'geodirectory'); |
123 | 123 | } |
124 | - echo round($distance) . ' ' . __($uom, 'geodirectory') . ' |
|
124 | + echo round($distance).' '.__($uom, 'geodirectory').' |
|
125 | 125 | <br /> |
126 | 126 | '; |
127 | 127 | } else { |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | } else { |
131 | 131 | $uom = __('km', 'geodirectory'); |
132 | 132 | } |
133 | - echo round($distance, 2) . ' ' . __($uom, 'geodirectory') . ' |
|
133 | + echo round($distance, 2).' '.__($uom, 'geodirectory').' |
|
134 | 134 | <br /> |
135 | 135 | '; |
136 | 136 | } |
@@ -154,13 +154,13 @@ discard block |
||
154 | 154 | */ |
155 | 155 | $show_listing_excerpt = apply_filters('geodir_show_listing_post_excerpt', true, 'widget', $post); |
156 | 156 | if ($show_listing_excerpt) { |
157 | - if ( isset( $character_count ) && ( $character_count || $character_count == '0' ) ) { |
|
158 | - $content_out = geodir_max_excerpt( $character_count ); |
|
157 | + if (isset($character_count) && ($character_count || $character_count == '0')) { |
|
158 | + $content_out = geodir_max_excerpt($character_count); |
|
159 | 159 | } else { |
160 | 160 | $content_out = get_the_excerpt(); |
161 | 161 | } |
162 | - if ( ! empty( $content_out ) ) { |
|
163 | - echo "<p>" . $content_out . "</p>"; |
|
162 | + if (!empty($content_out)) { |
|
163 | + echo "<p>".$content_out."</p>"; |
|
164 | 164 | } |
165 | 165 | } |
166 | 166 | ?> |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | * @param object $post The post object. |
180 | 180 | * @param string $view The view type, default 'widget'. |
181 | 181 | */ |
182 | - do_action( 'geodir_after_listing_content', $post, 'widget' ); ?> |
|
182 | + do_action('geodir_after_listing_content', $post, 'widget'); ?> |
|
183 | 183 | <footer class="geodir-entry-meta <?php echo apply_filters('geodir_listing_listview_meta_extra_class', '', 'widget'); ?>"> |
184 | 184 | <div class="geodir-addinfo clearfix <?php echo apply_filters('geodir_listing_listview_addinfo_extra_class', '', 'widget'); ?>"> |
185 | 185 | <?php |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | * @param object $post The post object. |
191 | 191 | * @param string $view The view type, default 'widget'. |
192 | 192 | */ |
193 | - do_action( 'geodir_before_review_html', $post, 'widget' ); |
|
193 | + do_action('geodir_before_review_html', $post, 'widget'); |
|
194 | 194 | $review_show = geodir_is_reviews_show('listview'); |
195 | 195 | if ($review_show) { |
196 | 196 | |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | * |
216 | 216 | * @since 1.0.0 |
217 | 217 | */ |
218 | - do_action( 'geodir_after_favorite_html', $post->ID, 'widget' ); |
|
218 | + do_action('geodir_after_favorite_html', $post->ID, 'widget'); |
|
219 | 219 | |
220 | 220 | if ($post->post_author == get_current_user_id()) { |
221 | 221 | $addplacelink = get_permalink(geodir_add_listing_page_id()); |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | title="<?php _e('Edit Listing', 'geodirectory'); ?>"> |
236 | 236 | <?php |
237 | 237 | $geodir_listing_edit_icon = apply_filters('geodir_listing_edit_icon', 'fa fa-edit'); |
238 | - echo '<i class="'. $geodir_listing_edit_icon .'"></i>'; |
|
238 | + echo '<i class="'.$geodir_listing_edit_icon.'"></i>'; |
|
239 | 239 | ?> |
240 | 240 | <?php _e('Edit', 'geodirectory'); ?> |
241 | 241 | </a> |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | title="<?php _e('Delete Listing', 'geodirectory'); ?>"> |
244 | 244 | <?php |
245 | 245 | $geodir_listing_delete_icon = apply_filters('geodir_listing_delete_icon', 'fa fa-close'); |
246 | - echo '<i class="'. $geodir_listing_delete_icon .'"></i>'; |
|
246 | + echo '<i class="'.$geodir_listing_delete_icon.'"></i>'; |
|
247 | 247 | ?> |
248 | 248 | <?php _e('Delete', 'geodirectory'); ?> |
249 | 249 | </a> |
@@ -36,175 +36,175 @@ discard block |
||
36 | 36 | */ |
37 | 37 | function geodir_templates_scripts() |
38 | 38 | { |
39 | - $is_detail_page = false; |
|
40 | - $geodir_map_name = geodir_map_name(); |
|
39 | + $is_detail_page = false; |
|
40 | + $geodir_map_name = geodir_map_name(); |
|
41 | 41 | |
42 | - if((is_single() && geodir_is_geodir_page()) || (is_page() && geodir_is_page('preview') )) { |
|
43 | - $is_detail_page = true; |
|
44 | - } |
|
45 | - |
|
46 | - wp_enqueue_script('jquery'); |
|
47 | - |
|
48 | - wp_register_script('geodirectory-script', geodir_plugin_url() . '/geodirectory-assets/js/geodirectory.min.js', array(), GEODIRECTORY_VERSION); |
|
49 | - wp_enqueue_script('geodirectory-script'); |
|
50 | - |
|
51 | - $geodir_vars_data = array( |
|
52 | - 'siteurl' => get_option('siteurl'), |
|
53 | - 'geodir_plugin_url' => geodir_plugin_url(), |
|
54 | - 'geodir_lazy_load' => get_option('geodir_lazy_load',1), |
|
55 | - 'geodir_ajax_url' => geodir_get_ajax_url(), |
|
56 | - 'geodir_gd_modal' => (int)get_option('geodir_disable_gb_modal'), |
|
57 | - 'is_rtl' => is_rtl() ? 1 : 0 // fix rtl issue |
|
58 | - ); |
|
59 | - |
|
60 | - /** |
|
61 | - * Filter the `geodir_var` data array that outputs the wp_localize_script() translations and variables. |
|
62 | - * |
|
63 | - * This is used by addons to add JS translatable variables. |
|
64 | - * |
|
65 | - * @since 1.4.4 |
|
66 | - * @param array $geodir_vars_data { |
|
67 | - * geodir var data used by addons to add JS translatable variables. |
|
68 | - * |
|
69 | - * @type string $siteurl Site url. |
|
70 | - * @type string $geodir_plugin_url Geodirectory core plugin url. |
|
71 | - * @type string $geodir_ajax_url Geodirectory plugin ajax url. |
|
72 | - * @type int $geodir_gd_modal Disable GD modal that displays slideshow images in popup?. |
|
73 | - * @type int $is_rtl Checks if current locale is RTL. |
|
74 | - * |
|
75 | - * } |
|
76 | - */ |
|
77 | - $geodir_vars_data = apply_filters('geodir_vars_data',$geodir_vars_data); |
|
78 | - |
|
79 | - wp_localize_script('geodirectory-script', 'geodir_var', $geodir_vars_data); |
|
80 | - |
|
81 | - wp_register_script('geodirectory-jquery-flexslider-js', geodir_plugin_url() . '/geodirectory-assets/js/jquery.flexslider.min.js', array(), GEODIRECTORY_VERSION,true); |
|
82 | - if($is_detail_page){wp_enqueue_script('geodirectory-jquery-flexslider-js');} |
|
83 | - |
|
84 | - wp_register_script('geodirectory-lightbox-jquery', geodir_plugin_url() . '/geodirectory-assets/js/jquery.lightbox-0.5.min.js', array(), GEODIRECTORY_VERSION,true); |
|
85 | - wp_enqueue_script('geodirectory-lightbox-jquery'); |
|
42 | + if((is_single() && geodir_is_geodir_page()) || (is_page() && geodir_is_page('preview') )) { |
|
43 | + $is_detail_page = true; |
|
44 | + } |
|
86 | 45 | |
87 | - wp_register_script('geodirectory-jquery-simplemodal', geodir_plugin_url() . '/geodirectory-assets/js/jquery.simplemodal.min.js', array(), GEODIRECTORY_VERSION,true); |
|
88 | - if ($is_detail_page) { |
|
89 | - wp_enqueue_script('geodirectory-jquery-simplemodal'); |
|
90 | - } |
|
46 | + wp_enqueue_script('jquery'); |
|
47 | + |
|
48 | + wp_register_script('geodirectory-script', geodir_plugin_url() . '/geodirectory-assets/js/geodirectory.min.js', array(), GEODIRECTORY_VERSION); |
|
49 | + wp_enqueue_script('geodirectory-script'); |
|
50 | + |
|
51 | + $geodir_vars_data = array( |
|
52 | + 'siteurl' => get_option('siteurl'), |
|
53 | + 'geodir_plugin_url' => geodir_plugin_url(), |
|
54 | + 'geodir_lazy_load' => get_option('geodir_lazy_load',1), |
|
55 | + 'geodir_ajax_url' => geodir_get_ajax_url(), |
|
56 | + 'geodir_gd_modal' => (int)get_option('geodir_disable_gb_modal'), |
|
57 | + 'is_rtl' => is_rtl() ? 1 : 0 // fix rtl issue |
|
58 | + ); |
|
59 | + |
|
60 | + /** |
|
61 | + * Filter the `geodir_var` data array that outputs the wp_localize_script() translations and variables. |
|
62 | + * |
|
63 | + * This is used by addons to add JS translatable variables. |
|
64 | + * |
|
65 | + * @since 1.4.4 |
|
66 | + * @param array $geodir_vars_data { |
|
67 | + * geodir var data used by addons to add JS translatable variables. |
|
68 | + * |
|
69 | + * @type string $siteurl Site url. |
|
70 | + * @type string $geodir_plugin_url Geodirectory core plugin url. |
|
71 | + * @type string $geodir_ajax_url Geodirectory plugin ajax url. |
|
72 | + * @type int $geodir_gd_modal Disable GD modal that displays slideshow images in popup?. |
|
73 | + * @type int $is_rtl Checks if current locale is RTL. |
|
74 | + * |
|
75 | + * } |
|
76 | + */ |
|
77 | + $geodir_vars_data = apply_filters('geodir_vars_data',$geodir_vars_data); |
|
78 | + |
|
79 | + wp_localize_script('geodirectory-script', 'geodir_var', $geodir_vars_data); |
|
80 | + |
|
81 | + wp_register_script('geodirectory-jquery-flexslider-js', geodir_plugin_url() . '/geodirectory-assets/js/jquery.flexslider.min.js', array(), GEODIRECTORY_VERSION,true); |
|
82 | + if($is_detail_page){wp_enqueue_script('geodirectory-jquery-flexslider-js');} |
|
83 | + |
|
84 | + wp_register_script('geodirectory-lightbox-jquery', geodir_plugin_url() . '/geodirectory-assets/js/jquery.lightbox-0.5.min.js', array(), GEODIRECTORY_VERSION,true); |
|
85 | + wp_enqueue_script('geodirectory-lightbox-jquery'); |
|
86 | + |
|
87 | + wp_register_script('geodirectory-jquery-simplemodal', geodir_plugin_url() . '/geodirectory-assets/js/jquery.simplemodal.min.js', array(), GEODIRECTORY_VERSION,true); |
|
88 | + if ($is_detail_page) { |
|
89 | + wp_enqueue_script('geodirectory-jquery-simplemodal'); |
|
90 | + } |
|
91 | 91 | |
92 | - if (in_array($geodir_map_name, array('auto', 'google'))) { |
|
93 | - $map_lang = "&language=" . geodir_get_map_default_language(); |
|
94 | - $map_key = "&key=" . geodir_get_map_api_key(); |
|
95 | - /** |
|
96 | - * Filter the variables that are added to the end of the google maps script call. |
|
97 | - * |
|
98 | - * This i used to change things like google maps language etc. |
|
99 | - * |
|
100 | - * @since 1.0.0 |
|
101 | - * @param string $var The string to filter, default is empty string. |
|
102 | - */ |
|
103 | - $map_extra = apply_filters('geodir_googlemap_script_extra', ''); |
|
104 | - wp_enqueue_script('google-maps-api', 'https://maps.google.com/maps/api/js?' . $map_lang . $map_key . $map_extra , '', NULL); |
|
92 | + if (in_array($geodir_map_name, array('auto', 'google'))) { |
|
93 | + $map_lang = "&language=" . geodir_get_map_default_language(); |
|
94 | + $map_key = "&key=" . geodir_get_map_api_key(); |
|
95 | + /** |
|
96 | + * Filter the variables that are added to the end of the google maps script call. |
|
97 | + * |
|
98 | + * This i used to change things like google maps language etc. |
|
99 | + * |
|
100 | + * @since 1.0.0 |
|
101 | + * @param string $var The string to filter, default is empty string. |
|
102 | + */ |
|
103 | + $map_extra = apply_filters('geodir_googlemap_script_extra', ''); |
|
104 | + wp_enqueue_script('google-maps-api', 'https://maps.google.com/maps/api/js?' . $map_lang . $map_key . $map_extra , '', NULL); |
|
105 | 105 | |
106 | - // Overlapping Marker Spiderfier |
|
107 | - wp_register_script('geodirectory-g-overlappingmarker-script', geodir_plugin_url() . '/geodirectory-assets/jawj/oms.min.js', array(), GEODIRECTORY_VERSION); |
|
108 | - wp_enqueue_script('geodirectory-g-overlappingmarker-script'); |
|
109 | - } |
|
106 | + // Overlapping Marker Spiderfier |
|
107 | + wp_register_script('geodirectory-g-overlappingmarker-script', geodir_plugin_url() . '/geodirectory-assets/jawj/oms.min.js', array(), GEODIRECTORY_VERSION); |
|
108 | + wp_enqueue_script('geodirectory-g-overlappingmarker-script'); |
|
109 | + } |
|
110 | 110 | |
111 | - if ($geodir_map_name == 'osm') { |
|
112 | - // Leaflet OpenStreetMap |
|
113 | - wp_register_style('geodirectory-leaflet-style', geodir_plugin_url() . '/geodirectory-assets/leaflet/leaflet.css', array(), GEODIRECTORY_VERSION); |
|
114 | - wp_enqueue_style('geodirectory-leaflet-style'); |
|
111 | + if ($geodir_map_name == 'osm') { |
|
112 | + // Leaflet OpenStreetMap |
|
113 | + wp_register_style('geodirectory-leaflet-style', geodir_plugin_url() . '/geodirectory-assets/leaflet/leaflet.css', array(), GEODIRECTORY_VERSION); |
|
114 | + wp_enqueue_style('geodirectory-leaflet-style'); |
|
115 | 115 | |
116 | - wp_register_script('geodirectory-leaflet-script', geodir_plugin_url() . '/geodirectory-assets/leaflet/leaflet.min.js', array(), GEODIRECTORY_VERSION); |
|
117 | - wp_enqueue_script('geodirectory-leaflet-script'); |
|
116 | + wp_register_script('geodirectory-leaflet-script', geodir_plugin_url() . '/geodirectory-assets/leaflet/leaflet.min.js', array(), GEODIRECTORY_VERSION); |
|
117 | + wp_enqueue_script('geodirectory-leaflet-script'); |
|
118 | 118 | |
119 | - wp_register_script('geodirectory-leaflet-geo-script', geodir_plugin_url() . '/geodirectory-assets/leaflet/osm.geocode.min.js', array(), GEODIRECTORY_VERSION); |
|
120 | - wp_enqueue_script('geodirectory-leaflet-geo-script'); |
|
119 | + wp_register_script('geodirectory-leaflet-geo-script', geodir_plugin_url() . '/geodirectory-assets/leaflet/osm.geocode.min.js', array(), GEODIRECTORY_VERSION); |
|
120 | + wp_enqueue_script('geodirectory-leaflet-geo-script'); |
|
121 | 121 | |
122 | - if ($is_detail_page) { |
|
123 | - wp_register_style('geodirectory-leaflet-routing-style', geodir_plugin_url() . '/geodirectory-assets/leaflet/routing/leaflet-routing-machine.css', array(), GEODIRECTORY_VERSION); |
|
124 | - wp_enqueue_style('geodirectory-leaflet-routing-style'); |
|
122 | + if ($is_detail_page) { |
|
123 | + wp_register_style('geodirectory-leaflet-routing-style', geodir_plugin_url() . '/geodirectory-assets/leaflet/routing/leaflet-routing-machine.css', array(), GEODIRECTORY_VERSION); |
|
124 | + wp_enqueue_style('geodirectory-leaflet-routing-style'); |
|
125 | 125 | |
126 | - wp_register_script('geodirectory-leaflet-routing-script', geodir_plugin_url() . '/geodirectory-assets/leaflet/routing/leaflet-routing-machine.min.js', array(), GEODIRECTORY_VERSION); |
|
127 | - wp_enqueue_script('geodirectory-leaflet-routing-script'); |
|
128 | - } |
|
126 | + wp_register_script('geodirectory-leaflet-routing-script', geodir_plugin_url() . '/geodirectory-assets/leaflet/routing/leaflet-routing-machine.min.js', array(), GEODIRECTORY_VERSION); |
|
127 | + wp_enqueue_script('geodirectory-leaflet-routing-script'); |
|
128 | + } |
|
129 | 129 | |
130 | - // Overlapping Marker Spiderfier Leaflet |
|
131 | - wp_register_script('geodirectory-o-overlappingmarker-script', geodir_plugin_url() . '/geodirectory-assets/jawj/oms-leaflet.min.js', array(), GEODIRECTORY_VERSION); |
|
132 | - wp_enqueue_script('geodirectory-o-overlappingmarker-script'); |
|
133 | - } |
|
134 | - wp_enqueue_script( 'jquery-ui-autocomplete' ); |
|
130 | + // Overlapping Marker Spiderfier Leaflet |
|
131 | + wp_register_script('geodirectory-o-overlappingmarker-script', geodir_plugin_url() . '/geodirectory-assets/jawj/oms-leaflet.min.js', array(), GEODIRECTORY_VERSION); |
|
132 | + wp_enqueue_script('geodirectory-o-overlappingmarker-script'); |
|
133 | + } |
|
134 | + wp_enqueue_script( 'jquery-ui-autocomplete' ); |
|
135 | 135 | |
136 | - wp_register_script('geodirectory-goMap-script', geodir_plugin_url() . '/geodirectory-assets/js/goMap.min.js', array(), GEODIRECTORY_VERSION, true); |
|
137 | - wp_enqueue_script('geodirectory-goMap-script'); |
|
138 | - |
|
139 | - wp_register_script('chosen', geodir_plugin_url() . '/geodirectory-assets/js/chosen.jquery.min.js', array(), GEODIRECTORY_VERSION); |
|
140 | - wp_enqueue_script('chosen'); |
|
141 | - |
|
142 | - wp_register_script('geodirectory-choose-ajax', geodir_plugin_url() . '/geodirectory-assets/js/ajax-chosen.min.js', array(), GEODIRECTORY_VERSION); |
|
143 | - wp_enqueue_script('geodirectory-choose-ajax'); |
|
144 | - |
|
145 | - wp_enqueue_script('geodirectory-jquery-ui-timepicker-js', geodir_plugin_url() . '/geodirectory-assets/js/jquery.ui.timepicker.min.js', array('jquery-ui-datepicker', 'jquery-ui-slider', 'jquery-effects-core', 'jquery-effects-slide'), '', true); |
|
146 | - |
|
147 | - if (is_page() && geodir_is_page('add-listing')) { |
|
148 | - // SCRIPT FOR UPLOAD |
|
149 | - wp_enqueue_script('plupload-all'); |
|
150 | - wp_enqueue_script('jquery-ui-sortable'); |
|
151 | - |
|
152 | - wp_register_script('geodirectory-plupload-script', geodir_plugin_url() . '/geodirectory-assets/js/geodirectory-plupload.min.js#asyncload', array(), GEODIRECTORY_VERSION,true); |
|
153 | - wp_enqueue_script('geodirectory-plupload-script'); |
|
154 | - // SCRIPT FOR UPLOAD END |
|
155 | - |
|
156 | - // 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 |
|
157 | - if (str_replace("https", "http", admin_url('admin-ajax.php')) && !empty($_SERVER['HTTPS'])) { |
|
158 | - $ajax_url = admin_url('admin-ajax.php'); |
|
159 | - } elseif (!str_replace("https", "http", admin_url('admin-ajax.php')) && empty($_SERVER['HTTPS'])) { |
|
160 | - $ajax_url = admin_url('admin-ajax.php'); |
|
161 | - } elseif (str_replace("https", "http", admin_url('admin-ajax.php')) && empty($_SERVER['HTTPS'])) { |
|
162 | - $ajax_url = str_replace("https", "http", admin_url('admin-ajax.php')); |
|
163 | - } elseif (!str_replace("https", "http", admin_url('admin-ajax.php')) && !empty($_SERVER['HTTPS'])) { |
|
164 | - $ajax_url = str_replace("http", "https", admin_url('admin-ajax.php')); |
|
165 | - } else { |
|
166 | - $ajax_url = admin_url('admin-ajax.php'); |
|
167 | - } |
|
136 | + wp_register_script('geodirectory-goMap-script', geodir_plugin_url() . '/geodirectory-assets/js/goMap.min.js', array(), GEODIRECTORY_VERSION, true); |
|
137 | + wp_enqueue_script('geodirectory-goMap-script'); |
|
138 | + |
|
139 | + wp_register_script('chosen', geodir_plugin_url() . '/geodirectory-assets/js/chosen.jquery.min.js', array(), GEODIRECTORY_VERSION); |
|
140 | + wp_enqueue_script('chosen'); |
|
141 | + |
|
142 | + wp_register_script('geodirectory-choose-ajax', geodir_plugin_url() . '/geodirectory-assets/js/ajax-chosen.min.js', array(), GEODIRECTORY_VERSION); |
|
143 | + wp_enqueue_script('geodirectory-choose-ajax'); |
|
144 | + |
|
145 | + wp_enqueue_script('geodirectory-jquery-ui-timepicker-js', geodir_plugin_url() . '/geodirectory-assets/js/jquery.ui.timepicker.min.js', array('jquery-ui-datepicker', 'jquery-ui-slider', 'jquery-effects-core', 'jquery-effects-slide'), '', true); |
|
146 | + |
|
147 | + if (is_page() && geodir_is_page('add-listing')) { |
|
148 | + // SCRIPT FOR UPLOAD |
|
149 | + wp_enqueue_script('plupload-all'); |
|
150 | + wp_enqueue_script('jquery-ui-sortable'); |
|
151 | + |
|
152 | + wp_register_script('geodirectory-plupload-script', geodir_plugin_url() . '/geodirectory-assets/js/geodirectory-plupload.min.js#asyncload', array(), GEODIRECTORY_VERSION,true); |
|
153 | + wp_enqueue_script('geodirectory-plupload-script'); |
|
154 | + // SCRIPT FOR UPLOAD END |
|
155 | + |
|
156 | + // 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 |
|
157 | + if (str_replace("https", "http", admin_url('admin-ajax.php')) && !empty($_SERVER['HTTPS'])) { |
|
158 | + $ajax_url = admin_url('admin-ajax.php'); |
|
159 | + } elseif (!str_replace("https", "http", admin_url('admin-ajax.php')) && empty($_SERVER['HTTPS'])) { |
|
160 | + $ajax_url = admin_url('admin-ajax.php'); |
|
161 | + } elseif (str_replace("https", "http", admin_url('admin-ajax.php')) && empty($_SERVER['HTTPS'])) { |
|
162 | + $ajax_url = str_replace("https", "http", admin_url('admin-ajax.php')); |
|
163 | + } elseif (!str_replace("https", "http", admin_url('admin-ajax.php')) && !empty($_SERVER['HTTPS'])) { |
|
164 | + $ajax_url = str_replace("http", "https", admin_url('admin-ajax.php')); |
|
165 | + } else { |
|
166 | + $ajax_url = admin_url('admin-ajax.php'); |
|
167 | + } |
|
168 | 168 | |
169 | - // place js config array for plupload |
|
170 | - $plupload_init = array( |
|
171 | - 'runtimes' => 'html5,silverlight,browserplus,gears,html4', |
|
172 | - 'browse_button' => 'plupload-browse-button', // will be adjusted per uploader |
|
173 | - 'container' => 'plupload-upload-ui', // will be adjusted per uploader |
|
174 | - 'drop_element' => 'dropbox', // will be adjusted per uploader |
|
175 | - 'file_data_name' => 'async-upload', // will be adjusted per uploader |
|
176 | - 'multiple_queues' => true, |
|
177 | - 'max_file_size' => geodir_max_upload_size(), |
|
178 | - 'url' => $ajax_url, |
|
179 | - 'flash_swf_url' => includes_url('js/plupload/plupload.flash.swf'), |
|
180 | - 'silverlight_xap_url' => includes_url('js/plupload/plupload.silverlight.xap'), |
|
181 | - 'filters' => array(array('title' => __('Allowed Files', 'geodirectory'), 'extensions' => '*')), |
|
182 | - 'multipart' => true, |
|
183 | - 'urlstream_upload' => true, |
|
184 | - 'multi_selection' => false, // will be added per uploader |
|
185 | - // additional post data to send to our ajax hook |
|
186 | - 'multipart_params' => array( |
|
187 | - '_ajax_nonce' => "", // will be added per uploader |
|
188 | - 'action' => 'plupload_action', // the ajax action name |
|
189 | - 'imgid' => 0 // will be added per uploader |
|
190 | - ) |
|
191 | - ); |
|
192 | - $base_plupload_config = json_encode($plupload_init); |
|
193 | - |
|
194 | - $gd_plupload_init = array('base_plupload_config' => $base_plupload_config, |
|
195 | - 'upload_img_size' => geodir_max_upload_size()); |
|
196 | - |
|
197 | - wp_localize_script('geodirectory-plupload-script', 'gd_plupload', $gd_plupload_init); |
|
198 | - |
|
199 | - wp_enqueue_script('geodirectory-listing-validation-script', geodir_plugin_url() . '/geodirectory-assets/js/listing_validation.min.js#asyncload'); |
|
200 | - } // End if for add place page |
|
201 | - |
|
202 | - wp_register_script('geodirectory-post-custom-js', geodir_plugin_url() . '/geodirectory-assets/js/post.custom.min.js#asyncload', array(), GEODIRECTORY_VERSION, true); |
|
203 | - if ($is_detail_page) { |
|
169 | + // place js config array for plupload |
|
170 | + $plupload_init = array( |
|
171 | + 'runtimes' => 'html5,silverlight,browserplus,gears,html4', |
|
172 | + 'browse_button' => 'plupload-browse-button', // will be adjusted per uploader |
|
173 | + 'container' => 'plupload-upload-ui', // will be adjusted per uploader |
|
174 | + 'drop_element' => 'dropbox', // will be adjusted per uploader |
|
175 | + 'file_data_name' => 'async-upload', // will be adjusted per uploader |
|
176 | + 'multiple_queues' => true, |
|
177 | + 'max_file_size' => geodir_max_upload_size(), |
|
178 | + 'url' => $ajax_url, |
|
179 | + 'flash_swf_url' => includes_url('js/plupload/plupload.flash.swf'), |
|
180 | + 'silverlight_xap_url' => includes_url('js/plupload/plupload.silverlight.xap'), |
|
181 | + 'filters' => array(array('title' => __('Allowed Files', 'geodirectory'), 'extensions' => '*')), |
|
182 | + 'multipart' => true, |
|
183 | + 'urlstream_upload' => true, |
|
184 | + 'multi_selection' => false, // will be added per uploader |
|
185 | + // additional post data to send to our ajax hook |
|
186 | + 'multipart_params' => array( |
|
187 | + '_ajax_nonce' => "", // will be added per uploader |
|
188 | + 'action' => 'plupload_action', // the ajax action name |
|
189 | + 'imgid' => 0 // will be added per uploader |
|
190 | + ) |
|
191 | + ); |
|
192 | + $base_plupload_config = json_encode($plupload_init); |
|
193 | + |
|
194 | + $gd_plupload_init = array('base_plupload_config' => $base_plupload_config, |
|
195 | + 'upload_img_size' => geodir_max_upload_size()); |
|
196 | + |
|
197 | + wp_localize_script('geodirectory-plupload-script', 'gd_plupload', $gd_plupload_init); |
|
198 | + |
|
199 | + wp_enqueue_script('geodirectory-listing-validation-script', geodir_plugin_url() . '/geodirectory-assets/js/listing_validation.min.js#asyncload'); |
|
200 | + } // End if for add place page |
|
201 | + |
|
202 | + wp_register_script('geodirectory-post-custom-js', geodir_plugin_url() . '/geodirectory-assets/js/post.custom.min.js#asyncload', array(), GEODIRECTORY_VERSION, true); |
|
203 | + if ($is_detail_page) { |
|
204 | 204 | wp_enqueue_script('geodirectory-post-custom-js'); |
205 | 205 | } |
206 | 206 | |
207 | - // font awesome rating script |
|
207 | + // font awesome rating script |
|
208 | 208 | if (get_option('geodir_reviewrating_enable_font_awesome')) { |
209 | 209 | wp_register_script('geodir-barrating-js', geodir_plugin_url() . '/geodirectory-assets/js/jquery.barrating.min.js', array(), GEODIRECTORY_VERSION, true); |
210 | 210 | wp_enqueue_script('geodir-barrating-js'); |
@@ -213,11 +213,11 @@ discard block |
||
213 | 213 | wp_enqueue_script('geodir-jRating-js'); |
214 | 214 | } |
215 | 215 | |
216 | - wp_register_script('geodir-on-document-load', geodir_plugin_url() . '/geodirectory-assets/js/on_document_load.min.js#asyncload', array(), GEODIRECTORY_VERSION, true); |
|
217 | - wp_enqueue_script('geodir-on-document-load'); |
|
216 | + wp_register_script('geodir-on-document-load', geodir_plugin_url() . '/geodirectory-assets/js/on_document_load.min.js#asyncload', array(), GEODIRECTORY_VERSION, true); |
|
217 | + wp_enqueue_script('geodir-on-document-load'); |
|
218 | 218 | |
219 | - wp_register_script('google-geometa', geodir_plugin_url() . '/geodirectory-assets/js/geometa.min.js#asyncload', array(), GEODIRECTORY_VERSION, true); |
|
220 | - wp_enqueue_script('google-geometa'); |
|
219 | + wp_register_script('google-geometa', geodir_plugin_url() . '/geodirectory-assets/js/geometa.min.js#asyncload', array(), GEODIRECTORY_VERSION, true); |
|
220 | + wp_enqueue_script('google-geometa'); |
|
221 | 221 | } |
222 | 222 | |
223 | 223 | /** |
@@ -231,8 +231,8 @@ discard block |
||
231 | 231 | */ |
232 | 232 | function geodir_header_scripts() |
233 | 233 | { |
234 | - echo '<style>' . stripslashes(get_option('geodir_coustem_css')) . '</style>'; |
|
235 | - echo stripslashes(get_option('geodir_header_scripts')); |
|
234 | + echo '<style>' . stripslashes(get_option('geodir_coustem_css')) . '</style>'; |
|
235 | + echo stripslashes(get_option('geodir_header_scripts')); |
|
236 | 236 | } |
237 | 237 | |
238 | 238 | /** |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | */ |
246 | 246 | function geodir_google_analytics_tracking_code() |
247 | 247 | { |
248 | - if(get_option('geodir_ga_add_tracking_code') && get_option('geodir_ga_account_id')){?> |
|
248 | + if(get_option('geodir_ga_add_tracking_code') && get_option('geodir_ga_account_id')){?> |
|
249 | 249 | |
250 | 250 | <script> |
251 | 251 | (function(i,s,o,g,r,a,m){ i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
@@ -260,9 +260,9 @@ discard block |
||
260 | 260 | </script> |
261 | 261 | |
262 | 262 | <?php |
263 | - }elseif( get_option('geodir_ga_add_tracking_code') && get_option('geodir_ga_tracking_code') && !get_option('geodir_ga_account_id')){ |
|
264 | - echo stripslashes(get_option('geodir_ga_tracking_code')); |
|
265 | - } |
|
263 | + }elseif( get_option('geodir_ga_add_tracking_code') && get_option('geodir_ga_tracking_code') && !get_option('geodir_ga_account_id')){ |
|
264 | + echo stripslashes(get_option('geodir_ga_tracking_code')); |
|
265 | + } |
|
266 | 266 | } |
267 | 267 | |
268 | 268 | /** |
@@ -276,16 +276,16 @@ discard block |
||
276 | 276 | function geodir_footer_scripts() |
277 | 277 | { |
278 | 278 | |
279 | - echo stripslashes(get_option('geodir_footer_scripts')); |
|
279 | + echo stripslashes(get_option('geodir_footer_scripts')); |
|
280 | 280 | |
281 | - /* |
|
281 | + /* |
|
282 | 282 | * Apple suck and can't/won't fix bugs: https://bugs.webkit.org/show_bug.cgi?id=136041 |
283 | 283 | * |
284 | 284 | * Flexbox wont wrap on ios for search form items |
285 | 285 | */ |
286 | - if ( !empty( $_SERVER['HTTP_USER_AGENT'] ) && preg_match( '/iPad|iPod|iPhone|Safari/', $_SERVER['HTTP_USER_AGENT'] ) ) { |
|
287 | - echo "<style>body .geodir-listing-search.gd-search-bar-style .geodir-loc-bar .clearfix.geodir-loc-bar-in .geodir-search .gd-search-input-wrapper{flex:50 1 auto !important;min-width: initial !important;width:auto !important;}.geodir-filter-container .geodir-filter-cat{width:auto !important;}</style>"; |
|
288 | - } |
|
286 | + if ( !empty( $_SERVER['HTTP_USER_AGENT'] ) && preg_match( '/iPad|iPod|iPhone|Safari/', $_SERVER['HTTP_USER_AGENT'] ) ) { |
|
287 | + echo "<style>body .geodir-listing-search.gd-search-bar-style .geodir-loc-bar .clearfix.geodir-loc-bar-in .geodir-search .gd-search-input-wrapper{flex:50 1 auto !important;min-width: initial !important;width:auto !important;}.geodir-filter-container .geodir-filter-cat{width:auto !important;}</style>"; |
|
288 | + } |
|
289 | 289 | } |
290 | 290 | |
291 | 291 | |
@@ -299,12 +299,12 @@ discard block |
||
299 | 299 | */ |
300 | 300 | function geodir_add_async_forscript($url) |
301 | 301 | { |
302 | - if (strpos($url, '#asyncload')===false) |
|
303 | - return $url; |
|
304 | - else if (is_admin()) |
|
305 | - return str_replace('#asyncload', '', $url); |
|
306 | - else |
|
307 | - return str_replace('#asyncload', '', $url)."' async='async"; |
|
302 | + if (strpos($url, '#asyncload')===false) |
|
303 | + return $url; |
|
304 | + else if (is_admin()) |
|
305 | + return str_replace('#asyncload', '', $url); |
|
306 | + else |
|
307 | + return str_replace('#asyncload', '', $url)."' async='async"; |
|
308 | 308 | } |
309 | 309 | add_filter('clean_url', 'geodir_add_async_forscript', 11, 1); |
310 | 310 | |
@@ -317,17 +317,17 @@ discard block |
||
317 | 317 | function geodir_templates_styles() |
318 | 318 | { |
319 | 319 | |
320 | - wp_register_style('geodir-core-scss', geodir_plugin_url() . '/geodirectory-assets/css/gd_core_frontend.css', array(), GEODIRECTORY_VERSION); |
|
321 | - wp_enqueue_style('geodir-core-scss'); |
|
322 | - wp_register_style('geodir-core-scss-footer', geodir_plugin_url() . '/geodirectory-assets/css/gd_core_frontend_footer.css', array(), GEODIRECTORY_VERSION); |
|
320 | + wp_register_style('geodir-core-scss', geodir_plugin_url() . '/geodirectory-assets/css/gd_core_frontend.css', array(), GEODIRECTORY_VERSION); |
|
321 | + wp_enqueue_style('geodir-core-scss'); |
|
322 | + wp_register_style('geodir-core-scss-footer', geodir_plugin_url() . '/geodirectory-assets/css/gd_core_frontend_footer.css', array(), GEODIRECTORY_VERSION); |
|
323 | 323 | |
324 | - if(is_rtl()){ |
|
325 | - wp_register_style('geodirectory-frontend-rtl-style', geodir_plugin_url() . '/geodirectory-assets/css/rtl-frontend.css', array(), GEODIRECTORY_VERSION); |
|
326 | - wp_enqueue_style('geodirectory-frontend-rtl-style'); |
|
327 | - } |
|
324 | + if(is_rtl()){ |
|
325 | + wp_register_style('geodirectory-frontend-rtl-style', geodir_plugin_url() . '/geodirectory-assets/css/rtl-frontend.css', array(), GEODIRECTORY_VERSION); |
|
326 | + wp_enqueue_style('geodirectory-frontend-rtl-style'); |
|
327 | + } |
|
328 | 328 | |
329 | - wp_register_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css', array(), GEODIRECTORY_VERSION); |
|
330 | - wp_enqueue_style('font-awesome'); |
|
329 | + wp_register_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css', array(), GEODIRECTORY_VERSION); |
|
330 | + wp_enqueue_style('font-awesome'); |
|
331 | 331 | |
332 | 332 | |
333 | 333 | } |
@@ -341,7 +341,7 @@ discard block |
||
341 | 341 | */ |
342 | 342 | function geodir_get_sidebar() |
343 | 343 | { |
344 | - get_sidebar('geodirectory'); |
|
344 | + get_sidebar('geodirectory'); |
|
345 | 345 | } |
346 | 346 | |
347 | 347 | /** |
@@ -360,122 +360,122 @@ discard block |
||
360 | 360 | * @param bool $always_show Do you want to show the pagination always? Default: false. |
361 | 361 | */ |
362 | 362 | function geodir_pagination($before = '', $after = '', $prelabel = '', $nxtlabel = '', $pages_to_show = 5, $always_show = false) { |
363 | - global $wp_query, $posts_per_page, $wpdb, $paged, $blog_id; |
|
363 | + global $wp_query, $posts_per_page, $wpdb, $paged, $blog_id; |
|
364 | 364 | |
365 | - if (empty($prelabel)) { |
|
366 | - $prelabel = '<strong><</strong>'; |
|
367 | - } |
|
365 | + if (empty($prelabel)) { |
|
366 | + $prelabel = '<strong><</strong>'; |
|
367 | + } |
|
368 | 368 | |
369 | - if (empty($nxtlabel)) { |
|
370 | - $nxtlabel = '<strong>></strong>'; |
|
371 | - } |
|
369 | + if (empty($nxtlabel)) { |
|
370 | + $nxtlabel = '<strong>></strong>'; |
|
371 | + } |
|
372 | 372 | |
373 | - $half_pages_to_show = round($pages_to_show / 2); |
|
373 | + $half_pages_to_show = round($pages_to_show / 2); |
|
374 | 374 | |
375 | - if (geodir_is_page('home')) // dont apply default pagination for geodirectory home page. |
|
376 | - return; |
|
375 | + if (geodir_is_page('home')) // dont apply default pagination for geodirectory home page. |
|
376 | + return; |
|
377 | 377 | |
378 | - if (!is_single()) { |
|
379 | - if (function_exists('geodir_location_geo_home_link')) { |
|
380 | - remove_filter('home_url', 'geodir_location_geo_home_link', 100000); |
|
381 | - } |
|
382 | - $numposts = $wp_query->found_posts; |
|
378 | + if (!is_single()) { |
|
379 | + if (function_exists('geodir_location_geo_home_link')) { |
|
380 | + remove_filter('home_url', 'geodir_location_geo_home_link', 100000); |
|
381 | + } |
|
382 | + $numposts = $wp_query->found_posts; |
|
383 | 383 | |
384 | - $max_page = ceil($numposts / $posts_per_page); |
|
384 | + $max_page = ceil($numposts / $posts_per_page); |
|
385 | 385 | |
386 | - if (empty($paged)) { |
|
387 | - $paged = 1; |
|
388 | - } |
|
386 | + if (empty($paged)) { |
|
387 | + $paged = 1; |
|
388 | + } |
|
389 | 389 | |
390 | - $post_type = geodir_get_current_posttype(); |
|
391 | - $listing_type_name = get_post_type_plural_label($post_type); |
|
392 | - if (geodir_is_page('listing') || geodir_is_page('search')) { |
|
393 | - $term = array(); |
|
390 | + $post_type = geodir_get_current_posttype(); |
|
391 | + $listing_type_name = get_post_type_plural_label($post_type); |
|
392 | + if (geodir_is_page('listing') || geodir_is_page('search')) { |
|
393 | + $term = array(); |
|
394 | 394 | |
395 | - if (is_tax()) { |
|
396 | - $term_id = get_queried_object_id(); |
|
397 | - $taxonomy = get_query_var('taxonomy'); |
|
395 | + if (is_tax()) { |
|
396 | + $term_id = get_queried_object_id(); |
|
397 | + $taxonomy = get_query_var('taxonomy'); |
|
398 | 398 | |
399 | - if ($term_id && $post_type && get_query_var('taxonomy') == $post_type . 'category' ) { |
|
400 | - $term = get_term($term_id, $post_type . 'category'); |
|
401 | - } |
|
402 | - } |
|
399 | + if ($term_id && $post_type && get_query_var('taxonomy') == $post_type . 'category' ) { |
|
400 | + $term = get_term($term_id, $post_type . 'category'); |
|
401 | + } |
|
402 | + } |
|
403 | 403 | |
404 | - if (geodir_is_page('search') && !empty($_REQUEST['s' . $post_type . 'category'])) { |
|
405 | - $taxonomy_search = $_REQUEST['s' . $post_type . 'category']; |
|
404 | + if (geodir_is_page('search') && !empty($_REQUEST['s' . $post_type . 'category'])) { |
|
405 | + $taxonomy_search = $_REQUEST['s' . $post_type . 'category']; |
|
406 | 406 | |
407 | - if (!is_array($taxonomy_search)) { |
|
408 | - $term = get_term((int)$taxonomy_search, $post_type . 'category'); |
|
409 | - } else if(is_array($taxonomy_search) && count($taxonomy_search) == 1) { // single category search |
|
410 | - $term = get_term((int)$taxonomy_search[0], $post_type . 'category'); |
|
411 | - } |
|
412 | - } |
|
407 | + if (!is_array($taxonomy_search)) { |
|
408 | + $term = get_term((int)$taxonomy_search, $post_type . 'category'); |
|
409 | + } else if(is_array($taxonomy_search) && count($taxonomy_search) == 1) { // single category search |
|
410 | + $term = get_term((int)$taxonomy_search[0], $post_type . 'category'); |
|
411 | + } |
|
412 | + } |
|
413 | 413 | |
414 | - if (!empty($term) && !is_wp_error($term)) { |
|
415 | - $listing_type_name = $term->name; |
|
416 | - } |
|
417 | - } |
|
414 | + if (!empty($term) && !is_wp_error($term)) { |
|
415 | + $listing_type_name = $term->name; |
|
416 | + } |
|
417 | + } |
|
418 | 418 | |
419 | - if ($max_page > 1 || $always_show) { |
|
420 | - // Extra pagination info |
|
421 | - $geodir_pagination_more_info = get_option('geodir_pagination_advance_info'); |
|
422 | - $start_no = ( $paged - 1 ) * $posts_per_page + 1; |
|
423 | - $end_no = min($paged * $posts_per_page, $numposts); |
|
419 | + if ($max_page > 1 || $always_show) { |
|
420 | + // Extra pagination info |
|
421 | + $geodir_pagination_more_info = get_option('geodir_pagination_advance_info'); |
|
422 | + $start_no = ( $paged - 1 ) * $posts_per_page + 1; |
|
423 | + $end_no = min($paged * $posts_per_page, $numposts); |
|
424 | 424 | |
425 | - if ($geodir_pagination_more_info != '') { |
|
426 | - if ($listing_type_name) { |
|
427 | - $listing_type_name = __($listing_type_name, 'geodirectory'); |
|
428 | - $pegination_desc = wp_sprintf(__('Showing %s %d-%d of %d', 'geodirectory'), $listing_type_name, $start_no, $end_no, $numposts); |
|
429 | - } else { |
|
430 | - $pegination_desc = wp_sprintf(__('Showing listings %d-%d of %d', 'geodirectory'), $start_no, $end_no, $numposts); |
|
431 | - } |
|
432 | - $pagination_info = '<div class="gd-pagination-details">' . $pegination_desc . '</div>'; |
|
433 | - /** |
|
434 | - * Adds an extra pagination info above/under pagination. |
|
435 | - * |
|
436 | - * @since 1.5.9 |
|
437 | - * |
|
438 | - * @param string $pagination_info Extra pagination info content. |
|
439 | - * @param string $listing_type_name Listing results type. |
|
440 | - * @param string $start_no First result number. |
|
441 | - * @param string $end_no Last result number. |
|
442 | - * @param string $numposts Total number of listings. |
|
443 | - * @param string $post_type The post type. |
|
444 | - */ |
|
445 | - $pagination_info = apply_filters('geodir_pagination_advance_info', $pagination_info, $listing_type_name, $start_no, $end_no, $numposts, $post_type); |
|
425 | + if ($geodir_pagination_more_info != '') { |
|
426 | + if ($listing_type_name) { |
|
427 | + $listing_type_name = __($listing_type_name, 'geodirectory'); |
|
428 | + $pegination_desc = wp_sprintf(__('Showing %s %d-%d of %d', 'geodirectory'), $listing_type_name, $start_no, $end_no, $numposts); |
|
429 | + } else { |
|
430 | + $pegination_desc = wp_sprintf(__('Showing listings %d-%d of %d', 'geodirectory'), $start_no, $end_no, $numposts); |
|
431 | + } |
|
432 | + $pagination_info = '<div class="gd-pagination-details">' . $pegination_desc . '</div>'; |
|
433 | + /** |
|
434 | + * Adds an extra pagination info above/under pagination. |
|
435 | + * |
|
436 | + * @since 1.5.9 |
|
437 | + * |
|
438 | + * @param string $pagination_info Extra pagination info content. |
|
439 | + * @param string $listing_type_name Listing results type. |
|
440 | + * @param string $start_no First result number. |
|
441 | + * @param string $end_no Last result number. |
|
442 | + * @param string $numposts Total number of listings. |
|
443 | + * @param string $post_type The post type. |
|
444 | + */ |
|
445 | + $pagination_info = apply_filters('geodir_pagination_advance_info', $pagination_info, $listing_type_name, $start_no, $end_no, $numposts, $post_type); |
|
446 | 446 | |
447 | - if ($geodir_pagination_more_info == 'before') { |
|
448 | - $before = $before . $pagination_info; |
|
449 | - } else if ($geodir_pagination_more_info == 'after') { |
|
450 | - $after = $pagination_info . $after; |
|
451 | - } |
|
452 | - } |
|
447 | + if ($geodir_pagination_more_info == 'before') { |
|
448 | + $before = $before . $pagination_info; |
|
449 | + } else if ($geodir_pagination_more_info == 'after') { |
|
450 | + $after = $pagination_info . $after; |
|
451 | + } |
|
452 | + } |
|
453 | 453 | |
454 | - echo "$before <div class='Navi gd-navi'>"; |
|
455 | - if ($paged >= ($pages_to_show - 1)) { |
|
456 | - echo '<a href="' . str_replace('&paged', '&paged', get_pagenum_link()) . '">«</a>'; |
|
457 | - } |
|
458 | - previous_posts_link($prelabel); |
|
459 | - for ($i = $paged - $half_pages_to_show; $i <= $paged + $half_pages_to_show; $i++) { |
|
460 | - if ($i >= 1 && $i <= $max_page) { |
|
461 | - if ($i == $paged) { |
|
462 | - echo "<strong class='on'>$i</strong>"; |
|
463 | - } else { |
|
464 | - echo ' <a href="' . str_replace('&paged', '&paged', get_pagenum_link($i)) . '">' . $i . '</a> '; |
|
465 | - } |
|
466 | - } |
|
467 | - } |
|
468 | - next_posts_link($nxtlabel, $max_page); |
|
469 | - if (($paged + $half_pages_to_show) < ($max_page)) { |
|
470 | - echo '<a href="' . str_replace('&paged', '&paged', get_pagenum_link($max_page)) . '">»</a>'; |
|
471 | - } |
|
472 | - echo "</div> $after"; |
|
473 | - } |
|
454 | + echo "$before <div class='Navi gd-navi'>"; |
|
455 | + if ($paged >= ($pages_to_show - 1)) { |
|
456 | + echo '<a href="' . str_replace('&paged', '&paged', get_pagenum_link()) . '">«</a>'; |
|
457 | + } |
|
458 | + previous_posts_link($prelabel); |
|
459 | + for ($i = $paged - $half_pages_to_show; $i <= $paged + $half_pages_to_show; $i++) { |
|
460 | + if ($i >= 1 && $i <= $max_page) { |
|
461 | + if ($i == $paged) { |
|
462 | + echo "<strong class='on'>$i</strong>"; |
|
463 | + } else { |
|
464 | + echo ' <a href="' . str_replace('&paged', '&paged', get_pagenum_link($i)) . '">' . $i . '</a> '; |
|
465 | + } |
|
466 | + } |
|
467 | + } |
|
468 | + next_posts_link($nxtlabel, $max_page); |
|
469 | + if (($paged + $half_pages_to_show) < ($max_page)) { |
|
470 | + echo '<a href="' . str_replace('&paged', '&paged', get_pagenum_link($max_page)) . '">»</a>'; |
|
471 | + } |
|
472 | + echo "</div> $after"; |
|
473 | + } |
|
474 | 474 | |
475 | - if (function_exists('geodir_location_geo_home_link')) { |
|
476 | - add_filter('home_url', 'geodir_location_geo_home_link', 100000, 2); |
|
477 | - } |
|
478 | - } |
|
475 | + if (function_exists('geodir_location_geo_home_link')) { |
|
476 | + add_filter('home_url', 'geodir_location_geo_home_link', 100000, 2); |
|
477 | + } |
|
478 | + } |
|
479 | 479 | } |
480 | 480 | |
481 | 481 | /** |
@@ -486,20 +486,20 @@ discard block |
||
486 | 486 | */ |
487 | 487 | function geodir_listingsearch_scripts() |
488 | 488 | { |
489 | - if (get_option('gd_search_dist') != '') { |
|
490 | - $dist = get_option('gd_search_dist'); |
|
491 | - } else { |
|
492 | - $dist = 500; |
|
493 | - } |
|
494 | - $dist_dif = 1000; |
|
495 | - |
|
496 | - if ($dist <= 5000) $dist_dif = 500; |
|
497 | - if ($dist <= 1000) $dist_dif = 100; |
|
498 | - if ($dist <= 500) $dist_dif = 50; |
|
499 | - if ($dist <= 100) $dist_dif = 10; |
|
500 | - if ($dist <= 50) $dist_dif = 5; |
|
501 | - |
|
502 | - ?> |
|
489 | + if (get_option('gd_search_dist') != '') { |
|
490 | + $dist = get_option('gd_search_dist'); |
|
491 | + } else { |
|
492 | + $dist = 500; |
|
493 | + } |
|
494 | + $dist_dif = 1000; |
|
495 | + |
|
496 | + if ($dist <= 5000) $dist_dif = 500; |
|
497 | + if ($dist <= 1000) $dist_dif = 100; |
|
498 | + if ($dist <= 500) $dist_dif = 50; |
|
499 | + if ($dist <= 100) $dist_dif = 10; |
|
500 | + if ($dist <= 50) $dist_dif = 5; |
|
501 | + |
|
502 | + ?> |
|
503 | 503 | <script type="text/javascript"> |
504 | 504 | |
505 | 505 | jQuery(function ($) { |
@@ -557,20 +557,20 @@ discard block |
||
557 | 557 | * @package GeoDirectory |
558 | 558 | */ |
559 | 559 | function geodir_add_sharelocation_scripts() { |
560 | - $default_search_for_text = SEARCH_FOR_TEXT; |
|
561 | - if (get_option('geodir_search_field_default_text')) |
|
562 | - $default_search_for_text = __(get_option('geodir_search_field_default_text'), 'geodirectory'); |
|
560 | + $default_search_for_text = SEARCH_FOR_TEXT; |
|
561 | + if (get_option('geodir_search_field_default_text')) |
|
562 | + $default_search_for_text = __(get_option('geodir_search_field_default_text'), 'geodirectory'); |
|
563 | 563 | |
564 | - $default_near_text = NEAR_TEXT; |
|
565 | - if (get_option('geodir_near_field_default_text')) |
|
566 | - $default_near_text = __(get_option('geodir_near_field_default_text'), 'geodirectory'); |
|
564 | + $default_near_text = NEAR_TEXT; |
|
565 | + if (get_option('geodir_near_field_default_text')) |
|
566 | + $default_near_text = __(get_option('geodir_near_field_default_text'), 'geodirectory'); |
|
567 | 567 | |
568 | - $search_location = geodir_get_default_location(); |
|
568 | + $search_location = geodir_get_default_location(); |
|
569 | 569 | |
570 | - $default_search_for_text = addslashes(stripslashes($default_search_for_text)); |
|
571 | - $default_near_text = addslashes(stripslashes($default_near_text)); |
|
572 | - $city = !empty($search_location) ? addslashes(stripslashes($search_location->city)) : ''; |
|
573 | - ?> |
|
570 | + $default_search_for_text = addslashes(stripslashes($default_search_for_text)); |
|
571 | + $default_near_text = addslashes(stripslashes($default_near_text)); |
|
572 | + $city = !empty($search_location) ? addslashes(stripslashes($search_location->city)) : ''; |
|
573 | + ?> |
|
574 | 574 | <script type="text/javascript"> |
575 | 575 | var default_location = '<?php echo $city ;?>'; |
576 | 576 | var latlng; |
@@ -651,14 +651,14 @@ discard block |
||
651 | 651 | initialise2(); |
652 | 652 | } else { |
653 | 653 | <?php |
654 | - $near_add = get_option('geodir_search_near_addition'); |
|
655 | - /** |
|
656 | - * Adds any extra info to the near search box query when trying to geolocate it via google api. |
|
657 | - * |
|
658 | - * @since 1.0.0 |
|
659 | - */ |
|
660 | - $near_add2 = apply_filters('geodir_search_near_addition', ''); |
|
661 | - ?> |
|
654 | + $near_add = get_option('geodir_search_near_addition'); |
|
655 | + /** |
|
656 | + * Adds any extra info to the near search box query when trying to geolocate it via google api. |
|
657 | + * |
|
658 | + * @since 1.0.0 |
|
659 | + */ |
|
660 | + $near_add2 = apply_filters('geodir_search_near_addition', ''); |
|
661 | + ?> |
|
662 | 662 | if (window.gdMaps === 'google') { |
663 | 663 | Sgeocoder.geocode({'address': address<?php echo ($near_add ? '+", ' . $near_add . '"' : '') . $near_add2;?>}, |
664 | 664 | function (results, status) { |
@@ -772,32 +772,32 @@ discard block |
||
772 | 772 | */ |
773 | 773 | function geodir_show_badges_on_image($which, $post, $link) |
774 | 774 | { |
775 | - $return = ''; |
|
776 | - switch ($which) { |
|
777 | - case 'featured': |
|
778 | - /** |
|
779 | - * Filter the featured image badge html that appears in the listings pages over the thumbnail. |
|
780 | - * |
|
781 | - * @since 1.0.0 |
|
782 | - * @param object $post The post object. |
|
783 | - * @param string $link The link to the post. |
|
784 | - */ |
|
785 | - $return = apply_filters('geodir_featured_badge_on_image', '<a href="' . $link . '"><span class="geodir_featured_img"> </span></a>',$post,$link); |
|
786 | - break; |
|
787 | - case 'new' : |
|
788 | - /** |
|
789 | - * Filter the new image badge html that appears in the listings pages over the thumbnail. |
|
790 | - * |
|
791 | - * @since 1.0.0 |
|
792 | - * @param object $post The post object. |
|
793 | - * @param string $link The link to the post. |
|
794 | - */ |
|
795 | - $return = apply_filters('geodir_new_badge_on_image', '<a href="' . $link . '"><span class="geodir_new_listing"> </span></a>',$post,$link); |
|
796 | - break; |
|
797 | - |
|
798 | - } |
|
775 | + $return = ''; |
|
776 | + switch ($which) { |
|
777 | + case 'featured': |
|
778 | + /** |
|
779 | + * Filter the featured image badge html that appears in the listings pages over the thumbnail. |
|
780 | + * |
|
781 | + * @since 1.0.0 |
|
782 | + * @param object $post The post object. |
|
783 | + * @param string $link The link to the post. |
|
784 | + */ |
|
785 | + $return = apply_filters('geodir_featured_badge_on_image', '<a href="' . $link . '"><span class="geodir_featured_img"> </span></a>',$post,$link); |
|
786 | + break; |
|
787 | + case 'new' : |
|
788 | + /** |
|
789 | + * Filter the new image badge html that appears in the listings pages over the thumbnail. |
|
790 | + * |
|
791 | + * @since 1.0.0 |
|
792 | + * @param object $post The post object. |
|
793 | + * @param string $link The link to the post. |
|
794 | + */ |
|
795 | + $return = apply_filters('geodir_new_badge_on_image', '<a href="' . $link . '"><span class="geodir_new_listing"> </span></a>',$post,$link); |
|
796 | + break; |
|
797 | + |
|
798 | + } |
|
799 | 799 | |
800 | - return $return; |
|
800 | + return $return; |
|
801 | 801 | } |
802 | 802 | |
803 | 803 | /** |
@@ -806,8 +806,8 @@ discard block |
||
806 | 806 | * @since 1.6.22 |
807 | 807 | */ |
808 | 808 | function geodir_fix_script_conflict() { |
809 | - if ( wp_script_is( 'flexslider', 'enqueued' ) && wp_script_is( 'geodirectory-jquery-flexslider-js', 'enqueued' ) ) { |
|
810 | - wp_dequeue_script( 'flexslider' ); |
|
811 | - } |
|
809 | + if ( wp_script_is( 'flexslider', 'enqueued' ) && wp_script_is( 'geodirectory-jquery-flexslider-js', 'enqueued' ) ) { |
|
810 | + wp_dequeue_script( 'flexslider' ); |
|
811 | + } |
|
812 | 812 | } |
813 | 813 | add_action( 'wp_enqueue_scripts', 'geodir_fix_script_conflict', 100 ); |
814 | 814 | \ No newline at end of file |
@@ -39,21 +39,21 @@ discard block |
||
39 | 39 | $is_detail_page = false; |
40 | 40 | $geodir_map_name = geodir_map_name(); |
41 | 41 | |
42 | - if((is_single() && geodir_is_geodir_page()) || (is_page() && geodir_is_page('preview') )) { |
|
42 | + if ((is_single() && geodir_is_geodir_page()) || (is_page() && geodir_is_page('preview'))) { |
|
43 | 43 | $is_detail_page = true; |
44 | 44 | } |
45 | 45 | |
46 | 46 | wp_enqueue_script('jquery'); |
47 | 47 | |
48 | - wp_register_script('geodirectory-script', geodir_plugin_url() . '/geodirectory-assets/js/geodirectory.min.js', array(), GEODIRECTORY_VERSION); |
|
48 | + wp_register_script('geodirectory-script', geodir_plugin_url().'/geodirectory-assets/js/geodirectory.min.js', array(), GEODIRECTORY_VERSION); |
|
49 | 49 | wp_enqueue_script('geodirectory-script'); |
50 | 50 | |
51 | 51 | $geodir_vars_data = array( |
52 | 52 | 'siteurl' => get_option('siteurl'), |
53 | 53 | 'geodir_plugin_url' => geodir_plugin_url(), |
54 | - 'geodir_lazy_load' => get_option('geodir_lazy_load',1), |
|
54 | + 'geodir_lazy_load' => get_option('geodir_lazy_load', 1), |
|
55 | 55 | 'geodir_ajax_url' => geodir_get_ajax_url(), |
56 | - 'geodir_gd_modal' => (int)get_option('geodir_disable_gb_modal'), |
|
56 | + 'geodir_gd_modal' => (int) get_option('geodir_disable_gb_modal'), |
|
57 | 57 | 'is_rtl' => is_rtl() ? 1 : 0 // fix rtl issue |
58 | 58 | ); |
59 | 59 | |
@@ -74,24 +74,24 @@ discard block |
||
74 | 74 | * |
75 | 75 | * } |
76 | 76 | */ |
77 | - $geodir_vars_data = apply_filters('geodir_vars_data',$geodir_vars_data); |
|
77 | + $geodir_vars_data = apply_filters('geodir_vars_data', $geodir_vars_data); |
|
78 | 78 | |
79 | 79 | wp_localize_script('geodirectory-script', 'geodir_var', $geodir_vars_data); |
80 | 80 | |
81 | - wp_register_script('geodirectory-jquery-flexslider-js', geodir_plugin_url() . '/geodirectory-assets/js/jquery.flexslider.min.js', array(), GEODIRECTORY_VERSION,true); |
|
82 | - if($is_detail_page){wp_enqueue_script('geodirectory-jquery-flexslider-js');} |
|
81 | + wp_register_script('geodirectory-jquery-flexslider-js', geodir_plugin_url().'/geodirectory-assets/js/jquery.flexslider.min.js', array(), GEODIRECTORY_VERSION, true); |
|
82 | + if ($is_detail_page) {wp_enqueue_script('geodirectory-jquery-flexslider-js'); } |
|
83 | 83 | |
84 | - wp_register_script('geodirectory-lightbox-jquery', geodir_plugin_url() . '/geodirectory-assets/js/jquery.lightbox-0.5.min.js', array(), GEODIRECTORY_VERSION,true); |
|
84 | + wp_register_script('geodirectory-lightbox-jquery', geodir_plugin_url().'/geodirectory-assets/js/jquery.lightbox-0.5.min.js', array(), GEODIRECTORY_VERSION, true); |
|
85 | 85 | wp_enqueue_script('geodirectory-lightbox-jquery'); |
86 | 86 | |
87 | - wp_register_script('geodirectory-jquery-simplemodal', geodir_plugin_url() . '/geodirectory-assets/js/jquery.simplemodal.min.js', array(), GEODIRECTORY_VERSION,true); |
|
87 | + wp_register_script('geodirectory-jquery-simplemodal', geodir_plugin_url().'/geodirectory-assets/js/jquery.simplemodal.min.js', array(), GEODIRECTORY_VERSION, true); |
|
88 | 88 | if ($is_detail_page) { |
89 | 89 | wp_enqueue_script('geodirectory-jquery-simplemodal'); |
90 | 90 | } |
91 | 91 | |
92 | 92 | if (in_array($geodir_map_name, array('auto', 'google'))) { |
93 | - $map_lang = "&language=" . geodir_get_map_default_language(); |
|
94 | - $map_key = "&key=" . geodir_get_map_api_key(); |
|
93 | + $map_lang = "&language=".geodir_get_map_default_language(); |
|
94 | + $map_key = "&key=".geodir_get_map_api_key(); |
|
95 | 95 | /** |
96 | 96 | * Filter the variables that are added to the end of the google maps script call. |
97 | 97 | * |
@@ -101,55 +101,55 @@ discard block |
||
101 | 101 | * @param string $var The string to filter, default is empty string. |
102 | 102 | */ |
103 | 103 | $map_extra = apply_filters('geodir_googlemap_script_extra', ''); |
104 | - wp_enqueue_script('google-maps-api', 'https://maps.google.com/maps/api/js?' . $map_lang . $map_key . $map_extra , '', NULL); |
|
104 | + wp_enqueue_script('google-maps-api', 'https://maps.google.com/maps/api/js?'.$map_lang.$map_key.$map_extra, '', NULL); |
|
105 | 105 | |
106 | 106 | // Overlapping Marker Spiderfier |
107 | - wp_register_script('geodirectory-g-overlappingmarker-script', geodir_plugin_url() . '/geodirectory-assets/jawj/oms.min.js', array(), GEODIRECTORY_VERSION); |
|
107 | + wp_register_script('geodirectory-g-overlappingmarker-script', geodir_plugin_url().'/geodirectory-assets/jawj/oms.min.js', array(), GEODIRECTORY_VERSION); |
|
108 | 108 | wp_enqueue_script('geodirectory-g-overlappingmarker-script'); |
109 | 109 | } |
110 | 110 | |
111 | 111 | if ($geodir_map_name == 'osm') { |
112 | 112 | // Leaflet OpenStreetMap |
113 | - wp_register_style('geodirectory-leaflet-style', geodir_plugin_url() . '/geodirectory-assets/leaflet/leaflet.css', array(), GEODIRECTORY_VERSION); |
|
113 | + wp_register_style('geodirectory-leaflet-style', geodir_plugin_url().'/geodirectory-assets/leaflet/leaflet.css', array(), GEODIRECTORY_VERSION); |
|
114 | 114 | wp_enqueue_style('geodirectory-leaflet-style'); |
115 | 115 | |
116 | - wp_register_script('geodirectory-leaflet-script', geodir_plugin_url() . '/geodirectory-assets/leaflet/leaflet.min.js', array(), GEODIRECTORY_VERSION); |
|
116 | + wp_register_script('geodirectory-leaflet-script', geodir_plugin_url().'/geodirectory-assets/leaflet/leaflet.min.js', array(), GEODIRECTORY_VERSION); |
|
117 | 117 | wp_enqueue_script('geodirectory-leaflet-script'); |
118 | 118 | |
119 | - wp_register_script('geodirectory-leaflet-geo-script', geodir_plugin_url() . '/geodirectory-assets/leaflet/osm.geocode.min.js', array(), GEODIRECTORY_VERSION); |
|
119 | + wp_register_script('geodirectory-leaflet-geo-script', geodir_plugin_url().'/geodirectory-assets/leaflet/osm.geocode.min.js', array(), GEODIRECTORY_VERSION); |
|
120 | 120 | wp_enqueue_script('geodirectory-leaflet-geo-script'); |
121 | 121 | |
122 | 122 | if ($is_detail_page) { |
123 | - wp_register_style('geodirectory-leaflet-routing-style', geodir_plugin_url() . '/geodirectory-assets/leaflet/routing/leaflet-routing-machine.css', array(), GEODIRECTORY_VERSION); |
|
123 | + wp_register_style('geodirectory-leaflet-routing-style', geodir_plugin_url().'/geodirectory-assets/leaflet/routing/leaflet-routing-machine.css', array(), GEODIRECTORY_VERSION); |
|
124 | 124 | wp_enqueue_style('geodirectory-leaflet-routing-style'); |
125 | 125 | |
126 | - wp_register_script('geodirectory-leaflet-routing-script', geodir_plugin_url() . '/geodirectory-assets/leaflet/routing/leaflet-routing-machine.min.js', array(), GEODIRECTORY_VERSION); |
|
126 | + wp_register_script('geodirectory-leaflet-routing-script', geodir_plugin_url().'/geodirectory-assets/leaflet/routing/leaflet-routing-machine.min.js', array(), GEODIRECTORY_VERSION); |
|
127 | 127 | wp_enqueue_script('geodirectory-leaflet-routing-script'); |
128 | 128 | } |
129 | 129 | |
130 | 130 | // Overlapping Marker Spiderfier Leaflet |
131 | - wp_register_script('geodirectory-o-overlappingmarker-script', geodir_plugin_url() . '/geodirectory-assets/jawj/oms-leaflet.min.js', array(), GEODIRECTORY_VERSION); |
|
131 | + wp_register_script('geodirectory-o-overlappingmarker-script', geodir_plugin_url().'/geodirectory-assets/jawj/oms-leaflet.min.js', array(), GEODIRECTORY_VERSION); |
|
132 | 132 | wp_enqueue_script('geodirectory-o-overlappingmarker-script'); |
133 | 133 | } |
134 | - wp_enqueue_script( 'jquery-ui-autocomplete' ); |
|
134 | + wp_enqueue_script('jquery-ui-autocomplete'); |
|
135 | 135 | |
136 | - wp_register_script('geodirectory-goMap-script', geodir_plugin_url() . '/geodirectory-assets/js/goMap.min.js', array(), GEODIRECTORY_VERSION, true); |
|
136 | + wp_register_script('geodirectory-goMap-script', geodir_plugin_url().'/geodirectory-assets/js/goMap.min.js', array(), GEODIRECTORY_VERSION, true); |
|
137 | 137 | wp_enqueue_script('geodirectory-goMap-script'); |
138 | 138 | |
139 | - wp_register_script('chosen', geodir_plugin_url() . '/geodirectory-assets/js/chosen.jquery.min.js', array(), GEODIRECTORY_VERSION); |
|
139 | + wp_register_script('chosen', geodir_plugin_url().'/geodirectory-assets/js/chosen.jquery.min.js', array(), GEODIRECTORY_VERSION); |
|
140 | 140 | wp_enqueue_script('chosen'); |
141 | 141 | |
142 | - wp_register_script('geodirectory-choose-ajax', geodir_plugin_url() . '/geodirectory-assets/js/ajax-chosen.min.js', array(), GEODIRECTORY_VERSION); |
|
142 | + wp_register_script('geodirectory-choose-ajax', geodir_plugin_url().'/geodirectory-assets/js/ajax-chosen.min.js', array(), GEODIRECTORY_VERSION); |
|
143 | 143 | wp_enqueue_script('geodirectory-choose-ajax'); |
144 | 144 | |
145 | - wp_enqueue_script('geodirectory-jquery-ui-timepicker-js', geodir_plugin_url() . '/geodirectory-assets/js/jquery.ui.timepicker.min.js', array('jquery-ui-datepicker', 'jquery-ui-slider', 'jquery-effects-core', 'jquery-effects-slide'), '', true); |
|
145 | + wp_enqueue_script('geodirectory-jquery-ui-timepicker-js', geodir_plugin_url().'/geodirectory-assets/js/jquery.ui.timepicker.min.js', array('jquery-ui-datepicker', 'jquery-ui-slider', 'jquery-effects-core', 'jquery-effects-slide'), '', true); |
|
146 | 146 | |
147 | 147 | if (is_page() && geodir_is_page('add-listing')) { |
148 | 148 | // SCRIPT FOR UPLOAD |
149 | 149 | wp_enqueue_script('plupload-all'); |
150 | 150 | wp_enqueue_script('jquery-ui-sortable'); |
151 | 151 | |
152 | - wp_register_script('geodirectory-plupload-script', geodir_plugin_url() . '/geodirectory-assets/js/geodirectory-plupload.min.js#asyncload', array(), GEODIRECTORY_VERSION,true); |
|
152 | + wp_register_script('geodirectory-plupload-script', geodir_plugin_url().'/geodirectory-assets/js/geodirectory-plupload.min.js#asyncload', array(), GEODIRECTORY_VERSION, true); |
|
153 | 153 | wp_enqueue_script('geodirectory-plupload-script'); |
154 | 154 | // SCRIPT FOR UPLOAD END |
155 | 155 | |
@@ -196,27 +196,27 @@ discard block |
||
196 | 196 | |
197 | 197 | wp_localize_script('geodirectory-plupload-script', 'gd_plupload', $gd_plupload_init); |
198 | 198 | |
199 | - wp_enqueue_script('geodirectory-listing-validation-script', geodir_plugin_url() . '/geodirectory-assets/js/listing_validation.min.js#asyncload'); |
|
199 | + wp_enqueue_script('geodirectory-listing-validation-script', geodir_plugin_url().'/geodirectory-assets/js/listing_validation.min.js#asyncload'); |
|
200 | 200 | } // End if for add place page |
201 | 201 | |
202 | - wp_register_script('geodirectory-post-custom-js', geodir_plugin_url() . '/geodirectory-assets/js/post.custom.min.js#asyncload', array(), GEODIRECTORY_VERSION, true); |
|
202 | + wp_register_script('geodirectory-post-custom-js', geodir_plugin_url().'/geodirectory-assets/js/post.custom.min.js#asyncload', array(), GEODIRECTORY_VERSION, true); |
|
203 | 203 | if ($is_detail_page) { |
204 | 204 | wp_enqueue_script('geodirectory-post-custom-js'); |
205 | 205 | } |
206 | 206 | |
207 | 207 | // font awesome rating script |
208 | 208 | if (get_option('geodir_reviewrating_enable_font_awesome')) { |
209 | - wp_register_script('geodir-barrating-js', geodir_plugin_url() . '/geodirectory-assets/js/jquery.barrating.min.js', array(), GEODIRECTORY_VERSION, true); |
|
209 | + wp_register_script('geodir-barrating-js', geodir_plugin_url().'/geodirectory-assets/js/jquery.barrating.min.js', array(), GEODIRECTORY_VERSION, true); |
|
210 | 210 | wp_enqueue_script('geodir-barrating-js'); |
211 | 211 | } else { // default rating script |
212 | - wp_register_script('geodir-jRating-js', geodir_plugin_url() . '/geodirectory-assets/js/jRating.jquery.min.js', array(), GEODIRECTORY_VERSION, true); |
|
212 | + wp_register_script('geodir-jRating-js', geodir_plugin_url().'/geodirectory-assets/js/jRating.jquery.min.js', array(), GEODIRECTORY_VERSION, true); |
|
213 | 213 | wp_enqueue_script('geodir-jRating-js'); |
214 | 214 | } |
215 | 215 | |
216 | - wp_register_script('geodir-on-document-load', geodir_plugin_url() . '/geodirectory-assets/js/on_document_load.min.js#asyncload', array(), GEODIRECTORY_VERSION, true); |
|
216 | + wp_register_script('geodir-on-document-load', geodir_plugin_url().'/geodirectory-assets/js/on_document_load.min.js#asyncload', array(), GEODIRECTORY_VERSION, true); |
|
217 | 217 | wp_enqueue_script('geodir-on-document-load'); |
218 | 218 | |
219 | - wp_register_script('google-geometa', geodir_plugin_url() . '/geodirectory-assets/js/geometa.min.js#asyncload', array(), GEODIRECTORY_VERSION, true); |
|
219 | + wp_register_script('google-geometa', geodir_plugin_url().'/geodirectory-assets/js/geometa.min.js#asyncload', array(), GEODIRECTORY_VERSION, true); |
|
220 | 220 | wp_enqueue_script('google-geometa'); |
221 | 221 | } |
222 | 222 | |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | */ |
232 | 232 | function geodir_header_scripts() |
233 | 233 | { |
234 | - echo '<style>' . stripslashes(get_option('geodir_coustem_css')) . '</style>'; |
|
234 | + echo '<style>'.stripslashes(get_option('geodir_coustem_css')).'</style>'; |
|
235 | 235 | echo stripslashes(get_option('geodir_header_scripts')); |
236 | 236 | } |
237 | 237 | |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | */ |
246 | 246 | function geodir_google_analytics_tracking_code() |
247 | 247 | { |
248 | - if(get_option('geodir_ga_add_tracking_code') && get_option('geodir_ga_account_id')){?> |
|
248 | + if (get_option('geodir_ga_add_tracking_code') && get_option('geodir_ga_account_id')) {?> |
|
249 | 249 | |
250 | 250 | <script> |
251 | 251 | (function(i,s,o,g,r,a,m){ i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
@@ -253,14 +253,14 @@ discard block |
||
253 | 253 | m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) |
254 | 254 | })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); |
255 | 255 | |
256 | - ga('create', '<?php echo esc_attr(get_option('geodir_ga_account_id'));?>', 'auto'); |
|
257 | - <?php if(get_option('geodir_ga_anonymize_ip')){echo "ga('set', 'anonymizeIP', true);";}?> |
|
256 | + ga('create', '<?php echo esc_attr(get_option('geodir_ga_account_id')); ?>', 'auto'); |
|
257 | + <?php if (get_option('geodir_ga_anonymize_ip')) {echo "ga('set', 'anonymizeIP', true);"; }?> |
|
258 | 258 | ga('send', 'pageview'); |
259 | 259 | |
260 | 260 | </script> |
261 | 261 | |
262 | 262 | <?php |
263 | - }elseif( get_option('geodir_ga_add_tracking_code') && get_option('geodir_ga_tracking_code') && !get_option('geodir_ga_account_id')){ |
|
263 | + }elseif (get_option('geodir_ga_add_tracking_code') && get_option('geodir_ga_tracking_code') && !get_option('geodir_ga_account_id')) { |
|
264 | 264 | echo stripslashes(get_option('geodir_ga_tracking_code')); |
265 | 265 | } |
266 | 266 | } |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | * |
284 | 284 | * Flexbox wont wrap on ios for search form items |
285 | 285 | */ |
286 | - if ( !empty( $_SERVER['HTTP_USER_AGENT'] ) && preg_match( '/iPad|iPod|iPhone|Safari/', $_SERVER['HTTP_USER_AGENT'] ) ) { |
|
286 | + if (!empty($_SERVER['HTTP_USER_AGENT']) && preg_match('/iPad|iPod|iPhone|Safari/', $_SERVER['HTTP_USER_AGENT'])) { |
|
287 | 287 | echo "<style>body .geodir-listing-search.gd-search-bar-style .geodir-loc-bar .clearfix.geodir-loc-bar-in .geodir-search .gd-search-input-wrapper{flex:50 1 auto !important;min-width: initial !important;width:auto !important;}.geodir-filter-container .geodir-filter-cat{width:auto !important;}</style>"; |
288 | 288 | } |
289 | 289 | } |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | */ |
300 | 300 | function geodir_add_async_forscript($url) |
301 | 301 | { |
302 | - if (strpos($url, '#asyncload')===false) |
|
302 | + if (strpos($url, '#asyncload') === false) |
|
303 | 303 | return $url; |
304 | 304 | else if (is_admin()) |
305 | 305 | return str_replace('#asyncload', '', $url); |
@@ -317,12 +317,12 @@ discard block |
||
317 | 317 | function geodir_templates_styles() |
318 | 318 | { |
319 | 319 | |
320 | - wp_register_style('geodir-core-scss', geodir_plugin_url() . '/geodirectory-assets/css/gd_core_frontend.css', array(), GEODIRECTORY_VERSION); |
|
320 | + wp_register_style('geodir-core-scss', geodir_plugin_url().'/geodirectory-assets/css/gd_core_frontend.css', array(), GEODIRECTORY_VERSION); |
|
321 | 321 | wp_enqueue_style('geodir-core-scss'); |
322 | - wp_register_style('geodir-core-scss-footer', geodir_plugin_url() . '/geodirectory-assets/css/gd_core_frontend_footer.css', array(), GEODIRECTORY_VERSION); |
|
322 | + wp_register_style('geodir-core-scss-footer', geodir_plugin_url().'/geodirectory-assets/css/gd_core_frontend_footer.css', array(), GEODIRECTORY_VERSION); |
|
323 | 323 | |
324 | - if(is_rtl()){ |
|
325 | - wp_register_style('geodirectory-frontend-rtl-style', geodir_plugin_url() . '/geodirectory-assets/css/rtl-frontend.css', array(), GEODIRECTORY_VERSION); |
|
324 | + if (is_rtl()) { |
|
325 | + wp_register_style('geodirectory-frontend-rtl-style', geodir_plugin_url().'/geodirectory-assets/css/rtl-frontend.css', array(), GEODIRECTORY_VERSION); |
|
326 | 326 | wp_enqueue_style('geodirectory-frontend-rtl-style'); |
327 | 327 | } |
328 | 328 | |
@@ -396,18 +396,18 @@ discard block |
||
396 | 396 | $term_id = get_queried_object_id(); |
397 | 397 | $taxonomy = get_query_var('taxonomy'); |
398 | 398 | |
399 | - if ($term_id && $post_type && get_query_var('taxonomy') == $post_type . 'category' ) { |
|
400 | - $term = get_term($term_id, $post_type . 'category'); |
|
399 | + if ($term_id && $post_type && get_query_var('taxonomy') == $post_type.'category') { |
|
400 | + $term = get_term($term_id, $post_type.'category'); |
|
401 | 401 | } |
402 | 402 | } |
403 | 403 | |
404 | - if (geodir_is_page('search') && !empty($_REQUEST['s' . $post_type . 'category'])) { |
|
405 | - $taxonomy_search = $_REQUEST['s' . $post_type . 'category']; |
|
404 | + if (geodir_is_page('search') && !empty($_REQUEST['s'.$post_type.'category'])) { |
|
405 | + $taxonomy_search = $_REQUEST['s'.$post_type.'category']; |
|
406 | 406 | |
407 | 407 | if (!is_array($taxonomy_search)) { |
408 | - $term = get_term((int)$taxonomy_search, $post_type . 'category'); |
|
409 | - } else if(is_array($taxonomy_search) && count($taxonomy_search) == 1) { // single category search |
|
410 | - $term = get_term((int)$taxonomy_search[0], $post_type . 'category'); |
|
408 | + $term = get_term((int) $taxonomy_search, $post_type.'category'); |
|
409 | + } else if (is_array($taxonomy_search) && count($taxonomy_search) == 1) { // single category search |
|
410 | + $term = get_term((int) $taxonomy_search[0], $post_type.'category'); |
|
411 | 411 | } |
412 | 412 | } |
413 | 413 | |
@@ -419,7 +419,7 @@ discard block |
||
419 | 419 | if ($max_page > 1 || $always_show) { |
420 | 420 | // Extra pagination info |
421 | 421 | $geodir_pagination_more_info = get_option('geodir_pagination_advance_info'); |
422 | - $start_no = ( $paged - 1 ) * $posts_per_page + 1; |
|
422 | + $start_no = ($paged - 1) * $posts_per_page + 1; |
|
423 | 423 | $end_no = min($paged * $posts_per_page, $numposts); |
424 | 424 | |
425 | 425 | if ($geodir_pagination_more_info != '') { |
@@ -429,7 +429,7 @@ discard block |
||
429 | 429 | } else { |
430 | 430 | $pegination_desc = wp_sprintf(__('Showing listings %d-%d of %d', 'geodirectory'), $start_no, $end_no, $numposts); |
431 | 431 | } |
432 | - $pagination_info = '<div class="gd-pagination-details">' . $pegination_desc . '</div>'; |
|
432 | + $pagination_info = '<div class="gd-pagination-details">'.$pegination_desc.'</div>'; |
|
433 | 433 | /** |
434 | 434 | * Adds an extra pagination info above/under pagination. |
435 | 435 | * |
@@ -445,15 +445,15 @@ discard block |
||
445 | 445 | $pagination_info = apply_filters('geodir_pagination_advance_info', $pagination_info, $listing_type_name, $start_no, $end_no, $numposts, $post_type); |
446 | 446 | |
447 | 447 | if ($geodir_pagination_more_info == 'before') { |
448 | - $before = $before . $pagination_info; |
|
448 | + $before = $before.$pagination_info; |
|
449 | 449 | } else if ($geodir_pagination_more_info == 'after') { |
450 | - $after = $pagination_info . $after; |
|
450 | + $after = $pagination_info.$after; |
|
451 | 451 | } |
452 | 452 | } |
453 | 453 | |
454 | 454 | echo "$before <div class='Navi gd-navi'>"; |
455 | 455 | if ($paged >= ($pages_to_show - 1)) { |
456 | - echo '<a href="' . str_replace('&paged', '&paged', get_pagenum_link()) . '">«</a>'; |
|
456 | + echo '<a href="'.str_replace('&paged', '&paged', get_pagenum_link()).'">«</a>'; |
|
457 | 457 | } |
458 | 458 | previous_posts_link($prelabel); |
459 | 459 | for ($i = $paged - $half_pages_to_show; $i <= $paged + $half_pages_to_show; $i++) { |
@@ -461,13 +461,13 @@ discard block |
||
461 | 461 | if ($i == $paged) { |
462 | 462 | echo "<strong class='on'>$i</strong>"; |
463 | 463 | } else { |
464 | - echo ' <a href="' . str_replace('&paged', '&paged', get_pagenum_link($i)) . '">' . $i . '</a> '; |
|
464 | + echo ' <a href="'.str_replace('&paged', '&paged', get_pagenum_link($i)).'">'.$i.'</a> '; |
|
465 | 465 | } |
466 | 466 | } |
467 | 467 | } |
468 | 468 | next_posts_link($nxtlabel, $max_page); |
469 | 469 | if (($paged + $half_pages_to_show) < ($max_page)) { |
470 | - echo '<a href="' . str_replace('&paged', '&paged', get_pagenum_link($max_page)) . '">»</a>'; |
|
470 | + echo '<a href="'.str_replace('&paged', '&paged', get_pagenum_link($max_page)).'">»</a>'; |
|
471 | 471 | } |
472 | 472 | echo "</div> $after"; |
473 | 473 | } |
@@ -505,7 +505,7 @@ discard block |
||
505 | 505 | jQuery(function ($) { |
506 | 506 | $("#distance_slider").slider({ |
507 | 507 | range: true, |
508 | - values: [0, <?php echo ($_REQUEST['sdist']!='') ? sanitize_text_field($_REQUEST['sdist']) : "0"; ?>], |
|
508 | + values: [0, <?php echo ($_REQUEST['sdist'] != '') ? sanitize_text_field($_REQUEST['sdist']) : "0"; ?>], |
|
509 | 509 | min: 0, |
510 | 510 | max: <?php echo $dist; ?>, |
511 | 511 | step: <?php echo $dist_dif; ?>, |
@@ -572,7 +572,7 @@ discard block |
||
572 | 572 | $city = !empty($search_location) ? addslashes(stripslashes($search_location->city)) : ''; |
573 | 573 | ?> |
574 | 574 | <script type="text/javascript"> |
575 | - var default_location = '<?php echo $city ;?>'; |
|
575 | + var default_location = '<?php echo $city; ?>'; |
|
576 | 576 | var latlng; |
577 | 577 | var address; |
578 | 578 | var dist = 0; |
@@ -588,7 +588,7 @@ discard block |
||
588 | 588 | var $form = jQuery(this).closest('form'); |
589 | 589 | |
590 | 590 | if (jQuery("#sdist input[type='radio']:checked").length != 0) dist = jQuery("#sdist input[type='radio']:checked").val(); |
591 | - if (jQuery('.search_text', $form).val() == '' || jQuery('.search_text', $form).val() == '<?php echo $default_search_for_text;?>') jQuery('.search_text', $form).val(s); |
|
591 | + if (jQuery('.search_text', $form).val() == '' || jQuery('.search_text', $form).val() == '<?php echo $default_search_for_text; ?>') jQuery('.search_text', $form).val(s); |
|
592 | 592 | |
593 | 593 | // Disable location based search for disabled location post type. |
594 | 594 | if (jQuery('.search_by_post', $form).val() != '' && typeof gd_cpt_no_location == 'function') { |
@@ -602,7 +602,7 @@ discard block |
||
602 | 602 | } |
603 | 603 | } |
604 | 604 | |
605 | - 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;?>')) { |
|
605 | + 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; ?>')) { |
|
606 | 606 | geodir_setsearch($form); |
607 | 607 | } else { |
608 | 608 | jQuery(".snear", $form).val(''); |
@@ -620,7 +620,7 @@ discard block |
||
620 | 620 | }); |
621 | 621 | |
622 | 622 | function geodir_setsearch($form) { |
623 | - 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); |
|
623 | + 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); |
|
624 | 624 | geocodeAddress($form); |
625 | 625 | } |
626 | 626 | |
@@ -639,15 +639,15 @@ discard block |
||
639 | 639 | // Call the geocode function |
640 | 640 | Sgeocoder = window.gdMaps == 'google' ? new google.maps.Geocoder() : null; |
641 | 641 | |
642 | - if (jQuery('.snear', $form).val() == '' || ( jQuery('.sgeo_lat').val() != '' && jQuery('.sgeo_lon').val() != '' ) || jQuery('.snear', $form).val().match("^<?php _e('In:','geodirectory');?>")) { |
|
643 | - if (jQuery('.snear', $form).val().match("^<?php _e('In:','geodirectory');?>")) { |
|
642 | + if (jQuery('.snear', $form).val() == '' || ( jQuery('.sgeo_lat').val() != '' && jQuery('.sgeo_lon').val() != '' ) || jQuery('.snear', $form).val().match("^<?php _e('In:', 'geodirectory'); ?>")) { |
|
643 | + if (jQuery('.snear', $form).val().match("^<?php _e('In:', 'geodirectory'); ?>")) { |
|
644 | 644 | jQuery(".snear", $form).val(''); |
645 | 645 | } |
646 | 646 | jQuery($form).submit(); |
647 | 647 | } else { |
648 | 648 | var address = jQuery(".snear", $form).val(); |
649 | 649 | |
650 | - if (jQuery('.snear', $form).val() == '<?php echo $default_near_text;?>') { |
|
650 | + if (jQuery('.snear', $form).val() == '<?php echo $default_near_text; ?>') { |
|
651 | 651 | initialise2(); |
652 | 652 | } else { |
653 | 653 | <?php |
@@ -660,12 +660,12 @@ discard block |
||
660 | 660 | $near_add2 = apply_filters('geodir_search_near_addition', ''); |
661 | 661 | ?> |
662 | 662 | if (window.gdMaps === 'google') { |
663 | - Sgeocoder.geocode({'address': address<?php echo ($near_add ? '+", ' . $near_add . '"' : '') . $near_add2;?>}, |
|
663 | + Sgeocoder.geocode({'address': address<?php echo ($near_add ? '+", '.$near_add.'"' : '').$near_add2; ?>}, |
|
664 | 664 | function (results, status) { |
665 | 665 | if (status == google.maps.GeocoderStatus.OK) { |
666 | 666 | updateSearchPosition(results[0].geometry.location, $form); |
667 | 667 | } else { |
668 | - alert("<?php esc_attr_e('Search was not successful for the following reason :', 'geodirectory');?>" + status); |
|
668 | + alert("<?php esc_attr_e('Search was not successful for the following reason :', 'geodirectory'); ?>" + status); |
|
669 | 669 | } |
670 | 670 | }); |
671 | 671 | } else if (window.gdMaps === 'osm') { |
@@ -674,7 +674,7 @@ discard block |
||
674 | 674 | if (typeof geo !== 'undefined' && geo.lat && geo.lon) { |
675 | 675 | updateSearchPosition(geo, $form); |
676 | 676 | } else { |
677 | - alert("<?php esc_attr_e('Search was not successful for the requested address.', 'geodirectory');?>"); |
|
677 | + alert("<?php esc_attr_e('Search was not successful for the requested address.', 'geodirectory'); ?>"); |
|
678 | 678 | } |
679 | 679 | }); |
680 | 680 | } else { |
@@ -720,19 +720,19 @@ discard block |
||
720 | 720 | var msg; |
721 | 721 | switch (err.code) { |
722 | 722 | case err.UNKNOWN_ERROR: |
723 | - msg = "<?php _e('Unable to find your location','geodirectory');?>"; |
|
723 | + msg = "<?php _e('Unable to find your location', 'geodirectory'); ?>"; |
|
724 | 724 | break; |
725 | 725 | case err.PERMISSION_DENINED: |
726 | - msg = "<?php _e('Permission denied in finding your location','geodirectory');?>"; |
|
726 | + msg = "<?php _e('Permission denied in finding your location', 'geodirectory'); ?>"; |
|
727 | 727 | break; |
728 | 728 | case err.POSITION_UNAVAILABLE: |
729 | - msg = "<?php _e('Your location is currently unknown','geodirectory');?>"; |
|
729 | + msg = "<?php _e('Your location is currently unknown', 'geodirectory'); ?>"; |
|
730 | 730 | break; |
731 | 731 | case err.BREAK: |
732 | - msg = "<?php _e('Attempt to find location took too long','geodirectory');?>"; |
|
732 | + msg = "<?php _e('Attempt to find location took too long', 'geodirectory'); ?>"; |
|
733 | 733 | break; |
734 | 734 | default: |
735 | - msg = "<?php _e('Location detection not supported in browser','geodirectory');?>"; |
|
735 | + msg = "<?php _e('Location detection not supported in browser', 'geodirectory'); ?>"; |
|
736 | 736 | } |
737 | 737 | jQuery('#info').html(msg); |
738 | 738 | } |
@@ -782,7 +782,7 @@ discard block |
||
782 | 782 | * @param object $post The post object. |
783 | 783 | * @param string $link The link to the post. |
784 | 784 | */ |
785 | - $return = apply_filters('geodir_featured_badge_on_image', '<a href="' . $link . '"><span class="geodir_featured_img"> </span></a>',$post,$link); |
|
785 | + $return = apply_filters('geodir_featured_badge_on_image', '<a href="'.$link.'"><span class="geodir_featured_img"> </span></a>', $post, $link); |
|
786 | 786 | break; |
787 | 787 | case 'new' : |
788 | 788 | /** |
@@ -792,7 +792,7 @@ discard block |
||
792 | 792 | * @param object $post The post object. |
793 | 793 | * @param string $link The link to the post. |
794 | 794 | */ |
795 | - $return = apply_filters('geodir_new_badge_on_image', '<a href="' . $link . '"><span class="geodir_new_listing"> </span></a>',$post,$link); |
|
795 | + $return = apply_filters('geodir_new_badge_on_image', '<a href="'.$link.'"><span class="geodir_new_listing"> </span></a>', $post, $link); |
|
796 | 796 | break; |
797 | 797 | |
798 | 798 | } |
@@ -806,8 +806,8 @@ discard block |
||
806 | 806 | * @since 1.6.22 |
807 | 807 | */ |
808 | 808 | function geodir_fix_script_conflict() { |
809 | - if ( wp_script_is( 'flexslider', 'enqueued' ) && wp_script_is( 'geodirectory-jquery-flexslider-js', 'enqueued' ) ) { |
|
810 | - wp_dequeue_script( 'flexslider' ); |
|
809 | + if (wp_script_is('flexslider', 'enqueued') && wp_script_is('geodirectory-jquery-flexslider-js', 'enqueued')) { |
|
810 | + wp_dequeue_script('flexslider'); |
|
811 | 811 | } |
812 | 812 | } |
813 | -add_action( 'wp_enqueue_scripts', 'geodir_fix_script_conflict', 100 ); |
|
814 | 813 | \ No newline at end of file |
814 | +add_action('wp_enqueue_scripts', 'geodir_fix_script_conflict', 100); |
|
815 | 815 | \ No newline at end of file |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | </script> |
261 | 261 | |
262 | 262 | <?php |
263 | - }elseif( get_option('geodir_ga_add_tracking_code') && get_option('geodir_ga_tracking_code') && !get_option('geodir_ga_account_id')){ |
|
263 | + } elseif( get_option('geodir_ga_add_tracking_code') && get_option('geodir_ga_tracking_code') && !get_option('geodir_ga_account_id')){ |
|
264 | 264 | echo stripslashes(get_option('geodir_ga_tracking_code')); |
265 | 265 | } |
266 | 266 | } |
@@ -299,13 +299,14 @@ discard block |
||
299 | 299 | */ |
300 | 300 | function geodir_add_async_forscript($url) |
301 | 301 | { |
302 | - if (strpos($url, '#asyncload')===false) |
|
303 | - return $url; |
|
304 | - else if (is_admin()) |
|
305 | - return str_replace('#asyncload', '', $url); |
|
306 | - else |
|
307 | - return str_replace('#asyncload', '', $url)."' async='async"; |
|
308 | -} |
|
302 | + if (strpos($url, '#asyncload')===false) { |
|
303 | + return $url; |
|
304 | + } else if (is_admin()) { |
|
305 | + return str_replace('#asyncload', '', $url); |
|
306 | + } else { |
|
307 | + return str_replace('#asyncload', '', $url)."' async='async"; |
|
308 | + } |
|
309 | + } |
|
309 | 310 | add_filter('clean_url', 'geodir_add_async_forscript', 11, 1); |
310 | 311 | |
311 | 312 | /** |
@@ -372,8 +373,10 @@ discard block |
||
372 | 373 | |
373 | 374 | $half_pages_to_show = round($pages_to_show / 2); |
374 | 375 | |
375 | - if (geodir_is_page('home')) // dont apply default pagination for geodirectory home page. |
|
376 | - return; |
|
376 | + if (geodir_is_page('home')) { |
|
377 | + // dont apply default pagination for geodirectory home page. |
|
378 | + return; |
|
379 | + } |
|
377 | 380 | |
378 | 381 | if (!is_single()) { |
379 | 382 | if (function_exists('geodir_location_geo_home_link')) { |
@@ -493,11 +496,21 @@ discard block |
||
493 | 496 | } |
494 | 497 | $dist_dif = 1000; |
495 | 498 | |
496 | - if ($dist <= 5000) $dist_dif = 500; |
|
497 | - if ($dist <= 1000) $dist_dif = 100; |
|
498 | - if ($dist <= 500) $dist_dif = 50; |
|
499 | - if ($dist <= 100) $dist_dif = 10; |
|
500 | - if ($dist <= 50) $dist_dif = 5; |
|
499 | + if ($dist <= 5000) { |
|
500 | + $dist_dif = 500; |
|
501 | + } |
|
502 | + if ($dist <= 1000) { |
|
503 | + $dist_dif = 100; |
|
504 | + } |
|
505 | + if ($dist <= 500) { |
|
506 | + $dist_dif = 50; |
|
507 | + } |
|
508 | + if ($dist <= 100) { |
|
509 | + $dist_dif = 10; |
|
510 | + } |
|
511 | + if ($dist <= 50) { |
|
512 | + $dist_dif = 5; |
|
513 | + } |
|
501 | 514 | |
502 | 515 | ?> |
503 | 516 | <script type="text/javascript"> |
@@ -558,12 +571,14 @@ discard block |
||
558 | 571 | */ |
559 | 572 | function geodir_add_sharelocation_scripts() { |
560 | 573 | $default_search_for_text = SEARCH_FOR_TEXT; |
561 | - if (get_option('geodir_search_field_default_text')) |
|
562 | - $default_search_for_text = __(get_option('geodir_search_field_default_text'), 'geodirectory'); |
|
574 | + if (get_option('geodir_search_field_default_text')) { |
|
575 | + $default_search_for_text = __(get_option('geodir_search_field_default_text'), 'geodirectory'); |
|
576 | + } |
|
563 | 577 | |
564 | 578 | $default_near_text = NEAR_TEXT; |
565 | - if (get_option('geodir_near_field_default_text')) |
|
566 | - $default_near_text = __(get_option('geodir_near_field_default_text'), 'geodirectory'); |
|
579 | + if (get_option('geodir_near_field_default_text')) { |
|
580 | + $default_near_text = __(get_option('geodir_near_field_default_text'), 'geodirectory'); |
|
581 | + } |
|
567 | 582 | |
568 | 583 | $search_location = geodir_get_default_location(); |
569 | 584 |