@@ -16,184 +16,184 @@ |
||
16 | 16 | */ |
17 | 17 | $geodir_settings['permalink_settings'] = apply_filters('geodir_permalink_settings', array( |
18 | 18 | |
19 | - /* Listing Permalink Settings start */ |
|
20 | - array('name' => __('Permalink', 'geodirectory'), 'type' => 'no_tabs', 'desc' => 'Settings to set permalink', 'id' => 'geodir_permalink_settings '), |
|
21 | - |
|
22 | - |
|
23 | - array('name' => __('Listing Detail Permalink Settings', 'geodirectory'), |
|
24 | - 'type' => 'sectionstart', |
|
25 | - 'desc' => '', |
|
26 | - 'id' => 'geodir_permalink'), |
|
27 | - |
|
28 | - array( |
|
29 | - 'name' => __('Add location in urls', 'geodirectory'), |
|
30 | - 'desc' => __('Add location slug in listing urls', 'geodirectory'), |
|
31 | - 'id' => 'geodir_add_location_url', |
|
32 | - 'type' => 'checkbox', |
|
33 | - 'std' => '1', |
|
34 | - 'checkboxgroup' => 'start' |
|
35 | - ), |
|
36 | - |
|
37 | - array( |
|
38 | - 'name' => __('Add full location in listing urls', 'geodirectory'), |
|
39 | - 'desc' => __('Add full location info with country, region and city slug in listing urls', 'geodirectory'), |
|
40 | - 'id' => 'geodir_show_location_url', |
|
41 | - 'type' => 'radio', |
|
42 | - 'value' => 'all', |
|
43 | - 'std' => 'all', |
|
44 | - 'radiogroup' => '' |
|
45 | - ), |
|
46 | - |
|
47 | - array( |
|
48 | - 'name' => __('Add country and city slug in listing urls', 'geodirectory'), |
|
49 | - 'desc' => __('Add country and city slug in listing urls (/country/city/)', 'geodirectory'), |
|
50 | - 'id' => 'geodir_show_location_url', |
|
51 | - 'type' => 'radio', |
|
52 | - 'std' => 'all', |
|
53 | - 'value' => 'country_city', |
|
54 | - 'radiogroup' => '' |
|
55 | - ), |
|
56 | - array( |
|
57 | - 'name' => __('Add region and city slug in listing urls', 'geodirectory'), |
|
58 | - 'desc' => __('Add region and city slug in listing urls (/region/city/)', 'geodirectory'), |
|
59 | - 'id' => 'geodir_show_location_url', |
|
60 | - 'type' => 'radio', |
|
61 | - 'std' => 'all', |
|
62 | - 'value' => 'region_city', |
|
63 | - 'radiogroup' => '' |
|
64 | - ), |
|
65 | - array( |
|
66 | - 'name' => __('Add only city in listing urls', 'geodirectory'), |
|
67 | - 'desc' => __('Add city slug in listing urls', 'geodirectory'), |
|
68 | - 'id' => 'geodir_show_location_url', |
|
69 | - 'type' => 'radio', |
|
70 | - 'std' => 'all', |
|
71 | - 'value' => 'city', |
|
72 | - 'radiogroup' => 'end' |
|
73 | - ), |
|
74 | - |
|
75 | - |
|
76 | - |
|
77 | - array( |
|
78 | - 'name' => __('Add category in listing urls', 'geodirectory'), |
|
79 | - 'desc' => __('Add requested category slugs in listing urls', 'geodirectory'), |
|
80 | - 'id' => 'geodir_add_categories_url', |
|
81 | - 'type' => 'checkbox', |
|
82 | - 'std' => '1', |
|
83 | - ), |
|
84 | - |
|
85 | - array( |
|
86 | - 'name' => __('Listing url prefix', 'geodirectory'), |
|
87 | - 'desc' => __('Listing prefix to show in url', 'geodirectory'), |
|
88 | - 'id' => 'geodir_listing_prefix', |
|
89 | - 'type' => 'text', |
|
90 | - 'css' => 'min-width:300px;', |
|
91 | - 'std' => 'places' |
|
92 | - ), |
|
93 | - |
|
94 | - array( |
|
95 | - 'name' => __('Location url prefix', 'geodirectory'), |
|
96 | - 'desc' => __('Depreciated, now uses the location page slug', 'geodirectory'), |
|
97 | - 'id' => 'geodir_location_prefix', |
|
98 | - 'type' => 'text', |
|
99 | - 'css' => 'min-width:300px;', |
|
100 | - 'std' => 'location' // Default value to show home top section |
|
101 | - ), |
|
102 | - |
|
103 | - array( |
|
104 | - 'name' => __('Location and category url separator', 'geodirectory'), |
|
105 | - 'desc' => __('Separator to show between location and category url slugs in listing urls', 'geodirectory'), |
|
106 | - 'id' => 'geodir_listingurl_separator', |
|
107 | - 'type' => 'text', |
|
108 | - 'css' => 'min-width:300px;', |
|
109 | - 'std' => 'C' // Default value to show home top section |
|
110 | - ), |
|
111 | - |
|
112 | - array( |
|
113 | - 'name' => __('Listing detail url separator', 'geodirectory'), |
|
114 | - 'desc' => __('Separator to show before listing slug in listing detail urls', 'geodirectory'), |
|
115 | - 'id' => 'geodir_detailurl_separator', |
|
116 | - 'type' => 'text', |
|
117 | - 'css' => 'min-width:300px;', |
|
118 | - 'std' => 'info' // Default value to show home top section |
|
119 | - ), |
|
120 | - |
|
121 | - |
|
122 | - array('type' => 'sectionend', 'id' => 'geodir_permalink'), |
|
123 | - |
|
124 | - array('name' => __('GeoDirectory Pages', 'geodirectory'), |
|
125 | - 'type' => 'sectionstart', |
|
126 | - 'desc' => '', |
|
127 | - 'id' => 'geodir_pages'), |
|
128 | - |
|
129 | - array( |
|
130 | - 'name' => __('GD Home page', 'geodirectory'), |
|
131 | - 'desc' => __('Select the page to use for the GD homepage (you must also set this page in Settings>Reading>Front page for it to work)', 'geodirectory'), |
|
132 | - 'id' => 'geodir_home_page', |
|
133 | - 'type' => 'single_select_page', |
|
134 | - 'class' => 'chosen_select' |
|
135 | - ), |
|
136 | - |
|
137 | - array( |
|
138 | - 'name' => __('Add listing page', 'geodirectory'), |
|
139 | - 'desc' => __('Select the page to use for adding listings', 'geodirectory'), |
|
140 | - 'id' => 'geodir_add_listing_page', |
|
141 | - 'type' => 'single_select_page', |
|
142 | - 'class' => 'chosen_select' |
|
143 | - ), |
|
144 | - |
|
145 | - array( |
|
146 | - 'name' => __('Listing preview page', 'geodirectory'), |
|
147 | - 'desc' => __('Select the page to use for listing preview', 'geodirectory'), |
|
148 | - 'id' => 'geodir_preview_page', |
|
149 | - 'type' => 'single_select_page', |
|
150 | - 'class' => 'chosen_select' |
|
151 | - ), |
|
152 | - |
|
153 | - array( |
|
154 | - 'name' => __('Listing success page', 'geodirectory'), |
|
155 | - 'desc' => __('Select the page to use for listing success', 'geodirectory'), |
|
156 | - 'id' => 'geodir_success_page', |
|
157 | - 'type' => 'single_select_page', |
|
158 | - 'class' => 'chosen_select' |
|
159 | - ), |
|
160 | - |
|
161 | - array( |
|
162 | - 'name' => __('Location page', 'geodirectory'), |
|
163 | - 'desc' => __('Select the page to use for locations', 'geodirectory'), |
|
164 | - 'id' => 'geodir_location_page', |
|
165 | - 'type' => 'single_select_page', |
|
166 | - 'class' => 'chosen_select' |
|
167 | - ), |
|
168 | - |
|
169 | - array( |
|
170 | - 'name' => __('Terms and Conditions page', 'geodirectory'), |
|
171 | - 'desc' => __('Select the page to use for Terms and Conditions (if enabled)', 'geodirectory'), |
|
172 | - 'id' => 'geodir_term_condition_page', |
|
173 | - 'type' => 'single_select_page', |
|
174 | - 'class' => 'chosen_select' |
|
175 | - ), |
|
176 | - |
|
177 | - array( |
|
178 | - 'name' => __('Info page', 'geodirectory'), |
|
179 | - 'desc' => __('Select the page to use for Gd general Info', 'geodirectory'), |
|
180 | - 'id' => 'geodir_info_page', |
|
181 | - 'type' => 'single_select_page', |
|
182 | - 'class' => 'chosen_select' |
|
183 | - ), |
|
184 | - |
|
185 | - array( |
|
186 | - 'name' => __('Login page', 'geodirectory'), |
|
187 | - 'desc' => __('Select the page to use for Login / Register', 'geodirectory'), |
|
188 | - 'id' => 'geodir_login_page', |
|
189 | - 'type' => 'single_select_page', |
|
190 | - 'class' => 'chosen_select' |
|
191 | - ), |
|
192 | - |
|
193 | - |
|
194 | - array('type' => 'sectionend', 'id' => 'geodir_pages'), |
|
195 | - |
|
196 | - /* Listing Detail Permalink Settings End */ |
|
19 | + /* Listing Permalink Settings start */ |
|
20 | + array('name' => __('Permalink', 'geodirectory'), 'type' => 'no_tabs', 'desc' => 'Settings to set permalink', 'id' => 'geodir_permalink_settings '), |
|
21 | + |
|
22 | + |
|
23 | + array('name' => __('Listing Detail Permalink Settings', 'geodirectory'), |
|
24 | + 'type' => 'sectionstart', |
|
25 | + 'desc' => '', |
|
26 | + 'id' => 'geodir_permalink'), |
|
27 | + |
|
28 | + array( |
|
29 | + 'name' => __('Add location in urls', 'geodirectory'), |
|
30 | + 'desc' => __('Add location slug in listing urls', 'geodirectory'), |
|
31 | + 'id' => 'geodir_add_location_url', |
|
32 | + 'type' => 'checkbox', |
|
33 | + 'std' => '1', |
|
34 | + 'checkboxgroup' => 'start' |
|
35 | + ), |
|
36 | + |
|
37 | + array( |
|
38 | + 'name' => __('Add full location in listing urls', 'geodirectory'), |
|
39 | + 'desc' => __('Add full location info with country, region and city slug in listing urls', 'geodirectory'), |
|
40 | + 'id' => 'geodir_show_location_url', |
|
41 | + 'type' => 'radio', |
|
42 | + 'value' => 'all', |
|
43 | + 'std' => 'all', |
|
44 | + 'radiogroup' => '' |
|
45 | + ), |
|
46 | + |
|
47 | + array( |
|
48 | + 'name' => __('Add country and city slug in listing urls', 'geodirectory'), |
|
49 | + 'desc' => __('Add country and city slug in listing urls (/country/city/)', 'geodirectory'), |
|
50 | + 'id' => 'geodir_show_location_url', |
|
51 | + 'type' => 'radio', |
|
52 | + 'std' => 'all', |
|
53 | + 'value' => 'country_city', |
|
54 | + 'radiogroup' => '' |
|
55 | + ), |
|
56 | + array( |
|
57 | + 'name' => __('Add region and city slug in listing urls', 'geodirectory'), |
|
58 | + 'desc' => __('Add region and city slug in listing urls (/region/city/)', 'geodirectory'), |
|
59 | + 'id' => 'geodir_show_location_url', |
|
60 | + 'type' => 'radio', |
|
61 | + 'std' => 'all', |
|
62 | + 'value' => 'region_city', |
|
63 | + 'radiogroup' => '' |
|
64 | + ), |
|
65 | + array( |
|
66 | + 'name' => __('Add only city in listing urls', 'geodirectory'), |
|
67 | + 'desc' => __('Add city slug in listing urls', 'geodirectory'), |
|
68 | + 'id' => 'geodir_show_location_url', |
|
69 | + 'type' => 'radio', |
|
70 | + 'std' => 'all', |
|
71 | + 'value' => 'city', |
|
72 | + 'radiogroup' => 'end' |
|
73 | + ), |
|
74 | + |
|
75 | + |
|
76 | + |
|
77 | + array( |
|
78 | + 'name' => __('Add category in listing urls', 'geodirectory'), |
|
79 | + 'desc' => __('Add requested category slugs in listing urls', 'geodirectory'), |
|
80 | + 'id' => 'geodir_add_categories_url', |
|
81 | + 'type' => 'checkbox', |
|
82 | + 'std' => '1', |
|
83 | + ), |
|
84 | + |
|
85 | + array( |
|
86 | + 'name' => __('Listing url prefix', 'geodirectory'), |
|
87 | + 'desc' => __('Listing prefix to show in url', 'geodirectory'), |
|
88 | + 'id' => 'geodir_listing_prefix', |
|
89 | + 'type' => 'text', |
|
90 | + 'css' => 'min-width:300px;', |
|
91 | + 'std' => 'places' |
|
92 | + ), |
|
93 | + |
|
94 | + array( |
|
95 | + 'name' => __('Location url prefix', 'geodirectory'), |
|
96 | + 'desc' => __('Depreciated, now uses the location page slug', 'geodirectory'), |
|
97 | + 'id' => 'geodir_location_prefix', |
|
98 | + 'type' => 'text', |
|
99 | + 'css' => 'min-width:300px;', |
|
100 | + 'std' => 'location' // Default value to show home top section |
|
101 | + ), |
|
102 | + |
|
103 | + array( |
|
104 | + 'name' => __('Location and category url separator', 'geodirectory'), |
|
105 | + 'desc' => __('Separator to show between location and category url slugs in listing urls', 'geodirectory'), |
|
106 | + 'id' => 'geodir_listingurl_separator', |
|
107 | + 'type' => 'text', |
|
108 | + 'css' => 'min-width:300px;', |
|
109 | + 'std' => 'C' // Default value to show home top section |
|
110 | + ), |
|
111 | + |
|
112 | + array( |
|
113 | + 'name' => __('Listing detail url separator', 'geodirectory'), |
|
114 | + 'desc' => __('Separator to show before listing slug in listing detail urls', 'geodirectory'), |
|
115 | + 'id' => 'geodir_detailurl_separator', |
|
116 | + 'type' => 'text', |
|
117 | + 'css' => 'min-width:300px;', |
|
118 | + 'std' => 'info' // Default value to show home top section |
|
119 | + ), |
|
120 | + |
|
121 | + |
|
122 | + array('type' => 'sectionend', 'id' => 'geodir_permalink'), |
|
123 | + |
|
124 | + array('name' => __('GeoDirectory Pages', 'geodirectory'), |
|
125 | + 'type' => 'sectionstart', |
|
126 | + 'desc' => '', |
|
127 | + 'id' => 'geodir_pages'), |
|
128 | + |
|
129 | + array( |
|
130 | + 'name' => __('GD Home page', 'geodirectory'), |
|
131 | + 'desc' => __('Select the page to use for the GD homepage (you must also set this page in Settings>Reading>Front page for it to work)', 'geodirectory'), |
|
132 | + 'id' => 'geodir_home_page', |
|
133 | + 'type' => 'single_select_page', |
|
134 | + 'class' => 'chosen_select' |
|
135 | + ), |
|
136 | + |
|
137 | + array( |
|
138 | + 'name' => __('Add listing page', 'geodirectory'), |
|
139 | + 'desc' => __('Select the page to use for adding listings', 'geodirectory'), |
|
140 | + 'id' => 'geodir_add_listing_page', |
|
141 | + 'type' => 'single_select_page', |
|
142 | + 'class' => 'chosen_select' |
|
143 | + ), |
|
144 | + |
|
145 | + array( |
|
146 | + 'name' => __('Listing preview page', 'geodirectory'), |
|
147 | + 'desc' => __('Select the page to use for listing preview', 'geodirectory'), |
|
148 | + 'id' => 'geodir_preview_page', |
|
149 | + 'type' => 'single_select_page', |
|
150 | + 'class' => 'chosen_select' |
|
151 | + ), |
|
152 | + |
|
153 | + array( |
|
154 | + 'name' => __('Listing success page', 'geodirectory'), |
|
155 | + 'desc' => __('Select the page to use for listing success', 'geodirectory'), |
|
156 | + 'id' => 'geodir_success_page', |
|
157 | + 'type' => 'single_select_page', |
|
158 | + 'class' => 'chosen_select' |
|
159 | + ), |
|
160 | + |
|
161 | + array( |
|
162 | + 'name' => __('Location page', 'geodirectory'), |
|
163 | + 'desc' => __('Select the page to use for locations', 'geodirectory'), |
|
164 | + 'id' => 'geodir_location_page', |
|
165 | + 'type' => 'single_select_page', |
|
166 | + 'class' => 'chosen_select' |
|
167 | + ), |
|
168 | + |
|
169 | + array( |
|
170 | + 'name' => __('Terms and Conditions page', 'geodirectory'), |
|
171 | + 'desc' => __('Select the page to use for Terms and Conditions (if enabled)', 'geodirectory'), |
|
172 | + 'id' => 'geodir_term_condition_page', |
|
173 | + 'type' => 'single_select_page', |
|
174 | + 'class' => 'chosen_select' |
|
175 | + ), |
|
176 | + |
|
177 | + array( |
|
178 | + 'name' => __('Info page', 'geodirectory'), |
|
179 | + 'desc' => __('Select the page to use for Gd general Info', 'geodirectory'), |
|
180 | + 'id' => 'geodir_info_page', |
|
181 | + 'type' => 'single_select_page', |
|
182 | + 'class' => 'chosen_select' |
|
183 | + ), |
|
184 | + |
|
185 | + array( |
|
186 | + 'name' => __('Login page', 'geodirectory'), |
|
187 | + 'desc' => __('Select the page to use for Login / Register', 'geodirectory'), |
|
188 | + 'id' => 'geodir_login_page', |
|
189 | + 'type' => 'single_select_page', |
|
190 | + 'class' => 'chosen_select' |
|
191 | + ), |
|
192 | + |
|
193 | + |
|
194 | + array('type' => 'sectionend', 'id' => 'geodir_pages'), |
|
195 | + |
|
196 | + /* Listing Detail Permalink Settings End */ |
|
197 | 197 | |
198 | 198 | |
199 | 199 | )); // End Design settings |
@@ -18,11 +18,11 @@ discard block |
||
18 | 18 | */ |
19 | 19 | function geodir_divi_signup_body_class($classes) |
20 | 20 | { |
21 | - if (geodir_is_page('login')) { |
|
22 | - $classes = str_replace('et_right_sidebar', 'et_full_width_page', $classes); |
|
23 | - $classes[] = 'divi-gd-signup'; |
|
24 | - } |
|
25 | - return $classes; |
|
21 | + if (geodir_is_page('login')) { |
|
22 | + $classes = str_replace('et_right_sidebar', 'et_full_width_page', $classes); |
|
23 | + $classes[] = 'divi-gd-signup'; |
|
24 | + } |
|
25 | + return $classes; |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | add_action('geodir_wrapper_close', 'geodir_divi_action_wrapper_close', 11); |
@@ -34,8 +34,8 @@ discard block |
||
34 | 34 | */ |
35 | 35 | function geodir_divi_action_wrapper_close() |
36 | 36 | { |
37 | - if (geodir_is_page('login')) { |
|
38 | - // We need to close extra divs generated by WRAPPER BEFORE MAIN CONTENT (below) because there is no sidebar on this page |
|
39 | - echo '</div></div>'; |
|
40 | - } |
|
37 | + if (geodir_is_page('login')) { |
|
38 | + // We need to close extra divs generated by WRAPPER BEFORE MAIN CONTENT (below) because there is no sidebar on this page |
|
39 | + echo '</div></div>'; |
|
40 | + } |
|
41 | 41 | } |
42 | 42 | \ No newline at end of file |
@@ -19,60 +19,60 @@ discard block |
||
19 | 19 | function geodir_x_action_calls() |
20 | 20 | { |
21 | 21 | |
22 | - /* ACTIONS |
|
22 | + /* ACTIONS |
|
23 | 23 | ****************************************************************************************/ |
24 | 24 | |
25 | - // Add body class for styling purposes |
|
26 | - add_filter('body_class', 'geodir_x_body_class'); |
|
25 | + // Add body class for styling purposes |
|
26 | + add_filter('body_class', 'geodir_x_body_class'); |
|
27 | 27 | |
28 | - // HOME TOP SIDEBAR |
|
29 | - //remove_action( 'geodir_location_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10 ); |
|
30 | - //remove_action( 'geodir_home_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10 ); |
|
31 | - //add_action( 'geodir_wrapper_open', 'geodir_x_home_sidebar', 5 ); |
|
32 | - add_action('geodir_before_search_form', 'geodir_x_search_container_open'); |
|
33 | - add_action('geodir_after_search_form', 'geodir_x_search_container_close'); |
|
28 | + // HOME TOP SIDEBAR |
|
29 | + //remove_action( 'geodir_location_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10 ); |
|
30 | + //remove_action( 'geodir_home_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10 ); |
|
31 | + //add_action( 'geodir_wrapper_open', 'geodir_x_home_sidebar', 5 ); |
|
32 | + add_action('geodir_before_search_form', 'geodir_x_search_container_open'); |
|
33 | + add_action('geodir_after_search_form', 'geodir_x_search_container_close'); |
|
34 | 34 | |
35 | - // WRAPPER OPEN ACTIONS |
|
36 | - remove_action('geodir_wrapper_open', 'geodir_action_wrapper_open', 10); |
|
37 | - add_action('geodir_wrapper_open', 'geodir_x_action_wrapper_open', 9); |
|
35 | + // WRAPPER OPEN ACTIONS |
|
36 | + remove_action('geodir_wrapper_open', 'geodir_action_wrapper_open', 10); |
|
37 | + add_action('geodir_wrapper_open', 'geodir_x_action_wrapper_open', 9); |
|
38 | 38 | |
39 | - // WRAPPER CLOSE ACTIONS |
|
40 | - remove_action('geodir_wrapper_close', 'geodir_action_wrapper_close', 10); |
|
41 | - add_action('geodir_wrapper_close', 'geodir_x_action_wrapper_close', 11); |
|
39 | + // WRAPPER CLOSE ACTIONS |
|
40 | + remove_action('geodir_wrapper_close', 'geodir_action_wrapper_close', 10); |
|
41 | + add_action('geodir_wrapper_close', 'geodir_x_action_wrapper_close', 11); |
|
42 | 42 | |
43 | - // WRAPPER CONTENT OPEN ACTIONS |
|
44 | - remove_action('geodir_wrapper_content_open', 'geodir_action_wrapper_content_open', 10); |
|
45 | - add_action('geodir_wrapper_content_open', 'geodir_x_action_wrapper_content_open', 9, 3); |
|
43 | + // WRAPPER CONTENT OPEN ACTIONS |
|
44 | + remove_action('geodir_wrapper_content_open', 'geodir_action_wrapper_content_open', 10); |
|
45 | + add_action('geodir_wrapper_content_open', 'geodir_x_action_wrapper_content_open', 9, 3); |
|
46 | 46 | |
47 | - // WRAPPER CONTENT CLOSE ACTIONS |
|
48 | - remove_action('geodir_wrapper_content_close', 'geodir_action_wrapper_content_close', 10); |
|
49 | - add_action('geodir_wrapper_content_close', 'geodir_x_action_wrapper_content_close', 11); |
|
47 | + // WRAPPER CONTENT CLOSE ACTIONS |
|
48 | + remove_action('geodir_wrapper_content_close', 'geodir_action_wrapper_content_close', 10); |
|
49 | + add_action('geodir_wrapper_content_close', 'geodir_x_action_wrapper_content_close', 11); |
|
50 | 50 | |
51 | - // SIDEBAR RIGHT OPEN ACTIONS |
|
52 | - remove_action('geodir_sidebar_right_open', 'geodir_action_sidebar_right_open', 10); |
|
53 | - add_action('geodir_sidebar_right_open', 'geodir_x_action_sidebar_right_open', 10, 4); |
|
51 | + // SIDEBAR RIGHT OPEN ACTIONS |
|
52 | + remove_action('geodir_sidebar_right_open', 'geodir_action_sidebar_right_open', 10); |
|
53 | + add_action('geodir_sidebar_right_open', 'geodir_x_action_sidebar_right_open', 10, 4); |
|
54 | 54 | |
55 | - // SIDEBAR RIGHT CLOSE ACTIONS |
|
56 | - remove_action('geodir_sidebar_right_close', 'geodir_action_sidebar_right_close', 10); |
|
57 | - add_action('geodir_sidebar_right_close', 'geodir_x_action_sidebar_right_close', 10, 1); |
|
55 | + // SIDEBAR RIGHT CLOSE ACTIONS |
|
56 | + remove_action('geodir_sidebar_right_close', 'geodir_action_sidebar_right_close', 10); |
|
57 | + add_action('geodir_sidebar_right_close', 'geodir_x_action_sidebar_right_close', 10, 1); |
|
58 | 58 | |
59 | - // REMOVE BREADCRUMBS |
|
60 | - remove_action('geodir_listings_before_main_content', 'geodir_breadcrumb', 20); |
|
61 | - remove_action('geodir_detail_before_main_content', 'geodir_breadcrumb', 20); |
|
62 | - remove_action('geodir_search_before_main_content', 'geodir_breadcrumb', 20); |
|
63 | - remove_action('geodir_author_before_main_content', 'geodir_breadcrumb', 20); |
|
64 | - remove_action('geodir_home_before_main_content', 'geodir_breadcrumb', 20); |
|
65 | - remove_action('geodir_location_before_main_content', 'geodir_breadcrumb', 20); |
|
59 | + // REMOVE BREADCRUMBS |
|
60 | + remove_action('geodir_listings_before_main_content', 'geodir_breadcrumb', 20); |
|
61 | + remove_action('geodir_detail_before_main_content', 'geodir_breadcrumb', 20); |
|
62 | + remove_action('geodir_search_before_main_content', 'geodir_breadcrumb', 20); |
|
63 | + remove_action('geodir_author_before_main_content', 'geodir_breadcrumb', 20); |
|
64 | + remove_action('geodir_home_before_main_content', 'geodir_breadcrumb', 20); |
|
65 | + remove_action('geodir_location_before_main_content', 'geodir_breadcrumb', 20); |
|
66 | 66 | |
67 | - // make top section wide |
|
68 | - remove_action('geodir_home_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10); |
|
69 | - remove_action('geodir_location_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10); |
|
70 | - remove_action('geodir_author_before_main_content', 'geodir_action_geodir_sidebar_author_top', 10); |
|
71 | - remove_action('geodir_search_before_main_content', 'geodir_action_geodir_sidebar_search_top', 10); |
|
72 | - remove_action('geodir_detail_before_main_content', 'geodir_action_geodir_sidebar_detail_top', 10); |
|
73 | - remove_action('geodir_listings_before_main_content', 'geodir_action_geodir_sidebar_listings_top', 10); |
|
67 | + // make top section wide |
|
68 | + remove_action('geodir_home_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10); |
|
69 | + remove_action('geodir_location_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10); |
|
70 | + remove_action('geodir_author_before_main_content', 'geodir_action_geodir_sidebar_author_top', 10); |
|
71 | + remove_action('geodir_search_before_main_content', 'geodir_action_geodir_sidebar_search_top', 10); |
|
72 | + remove_action('geodir_detail_before_main_content', 'geodir_action_geodir_sidebar_detail_top', 10); |
|
73 | + remove_action('geodir_listings_before_main_content', 'geodir_action_geodir_sidebar_listings_top', 10); |
|
74 | 74 | |
75 | - add_action('geodir_wrapper_open', 'gd_X_compat_add_top_section_back', 5); |
|
75 | + add_action('geodir_wrapper_open', 'gd_X_compat_add_top_section_back', 5); |
|
76 | 76 | |
77 | 77 | |
78 | 78 | } // Close geodir_x_action_calls |
@@ -89,17 +89,17 @@ discard block |
||
89 | 89 | function gd_X_compat_add_top_section_back() |
90 | 90 | { |
91 | 91 | |
92 | - if (is_page_geodir_home() || geodir_is_page('location')) { |
|
93 | - geodir_action_geodir_sidebar_home_top(); |
|
94 | - } elseif (geodir_is_page('listing')) { |
|
95 | - geodir_action_geodir_sidebar_listings_top(); |
|
96 | - } elseif (geodir_is_page('detail')) { |
|
97 | - geodir_action_geodir_sidebar_detail_top(); |
|
98 | - } elseif (geodir_is_page('search')) { |
|
99 | - geodir_action_geodir_sidebar_search_top(); |
|
100 | - } elseif (geodir_is_page('author')) { |
|
101 | - geodir_action_geodir_sidebar_author_top(); |
|
102 | - } |
|
92 | + if (is_page_geodir_home() || geodir_is_page('location')) { |
|
93 | + geodir_action_geodir_sidebar_home_top(); |
|
94 | + } elseif (geodir_is_page('listing')) { |
|
95 | + geodir_action_geodir_sidebar_listings_top(); |
|
96 | + } elseif (geodir_is_page('detail')) { |
|
97 | + geodir_action_geodir_sidebar_detail_top(); |
|
98 | + } elseif (geodir_is_page('search')) { |
|
99 | + geodir_action_geodir_sidebar_search_top(); |
|
100 | + } elseif (geodir_is_page('author')) { |
|
101 | + geodir_action_geodir_sidebar_author_top(); |
|
102 | + } |
|
103 | 103 | |
104 | 104 | |
105 | 105 | } |
@@ -117,8 +117,8 @@ discard block |
||
117 | 117 | */ |
118 | 118 | function geodir_x_body_class($classes) |
119 | 119 | { |
120 | - $classes[] = 'geodir-x'; |
|
121 | - return $classes; |
|
120 | + $classes[] = 'geodir-x'; |
|
121 | + return $classes; |
|
122 | 122 | } |
123 | 123 | |
124 | 124 | /** |
@@ -130,14 +130,14 @@ discard block |
||
130 | 130 | */ |
131 | 131 | function geodir_x_home_sidebar() |
132 | 132 | { |
133 | - //if ( geodir_is_geodir_page() ) { |
|
134 | - global $wp; |
|
135 | - if ($wp->query_vars['page_id'] == geodir_location_page_id() || is_home() && !geodir_is_page('login')) { |
|
136 | - echo '<div class="x-main full">'; |
|
137 | - dynamic_sidebar('geodir_home_top'); |
|
138 | - echo '</div>'; |
|
139 | - } |
|
140 | - //} |
|
133 | + //if ( geodir_is_geodir_page() ) { |
|
134 | + global $wp; |
|
135 | + if ($wp->query_vars['page_id'] == geodir_location_page_id() || is_home() && !geodir_is_page('login')) { |
|
136 | + echo '<div class="x-main full">'; |
|
137 | + dynamic_sidebar('geodir_home_top'); |
|
138 | + echo '</div>'; |
|
139 | + } |
|
140 | + //} |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | /** |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | */ |
149 | 149 | function geodir_x_search_container_open() |
150 | 150 | { |
151 | - echo '<div class="x-container-fluid x-container max">'; |
|
151 | + echo '<div class="x-container-fluid x-container max">'; |
|
152 | 152 | } |
153 | 153 | |
154 | 154 | /** |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | */ |
160 | 160 | function geodir_x_search_container_close() |
161 | 161 | { |
162 | - echo '</div>'; |
|
162 | + echo '</div>'; |
|
163 | 163 | } |
164 | 164 | |
165 | 165 | /** |
@@ -170,16 +170,16 @@ discard block |
||
170 | 170 | */ |
171 | 171 | function geodir_x_action_wrapper_open() |
172 | 172 | { |
173 | - global $stack; |
|
174 | - if ($stack == 'integrity') { |
|
175 | - echo '<div class="x-container-fluid x-container max width offset">'; |
|
176 | - } elseif ($stack == 'renew') { |
|
177 | - echo '<div class="x-container-fluid x-container max width offset cf">'; |
|
178 | - } elseif ($stack == 'icon') { |
|
179 | - echo '<div class="x-main full" role="main">'; |
|
180 | - } elseif ($stack == 'ethos') { |
|
181 | - echo '<div class="x-container-fluid x-container max width main"><div class="offset cf">'; |
|
182 | - } |
|
173 | + global $stack; |
|
174 | + if ($stack == 'integrity') { |
|
175 | + echo '<div class="x-container-fluid x-container max width offset">'; |
|
176 | + } elseif ($stack == 'renew') { |
|
177 | + echo '<div class="x-container-fluid x-container max width offset cf">'; |
|
178 | + } elseif ($stack == 'icon') { |
|
179 | + echo '<div class="x-main full" role="main">'; |
|
180 | + } elseif ($stack == 'ethos') { |
|
181 | + echo '<div class="x-container-fluid x-container max width main"><div class="offset cf">'; |
|
182 | + } |
|
183 | 183 | } |
184 | 184 | |
185 | 185 | /** |
@@ -190,12 +190,12 @@ discard block |
||
190 | 190 | */ |
191 | 191 | function geodir_x_action_wrapper_close() |
192 | 192 | { |
193 | - global $stack; |
|
194 | - if ($stack == 'ethos') { |
|
195 | - echo '</div></div>'; |
|
196 | - } else { |
|
197 | - echo '</div>'; |
|
198 | - } |
|
193 | + global $stack; |
|
194 | + if ($stack == 'ethos') { |
|
195 | + echo '</div></div>'; |
|
196 | + } else { |
|
197 | + echo '</div>'; |
|
198 | + } |
|
199 | 199 | } |
200 | 200 | |
201 | 201 | /** |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | */ |
210 | 210 | function geodir_x_action_wrapper_content_open($type = '', $id = '', $class = '') |
211 | 211 | { |
212 | - echo '<div class="x-main left ' . $class . '" role="main">'; |
|
212 | + echo '<div class="x-main left ' . $class . '" role="main">'; |
|
213 | 213 | } |
214 | 214 | |
215 | 215 | /** |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | */ |
221 | 221 | function geodir_x_action_wrapper_content_close() |
222 | 222 | { |
223 | - echo '</div>'; |
|
223 | + echo '</div>'; |
|
224 | 224 | } |
225 | 225 | |
226 | 226 | /** |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | */ |
236 | 236 | function geodir_x_action_sidebar_right_open($type = '', $id = '', $class = '', $itemtype = '') |
237 | 237 | { |
238 | - echo '<aside class="x-sidebar right" role="complementary" itemscope itemtype="' . $itemtype . '">'; |
|
238 | + echo '<aside class="x-sidebar right" role="complementary" itemscope itemtype="' . $itemtype . '">'; |
|
239 | 239 | } |
240 | 240 | |
241 | 241 | /** |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | */ |
248 | 248 | function geodir_x_action_sidebar_right_close($type = '') |
249 | 249 | { |
250 | - echo '</aside>'; |
|
250 | + echo '</aside>'; |
|
251 | 251 | } |
252 | 252 | |
253 | 253 | add_filter('geodir_breadcrumb', 'geodir_x_breadcrumb'); |
@@ -261,12 +261,12 @@ discard block |
||
261 | 261 | */ |
262 | 262 | function geodir_x_breadcrumb($breadcrumb) |
263 | 263 | { |
264 | - $breadcrumb = str_replace('<div class="geodir-breadcrumb clearfix"><ul id="breadcrumbs">', '', $breadcrumb); |
|
265 | - $breadcrumb = str_replace('<li>', '', $breadcrumb); |
|
266 | - $breadcrumb = str_replace('</li>', '', $breadcrumb); |
|
267 | - $breadcrumb = str_replace('Home', '<span class="home"><i class="x-icon-home"></i></span>', $breadcrumb); |
|
268 | - $breadcrumb = str_replace('</ul></div>', '', $breadcrumb); |
|
269 | - return $breadcrumb; |
|
264 | + $breadcrumb = str_replace('<div class="geodir-breadcrumb clearfix"><ul id="breadcrumbs">', '', $breadcrumb); |
|
265 | + $breadcrumb = str_replace('<li>', '', $breadcrumb); |
|
266 | + $breadcrumb = str_replace('</li>', '', $breadcrumb); |
|
267 | + $breadcrumb = str_replace('Home', '<span class="home"><i class="x-icon-home"></i></span>', $breadcrumb); |
|
268 | + $breadcrumb = str_replace('</ul></div>', '', $breadcrumb); |
|
269 | + return $breadcrumb; |
|
270 | 270 | } |
271 | 271 | |
272 | 272 | add_filter('geodir_breadcrumb_separator', 'geodir_x_breadcrumb_separator'); |
@@ -280,125 +280,125 @@ discard block |
||
280 | 280 | */ |
281 | 281 | function geodir_x_breadcrumb_separator($separator) |
282 | 282 | { |
283 | - $separator = str_replace(' > ', ' <span class="delimiter"><i class="x-icon-angle-right"></i></span> ', $separator); |
|
284 | - return $separator; |
|
283 | + $separator = str_replace(' > ', ' <span class="delimiter"><i class="x-icon-angle-right"></i></span> ', $separator); |
|
284 | + return $separator; |
|
285 | 285 | } |
286 | 286 | |
287 | 287 | if (!function_exists('x_breadcrumbs')) : |
288 | - /** |
|
289 | - * breadcrumbs. |
|
290 | - * |
|
291 | - * @since 1.0.0 |
|
292 | - * @package GeoDirectory |
|
293 | - */ |
|
294 | - function x_breadcrumbs() |
|
295 | - { |
|
296 | - |
|
297 | - if (x_get_option('x_breadcrumb_display', '1')) { |
|
298 | - |
|
299 | - // |
|
300 | - // 1. Delimiter between crumbs. |
|
301 | - // 2. Output text for the "Home" link. |
|
302 | - // 3. Link to the home page. |
|
303 | - // 4. Tag before the current crumb. |
|
304 | - // 5. Tag after the current crumb. |
|
305 | - // 6. Get page title. |
|
306 | - // 7. Get blog title. |
|
307 | - // 8. Get shop title. |
|
308 | - // |
|
309 | - |
|
310 | - GLOBAL $post,$wp; |
|
311 | - |
|
312 | - if (geodir_is_page('detail') || geodir_is_page('listing') || (isset($wp->query_vars['page_id']) && $wp->query_vars['page_id'] == geodir_location_page_id())) { |
|
313 | - geodir_breadcrumb(); |
|
314 | - } else { |
|
315 | - |
|
316 | - $stack = x_get_stack(); |
|
317 | - $delimiter = ' <span class="delimiter"><i class="x-icon-angle-right"></i></span> '; // 1 |
|
318 | - $home_text = '<span class="home"><i class="x-icon-home"></i></span>'; // 2 |
|
319 | - $home_link = home_url(); // 3 |
|
320 | - $current_before = '<span class="current">'; // 4 |
|
321 | - $current_after = '</span>'; // 5 |
|
322 | - $page_title = get_the_title(); // 6 |
|
323 | - $blog_title = get_the_title(get_option('page_for_posts', true)); // 7 |
|
324 | - $shop_title = get_theme_mod('x_' . $stack . '_shop_title'); // 8 |
|
325 | - |
|
326 | - if (function_exists('woocommerce_get_page_id')) { |
|
327 | - $shop_url = x_get_shop_link(); |
|
328 | - $shop_link = '<a href="' . $shop_url . '">' . $shop_title . '</a>'; |
|
329 | - } |
|
330 | - |
|
331 | - if (is_front_page()) { |
|
332 | - echo '<div class="x-breadcrumbs">' . $current_before . $home_text . $current_after . '</div>'; |
|
333 | - } elseif (is_home()) { |
|
334 | - echo '<div class="x-breadcrumbs"><a href="' . $home_link . '">' . $home_text . '</a>' . $delimiter . $current_before . $blog_title . $current_after . '</div>'; |
|
335 | - } else { |
|
336 | - echo '<div class="x-breadcrumbs"><a href="' . $home_link . '">' . $home_text . '</a>' . $delimiter; |
|
337 | - if (is_category()) { |
|
338 | - $the_cat = get_category(get_query_var('cat'), false); |
|
339 | - if ($the_cat->parent != 0) echo get_category_parents($the_cat->parent, TRUE, $delimiter); |
|
340 | - echo $current_before . single_cat_title('', false) . $current_after; |
|
341 | - } elseif (x_is_product_category()) { |
|
342 | - echo $shop_link . $delimiter . $current_before . single_cat_title('', false) . $current_after; |
|
343 | - } elseif (x_is_product_tag()) { |
|
344 | - echo $shop_link . $delimiter . $current_before . single_tag_title('', false) . $current_after; |
|
345 | - } elseif (is_search()) { |
|
346 | - echo $current_before . __('Search Results for ', '__x__') . '“' . get_search_query() . '”' . $current_after; |
|
347 | - } elseif (is_singular('post')) { |
|
348 | - if (get_option('page_for_posts') == is_front_page()) { |
|
349 | - echo $current_before . $page_title . $current_after; |
|
350 | - } else { |
|
351 | - echo '<a href="' . get_permalink(get_option('page_for_posts')) . '" title="' . esc_attr(__('See All Posts', '__x__')) . '">' . $blog_title . '</a>' . $delimiter . $current_before . $page_title . $current_after; |
|
352 | - } |
|
353 | - } elseif (x_is_portfolio()) { |
|
354 | - echo $current_before . get_the_title() . $current_after; |
|
355 | - } elseif (x_is_portfolio_item()) { |
|
356 | - $link = x_get_parent_portfolio_link(); |
|
357 | - $title = x_get_parent_portfolio_title(); |
|
358 | - echo '<a href="' . $link . '" title="' . esc_attr(__('See All Posts', '__x__')) . '">' . $title . '</a>' . $delimiter . $current_before . $page_title . $current_after; |
|
359 | - } elseif (x_is_product()) { |
|
360 | - echo $shop_link . $delimiter . $current_before . $page_title . $current_after; |
|
361 | - } elseif (is_page() && !$post->post_parent) { |
|
362 | - echo $current_before . $page_title . $current_after; |
|
363 | - } elseif (is_page() && $post->post_parent) { |
|
364 | - $parent_id = $post->post_parent; |
|
365 | - $breadcrumbs = array(); |
|
366 | - while ($parent_id) { |
|
367 | - $page = get_page($parent_id); |
|
368 | - $breadcrumbs[] = '<a href="' . get_permalink($page->ID) . '">' . get_the_title($page->ID) . '</a>'; |
|
369 | - $parent_id = $page->post_parent; |
|
370 | - } |
|
371 | - $breadcrumbs = array_reverse($breadcrumbs); |
|
372 | - for ($i = 0; $i < count($breadcrumbs); $i++) { |
|
373 | - echo $breadcrumbs[$i]; |
|
374 | - if ($i != count($breadcrumbs) - 1) echo $delimiter; |
|
375 | - } |
|
376 | - echo $delimiter . $current_before . $page_title . $current_after; |
|
377 | - } elseif (is_tag()) { |
|
378 | - echo $current_before . single_tag_title('', false) . $current_after; |
|
379 | - } elseif (is_author()) { |
|
380 | - GLOBAL $author; |
|
381 | - $userdata = get_userdata($author); |
|
382 | - echo $current_before . __('Posts by ', '__x__') . '“' . $userdata->display_name . $current_after . '”'; |
|
383 | - } elseif (is_404()) { |
|
384 | - echo $current_before . __('404 (Page Not Found)', '__x__') . $current_after; |
|
385 | - } elseif (is_archive()) { |
|
386 | - if (x_is_shop()) { |
|
387 | - echo $current_before . $shop_title . $current_after; |
|
388 | - } else { |
|
389 | - echo $current_before . __('Archives ', '__x__') . $current_after; |
|
390 | - } |
|
391 | - } |
|
392 | - if (get_query_var('paged')) { |
|
393 | - echo ' <span class="current" style="white-space: nowrap;">(' . __('Page', '__x__') . ' ' . get_query_var('paged') . ')</span>'; |
|
394 | - } |
|
395 | - echo '</div>'; |
|
396 | - } |
|
397 | - |
|
398 | - } |
|
399 | - |
|
400 | - } |
|
401 | - } // ends my geodir check |
|
288 | + /** |
|
289 | + * breadcrumbs. |
|
290 | + * |
|
291 | + * @since 1.0.0 |
|
292 | + * @package GeoDirectory |
|
293 | + */ |
|
294 | + function x_breadcrumbs() |
|
295 | + { |
|
296 | + |
|
297 | + if (x_get_option('x_breadcrumb_display', '1')) { |
|
298 | + |
|
299 | + // |
|
300 | + // 1. Delimiter between crumbs. |
|
301 | + // 2. Output text for the "Home" link. |
|
302 | + // 3. Link to the home page. |
|
303 | + // 4. Tag before the current crumb. |
|
304 | + // 5. Tag after the current crumb. |
|
305 | + // 6. Get page title. |
|
306 | + // 7. Get blog title. |
|
307 | + // 8. Get shop title. |
|
308 | + // |
|
309 | + |
|
310 | + GLOBAL $post,$wp; |
|
311 | + |
|
312 | + if (geodir_is_page('detail') || geodir_is_page('listing') || (isset($wp->query_vars['page_id']) && $wp->query_vars['page_id'] == geodir_location_page_id())) { |
|
313 | + geodir_breadcrumb(); |
|
314 | + } else { |
|
315 | + |
|
316 | + $stack = x_get_stack(); |
|
317 | + $delimiter = ' <span class="delimiter"><i class="x-icon-angle-right"></i></span> '; // 1 |
|
318 | + $home_text = '<span class="home"><i class="x-icon-home"></i></span>'; // 2 |
|
319 | + $home_link = home_url(); // 3 |
|
320 | + $current_before = '<span class="current">'; // 4 |
|
321 | + $current_after = '</span>'; // 5 |
|
322 | + $page_title = get_the_title(); // 6 |
|
323 | + $blog_title = get_the_title(get_option('page_for_posts', true)); // 7 |
|
324 | + $shop_title = get_theme_mod('x_' . $stack . '_shop_title'); // 8 |
|
325 | + |
|
326 | + if (function_exists('woocommerce_get_page_id')) { |
|
327 | + $shop_url = x_get_shop_link(); |
|
328 | + $shop_link = '<a href="' . $shop_url . '">' . $shop_title . '</a>'; |
|
329 | + } |
|
330 | + |
|
331 | + if (is_front_page()) { |
|
332 | + echo '<div class="x-breadcrumbs">' . $current_before . $home_text . $current_after . '</div>'; |
|
333 | + } elseif (is_home()) { |
|
334 | + echo '<div class="x-breadcrumbs"><a href="' . $home_link . '">' . $home_text . '</a>' . $delimiter . $current_before . $blog_title . $current_after . '</div>'; |
|
335 | + } else { |
|
336 | + echo '<div class="x-breadcrumbs"><a href="' . $home_link . '">' . $home_text . '</a>' . $delimiter; |
|
337 | + if (is_category()) { |
|
338 | + $the_cat = get_category(get_query_var('cat'), false); |
|
339 | + if ($the_cat->parent != 0) echo get_category_parents($the_cat->parent, TRUE, $delimiter); |
|
340 | + echo $current_before . single_cat_title('', false) . $current_after; |
|
341 | + } elseif (x_is_product_category()) { |
|
342 | + echo $shop_link . $delimiter . $current_before . single_cat_title('', false) . $current_after; |
|
343 | + } elseif (x_is_product_tag()) { |
|
344 | + echo $shop_link . $delimiter . $current_before . single_tag_title('', false) . $current_after; |
|
345 | + } elseif (is_search()) { |
|
346 | + echo $current_before . __('Search Results for ', '__x__') . '“' . get_search_query() . '”' . $current_after; |
|
347 | + } elseif (is_singular('post')) { |
|
348 | + if (get_option('page_for_posts') == is_front_page()) { |
|
349 | + echo $current_before . $page_title . $current_after; |
|
350 | + } else { |
|
351 | + echo '<a href="' . get_permalink(get_option('page_for_posts')) . '" title="' . esc_attr(__('See All Posts', '__x__')) . '">' . $blog_title . '</a>' . $delimiter . $current_before . $page_title . $current_after; |
|
352 | + } |
|
353 | + } elseif (x_is_portfolio()) { |
|
354 | + echo $current_before . get_the_title() . $current_after; |
|
355 | + } elseif (x_is_portfolio_item()) { |
|
356 | + $link = x_get_parent_portfolio_link(); |
|
357 | + $title = x_get_parent_portfolio_title(); |
|
358 | + echo '<a href="' . $link . '" title="' . esc_attr(__('See All Posts', '__x__')) . '">' . $title . '</a>' . $delimiter . $current_before . $page_title . $current_after; |
|
359 | + } elseif (x_is_product()) { |
|
360 | + echo $shop_link . $delimiter . $current_before . $page_title . $current_after; |
|
361 | + } elseif (is_page() && !$post->post_parent) { |
|
362 | + echo $current_before . $page_title . $current_after; |
|
363 | + } elseif (is_page() && $post->post_parent) { |
|
364 | + $parent_id = $post->post_parent; |
|
365 | + $breadcrumbs = array(); |
|
366 | + while ($parent_id) { |
|
367 | + $page = get_page($parent_id); |
|
368 | + $breadcrumbs[] = '<a href="' . get_permalink($page->ID) . '">' . get_the_title($page->ID) . '</a>'; |
|
369 | + $parent_id = $page->post_parent; |
|
370 | + } |
|
371 | + $breadcrumbs = array_reverse($breadcrumbs); |
|
372 | + for ($i = 0; $i < count($breadcrumbs); $i++) { |
|
373 | + echo $breadcrumbs[$i]; |
|
374 | + if ($i != count($breadcrumbs) - 1) echo $delimiter; |
|
375 | + } |
|
376 | + echo $delimiter . $current_before . $page_title . $current_after; |
|
377 | + } elseif (is_tag()) { |
|
378 | + echo $current_before . single_tag_title('', false) . $current_after; |
|
379 | + } elseif (is_author()) { |
|
380 | + GLOBAL $author; |
|
381 | + $userdata = get_userdata($author); |
|
382 | + echo $current_before . __('Posts by ', '__x__') . '“' . $userdata->display_name . $current_after . '”'; |
|
383 | + } elseif (is_404()) { |
|
384 | + echo $current_before . __('404 (Page Not Found)', '__x__') . $current_after; |
|
385 | + } elseif (is_archive()) { |
|
386 | + if (x_is_shop()) { |
|
387 | + echo $current_before . $shop_title . $current_after; |
|
388 | + } else { |
|
389 | + echo $current_before . __('Archives ', '__x__') . $current_after; |
|
390 | + } |
|
391 | + } |
|
392 | + if (get_query_var('paged')) { |
|
393 | + echo ' <span class="current" style="white-space: nowrap;">(' . __('Page', '__x__') . ' ' . get_query_var('paged') . ')</span>'; |
|
394 | + } |
|
395 | + echo '</div>'; |
|
396 | + } |
|
397 | + |
|
398 | + } |
|
399 | + |
|
400 | + } |
|
401 | + } // ends my geodir check |
|
402 | 402 | endif; |
403 | 403 | |
404 | 404 | |
@@ -413,8 +413,8 @@ discard block |
||
413 | 413 | */ |
414 | 414 | function geodir_x_location_switcher_menu_li_class($class) |
415 | 415 | { |
416 | - $class .= " menu-item-has-children "; |
|
417 | - return $class; |
|
416 | + $class .= " menu-item-has-children "; |
|
417 | + return $class; |
|
418 | 418 | } |
419 | 419 | |
420 | 420 | add_filter('geodir_sub_menu_li_class', 'geodir_x_sub_menu_li_class', 10, 1); |
@@ -428,6 +428,6 @@ discard block |
||
428 | 428 | */ |
429 | 429 | function geodir_x_sub_menu_li_class($class) |
430 | 430 | { |
431 | - $class .= " menu-item-has-children "; |
|
432 | - return $class; |
|
431 | + $class .= " menu-item-has-children "; |
|
432 | + return $class; |
|
433 | 433 | } |
434 | 434 | \ No newline at end of file |
@@ -15,29 +15,29 @@ discard block |
||
15 | 15 | <?php |
16 | 16 | |
17 | 17 | |
18 | - global $wpdb; |
|
18 | + global $wpdb; |
|
19 | 19 | |
20 | - $post_id = $_REQUEST['pid']; |
|
21 | - $post_info = get_post($post_id); |
|
20 | + $post_id = $_REQUEST['pid']; |
|
21 | + $post_info = get_post($post_id); |
|
22 | 22 | |
23 | - $posted_date = $post_info->post_date; |
|
24 | - $productlink = get_permalink($post_id); |
|
25 | - $siteName = get_bloginfo('name'); |
|
26 | - $siteurl = home_url(); |
|
27 | - $siteurl_link = '<a href="' . $siteurl . '">' . $siteurl . '</a>'; |
|
23 | + $posted_date = $post_info->post_date; |
|
24 | + $productlink = get_permalink($post_id); |
|
25 | + $siteName = get_bloginfo('name'); |
|
26 | + $siteurl = home_url(); |
|
27 | + $siteurl_link = '<a href="' . $siteurl . '">' . $siteurl . '</a>'; |
|
28 | 28 | |
29 | - $loginurl = geodir_login_url(); |
|
30 | - $loginurl_link = '<a href="' . $loginurl . '">login</a>'; |
|
29 | + $loginurl = geodir_login_url(); |
|
30 | + $loginurl_link = '<a href="' . $loginurl . '">login</a>'; |
|
31 | 31 | |
32 | - $post_author = $post_info->post_author; |
|
32 | + $post_author = $post_info->post_author; |
|
33 | 33 | |
34 | - $user_info = get_userdata($post_author); |
|
35 | - $username = $user_info->user_login; |
|
36 | - $user_email = $user_info->user_email; |
|
34 | + $user_info = get_userdata($post_author); |
|
35 | + $username = $user_info->user_login; |
|
36 | + $user_email = $user_info->user_email; |
|
37 | 37 | |
38 | - $message = wpautop(__(stripslashes_deep(get_option('geodir_post_added_success_msg_content')),'geodirectory')); |
|
38 | + $message = wpautop(__(stripslashes_deep(get_option('geodir_post_added_success_msg_content')),'geodirectory')); |
|
39 | 39 | |
40 | - /* |
|
40 | + /* |
|
41 | 41 | * Filter the success page message before variable replacements. |
42 | 42 | * |
43 | 43 | * @since 1.5.7 |
@@ -45,13 +45,13 @@ discard block |
||
45 | 45 | * @param object $post_info Post object. |
46 | 46 | * @param object $user_info User object. |
47 | 47 | */ |
48 | - $message = apply_filters('geodir_success_page_msg_before_var_replace', $message,$post_info, $user_info); |
|
48 | + $message = apply_filters('geodir_success_page_msg_before_var_replace', $message,$post_info, $user_info); |
|
49 | 49 | |
50 | - $search_array = array('[#submited_information_link#]', '[#listing_link#]', '[#site_name_url#]', '[#post_id#]', '[#site_name#]', '[#user_email#]', '[#username#]', '[#login_url#]', '[#posted_date#]'); |
|
51 | - $replace_array = array($productlink, $productlink, $siteurl_link, $post_id, $siteName, $user_email, $username, $loginurl_link, $posted_date); |
|
52 | - $message = str_replace($search_array, $replace_array, $message); |
|
50 | + $search_array = array('[#submited_information_link#]', '[#listing_link#]', '[#site_name_url#]', '[#post_id#]', '[#site_name#]', '[#user_email#]', '[#username#]', '[#login_url#]', '[#posted_date#]'); |
|
51 | + $replace_array = array($productlink, $productlink, $siteurl_link, $post_id, $siteName, $user_email, $username, $loginurl_link, $posted_date); |
|
52 | + $message = str_replace($search_array, $replace_array, $message); |
|
53 | 53 | |
54 | - /* |
|
54 | + /* |
|
55 | 55 | * Filter the success page message after variable replacements. |
56 | 56 | * |
57 | 57 | * @since 1.5.7 |
@@ -59,15 +59,15 @@ discard block |
||
59 | 59 | * @param object $post_info Post object. |
60 | 60 | * @param object $user_info User object. |
61 | 61 | */ |
62 | - $message = apply_filters('geodir_success_page_msg_after_var_replace', $message,$post_info, $user_info); |
|
62 | + $message = apply_filters('geodir_success_page_msg_after_var_replace', $message,$post_info, $user_info); |
|
63 | 63 | |
64 | 64 | |
65 | 65 | |
66 | - ?> |
|
66 | + ?> |
|
67 | 67 | |
68 | 68 | <?php |
69 | 69 | |
70 | - /* |
|
70 | + /* |
|
71 | 71 | * Action called before the success page message wrapper. |
72 | 72 | * |
73 | 73 | * @since 1.5.7 |
@@ -75,11 +75,11 @@ discard block |
||
75 | 75 | * @param object $post_info Post object. |
76 | 76 | * @param object $user_info User object. |
77 | 77 | */ |
78 | - do_action('geodir_before_success_page_msg_wrapper', $message,$post_info, $user_info); |
|
79 | - echo '<h5 class="geodir_information">'; |
|
80 | - echo $message; |
|
81 | - echo '</h5>'; |
|
82 | - /* |
|
78 | + do_action('geodir_before_success_page_msg_wrapper', $message,$post_info, $user_info); |
|
79 | + echo '<h5 class="geodir_information">'; |
|
80 | + echo $message; |
|
81 | + echo '</h5>'; |
|
82 | + /* |
|
83 | 83 | * Action called after the success page message wrapper. |
84 | 84 | * |
85 | 85 | * @since 1.5.7 |
@@ -87,8 +87,8 @@ discard block |
||
87 | 87 | * @param object $post_info Post object. |
88 | 88 | * @param object $user_info User object. |
89 | 89 | */ |
90 | - do_action('geodir_after_success_page_msg_wrapper', $message,$post_info, $user_info); |
|
90 | + do_action('geodir_after_success_page_msg_wrapper', $message,$post_info, $user_info); |
|
91 | 91 | |
92 | - ?> |
|
92 | + ?> |
|
93 | 93 | |
94 | 94 | </div> |
95 | 95 | \ No newline at end of file |
@@ -14,160 +14,160 @@ discard block |
||
14 | 14 | */ |
15 | 15 | class geodir_related_listing_postview extends WP_Widget |
16 | 16 | { |
17 | - /** |
|
17 | + /** |
|
18 | 18 | * Register the related listing widget. |
19 | 19 | * |
20 | 20 | * @since 1.0.0 |
21 | - * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
21 | + * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
22 | 22 | */ |
23 | - public function __construct() { |
|
24 | - $widget_ops = array('classname' => 'geodir_related_listing_post_view', 'description' => __('GD > Related Listing', 'geodirectory')); |
|
25 | - parent::__construct( |
|
26 | - 'post_related_listing', // Base ID |
|
27 | - __('GD > Related Listing', 'geodirectory'), // Name |
|
28 | - $widget_ops// Args |
|
29 | - ); |
|
30 | - } |
|
23 | + public function __construct() { |
|
24 | + $widget_ops = array('classname' => 'geodir_related_listing_post_view', 'description' => __('GD > Related Listing', 'geodirectory')); |
|
25 | + parent::__construct( |
|
26 | + 'post_related_listing', // Base ID |
|
27 | + __('GD > Related Listing', 'geodirectory'), // Name |
|
28 | + $widget_ops// Args |
|
29 | + ); |
|
30 | + } |
|
31 | 31 | |
32 | 32 | /** |
33 | 33 | * Front-end display content for related listing widget. |
34 | 34 | * |
35 | 35 | * @since 1.0.0 |
36 | - * @since 1.5.1 Declare function public. |
|
36 | + * @since 1.5.1 Declare function public. |
|
37 | 37 | * |
38 | 38 | * @param array $args Widget arguments. |
39 | 39 | * @param array $instance Saved values from database. |
40 | 40 | */ |
41 | - public function widget($args, $instance) |
|
42 | - { |
|
41 | + public function widget($args, $instance) |
|
42 | + { |
|
43 | 43 | |
44 | - // prints the widget |
|
45 | - extract($args, EXTR_SKIP); |
|
44 | + // prints the widget |
|
45 | + extract($args, EXTR_SKIP); |
|
46 | 46 | |
47 | - /** This filter is documented in geodirectory_widgets.php */ |
|
48 | - $title = empty($instance['title']) ? __('Related Listing', 'geodirectory') : apply_filters('widget_title', __($instance['title'], 'geodirectory')); |
|
47 | + /** This filter is documented in geodirectory_widgets.php */ |
|
48 | + $title = empty($instance['title']) ? __('Related Listing', 'geodirectory') : apply_filters('widget_title', __($instance['title'], 'geodirectory')); |
|
49 | 49 | |
50 | - /** This filter is documented in geodirectory-functions/general_functions.php */ |
|
50 | + /** This filter is documented in geodirectory-functions/general_functions.php */ |
|
51 | 51 | $post_number = empty($instance['post_number']) ? '5' : apply_filters('widget_post_number', $instance['post_number']); |
52 | 52 | |
53 | - /** |
|
54 | - * Filter the relation type to get related listing. |
|
55 | - * |
|
56 | - * @since 1.0.0 |
|
57 | - * @param string $instance['relate_to'] Can be tags or category. |
|
58 | - */ |
|
53 | + /** |
|
54 | + * Filter the relation type to get related listing. |
|
55 | + * |
|
56 | + * @since 1.0.0 |
|
57 | + * @param string $instance['relate_to'] Can be tags or category. |
|
58 | + */ |
|
59 | 59 | $relate_to = empty($instance['relate_to']) ? 'category' : apply_filters('widget_relate_to', $instance['relate_to']); |
60 | 60 | |
61 | - /** This filter is documented in geodirectory-functions/general_functions.php */ |
|
61 | + /** This filter is documented in geodirectory-functions/general_functions.php */ |
|
62 | 62 | $layout = empty($instance['layout']) ? 'gridview_onehalf' : apply_filters('widget_layout', $instance['layout']); |
63 | 63 | |
64 | - /** This filter is documented in geodirectory-functions/general_functions.php */ |
|
64 | + /** This filter is documented in geodirectory-functions/general_functions.php */ |
|
65 | 65 | $add_location_filter = empty($instance['add_location_filter']) ? '0' : apply_filters('widget_add_location_filter', $instance['add_location_filter']); |
66 | 66 | |
67 | - /** This filter is documented in geodirectory-functions/general_functions.php */ |
|
67 | + /** This filter is documented in geodirectory-functions/general_functions.php */ |
|
68 | 68 | $listing_width = empty($instance['listing_width']) ? '' : apply_filters('widget_listing_width', $instance['listing_width']); |
69 | 69 | |
70 | - /** This filter is documented in geodirectory-functions/general_functions.php */ |
|
70 | + /** This filter is documented in geodirectory-functions/general_functions.php */ |
|
71 | 71 | $list_sort = empty($instance['list_sort']) ? 'latest' : apply_filters('widget_list_sort', $instance['list_sort']); |
72 | 72 | |
73 | - /** This filter is documented in geodirectory-functions/general_functions.php */ |
|
73 | + /** This filter is documented in geodirectory-functions/general_functions.php */ |
|
74 | 74 | $character_count = empty($instance['character_count']) ? 20 : apply_filters('widget_list_character_count', $instance['character_count']); |
75 | 75 | |
76 | - $arr = array( |
|
77 | - 'before_title' => $before_title, |
|
78 | - 'after_title' => $after_title, |
|
79 | - 'title' => $title, |
|
80 | - 'post_number' => $post_number, |
|
81 | - 'relate_to' => $relate_to, |
|
82 | - 'layout' => $layout, |
|
83 | - 'add_location_filter' => $add_location_filter, |
|
84 | - 'listing_width' => $listing_width, |
|
85 | - 'list_sort' => $list_sort, |
|
86 | - 'character_count' => $character_count, |
|
87 | - 'is_widget' => '1' |
|
88 | - ); |
|
89 | - |
|
90 | - if ($widget_display = geodir_related_posts_display($arr)) { |
|
91 | - |
|
92 | - echo $before_widget; |
|
93 | - echo $widget_display; |
|
94 | - echo $after_widget; |
|
95 | - } |
|
96 | - } |
|
76 | + $arr = array( |
|
77 | + 'before_title' => $before_title, |
|
78 | + 'after_title' => $after_title, |
|
79 | + 'title' => $title, |
|
80 | + 'post_number' => $post_number, |
|
81 | + 'relate_to' => $relate_to, |
|
82 | + 'layout' => $layout, |
|
83 | + 'add_location_filter' => $add_location_filter, |
|
84 | + 'listing_width' => $listing_width, |
|
85 | + 'list_sort' => $list_sort, |
|
86 | + 'character_count' => $character_count, |
|
87 | + 'is_widget' => '1' |
|
88 | + ); |
|
89 | + |
|
90 | + if ($widget_display = geodir_related_posts_display($arr)) { |
|
91 | + |
|
92 | + echo $before_widget; |
|
93 | + echo $widget_display; |
|
94 | + echo $after_widget; |
|
95 | + } |
|
96 | + } |
|
97 | 97 | |
98 | 98 | /** |
99 | 99 | * Sanitize related listing widget form values as they are saved. |
100 | 100 | * |
101 | 101 | * @since 1.0.0 |
102 | - * @since 1.5.1 Declare function public. |
|
102 | + * @since 1.5.1 Declare function public. |
|
103 | 103 | * |
104 | 104 | * @param array $new_instance Values just sent to be saved. |
105 | 105 | * @param array $old_instance Previously saved values from database. |
106 | 106 | * |
107 | 107 | * @return array Updated safe values to be saved. |
108 | 108 | */ |
109 | - public function update($new_instance, $old_instance) |
|
110 | - { |
|
111 | - //save the widget |
|
112 | - $instance = $old_instance; |
|
113 | - |
|
114 | - $instance['title'] = strip_tags($new_instance['title']); |
|
115 | - $instance['post_number'] = strip_tags($new_instance['post_number']); |
|
116 | - $instance['relate_to'] = strip_tags($new_instance['relate_to']); |
|
117 | - $instance['layout'] = strip_tags($new_instance['layout']); |
|
118 | - $instance['listing_width'] = strip_tags($new_instance['listing_width']); |
|
119 | - $instance['list_sort'] = strip_tags($new_instance['list_sort']); |
|
120 | - $instance['character_count'] = $new_instance['character_count']; |
|
121 | - if (isset($new_instance['add_location_filter']) && $new_instance['add_location_filter'] != '') |
|
122 | - $instance['add_location_filter'] = strip_tags($new_instance['add_location_filter']); |
|
123 | - else |
|
124 | - $instance['add_location_filter'] = '0'; |
|
125 | - |
|
126 | - return $instance; |
|
127 | - } |
|
109 | + public function update($new_instance, $old_instance) |
|
110 | + { |
|
111 | + //save the widget |
|
112 | + $instance = $old_instance; |
|
113 | + |
|
114 | + $instance['title'] = strip_tags($new_instance['title']); |
|
115 | + $instance['post_number'] = strip_tags($new_instance['post_number']); |
|
116 | + $instance['relate_to'] = strip_tags($new_instance['relate_to']); |
|
117 | + $instance['layout'] = strip_tags($new_instance['layout']); |
|
118 | + $instance['listing_width'] = strip_tags($new_instance['listing_width']); |
|
119 | + $instance['list_sort'] = strip_tags($new_instance['list_sort']); |
|
120 | + $instance['character_count'] = $new_instance['character_count']; |
|
121 | + if (isset($new_instance['add_location_filter']) && $new_instance['add_location_filter'] != '') |
|
122 | + $instance['add_location_filter'] = strip_tags($new_instance['add_location_filter']); |
|
123 | + else |
|
124 | + $instance['add_location_filter'] = '0'; |
|
125 | + |
|
126 | + return $instance; |
|
127 | + } |
|
128 | 128 | |
129 | 129 | /** |
130 | 130 | * Back-end related listing widget settings form. |
131 | 131 | * |
132 | 132 | * @since 1.0.0 |
133 | - * @since 1.5.1 Declare function public. |
|
133 | + * @since 1.5.1 Declare function public. |
|
134 | 134 | * |
135 | 135 | * @param array $instance Previously saved values from database. |
136 | 136 | */ |
137 | - public function form($instance) |
|
138 | - { |
|
139 | - //widgetform in backend |
|
140 | - $instance = wp_parse_args((array)$instance, |
|
141 | - array('title' => '', |
|
142 | - 'list_sort' => '', |
|
143 | - 'list_order' => '', |
|
144 | - 'post_number' => '5', |
|
145 | - 'relate_to' => '', |
|
146 | - 'layout' => 'gridview_onehalf', |
|
147 | - 'listing_width' => '', |
|
148 | - 'add_location_filter' => '1', |
|
149 | - 'character_count' => '20') |
|
150 | - ); |
|
137 | + public function form($instance) |
|
138 | + { |
|
139 | + //widgetform in backend |
|
140 | + $instance = wp_parse_args((array)$instance, |
|
141 | + array('title' => '', |
|
142 | + 'list_sort' => '', |
|
143 | + 'list_order' => '', |
|
144 | + 'post_number' => '5', |
|
145 | + 'relate_to' => '', |
|
146 | + 'layout' => 'gridview_onehalf', |
|
147 | + 'listing_width' => '', |
|
148 | + 'add_location_filter' => '1', |
|
149 | + 'character_count' => '20') |
|
150 | + ); |
|
151 | 151 | |
152 | - $title = strip_tags($instance['title']); |
|
152 | + $title = strip_tags($instance['title']); |
|
153 | 153 | |
154 | - $list_sort = strip_tags($instance['list_sort']); |
|
154 | + $list_sort = strip_tags($instance['list_sort']); |
|
155 | 155 | |
156 | - $list_order = strip_tags($instance['list_order']); |
|
156 | + $list_order = strip_tags($instance['list_order']); |
|
157 | 157 | |
158 | - $post_number = strip_tags($instance['post_number']); |
|
158 | + $post_number = strip_tags($instance['post_number']); |
|
159 | 159 | |
160 | - $relate_to = strip_tags($instance['relate_to']); |
|
160 | + $relate_to = strip_tags($instance['relate_to']); |
|
161 | 161 | |
162 | - $layout = strip_tags($instance['layout']); |
|
162 | + $layout = strip_tags($instance['layout']); |
|
163 | 163 | |
164 | - $listing_width = strip_tags($instance['listing_width']); |
|
164 | + $listing_width = strip_tags($instance['listing_width']); |
|
165 | 165 | |
166 | - $add_location_filter = strip_tags($instance['add_location_filter']); |
|
166 | + $add_location_filter = strip_tags($instance['add_location_filter']); |
|
167 | 167 | |
168 | - $character_count = $instance['character_count']; |
|
168 | + $character_count = $instance['character_count']; |
|
169 | 169 | |
170 | - ?> |
|
170 | + ?> |
|
171 | 171 | <p> |
172 | 172 | <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:', 'geodirectory');?> |
173 | 173 | |
@@ -184,24 +184,24 @@ discard block |
||
184 | 184 | name="<?php echo $this->get_field_name('list_sort'); ?>"> |
185 | 185 | |
186 | 186 | <option <?php if ($list_sort == 'latest') { |
187 | - echo 'selected="selected"'; |
|
188 | - } ?> value="latest"><?php _e('Latest', 'geodirectory'); ?></option> |
|
187 | + echo 'selected="selected"'; |
|
188 | + } ?> value="latest"><?php _e('Latest', 'geodirectory'); ?></option> |
|
189 | 189 | |
190 | 190 | <option <?php if ($list_sort == 'featured') { |
191 | - echo 'selected="selected"'; |
|
192 | - } ?> value="featured"><?php _e('Featured', 'geodirectory'); ?></option> |
|
191 | + echo 'selected="selected"'; |
|
192 | + } ?> value="featured"><?php _e('Featured', 'geodirectory'); ?></option> |
|
193 | 193 | |
194 | 194 | <option <?php if ($list_sort == 'high_review') { |
195 | - echo 'selected="selected"'; |
|
196 | - } ?> value="high_review"><?php _e('Review', 'geodirectory'); ?></option> |
|
195 | + echo 'selected="selected"'; |
|
196 | + } ?> value="high_review"><?php _e('Review', 'geodirectory'); ?></option> |
|
197 | 197 | |
198 | 198 | <option <?php if ($list_sort == 'high_rating') { |
199 | - echo 'selected="selected"'; |
|
200 | - } ?> value="high_rating"><?php _e('Rating', 'geodirectory'); ?></option> |
|
199 | + echo 'selected="selected"'; |
|
200 | + } ?> value="high_rating"><?php _e('Rating', 'geodirectory'); ?></option> |
|
201 | 201 | |
202 | 202 | <option <?php if ($list_sort == 'random') { |
203 | - echo 'selected="selected"'; |
|
204 | - } ?> value="random"><?php _e('Random', 'geodirectory'); ?></option> |
|
203 | + echo 'selected="selected"'; |
|
204 | + } ?> value="random"><?php _e('Random', 'geodirectory'); ?></option> |
|
205 | 205 | |
206 | 206 | </select> |
207 | 207 | </label> |
@@ -221,11 +221,11 @@ discard block |
||
221 | 221 | <select class="widefat" id="<?php echo $this->get_field_id('relate_to'); ?>" |
222 | 222 | name="<?php echo $this->get_field_name('relate_to'); ?>"> |
223 | 223 | <option <?php if ($relate_to == 'category') { |
224 | - echo 'selected="selected"'; |
|
225 | - } ?> value="category"><?php _e('Categories', 'geodirectory'); ?></option> |
|
224 | + echo 'selected="selected"'; |
|
225 | + } ?> value="category"><?php _e('Categories', 'geodirectory'); ?></option> |
|
226 | 226 | <option <?php if ($relate_to == 'tags') { |
227 | - echo 'selected="selected"'; |
|
228 | - } ?> value="tags"><?php _e('Tags', 'geodirectory'); ?></option> |
|
227 | + echo 'selected="selected"'; |
|
228 | + } ?> value="tags"><?php _e('Tags', 'geodirectory'); ?></option> |
|
229 | 229 | </select> |
230 | 230 | </label> |
231 | 231 | </p> |
@@ -236,24 +236,24 @@ discard block |
||
236 | 236 | <select class="widefat" id="<?php echo $this->get_field_id('layout'); ?>" |
237 | 237 | name="<?php echo $this->get_field_name('layout'); ?>"> |
238 | 238 | <option <?php if ($layout == 'gridview_onehalf') { |
239 | - echo 'selected="selected"'; |
|
240 | - } ?> |
|
239 | + echo 'selected="selected"'; |
|
240 | + } ?> |
|
241 | 241 | value="gridview_onehalf"><?php _e('Grid View (Two Columns)', 'geodirectory'); ?></option> |
242 | 242 | <option <?php if ($layout == 'gridview_onethird') { |
243 | - echo 'selected="selected"'; |
|
244 | - } ?> |
|
243 | + echo 'selected="selected"'; |
|
244 | + } ?> |
|
245 | 245 | value="gridview_onethird"><?php _e('Grid View (Three Columns)', 'geodirectory'); ?></option> |
246 | 246 | <option <?php if ($layout == 'gridview_onefourth') { |
247 | - echo 'selected="selected"'; |
|
248 | - } ?> |
|
247 | + echo 'selected="selected"'; |
|
248 | + } ?> |
|
249 | 249 | value="gridview_onefourth"><?php _e('Grid View (Four Columns)', 'geodirectory'); ?></option> |
250 | 250 | <option <?php if ($layout == 'gridview_onefifth') { |
251 | - echo 'selected="selected"'; |
|
252 | - } ?> |
|
251 | + echo 'selected="selected"'; |
|
252 | + } ?> |
|
253 | 253 | value="gridview_onefifth"><?php _e('Grid View (Five Columns)', 'geodirectory'); ?></option> |
254 | 254 | <option <?php if ($layout == 'list') { |
255 | - echo 'selected="selected"'; |
|
256 | - } ?> value="list"><?php _e('List view', 'geodirectory'); ?></option> |
|
255 | + echo 'selected="selected"'; |
|
256 | + } ?> value="list"><?php _e('List view', 'geodirectory'); ?></option> |
|
257 | 257 | |
258 | 258 | </select> |
259 | 259 | </label> |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | </p> |
286 | 286 | |
287 | 287 | <?php |
288 | - } |
|
288 | + } |
|
289 | 289 | } // class geodir_related_listing_postview |
290 | 290 | |
291 | 291 | register_widget('geodir_related_listing_postview'); |
292 | 292 | \ No newline at end of file |
@@ -14,37 +14,37 @@ discard block |
||
14 | 14 | */ |
15 | 15 | class geodir_recent_reviews_widget extends WP_Widget |
16 | 16 | { |
17 | - /** |
|
17 | + /** |
|
18 | 18 | * Register the recent reviews widget. |
19 | 19 | * |
20 | 20 | * @since 1.0.0 |
21 | - * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
21 | + * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
22 | 22 | */ |
23 | - public function __construct() { |
|
24 | - $widget_ops = array('classname' => 'geodir_recent_reviews', 'description' => __('GD > Recent Reviews', 'geodirectory')); |
|
25 | - parent::__construct( |
|
26 | - 'geodir_recent_reviews', // Base ID |
|
27 | - __('GD > Recent Reviews', 'geodirectory'), // Name |
|
28 | - $widget_ops// Args |
|
29 | - ); |
|
30 | - } |
|
23 | + public function __construct() { |
|
24 | + $widget_ops = array('classname' => 'geodir_recent_reviews', 'description' => __('GD > Recent Reviews', 'geodirectory')); |
|
25 | + parent::__construct( |
|
26 | + 'geodir_recent_reviews', // Base ID |
|
27 | + __('GD > Recent Reviews', 'geodirectory'), // Name |
|
28 | + $widget_ops// Args |
|
29 | + ); |
|
30 | + } |
|
31 | 31 | |
32 | 32 | /** |
33 | 33 | * Front-end display content for recent reviews widget. |
34 | 34 | * |
35 | 35 | * @since 1.0.0 |
36 | - * @since 1.5.1 Declare function public. |
|
36 | + * @since 1.5.1 Declare function public. |
|
37 | 37 | * |
38 | 38 | * @param array $args Widget arguments. |
39 | 39 | * @param array $instance Saved values from database. |
40 | 40 | */ |
41 | 41 | public function widget($args, $instance) |
42 | - { |
|
43 | - // prints the widget |
|
44 | - extract($args, EXTR_SKIP); |
|
42 | + { |
|
43 | + // prints the widget |
|
44 | + extract($args, EXTR_SKIP); |
|
45 | 45 | |
46 | - /** This filter is documented in geodirectory_widgets.php */ |
|
47 | - $title = empty($instance['title']) ? '' : apply_filters('widget_title', __($instance['title'], 'geodirectory')); |
|
46 | + /** This filter is documented in geodirectory_widgets.php */ |
|
47 | + $title = empty($instance['title']) ? '' : apply_filters('widget_title', __($instance['title'], 'geodirectory')); |
|
48 | 48 | |
49 | 49 | /** |
50 | 50 | * Filter the number of reviews to display. |
@@ -63,35 +63,35 @@ discard block |
||
63 | 63 | * @param int $g_size Height and width of the avatar image in pixels. Default 30. |
64 | 64 | */ |
65 | 65 | $g_size = apply_filters('geodir_recent_reviews_g_size', 30); |
66 | - /** |
|
67 | - * Filter the excerpt length |
|
68 | - * |
|
69 | - * @since 1.0.0 |
|
70 | - * |
|
71 | - * @param int $excerpt_length Excerpt length. Default 100. |
|
72 | - */ |
|
73 | - $excerpt_length = apply_filters('geodir_recent_reviews_excerpt_length', 100); |
|
74 | - $comments_li = geodir_get_recent_reviews($g_size, $count, $excerpt_length, false); |
|
66 | + /** |
|
67 | + * Filter the excerpt length |
|
68 | + * |
|
69 | + * @since 1.0.0 |
|
70 | + * |
|
71 | + * @param int $excerpt_length Excerpt length. Default 100. |
|
72 | + */ |
|
73 | + $excerpt_length = apply_filters('geodir_recent_reviews_excerpt_length', 100); |
|
74 | + $comments_li = geodir_get_recent_reviews($g_size, $count, $excerpt_length, false); |
|
75 | 75 | |
76 | - if ($comments_li) { |
|
77 | - echo $before_widget; |
|
78 | - ?> |
|
76 | + if ($comments_li) { |
|
77 | + echo $before_widget; |
|
78 | + ?> |
|
79 | 79 | <div class="widget geodir_recent_reviews_section"> |
80 | 80 | <?php if ($title) { |
81 | - echo $before_title . $title . $after_title; |
|
82 | - } ?> |
|
81 | + echo $before_title . $title . $after_title; |
|
82 | + } ?> |
|
83 | 83 | <ul class="geodir_recent_reviews"><?php echo $comments_li; ?></ul> |
84 | 84 | </div> |
85 | 85 | <?php |
86 | - echo $after_widget; |
|
87 | - } |
|
88 | - } |
|
86 | + echo $after_widget; |
|
87 | + } |
|
88 | + } |
|
89 | 89 | |
90 | 90 | /** |
91 | 91 | * Sanitize recent reviews widget form values as they are saved. |
92 | 92 | * |
93 | 93 | * @since 1.0.0 |
94 | - * @since 1.5.1 Declare function public. |
|
94 | + * @since 1.5.1 Declare function public. |
|
95 | 95 | * |
96 | 96 | * @param array $new_instance Values just sent to be saved. |
97 | 97 | * @param array $old_instance Previously saved values from database. |
@@ -99,29 +99,29 @@ discard block |
||
99 | 99 | * @return array Updated safe values to be saved. |
100 | 100 | */ |
101 | 101 | public function update($new_instance, $old_instance) |
102 | - { |
|
103 | - //save the widget |
|
104 | - $instance = $old_instance; |
|
105 | - $instance['title'] = strip_tags($new_instance['title']); |
|
106 | - $instance['count'] = strip_tags($new_instance['count']); |
|
107 | - return $instance; |
|
108 | - } |
|
102 | + { |
|
103 | + //save the widget |
|
104 | + $instance = $old_instance; |
|
105 | + $instance['title'] = strip_tags($new_instance['title']); |
|
106 | + $instance['count'] = strip_tags($new_instance['count']); |
|
107 | + return $instance; |
|
108 | + } |
|
109 | 109 | |
110 | 110 | /** |
111 | 111 | * Back-end recent reviews widget settings form. |
112 | 112 | * |
113 | 113 | * @since 1.0.0 |
114 | - * @since 1.5.1 Declare function public. |
|
114 | + * @since 1.5.1 Declare function public. |
|
115 | 115 | * |
116 | 116 | * @param array $instance Previously saved values from database. |
117 | 117 | */ |
118 | 118 | public function form($instance) |
119 | - { |
|
120 | - //widgetform in backend |
|
121 | - $instance = wp_parse_args((array)$instance, array('title' => '', 't1' => '', 't2' => '', 't3' => '', 'img1' => '', 'count' => '')); |
|
122 | - $title = strip_tags($instance['title']); |
|
123 | - $count = strip_tags($instance['count']); |
|
124 | - ?> |
|
119 | + { |
|
120 | + //widgetform in backend |
|
121 | + $instance = wp_parse_args((array)$instance, array('title' => '', 't1' => '', 't2' => '', 't3' => '', 'img1' => '', 'count' => '')); |
|
122 | + $title = strip_tags($instance['title']); |
|
123 | + $count = strip_tags($instance['count']); |
|
124 | + ?> |
|
125 | 125 | <p><label for="<?php echo $this->get_field_id('title'); ?>">Widget Title: <input class="widefat" |
126 | 126 | id="<?php echo $this->get_field_id('title'); ?>" |
127 | 127 | name="<?php echo $this->get_field_name('title'); ?>" |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | value="<?php echo esc_attr($count); ?>"/></label> |
136 | 136 | </p> |
137 | 137 | <?php |
138 | - } |
|
138 | + } |
|
139 | 139 | } // class geodir_recent_reviews_widget |
140 | 140 | |
141 | 141 | register_widget('geodir_recent_reviews_widget'); |
142 | 142 | \ No newline at end of file |
@@ -16,126 +16,126 @@ discard block |
||
16 | 16 | */ |
17 | 17 | class geodir_homepage_map extends WP_Widget |
18 | 18 | { |
19 | - /** |
|
19 | + /** |
|
20 | 20 | * Register the home page map widget. |
21 | 21 | * |
22 | 22 | * @since 1.0.0 |
23 | - * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
23 | + * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
24 | 24 | */ |
25 | - public function __construct() { |
|
26 | - $widget_ops = array('classname' => 'widget Google Map in Home page', 'description' => __('Google Map in Home page. It will show you google map V3 for Home page with category checkbox selection.', 'geodirectory')); |
|
27 | - parent::__construct( |
|
28 | - 'geodir_map_v3_home_map', // Base ID |
|
29 | - __('GD > GMap - Home page', 'geodirectory'), // Name |
|
30 | - $widget_ops// Args |
|
31 | - ); |
|
32 | - } |
|
25 | + public function __construct() { |
|
26 | + $widget_ops = array('classname' => 'widget Google Map in Home page', 'description' => __('Google Map in Home page. It will show you google map V3 for Home page with category checkbox selection.', 'geodirectory')); |
|
27 | + parent::__construct( |
|
28 | + 'geodir_map_v3_home_map', // Base ID |
|
29 | + __('GD > GMap - Home page', 'geodirectory'), // Name |
|
30 | + $widget_ops// Args |
|
31 | + ); |
|
32 | + } |
|
33 | 33 | |
34 | 34 | /** |
35 | 35 | * Front-end display content for home page map widget. |
36 | 36 | * |
37 | 37 | * @since 1.0.0 |
38 | - * @since 1.5.1 Declare function public. |
|
38 | + * @since 1.5.1 Declare function public. |
|
39 | 39 | * |
40 | 40 | * @param array $args Widget arguments. |
41 | 41 | * @param array $instance Saved values from database. |
42 | 42 | */ |
43 | - public function widget($args, $instance) |
|
44 | - { |
|
45 | - extract($args, EXTR_SKIP); |
|
46 | - /** This action is documented in geodirectory_shortcodes.php */ |
|
47 | - $width = empty($instance['width']) ? '100%' : apply_filters('widget_width', $instance['width']); |
|
48 | - /** This action is documented in geodirectory_shortcodes.php */ |
|
49 | - $height = empty($instance['heigh']) ? '425' : apply_filters('widget_heigh', $instance['heigh']); |
|
50 | - /** This action is documented in geodirectory_shortcodes.php */ |
|
51 | - $maptype = empty($instance['maptype']) ? 'ROADMAP' : apply_filters('widget_maptype', $instance['maptype']); |
|
52 | - /** This action is documented in geodirectory_shortcodes.php */ |
|
53 | - $zoom = empty($instance['zoom']) ? '13' : apply_filters('widget_zoom', $instance['zoom']); |
|
54 | - /** This action is documented in geodirectory_shortcodes.php */ |
|
55 | - $autozoom = empty($instance['autozoom']) ? '' : apply_filters('widget_autozoom', $instance['autozoom']); |
|
56 | - /** This action is documented in geodirectory_shortcodes.php */ |
|
57 | - $child_collapse = empty($instance['child_collapse']) ? '0' : apply_filters('widget_child_collapse', $instance['child_collapse']); |
|
58 | - /** This action is documented in geodirectory_shortcodes.php */ |
|
59 | - $scrollwheel = empty($instance['scrollwheel']) ? '0' : apply_filters('widget_scrollwheel', $instance['scrollwheel']); |
|
43 | + public function widget($args, $instance) |
|
44 | + { |
|
45 | + extract($args, EXTR_SKIP); |
|
46 | + /** This action is documented in geodirectory_shortcodes.php */ |
|
47 | + $width = empty($instance['width']) ? '100%' : apply_filters('widget_width', $instance['width']); |
|
48 | + /** This action is documented in geodirectory_shortcodes.php */ |
|
49 | + $height = empty($instance['heigh']) ? '425' : apply_filters('widget_heigh', $instance['heigh']); |
|
50 | + /** This action is documented in geodirectory_shortcodes.php */ |
|
51 | + $maptype = empty($instance['maptype']) ? 'ROADMAP' : apply_filters('widget_maptype', $instance['maptype']); |
|
52 | + /** This action is documented in geodirectory_shortcodes.php */ |
|
53 | + $zoom = empty($instance['zoom']) ? '13' : apply_filters('widget_zoom', $instance['zoom']); |
|
54 | + /** This action is documented in geodirectory_shortcodes.php */ |
|
55 | + $autozoom = empty($instance['autozoom']) ? '' : apply_filters('widget_autozoom', $instance['autozoom']); |
|
56 | + /** This action is documented in geodirectory_shortcodes.php */ |
|
57 | + $child_collapse = empty($instance['child_collapse']) ? '0' : apply_filters('widget_child_collapse', $instance['child_collapse']); |
|
58 | + /** This action is documented in geodirectory_shortcodes.php */ |
|
59 | + $scrollwheel = empty($instance['scrollwheel']) ? '0' : apply_filters('widget_scrollwheel', $instance['scrollwheel']); |
|
60 | 60 | |
61 | - $map_args = array(); |
|
62 | - $map_args['map_canvas_name'] = str_replace('-', '_', $args['widget_id']); //'home_map_canvas'.$str ; |
|
63 | - $map_args['width'] = $width; |
|
64 | - $map_args['height'] = $height; |
|
65 | - $map_args['maptype'] = $maptype; |
|
66 | - $map_args['scrollwheel'] = $scrollwheel; |
|
67 | - $map_args['zoom'] = $zoom; |
|
68 | - $map_args['autozoom'] = $autozoom; |
|
69 | - $map_args['child_collapse'] = $child_collapse; |
|
70 | - $map_args['enable_cat_filters'] = true; |
|
71 | - $map_args['enable_text_search'] = true; |
|
72 | - $map_args['enable_post_type_filters'] = true; |
|
73 | - /** This action is documented in geodirectory_shortcodes.php */ |
|
74 | - $map_args['enable_location_filters'] = apply_filters('geodir_home_map_enable_location_filters', false); |
|
75 | - $map_args['enable_jason_on_load'] = false; |
|
76 | - $map_args['enable_marker_cluster'] = false; |
|
77 | - $map_args['enable_map_resize_button'] = true; |
|
78 | - $map_args['map_class_name'] = 'geodir-map-home-page'; |
|
61 | + $map_args = array(); |
|
62 | + $map_args['map_canvas_name'] = str_replace('-', '_', $args['widget_id']); //'home_map_canvas'.$str ; |
|
63 | + $map_args['width'] = $width; |
|
64 | + $map_args['height'] = $height; |
|
65 | + $map_args['maptype'] = $maptype; |
|
66 | + $map_args['scrollwheel'] = $scrollwheel; |
|
67 | + $map_args['zoom'] = $zoom; |
|
68 | + $map_args['autozoom'] = $autozoom; |
|
69 | + $map_args['child_collapse'] = $child_collapse; |
|
70 | + $map_args['enable_cat_filters'] = true; |
|
71 | + $map_args['enable_text_search'] = true; |
|
72 | + $map_args['enable_post_type_filters'] = true; |
|
73 | + /** This action is documented in geodirectory_shortcodes.php */ |
|
74 | + $map_args['enable_location_filters'] = apply_filters('geodir_home_map_enable_location_filters', false); |
|
75 | + $map_args['enable_jason_on_load'] = false; |
|
76 | + $map_args['enable_marker_cluster'] = false; |
|
77 | + $map_args['enable_map_resize_button'] = true; |
|
78 | + $map_args['map_class_name'] = 'geodir-map-home-page'; |
|
79 | 79 | |
80 | - $is_geodir_home_map_widget = true; |
|
81 | - $map_args['is_geodir_home_map_widget'] = $is_geodir_home_map_widget; |
|
80 | + $is_geodir_home_map_widget = true; |
|
81 | + $map_args['is_geodir_home_map_widget'] = $is_geodir_home_map_widget; |
|
82 | 82 | |
83 | - geodir_draw_map($map_args); |
|
83 | + geodir_draw_map($map_args); |
|
84 | 84 | |
85 | - /* home map post type slider */ |
|
86 | - if ($is_geodir_home_map_widget) { |
|
87 | - add_action('wp_footer', array($this, 'geodir_home_map_add_script'), 100); |
|
88 | - } |
|
85 | + /* home map post type slider */ |
|
86 | + if ($is_geodir_home_map_widget) { |
|
87 | + add_action('wp_footer', array($this, 'geodir_home_map_add_script'), 100); |
|
88 | + } |
|
89 | 89 | |
90 | - } |
|
90 | + } |
|
91 | 91 | |
92 | 92 | /** |
93 | 93 | * Sanitize home page map widget form values as they are saved. |
94 | 94 | * |
95 | 95 | * @since 1.0.0 |
96 | - * @since 1.5.1 Declare function public. |
|
96 | + * @since 1.5.1 Declare function public. |
|
97 | 97 | * |
98 | 98 | * @param array $new_instance Values just sent to be saved. |
99 | 99 | * @param array $old_instance Previously saved values from database. |
100 | 100 | * |
101 | 101 | * @return array Updated safe values to be saved. |
102 | 102 | */ |
103 | - public function update($new_instance, $old_instance) |
|
104 | - { |
|
105 | - //save the widget |
|
106 | - $instance = $old_instance; |
|
107 | - $instance['width'] = strip_tags($new_instance['width']); |
|
108 | - $instance['heigh'] = ($new_instance['heigh']); |
|
109 | - $instance['maptype'] = ($new_instance['maptype']); |
|
110 | - $instance['zoom'] = ($new_instance['zoom']); |
|
111 | - $instance['autozoom'] = isset($new_instance['autozoom']) ? $new_instance['autozoom'] : ''; |
|
112 | - $instance['child_collapse'] = isset($new_instance['child_collapse']) ? ($new_instance['child_collapse']) : ''; |
|
113 | - $instance['scrollwheel'] = isset($new_instance['scrollwheel']) ? ($new_instance['scrollwheel']) : ''; |
|
103 | + public function update($new_instance, $old_instance) |
|
104 | + { |
|
105 | + //save the widget |
|
106 | + $instance = $old_instance; |
|
107 | + $instance['width'] = strip_tags($new_instance['width']); |
|
108 | + $instance['heigh'] = ($new_instance['heigh']); |
|
109 | + $instance['maptype'] = ($new_instance['maptype']); |
|
110 | + $instance['zoom'] = ($new_instance['zoom']); |
|
111 | + $instance['autozoom'] = isset($new_instance['autozoom']) ? $new_instance['autozoom'] : ''; |
|
112 | + $instance['child_collapse'] = isset($new_instance['child_collapse']) ? ($new_instance['child_collapse']) : ''; |
|
113 | + $instance['scrollwheel'] = isset($new_instance['scrollwheel']) ? ($new_instance['scrollwheel']) : ''; |
|
114 | 114 | |
115 | - return $instance; |
|
116 | - } |
|
115 | + return $instance; |
|
116 | + } |
|
117 | 117 | |
118 | 118 | /** |
119 | 119 | * Back-end home page map widget settings form. |
120 | 120 | * |
121 | 121 | * @since 1.0.0 |
122 | - * @since 1.5.1 Declare function public. |
|
122 | + * @since 1.5.1 Declare function public. |
|
123 | 123 | * |
124 | 124 | * @param array $instance Previously saved values from database. |
125 | 125 | */ |
126 | - public function form($instance) |
|
127 | - { |
|
128 | - //widgetform in backend |
|
126 | + public function form($instance) |
|
127 | + { |
|
128 | + //widgetform in backend |
|
129 | 129 | |
130 | - $instance = wp_parse_args((array)$instance, array('width' => '', 'heigh' => '', 'maptype' => '', 'zoom' => '', 'autozoom' => '', 'child_collapse' => '0', 'scrollwheel' => '0')); |
|
131 | - $width = strip_tags($instance['width']); |
|
132 | - $heigh = strip_tags($instance['heigh']); |
|
133 | - $maptype = strip_tags($instance['maptype']); |
|
134 | - $zoom = strip_tags($instance['zoom']); |
|
135 | - $autozoom = strip_tags($instance['autozoom']); |
|
136 | - $child_collapse = strip_tags($instance['child_collapse']); |
|
137 | - $scrollwheel = strip_tags($instance['scrollwheel']); |
|
138 | - ?> |
|
130 | + $instance = wp_parse_args((array)$instance, array('width' => '', 'heigh' => '', 'maptype' => '', 'zoom' => '', 'autozoom' => '', 'child_collapse' => '0', 'scrollwheel' => '0')); |
|
131 | + $width = strip_tags($instance['width']); |
|
132 | + $heigh = strip_tags($instance['heigh']); |
|
133 | + $maptype = strip_tags($instance['maptype']); |
|
134 | + $zoom = strip_tags($instance['zoom']); |
|
135 | + $autozoom = strip_tags($instance['autozoom']); |
|
136 | + $child_collapse = strip_tags($instance['child_collapse']); |
|
137 | + $scrollwheel = strip_tags($instance['scrollwheel']); |
|
138 | + ?> |
|
139 | 139 | |
140 | 140 | <p> |
141 | 141 | <label |
@@ -164,14 +164,14 @@ discard block |
||
164 | 164 | name="<?php echo $this->get_field_name('maptype'); ?>"> |
165 | 165 | |
166 | 166 | <option <?php if (isset($maptype) && $maptype == 'ROADMAP') { |
167 | - echo 'selected="selected"'; |
|
168 | - } ?> value="ROADMAP"><?php _e('Road Map', 'geodirectory'); ?></option> |
|
167 | + echo 'selected="selected"'; |
|
168 | + } ?> value="ROADMAP"><?php _e('Road Map', 'geodirectory'); ?></option> |
|
169 | 169 | <option <?php if (isset($maptype) && $maptype == 'SATELLITE') { |
170 | - echo 'selected="selected"'; |
|
171 | - } ?> value="SATELLITE"><?php _e('Satellite Map', 'geodirectory'); ?></option> |
|
170 | + echo 'selected="selected"'; |
|
171 | + } ?> value="SATELLITE"><?php _e('Satellite Map', 'geodirectory'); ?></option> |
|
172 | 172 | <option <?php if (isset($maptype) && $maptype == 'HYBRID') { |
173 | - echo 'selected="selected"'; |
|
174 | - } ?> value="HYBRID"><?php _e('Hybrid Map', 'geodirectory'); ?></option> |
|
173 | + echo 'selected="selected"'; |
|
174 | + } ?> value="HYBRID"><?php _e('Hybrid Map', 'geodirectory'); ?></option> |
|
175 | 175 | <option <?php selected($maptype, 'TERRAIN');?> |
176 | 176 | value="TERRAIN"><?php _e('Terrain Map', 'geodirectory'); ?></option> |
177 | 177 | </select> |
@@ -179,8 +179,8 @@ discard block |
||
179 | 179 | </p> |
180 | 180 | |
181 | 181 | <?php |
182 | - $map_zoom_level = geodir_map_zoom_level(); |
|
183 | - ?> |
|
182 | + $map_zoom_level = geodir_map_zoom_level(); |
|
183 | + ?> |
|
184 | 184 | |
185 | 185 | <p> |
186 | 186 | <label |
@@ -189,14 +189,14 @@ discard block |
||
189 | 189 | <select class="widefat" id="<?php echo $this->get_field_id('zoom'); ?>" |
190 | 190 | name="<?php echo $this->get_field_name('zoom'); ?>"> <?php |
191 | 191 | |
192 | - foreach ($map_zoom_level as $level) { |
|
193 | - $selected = ''; |
|
194 | - if ($level == $zoom) |
|
195 | - $selected = 'selected="selected"'; |
|
192 | + foreach ($map_zoom_level as $level) { |
|
193 | + $selected = ''; |
|
194 | + if ($level == $zoom) |
|
195 | + $selected = 'selected="selected"'; |
|
196 | 196 | |
197 | - echo '<option ' . $selected . ' value="' . $level . '">' . $level . '</option>'; |
|
197 | + echo '<option ' . $selected . ' value="' . $level . '">' . $level . '</option>'; |
|
198 | 198 | |
199 | - } ?> |
|
199 | + } ?> |
|
200 | 200 | |
201 | 201 | </select> |
202 | 202 | </label> |
@@ -209,8 +209,8 @@ discard block |
||
209 | 209 | : |
210 | 210 | <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('autozoom'); ?>" |
211 | 211 | name="<?php echo $this->get_field_name('autozoom'); ?>"<?php if ($autozoom) { |
212 | - echo 'checked="checked"'; |
|
213 | - } ?> /></label> |
|
212 | + echo 'checked="checked"'; |
|
213 | + } ?> /></label> |
|
214 | 214 | </p> |
215 | 215 | |
216 | 216 | <p> |
@@ -234,17 +234,17 @@ discard block |
||
234 | 234 | </p> |
235 | 235 | |
236 | 236 | <?php |
237 | - } |
|
237 | + } |
|
238 | 238 | |
239 | - /** |
|
239 | + /** |
|
240 | 240 | * Adds the javascript in the footer for home page map widget. |
241 | 241 | * |
242 | 242 | * @since 1.0.0 |
243 | - * @since 1.5.1 Declare function public. |
|
243 | + * @since 1.5.1 Declare function public. |
|
244 | 244 | */ |
245 | - public function geodir_home_map_add_script() |
|
246 | - { |
|
247 | - ?> |
|
245 | + public function geodir_home_map_add_script() |
|
246 | + { |
|
247 | + ?> |
|
248 | 248 | <script type="text/javascript"> |
249 | 249 | jQuery(document).ready(function () { |
250 | 250 | geoDirMapSlide(); |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | } |
318 | 318 | </script> |
319 | 319 | <?php |
320 | - } |
|
320 | + } |
|
321 | 321 | } // class geodir_homepage_map |
322 | 322 | |
323 | 323 | register_widget('geodir_homepage_map'); |
@@ -24,8 +24,8 @@ discard block |
||
24 | 24 | function geodir_activation() |
25 | 25 | { |
26 | 26 | |
27 | - geodir_install(); |
|
28 | - add_action('wp_loaded', 'geodir_flush_activation'); |
|
27 | + geodir_install(); |
|
28 | + add_action('wp_loaded', 'geodir_flush_activation'); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | /** |
@@ -36,9 +36,9 @@ discard block |
||
36 | 36 | */ |
37 | 37 | function geodir_flush_activation() |
38 | 38 | { |
39 | - // Remove rewrite rules and then recreate rewrite rules. |
|
40 | - // flush late so everything is loaded |
|
41 | - flush_rewrite_rules(); |
|
39 | + // Remove rewrite rules and then recreate rewrite rules. |
|
40 | + // flush late so everything is loaded |
|
41 | + flush_rewrite_rules(); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | /** |
@@ -50,44 +50,44 @@ discard block |
||
50 | 50 | */ |
51 | 51 | function geodir_install() |
52 | 52 | { |
53 | - global $geodir_settings; |
|
54 | - |
|
55 | - /** |
|
56 | - * Called before the GD installation scripts have run. |
|
57 | - * |
|
58 | - * @since 1.0.0 |
|
59 | - * @see 'geodir_installation_end' |
|
60 | - */ |
|
61 | - do_action('geodir_installation_start'); |
|
62 | - |
|
63 | - // Do install |
|
64 | - if (!get_option('geodir_default_data_installed')) { |
|
65 | - geodir_create_tables(); // in admin db install.php |
|
66 | - geodir_register_defaults(); // geodir_functions/ taxonomy_functions.php |
|
67 | - geodir_create_default_fields(); |
|
68 | - //geodir_default_taxonomies(); |
|
69 | - geodir_set_default_options(); |
|
70 | - geodir_create_pages(); |
|
71 | - geodir_set_default_widgets(); |
|
72 | - gd_install_theme_compat(); |
|
73 | - |
|
74 | - update_option('geodir_default_data_installed', 1); |
|
75 | - |
|
76 | - } |
|
77 | - |
|
78 | - if (!get_option('geodir_default_data_installed_1.2.8')) { |
|
79 | - //geodir_create_tables(); // in admin db install.php |
|
80 | - update_option('geodir_default_data_installed_1.2.8', 1); |
|
81 | - } |
|
82 | - |
|
83 | - geodir_installation_end(); |
|
84 | - /** |
|
85 | - * Called after the GD installation scripts have run. |
|
86 | - * |
|
87 | - * @since 1.0.0 |
|
88 | - * @see 'geodir_installation_start' |
|
89 | - */ |
|
90 | - do_action('geodir_installation_end'); |
|
53 | + global $geodir_settings; |
|
54 | + |
|
55 | + /** |
|
56 | + * Called before the GD installation scripts have run. |
|
57 | + * |
|
58 | + * @since 1.0.0 |
|
59 | + * @see 'geodir_installation_end' |
|
60 | + */ |
|
61 | + do_action('geodir_installation_start'); |
|
62 | + |
|
63 | + // Do install |
|
64 | + if (!get_option('geodir_default_data_installed')) { |
|
65 | + geodir_create_tables(); // in admin db install.php |
|
66 | + geodir_register_defaults(); // geodir_functions/ taxonomy_functions.php |
|
67 | + geodir_create_default_fields(); |
|
68 | + //geodir_default_taxonomies(); |
|
69 | + geodir_set_default_options(); |
|
70 | + geodir_create_pages(); |
|
71 | + geodir_set_default_widgets(); |
|
72 | + gd_install_theme_compat(); |
|
73 | + |
|
74 | + update_option('geodir_default_data_installed', 1); |
|
75 | + |
|
76 | + } |
|
77 | + |
|
78 | + if (!get_option('geodir_default_data_installed_1.2.8')) { |
|
79 | + //geodir_create_tables(); // in admin db install.php |
|
80 | + update_option('geodir_default_data_installed_1.2.8', 1); |
|
81 | + } |
|
82 | + |
|
83 | + geodir_installation_end(); |
|
84 | + /** |
|
85 | + * Called after the GD installation scripts have run. |
|
86 | + * |
|
87 | + * @since 1.0.0 |
|
88 | + * @see 'geodir_installation_start' |
|
89 | + */ |
|
90 | + do_action('geodir_installation_end'); |
|
91 | 91 | |
92 | 92 | |
93 | 93 | } |
@@ -104,16 +104,16 @@ discard block |
||
104 | 104 | function geodir_create_pages() |
105 | 105 | { |
106 | 106 | |
107 | - //geodir_create_page( esc_sql( _x('home-map', 'page_slug', 'geodirectory') ), 'geodir_home_map_page', __('Home Map', 'geodirectory'), '',0,'publish' ); |
|
108 | - geodir_create_page(esc_sql(_x('gd-home', 'page_slug', 'geodirectory')), 'geodir_home_page', __('GD Home page', 'geodirectory'), ''); |
|
109 | - geodir_create_page(esc_sql(_x('add-listing', 'page_slug', 'geodirectory')), 'geodir_add_listing_page', __('Add Listing', 'geodirectory'), ''); |
|
110 | - geodir_create_page(esc_sql(_x('listing-preview', 'page_slug', 'geodirectory')), 'geodir_preview_page', __('Listing Preview', 'geodirectory'), ''); |
|
111 | - geodir_create_page(esc_sql(_x('listing-success', 'page_slug', 'geodirectory')), 'geodir_success_page', __('Listing Success', 'geodirectory'), ''); |
|
112 | - geodir_create_page(esc_sql(_x('location', 'page_slug', 'geodirectory')), 'geodir_location_page', __('Location', 'geodirectory'), ''); |
|
107 | + //geodir_create_page( esc_sql( _x('home-map', 'page_slug', 'geodirectory') ), 'geodir_home_map_page', __('Home Map', 'geodirectory'), '',0,'publish' ); |
|
108 | + geodir_create_page(esc_sql(_x('gd-home', 'page_slug', 'geodirectory')), 'geodir_home_page', __('GD Home page', 'geodirectory'), ''); |
|
109 | + geodir_create_page(esc_sql(_x('add-listing', 'page_slug', 'geodirectory')), 'geodir_add_listing_page', __('Add Listing', 'geodirectory'), ''); |
|
110 | + geodir_create_page(esc_sql(_x('listing-preview', 'page_slug', 'geodirectory')), 'geodir_preview_page', __('Listing Preview', 'geodirectory'), ''); |
|
111 | + geodir_create_page(esc_sql(_x('listing-success', 'page_slug', 'geodirectory')), 'geodir_success_page', __('Listing Success', 'geodirectory'), ''); |
|
112 | + geodir_create_page(esc_sql(_x('location', 'page_slug', 'geodirectory')), 'geodir_location_page', __('Location', 'geodirectory'), ''); |
|
113 | 113 | |
114 | - //New since 1.5.3 |
|
115 | - geodir_create_page(esc_sql(_x('gd-info', 'page_slug', 'geodirectory')), 'geodir_info_page', __('Info', 'geodirectory'), ''); |
|
116 | - geodir_create_page(esc_sql(_x('gd-login', 'page_slug', 'geodirectory')), 'geodir_login_page', __('Login', 'geodirectory'), ''); |
|
114 | + //New since 1.5.3 |
|
115 | + geodir_create_page(esc_sql(_x('gd-info', 'page_slug', 'geodirectory')), 'geodir_info_page', __('Info', 'geodirectory'), ''); |
|
116 | + geodir_create_page(esc_sql(_x('gd-login', 'page_slug', 'geodirectory')), 'geodir_login_page', __('Login', 'geodirectory'), ''); |
|
117 | 117 | |
118 | 118 | |
119 | 119 | } |
@@ -129,11 +129,11 @@ discard block |
||
129 | 129 | */ |
130 | 130 | function geodir_installation_end() |
131 | 131 | { |
132 | - //update_option( "geodir_db_version", GEODIRECTORY_VERSION ); |
|
132 | + //update_option( "geodir_db_version", GEODIRECTORY_VERSION ); |
|
133 | 133 | |
134 | - update_option("geodir_installed", 1); |
|
135 | - update_option("geodir_installation_redirect", 1); |
|
136 | - update_option('skip_install_geodir_pages', 0); |
|
134 | + update_option("geodir_installed", 1); |
|
135 | + update_option("geodir_installation_redirect", 1); |
|
136 | + update_option('skip_install_geodir_pages', 0); |
|
137 | 137 | } |
138 | 138 | |
139 | 139 | /** |
@@ -147,45 +147,45 @@ discard block |
||
147 | 147 | */ |
148 | 148 | function geodir_set_default_options() |
149 | 149 | { |
150 | - global $geodir_settings; |
|
151 | - /** |
|
152 | - * Contains settings array for general tab. |
|
153 | - * |
|
154 | - * @since 1.0.0 |
|
155 | - * @package GeoDirectory |
|
156 | - */ |
|
157 | - include_once("option-pages/general_settings_array.php"); |
|
158 | - /** |
|
159 | - * Contains settings array for design tab. |
|
160 | - * |
|
161 | - * @since 1.0.0 |
|
162 | - * @package GeoDirectory |
|
163 | - */ |
|
164 | - include_once("option-pages/design_settings_array.php"); |
|
165 | - /** |
|
166 | - * Contains settings array for notifications tab. |
|
167 | - * |
|
168 | - * @since 1.0.0 |
|
169 | - * @package GeoDirectory |
|
170 | - */ |
|
171 | - include_once("option-pages/notifications_settings_array.php"); |
|
172 | - /** |
|
173 | - * Contains settings array for permalink tab. |
|
174 | - * |
|
175 | - * @since 1.0.0 |
|
176 | - * @package GeoDirectory |
|
177 | - */ |
|
178 | - include_once("option-pages/permalink_settings_array.php"); |
|
179 | - /** |
|
180 | - * Contains settings array for title / meta tab. |
|
181 | - * |
|
182 | - * @since 1.5.4 |
|
183 | - * @package GeoDirectory |
|
184 | - */ |
|
185 | - include_once("option-pages/title_meta_settings_array.php"); |
|
186 | - foreach ($geodir_settings as $value) { |
|
187 | - geodir_update_options($value, true); |
|
188 | - } |
|
150 | + global $geodir_settings; |
|
151 | + /** |
|
152 | + * Contains settings array for general tab. |
|
153 | + * |
|
154 | + * @since 1.0.0 |
|
155 | + * @package GeoDirectory |
|
156 | + */ |
|
157 | + include_once("option-pages/general_settings_array.php"); |
|
158 | + /** |
|
159 | + * Contains settings array for design tab. |
|
160 | + * |
|
161 | + * @since 1.0.0 |
|
162 | + * @package GeoDirectory |
|
163 | + */ |
|
164 | + include_once("option-pages/design_settings_array.php"); |
|
165 | + /** |
|
166 | + * Contains settings array for notifications tab. |
|
167 | + * |
|
168 | + * @since 1.0.0 |
|
169 | + * @package GeoDirectory |
|
170 | + */ |
|
171 | + include_once("option-pages/notifications_settings_array.php"); |
|
172 | + /** |
|
173 | + * Contains settings array for permalink tab. |
|
174 | + * |
|
175 | + * @since 1.0.0 |
|
176 | + * @package GeoDirectory |
|
177 | + */ |
|
178 | + include_once("option-pages/permalink_settings_array.php"); |
|
179 | + /** |
|
180 | + * Contains settings array for title / meta tab. |
|
181 | + * |
|
182 | + * @since 1.5.4 |
|
183 | + * @package GeoDirectory |
|
184 | + */ |
|
185 | + include_once("option-pages/title_meta_settings_array.php"); |
|
186 | + foreach ($geodir_settings as $value) { |
|
187 | + geodir_update_options($value, true); |
|
188 | + } |
|
189 | 189 | |
190 | 190 | } |
191 | 191 | |
@@ -199,103 +199,103 @@ discard block |
||
199 | 199 | function geodir_set_default_widgets() |
200 | 200 | { |
201 | 201 | |
202 | - $widget_option_list = array(); |
|
203 | - $widgetinfo = array(); |
|
204 | - $sidebarvalue_array = array(); |
|
205 | - $sidebars_widgets = array(); |
|
202 | + $widget_option_list = array(); |
|
203 | + $widgetinfo = array(); |
|
204 | + $sidebarvalue_array = array(); |
|
205 | + $sidebars_widgets = array(); |
|
206 | 206 | |
207 | - /*===========================*/ |
|
208 | - /* Widgets ON HOME PAGE */ |
|
209 | - /*===========================*/ |
|
207 | + /*===========================*/ |
|
208 | + /* Widgets ON HOME PAGE */ |
|
209 | + /*===========================*/ |
|
210 | 210 | |
211 | - $widget_option_list['geodir_home_top'] = |
|
212 | - array('popular_post_category' => array("title" => __('Popular Categories', 'geodirectory')), |
|
213 | - 'geodir_map_v3_home_map' => array("autozoom" => 1, "width" => '100%', "heigh" => '425'), |
|
214 | - 'geodir_advance_search' => array()); |
|
211 | + $widget_option_list['geodir_home_top'] = |
|
212 | + array('popular_post_category' => array("title" => __('Popular Categories', 'geodirectory')), |
|
213 | + 'geodir_map_v3_home_map' => array("autozoom" => 1, "width" => '100%', "heigh" => '425'), |
|
214 | + 'geodir_advance_search' => array()); |
|
215 | 215 | |
216 | - $widget_option_list['geodir_home_content'] = |
|
217 | - array('popular_post_view' => array("title" => __('Popular Places', 'geodirectory'), "layout" => 'list', "add_location_filter" => '1')); |
|
216 | + $widget_option_list['geodir_home_content'] = |
|
217 | + array('popular_post_view' => array("title" => __('Popular Places', 'geodirectory'), "layout" => 'list', "add_location_filter" => '1')); |
|
218 | 218 | |
219 | - $widget_option_list['geodir_home_right'] = |
|
220 | - array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')), |
|
221 | - 'popular_post_view' => array("title" => __('Latest Places', 'geodirectory'), "add_location_filter" => '1')); |
|
219 | + $widget_option_list['geodir_home_right'] = |
|
220 | + array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')), |
|
221 | + 'popular_post_view' => array("title" => __('Latest Places', 'geodirectory'), "add_location_filter" => '1')); |
|
222 | 222 | |
223 | - /*===========================*/ |
|
224 | - /* Widgets ON LISTING PAGE */ |
|
225 | - /*===========================*/ |
|
223 | + /*===========================*/ |
|
224 | + /* Widgets ON LISTING PAGE */ |
|
225 | + /*===========================*/ |
|
226 | 226 | |
227 | - $widget_option_list['geodir_listing_top'] = |
|
228 | - array('popular_post_category' => array("title" => __('Popular Categories', 'geodirectory')), |
|
229 | - 'geodir_advance_search' => array()); |
|
227 | + $widget_option_list['geodir_listing_top'] = |
|
228 | + array('popular_post_category' => array("title" => __('Popular Categories', 'geodirectory')), |
|
229 | + 'geodir_advance_search' => array()); |
|
230 | 230 | |
231 | - $widget_option_list['geodir_listing_right_sidebar'] = |
|
232 | - array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')), |
|
233 | - 'geodir_map_v3_listing_map' => array("autozoom" => 1, "sticky" => 1), |
|
234 | - 'popular_post_view' => array("title" => __('Latest Places', 'geodirectory'), "add_location_filter" => '1')); |
|
231 | + $widget_option_list['geodir_listing_right_sidebar'] = |
|
232 | + array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')), |
|
233 | + 'geodir_map_v3_listing_map' => array("autozoom" => 1, "sticky" => 1), |
|
234 | + 'popular_post_view' => array("title" => __('Latest Places', 'geodirectory'), "add_location_filter" => '1')); |
|
235 | 235 | |
236 | 236 | |
237 | - /*===========================*/ |
|
238 | - /* Widgets ON SEARCH PAGE */ |
|
239 | - /*===========================*/ |
|
237 | + /*===========================*/ |
|
238 | + /* Widgets ON SEARCH PAGE */ |
|
239 | + /*===========================*/ |
|
240 | 240 | |
241 | - $widget_option_list['geodir_search_top'] = |
|
242 | - array('popular_post_category' => array("title" => __('Popular Categories', 'geodirectory')), |
|
243 | - 'geodir_advance_search' => array()); |
|
241 | + $widget_option_list['geodir_search_top'] = |
|
242 | + array('popular_post_category' => array("title" => __('Popular Categories', 'geodirectory')), |
|
243 | + 'geodir_advance_search' => array()); |
|
244 | 244 | |
245 | - $widget_option_list['geodir_search_right_sidebar'] = |
|
246 | - array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')), |
|
247 | - 'geodir_map_v3_listing_map' => array("autozoom" => 1, "sticky" => 1), |
|
248 | - 'popular_post_view' => array("title" => __('Latest Places', 'geodirectory'), "add_location_filter" => '1')); |
|
245 | + $widget_option_list['geodir_search_right_sidebar'] = |
|
246 | + array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')), |
|
247 | + 'geodir_map_v3_listing_map' => array("autozoom" => 1, "sticky" => 1), |
|
248 | + 'popular_post_view' => array("title" => __('Latest Places', 'geodirectory'), "add_location_filter" => '1')); |
|
249 | 249 | |
250 | - /*===========================*/ |
|
251 | - /* Widgets ON DETAIL/SINGLE PAGE */ |
|
252 | - /*===========================*/ |
|
250 | + /*===========================*/ |
|
251 | + /* Widgets ON DETAIL/SINGLE PAGE */ |
|
252 | + /*===========================*/ |
|
253 | 253 | |
254 | - $widget_option_list['geodir_detail_sidebar'] = |
|
255 | - array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')), |
|
256 | - 'geodir_map_v3_listing_map' => array("autozoom" => 1, "sticky" => 1), |
|
257 | - 'popular_post_view' => array("title" => __('Latest Places', 'geodirectory'), "add_location_filter" => '1')); |
|
254 | + $widget_option_list['geodir_detail_sidebar'] = |
|
255 | + array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')), |
|
256 | + 'geodir_map_v3_listing_map' => array("autozoom" => 1, "sticky" => 1), |
|
257 | + 'popular_post_view' => array("title" => __('Latest Places', 'geodirectory'), "add_location_filter" => '1')); |
|
258 | 258 | |
259 | 259 | |
260 | - /*===========================*/ |
|
261 | - /* Widgets ON AUTHOR PAGE */ |
|
262 | - /*===========================*/ |
|
260 | + /*===========================*/ |
|
261 | + /* Widgets ON AUTHOR PAGE */ |
|
262 | + /*===========================*/ |
|
263 | 263 | |
264 | 264 | |
265 | - $widget_option_list['geodir_author_right_sidebar'] = |
|
266 | - array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory'))); |
|
265 | + $widget_option_list['geodir_author_right_sidebar'] = |
|
266 | + array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory'))); |
|
267 | 267 | |
268 | 268 | |
269 | - $sidebars_widgets = get_option('sidebars_widgets'); |
|
269 | + $sidebars_widgets = get_option('sidebars_widgets'); |
|
270 | 270 | |
271 | - foreach ($widget_option_list as $key => $widget_options) { |
|
271 | + foreach ($widget_option_list as $key => $widget_options) { |
|
272 | 272 | |
273 | - foreach ($widget_options as $key2 => $widget_options_obj) { |
|
274 | - $widgetid = 'widget_' . $key2; |
|
273 | + foreach ($widget_options as $key2 => $widget_options_obj) { |
|
274 | + $widgetid = 'widget_' . $key2; |
|
275 | 275 | |
276 | - $widgetinfo[$widgetid][] = $widget_options_obj; |
|
276 | + $widgetinfo[$widgetid][] = $widget_options_obj; |
|
277 | 277 | |
278 | - $sidebarvalue_array[$key][] = $key2 . "-" . (count($widgetinfo[$widgetid])); |
|
278 | + $sidebarvalue_array[$key][] = $key2 . "-" . (count($widgetinfo[$widgetid])); |
|
279 | 279 | |
280 | - $widget_update[$widgetid][count($widgetinfo[$widgetid])] = $widget_options_obj; |
|
280 | + $widget_update[$widgetid][count($widgetinfo[$widgetid])] = $widget_options_obj; |
|
281 | 281 | |
282 | - } |
|
282 | + } |
|
283 | 283 | |
284 | - if (!empty($sidebarvalue_array[$key])) { |
|
284 | + if (!empty($sidebarvalue_array[$key])) { |
|
285 | 285 | |
286 | - $sidebars_widgets = get_option('sidebars_widgets'); |
|
287 | - $sidebars_widgets[$key] = $sidebarvalue_array[$key]; |
|
288 | - update_option('sidebars_widgets', $sidebars_widgets); |
|
286 | + $sidebars_widgets = get_option('sidebars_widgets'); |
|
287 | + $sidebars_widgets[$key] = $sidebarvalue_array[$key]; |
|
288 | + update_option('sidebars_widgets', $sidebars_widgets); |
|
289 | 289 | |
290 | - foreach ($widget_update as $key => $value) { |
|
290 | + foreach ($widget_update as $key => $value) { |
|
291 | 291 | |
292 | - update_option($key, $value); |
|
292 | + update_option($key, $value); |
|
293 | 293 | |
294 | - } |
|
294 | + } |
|
295 | 295 | |
296 | - } |
|
296 | + } |
|
297 | 297 | |
298 | - } |
|
298 | + } |
|
299 | 299 | |
300 | 300 | |
301 | 301 | } |
@@ -16,28 +16,28 @@ discard block |
||
16 | 16 | */ |
17 | 17 | function jupiter_action_calls() |
18 | 18 | { |
19 | - // REMOVE BREADCRUMB |
|
20 | - remove_action('geodir_detail_before_main_content', 'geodir_breadcrumb', 20); |
|
21 | - remove_action('geodir_listings_before_main_content', 'geodir_breadcrumb', 20); |
|
22 | - remove_action('geodir_author_before_main_content', 'geodir_breadcrumb', 20); |
|
23 | - remove_action('geodir_search_before_main_content', 'geodir_breadcrumb', 20); |
|
24 | - remove_action('geodir_home_before_main_content', 'geodir_breadcrumb', 20); |
|
25 | - remove_action('geodir_location_before_main_content', 'geodir_breadcrumb', 20); |
|
26 | - |
|
27 | - // REMOVE PAGE TITLES |
|
28 | - remove_action('geodir_listings_page_title', 'geodir_action_listings_title', 10); |
|
29 | - remove_action('geodir_add_listing_page_title', 'geodir_action_add_listing_page_title', 10); |
|
30 | - remove_action('geodir_details_main_content', 'geodir_action_page_title', 20); |
|
31 | - remove_action('geodir_search_page_title', 'geodir_action_search_page_title', 10); |
|
32 | - remove_action('geodir_author_page_title', 'geodir_action_author_page_title', 10); |
|
33 | - |
|
34 | - |
|
35 | - // CAHNGE PAGE TITLES |
|
36 | - remove_action('page_title', 'mk_page_title'); |
|
37 | - add_action('page_title', 'gd_mk_page_title'); |
|
38 | - // CHANGE BREADCRUMS FOR GD PAGES |
|
39 | - remove_action('theme_breadcrumbs', 'mk_theme_breadcrumbs'); |
|
40 | - add_action('theme_breadcrumbs', 'gd_mk_theme_breadcrumbs'); |
|
19 | + // REMOVE BREADCRUMB |
|
20 | + remove_action('geodir_detail_before_main_content', 'geodir_breadcrumb', 20); |
|
21 | + remove_action('geodir_listings_before_main_content', 'geodir_breadcrumb', 20); |
|
22 | + remove_action('geodir_author_before_main_content', 'geodir_breadcrumb', 20); |
|
23 | + remove_action('geodir_search_before_main_content', 'geodir_breadcrumb', 20); |
|
24 | + remove_action('geodir_home_before_main_content', 'geodir_breadcrumb', 20); |
|
25 | + remove_action('geodir_location_before_main_content', 'geodir_breadcrumb', 20); |
|
26 | + |
|
27 | + // REMOVE PAGE TITLES |
|
28 | + remove_action('geodir_listings_page_title', 'geodir_action_listings_title', 10); |
|
29 | + remove_action('geodir_add_listing_page_title', 'geodir_action_add_listing_page_title', 10); |
|
30 | + remove_action('geodir_details_main_content', 'geodir_action_page_title', 20); |
|
31 | + remove_action('geodir_search_page_title', 'geodir_action_search_page_title', 10); |
|
32 | + remove_action('geodir_author_page_title', 'geodir_action_author_page_title', 10); |
|
33 | + |
|
34 | + |
|
35 | + // CAHNGE PAGE TITLES |
|
36 | + remove_action('page_title', 'mk_page_title'); |
|
37 | + add_action('page_title', 'gd_mk_page_title'); |
|
38 | + // CHANGE BREADCRUMS FOR GD PAGES |
|
39 | + remove_action('theme_breadcrumbs', 'mk_theme_breadcrumbs'); |
|
40 | + add_action('theme_breadcrumbs', 'gd_mk_theme_breadcrumbs'); |
|
41 | 41 | |
42 | 42 | |
43 | 43 | } |
@@ -52,19 +52,19 @@ discard block |
||
52 | 52 | function gd_mk_theme_breadcrumbs() |
53 | 53 | { |
54 | 54 | |
55 | - if (is_page_geodir_home() || geodir_is_page('location')) { |
|
56 | - jupiter_geodir_breadcrumb(); |
|
57 | - } elseif (geodir_is_page('listing')) { |
|
58 | - jupiter_geodir_breadcrumb(); |
|
59 | - } elseif (geodir_is_page('detail')) { |
|
60 | - jupiter_geodir_breadcrumb(); |
|
61 | - } elseif (geodir_is_page('search')) { |
|
62 | - jupiter_geodir_breadcrumb(); |
|
63 | - } elseif (geodir_is_page('author')) { |
|
64 | - jupiter_geodir_breadcrumb(); |
|
65 | - } else { |
|
66 | - mk_theme_breadcrumbs(); |
|
67 | - } |
|
55 | + if (is_page_geodir_home() || geodir_is_page('location')) { |
|
56 | + jupiter_geodir_breadcrumb(); |
|
57 | + } elseif (geodir_is_page('listing')) { |
|
58 | + jupiter_geodir_breadcrumb(); |
|
59 | + } elseif (geodir_is_page('detail')) { |
|
60 | + jupiter_geodir_breadcrumb(); |
|
61 | + } elseif (geodir_is_page('search')) { |
|
62 | + jupiter_geodir_breadcrumb(); |
|
63 | + } elseif (geodir_is_page('author')) { |
|
64 | + jupiter_geodir_breadcrumb(); |
|
65 | + } else { |
|
66 | + mk_theme_breadcrumbs(); |
|
67 | + } |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | /** |
@@ -76,35 +76,35 @@ discard block |
||
76 | 76 | */ |
77 | 77 | function gd_mk_page_title() |
78 | 78 | { |
79 | - global $wp; |
|
80 | - |
|
81 | - |
|
82 | - if (is_page_geodir_home() || geodir_is_page('location')) { |
|
83 | - jupiter_geodir_page_title(); |
|
84 | - } elseif (geodir_is_page('listing')) { |
|
85 | - ob_start(); // Start buffering; |
|
86 | - geodir_action_listings_title(); |
|
87 | - $gd_title = ob_get_clean(); |
|
88 | - $title_p = explode('">', $gd_title); |
|
89 | - $title = str_replace('</h1></header>', "", $title_p[2]); |
|
90 | - jupiter_geodir_page_title($title); |
|
91 | - } elseif (geodir_is_page('search')) { |
|
92 | - ob_start(); // Start buffering; |
|
93 | - geodir_action_listings_title(); |
|
94 | - $gd_title = ob_get_clean(); |
|
95 | - $title_p = explode('">', $gd_title); |
|
96 | - $title = str_replace('</h1></header>', "", $title_p[2]); |
|
97 | - jupiter_geodir_page_title($title); |
|
98 | - } elseif (geodir_is_page('author')) { |
|
99 | - ob_start(); // Start buffering; |
|
100 | - geodir_action_author_page_title(); |
|
101 | - $gd_title = ob_get_clean(); |
|
102 | - $gd_title = str_replace('<h1>', "", $gd_title); |
|
103 | - $gd_title = str_replace('</h1>', "", $gd_title); |
|
104 | - jupiter_geodir_page_title($gd_title); |
|
105 | - } else { |
|
106 | - mk_page_title(); |
|
107 | - } |
|
79 | + global $wp; |
|
80 | + |
|
81 | + |
|
82 | + if (is_page_geodir_home() || geodir_is_page('location')) { |
|
83 | + jupiter_geodir_page_title(); |
|
84 | + } elseif (geodir_is_page('listing')) { |
|
85 | + ob_start(); // Start buffering; |
|
86 | + geodir_action_listings_title(); |
|
87 | + $gd_title = ob_get_clean(); |
|
88 | + $title_p = explode('">', $gd_title); |
|
89 | + $title = str_replace('</h1></header>', "", $title_p[2]); |
|
90 | + jupiter_geodir_page_title($title); |
|
91 | + } elseif (geodir_is_page('search')) { |
|
92 | + ob_start(); // Start buffering; |
|
93 | + geodir_action_listings_title(); |
|
94 | + $gd_title = ob_get_clean(); |
|
95 | + $title_p = explode('">', $gd_title); |
|
96 | + $title = str_replace('</h1></header>', "", $title_p[2]); |
|
97 | + jupiter_geodir_page_title($title); |
|
98 | + } elseif (geodir_is_page('author')) { |
|
99 | + ob_start(); // Start buffering; |
|
100 | + geodir_action_author_page_title(); |
|
101 | + $gd_title = ob_get_clean(); |
|
102 | + $gd_title = str_replace('<h1>', "", $gd_title); |
|
103 | + $gd_title = str_replace('</h1>', "", $gd_title); |
|
104 | + jupiter_geodir_page_title($gd_title); |
|
105 | + } else { |
|
106 | + mk_page_title(); |
|
107 | + } |
|
108 | 108 | |
109 | 109 | |
110 | 110 | } |
@@ -119,48 +119,48 @@ discard block |
||
119 | 119 | */ |
120 | 120 | function jupiter_geodir_breadcrumb() |
121 | 121 | { |
122 | - $item = ''; |
|
123 | - ob_start(); // Start buffering; |
|
124 | - geodir_breadcrumb(); |
|
125 | - $gd_crums = ob_get_clean(); |
|
126 | - if ($gd_crums) { |
|
127 | - $gd_crums = str_replace('<div class="geodir-breadcrumb clearfix"><ul id="breadcrumbs"><li>', "", $gd_crums); |
|
128 | - $gd_crums = str_replace('</li></ul></div>', "", $gd_crums); |
|
129 | - $gd_crums = str_replace(' > ', " > ", $gd_crums); |
|
130 | - $gd_crums = str_replace('</li><li>', "", $gd_crums); |
|
131 | - $gd_crums = explode(" > ", $gd_crums); |
|
132 | - $trail_end = array_pop($gd_crums); |
|
133 | - $gd_crums['trail_end'] = $trail_end; |
|
134 | - //print_r($gd_crums);exit; |
|
135 | - //print_r($trail); |
|
136 | - $item = $gd_crums; |
|
137 | - |
|
138 | - } |
|
139 | - if (!$item) { |
|
140 | - return; |
|
141 | - } |
|
142 | - global $mk_options, $post; |
|
143 | - $post_id = global_get_post_id(); |
|
144 | - |
|
145 | - if ($post_id) { |
|
146 | - $local_skining = get_post_meta($post_id, '_enable_local_backgrounds', true); |
|
147 | - $breadcrumb_skin = get_post_meta($post_id, '_breadcrumb_skin', true); |
|
148 | - if ($local_skining == 'true' && !empty($breadcrumb_skin)) { |
|
149 | - $breadcrumb_skin_class = $breadcrumb_skin; |
|
150 | - } else { |
|
151 | - $breadcrumb_skin_class = $mk_options['breadcrumb_skin']; |
|
152 | - } |
|
153 | - } else { |
|
154 | - $breadcrumb_skin_class = $mk_options['breadcrumb_skin']; |
|
155 | - } |
|
156 | - |
|
157 | - |
|
158 | - $delimiter = ' / '; |
|
159 | - |
|
160 | - echo '<div id="mk-breadcrumbs"><div class="mk-breadcrumbs-inner ' . $breadcrumb_skin_class . '-skin">'; |
|
161 | - |
|
162 | - echo implode($delimiter, $item); |
|
163 | - echo "</div></div>"; |
|
122 | + $item = ''; |
|
123 | + ob_start(); // Start buffering; |
|
124 | + geodir_breadcrumb(); |
|
125 | + $gd_crums = ob_get_clean(); |
|
126 | + if ($gd_crums) { |
|
127 | + $gd_crums = str_replace('<div class="geodir-breadcrumb clearfix"><ul id="breadcrumbs"><li>', "", $gd_crums); |
|
128 | + $gd_crums = str_replace('</li></ul></div>', "", $gd_crums); |
|
129 | + $gd_crums = str_replace(' > ', " > ", $gd_crums); |
|
130 | + $gd_crums = str_replace('</li><li>', "", $gd_crums); |
|
131 | + $gd_crums = explode(" > ", $gd_crums); |
|
132 | + $trail_end = array_pop($gd_crums); |
|
133 | + $gd_crums['trail_end'] = $trail_end; |
|
134 | + //print_r($gd_crums);exit; |
|
135 | + //print_r($trail); |
|
136 | + $item = $gd_crums; |
|
137 | + |
|
138 | + } |
|
139 | + if (!$item) { |
|
140 | + return; |
|
141 | + } |
|
142 | + global $mk_options, $post; |
|
143 | + $post_id = global_get_post_id(); |
|
144 | + |
|
145 | + if ($post_id) { |
|
146 | + $local_skining = get_post_meta($post_id, '_enable_local_backgrounds', true); |
|
147 | + $breadcrumb_skin = get_post_meta($post_id, '_breadcrumb_skin', true); |
|
148 | + if ($local_skining == 'true' && !empty($breadcrumb_skin)) { |
|
149 | + $breadcrumb_skin_class = $breadcrumb_skin; |
|
150 | + } else { |
|
151 | + $breadcrumb_skin_class = $mk_options['breadcrumb_skin']; |
|
152 | + } |
|
153 | + } else { |
|
154 | + $breadcrumb_skin_class = $mk_options['breadcrumb_skin']; |
|
155 | + } |
|
156 | + |
|
157 | + |
|
158 | + $delimiter = ' / '; |
|
159 | + |
|
160 | + echo '<div id="mk-breadcrumbs"><div class="mk-breadcrumbs-inner ' . $breadcrumb_skin_class . '-skin">'; |
|
161 | + |
|
162 | + echo implode($delimiter, $item); |
|
163 | + echo "</div></div>"; |
|
164 | 164 | |
165 | 165 | } |
166 | 166 | |
@@ -174,41 +174,41 @@ discard block |
||
174 | 174 | */ |
175 | 175 | function jupiter_geodir_page_title($title = '', $subtitle = '') |
176 | 176 | { |
177 | - global $mk_options; |
|
178 | - |
|
179 | - $post_id = global_get_post_id(); |
|
180 | - $shadow_css = ''; |
|
181 | - if ($mk_options['page_title_shadow'] == 'true') { |
|
182 | - $shadow_css = 'mk-drop-shadow'; |
|
183 | - } |
|
184 | - |
|
185 | - $align = !empty($align) ? $align : 'left'; |
|
186 | - |
|
187 | - //$title = 'xxxx'; |
|
188 | - echo '<section id="mk-page-introduce" class="intro-' . $align . '">'; |
|
189 | - echo '<div class="mk-grid">'; |
|
190 | - if (!empty($title)) { |
|
191 | - echo '<h1 class="page-introduce-title ' . $shadow_css . '">' . $title . '</h1>'; |
|
192 | - |
|
193 | - } |
|
194 | - |
|
195 | - if (!empty($subtitle)) { |
|
196 | - echo '<div class="page-introduce-subtitle">'; |
|
197 | - echo $subtitle; |
|
198 | - echo '</div>'; |
|
199 | - } |
|
200 | - if ($mk_options['disable_breadcrumb'] == 'true') { |
|
201 | - if (get_post_meta($post_id, '_disable_breadcrumb', true) != 'false') { |
|
202 | - /** |
|
203 | - * Calls the theme breadcrumbs for Jupiter theme. |
|
204 | - * |
|
205 | - * @since 1.4.0 |
|
206 | - */ |
|
207 | - do_action('theme_breadcrumbs', $post_id); |
|
208 | - } |
|
209 | - } |
|
210 | - |
|
211 | - echo '<div class="clearboth"></div></div></section>'; |
|
177 | + global $mk_options; |
|
178 | + |
|
179 | + $post_id = global_get_post_id(); |
|
180 | + $shadow_css = ''; |
|
181 | + if ($mk_options['page_title_shadow'] == 'true') { |
|
182 | + $shadow_css = 'mk-drop-shadow'; |
|
183 | + } |
|
184 | + |
|
185 | + $align = !empty($align) ? $align : 'left'; |
|
186 | + |
|
187 | + //$title = 'xxxx'; |
|
188 | + echo '<section id="mk-page-introduce" class="intro-' . $align . '">'; |
|
189 | + echo '<div class="mk-grid">'; |
|
190 | + if (!empty($title)) { |
|
191 | + echo '<h1 class="page-introduce-title ' . $shadow_css . '">' . $title . '</h1>'; |
|
192 | + |
|
193 | + } |
|
194 | + |
|
195 | + if (!empty($subtitle)) { |
|
196 | + echo '<div class="page-introduce-subtitle">'; |
|
197 | + echo $subtitle; |
|
198 | + echo '</div>'; |
|
199 | + } |
|
200 | + if ($mk_options['disable_breadcrumb'] == 'true') { |
|
201 | + if (get_post_meta($post_id, '_disable_breadcrumb', true) != 'false') { |
|
202 | + /** |
|
203 | + * Calls the theme breadcrumbs for Jupiter theme. |
|
204 | + * |
|
205 | + * @since 1.4.0 |
|
206 | + */ |
|
207 | + do_action('theme_breadcrumbs', $post_id); |
|
208 | + } |
|
209 | + } |
|
210 | + |
|
211 | + echo '<div class="clearboth"></div></div></section>'; |
|
212 | 212 | |
213 | 213 | |
214 | 214 | } |