@@ -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 |
@@ -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,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 |
@@ -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 | } |
@@ -17,84 +17,84 @@ discard block |
||
17 | 17 | function enfold_action_calls() |
18 | 18 | { |
19 | 19 | |
20 | - /* ACTIONS |
|
20 | + /* ACTIONS |
|
21 | 21 | ****************************************************************************************/ |
22 | 22 | |
23 | - // Add body class for styling purposes |
|
24 | - add_filter('body_class', 'wpgeo_enfold_body_class'); |
|
23 | + // Add body class for styling purposes |
|
24 | + add_filter('body_class', 'wpgeo_enfold_body_class'); |
|
25 | 25 | |
26 | - // Pages using the page-builder shouldn't redirect on successful payment |
|
27 | - if (isset($_REQUEST['pay_action'])) { |
|
28 | - add_action('init', 'geodir_allow_payment_urls_enfold', 15); |
|
29 | - } |
|
26 | + // Pages using the page-builder shouldn't redirect on successful payment |
|
27 | + if (isset($_REQUEST['pay_action'])) { |
|
28 | + add_action('init', 'geodir_allow_payment_urls_enfold', 15); |
|
29 | + } |
|
30 | 30 | |
31 | - // LOCATION MANAGER MENU ACTIONS - set the location menu item before the Enfold search |
|
32 | - if (function_exists('geodir_location_menu_items')) { |
|
33 | - remove_filter('wp_nav_menu_items', 'geodir_location_menu_items', 110); |
|
34 | - add_filter('wp_nav_menu_items', 'geodir_location_menu_items', 8, 2); |
|
35 | - } |
|
36 | - // GEODIR MENU ACTIONS - set the GeoDir menu items before the Enfold search |
|
37 | - remove_filter('wp_nav_menu_items', 'geodir_menu_items', 100); |
|
38 | - add_filter('wp_nav_menu_items', 'geodir_menu_items', 7, 2); |
|
31 | + // LOCATION MANAGER MENU ACTIONS - set the location menu item before the Enfold search |
|
32 | + if (function_exists('geodir_location_menu_items')) { |
|
33 | + remove_filter('wp_nav_menu_items', 'geodir_location_menu_items', 110); |
|
34 | + add_filter('wp_nav_menu_items', 'geodir_location_menu_items', 8, 2); |
|
35 | + } |
|
36 | + // GEODIR MENU ACTIONS - set the GeoDir menu items before the Enfold search |
|
37 | + remove_filter('wp_nav_menu_items', 'geodir_menu_items', 100); |
|
38 | + add_filter('wp_nav_menu_items', 'geodir_menu_items', 7, 2); |
|
39 | 39 | |
40 | - // HOME TOP SIDEBAR |
|
41 | - remove_action('geodir_home_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10); |
|
42 | - remove_action('geodir_location_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10); |
|
43 | - //add_action( 'ava_after_main_container', 'enfold_home_sidebar' ); |
|
40 | + // HOME TOP SIDEBAR |
|
41 | + remove_action('geodir_home_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10); |
|
42 | + remove_action('geodir_location_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10); |
|
43 | + //add_action( 'ava_after_main_container', 'enfold_home_sidebar' ); |
|
44 | 44 | |
45 | 45 | |
46 | - // WRAPPER OPEN ACTIONS |
|
47 | - remove_action('geodir_wrapper_open', 'geodir_action_wrapper_open', 10); |
|
48 | - add_action('geodir_wrapper_open', 'enfold_action_wrapper_open', 9); |
|
49 | - add_action('geodir_wrapper_open', 'enfold_detail_title', 8, 2); // ADD GEODIR TITLE |
|
46 | + // WRAPPER OPEN ACTIONS |
|
47 | + remove_action('geodir_wrapper_open', 'geodir_action_wrapper_open', 10); |
|
48 | + add_action('geodir_wrapper_open', 'enfold_action_wrapper_open', 9); |
|
49 | + add_action('geodir_wrapper_open', 'enfold_detail_title', 8, 2); // ADD GEODIR TITLE |
|
50 | 50 | |
51 | 51 | |
52 | - // WRAPPER CONTENT OPEN ACTIONS |
|
53 | - remove_action('geodir_wrapper_content_open', 'geodir_action_wrapper_content_open', 10); |
|
54 | - add_action('geodir_wrapper_content_open', 'enfold_action_wrapper_content_open', 9, 3); |
|
52 | + // WRAPPER CONTENT OPEN ACTIONS |
|
53 | + remove_action('geodir_wrapper_content_open', 'geodir_action_wrapper_content_open', 10); |
|
54 | + add_action('geodir_wrapper_content_open', 'enfold_action_wrapper_content_open', 9, 3); |
|
55 | 55 | |
56 | 56 | |
57 | - // SIDEBAR RIGHT OPEN ACTIONS |
|
58 | - remove_action('geodir_sidebar_right_open', 'geodir_action_sidebar_right_open', 10); |
|
59 | - add_action('geodir_sidebar_right_open', 'enfold_action_sidebar_right_open', 10, 4); |
|
57 | + // SIDEBAR RIGHT OPEN ACTIONS |
|
58 | + remove_action('geodir_sidebar_right_open', 'geodir_action_sidebar_right_open', 10); |
|
59 | + add_action('geodir_sidebar_right_open', 'enfold_action_sidebar_right_open', 10, 4); |
|
60 | 60 | |
61 | - // SIDEBAR LEFT OPEN ACTIONS |
|
62 | - remove_action('geodir_sidebar_left_open', 'geodir_action_sidebar_left_open', 10); |
|
63 | - add_action('geodir_sidebar_left_open', 'enfold_action_sidebar_left_open', 10, 4); |
|
61 | + // SIDEBAR LEFT OPEN ACTIONS |
|
62 | + remove_action('geodir_sidebar_left_open', 'geodir_action_sidebar_left_open', 10); |
|
63 | + add_action('geodir_sidebar_left_open', 'enfold_action_sidebar_left_open', 10, 4); |
|
64 | 64 | |
65 | 65 | |
66 | - // HOME PAGE BREADCRUMBS |
|
67 | - remove_action('geodir_home_before_main_content', 'geodir_breadcrumb', 20); |
|
68 | - remove_action('geodir_location_before_main_content', 'geodir_breadcrumb', 20); |
|
66 | + // HOME PAGE BREADCRUMBS |
|
67 | + remove_action('geodir_home_before_main_content', 'geodir_breadcrumb', 20); |
|
68 | + remove_action('geodir_location_before_main_content', 'geodir_breadcrumb', 20); |
|
69 | 69 | |
70 | - // LISTINGS PAGE BREADCRUMBS & TITLES |
|
71 | - remove_action('geodir_listings_before_main_content', 'geodir_breadcrumb', 20); |
|
72 | - remove_action('geodir_listings_page_title', 'geodir_action_listings_title', 10); |
|
70 | + // LISTINGS PAGE BREADCRUMBS & TITLES |
|
71 | + remove_action('geodir_listings_before_main_content', 'geodir_breadcrumb', 20); |
|
72 | + remove_action('geodir_listings_page_title', 'geodir_action_listings_title', 10); |
|
73 | 73 | |
74 | - // DETAILS PAGE BREADCRUMBS & TITLES |
|
75 | - remove_action('geodir_detail_before_main_content', 'geodir_breadcrumb', 20); |
|
76 | - remove_action('geodir_details_main_content', 'geodir_action_page_title', 20); |
|
74 | + // DETAILS PAGE BREADCRUMBS & TITLES |
|
75 | + remove_action('geodir_detail_before_main_content', 'geodir_breadcrumb', 20); |
|
76 | + remove_action('geodir_details_main_content', 'geodir_action_page_title', 20); |
|
77 | 77 | |
78 | - // SEARCH PAGE BREADCRUMBS & TITLES |
|
79 | - remove_action('geodir_search_before_main_content', 'geodir_breadcrumb', 20); |
|
80 | - remove_action('geodir_search_page_title', 'geodir_action_search_page_title', 10); |
|
78 | + // SEARCH PAGE BREADCRUMBS & TITLES |
|
79 | + remove_action('geodir_search_before_main_content', 'geodir_breadcrumb', 20); |
|
80 | + remove_action('geodir_search_page_title', 'geodir_action_search_page_title', 10); |
|
81 | 81 | |
82 | - // AUTHOR PAGE BREADCRUMBS & TITLES |
|
83 | - remove_action('geodir_author_before_main_content', 'geodir_breadcrumb', 20); |
|
84 | - remove_action('geodir_author_page_title', 'geodir_action_author_page_title', 10); |
|
82 | + // AUTHOR PAGE BREADCRUMBS & TITLES |
|
83 | + remove_action('geodir_author_before_main_content', 'geodir_breadcrumb', 20); |
|
84 | + remove_action('geodir_author_page_title', 'geodir_action_author_page_title', 10); |
|
85 | 85 | |
86 | - // DISABLE ENFOLD MAPS CALL |
|
87 | - add_filter('avf_load_google_map_api', 'gd_enfold_remove_maps_api', 10, 1); |
|
86 | + // DISABLE ENFOLD MAPS CALL |
|
87 | + add_filter('avf_load_google_map_api', 'gd_enfold_remove_maps_api', 10, 1); |
|
88 | 88 | |
89 | - // make top section wide |
|
90 | - remove_action('geodir_home_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10); |
|
91 | - remove_action('geodir_location_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10); |
|
92 | - remove_action('geodir_author_before_main_content', 'geodir_action_geodir_sidebar_author_top', 10); |
|
93 | - remove_action('geodir_search_before_main_content', 'geodir_action_geodir_sidebar_search_top', 10); |
|
94 | - remove_action('geodir_detail_before_main_content', 'geodir_action_geodir_sidebar_detail_top', 10); |
|
95 | - remove_action('geodir_listings_before_main_content', 'geodir_action_geodir_sidebar_listings_top', 10); |
|
89 | + // make top section wide |
|
90 | + remove_action('geodir_home_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10); |
|
91 | + remove_action('geodir_location_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10); |
|
92 | + remove_action('geodir_author_before_main_content', 'geodir_action_geodir_sidebar_author_top', 10); |
|
93 | + remove_action('geodir_search_before_main_content', 'geodir_action_geodir_sidebar_search_top', 10); |
|
94 | + remove_action('geodir_detail_before_main_content', 'geodir_action_geodir_sidebar_detail_top', 10); |
|
95 | + remove_action('geodir_listings_before_main_content', 'geodir_action_geodir_sidebar_listings_top', 10); |
|
96 | 96 | |
97 | - add_action('geodir_wrapper_open', 'gd_enfold_compat_add_top_section_back', 5); |
|
97 | + add_action('geodir_wrapper_open', 'gd_enfold_compat_add_top_section_back', 5); |
|
98 | 98 | |
99 | 99 | } // Close enfold_action_calls |
100 | 100 | |
@@ -108,17 +108,17 @@ discard block |
||
108 | 108 | function gd_enfold_compat_add_top_section_back() |
109 | 109 | { |
110 | 110 | |
111 | - if (is_page_geodir_home() || geodir_is_page('location')) { |
|
112 | - add_action('geodir_wrapper_open', 'geodir_action_geodir_sidebar_home_top', 8); |
|
113 | - } elseif (geodir_is_page('listing')) { |
|
114 | - add_action('geodir_wrapper_open', 'geodir_action_geodir_sidebar_listings_top', 8); |
|
115 | - } elseif (geodir_is_page('detail')) { |
|
116 | - add_action('geodir_wrapper_open', 'geodir_action_geodir_sidebar_detail_top', 8); |
|
117 | - } elseif (geodir_is_page('search')) { |
|
118 | - add_action('geodir_wrapper_open', 'geodir_action_geodir_sidebar_search_top', 8); |
|
119 | - } elseif (geodir_is_page('author')) { |
|
120 | - add_action('geodir_wrapper_open', 'geodir_action_geodir_sidebar_author_top', 8); |
|
121 | - } |
|
111 | + if (is_page_geodir_home() || geodir_is_page('location')) { |
|
112 | + add_action('geodir_wrapper_open', 'geodir_action_geodir_sidebar_home_top', 8); |
|
113 | + } elseif (geodir_is_page('listing')) { |
|
114 | + add_action('geodir_wrapper_open', 'geodir_action_geodir_sidebar_listings_top', 8); |
|
115 | + } elseif (geodir_is_page('detail')) { |
|
116 | + add_action('geodir_wrapper_open', 'geodir_action_geodir_sidebar_detail_top', 8); |
|
117 | + } elseif (geodir_is_page('search')) { |
|
118 | + add_action('geodir_wrapper_open', 'geodir_action_geodir_sidebar_search_top', 8); |
|
119 | + } elseif (geodir_is_page('author')) { |
|
120 | + add_action('geodir_wrapper_open', 'geodir_action_geodir_sidebar_author_top', 8); |
|
121 | + } |
|
122 | 122 | |
123 | 123 | |
124 | 124 | } |
@@ -137,8 +137,8 @@ discard block |
||
137 | 137 | */ |
138 | 138 | function wpgeo_enfold_body_class($classes) |
139 | 139 | { |
140 | - $classes[] = 'wpgeo-enfold'; |
|
141 | - return $classes; |
|
140 | + $classes[] = 'wpgeo-enfold'; |
|
141 | + return $classes; |
|
142 | 142 | } |
143 | 143 | |
144 | 144 | /** |
@@ -149,8 +149,8 @@ discard block |
||
149 | 149 | */ |
150 | 150 | function geodir_allow_payment_urls_enfold() |
151 | 151 | { |
152 | - global $builder; |
|
153 | - remove_action('template_redirect', array($builder, 'template_redirect'), 1000); |
|
152 | + global $builder; |
|
153 | + remove_action('template_redirect', array($builder, 'template_redirect'), 1000); |
|
154 | 154 | } |
155 | 155 | |
156 | 156 | |
@@ -162,8 +162,8 @@ discard block |
||
162 | 162 | */ |
163 | 163 | function enfold_action_wrapper_open() |
164 | 164 | { |
165 | - echo "<div class='container_wrap container_wrap_first main_color " . avia_layout_class('main', false) . "'>"; |
|
166 | - echo "<div class='container template-blog '>"; |
|
165 | + echo "<div class='container_wrap container_wrap_first main_color " . avia_layout_class('main', false) . "'>"; |
|
166 | + echo "<div class='container template-blog '>"; |
|
167 | 167 | } |
168 | 168 | |
169 | 169 | /** |
@@ -177,38 +177,38 @@ discard block |
||
177 | 177 | */ |
178 | 178 | function enfold_detail_title($page, $class) |
179 | 179 | { |
180 | - //echo '###'.$page; |
|
181 | - global $wp; |
|
182 | - if (isset($wp->query_vars['page_id']) && $wp->query_vars['page_id'] == geodir_location_page_id() && !geodir_is_page('login')) { |
|
183 | - add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2); |
|
184 | - echo avia_title(); |
|
185 | - } elseif ($page == 'details-page') { |
|
186 | - add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2); |
|
187 | - echo avia_title(); |
|
188 | - } elseif ($page == 'listings-page' || $page == 'search-page') { |
|
189 | - add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2); |
|
190 | - ob_start(); // Start buffering; |
|
191 | - geodir_action_listings_title(); |
|
192 | - $gd_title = ob_get_clean(); |
|
193 | - $title_p = explode('">', $gd_title); |
|
194 | - $title = str_replace('</h1></header>', "", $title_p[2]); |
|
195 | - //print_r($title_p); |
|
196 | - echo avia_title(array('title' => $title)); |
|
197 | - } elseif ($page == 'author-page') { |
|
198 | - add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2); |
|
199 | - ob_start(); // Start buffering; |
|
200 | - geodir_action_author_page_title(); |
|
201 | - $gd_title = ob_get_clean(); |
|
202 | - $gd_title = str_replace('<h1>', "", $gd_title); |
|
203 | - $gd_title = str_replace('</h1>', "", $gd_title); |
|
204 | - echo avia_title(array('title' => $gd_title)); |
|
205 | - } elseif ($page == 'add-listing-page') { |
|
206 | - add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2); |
|
207 | - echo avia_title(); |
|
208 | - } elseif ($page == 'add-listing-page') { |
|
209 | - add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2); |
|
210 | - echo avia_title(); |
|
211 | - } |
|
180 | + //echo '###'.$page; |
|
181 | + global $wp; |
|
182 | + if (isset($wp->query_vars['page_id']) && $wp->query_vars['page_id'] == geodir_location_page_id() && !geodir_is_page('login')) { |
|
183 | + add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2); |
|
184 | + echo avia_title(); |
|
185 | + } elseif ($page == 'details-page') { |
|
186 | + add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2); |
|
187 | + echo avia_title(); |
|
188 | + } elseif ($page == 'listings-page' || $page == 'search-page') { |
|
189 | + add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2); |
|
190 | + ob_start(); // Start buffering; |
|
191 | + geodir_action_listings_title(); |
|
192 | + $gd_title = ob_get_clean(); |
|
193 | + $title_p = explode('">', $gd_title); |
|
194 | + $title = str_replace('</h1></header>', "", $title_p[2]); |
|
195 | + //print_r($title_p); |
|
196 | + echo avia_title(array('title' => $title)); |
|
197 | + } elseif ($page == 'author-page') { |
|
198 | + add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2); |
|
199 | + ob_start(); // Start buffering; |
|
200 | + geodir_action_author_page_title(); |
|
201 | + $gd_title = ob_get_clean(); |
|
202 | + $gd_title = str_replace('<h1>', "", $gd_title); |
|
203 | + $gd_title = str_replace('</h1>', "", $gd_title); |
|
204 | + echo avia_title(array('title' => $gd_title)); |
|
205 | + } elseif ($page == 'add-listing-page') { |
|
206 | + add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2); |
|
207 | + echo avia_title(); |
|
208 | + } elseif ($page == 'add-listing-page') { |
|
209 | + add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2); |
|
210 | + echo avia_title(); |
|
211 | + } |
|
212 | 212 | |
213 | 213 | } |
214 | 214 | |
@@ -223,22 +223,22 @@ discard block |
||
223 | 223 | */ |
224 | 224 | function enfold_detail_breadcrum($trail, $args) |
225 | 225 | { |
226 | - ob_start(); // Start buffering; |
|
227 | - geodir_breadcrumb(); |
|
228 | - $gd_crums = ob_get_clean(); |
|
229 | - if ($gd_crums) { |
|
230 | - $gd_crums = str_replace('<div class="geodir-breadcrumb clearfix"><ul id="breadcrumbs"><li>', "", $gd_crums); |
|
231 | - $gd_crums = str_replace('</li></ul></div>', "", $gd_crums); |
|
232 | - $gd_crums = str_replace(' > ', " > ", $gd_crums); |
|
233 | - $gd_crums = str_replace('</li><li>', "", $gd_crums); |
|
234 | - $gd_crums = explode(" > ", $gd_crums); |
|
235 | - $trail_end = array_pop($gd_crums); |
|
236 | - $gd_crums['trail_end'] = $trail_end; |
|
237 | - //print_r($gd_crums); |
|
238 | - //print_r($trail); |
|
239 | - $trail = $gd_crums; |
|
240 | - } |
|
241 | - return $trail; |
|
226 | + ob_start(); // Start buffering; |
|
227 | + geodir_breadcrumb(); |
|
228 | + $gd_crums = ob_get_clean(); |
|
229 | + if ($gd_crums) { |
|
230 | + $gd_crums = str_replace('<div class="geodir-breadcrumb clearfix"><ul id="breadcrumbs"><li>', "", $gd_crums); |
|
231 | + $gd_crums = str_replace('</li></ul></div>', "", $gd_crums); |
|
232 | + $gd_crums = str_replace(' > ', " > ", $gd_crums); |
|
233 | + $gd_crums = str_replace('</li><li>', "", $gd_crums); |
|
234 | + $gd_crums = explode(" > ", $gd_crums); |
|
235 | + $trail_end = array_pop($gd_crums); |
|
236 | + $gd_crums['trail_end'] = $trail_end; |
|
237 | + //print_r($gd_crums); |
|
238 | + //print_r($trail); |
|
239 | + $trail = $gd_crums; |
|
240 | + } |
|
241 | + return $trail; |
|
242 | 242 | } |
243 | 243 | |
244 | 244 | |
@@ -253,12 +253,12 @@ discard block |
||
253 | 253 | */ |
254 | 254 | function enfold_action_wrapper_content_open($type = '', $id = '', $class = '') |
255 | 255 | { |
256 | - if (geodir_is_page('login')) { |
|
257 | - echo "<main class='template-page content twelve alpha units " . $class . "' " . avia_markup_helper(array('context' => 'content', 'post_type' => 'page', 'echo' => false)) . ">"; |
|
258 | - } else { |
|
259 | - echo "<main class='template-page content " . avia_layout_class('content', false) . " units " . $class . "' " . avia_markup_helper(array('context' => 'content', 'post_type' => 'page', 'echo' => false)) . ">"; |
|
260 | - } |
|
261 | - echo '<div class="entry-content-wrapper">'; |
|
256 | + if (geodir_is_page('login')) { |
|
257 | + echo "<main class='template-page content twelve alpha units " . $class . "' " . avia_markup_helper(array('context' => 'content', 'post_type' => 'page', 'echo' => false)) . ">"; |
|
258 | + } else { |
|
259 | + echo "<main class='template-page content " . avia_layout_class('content', false) . " units " . $class . "' " . avia_markup_helper(array('context' => 'content', 'post_type' => 'page', 'echo' => false)) . ">"; |
|
260 | + } |
|
261 | + echo '<div class="entry-content-wrapper">'; |
|
262 | 262 | } |
263 | 263 | |
264 | 264 | |
@@ -274,9 +274,9 @@ discard block |
||
274 | 274 | */ |
275 | 275 | function enfold_action_sidebar_right_open($type = '', $id = '', $class = '', $itemtype = '') |
276 | 276 | { |
277 | - $sidebar_smartphone = avia_get_option('smartphones_sidebar') == 'smartphones_sidebar' ? 'smartphones_sidebar_active' : ""; |
|
278 | - echo "<aside class='sidebar sidebar_right " . $sidebar_smartphone . " " . avia_layout_class('sidebar', false) . " units' " . avia_markup_helper(array('context' => 'sidebar', 'echo' => false)) . ">"; |
|
279 | - echo "<div class='inner_sidebar extralight-border'>"; |
|
277 | + $sidebar_smartphone = avia_get_option('smartphones_sidebar') == 'smartphones_sidebar' ? 'smartphones_sidebar_active' : ""; |
|
278 | + echo "<aside class='sidebar sidebar_right " . $sidebar_smartphone . " " . avia_layout_class('sidebar', false) . " units' " . avia_markup_helper(array('context' => 'sidebar', 'echo' => false)) . ">"; |
|
279 | + echo "<div class='inner_sidebar extralight-border'>"; |
|
280 | 280 | } |
281 | 281 | |
282 | 282 | /** |
@@ -291,9 +291,9 @@ discard block |
||
291 | 291 | */ |
292 | 292 | function enfold_action_sidebar_left_open($type = '', $id = '', $class = '', $itemtype = '') |
293 | 293 | { |
294 | - $sidebar_smartphone = avia_get_option('smartphones_sidebar') == 'smartphones_sidebar' ? 'smartphones_sidebar_active' : ""; |
|
295 | - echo "<aside class='sidebar sidebar_left " . $sidebar_smartphone . " " . avia_layout_class('sidebar', false) . " units' " . avia_markup_helper(array('context' => 'sidebar', 'echo' => false)) . ">"; |
|
296 | - echo "<div class='inner_sidebar extralight-border'>"; |
|
294 | + $sidebar_smartphone = avia_get_option('smartphones_sidebar') == 'smartphones_sidebar' ? 'smartphones_sidebar_active' : ""; |
|
295 | + echo "<aside class='sidebar sidebar_left " . $sidebar_smartphone . " " . avia_layout_class('sidebar', false) . " units' " . avia_markup_helper(array('context' => 'sidebar', 'echo' => false)) . ">"; |
|
296 | + echo "<div class='inner_sidebar extralight-border'>"; |
|
297 | 297 | } |
298 | 298 | |
299 | 299 | |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | */ |
308 | 308 | function gd_enfold_remove_maps_api($call) |
309 | 309 | { |
310 | - return false; |
|
310 | + return false; |
|
311 | 311 | } |
312 | 312 | |
313 | 313 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | global $gd_session; |
13 | 13 | |
14 | 14 | if (!isset($_REQUEST['backandedit'])) { |
15 | - $gd_session->un_set('listing'); |
|
15 | + $gd_session->un_set('listing'); |
|
16 | 16 | } |
17 | 17 | // call header |
18 | 18 | get_header(); |
@@ -16,36 +16,36 @@ discard block |
||
16 | 16 | */ |
17 | 17 | function multi_news_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 | - //ADD BREADCRUMS |
|
28 | - add_action('geodir_detail_before_main_content', 'gd_mn_replace_breadcrums', 20); |
|
29 | - add_action('geodir_listings_before_main_content', 'gd_mn_replace_breadcrums', 20); |
|
30 | - add_action('geodir_author_before_main_content', 'gd_mn_replace_breadcrums', 20); |
|
31 | - add_action('geodir_search_before_main_content', 'gd_mn_replace_breadcrums', 20); |
|
32 | - //add_action('geodir_home_before_main_content', 'gd_mn_replace_breadcrums', 20); |
|
33 | - add_action('geodir_location_before_main_content', 'gd_mn_replace_breadcrums', 20); |
|
34 | - |
|
35 | - |
|
36 | - // fix breadcrums |
|
37 | - add_filter('breadcrumbs_plus_items', 'gd_breadcrumbs_plus_items', 1); |
|
38 | - |
|
39 | - // REMOVE PAGE TITLES |
|
40 | - remove_action('geodir_listings_page_title', 'geodir_action_listings_title', 10); |
|
41 | - // remove_action( 'geodir_add_listing_page_title', 'geodir_action_add_listing_page_title',10); |
|
42 | - remove_action('geodir_details_main_content', 'geodir_action_page_title', 20); |
|
43 | - remove_action('geodir_search_page_title', 'geodir_action_search_page_title', 10); |
|
44 | - remove_action('geodir_author_page_title', 'geodir_action_author_page_title', 10); |
|
45 | - |
|
46 | - |
|
47 | - add_action('geodir_wrapper_content_open', 'gd_mn_extra_wrap', 30, 1); |
|
48 | - add_action('geodir_wrapper_content_close', 'gd_mn_extra_wrap_end', 3, 1); |
|
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 | + //ADD BREADCRUMS |
|
28 | + add_action('geodir_detail_before_main_content', 'gd_mn_replace_breadcrums', 20); |
|
29 | + add_action('geodir_listings_before_main_content', 'gd_mn_replace_breadcrums', 20); |
|
30 | + add_action('geodir_author_before_main_content', 'gd_mn_replace_breadcrums', 20); |
|
31 | + add_action('geodir_search_before_main_content', 'gd_mn_replace_breadcrums', 20); |
|
32 | + //add_action('geodir_home_before_main_content', 'gd_mn_replace_breadcrums', 20); |
|
33 | + add_action('geodir_location_before_main_content', 'gd_mn_replace_breadcrums', 20); |
|
34 | + |
|
35 | + |
|
36 | + // fix breadcrums |
|
37 | + add_filter('breadcrumbs_plus_items', 'gd_breadcrumbs_plus_items', 1); |
|
38 | + |
|
39 | + // REMOVE PAGE TITLES |
|
40 | + remove_action('geodir_listings_page_title', 'geodir_action_listings_title', 10); |
|
41 | + // remove_action( 'geodir_add_listing_page_title', 'geodir_action_add_listing_page_title',10); |
|
42 | + remove_action('geodir_details_main_content', 'geodir_action_page_title', 20); |
|
43 | + remove_action('geodir_search_page_title', 'geodir_action_search_page_title', 10); |
|
44 | + remove_action('geodir_author_page_title', 'geodir_action_author_page_title', 10); |
|
45 | + |
|
46 | + |
|
47 | + add_action('geodir_wrapper_content_open', 'gd_mn_extra_wrap', 30, 1); |
|
48 | + add_action('geodir_wrapper_content_close', 'gd_mn_extra_wrap_end', 3, 1); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | /** |
@@ -57,11 +57,11 @@ discard block |
||
57 | 57 | */ |
58 | 58 | function gd_mn_extra_wrap($page) |
59 | 59 | { |
60 | - if ($page == 'add-listing-page') { |
|
61 | - echo '<div class="site-content page-wrap">'; |
|
62 | - } elseif ($page == 'signup-page') { |
|
63 | - echo '</div><div class="section full-width-section" style="float: left;width:100%;">'; |
|
64 | - } |
|
60 | + if ($page == 'add-listing-page') { |
|
61 | + echo '<div class="site-content page-wrap">'; |
|
62 | + } elseif ($page == 'signup-page') { |
|
63 | + echo '</div><div class="section full-width-section" style="float: left;width:100%;">'; |
|
64 | + } |
|
65 | 65 | |
66 | 66 | } |
67 | 67 | |
@@ -75,9 +75,9 @@ discard block |
||
75 | 75 | */ |
76 | 76 | function gd_mn_extra_wrap_end($page) |
77 | 77 | { |
78 | - if ($page == 'add-listing-page') { |
|
79 | - echo '</div>'; |
|
80 | - } |
|
78 | + if ($page == 'add-listing-page') { |
|
79 | + echo '</div>'; |
|
80 | + } |
|
81 | 81 | |
82 | 82 | } |
83 | 83 | |
@@ -91,13 +91,13 @@ discard block |
||
91 | 91 | function gd_mn_replace_breadcrums() |
92 | 92 | { |
93 | 93 | |
94 | - if (mom_option('breadcrumb') != 0) { ?> |
|
94 | + if (mom_option('breadcrumb') != 0) { ?> |
|
95 | 95 | <?php if (mom_option('cats_bread')) { |
96 | - $cclass = ''; |
|
97 | - if (mom_option('cat_slider') == false) { |
|
98 | - $cclass = 'post-crumbs '; |
|
99 | - } |
|
100 | - ?> |
|
96 | + $cclass = ''; |
|
97 | + if (mom_option('cat_slider') == false) { |
|
98 | + $cclass = 'post-crumbs '; |
|
99 | + } |
|
100 | + ?> |
|
101 | 101 | <div class="<?php echo $cclass; ?>entry-crumbs" xmlns:v="http://rdf.data-vocabulary.org/#"> |
102 | 102 | |
103 | 103 | <?php mom_breadcrumb(); ?> |
@@ -119,14 +119,14 @@ discard block |
||
119 | 119 | */ |
120 | 120 | function gd_get_breadcrum_links() |
121 | 121 | { |
122 | - ob_start(); |
|
123 | - geodir_breadcrumb(); |
|
124 | - $crums = ob_get_contents(); |
|
125 | - ob_get_clean(); |
|
126 | - $regexp = "<a\s[^>]*href=(\"??)([^\" >]*?)\\1[^>]*>(.*)<\/a>"; |
|
127 | - if (preg_match_all("/$regexp/siU", $crums, $matches)) { |
|
128 | - return $matches[0]; |
|
129 | - } else return ''; |
|
122 | + ob_start(); |
|
123 | + geodir_breadcrumb(); |
|
124 | + $crums = ob_get_contents(); |
|
125 | + ob_get_clean(); |
|
126 | + $regexp = "<a\s[^>]*href=(\"??)([^\" >]*?)\\1[^>]*>(.*)<\/a>"; |
|
127 | + if (preg_match_all("/$regexp/siU", $crums, $matches)) { |
|
128 | + return $matches[0]; |
|
129 | + } else return ''; |
|
130 | 130 | } |
131 | 131 | |
132 | 132 | |
@@ -140,30 +140,30 @@ discard block |
||
140 | 140 | */ |
141 | 141 | function gd_breadcrumbs_plus_items($items) |
142 | 142 | { //print_r($items);exit; |
143 | - $bits = array(); |
|
144 | - $pieces = gd_get_breadcrum_links(); |
|
145 | - //unset($pieces[0]); |
|
146 | - $bits = $pieces; |
|
143 | + $bits = array(); |
|
144 | + $pieces = gd_get_breadcrum_links(); |
|
145 | + //unset($pieces[0]); |
|
146 | + $bits = $pieces; |
|
147 | 147 | |
148 | - $title = $items['last']; |
|
149 | - if (is_page_geodir_home() || geodir_is_page('location')) { |
|
148 | + $title = $items['last']; |
|
149 | + if (is_page_geodir_home() || geodir_is_page('location')) { |
|
150 | 150 | |
151 | - } elseif (geodir_is_page('listing')) { |
|
151 | + } elseif (geodir_is_page('listing')) { |
|
152 | 152 | |
153 | - } elseif (geodir_is_page('detail')) { |
|
154 | - ob_start(); |
|
155 | - geodir_action_page_title(); |
|
156 | - $title = ob_get_contents(); |
|
157 | - ob_end_clean(); |
|
158 | - } elseif (geodir_is_page('search')) { |
|
159 | - } elseif (geodir_is_page('author')) { |
|
160 | - } |
|
153 | + } elseif (geodir_is_page('detail')) { |
|
154 | + ob_start(); |
|
155 | + geodir_action_page_title(); |
|
156 | + $title = ob_get_contents(); |
|
157 | + ob_end_clean(); |
|
158 | + } elseif (geodir_is_page('search')) { |
|
159 | + } elseif (geodir_is_page('author')) { |
|
160 | + } |
|
161 | 161 | |
162 | - $title = strip_tags($title); |
|
163 | - $items = gd_breadcrumbs_plus_items_add($items, $bits, $title); |
|
162 | + $title = strip_tags($title); |
|
163 | + $items = gd_breadcrumbs_plus_items_add($items, $bits, $title); |
|
164 | 164 | |
165 | 165 | |
166 | - return $items; |
|
166 | + return $items; |
|
167 | 167 | } |
168 | 168 | |
169 | 169 | |
@@ -179,28 +179,28 @@ discard block |
||
179 | 179 | */ |
180 | 180 | function gd_breadcrumbs_plus_items_add($items, $bits, $last) |
181 | 181 | { |
182 | - //$pieces = explode("</div>", $items[0]); |
|
183 | - if (is_array($bits)) { |
|
184 | - $items = array(); |
|
185 | - $pieces = ''; |
|
186 | - foreach ($bits as $bit) { |
|
187 | - $pieces .= $bit; |
|
188 | - } |
|
189 | - $items[0] = '<div class="vbreadcrumb" typeof="v:Breadcrumb">' . $pieces . "</div>"; |
|
190 | - if (isset($last) && $last) { |
|
191 | - $items['last'] = $last; |
|
192 | - } |
|
193 | - } |
|
194 | - |
|
195 | - //print_r($items); |
|
196 | - return $items; |
|
182 | + //$pieces = explode("</div>", $items[0]); |
|
183 | + if (is_array($bits)) { |
|
184 | + $items = array(); |
|
185 | + $pieces = ''; |
|
186 | + foreach ($bits as $bit) { |
|
187 | + $pieces .= $bit; |
|
188 | + } |
|
189 | + $items[0] = '<div class="vbreadcrumb" typeof="v:Breadcrumb">' . $pieces . "</div>"; |
|
190 | + if (isset($last) && $last) { |
|
191 | + $items['last'] = $last; |
|
192 | + } |
|
193 | + } |
|
194 | + |
|
195 | + //print_r($items); |
|
196 | + return $items; |
|
197 | 197 | |
198 | 198 | } |
199 | 199 | |
200 | 200 | add_filter('geodir_menu_after_sub_ul','gd_multinews_mobile_menu_caret',10,1); |
201 | 201 | add_filter('geodir_location_switcher_menu_after_sub_ul','gd_multinews_mobile_menu_caret',10,1); |
202 | 202 | function gd_multinews_mobile_menu_caret($html){ |
203 | - $html .= '<i class="responsive-caret"></i>'; |
|
204 | - return $html; |
|
203 | + $html .= '<i class="responsive-caret"></i>'; |
|
204 | + return $html; |
|
205 | 205 | |
206 | 206 | } |
@@ -1,69 +1,69 @@ |
||
1 | 1 | <?php |
2 | 2 | class CheckMaps extends WP_UnitTestCase |
3 | 3 | { |
4 | - public function setUp() |
|
5 | - { |
|
6 | - parent::setUp(); |
|
7 | - } |
|
4 | + public function setUp() |
|
5 | + { |
|
6 | + parent::setUp(); |
|
7 | + } |
|
8 | 8 | |
9 | - public function testCheckHomeMap() |
|
10 | - { |
|
11 | - $output = do_shortcode('[gd_homepage_map width=100% height=300 scrollwheel=false]'); |
|
12 | - $this->assertContains( 'geodir-map-home-page', $output ); |
|
13 | - } |
|
9 | + public function testCheckHomeMap() |
|
10 | + { |
|
11 | + $output = do_shortcode('[gd_homepage_map width=100% height=300 scrollwheel=false]'); |
|
12 | + $this->assertContains( 'geodir-map-home-page', $output ); |
|
13 | + } |
|
14 | 14 | |
15 | - public function testListingsPageMap() |
|
16 | - { |
|
17 | - $output = do_shortcode('[gd_listing_map width=100% height=300 scrollwheel=false sticky=true]'); |
|
18 | - $this->assertContains( 'geodir-map-listing-page', $output ); |
|
19 | - } |
|
15 | + public function testListingsPageMap() |
|
16 | + { |
|
17 | + $output = do_shortcode('[gd_listing_map width=100% height=300 scrollwheel=false sticky=true]'); |
|
18 | + $this->assertContains( 'geodir-map-listing-page', $output ); |
|
19 | + } |
|
20 | 20 | |
21 | - public function testDetailPageMap() |
|
22 | - { |
|
21 | + public function testDetailPageMap() |
|
22 | + { |
|
23 | 23 | |
24 | - $query_args = array( |
|
25 | - 'post_status' => 'publish', |
|
26 | - 'post_type' => 'gd_place', |
|
27 | - 'posts_per_page' => 1, |
|
28 | - ); |
|
24 | + $query_args = array( |
|
25 | + 'post_status' => 'publish', |
|
26 | + 'post_type' => 'gd_place', |
|
27 | + 'posts_per_page' => 1, |
|
28 | + ); |
|
29 | 29 | |
30 | - $all_posts = new WP_Query( $query_args ); |
|
31 | - $post_id = null; |
|
32 | - while ( $all_posts->have_posts() ) : $all_posts->the_post(); |
|
33 | - $post_id = get_the_ID(); |
|
34 | - global $post; |
|
35 | - $post = geodir_get_post_info($post_id); |
|
36 | - setup_postdata($post); |
|
30 | + $all_posts = new WP_Query( $query_args ); |
|
31 | + $post_id = null; |
|
32 | + while ( $all_posts->have_posts() ) : $all_posts->the_post(); |
|
33 | + $post_id = get_the_ID(); |
|
34 | + global $post; |
|
35 | + $post = geodir_get_post_info($post_id); |
|
36 | + setup_postdata($post); |
|
37 | 37 | |
38 | - $map_args = array(); |
|
39 | - $map_args['map_canvas_name'] = 'detail_page_map_canvas'; |
|
40 | - $map_args['width'] = '600'; |
|
41 | - $map_args['height'] = '300'; |
|
42 | - if ($post->post_mapzoom) { |
|
43 | - $map_args['zoom'] = '' . $post->post_mapzoom . ''; |
|
44 | - } |
|
45 | - $map_args['autozoom'] = false; |
|
46 | - $map_args['child_collapse'] = '0'; |
|
47 | - $map_args['enable_cat_filters'] = false; |
|
48 | - $map_args['enable_text_search'] = false; |
|
49 | - $map_args['enable_post_type_filters'] = false; |
|
50 | - $map_args['enable_location_filters'] = false; |
|
51 | - $map_args['enable_jason_on_load'] = true; |
|
52 | - $map_args['enable_map_direction'] = true; |
|
53 | - $map_args['map_class_name'] = 'geodir-map-detail-page'; |
|
54 | - $map_args['maptype'] = (!empty($post->post_mapview)) ? $post->post_mapview : 'ROADMAP'; |
|
55 | - ob_start(); |
|
56 | - geodir_draw_map($map_args); |
|
57 | - $output = ob_get_clean(); |
|
58 | - $this->assertContains( 'geodir-map-detail-page', $output ); |
|
59 | - endwhile; |
|
38 | + $map_args = array(); |
|
39 | + $map_args['map_canvas_name'] = 'detail_page_map_canvas'; |
|
40 | + $map_args['width'] = '600'; |
|
41 | + $map_args['height'] = '300'; |
|
42 | + if ($post->post_mapzoom) { |
|
43 | + $map_args['zoom'] = '' . $post->post_mapzoom . ''; |
|
44 | + } |
|
45 | + $map_args['autozoom'] = false; |
|
46 | + $map_args['child_collapse'] = '0'; |
|
47 | + $map_args['enable_cat_filters'] = false; |
|
48 | + $map_args['enable_text_search'] = false; |
|
49 | + $map_args['enable_post_type_filters'] = false; |
|
50 | + $map_args['enable_location_filters'] = false; |
|
51 | + $map_args['enable_jason_on_load'] = true; |
|
52 | + $map_args['enable_map_direction'] = true; |
|
53 | + $map_args['map_class_name'] = 'geodir-map-detail-page'; |
|
54 | + $map_args['maptype'] = (!empty($post->post_mapview)) ? $post->post_mapview : 'ROADMAP'; |
|
55 | + ob_start(); |
|
56 | + geodir_draw_map($map_args); |
|
57 | + $output = ob_get_clean(); |
|
58 | + $this->assertContains( 'geodir-map-detail-page', $output ); |
|
59 | + endwhile; |
|
60 | 60 | |
61 | 61 | |
62 | - } |
|
62 | + } |
|
63 | 63 | |
64 | - public function tearDown() |
|
65 | - { |
|
66 | - parent::tearDown(); |
|
67 | - } |
|
64 | + public function tearDown() |
|
65 | + { |
|
66 | + parent::tearDown(); |
|
67 | + } |
|
68 | 68 | } |
69 | 69 | ?> |
70 | 70 | \ No newline at end of file |