@@ -11,10 +11,11 @@ discard block |
||
11 | 11 | $image_array = array(); |
12 | 12 | $post_meta = array(); |
13 | 13 | |
14 | -if (geodir_dummy_folder_exists()) |
|
15 | - $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy"; |
|
16 | -else |
|
17 | - $dummy_image_url = 'http://www.wpgeodirectory.com/dummy'; |
|
14 | +if (geodir_dummy_folder_exists()) { |
|
15 | + $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy"; |
|
16 | +} else { |
|
17 | + $dummy_image_url = 'http://www.wpgeodirectory.com/dummy'; |
|
18 | +} |
|
18 | 19 | |
19 | 20 | switch ($dummy_post_index) { |
20 | 21 | |
@@ -1807,16 +1808,18 @@ discard block |
||
1807 | 1808 | |
1808 | 1809 | foreach ($post_info as $post_info) { |
1809 | 1810 | $default_location = geodir_get_default_location(); |
1810 | - if ($city_bound_lat1 > $city_bound_lat2) |
|
1811 | - $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat1, $city_bound_lat2), geodir_random_float($city_bound_lat2, $city_bound_lat1)); |
|
1812 | - else |
|
1813 | - $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat2, $city_bound_lat1), geodir_random_float($city_bound_lat1, $city_bound_lat2)); |
|
1814 | - |
|
1815 | - |
|
1816 | - if ($city_bound_lng1 > $city_bound_lng2) |
|
1817 | - $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng1, $city_bound_lng2), geodir_random_float($city_bound_lng2, $city_bound_lng1)); |
|
1818 | - else |
|
1819 | - $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng2, $city_bound_lng1), geodir_random_float($city_bound_lng1, $city_bound_lng2)); |
|
1811 | + if ($city_bound_lat1 > $city_bound_lat2) { |
|
1812 | + $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat1, $city_bound_lat2), geodir_random_float($city_bound_lat2, $city_bound_lat1)); |
|
1813 | + } else { |
|
1814 | + $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat2, $city_bound_lat1), geodir_random_float($city_bound_lat1, $city_bound_lat2)); |
|
1815 | + } |
|
1816 | + |
|
1817 | + |
|
1818 | + if ($city_bound_lng1 > $city_bound_lng2) { |
|
1819 | + $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng1, $city_bound_lng2), geodir_random_float($city_bound_lng2, $city_bound_lng1)); |
|
1820 | + } else { |
|
1821 | + $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng2, $city_bound_lng1), geodir_random_float($city_bound_lng1, $city_bound_lng2)); |
|
1822 | + } |
|
1820 | 1823 | $post_address = array(); |
1821 | 1824 | $postal_code = ''; |
1822 | 1825 | $address = ''; |
@@ -1831,28 +1834,32 @@ discard block |
||
1831 | 1834 | } |
1832 | 1835 | |
1833 | 1836 | if ($add_value->types[0] == 'street_number') { |
1834 | - if ($address != '') |
|
1835 | - $address .= ',' . $add_value->long_name; |
|
1836 | - else |
|
1837 | - $address .= $add_value->long_name; |
|
1837 | + if ($address != '') { |
|
1838 | + $address .= ',' . $add_value->long_name; |
|
1839 | + } else { |
|
1840 | + $address .= $add_value->long_name; |
|
1841 | + } |
|
1838 | 1842 | } |
1839 | 1843 | if ($add_value->types[0] == 'route') { |
1840 | - if ($address != '') |
|
1841 | - $address .= ',' . $add_value->long_name; |
|
1842 | - else |
|
1843 | - $address .= $add_value->long_name; |
|
1844 | + if ($address != '') { |
|
1845 | + $address .= ',' . $add_value->long_name; |
|
1846 | + } else { |
|
1847 | + $address .= $add_value->long_name; |
|
1848 | + } |
|
1844 | 1849 | } |
1845 | 1850 | if ($add_value->types[0] == 'neighborhood') { |
1846 | - if ($address != '') |
|
1847 | - $address .= ',' . $add_value->long_name; |
|
1848 | - else |
|
1849 | - $address .= $add_value->long_name; |
|
1851 | + if ($address != '') { |
|
1852 | + $address .= ',' . $add_value->long_name; |
|
1853 | + } else { |
|
1854 | + $address .= $add_value->long_name; |
|
1855 | + } |
|
1850 | 1856 | } |
1851 | 1857 | if ($add_value->types[0] == 'sublocality') { |
1852 | - if ($address != '') |
|
1853 | - $address .= ',' . $add_value->long_name; |
|
1854 | - else |
|
1855 | - $address .= $add_value->long_name; |
|
1858 | + if ($address != '') { |
|
1859 | + $address .= ',' . $add_value->long_name; |
|
1860 | + } else { |
|
1861 | + $address .= $add_value->long_name; |
|
1862 | + } |
|
1856 | 1863 | } |
1857 | 1864 | |
1858 | 1865 | } |
@@ -12,30 +12,30 @@ discard block |
||
12 | 12 | $post_meta = array(); |
13 | 13 | |
14 | 14 | if (geodir_dummy_folder_exists()) |
15 | - $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy"; |
|
15 | + $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy"; |
|
16 | 16 | else |
17 | - $dummy_image_url = 'http://www.wpgeodirectory.com/dummy'; |
|
17 | + $dummy_image_url = 'http://www.wpgeodirectory.com/dummy'; |
|
18 | 18 | |
19 | 19 | switch ($dummy_post_index) { |
20 | 20 | |
21 | - case(1): |
|
22 | - $image_array[] = "$dummy_image_url/a1.jpg"; |
|
23 | - $image_array[] = "$dummy_image_url/a2.jpg"; |
|
24 | - $image_array[] = "$dummy_image_url/a3.jpg"; |
|
25 | - $image_array[] = "$dummy_image_url/a4.jpg"; |
|
26 | - $image_array[] = "$dummy_image_url/a5.jpg"; |
|
27 | - $image_array[] = "$dummy_image_url/a6.jpg"; |
|
28 | - $image_array[] = "$dummy_image_url/a7.jpg"; |
|
29 | - $image_array[] = "$dummy_image_url/a8.jpg"; |
|
30 | - $image_array[] = "$dummy_image_url/a9.jpg"; |
|
31 | - $image_array[] = "$dummy_image_url/a10.jpg"; |
|
32 | - $image_array[] = "$dummy_image_url/a11.jpg"; |
|
33 | - |
|
34 | - |
|
35 | - $post_info[] = array( |
|
36 | - "listing_type" => 'gd_place', |
|
37 | - "post_title" => 'Franklin Square', |
|
38 | - "post_desc" => ' <h3> Location </h3> |
|
21 | + case(1): |
|
22 | + $image_array[] = "$dummy_image_url/a1.jpg"; |
|
23 | + $image_array[] = "$dummy_image_url/a2.jpg"; |
|
24 | + $image_array[] = "$dummy_image_url/a3.jpg"; |
|
25 | + $image_array[] = "$dummy_image_url/a4.jpg"; |
|
26 | + $image_array[] = "$dummy_image_url/a5.jpg"; |
|
27 | + $image_array[] = "$dummy_image_url/a6.jpg"; |
|
28 | + $image_array[] = "$dummy_image_url/a7.jpg"; |
|
29 | + $image_array[] = "$dummy_image_url/a8.jpg"; |
|
30 | + $image_array[] = "$dummy_image_url/a9.jpg"; |
|
31 | + $image_array[] = "$dummy_image_url/a10.jpg"; |
|
32 | + $image_array[] = "$dummy_image_url/a11.jpg"; |
|
33 | + |
|
34 | + |
|
35 | + $post_info[] = array( |
|
36 | + "listing_type" => 'gd_place', |
|
37 | + "post_title" => 'Franklin Square', |
|
38 | + "post_desc" => ' <h3> Location </h3> |
|
39 | 39 | |
40 | 40 | 6th and Race Streets in Historic Philadelphia |
41 | 41 | <h3>The Experience</h3> |
@@ -70,42 +70,42 @@ discard block |
||
70 | 70 | Just in time for summer, Franklin Square has opened SquareBurger, a Stephen Starr-run “burger shack” selling summer staples: hot dogs, fries, milkshakes (made with Tasty Kakes) and, of course, hamburgers and cheeseburgers. |
71 | 71 | |
72 | 72 | SquareBurger is open until October - perfect for a couple bites between rounds of miniature golf!', |
73 | - "post_images" => $image_array, |
|
74 | - "post_category" => array('gd_placecategory' => array('Attractions', 'Feature')), |
|
75 | - "post_tags" => array('Tags', 'Sample Tags'), |
|
76 | - "geodir_video" => '', |
|
77 | - "geodir_timing" => 'Open today until 1 p.m., Sunday 10 am to 9 pm', |
|
78 | - "geodir_contact" => '(111) 677-4444', |
|
79 | - "geodir_email" => '[email protected]', |
|
80 | - "geodir_website" => 'http://franklinsquare.com', |
|
81 | - "geodir_twitter" => 'http://twitter.com/franklinsquare', |
|
82 | - "geodir_facebook" => 'http://facebook.com/franklinsquare', |
|
83 | - "post_dummy" => '1' |
|
84 | - ); |
|
85 | - |
|
86 | - |
|
87 | - break; |
|
88 | - case 2: |
|
89 | - $image_array = array(); |
|
90 | - $post_meta = array(); |
|
91 | - |
|
92 | - /// Attractions ////post start 2/// |
|
93 | - $image_array[] = "$dummy_image_url/a6.jpg"; |
|
94 | - $image_array[] = "$dummy_image_url/a1.jpg"; |
|
95 | - $image_array[] = "$dummy_image_url/a3.jpg"; |
|
96 | - $image_array[] = "$dummy_image_url/a4.jpg"; |
|
97 | - $image_array[] = "$dummy_image_url/a5.jpg"; |
|
98 | - $image_array[] = "$dummy_image_url/a2.jpg"; |
|
99 | - $image_array[] = "$dummy_image_url/a7.jpg"; |
|
100 | - $image_array[] = "$dummy_image_url/a8.jpg"; |
|
101 | - $image_array[] = "$dummy_image_url/a9.jpg"; |
|
102 | - $image_array[] = "$dummy_image_url/a10.jpg"; |
|
103 | - $image_array[] = "$dummy_image_url/a11.jpg"; |
|
104 | - |
|
105 | - $post_info[] = array( |
|
106 | - "listing_type" => 'gd_place', |
|
107 | - "post_title" => 'Please Touch Museum', |
|
108 | - "post_desc" => '<h3>New Location! </h3> |
|
73 | + "post_images" => $image_array, |
|
74 | + "post_category" => array('gd_placecategory' => array('Attractions', 'Feature')), |
|
75 | + "post_tags" => array('Tags', 'Sample Tags'), |
|
76 | + "geodir_video" => '', |
|
77 | + "geodir_timing" => 'Open today until 1 p.m., Sunday 10 am to 9 pm', |
|
78 | + "geodir_contact" => '(111) 677-4444', |
|
79 | + "geodir_email" => '[email protected]', |
|
80 | + "geodir_website" => 'http://franklinsquare.com', |
|
81 | + "geodir_twitter" => 'http://twitter.com/franklinsquare', |
|
82 | + "geodir_facebook" => 'http://facebook.com/franklinsquare', |
|
83 | + "post_dummy" => '1' |
|
84 | + ); |
|
85 | + |
|
86 | + |
|
87 | + break; |
|
88 | + case 2: |
|
89 | + $image_array = array(); |
|
90 | + $post_meta = array(); |
|
91 | + |
|
92 | + /// Attractions ////post start 2/// |
|
93 | + $image_array[] = "$dummy_image_url/a6.jpg"; |
|
94 | + $image_array[] = "$dummy_image_url/a1.jpg"; |
|
95 | + $image_array[] = "$dummy_image_url/a3.jpg"; |
|
96 | + $image_array[] = "$dummy_image_url/a4.jpg"; |
|
97 | + $image_array[] = "$dummy_image_url/a5.jpg"; |
|
98 | + $image_array[] = "$dummy_image_url/a2.jpg"; |
|
99 | + $image_array[] = "$dummy_image_url/a7.jpg"; |
|
100 | + $image_array[] = "$dummy_image_url/a8.jpg"; |
|
101 | + $image_array[] = "$dummy_image_url/a9.jpg"; |
|
102 | + $image_array[] = "$dummy_image_url/a10.jpg"; |
|
103 | + $image_array[] = "$dummy_image_url/a11.jpg"; |
|
104 | + |
|
105 | + $post_info[] = array( |
|
106 | + "listing_type" => 'gd_place', |
|
107 | + "post_title" => 'Please Touch Museum', |
|
108 | + "post_desc" => '<h3>New Location! </h3> |
|
109 | 109 | |
110 | 110 | Who doesn´t love the Please Touch Museum? And now, taking kids to the Museum is better than ever. The nation´s premier children´s museum - which has been a beloved landmark since it opened in 1976 - has a new home in Fairmount Park, opening its doors to a world of educational, hands-on fun. |
111 | 111 | |
@@ -137,42 +137,42 @@ discard block |
||
137 | 137 | |
138 | 138 | You can buy admission tickets to the Please Touch Museum online through our partners at the Independence Visitor Center. Just click the button below.', |
139 | 139 | |
140 | - "post_images" => $image_array, |
|
141 | - "post_category" => array('gd_placecategory' => array('Attractions', 'Feature')), |
|
142 | - "post_tags" => array('Tags', 'Sample Tags'), |
|
143 | - "geodir_video" => '', |
|
144 | - "geodir_timing" => 'Open today until 1 p.m., Sunday 10 am to 9 pm', |
|
145 | - "geodir_contact" => '(222) 777-1111', |
|
146 | - "geodir_email" => '[email protected]', |
|
147 | - "geodir_website" => 'http://pleasetouchmuseum.com', |
|
148 | - "geodir_twitter" => 'http://twitter.com/pleasetouchmuseum', |
|
149 | - "geodir_facebook" => 'http://facebook.com/pleasetouchmuseum', |
|
150 | - "post_dummy" => '1' |
|
151 | - ); |
|
152 | - |
|
153 | - break; |
|
154 | - case 3: |
|
155 | - $image_array = array(); |
|
156 | - $post_meta = array(); |
|
157 | - |
|
158 | - ////post end/// |
|
159 | - /// Attractions ////post start 3/// |
|
160 | - $image_array[] = "$dummy_image_url/a9.jpg"; |
|
161 | - $image_array[] = "$dummy_image_url/a10.jpg"; |
|
162 | - $image_array[] = "$dummy_image_url/a3.jpg"; |
|
163 | - $image_array[] = "$dummy_image_url/a4.jpg"; |
|
164 | - $image_array[] = "$dummy_image_url/a5.jpg"; |
|
165 | - $image_array[] = "$dummy_image_url/a2.jpg"; |
|
166 | - $image_array[] = "$dummy_image_url/a7.jpg"; |
|
167 | - $image_array[] = "$dummy_image_url/a8.jpg"; |
|
168 | - $image_array[] = "$dummy_image_url/a6.jpg"; |
|
169 | - $image_array[] = "$dummy_image_url/a1.jpg"; |
|
170 | - $image_array[] = "$dummy_image_url/a11.jpg"; |
|
171 | - |
|
172 | - $post_info[] = array( |
|
173 | - "listing_type" => 'gd_place', |
|
174 | - "post_title" => 'Longwood Gardens', |
|
175 | - "post_desc" => '<h3>The Experience </h3> |
|
140 | + "post_images" => $image_array, |
|
141 | + "post_category" => array('gd_placecategory' => array('Attractions', 'Feature')), |
|
142 | + "post_tags" => array('Tags', 'Sample Tags'), |
|
143 | + "geodir_video" => '', |
|
144 | + "geodir_timing" => 'Open today until 1 p.m., Sunday 10 am to 9 pm', |
|
145 | + "geodir_contact" => '(222) 777-1111', |
|
146 | + "geodir_email" => '[email protected]', |
|
147 | + "geodir_website" => 'http://pleasetouchmuseum.com', |
|
148 | + "geodir_twitter" => 'http://twitter.com/pleasetouchmuseum', |
|
149 | + "geodir_facebook" => 'http://facebook.com/pleasetouchmuseum', |
|
150 | + "post_dummy" => '1' |
|
151 | + ); |
|
152 | + |
|
153 | + break; |
|
154 | + case 3: |
|
155 | + $image_array = array(); |
|
156 | + $post_meta = array(); |
|
157 | + |
|
158 | + ////post end/// |
|
159 | + /// Attractions ////post start 3/// |
|
160 | + $image_array[] = "$dummy_image_url/a9.jpg"; |
|
161 | + $image_array[] = "$dummy_image_url/a10.jpg"; |
|
162 | + $image_array[] = "$dummy_image_url/a3.jpg"; |
|
163 | + $image_array[] = "$dummy_image_url/a4.jpg"; |
|
164 | + $image_array[] = "$dummy_image_url/a5.jpg"; |
|
165 | + $image_array[] = "$dummy_image_url/a2.jpg"; |
|
166 | + $image_array[] = "$dummy_image_url/a7.jpg"; |
|
167 | + $image_array[] = "$dummy_image_url/a8.jpg"; |
|
168 | + $image_array[] = "$dummy_image_url/a6.jpg"; |
|
169 | + $image_array[] = "$dummy_image_url/a1.jpg"; |
|
170 | + $image_array[] = "$dummy_image_url/a11.jpg"; |
|
171 | + |
|
172 | + $post_info[] = array( |
|
173 | + "listing_type" => 'gd_place', |
|
174 | + "post_title" => 'Longwood Gardens', |
|
175 | + "post_desc" => '<h3>The Experience </h3> |
|
176 | 176 | |
177 | 177 | When you´re at Longwood Gardens, it´s easy to imagine that you´re at a giant, royal garden in Europe. Stroll along the many paths through acres of exquisitely maintained grounds featuring 11,000 different types of plants. |
178 | 178 | |
@@ -197,42 +197,42 @@ discard block |
||
197 | 197 | <h3>Buy Tickets Online In Advance </h3> |
198 | 198 | |
199 | 199 | You can buy admission tickets to Longwood Gardens online through our partners at the Independence Visitor Center. Just click the button below.', |
200 | - "post_images" => $image_array, |
|
201 | - "post_category" => array('gd_placecategory' => array('Attractions')), |
|
202 | - "post_tags" => array('wood', 'garden'), |
|
203 | - "geodir_video" => '', |
|
204 | - "geodir_timing" => 'Open today until 1 p.m., Sunday 10 am to 9 pm', |
|
205 | - "geodir_contact" => '(111) 888-1111', |
|
206 | - "geodir_email" => '[email protected]', |
|
207 | - "geodir_website" => 'http://longwoodgardens.com', |
|
208 | - "geodir_twitter" => 'http://twitter.com/longwoodgardens', |
|
209 | - "geodir_facebook" => 'http://facebook.com/longwoodgardens', |
|
210 | - "post_dummy" => '1' |
|
211 | - ); |
|
212 | - break; |
|
213 | - ////post end/// |
|
214 | - /// Attractions ////post start 4/// |
|
215 | - |
|
216 | - case 4: |
|
217 | - |
|
218 | - $image_array = array(); |
|
219 | - $post_meta = array(); |
|
220 | - $image_array[] = "$dummy_image_url/a11.jpg"; |
|
221 | - $image_array[] = "$dummy_image_url/a10.jpg"; |
|
222 | - $image_array[] = "$dummy_image_url/a3.jpg"; |
|
223 | - $image_array[] = "$dummy_image_url/a4.jpg"; |
|
224 | - $image_array[] = "$dummy_image_url/a5.jpg"; |
|
225 | - $image_array[] = "$dummy_image_url/a2.jpg"; |
|
226 | - $image_array[] = "$dummy_image_url/a7.jpg"; |
|
227 | - $image_array[] = "$dummy_image_url/a8.jpg"; |
|
228 | - $image_array[] = "$dummy_image_url/a6.jpg"; |
|
229 | - $image_array[] = "$dummy_image_url/a1.jpg"; |
|
230 | - $image_array[] = "$dummy_image_url/a9.jpg"; |
|
231 | - |
|
232 | - $post_info[] = array( |
|
233 | - "listing_type" => 'gd_place', |
|
234 | - "post_title" => 'The Philadelphia Zoo', |
|
235 | - "post_desc" => '<h3>The Zoo 150th Birthday</h3> |
|
200 | + "post_images" => $image_array, |
|
201 | + "post_category" => array('gd_placecategory' => array('Attractions')), |
|
202 | + "post_tags" => array('wood', 'garden'), |
|
203 | + "geodir_video" => '', |
|
204 | + "geodir_timing" => 'Open today until 1 p.m., Sunday 10 am to 9 pm', |
|
205 | + "geodir_contact" => '(111) 888-1111', |
|
206 | + "geodir_email" => '[email protected]', |
|
207 | + "geodir_website" => 'http://longwoodgardens.com', |
|
208 | + "geodir_twitter" => 'http://twitter.com/longwoodgardens', |
|
209 | + "geodir_facebook" => 'http://facebook.com/longwoodgardens', |
|
210 | + "post_dummy" => '1' |
|
211 | + ); |
|
212 | + break; |
|
213 | + ////post end/// |
|
214 | + /// Attractions ////post start 4/// |
|
215 | + |
|
216 | + case 4: |
|
217 | + |
|
218 | + $image_array = array(); |
|
219 | + $post_meta = array(); |
|
220 | + $image_array[] = "$dummy_image_url/a11.jpg"; |
|
221 | + $image_array[] = "$dummy_image_url/a10.jpg"; |
|
222 | + $image_array[] = "$dummy_image_url/a3.jpg"; |
|
223 | + $image_array[] = "$dummy_image_url/a4.jpg"; |
|
224 | + $image_array[] = "$dummy_image_url/a5.jpg"; |
|
225 | + $image_array[] = "$dummy_image_url/a2.jpg"; |
|
226 | + $image_array[] = "$dummy_image_url/a7.jpg"; |
|
227 | + $image_array[] = "$dummy_image_url/a8.jpg"; |
|
228 | + $image_array[] = "$dummy_image_url/a6.jpg"; |
|
229 | + $image_array[] = "$dummy_image_url/a1.jpg"; |
|
230 | + $image_array[] = "$dummy_image_url/a9.jpg"; |
|
231 | + |
|
232 | + $post_info[] = array( |
|
233 | + "listing_type" => 'gd_place', |
|
234 | + "post_title" => 'The Philadelphia Zoo', |
|
235 | + "post_desc" => '<h3>The Zoo 150th Birthday</h3> |
|
236 | 236 | |
237 | 237 | The Philadelphia Zoo celebrated its 150th anniversary in 2009. So stop by and celebrate this major achievement at America´s first zoo! |
238 | 238 | |
@@ -267,45 +267,45 @@ discard block |
||
267 | 267 | The nation´s oldest zoo was chartered in 1859, but the impending Civil War delayed its opening until 1874. In addition to its animals, the zoo is known for its historic architecture, which includes the country home of William Penn´s grandson; its botanical collections of over 500 plant species; its groundbreaking research and its fine veterinary facilities. |
268 | 268 | |
269 | 269 | The Primate Reserve, Carnivore Kingdom, and Rare Animal Conservation Center, with its tree kangaroos and blue-eyed lemurs, are brand new, but there´s still fun to be had in the historic, old-style bird, pachyderm and carnivore houses. In the Treehouse, kids can investigate the world from an animal´s perspective; outdoors, the Zoo Balloon lifts passengers 400 feet into the air for a bird´s-eye view of the zoo.', |
270 | - "post_images" => $image_array, |
|
271 | - "post_category" => array('gd_placecategory' => array('Attractions')), |
|
272 | - "post_tags" => array('wood', 'garden'), |
|
273 | - "geodir_video" => '', |
|
274 | - "geodir_timing" => 'Open today until 11.30 a.m., Sunday 11 am to 7 pm', |
|
275 | - "geodir_contact" => '(211) 143-1900', |
|
276 | - "geodir_email" => '[email protected]', |
|
277 | - "geodir_website" => 'http://philadelphiazoo.com', |
|
278 | - "geodir_twitter" => 'http://twitter.com/philadelphiazoo', |
|
279 | - "geodir_facebook" => 'http://facebook.com/philadelphiazoo', |
|
280 | - "post_dummy" => '1' |
|
281 | - ); |
|
282 | - |
|
283 | - ////post end/// |
|
284 | - /// Attractions ////post start 4/// |
|
285 | - break; |
|
286 | - case 5: |
|
287 | - |
|
288 | - |
|
289 | - $image_array = array(); |
|
290 | - $post_meta = array(); |
|
291 | - |
|
292 | - /// Attractions ////post start 5/// |
|
293 | - $image_array[] = "$dummy_image_url/a12.jpg"; |
|
294 | - $image_array[] = "$dummy_image_url/a13.jpg"; |
|
295 | - $image_array[] = "$dummy_image_url/a3.jpg"; |
|
296 | - $image_array[] = "$dummy_image_url/a4.jpg"; |
|
297 | - $image_array[] = "$dummy_image_url/a5.jpg"; |
|
298 | - $image_array[] = "$dummy_image_url/a2.jpg"; |
|
299 | - $image_array[] = "$dummy_image_url/a7.jpg"; |
|
300 | - $image_array[] = "$dummy_image_url/a8.jpg"; |
|
301 | - $image_array[] = "$dummy_image_url/a6.jpg"; |
|
302 | - $image_array[] = "$dummy_image_url/a1.jpg"; |
|
303 | - $image_array[] = "$dummy_image_url/a9.jpg"; |
|
304 | - |
|
305 | - $post_info[] = array( |
|
306 | - "listing_type" => 'gd_place', |
|
307 | - "post_title" => 'National Constitution Center', |
|
308 | - "post_desc" => '<h3>The Experience</h3> |
|
270 | + "post_images" => $image_array, |
|
271 | + "post_category" => array('gd_placecategory' => array('Attractions')), |
|
272 | + "post_tags" => array('wood', 'garden'), |
|
273 | + "geodir_video" => '', |
|
274 | + "geodir_timing" => 'Open today until 11.30 a.m., Sunday 11 am to 7 pm', |
|
275 | + "geodir_contact" => '(211) 143-1900', |
|
276 | + "geodir_email" => '[email protected]', |
|
277 | + "geodir_website" => 'http://philadelphiazoo.com', |
|
278 | + "geodir_twitter" => 'http://twitter.com/philadelphiazoo', |
|
279 | + "geodir_facebook" => 'http://facebook.com/philadelphiazoo', |
|
280 | + "post_dummy" => '1' |
|
281 | + ); |
|
282 | + |
|
283 | + ////post end/// |
|
284 | + /// Attractions ////post start 4/// |
|
285 | + break; |
|
286 | + case 5: |
|
287 | + |
|
288 | + |
|
289 | + $image_array = array(); |
|
290 | + $post_meta = array(); |
|
291 | + |
|
292 | + /// Attractions ////post start 5/// |
|
293 | + $image_array[] = "$dummy_image_url/a12.jpg"; |
|
294 | + $image_array[] = "$dummy_image_url/a13.jpg"; |
|
295 | + $image_array[] = "$dummy_image_url/a3.jpg"; |
|
296 | + $image_array[] = "$dummy_image_url/a4.jpg"; |
|
297 | + $image_array[] = "$dummy_image_url/a5.jpg"; |
|
298 | + $image_array[] = "$dummy_image_url/a2.jpg"; |
|
299 | + $image_array[] = "$dummy_image_url/a7.jpg"; |
|
300 | + $image_array[] = "$dummy_image_url/a8.jpg"; |
|
301 | + $image_array[] = "$dummy_image_url/a6.jpg"; |
|
302 | + $image_array[] = "$dummy_image_url/a1.jpg"; |
|
303 | + $image_array[] = "$dummy_image_url/a9.jpg"; |
|
304 | + |
|
305 | + $post_info[] = array( |
|
306 | + "listing_type" => 'gd_place', |
|
307 | + "post_title" => 'National Constitution Center', |
|
308 | + "post_desc" => '<h3>The Experience</h3> |
|
309 | 309 | |
310 | 310 | It only four pages long, but the U.S. Constitution is among the most influential and important documents in the history of the world. |
311 | 311 | |
@@ -327,45 +327,45 @@ discard block |
||
327 | 327 | <h3>Kids Stuff </h3> |
328 | 328 | |
329 | 329 | The Center frequently hosts special events with a focus on children that include informative and engaging hands-on activities. For specific information, check out the Center website.', |
330 | - "post_images" => $image_array, |
|
331 | - "post_category" => array('gd_placecategory' => array('Attractions', 'Feature')), |
|
332 | - "post_tags" => array('Tag', 'Center'), |
|
333 | - "geodir_video" => '', |
|
334 | - "geodir_timing" => 'Open today until 9.30 a.m., Sunday 11 am to 7 pm', |
|
335 | - "geodir_contact" => '(111) 111-1111', |
|
336 | - "geodir_email" => '[email protected]', |
|
337 | - "geodir_website" => 'http://ncc.com', |
|
338 | - "geodir_twitter" => 'http://twitter.com/ncc', |
|
339 | - "geodir_facebook" => 'http://facebook.com/ncc', |
|
340 | - "post_dummy" => '1' |
|
341 | - ); |
|
342 | - |
|
343 | - ////post end/// |
|
344 | - /// Attractions ////post start 5/// |
|
345 | - break; |
|
346 | - case 6: |
|
347 | - |
|
348 | - |
|
349 | - $image_array = array(); |
|
350 | - $post_meta = array(); |
|
351 | - |
|
352 | - /// Attractions ////post start 6/// |
|
353 | - $image_array[] = "$dummy_image_url/a14.jpg"; |
|
354 | - $image_array[] = "$dummy_image_url/a13.jpg"; |
|
355 | - $image_array[] = "$dummy_image_url/a3.jpg"; |
|
356 | - $image_array[] = "$dummy_image_url/a4.jpg"; |
|
357 | - $image_array[] = "$dummy_image_url/a5.jpg"; |
|
358 | - $image_array[] = "$dummy_image_url/a2.jpg"; |
|
359 | - $image_array[] = "$dummy_image_url/a7.jpg"; |
|
360 | - $image_array[] = "$dummy_image_url/a8.jpg"; |
|
361 | - $image_array[] = "$dummy_image_url/a6.jpg"; |
|
362 | - $image_array[] = "$dummy_image_url/a1.jpg"; |
|
363 | - $image_array[] = "$dummy_image_url/a9.jpg"; |
|
364 | - |
|
365 | - $post_info[] = array( |
|
366 | - "listing_type" => 'gd_place', |
|
367 | - "post_title" => 'Sadsbury Woods Preserve', |
|
368 | - "post_desc" => 'A more than 500-acre nature preserve ideal for walking and hiking, Sadsbury Woods is also an important habitat for interior nesting birds and small mammals. An increasingly rare area of interior woodlands, defined as an area at least 300 feet from any road, lawn or meadow, provides a critical habitat for many species of birds, especially neo-tropical migrant songbirds. |
|
330 | + "post_images" => $image_array, |
|
331 | + "post_category" => array('gd_placecategory' => array('Attractions', 'Feature')), |
|
332 | + "post_tags" => array('Tag', 'Center'), |
|
333 | + "geodir_video" => '', |
|
334 | + "geodir_timing" => 'Open today until 9.30 a.m., Sunday 11 am to 7 pm', |
|
335 | + "geodir_contact" => '(111) 111-1111', |
|
336 | + "geodir_email" => '[email protected]', |
|
337 | + "geodir_website" => 'http://ncc.com', |
|
338 | + "geodir_twitter" => 'http://twitter.com/ncc', |
|
339 | + "geodir_facebook" => 'http://facebook.com/ncc', |
|
340 | + "post_dummy" => '1' |
|
341 | + ); |
|
342 | + |
|
343 | + ////post end/// |
|
344 | + /// Attractions ////post start 5/// |
|
345 | + break; |
|
346 | + case 6: |
|
347 | + |
|
348 | + |
|
349 | + $image_array = array(); |
|
350 | + $post_meta = array(); |
|
351 | + |
|
352 | + /// Attractions ////post start 6/// |
|
353 | + $image_array[] = "$dummy_image_url/a14.jpg"; |
|
354 | + $image_array[] = "$dummy_image_url/a13.jpg"; |
|
355 | + $image_array[] = "$dummy_image_url/a3.jpg"; |
|
356 | + $image_array[] = "$dummy_image_url/a4.jpg"; |
|
357 | + $image_array[] = "$dummy_image_url/a5.jpg"; |
|
358 | + $image_array[] = "$dummy_image_url/a2.jpg"; |
|
359 | + $image_array[] = "$dummy_image_url/a7.jpg"; |
|
360 | + $image_array[] = "$dummy_image_url/a8.jpg"; |
|
361 | + $image_array[] = "$dummy_image_url/a6.jpg"; |
|
362 | + $image_array[] = "$dummy_image_url/a1.jpg"; |
|
363 | + $image_array[] = "$dummy_image_url/a9.jpg"; |
|
364 | + |
|
365 | + $post_info[] = array( |
|
366 | + "listing_type" => 'gd_place', |
|
367 | + "post_title" => 'Sadsbury Woods Preserve', |
|
368 | + "post_desc" => 'A more than 500-acre nature preserve ideal for walking and hiking, Sadsbury Woods is also an important habitat for interior nesting birds and small mammals. An increasingly rare area of interior woodlands, defined as an area at least 300 feet from any road, lawn or meadow, provides a critical habitat for many species of birds, especially neo-tropical migrant songbirds. |
|
369 | 369 | |
370 | 370 | Situated on the western edge of Chester County, the land remains much as it did centuries ago, and now serves as a permanent refuge in an area facing dramatically increasing development pressure. |
371 | 371 | |
@@ -381,45 +381,45 @@ discard block |
||
381 | 381 | Outsider Tip |
382 | 382 | |
383 | 383 | The deep forest is a great place for spotting neo-tropical songbirds in the spring and summer months', |
384 | - "post_images" => $image_array, |
|
385 | - "post_category" => array('gd_placecategory' => array('Attractions')), |
|
386 | - "post_tags" => array('sample', 'tags'), |
|
387 | - "geodir_video" => '', |
|
388 | - "geodir_timing" => 'Open today until 12.30 p.m., Sunday 12 pm to 7 pm', |
|
389 | - "geodir_contact" => '(222) 999-9999', |
|
390 | - "geodir_email" => '[email protected]', |
|
391 | - "geodir_website" => 'http://swp.com', |
|
392 | - "geodir_twitter" => 'http://twitter.com/swp', |
|
393 | - "geodir_facebook" => 'http://facebook.com/swp', |
|
394 | - "post_dummy" => '1' |
|
395 | - ); |
|
396 | - |
|
397 | - ////post end/// |
|
398 | - /// Attractions ////post start 6/// |
|
399 | - |
|
400 | - break; |
|
401 | - case 7: |
|
402 | - |
|
403 | - $image_array = array(); |
|
404 | - $post_meta = array(); |
|
405 | - |
|
406 | - /// Attractions ////post start 7/// |
|
407 | - $image_array[] = "$dummy_image_url/a15.jpg"; |
|
408 | - $image_array[] = "$dummy_image_url/a16.jpg"; |
|
409 | - $image_array[] = "$dummy_image_url/a17.jpg"; |
|
410 | - $image_array[] = "$dummy_image_url/a4.jpg"; |
|
411 | - $image_array[] = "$dummy_image_url/a5.jpg"; |
|
412 | - $image_array[] = "$dummy_image_url/a2.jpg"; |
|
413 | - $image_array[] = "$dummy_image_url/a7.jpg"; |
|
414 | - $image_array[] = "$dummy_image_url/a8.jpg"; |
|
415 | - $image_array[] = "$dummy_image_url/a6.jpg"; |
|
416 | - $image_array[] = "$dummy_image_url/a1.jpg"; |
|
417 | - $image_array[] = "$dummy_image_url/a9.jpg"; |
|
418 | - |
|
419 | - $post_info[] = array( |
|
420 | - "listing_type" => 'gd_place', |
|
421 | - "post_title" => 'Museum Without Walls', |
|
422 | - "post_desc" => '<h3>The Experience </h3> |
|
384 | + "post_images" => $image_array, |
|
385 | + "post_category" => array('gd_placecategory' => array('Attractions')), |
|
386 | + "post_tags" => array('sample', 'tags'), |
|
387 | + "geodir_video" => '', |
|
388 | + "geodir_timing" => 'Open today until 12.30 p.m., Sunday 12 pm to 7 pm', |
|
389 | + "geodir_contact" => '(222) 999-9999', |
|
390 | + "geodir_email" => '[email protected]', |
|
391 | + "geodir_website" => 'http://swp.com', |
|
392 | + "geodir_twitter" => 'http://twitter.com/swp', |
|
393 | + "geodir_facebook" => 'http://facebook.com/swp', |
|
394 | + "post_dummy" => '1' |
|
395 | + ); |
|
396 | + |
|
397 | + ////post end/// |
|
398 | + /// Attractions ////post start 6/// |
|
399 | + |
|
400 | + break; |
|
401 | + case 7: |
|
402 | + |
|
403 | + $image_array = array(); |
|
404 | + $post_meta = array(); |
|
405 | + |
|
406 | + /// Attractions ////post start 7/// |
|
407 | + $image_array[] = "$dummy_image_url/a15.jpg"; |
|
408 | + $image_array[] = "$dummy_image_url/a16.jpg"; |
|
409 | + $image_array[] = "$dummy_image_url/a17.jpg"; |
|
410 | + $image_array[] = "$dummy_image_url/a4.jpg"; |
|
411 | + $image_array[] = "$dummy_image_url/a5.jpg"; |
|
412 | + $image_array[] = "$dummy_image_url/a2.jpg"; |
|
413 | + $image_array[] = "$dummy_image_url/a7.jpg"; |
|
414 | + $image_array[] = "$dummy_image_url/a8.jpg"; |
|
415 | + $image_array[] = "$dummy_image_url/a6.jpg"; |
|
416 | + $image_array[] = "$dummy_image_url/a1.jpg"; |
|
417 | + $image_array[] = "$dummy_image_url/a9.jpg"; |
|
418 | + |
|
419 | + $post_info[] = array( |
|
420 | + "listing_type" => 'gd_place', |
|
421 | + "post_title" => 'Museum Without Walls', |
|
422 | + "post_desc" => '<h3>The Experience </h3> |
|
423 | 423 | |
424 | 424 | Museum Without Walls: AUDIO is a multi-platform, interactive audio tour, designed to allow locals and visitors alike to experience Philadelphia extensive collection of public art and outdoor sculpture along the Benjamin Franklin Parkway and Kelly Drive. This innovative program invites passersby to stop, look, listen and see this city public art in a new way. Discover the untold histories of the 51 outdoor sculptures at 35 stops through these professionally produced three-minute interpretive audio segments. The many narratives have been spoken by more than 100 individuals, all with personal connections to the pieces of art. |
425 | 425 | |
@@ -429,45 +429,45 @@ discard block |
||
429 | 429 | <h3>History </h3> |
430 | 430 | |
431 | 431 | Philadelphia has more outdoor sculpture than any other American city, yet this extensive collection often goes unnoticed. This program is intended to reveal the distinct stories behind each of these works, that have become visual white noise for so many of the city residents and visitors. ', |
432 | - "post_images" => $image_array, |
|
433 | - "post_category" => array('gd_placecategory' => array('Attractions')), |
|
434 | - "post_tags" => array('Museum'), |
|
435 | - "geodir_video" => '', |
|
436 | - "geodir_timing" => 'Open today until 10.30 a.m., Sunday 10 am to 7 pm', |
|
437 | - "geodir_contact" => '(222) 999-9999', |
|
438 | - "geodir_email" => '[email protected]', |
|
439 | - "geodir_website" => 'http://museumwithoutwallsaudio.org/', |
|
440 | - "geodir_twitter" => 'http://twitter.com/mwwalls', |
|
441 | - "geodir_facebook" => 'http://facebook.com/mwwalls', |
|
442 | - "post_dummy" => '1' |
|
443 | - ); |
|
444 | - |
|
445 | - ////post end/// |
|
446 | - /// Attractions ////post start 7/// |
|
447 | - |
|
448 | - break; |
|
449 | - case 8: |
|
450 | - |
|
451 | - $image_array = array(); |
|
452 | - $post_meta = array(); |
|
453 | - |
|
454 | - /// Attractions ////post start 8/// |
|
455 | - $image_array[] = "$dummy_image_url/a18.jpg"; |
|
456 | - $image_array[] = "$dummy_image_url/a10.jpg"; |
|
457 | - $image_array[] = "$dummy_image_url/a3.jpg"; |
|
458 | - $image_array[] = "$dummy_image_url/a4.jpg"; |
|
459 | - $image_array[] = "$dummy_image_url/a5.jpg"; |
|
460 | - $image_array[] = "$dummy_image_url/a2.jpg"; |
|
461 | - $image_array[] = "$dummy_image_url/a7.jpg"; |
|
462 | - $image_array[] = "$dummy_image_url/a8.jpg"; |
|
463 | - $image_array[] = "$dummy_image_url/a6.jpg"; |
|
464 | - $image_array[] = "$dummy_image_url/a1.jpg"; |
|
465 | - $image_array[] = "$dummy_image_url/a9.jpg"; |
|
466 | - |
|
467 | - $post_info[] = array( |
|
468 | - "listing_type" => 'gd_place', |
|
469 | - "post_title" => 'Audacious Freedom', |
|
470 | - "post_desc" => 'Audacious Freedom, the major, new exhibit at the African American Museum in Philadelphia , explores the lives of people of African descent living in Philadelphia between 1776 and 1876. |
|
432 | + "post_images" => $image_array, |
|
433 | + "post_category" => array('gd_placecategory' => array('Attractions')), |
|
434 | + "post_tags" => array('Museum'), |
|
435 | + "geodir_video" => '', |
|
436 | + "geodir_timing" => 'Open today until 10.30 a.m., Sunday 10 am to 7 pm', |
|
437 | + "geodir_contact" => '(222) 999-9999', |
|
438 | + "geodir_email" => '[email protected]', |
|
439 | + "geodir_website" => 'http://museumwithoutwallsaudio.org/', |
|
440 | + "geodir_twitter" => 'http://twitter.com/mwwalls', |
|
441 | + "geodir_facebook" => 'http://facebook.com/mwwalls', |
|
442 | + "post_dummy" => '1' |
|
443 | + ); |
|
444 | + |
|
445 | + ////post end/// |
|
446 | + /// Attractions ////post start 7/// |
|
447 | + |
|
448 | + break; |
|
449 | + case 8: |
|
450 | + |
|
451 | + $image_array = array(); |
|
452 | + $post_meta = array(); |
|
453 | + |
|
454 | + /// Attractions ////post start 8/// |
|
455 | + $image_array[] = "$dummy_image_url/a18.jpg"; |
|
456 | + $image_array[] = "$dummy_image_url/a10.jpg"; |
|
457 | + $image_array[] = "$dummy_image_url/a3.jpg"; |
|
458 | + $image_array[] = "$dummy_image_url/a4.jpg"; |
|
459 | + $image_array[] = "$dummy_image_url/a5.jpg"; |
|
460 | + $image_array[] = "$dummy_image_url/a2.jpg"; |
|
461 | + $image_array[] = "$dummy_image_url/a7.jpg"; |
|
462 | + $image_array[] = "$dummy_image_url/a8.jpg"; |
|
463 | + $image_array[] = "$dummy_image_url/a6.jpg"; |
|
464 | + $image_array[] = "$dummy_image_url/a1.jpg"; |
|
465 | + $image_array[] = "$dummy_image_url/a9.jpg"; |
|
466 | + |
|
467 | + $post_info[] = array( |
|
468 | + "listing_type" => 'gd_place', |
|
469 | + "post_title" => 'Audacious Freedom', |
|
470 | + "post_desc" => 'Audacious Freedom, the major, new exhibit at the African American Museum in Philadelphia , explores the lives of people of African descent living in Philadelphia between 1776 and 1876. |
|
471 | 471 | |
472 | 472 | Discover how African Americans in Philadelphia lived and worked while helping to shape the young nation in its formative stages. |
473 | 473 | |
@@ -475,45 +475,45 @@ discard block |
||
475 | 475 | |
476 | 476 | The groundbreaking exhibit allows visitors to “walk the streets” of Historic Philadelphia using a large-scale map. Young children can join the action with Children´s Corner, which highlights the daily lives of children during that period. |
477 | 477 | ', |
478 | - "post_images" => $image_array, |
|
479 | - "post_category" => array('gd_placecategory' => array('Attractions')), |
|
480 | - "post_tags" => array('Tag1'), |
|
481 | - "geodir_video" => '', |
|
482 | - "geodir_timing" => 'Open today until 11.30 a.m., Sunday 1 pm to 7 pm', |
|
483 | - "geodir_contact" => '(777) 777-7777', |
|
484 | - "geodir_email" => '[email protected]', |
|
485 | - "geodir_website" => 'http://www.aampmuseum.org/', |
|
486 | - "geodir_twitter" => 'http://twitter.com/aampmuseum', |
|
487 | - "geodir_facebook" => 'http://facebook.com/aampmuseum', |
|
488 | - "post_dummy" => '1' |
|
489 | - ); |
|
490 | - |
|
491 | - ////post end/// |
|
492 | - /// Attractions ////post start 8/// |
|
493 | - |
|
494 | - |
|
495 | - break; |
|
496 | - case 9: |
|
497 | - $image_array = array(); |
|
498 | - $post_meta = array(); |
|
499 | - |
|
500 | - /// Attractions ////post start 9/// |
|
501 | - $image_array[] = "$dummy_image_url/a19.jpg"; |
|
502 | - $image_array[] = "$dummy_image_url/a20.jpg"; |
|
503 | - $image_array[] = "$dummy_image_url/a3.jpg"; |
|
504 | - $image_array[] = "$dummy_image_url/a4.jpg"; |
|
505 | - $image_array[] = "$dummy_image_url/a5.jpg"; |
|
506 | - $image_array[] = "$dummy_image_url/a2.jpg"; |
|
507 | - $image_array[] = "$dummy_image_url/a7.jpg"; |
|
508 | - $image_array[] = "$dummy_image_url/a8.jpg"; |
|
509 | - $image_array[] = "$dummy_image_url/a6.jpg"; |
|
510 | - $image_array[] = "$dummy_image_url/a1.jpg"; |
|
511 | - $image_array[] = "$dummy_image_url/a9.jpg"; |
|
512 | - |
|
513 | - $post_info[] = array( |
|
514 | - "listing_type" => 'gd_place', |
|
515 | - "post_title" => 'The Liberty Bell Center', |
|
516 | - "post_desc" => '<h3>The Experience </h3> |
|
478 | + "post_images" => $image_array, |
|
479 | + "post_category" => array('gd_placecategory' => array('Attractions')), |
|
480 | + "post_tags" => array('Tag1'), |
|
481 | + "geodir_video" => '', |
|
482 | + "geodir_timing" => 'Open today until 11.30 a.m., Sunday 1 pm to 7 pm', |
|
483 | + "geodir_contact" => '(777) 777-7777', |
|
484 | + "geodir_email" => '[email protected]', |
|
485 | + "geodir_website" => 'http://www.aampmuseum.org/', |
|
486 | + "geodir_twitter" => 'http://twitter.com/aampmuseum', |
|
487 | + "geodir_facebook" => 'http://facebook.com/aampmuseum', |
|
488 | + "post_dummy" => '1' |
|
489 | + ); |
|
490 | + |
|
491 | + ////post end/// |
|
492 | + /// Attractions ////post start 8/// |
|
493 | + |
|
494 | + |
|
495 | + break; |
|
496 | + case 9: |
|
497 | + $image_array = array(); |
|
498 | + $post_meta = array(); |
|
499 | + |
|
500 | + /// Attractions ////post start 9/// |
|
501 | + $image_array[] = "$dummy_image_url/a19.jpg"; |
|
502 | + $image_array[] = "$dummy_image_url/a20.jpg"; |
|
503 | + $image_array[] = "$dummy_image_url/a3.jpg"; |
|
504 | + $image_array[] = "$dummy_image_url/a4.jpg"; |
|
505 | + $image_array[] = "$dummy_image_url/a5.jpg"; |
|
506 | + $image_array[] = "$dummy_image_url/a2.jpg"; |
|
507 | + $image_array[] = "$dummy_image_url/a7.jpg"; |
|
508 | + $image_array[] = "$dummy_image_url/a8.jpg"; |
|
509 | + $image_array[] = "$dummy_image_url/a6.jpg"; |
|
510 | + $image_array[] = "$dummy_image_url/a1.jpg"; |
|
511 | + $image_array[] = "$dummy_image_url/a9.jpg"; |
|
512 | + |
|
513 | + $post_info[] = array( |
|
514 | + "listing_type" => 'gd_place', |
|
515 | + "post_title" => 'The Liberty Bell Center', |
|
516 | + "post_desc" => '<h3>The Experience </h3> |
|
517 | 517 | |
518 | 518 | The Liberty Bell has a new home, and it is as powerful and dramatic as the Bell itself. Throughout the expansive, light-filled Center, larger-than-life historic documents and graphic images explore the facts and the myths surrounding the Bell. |
519 | 519 | |
@@ -534,45 +534,45 @@ discard block |
||
534 | 534 | The Bell is suspended from what is believed to be its original yoke, made of American elm. |
535 | 535 | |
536 | 536 | The Liberty Bell weighs 2,080 pounds. The yoke weighs about 100 pounds.', |
537 | - "post_images" => $image_array, |
|
538 | - "post_category" => array('gd_placecategory' => array('Attractions', 'Feature')), |
|
539 | - "post_tags" => array(''), |
|
540 | - "geodir_video" => '', |
|
541 | - "geodir_timing" => 'The center is open year round, 9 a.m. – 5 p.m., with extended hours in the summer.', |
|
542 | - "geodir_contact" => '(777) 666-6666', |
|
543 | - "geodir_email" => '[email protected]', |
|
544 | - "geodir_website" => 'http://www.nps.gov/inde', |
|
545 | - "geodir_twitter" => 'http://twitter.com/nps', |
|
546 | - "geodir_facebook" => 'http://facebook.com/nps', |
|
547 | - "post_dummy" => '1' |
|
548 | - ); |
|
549 | - |
|
550 | - ////post end/// |
|
551 | - /// Attractions ////post start 9/// |
|
552 | - break; |
|
553 | - case 10: |
|
554 | - |
|
555 | - |
|
556 | - $image_array = array(); |
|
557 | - $post_meta = array(); |
|
558 | - |
|
559 | - /// Attractions ////post start 10/// |
|
560 | - $image_array[] = "$dummy_image_url/a19.jpg"; |
|
561 | - $image_array[] = "$dummy_image_url/a20.jpg"; |
|
562 | - $image_array[] = "$dummy_image_url/a3.jpg"; |
|
563 | - $image_array[] = "$dummy_image_url/a4.jpg"; |
|
564 | - $image_array[] = "$dummy_image_url/a5.jpg"; |
|
565 | - $image_array[] = "$dummy_image_url/a2.jpg"; |
|
566 | - $image_array[] = "$dummy_image_url/a7.jpg"; |
|
567 | - $image_array[] = "$dummy_image_url/a8.jpg"; |
|
568 | - $image_array[] = "$dummy_image_url/a6.jpg"; |
|
569 | - $image_array[] = "$dummy_image_url/a1.jpg"; |
|
570 | - $image_array[] = "$dummy_image_url/a9.jpg"; |
|
571 | - |
|
572 | - $post_info[] = array( |
|
573 | - "listing_type" => 'gd_place', |
|
574 | - "post_title" => 'Rittenhouse Square', |
|
575 | - "post_desc" => ' |
|
537 | + "post_images" => $image_array, |
|
538 | + "post_category" => array('gd_placecategory' => array('Attractions', 'Feature')), |
|
539 | + "post_tags" => array(''), |
|
540 | + "geodir_video" => '', |
|
541 | + "geodir_timing" => 'The center is open year round, 9 a.m. – 5 p.m., with extended hours in the summer.', |
|
542 | + "geodir_contact" => '(777) 666-6666', |
|
543 | + "geodir_email" => '[email protected]', |
|
544 | + "geodir_website" => 'http://www.nps.gov/inde', |
|
545 | + "geodir_twitter" => 'http://twitter.com/nps', |
|
546 | + "geodir_facebook" => 'http://facebook.com/nps', |
|
547 | + "post_dummy" => '1' |
|
548 | + ); |
|
549 | + |
|
550 | + ////post end/// |
|
551 | + /// Attractions ////post start 9/// |
|
552 | + break; |
|
553 | + case 10: |
|
554 | + |
|
555 | + |
|
556 | + $image_array = array(); |
|
557 | + $post_meta = array(); |
|
558 | + |
|
559 | + /// Attractions ////post start 10/// |
|
560 | + $image_array[] = "$dummy_image_url/a19.jpg"; |
|
561 | + $image_array[] = "$dummy_image_url/a20.jpg"; |
|
562 | + $image_array[] = "$dummy_image_url/a3.jpg"; |
|
563 | + $image_array[] = "$dummy_image_url/a4.jpg"; |
|
564 | + $image_array[] = "$dummy_image_url/a5.jpg"; |
|
565 | + $image_array[] = "$dummy_image_url/a2.jpg"; |
|
566 | + $image_array[] = "$dummy_image_url/a7.jpg"; |
|
567 | + $image_array[] = "$dummy_image_url/a8.jpg"; |
|
568 | + $image_array[] = "$dummy_image_url/a6.jpg"; |
|
569 | + $image_array[] = "$dummy_image_url/a1.jpg"; |
|
570 | + $image_array[] = "$dummy_image_url/a9.jpg"; |
|
571 | + |
|
572 | + $post_info[] = array( |
|
573 | + "listing_type" => 'gd_place', |
|
574 | + "post_title" => 'Rittenhouse Square', |
|
575 | + "post_desc" => ' |
|
576 | 576 | |
577 | 577 | Unlike the other squares, the early Southwest Square was never used as a burial ground, although it offered pasturage for local livestock and a convenient dumping spot for “night soil”. |
578 | 578 | <h3> History </h3> |
@@ -605,45 +605,45 @@ discard block |
||
605 | 605 | |
606 | 606 | Meanwhile, several more restaurants, bars and clubs have opened along the surrounding blocks in recent years, like Parc, Tria, Continental Midtown, Alfa, Walnut Room, and Twenty Manning just to name a few. |
607 | 607 | ', |
608 | - "post_images" => $image_array, |
|
609 | - "post_category" => array('gd_placecategory' => array('Attractions')), |
|
610 | - "post_tags" => array('Museum'), |
|
611 | - "geodir_video" => '', |
|
612 | - "geodir_timing" => 'The center is open year round, 9 a.m. – 5 p.m., with extended hours in the summer.', |
|
613 | - "geodir_contact" => '(777) 666-6666', |
|
614 | - "geodir_email" => '[email protected]', |
|
615 | - "geodir_website" => 'http://www.fairmountpark.org/rittenhousesquare.asp', |
|
616 | - "geodir_twitter" => 'http://twitter.com/fairmountpark', |
|
617 | - "geodir_facebook" => 'http://facebook.com/fairmountpark', |
|
618 | - "post_dummy" => '1' |
|
619 | - ); |
|
620 | - |
|
621 | - ////post end/// |
|
622 | - /// Attractions ////post start 10/// |
|
623 | - break; |
|
624 | - case 11: |
|
625 | - |
|
626 | - |
|
627 | - $image_array = array(); |
|
628 | - $post_meta = array(); |
|
629 | - |
|
630 | - /// Hotels ////post start 1/// |
|
631 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
632 | - $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
633 | - $image_array[] = "$dummy_image_url/hotels3.jpg"; |
|
634 | - $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
635 | - $image_array[] = "$dummy_image_url/hotels5.jpg"; |
|
636 | - $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
637 | - $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
638 | - $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
639 | - $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
640 | - $image_array[] = "$dummy_image_url/hotels10.jpg"; |
|
641 | - $image_array[] = "$dummy_image_url/hotels11.jpg"; |
|
642 | - |
|
643 | - $post_info[] = array( |
|
644 | - "listing_type" => 'gd_place', |
|
645 | - "post_title" => 'Loews Philadelphia Hotel', |
|
646 | - "post_desc" => ' |
|
608 | + "post_images" => $image_array, |
|
609 | + "post_category" => array('gd_placecategory' => array('Attractions')), |
|
610 | + "post_tags" => array('Museum'), |
|
611 | + "geodir_video" => '', |
|
612 | + "geodir_timing" => 'The center is open year round, 9 a.m. – 5 p.m., with extended hours in the summer.', |
|
613 | + "geodir_contact" => '(777) 666-6666', |
|
614 | + "geodir_email" => '[email protected]', |
|
615 | + "geodir_website" => 'http://www.fairmountpark.org/rittenhousesquare.asp', |
|
616 | + "geodir_twitter" => 'http://twitter.com/fairmountpark', |
|
617 | + "geodir_facebook" => 'http://facebook.com/fairmountpark', |
|
618 | + "post_dummy" => '1' |
|
619 | + ); |
|
620 | + |
|
621 | + ////post end/// |
|
622 | + /// Attractions ////post start 10/// |
|
623 | + break; |
|
624 | + case 11: |
|
625 | + |
|
626 | + |
|
627 | + $image_array = array(); |
|
628 | + $post_meta = array(); |
|
629 | + |
|
630 | + /// Hotels ////post start 1/// |
|
631 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
632 | + $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
633 | + $image_array[] = "$dummy_image_url/hotels3.jpg"; |
|
634 | + $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
635 | + $image_array[] = "$dummy_image_url/hotels5.jpg"; |
|
636 | + $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
637 | + $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
638 | + $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
639 | + $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
640 | + $image_array[] = "$dummy_image_url/hotels10.jpg"; |
|
641 | + $image_array[] = "$dummy_image_url/hotels11.jpg"; |
|
642 | + |
|
643 | + $post_info[] = array( |
|
644 | + "listing_type" => 'gd_place', |
|
645 | + "post_title" => 'Loews Philadelphia Hotel', |
|
646 | + "post_desc" => ' |
|
647 | 647 | |
648 | 648 | <h3>OVERVIEW </h3> |
649 | 649 | |
@@ -710,45 +710,45 @@ discard block |
||
710 | 710 | |
711 | 711 | SoleFood Restaurant is proud to be serving Starbucks. Come in and enjoy a fresh cup of coffee during your morning rush. The Coffee Bar also offer small breakfast items for your enjoyment. |
712 | 712 | ', |
713 | - "post_images" => $image_array, |
|
714 | - "post_category" => array('gd_placecategory' => array('Hotels', 'Feature')), |
|
715 | - "post_tags" => array(''), |
|
716 | - "geodir_video" => '', |
|
717 | - "geodir_timing" => 'Daily, 6:30 am – 12:00 pm', |
|
718 | - "geodir_contact" => '(111) 111-0000', |
|
719 | - "geodir_email" => '[email protected]', |
|
720 | - "geodir_website" => 'http://www.loewshotels.com/en/hotels/philadelphia-hotel/overview.aspx', |
|
721 | - "geodir_twitter" => 'http://twitter.com/loewshotels', |
|
722 | - "geodir_facebook" => 'http://facebook.com/loewshotels', |
|
723 | - "post_dummy" => '1' |
|
724 | - ); |
|
725 | - |
|
726 | - ////post end/// |
|
727 | - /// Hotels ////post start 1/// |
|
728 | - break; |
|
729 | - case 12: |
|
730 | - |
|
731 | - |
|
732 | - $image_array = array(); |
|
733 | - $post_meta = array(); |
|
734 | - |
|
735 | - /// Hotels ////post start 2/// |
|
736 | - $image_array[] = "$dummy_image_url/hotels5.jpg"; |
|
737 | - $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
738 | - $image_array[] = "$dummy_image_url/hotels3.jpg"; |
|
739 | - $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
740 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
741 | - $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
742 | - $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
743 | - $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
744 | - $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
745 | - $image_array[] = "$dummy_image_url/hotels10.jpg"; |
|
746 | - $image_array[] = "$dummy_image_url/hotels11.jpg"; |
|
747 | - |
|
748 | - $post_info[] = array( |
|
749 | - "listing_type" => 'gd_place', |
|
750 | - "post_title" => 'Embassy Suites Philadelphia', |
|
751 | - "post_desc" => ' |
|
713 | + "post_images" => $image_array, |
|
714 | + "post_category" => array('gd_placecategory' => array('Hotels', 'Feature')), |
|
715 | + "post_tags" => array(''), |
|
716 | + "geodir_video" => '', |
|
717 | + "geodir_timing" => 'Daily, 6:30 am – 12:00 pm', |
|
718 | + "geodir_contact" => '(111) 111-0000', |
|
719 | + "geodir_email" => '[email protected]', |
|
720 | + "geodir_website" => 'http://www.loewshotels.com/en/hotels/philadelphia-hotel/overview.aspx', |
|
721 | + "geodir_twitter" => 'http://twitter.com/loewshotels', |
|
722 | + "geodir_facebook" => 'http://facebook.com/loewshotels', |
|
723 | + "post_dummy" => '1' |
|
724 | + ); |
|
725 | + |
|
726 | + ////post end/// |
|
727 | + /// Hotels ////post start 1/// |
|
728 | + break; |
|
729 | + case 12: |
|
730 | + |
|
731 | + |
|
732 | + $image_array = array(); |
|
733 | + $post_meta = array(); |
|
734 | + |
|
735 | + /// Hotels ////post start 2/// |
|
736 | + $image_array[] = "$dummy_image_url/hotels5.jpg"; |
|
737 | + $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
738 | + $image_array[] = "$dummy_image_url/hotels3.jpg"; |
|
739 | + $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
740 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
741 | + $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
742 | + $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
743 | + $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
744 | + $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
745 | + $image_array[] = "$dummy_image_url/hotels10.jpg"; |
|
746 | + $image_array[] = "$dummy_image_url/hotels11.jpg"; |
|
747 | + |
|
748 | + $post_info[] = array( |
|
749 | + "listing_type" => 'gd_place', |
|
750 | + "post_title" => 'Embassy Suites Philadelphia', |
|
751 | + "post_desc" => ' |
|
752 | 752 | The newly renovated Embassy Suites Philadelphia – Center City hotel is conveniently situated in the heart of downtown Philadelphia, Pennsylvania and Philadelphia´s Center City business district. This hotel in Philadelphia is located only eight miles from Philadelphia International Airport and just minutes from top Philadelphia attractions, including: |
753 | 753 | |
754 | 754 | Philadelphia Museum of Art |
@@ -764,45 +764,45 @@ discard block |
||
764 | 764 | |
765 | 765 | A delicious, complimentary cooked-to-order breakfast is offered each morning, and a hotel Manager´s Reception every night – featuring complimentary refreshments and great company. |
766 | 766 | ', |
767 | - "post_images" => $image_array, |
|
768 | - "post_category" => array('gd_placecategory' => array('Hotels')), |
|
769 | - "post_tags" => array(''), |
|
770 | - "geodir_video" => '', |
|
771 | - "geodir_timing" => 'Daily, 10:30 am – 10 pm', |
|
772 | - "geodir_contact" => '(111) 111-0000', |
|
773 | - "geodir_email" => '[email protected]', |
|
774 | - "geodir_website" => 'http://embassysuites1.hilton.com/en_US/es/hotel/PHLDTES-Embassy-Suites-Philadelphia-Center-City-Pennsylvania/index.do', |
|
775 | - "geodir_twitter" => 'http://twitter.com/embassysuites1', |
|
776 | - "geodir_facebook" => 'http://facebook.com/embassysuites1', |
|
777 | - "post_dummy" => '1' |
|
778 | - ); |
|
779 | - |
|
780 | - ////post end/// |
|
781 | - /// Hotels ////post start 2/// |
|
782 | - |
|
783 | - break; |
|
784 | - case 13: |
|
785 | - |
|
786 | - $image_array = array(); |
|
787 | - $post_meta = array(); |
|
788 | - |
|
789 | - /// Hotels ////post start 3/// |
|
790 | - $image_array[] = "$dummy_image_url/hotels10.jpg"; |
|
791 | - $image_array[] = "$dummy_image_url/hotels11.jpg"; |
|
792 | - $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
793 | - $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
794 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
795 | - $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
796 | - $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
797 | - $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
798 | - $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
799 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
800 | - $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
801 | - |
|
802 | - $post_info[] = array( |
|
803 | - "listing_type" => 'gd_place', |
|
804 | - "post_title" => 'Doubletree Hotel Philadelphia', |
|
805 | - "post_desc" => ' |
|
767 | + "post_images" => $image_array, |
|
768 | + "post_category" => array('gd_placecategory' => array('Hotels')), |
|
769 | + "post_tags" => array(''), |
|
770 | + "geodir_video" => '', |
|
771 | + "geodir_timing" => 'Daily, 10:30 am – 10 pm', |
|
772 | + "geodir_contact" => '(111) 111-0000', |
|
773 | + "geodir_email" => '[email protected]', |
|
774 | + "geodir_website" => 'http://embassysuites1.hilton.com/en_US/es/hotel/PHLDTES-Embassy-Suites-Philadelphia-Center-City-Pennsylvania/index.do', |
|
775 | + "geodir_twitter" => 'http://twitter.com/embassysuites1', |
|
776 | + "geodir_facebook" => 'http://facebook.com/embassysuites1', |
|
777 | + "post_dummy" => '1' |
|
778 | + ); |
|
779 | + |
|
780 | + ////post end/// |
|
781 | + /// Hotels ////post start 2/// |
|
782 | + |
|
783 | + break; |
|
784 | + case 13: |
|
785 | + |
|
786 | + $image_array = array(); |
|
787 | + $post_meta = array(); |
|
788 | + |
|
789 | + /// Hotels ////post start 3/// |
|
790 | + $image_array[] = "$dummy_image_url/hotels10.jpg"; |
|
791 | + $image_array[] = "$dummy_image_url/hotels11.jpg"; |
|
792 | + $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
793 | + $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
794 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
795 | + $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
796 | + $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
797 | + $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
798 | + $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
799 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
800 | + $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
801 | + |
|
802 | + $post_info[] = array( |
|
803 | + "listing_type" => 'gd_place', |
|
804 | + "post_title" => 'Doubletree Hotel Philadelphia', |
|
805 | + "post_desc" => ' |
|
806 | 806 | With 434 rooms, the Doubletree Hotel is a great option for your upcoming stay in Philadelphia. |
807 | 807 | |
808 | 808 | <h3>Location </h3> |
@@ -832,47 +832,47 @@ discard block |
||
832 | 832 | Stop in the restaurant - which serves lunch and dinner daily - for a drink and some light fare. With its location right on Broad Street, you´re close to everything you could ever want in a night on the town. |
833 | 833 | ', |
834 | 834 | |
835 | - "post_images" => $image_array, |
|
836 | - |
|
837 | - "post_category" => array('gd_placecategory' => array('Hotels')), |
|
838 | - "post_tags" => array(''), |
|
839 | - "geodir_video" => '', |
|
840 | - "geodir_timing" => 'Daily, 10:30 am – 10 pm', |
|
841 | - "geodir_contact" => '(111) 111-0000', |
|
842 | - "geodir_email" => '[email protected]', |
|
843 | - "geodir_website" => 'http://doubletree1.hilton.com/en_US/dt/hotel/PHLBLDT-Doubletree-Hotel-Philadelphia-Pennsylvania/index.do', |
|
844 | - "geodir_twitter" => 'http://twitter.com/doubletree1', |
|
845 | - "geodir_facebook" => 'http://facebook.com/doubletree1', |
|
846 | - "post_dummy" => '1' |
|
847 | - ); |
|
848 | - |
|
849 | - ////post end/// |
|
850 | - /// Hotels ////post start 3/// |
|
851 | - |
|
852 | - break; |
|
853 | - case 14: |
|
854 | - |
|
855 | - |
|
856 | - $image_array = array(); |
|
857 | - $post_meta = array(); |
|
858 | - |
|
859 | - /// Hotels ////post start 4/// |
|
860 | - $image_array[] = "$dummy_image_url/hotels15.jpg"; |
|
861 | - $image_array[] = "$dummy_image_url/hotels16.jpg"; |
|
862 | - $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
863 | - $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
864 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
865 | - $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
866 | - $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
867 | - $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
868 | - $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
869 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
870 | - $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
871 | - |
|
872 | - $post_info[] = array( |
|
873 | - "listing_type" => 'gd_place', |
|
874 | - "post_title" => 'Philadelphia Marriott Downtown', |
|
875 | - "post_desc" => ' |
|
835 | + "post_images" => $image_array, |
|
836 | + |
|
837 | + "post_category" => array('gd_placecategory' => array('Hotels')), |
|
838 | + "post_tags" => array(''), |
|
839 | + "geodir_video" => '', |
|
840 | + "geodir_timing" => 'Daily, 10:30 am – 10 pm', |
|
841 | + "geodir_contact" => '(111) 111-0000', |
|
842 | + "geodir_email" => '[email protected]', |
|
843 | + "geodir_website" => 'http://doubletree1.hilton.com/en_US/dt/hotel/PHLBLDT-Doubletree-Hotel-Philadelphia-Pennsylvania/index.do', |
|
844 | + "geodir_twitter" => 'http://twitter.com/doubletree1', |
|
845 | + "geodir_facebook" => 'http://facebook.com/doubletree1', |
|
846 | + "post_dummy" => '1' |
|
847 | + ); |
|
848 | + |
|
849 | + ////post end/// |
|
850 | + /// Hotels ////post start 3/// |
|
851 | + |
|
852 | + break; |
|
853 | + case 14: |
|
854 | + |
|
855 | + |
|
856 | + $image_array = array(); |
|
857 | + $post_meta = array(); |
|
858 | + |
|
859 | + /// Hotels ////post start 4/// |
|
860 | + $image_array[] = "$dummy_image_url/hotels15.jpg"; |
|
861 | + $image_array[] = "$dummy_image_url/hotels16.jpg"; |
|
862 | + $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
863 | + $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
864 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
865 | + $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
866 | + $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
867 | + $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
868 | + $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
869 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
870 | + $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
871 | + |
|
872 | + $post_info[] = array( |
|
873 | + "listing_type" => 'gd_place', |
|
874 | + "post_title" => 'Philadelphia Marriott Downtown', |
|
875 | + "post_desc" => ' |
|
876 | 876 | Get ready to stay and play at the new aloft Philadelphia Airport! |
877 | 877 | |
878 | 878 | This incredibly modern hotel is located just five minutes from Philadelphia International Airport, offering a great convenience to travelers looking for fresh and fun accommodations. |
@@ -899,45 +899,45 @@ discard block |
||
899 | 899 | |
900 | 900 | Aahh…breathe deep at Aloft. This hotel is smoke-free. |
901 | 901 | ', |
902 | - "post_images" => $image_array, |
|
903 | - "post_category" => array('gd_placecategory' => array('Hotels', 'Feature')), |
|
904 | - "post_tags" => array(''), |
|
905 | - "geodir_video" => '', |
|
906 | - "geodir_timing" => '24 Hours', |
|
907 | - "geodir_contact" => '(123) 111-2222', |
|
908 | - "geodir_email" => '[email protected]', |
|
909 | - "geodir_website" => 'http://www.marriott.com/hotels/travel/phldt-philadelphia-marriott-downtown/', |
|
910 | - "geodir_twitter" => 'http://twitter.com/marriott', |
|
911 | - "geodir_facebook" => 'http://facebook.com/marriott', |
|
912 | - "post_dummy" => '1' |
|
913 | - ); |
|
914 | - |
|
915 | - ////post end/// |
|
916 | - /// Hotels ////post start 4/// |
|
917 | - break; |
|
918 | - case 15: |
|
919 | - |
|
920 | - |
|
921 | - $image_array = array(); |
|
922 | - $post_meta = array(); |
|
923 | - |
|
924 | - /// Hotels ////post start 5/// |
|
925 | - $image_array[] = "$dummy_image_url/hotels10.jpg"; |
|
926 | - $image_array[] = "$dummy_image_url/hotels16.jpg"; |
|
927 | - $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
928 | - $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
929 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
930 | - $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
931 | - $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
932 | - $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
933 | - $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
934 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
935 | - $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
936 | - |
|
937 | - $post_info[] = array( |
|
938 | - "listing_type" => 'gd_place', |
|
939 | - "post_title" => 'Hilton Inn at Penn', |
|
940 | - "post_desc" => ' |
|
902 | + "post_images" => $image_array, |
|
903 | + "post_category" => array('gd_placecategory' => array('Hotels', 'Feature')), |
|
904 | + "post_tags" => array(''), |
|
905 | + "geodir_video" => '', |
|
906 | + "geodir_timing" => '24 Hours', |
|
907 | + "geodir_contact" => '(123) 111-2222', |
|
908 | + "geodir_email" => '[email protected]', |
|
909 | + "geodir_website" => 'http://www.marriott.com/hotels/travel/phldt-philadelphia-marriott-downtown/', |
|
910 | + "geodir_twitter" => 'http://twitter.com/marriott', |
|
911 | + "geodir_facebook" => 'http://facebook.com/marriott', |
|
912 | + "post_dummy" => '1' |
|
913 | + ); |
|
914 | + |
|
915 | + ////post end/// |
|
916 | + /// Hotels ////post start 4/// |
|
917 | + break; |
|
918 | + case 15: |
|
919 | + |
|
920 | + |
|
921 | + $image_array = array(); |
|
922 | + $post_meta = array(); |
|
923 | + |
|
924 | + /// Hotels ////post start 5/// |
|
925 | + $image_array[] = "$dummy_image_url/hotels10.jpg"; |
|
926 | + $image_array[] = "$dummy_image_url/hotels16.jpg"; |
|
927 | + $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
928 | + $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
929 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
930 | + $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
931 | + $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
932 | + $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
933 | + $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
934 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
935 | + $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
936 | + |
|
937 | + $post_info[] = array( |
|
938 | + "listing_type" => 'gd_place', |
|
939 | + "post_title" => 'Hilton Inn at Penn', |
|
940 | + "post_desc" => ' |
|
941 | 941 | Located in the heart of Penn´s campus in the beautiful University City neighborhood of Philadelphia, The Hilton Inn at Penn is a great choice for accommodations during your upcoming visit to Philadelphia. |
942 | 942 | |
943 | 943 | The location puts you right in the middle of the prestigious University of Pennsylvania and its many nearby educational, medical and corporate centers. And Center City Philadelphia is only a short cab ride away. So if you want to get out and explore the city, you are set. |
@@ -953,45 +953,45 @@ discard block |
||
953 | 953 | |
954 | 954 | The pasta is handmade right in front of you and then dished up along side delectable entrées such as grilled veal tenderloin and honey glazed sea scallops. And the wine bar offers more than 30 varieties by the glass and more than 100 by the bottle. |
955 | 955 | ', |
956 | - "post_images" => $image_array, |
|
957 | - "post_category" => array('gd_placecategory' => array('Hotels', 'Food Nightlife')), |
|
958 | - "post_tags" => array(''), |
|
959 | - "geodir_video" => '', |
|
960 | - "geodir_timing" => 'Daily : 11 am to 11 pm', |
|
961 | - "geodir_contact" => '(888) 888-8888', |
|
962 | - "geodir_email" => '[email protected]', |
|
963 | - "geodir_website" => 'http://www.theinnatpenn.com/', |
|
964 | - "geodir_twitter" => 'http://twitter.com/theinnatpenn', |
|
965 | - "geodir_facebook" => 'http://facebook.com/theinnatpenn', |
|
966 | - "post_dummy" => '1' |
|
967 | - ); |
|
968 | - |
|
969 | - ////post end/// |
|
970 | - /// Hotels ////post start 5/// |
|
971 | - break; |
|
972 | - case 16: |
|
973 | - |
|
974 | - |
|
975 | - $image_array = array(); |
|
976 | - $post_meta = array(); |
|
977 | - |
|
978 | - /// Hotels ////post start 6/// |
|
979 | - $image_array[] = "$dummy_image_url/hotels17.jpg"; |
|
980 | - $image_array[] = "$dummy_image_url/hotels18.jpg"; |
|
981 | - $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
982 | - $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
983 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
984 | - $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
985 | - $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
986 | - $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
987 | - $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
988 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
989 | - $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
990 | - |
|
991 | - $post_info[] = array( |
|
992 | - "listing_type" => 'gd_place', |
|
993 | - "post_title" => 'Courtyard Philadelphia Downtown', |
|
994 | - "post_desc" => ' |
|
956 | + "post_images" => $image_array, |
|
957 | + "post_category" => array('gd_placecategory' => array('Hotels', 'Food Nightlife')), |
|
958 | + "post_tags" => array(''), |
|
959 | + "geodir_video" => '', |
|
960 | + "geodir_timing" => 'Daily : 11 am to 11 pm', |
|
961 | + "geodir_contact" => '(888) 888-8888', |
|
962 | + "geodir_email" => '[email protected]', |
|
963 | + "geodir_website" => 'http://www.theinnatpenn.com/', |
|
964 | + "geodir_twitter" => 'http://twitter.com/theinnatpenn', |
|
965 | + "geodir_facebook" => 'http://facebook.com/theinnatpenn', |
|
966 | + "post_dummy" => '1' |
|
967 | + ); |
|
968 | + |
|
969 | + ////post end/// |
|
970 | + /// Hotels ////post start 5/// |
|
971 | + break; |
|
972 | + case 16: |
|
973 | + |
|
974 | + |
|
975 | + $image_array = array(); |
|
976 | + $post_meta = array(); |
|
977 | + |
|
978 | + /// Hotels ////post start 6/// |
|
979 | + $image_array[] = "$dummy_image_url/hotels17.jpg"; |
|
980 | + $image_array[] = "$dummy_image_url/hotels18.jpg"; |
|
981 | + $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
982 | + $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
983 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
984 | + $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
985 | + $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
986 | + $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
987 | + $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
988 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
989 | + $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
990 | + |
|
991 | + $post_info[] = array( |
|
992 | + "listing_type" => 'gd_place', |
|
993 | + "post_title" => 'Courtyard Philadelphia Downtown', |
|
994 | + "post_desc" => ' |
|
995 | 995 | <h3>Overview </h3> |
996 | 996 | |
997 | 997 | The Philadelphia Downtown Courtyard opened it´s doors after a grand $75 million restoration, recapturing the grandeur of its 1926 origins while incorporating state of the art systems throughout. |
@@ -1021,45 +1021,45 @@ discard block |
||
1021 | 1021 | |
1022 | 1022 | Recently featured on WE TV´s “My Fair Wedding”, the Courtyard Marriott Philadelphia is one of the city´s leading venues for corporate and social affairs with over 10,000 sq ft of flexible meeting space, including two Grand Ballrooms each with over 3,000 square feet accommodating up to 250 people. In addition, the hotel has a total of 11 meeting rooms making it an ideal home for all occasions. The hotel boasts an experienced full-service Event and Culinary Teams, ready to take care of all the details and ensure your event is not only a success, but a lasting memory. |
1023 | 1023 | ', |
1024 | - "post_images" => $image_array, |
|
1025 | - "post_category" => array('gd_placecategory' => array('Hotels', 'Food Nightlife')), |
|
1026 | - "post_tags" => array(''), |
|
1027 | - "geodir_video" => '', |
|
1028 | - "geodir_timing" => 'Daily : 11 am to 11 pm', |
|
1029 | - "geodir_contact" => '(888) 888-8888', |
|
1030 | - "geodir_email" => '[email protected]', |
|
1031 | - "geodir_website" => 'http://www.theinnatpenn.com/', |
|
1032 | - "geodir_twitter" => 'http://twitter.com/theinnatpenn', |
|
1033 | - "geodir_facebook" => 'http://facebook.com/theinnatpenn', |
|
1034 | - "post_dummy" => '1' |
|
1035 | - ); |
|
1036 | - |
|
1037 | - ////post end/// |
|
1038 | - /// Hotels ////post start 6/// |
|
1039 | - |
|
1040 | - break; |
|
1041 | - case 17: |
|
1042 | - |
|
1043 | - $image_array = array(); |
|
1044 | - $post_meta = array(); |
|
1045 | - |
|
1046 | - /// Hotels ////post start 7/// |
|
1047 | - $image_array[] = "$dummy_image_url/hotels11.jpg"; |
|
1048 | - $image_array[] = "$dummy_image_url/hotels10.jpg"; |
|
1049 | - $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
1050 | - $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
1051 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
1052 | - $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
1053 | - $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
1054 | - $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
1055 | - $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
1056 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
1057 | - $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
1058 | - |
|
1059 | - $post_info[] = array( |
|
1060 | - "listing_type" => 'gd_place', |
|
1061 | - "post_title" => 'Four Seasons Philadelphia', |
|
1062 | - "post_desc" => ' |
|
1024 | + "post_images" => $image_array, |
|
1025 | + "post_category" => array('gd_placecategory' => array('Hotels', 'Food Nightlife')), |
|
1026 | + "post_tags" => array(''), |
|
1027 | + "geodir_video" => '', |
|
1028 | + "geodir_timing" => 'Daily : 11 am to 11 pm', |
|
1029 | + "geodir_contact" => '(888) 888-8888', |
|
1030 | + "geodir_email" => '[email protected]', |
|
1031 | + "geodir_website" => 'http://www.theinnatpenn.com/', |
|
1032 | + "geodir_twitter" => 'http://twitter.com/theinnatpenn', |
|
1033 | + "geodir_facebook" => 'http://facebook.com/theinnatpenn', |
|
1034 | + "post_dummy" => '1' |
|
1035 | + ); |
|
1036 | + |
|
1037 | + ////post end/// |
|
1038 | + /// Hotels ////post start 6/// |
|
1039 | + |
|
1040 | + break; |
|
1041 | + case 17: |
|
1042 | + |
|
1043 | + $image_array = array(); |
|
1044 | + $post_meta = array(); |
|
1045 | + |
|
1046 | + /// Hotels ////post start 7/// |
|
1047 | + $image_array[] = "$dummy_image_url/hotels11.jpg"; |
|
1048 | + $image_array[] = "$dummy_image_url/hotels10.jpg"; |
|
1049 | + $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
1050 | + $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
1051 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
1052 | + $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
1053 | + $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
1054 | + $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
1055 | + $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
1056 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
1057 | + $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
1058 | + |
|
1059 | + $post_info[] = array( |
|
1060 | + "listing_type" => 'gd_place', |
|
1061 | + "post_title" => 'Four Seasons Philadelphia', |
|
1062 | + "post_desc" => ' |
|
1063 | 1063 | <h3>Overview </h3> |
1064 | 1064 | |
1065 | 1065 | The Philadelphia Downtown Courtyard opened it´s doors after a grand $75 million restoration, recapturing the grandeur of its 1926 origins while incorporating state of the art systems throughout. |
@@ -1089,45 +1089,45 @@ discard block |
||
1089 | 1089 | |
1090 | 1090 | Recently featured on WE TV´s “My Fair Wedding”, the Courtyard Marriott Philadelphia is one of the city´s leading venues for corporate and social affairs with over 10,000 sq ft of flexible meeting space, including two Grand Ballrooms each with over 3,000 square feet accommodating up to 250 people. In addition, the hotel has a total of 11 meeting rooms making it an ideal home for all occasions. The hotel boasts an experienced full-service Event and Culinary Teams, ready to take care of all the details and ensure your event is not only a success, but a lasting memory. |
1091 | 1091 | ', |
1092 | - "post_images" => $image_array, |
|
1093 | - "post_category" => array('gd_placecategory' => array('Hotels', 'Food Nightlife')), |
|
1094 | - "post_tags" => array(''), |
|
1095 | - "geodir_video" => '', |
|
1096 | - "geodir_timing" => 'Daily : 11 am to 11 pm', |
|
1097 | - "geodir_contact" => '(143) 888-8888', |
|
1098 | - "geodir_email" => '[email protected]', |
|
1099 | - "geodir_website" => 'http://www.fourseasons.com/philadelphia/', |
|
1100 | - "geodir_twitter" => 'http://twitter.com/fourseasons', |
|
1101 | - "geodir_facebook" => 'http://facebook.com/fourseasons', |
|
1102 | - "post_dummy" => '1' |
|
1103 | - ); |
|
1104 | - |
|
1105 | - ////post end/// |
|
1106 | - /// Hotels ////post start 7/// |
|
1107 | - break; |
|
1108 | - case 18: |
|
1109 | - |
|
1110 | - |
|
1111 | - $image_array = array(); |
|
1112 | - $post_meta = array(); |
|
1113 | - |
|
1114 | - /// Hotels ////post start 8/// |
|
1115 | - $image_array[] = "$dummy_image_url/hotels11.jpg"; |
|
1116 | - $image_array[] = "$dummy_image_url/hotels10.jpg"; |
|
1117 | - $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
1118 | - $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
1119 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
1120 | - $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
1121 | - $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
1122 | - $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
1123 | - $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
1124 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
1125 | - $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
1126 | - |
|
1127 | - $post_info[] = array( |
|
1128 | - "listing_type" => 'gd_place', |
|
1129 | - "post_title" => 'Alexander Inn', |
|
1130 | - "post_desc" => ' |
|
1092 | + "post_images" => $image_array, |
|
1093 | + "post_category" => array('gd_placecategory' => array('Hotels', 'Food Nightlife')), |
|
1094 | + "post_tags" => array(''), |
|
1095 | + "geodir_video" => '', |
|
1096 | + "geodir_timing" => 'Daily : 11 am to 11 pm', |
|
1097 | + "geodir_contact" => '(143) 888-8888', |
|
1098 | + "geodir_email" => '[email protected]', |
|
1099 | + "geodir_website" => 'http://www.fourseasons.com/philadelphia/', |
|
1100 | + "geodir_twitter" => 'http://twitter.com/fourseasons', |
|
1101 | + "geodir_facebook" => 'http://facebook.com/fourseasons', |
|
1102 | + "post_dummy" => '1' |
|
1103 | + ); |
|
1104 | + |
|
1105 | + ////post end/// |
|
1106 | + /// Hotels ////post start 7/// |
|
1107 | + break; |
|
1108 | + case 18: |
|
1109 | + |
|
1110 | + |
|
1111 | + $image_array = array(); |
|
1112 | + $post_meta = array(); |
|
1113 | + |
|
1114 | + /// Hotels ////post start 8/// |
|
1115 | + $image_array[] = "$dummy_image_url/hotels11.jpg"; |
|
1116 | + $image_array[] = "$dummy_image_url/hotels10.jpg"; |
|
1117 | + $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
1118 | + $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
1119 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
1120 | + $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
1121 | + $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
1122 | + $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
1123 | + $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
1124 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
1125 | + $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
1126 | + |
|
1127 | + $post_info[] = array( |
|
1128 | + "listing_type" => 'gd_place', |
|
1129 | + "post_title" => 'Alexander Inn', |
|
1130 | + "post_desc" => ' |
|
1131 | 1131 | The Alexander Inn is one of Philadelphia´s most popular and reasonably priced small hotels. |
1132 | 1132 | |
1133 | 1133 | Conveniently located in the heart of the Washington Square West neighborhood in Center City Philadelphia, the Alexander Inn is a great place to base your stay in Philadelphia. |
@@ -1136,45 +1136,45 @@ discard block |
||
1136 | 1136 | |
1137 | 1137 | Rooms are also fitted with DirecTV (including many complimentary channels like CNN, ESPN, eight movie channels, etc.) and telephones with modem ports and direct dial. You will also have access to the hotel´s free 24-hour fitness and e-mail centers. |
1138 | 1138 | ', |
1139 | - "post_images" => $image_array, |
|
1140 | - "post_category" => array('gd_placecategory' => array('Hotels')), |
|
1141 | - "post_tags" => array(''), |
|
1142 | - "geodir_video" => '', |
|
1143 | - "geodir_timing" => 'Daily : 11 am to 11 pm', |
|
1144 | - "geodir_contact" => '(143) 888-8888', |
|
1145 | - "geodir_email" => '[email protected]', |
|
1146 | - "geodir_website" => 'http://www.alexanderinn.com/', |
|
1147 | - "geodir_twitter" => 'http://twitter.com/alexanderinn', |
|
1148 | - "geodir_facebook" => 'http://facebook.com/alexanderinn', |
|
1149 | - "post_dummy" => '1' |
|
1150 | - ); |
|
1151 | - |
|
1152 | - ////post end/// |
|
1153 | - /// Hotels ////post start 8/// |
|
1154 | - break; |
|
1155 | - case 19: |
|
1156 | - |
|
1157 | - |
|
1158 | - $image_array = array(); |
|
1159 | - $post_meta = array(); |
|
1160 | - |
|
1161 | - /// Hotels ////post start 9/// |
|
1162 | - $image_array[] = "$dummy_image_url/hotels5.jpg"; |
|
1163 | - $image_array[] = "$dummy_image_url/hotels10.jpg"; |
|
1164 | - $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
1165 | - $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
1166 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
1167 | - $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
1168 | - $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
1169 | - $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
1170 | - $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
1171 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
1172 | - $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
1173 | - |
|
1174 | - $post_info[] = array( |
|
1175 | - "listing_type" => 'gd_place', |
|
1176 | - "post_title" => 'Best Western Center City Hotel', |
|
1177 | - "post_desc" => ' |
|
1139 | + "post_images" => $image_array, |
|
1140 | + "post_category" => array('gd_placecategory' => array('Hotels')), |
|
1141 | + "post_tags" => array(''), |
|
1142 | + "geodir_video" => '', |
|
1143 | + "geodir_timing" => 'Daily : 11 am to 11 pm', |
|
1144 | + "geodir_contact" => '(143) 888-8888', |
|
1145 | + "geodir_email" => '[email protected]', |
|
1146 | + "geodir_website" => 'http://www.alexanderinn.com/', |
|
1147 | + "geodir_twitter" => 'http://twitter.com/alexanderinn', |
|
1148 | + "geodir_facebook" => 'http://facebook.com/alexanderinn', |
|
1149 | + "post_dummy" => '1' |
|
1150 | + ); |
|
1151 | + |
|
1152 | + ////post end/// |
|
1153 | + /// Hotels ////post start 8/// |
|
1154 | + break; |
|
1155 | + case 19: |
|
1156 | + |
|
1157 | + |
|
1158 | + $image_array = array(); |
|
1159 | + $post_meta = array(); |
|
1160 | + |
|
1161 | + /// Hotels ////post start 9/// |
|
1162 | + $image_array[] = "$dummy_image_url/hotels5.jpg"; |
|
1163 | + $image_array[] = "$dummy_image_url/hotels10.jpg"; |
|
1164 | + $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
1165 | + $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
1166 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
1167 | + $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
1168 | + $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
1169 | + $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
1170 | + $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
1171 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
1172 | + $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
1173 | + |
|
1174 | + $post_info[] = array( |
|
1175 | + "listing_type" => 'gd_place', |
|
1176 | + "post_title" => 'Best Western Center City Hotel', |
|
1177 | + "post_desc" => ' |
|
1178 | 1178 | The Alexander Inn is one of Philadelphia´s most popular and reasonably priced small hotels. |
1179 | 1179 | |
1180 | 1180 | Conveniently located in the heart of the Washington Square West neighborhood in Center City Philadelphia, the Alexander Inn is a great place to base your stay in Philadelphia. |
@@ -1183,91 +1183,91 @@ discard block |
||
1183 | 1183 | |
1184 | 1184 | Rooms are also fitted with DirecTV (including many complimentary channels like CNN, ESPN, eight movie channels, etc.) and telephones with modem ports and direct dial. You will also have access to the hotel´s free 24-hour fitness and e-mail centers. |
1185 | 1185 | ', |
1186 | - "post_images" => $image_array, |
|
1187 | - "post_category" => array('gd_placecategory' => array('Hotels', 'Food Nightlife')), |
|
1188 | - "post_tags" => array(''), |
|
1189 | - "geodir_video" => '', |
|
1190 | - "geodir_timing" => 'Daily : 10 am to 11 pm', |
|
1191 | - "geodir_contact" => '(243) 222-12344', |
|
1192 | - "geodir_email" => '[email protected]', |
|
1193 | - "geodir_website" => 'http://book.bestwestern.com/bestwestern/productInfo.do?propertyCode=39087', |
|
1194 | - "geodir_twitter" => 'http://twitter.com/bestwestern', |
|
1195 | - "geodir_facebook" => 'http://facebook.com/bestwestern', |
|
1196 | - "post_dummy" => '1' |
|
1197 | - ); |
|
1198 | - |
|
1199 | - ////post end/// |
|
1200 | - /// Hotels ////post start 9/// |
|
1201 | - break; |
|
1202 | - case 20: |
|
1203 | - |
|
1204 | - |
|
1205 | - $image_array = array(); |
|
1206 | - $post_meta = array(); |
|
1207 | - |
|
1208 | - /// Hotels ////post start 10/// |
|
1209 | - $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
1210 | - $image_array[] = "$dummy_image_url/hotels10.jpg"; |
|
1211 | - $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
1212 | - $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
1213 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
1214 | - $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
1215 | - $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
1216 | - $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
1217 | - $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
1218 | - $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
1219 | - $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
1220 | - |
|
1221 | - $post_info[] = array( |
|
1222 | - "listing_type" => 'gd_place', |
|
1223 | - "post_title" => 'Chestnut Hill Hotel', |
|
1224 | - "post_desc" => ' |
|
1186 | + "post_images" => $image_array, |
|
1187 | + "post_category" => array('gd_placecategory' => array('Hotels', 'Food Nightlife')), |
|
1188 | + "post_tags" => array(''), |
|
1189 | + "geodir_video" => '', |
|
1190 | + "geodir_timing" => 'Daily : 10 am to 11 pm', |
|
1191 | + "geodir_contact" => '(243) 222-12344', |
|
1192 | + "geodir_email" => '[email protected]', |
|
1193 | + "geodir_website" => 'http://book.bestwestern.com/bestwestern/productInfo.do?propertyCode=39087', |
|
1194 | + "geodir_twitter" => 'http://twitter.com/bestwestern', |
|
1195 | + "geodir_facebook" => 'http://facebook.com/bestwestern', |
|
1196 | + "post_dummy" => '1' |
|
1197 | + ); |
|
1198 | + |
|
1199 | + ////post end/// |
|
1200 | + /// Hotels ////post start 9/// |
|
1201 | + break; |
|
1202 | + case 20: |
|
1203 | + |
|
1204 | + |
|
1205 | + $image_array = array(); |
|
1206 | + $post_meta = array(); |
|
1207 | + |
|
1208 | + /// Hotels ////post start 10/// |
|
1209 | + $image_array[] = "$dummy_image_url/hotels7.jpg"; |
|
1210 | + $image_array[] = "$dummy_image_url/hotels10.jpg"; |
|
1211 | + $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
1212 | + $image_array[] = "$dummy_image_url/hotels4.jpg"; |
|
1213 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
1214 | + $image_array[] = "$dummy_image_url/hotels6.jpg"; |
|
1215 | + $image_array[] = "$dummy_image_url/hotels12.jpg"; |
|
1216 | + $image_array[] = "$dummy_image_url/hotels8.jpg"; |
|
1217 | + $image_array[] = "$dummy_image_url/hotels9.jpg"; |
|
1218 | + $image_array[] = "$dummy_image_url/hotels1.jpg"; |
|
1219 | + $image_array[] = "$dummy_image_url/hotels2.jpg"; |
|
1220 | + |
|
1221 | + $post_info[] = array( |
|
1222 | + "listing_type" => 'gd_place', |
|
1223 | + "post_title" => 'Chestnut Hill Hotel', |
|
1224 | + "post_desc" => ' |
|
1225 | 1225 | The Chestnut Hill Hotel is located in the historic community of Chestnut Hill, approximately nine miles northwest from Center City Philadelphia. Although Chestnut Hill is close to Center City by today´s standards, it was originally a distant “suburb” on the outskirts of the Philadelphia countryside. |
1226 | 1226 | |
1227 | 1227 | Today, it is one of the region´s most charming neighborhoods. Tree-lined streets and grand estates surround its main street, Germantown Avenue, where you can stroll and shop at more than 200 specialty shops and restaurants, along with trendy salons and other modern boutiques. |
1228 | 1228 | |
1229 | 1229 | The Chestnut Hill Hotel fits perfectly in this setting - the hotel´s 36 rooms and suites, decorated in an 18th-century style, hold the hotel to its boutique roots. It´s a perfect place at which to enjoy a romantic getaway in Philadelphia. |
1230 | 1230 | ', |
1231 | - "post_images" => $image_array, |
|
1232 | - "post_category" => array('gd_placecategory' => array('Hotels', 'Feature')), |
|
1233 | - "post_tags" => array(''), |
|
1234 | - "geodir_video" => '', |
|
1235 | - "geodir_timing" => 'Daily : 10 am to 11 pm', |
|
1236 | - "geodir_contact" => '(243) 222-12344', |
|
1237 | - "geodir_email" => '[email protected]', |
|
1238 | - "geodir_website" => 'http://www.chestnuthillhotel.com/', |
|
1239 | - "geodir_twitter" => 'http://twitter.com/chestnuthillhotel', |
|
1240 | - "geodir_facebook" => 'http://facebook.com/chestnuthillhotel', |
|
1241 | - "post_dummy" => '1' |
|
1242 | - ); |
|
1243 | - |
|
1244 | - ////post end/// |
|
1245 | - /// Hotels ////post start 10/// |
|
1246 | - |
|
1247 | - break; |
|
1248 | - case 21: |
|
1249 | - |
|
1250 | - |
|
1251 | - $image_array = array(); |
|
1252 | - $post_meta = array(); |
|
1253 | - |
|
1254 | - /// Restaurants ////post start 1// |
|
1255 | - $image_array[] = "$dummy_image_url/restaurants1.jpg"; |
|
1256 | - $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
1257 | - $image_array[] = "$dummy_image_url/restaurants3.jpg"; |
|
1258 | - $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
1259 | - $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
1260 | - $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
1261 | - $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
1262 | - $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
1263 | - $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
1264 | - $image_array[] = "$dummy_image_url/restaurants10.jpg"; |
|
1265 | - $image_array[] = "$dummy_image_url/restaurants11.jpg"; |
|
1266 | - |
|
1267 | - $post_info[] = array( |
|
1268 | - "listing_type" => 'gd_place', |
|
1269 | - "post_title" => 'Village Whiskey', |
|
1270 | - "post_desc" => ' |
|
1231 | + "post_images" => $image_array, |
|
1232 | + "post_category" => array('gd_placecategory' => array('Hotels', 'Feature')), |
|
1233 | + "post_tags" => array(''), |
|
1234 | + "geodir_video" => '', |
|
1235 | + "geodir_timing" => 'Daily : 10 am to 11 pm', |
|
1236 | + "geodir_contact" => '(243) 222-12344', |
|
1237 | + "geodir_email" => '[email protected]', |
|
1238 | + "geodir_website" => 'http://www.chestnuthillhotel.com/', |
|
1239 | + "geodir_twitter" => 'http://twitter.com/chestnuthillhotel', |
|
1240 | + "geodir_facebook" => 'http://facebook.com/chestnuthillhotel', |
|
1241 | + "post_dummy" => '1' |
|
1242 | + ); |
|
1243 | + |
|
1244 | + ////post end/// |
|
1245 | + /// Hotels ////post start 10/// |
|
1246 | + |
|
1247 | + break; |
|
1248 | + case 21: |
|
1249 | + |
|
1250 | + |
|
1251 | + $image_array = array(); |
|
1252 | + $post_meta = array(); |
|
1253 | + |
|
1254 | + /// Restaurants ////post start 1// |
|
1255 | + $image_array[] = "$dummy_image_url/restaurants1.jpg"; |
|
1256 | + $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
1257 | + $image_array[] = "$dummy_image_url/restaurants3.jpg"; |
|
1258 | + $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
1259 | + $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
1260 | + $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
1261 | + $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
1262 | + $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
1263 | + $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
1264 | + $image_array[] = "$dummy_image_url/restaurants10.jpg"; |
|
1265 | + $image_array[] = "$dummy_image_url/restaurants11.jpg"; |
|
1266 | + |
|
1267 | + $post_info[] = array( |
|
1268 | + "listing_type" => 'gd_place', |
|
1269 | + "post_title" => 'Village Whiskey', |
|
1270 | + "post_desc" => ' |
|
1271 | 1271 | |
1272 | 1272 | |
1273 | 1273 | Located in a Rittenhouse Square space evoking the free-wheeling spirit of a speakeasy, Village Whiskey is prolific Chef Jose Garces’ intimate, 30-seat tribute to the time-honored liquor. |
@@ -1293,45 +1293,45 @@ discard block |
||
1293 | 1293 | |
1294 | 1294 | During the warmer months, diners can sit at large, wooden tables placed along Sansom Street for whiskey alfresco. |
1295 | 1295 | ', |
1296 | - "post_images" => $image_array, |
|
1297 | - "post_category" => array('gd_placecategory' => array('Restaurants', 'Feature')), |
|
1298 | - "post_tags" => array('Sample Tag1'), |
|
1299 | - "geodir_video" => '', |
|
1300 | - "geodir_timing" => 'Daily : 10 am to 11 pm', |
|
1301 | - "geodir_contact" => '(243) 222-12344', |
|
1302 | - "geodir_email" => '[email protected]', |
|
1303 | - "geodir_website" => 'http://www.villagewhiskey.com/', |
|
1304 | - "geodir_twitter" => 'http://twitter.com/villagewhiskey', |
|
1305 | - "geodir_facebook" => 'http://facebook.com/villagewhiskey', |
|
1306 | - "post_dummy" => '1' |
|
1307 | - ); |
|
1308 | - |
|
1309 | - ////post end/// |
|
1310 | - /// Restaurants ////post start 1/// |
|
1311 | - break; |
|
1312 | - case 22: |
|
1313 | - |
|
1314 | - |
|
1315 | - $image_array = array(); |
|
1316 | - $post_meta = array(); |
|
1317 | - |
|
1318 | - /// Restaurants ////post start 2// |
|
1319 | - $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
1320 | - $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
1321 | - $image_array[] = "$dummy_image_url/restaurants3.jpg"; |
|
1322 | - $image_array[] = "$dummy_image_url/restaurants1.jpg"; |
|
1323 | - $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
1324 | - $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
1325 | - $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
1326 | - $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
1327 | - $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
1328 | - $image_array[] = "$dummy_image_url/restaurants10.jpg"; |
|
1329 | - $image_array[] = "$dummy_image_url/restaurants11.jpg"; |
|
1330 | - |
|
1331 | - $post_info[] = array( |
|
1332 | - "listing_type" => 'gd_place', |
|
1333 | - "post_title" => 'Zavino Pizzeria and Wine Bar', |
|
1334 | - "post_desc" => ' |
|
1296 | + "post_images" => $image_array, |
|
1297 | + "post_category" => array('gd_placecategory' => array('Restaurants', 'Feature')), |
|
1298 | + "post_tags" => array('Sample Tag1'), |
|
1299 | + "geodir_video" => '', |
|
1300 | + "geodir_timing" => 'Daily : 10 am to 11 pm', |
|
1301 | + "geodir_contact" => '(243) 222-12344', |
|
1302 | + "geodir_email" => '[email protected]', |
|
1303 | + "geodir_website" => 'http://www.villagewhiskey.com/', |
|
1304 | + "geodir_twitter" => 'http://twitter.com/villagewhiskey', |
|
1305 | + "geodir_facebook" => 'http://facebook.com/villagewhiskey', |
|
1306 | + "post_dummy" => '1' |
|
1307 | + ); |
|
1308 | + |
|
1309 | + ////post end/// |
|
1310 | + /// Restaurants ////post start 1/// |
|
1311 | + break; |
|
1312 | + case 22: |
|
1313 | + |
|
1314 | + |
|
1315 | + $image_array = array(); |
|
1316 | + $post_meta = array(); |
|
1317 | + |
|
1318 | + /// Restaurants ////post start 2// |
|
1319 | + $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
1320 | + $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
1321 | + $image_array[] = "$dummy_image_url/restaurants3.jpg"; |
|
1322 | + $image_array[] = "$dummy_image_url/restaurants1.jpg"; |
|
1323 | + $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
1324 | + $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
1325 | + $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
1326 | + $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
1327 | + $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
1328 | + $image_array[] = "$dummy_image_url/restaurants10.jpg"; |
|
1329 | + $image_array[] = "$dummy_image_url/restaurants11.jpg"; |
|
1330 | + |
|
1331 | + $post_info[] = array( |
|
1332 | + "listing_type" => 'gd_place', |
|
1333 | + "post_title" => 'Zavino Pizzeria and Wine Bar', |
|
1334 | + "post_desc" => ' |
|
1335 | 1335 | Zavino is a new pizzeria and wine bar located at the epicenter of the city´s trendy Midtown Village neighborhood. The restaurant features a seasonal menu, classic cocktails, an approachable selection of wine and beer and some of the best late night menu offerings in the area. |
1336 | 1336 | |
1337 | 1337 | The restaurant´s interior looks great - it has a simple, rustic feel with an original brick wall, large picture windows, a long bar and a large outdoor cafe coming this spring. |
@@ -1350,46 +1350,46 @@ discard block |
||
1350 | 1350 | |
1351 | 1351 | Pizzas vary in price from $8 to $12. |
1352 | 1352 | ', |
1353 | - "post_images" => $image_array, |
|
1354 | - "post_category" => array('gd_placecategory' => array('Restaurants')), |
|
1355 | - "post_tags" => array('Sample Tag1'), |
|
1356 | - "geodir_video" => '', |
|
1357 | - "geodir_timing" => 'Daily : 10 am to 11 pm', |
|
1358 | - "geodir_contact" => '(243) 222-12344', |
|
1359 | - "geodir_email" => '[email protected]', |
|
1360 | - "geodir_website" => 'http://www.villagewhiskey.com/', |
|
1361 | - "geodir_twitter" => 'http://twitter.com/villagewhiskey', |
|
1362 | - "geodir_facebook" => 'http://facebook.com/villagewhiskey', |
|
1363 | - "post_dummy" => '1' |
|
1364 | - ); |
|
1365 | - |
|
1366 | - ////post end/// |
|
1367 | - /// Restaurants ////post start 2/// |
|
1368 | - |
|
1369 | - break; |
|
1370 | - case 23: |
|
1371 | - |
|
1372 | - |
|
1373 | - $image_array = array(); |
|
1374 | - $post_meta = array(); |
|
1375 | - |
|
1376 | - /// Restaurants ////post start 3// |
|
1377 | - $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
1378 | - $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
1379 | - $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
1380 | - $image_array[] = "$dummy_image_url/restaurants1.jpg"; |
|
1381 | - $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
1382 | - $image_array[] = "$dummy_image_url/restaurants3.jpg"; |
|
1383 | - $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
1384 | - $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
1385 | - $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
1386 | - $image_array[] = "$dummy_image_url/restaurants10.jpg"; |
|
1387 | - $image_array[] = "$dummy_image_url/restaurants11.jpg"; |
|
1388 | - |
|
1389 | - $post_info[] = array( |
|
1390 | - "listing_type" => 'gd_place', |
|
1391 | - "post_title" => 'Parc', |
|
1392 | - "post_desc" => ' |
|
1353 | + "post_images" => $image_array, |
|
1354 | + "post_category" => array('gd_placecategory' => array('Restaurants')), |
|
1355 | + "post_tags" => array('Sample Tag1'), |
|
1356 | + "geodir_video" => '', |
|
1357 | + "geodir_timing" => 'Daily : 10 am to 11 pm', |
|
1358 | + "geodir_contact" => '(243) 222-12344', |
|
1359 | + "geodir_email" => '[email protected]', |
|
1360 | + "geodir_website" => 'http://www.villagewhiskey.com/', |
|
1361 | + "geodir_twitter" => 'http://twitter.com/villagewhiskey', |
|
1362 | + "geodir_facebook" => 'http://facebook.com/villagewhiskey', |
|
1363 | + "post_dummy" => '1' |
|
1364 | + ); |
|
1365 | + |
|
1366 | + ////post end/// |
|
1367 | + /// Restaurants ////post start 2/// |
|
1368 | + |
|
1369 | + break; |
|
1370 | + case 23: |
|
1371 | + |
|
1372 | + |
|
1373 | + $image_array = array(); |
|
1374 | + $post_meta = array(); |
|
1375 | + |
|
1376 | + /// Restaurants ////post start 3// |
|
1377 | + $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
1378 | + $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
1379 | + $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
1380 | + $image_array[] = "$dummy_image_url/restaurants1.jpg"; |
|
1381 | + $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
1382 | + $image_array[] = "$dummy_image_url/restaurants3.jpg"; |
|
1383 | + $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
1384 | + $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
1385 | + $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
1386 | + $image_array[] = "$dummy_image_url/restaurants10.jpg"; |
|
1387 | + $image_array[] = "$dummy_image_url/restaurants11.jpg"; |
|
1388 | + |
|
1389 | + $post_info[] = array( |
|
1390 | + "listing_type" => 'gd_place', |
|
1391 | + "post_title" => 'Parc', |
|
1392 | + "post_desc" => ' |
|
1393 | 1393 | If you love Paris in the springtime, Parc is a veritable grand cru. |
1394 | 1394 | |
1395 | 1395 | With Parc, famed restaurateur Stephen Starr brings a certain je ne sais quoi to Rittenhouse Square. Parc offers an authentic French bistro experience, fully equipped with a chic Parisian ambiance and gorgeous sidewalk seating overlooking the Square. |
@@ -1417,45 +1417,45 @@ discard block |
||
1417 | 1417 | |
1418 | 1418 | To put it simply, Parc is nothing short of an authentic Parisian dining experience - right here in the heart of Rittenhouse Square. |
1419 | 1419 | ', |
1420 | - "post_images" => $image_array, |
|
1421 | - "post_category" => array('gd_placecategory' => array('Restaurants')), |
|
1422 | - "post_tags" => array('Sample Tag1'), |
|
1423 | - "geodir_video" => '', |
|
1424 | - "geodir_timing" => 'Daily : 10 am to 12 pm', |
|
1425 | - "geodir_contact" => '(143) 222-12344', |
|
1426 | - "geodir_email" => '[email protected]', |
|
1427 | - "geodir_website" => 'http://www.parc-restaurant.com/', |
|
1428 | - "geodir_twitter" => 'http://twitter.com/parc-restaurant', |
|
1429 | - "geodir_facebook" => 'http://facebook.com/parc-restaurant', |
|
1430 | - "post_dummy" => '1' |
|
1431 | - ); |
|
1432 | - |
|
1433 | - ////post end/// |
|
1434 | - /// Restaurants ////post start 3/// |
|
1435 | - break; |
|
1436 | - case 24: |
|
1437 | - |
|
1438 | - |
|
1439 | - $image_array = array(); |
|
1440 | - $post_meta = array(); |
|
1441 | - |
|
1442 | - /// Restaurants ////post start 4// |
|
1443 | - $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
1444 | - $image_array[] = "$dummy_image_url/restaurants10.jpg"; |
|
1445 | - $image_array[] = "$dummy_image_url/restaurants3.jpg"; |
|
1446 | - $image_array[] = "$dummy_image_url/restaurants1.jpg"; |
|
1447 | - $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
1448 | - $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
1449 | - $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
1450 | - $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
1451 | - $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
1452 | - $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
1453 | - $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
1454 | - |
|
1455 | - $post_info[] = array( |
|
1456 | - "listing_type" => 'gd_place', |
|
1457 | - "post_title" => 'Percy Street Barbecue', |
|
1458 | - "post_desc" => ' |
|
1420 | + "post_images" => $image_array, |
|
1421 | + "post_category" => array('gd_placecategory' => array('Restaurants')), |
|
1422 | + "post_tags" => array('Sample Tag1'), |
|
1423 | + "geodir_video" => '', |
|
1424 | + "geodir_timing" => 'Daily : 10 am to 12 pm', |
|
1425 | + "geodir_contact" => '(143) 222-12344', |
|
1426 | + "geodir_email" => '[email protected]', |
|
1427 | + "geodir_website" => 'http://www.parc-restaurant.com/', |
|
1428 | + "geodir_twitter" => 'http://twitter.com/parc-restaurant', |
|
1429 | + "geodir_facebook" => 'http://facebook.com/parc-restaurant', |
|
1430 | + "post_dummy" => '1' |
|
1431 | + ); |
|
1432 | + |
|
1433 | + ////post end/// |
|
1434 | + /// Restaurants ////post start 3/// |
|
1435 | + break; |
|
1436 | + case 24: |
|
1437 | + |
|
1438 | + |
|
1439 | + $image_array = array(); |
|
1440 | + $post_meta = array(); |
|
1441 | + |
|
1442 | + /// Restaurants ////post start 4// |
|
1443 | + $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
1444 | + $image_array[] = "$dummy_image_url/restaurants10.jpg"; |
|
1445 | + $image_array[] = "$dummy_image_url/restaurants3.jpg"; |
|
1446 | + $image_array[] = "$dummy_image_url/restaurants1.jpg"; |
|
1447 | + $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
1448 | + $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
1449 | + $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
1450 | + $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
1451 | + $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
1452 | + $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
1453 | + $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
1454 | + |
|
1455 | + $post_info[] = array( |
|
1456 | + "listing_type" => 'gd_place', |
|
1457 | + "post_title" => 'Percy Street Barbecue', |
|
1458 | + "post_desc" => ' |
|
1459 | 1459 | Percy Street Barbecue sees the South Street debut of restaurateurs Steven Cook and Michael Solomonov (Zahav, Xochitl). |
1460 | 1460 | |
1461 | 1461 | Serving a straightforward selection of slowly smoked meats and homey side dishes alongside craft beers and tasty cocktails, Percy Street is an ideal venue for Chef Erin OShea much-lauded Southern cooking, and is on its way to become the city top spot for barbecue. |
@@ -1481,46 +1481,46 @@ discard block |
||
1481 | 1481 | |
1482 | 1482 | Seating in the form of repurposed church pews, and bare light bulbs overhead in the dining room lend to the restaurant Texas-esque aesthetic. |
1483 | 1483 | ', |
1484 | - "post_images" => $image_array, |
|
1485 | - "post_category" => array('gd_placecategory' => array('Restaurants', 'Feature')), |
|
1486 | - "post_tags" => array('Sample Tag1'), |
|
1487 | - "geodir_video" => '', |
|
1488 | - "geodir_timing" => 'Percy Street is closed on Mondays. The restaurant is also open for weekend lunch/brunch from 11:30 a.m. to 2:30 p.m.', |
|
1489 | - "geodir_contact" => '(143) 222-12344', |
|
1490 | - "geodir_email" => '[email protected]', |
|
1491 | - "geodir_website" => 'http://www.percystreet.com/', |
|
1492 | - "geodir_twitter" => 'http://twitter.com/percystreet', |
|
1493 | - "geodir_facebook" => 'http://facebook.com/percystreet', |
|
1494 | - "post_dummy" => '1' |
|
1495 | - ); |
|
1496 | - |
|
1497 | - ////post end/// |
|
1498 | - /// Restaurants ////post start 4/// |
|
1499 | - |
|
1500 | - break; |
|
1501 | - case 25: |
|
1502 | - |
|
1503 | - |
|
1504 | - $image_array = array(); |
|
1505 | - $post_meta = array(); |
|
1506 | - |
|
1507 | - /// Restaurants ////post start 5// |
|
1508 | - $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
1509 | - $image_array[] = "$dummy_image_url/restaurants10.jpg"; |
|
1510 | - $image_array[] = "$dummy_image_url/restaurants3.jpg"; |
|
1511 | - $image_array[] = "$dummy_image_url/restaurants1.jpg"; |
|
1512 | - $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
1513 | - $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
1514 | - $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
1515 | - $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
1516 | - $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
1517 | - $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
1518 | - $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
1519 | - |
|
1520 | - $post_info[] = array( |
|
1521 | - "listing_type" => 'gd_place', |
|
1522 | - "post_title" => 'The Fountain Restaurant', |
|
1523 | - "post_desc" => ' |
|
1484 | + "post_images" => $image_array, |
|
1485 | + "post_category" => array('gd_placecategory' => array('Restaurants', 'Feature')), |
|
1486 | + "post_tags" => array('Sample Tag1'), |
|
1487 | + "geodir_video" => '', |
|
1488 | + "geodir_timing" => 'Percy Street is closed on Mondays. The restaurant is also open for weekend lunch/brunch from 11:30 a.m. to 2:30 p.m.', |
|
1489 | + "geodir_contact" => '(143) 222-12344', |
|
1490 | + "geodir_email" => '[email protected]', |
|
1491 | + "geodir_website" => 'http://www.percystreet.com/', |
|
1492 | + "geodir_twitter" => 'http://twitter.com/percystreet', |
|
1493 | + "geodir_facebook" => 'http://facebook.com/percystreet', |
|
1494 | + "post_dummy" => '1' |
|
1495 | + ); |
|
1496 | + |
|
1497 | + ////post end/// |
|
1498 | + /// Restaurants ////post start 4/// |
|
1499 | + |
|
1500 | + break; |
|
1501 | + case 25: |
|
1502 | + |
|
1503 | + |
|
1504 | + $image_array = array(); |
|
1505 | + $post_meta = array(); |
|
1506 | + |
|
1507 | + /// Restaurants ////post start 5// |
|
1508 | + $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
1509 | + $image_array[] = "$dummy_image_url/restaurants10.jpg"; |
|
1510 | + $image_array[] = "$dummy_image_url/restaurants3.jpg"; |
|
1511 | + $image_array[] = "$dummy_image_url/restaurants1.jpg"; |
|
1512 | + $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
1513 | + $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
1514 | + $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
1515 | + $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
1516 | + $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
1517 | + $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
1518 | + $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
1519 | + |
|
1520 | + $post_info[] = array( |
|
1521 | + "listing_type" => 'gd_place', |
|
1522 | + "post_title" => 'The Fountain Restaurant', |
|
1523 | + "post_desc" => ' |
|
1524 | 1524 | The Fountain Restaurant in the Four Seasons Hotel Philadelphia has received seemingly every type of accolade there is, from top honors in Gourmet magazine to Forbes Travel Guide´s 2010 Five Star award to a perfect Five Diamond rating from AAA. It´s been a Philadelphia favorite for special occasion meals for decades. |
1525 | 1525 | |
1526 | 1526 | Additionally rated as the best restaurant in Philadelphia by Zagat´s, the Fountain Restaurant overlooks the majestic Swann Memorial Fountain sculpture by Alexander Stirling Calder in the center of Logan Square. You´ll also enjoy sweeping views of the grand Benjamin Franklin Parkway and its gorgeous Beaux Arts architecture. |
@@ -1530,45 +1530,45 @@ discard block |
||
1530 | 1530 | You can order a la carte or select the prix fix option to enjoy the “spontaneous tastes” menu which gives the chef control of a few courses. The menu changes regularly, but you can expect to see globaly influenced items like Pan-fried Veal Sweetbreads, Braised Dover Sole Roulade, Sautéed Venison Medallions and Roasted Australian Lamb Saddle. |
1531 | 1531 | |
1532 | 1532 | ', |
1533 | - "post_images" => $image_array, |
|
1534 | - "post_category" => array('gd_placecategory' => array('Restaurants')), |
|
1535 | - "post_tags" => array('food'), |
|
1536 | - "geodir_video" => '', |
|
1537 | - "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 11:30 a.m. to 2:30 p.m.', |
|
1538 | - "geodir_contact" => '(103) 100-12344', |
|
1539 | - "geodir_email" => '[email protected]', |
|
1540 | - "geodir_website" => 'http://www.fourseasons.com/philadelphia/dining', |
|
1541 | - "geodir_twitter" => 'http://twitter.com/fourseasons', |
|
1542 | - "geodir_facebook" => 'http://facebook.com/fourseasons', |
|
1543 | - "post_dummy" => '1' |
|
1544 | - ); |
|
1545 | - |
|
1546 | - ////post end/// |
|
1547 | - /// Restaurants ////post start 5/// |
|
1548 | - break; |
|
1549 | - case 26: |
|
1550 | - |
|
1551 | - |
|
1552 | - $image_array = array(); |
|
1553 | - $post_meta = array(); |
|
1554 | - |
|
1555 | - /// Restaurants ////post start 6// |
|
1556 | - $image_array[] = "$dummy_image_url/restaurants11.jpg"; |
|
1557 | - $image_array[] = "$dummy_image_url/restaurants10.jpg"; |
|
1558 | - $image_array[] = "$dummy_image_url/restaurants3.jpg"; |
|
1559 | - $image_array[] = "$dummy_image_url/restaurants1.jpg"; |
|
1560 | - $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
1561 | - $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
1562 | - $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
1563 | - $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
1564 | - $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
1565 | - $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
1566 | - $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
1567 | - |
|
1568 | - $post_info[] = array( |
|
1569 | - "listing_type" => 'gd_place', |
|
1570 | - "post_title" => 'Lacroix at The Rittenhouse', |
|
1571 | - "post_desc" => ' |
|
1533 | + "post_images" => $image_array, |
|
1534 | + "post_category" => array('gd_placecategory' => array('Restaurants')), |
|
1535 | + "post_tags" => array('food'), |
|
1536 | + "geodir_video" => '', |
|
1537 | + "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 11:30 a.m. to 2:30 p.m.', |
|
1538 | + "geodir_contact" => '(103) 100-12344', |
|
1539 | + "geodir_email" => '[email protected]', |
|
1540 | + "geodir_website" => 'http://www.fourseasons.com/philadelphia/dining', |
|
1541 | + "geodir_twitter" => 'http://twitter.com/fourseasons', |
|
1542 | + "geodir_facebook" => 'http://facebook.com/fourseasons', |
|
1543 | + "post_dummy" => '1' |
|
1544 | + ); |
|
1545 | + |
|
1546 | + ////post end/// |
|
1547 | + /// Restaurants ////post start 5/// |
|
1548 | + break; |
|
1549 | + case 26: |
|
1550 | + |
|
1551 | + |
|
1552 | + $image_array = array(); |
|
1553 | + $post_meta = array(); |
|
1554 | + |
|
1555 | + /// Restaurants ////post start 6// |
|
1556 | + $image_array[] = "$dummy_image_url/restaurants11.jpg"; |
|
1557 | + $image_array[] = "$dummy_image_url/restaurants10.jpg"; |
|
1558 | + $image_array[] = "$dummy_image_url/restaurants3.jpg"; |
|
1559 | + $image_array[] = "$dummy_image_url/restaurants1.jpg"; |
|
1560 | + $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
1561 | + $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
1562 | + $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
1563 | + $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
1564 | + $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
1565 | + $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
1566 | + $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
1567 | + |
|
1568 | + $post_info[] = array( |
|
1569 | + "listing_type" => 'gd_place', |
|
1570 | + "post_title" => 'Lacroix at The Rittenhouse', |
|
1571 | + "post_desc" => ' |
|
1572 | 1572 | A deluxe hotel like The Rittenhouse deserves a deluxe restaurant, a fitting description for Lacroix, named “Restaurant of the Year” in 2003 by Esquire magazine. |
1573 | 1573 | |
1574 | 1574 | Located on the second floor of the Rittenhouse Hotel, Lacroix features elegant décor and a broad view of Rittenhouse Square, which combine to make the ambiance at Lacroix as enjoyable as the meal itself. |
@@ -1579,46 +1579,46 @@ discard block |
||
1579 | 1579 | |
1580 | 1580 | Sunday Brunch at Lacroix - which features such delectable dishes as baby lamb chops with garlic crust and banyuls sauce, niman ranch smoked bacon, quail eggs with artichoke, golden beet and shiitakes, and french baguette toast with apple, raspberry and rosemary jam - is also highly recommended. |
1581 | 1581 | ', |
1582 | - "post_images" => $image_array, |
|
1583 | - "post_category" => array('gd_placecategory' => array('Restaurants')), |
|
1584 | - "post_tags" => array('food'), |
|
1585 | - "geodir_video" => '', |
|
1586 | - "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.', |
|
1587 | - "geodir_contact" => '(113) 121-12344', |
|
1588 | - "geodir_email" => '[email protected]', |
|
1589 | - "geodir_website" => 'http://www.rittenhousehotel.com/lacroix.cfm', |
|
1590 | - "geodir_twitter" => 'http://twitter.com/rittenhousehotel', |
|
1591 | - "geodir_facebook" => 'http://facebook.com/rittenhousehotel', |
|
1592 | - "post_dummy" => '1' |
|
1593 | - ); |
|
1594 | - |
|
1595 | - ////post end/// |
|
1596 | - /// Restaurants ////post start 6/// |
|
1597 | - |
|
1598 | - break; |
|
1599 | - case 27: |
|
1600 | - |
|
1601 | - |
|
1602 | - $image_array = array(); |
|
1603 | - $post_meta = array(); |
|
1604 | - |
|
1605 | - /// Restaurants ////post start 7// |
|
1606 | - $image_array[] = "$dummy_image_url/restaurants12.jpg"; |
|
1607 | - $image_array[] = "$dummy_image_url/restaurants13.jpg"; |
|
1608 | - $image_array[] = "$dummy_image_url/restaurants14.jpg"; |
|
1609 | - $image_array[] = "$dummy_image_url/restaurants15.jpg"; |
|
1610 | - $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
1611 | - $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
1612 | - $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
1613 | - $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
1614 | - $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
1615 | - $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
1616 | - $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
1617 | - |
|
1618 | - $post_info[] = array( |
|
1619 | - "listing_type" => 'gd_place', |
|
1620 | - "post_title" => 'Lacroix at The Rittenhouse', |
|
1621 | - "post_desc" => ' |
|
1582 | + "post_images" => $image_array, |
|
1583 | + "post_category" => array('gd_placecategory' => array('Restaurants')), |
|
1584 | + "post_tags" => array('food'), |
|
1585 | + "geodir_video" => '', |
|
1586 | + "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.', |
|
1587 | + "geodir_contact" => '(113) 121-12344', |
|
1588 | + "geodir_email" => '[email protected]', |
|
1589 | + "geodir_website" => 'http://www.rittenhousehotel.com/lacroix.cfm', |
|
1590 | + "geodir_twitter" => 'http://twitter.com/rittenhousehotel', |
|
1591 | + "geodir_facebook" => 'http://facebook.com/rittenhousehotel', |
|
1592 | + "post_dummy" => '1' |
|
1593 | + ); |
|
1594 | + |
|
1595 | + ////post end/// |
|
1596 | + /// Restaurants ////post start 6/// |
|
1597 | + |
|
1598 | + break; |
|
1599 | + case 27: |
|
1600 | + |
|
1601 | + |
|
1602 | + $image_array = array(); |
|
1603 | + $post_meta = array(); |
|
1604 | + |
|
1605 | + /// Restaurants ////post start 7// |
|
1606 | + $image_array[] = "$dummy_image_url/restaurants12.jpg"; |
|
1607 | + $image_array[] = "$dummy_image_url/restaurants13.jpg"; |
|
1608 | + $image_array[] = "$dummy_image_url/restaurants14.jpg"; |
|
1609 | + $image_array[] = "$dummy_image_url/restaurants15.jpg"; |
|
1610 | + $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
1611 | + $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
1612 | + $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
1613 | + $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
1614 | + $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
1615 | + $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
1616 | + $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
1617 | + |
|
1618 | + $post_info[] = array( |
|
1619 | + "listing_type" => 'gd_place', |
|
1620 | + "post_title" => 'Lacroix at The Rittenhouse', |
|
1621 | + "post_desc" => ' |
|
1622 | 1622 | A deluxe hotel like The Rittenhouse deserves a deluxe restaurant, a fitting description for Lacroix, named “Restaurant of the Year” in 2003 by Esquire magazine. |
1623 | 1623 | |
1624 | 1624 | Located on the second floor of the Rittenhouse Hotel, Lacroix features elegant décor and a broad view of Rittenhouse Square, which combine to make the ambiance at Lacroix as enjoyable as the meal itself. |
@@ -1629,45 +1629,45 @@ discard block |
||
1629 | 1629 | |
1630 | 1630 | Sunday Brunch at Lacroix - which features such delectable dishes as baby lamb chops with garlic crust and banyuls sauce, niman ranch smoked bacon, quail eggs with artichoke, golden beet and shiitakes, and french baguette toast with apple, raspberry and rosemary jam - is also highly recommended. |
1631 | 1631 | ', |
1632 | - "post_images" => $image_array, |
|
1633 | - "post_category" => array('gd_placecategory' => array('Restaurants', 'Food Nightlife')), |
|
1634 | - "post_tags" => array('food'), |
|
1635 | - "geodir_video" => '', |
|
1636 | - "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.', |
|
1637 | - "geodir_contact" => '(113) 121-12344', |
|
1638 | - "geodir_email" => '[email protected]', |
|
1639 | - "geodir_website" => 'http://www.zamarestaurant.com/', |
|
1640 | - "geodir_twitter" => 'http://twitter.com/zamarestaurant', |
|
1641 | - "geodir_facebook" => 'http://facebook.com/zamarestaurant', |
|
1642 | - "post_dummy" => '1' |
|
1643 | - ); |
|
1644 | - |
|
1645 | - ////post end/// |
|
1646 | - /// Restaurants ////post start 7/// |
|
1647 | - |
|
1648 | - break; |
|
1649 | - case 28: |
|
1650 | - |
|
1651 | - $image_array = array(); |
|
1652 | - $post_meta = array(); |
|
1653 | - |
|
1654 | - /// Restaurants ////post start 8// |
|
1655 | - $image_array[] = "$dummy_image_url/restaurants16.jpg"; |
|
1656 | - $image_array[] = "$dummy_image_url/restaurants17.jpg"; |
|
1657 | - $image_array[] = "$dummy_image_url/restaurants18.jpg"; |
|
1658 | - $image_array[] = "$dummy_image_url/restaurants19.jpg"; |
|
1659 | - $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
1660 | - $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
1661 | - $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
1662 | - $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
1663 | - $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
1664 | - $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
1665 | - $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
1666 | - |
|
1667 | - $post_info[] = array( |
|
1668 | - "listing_type" => 'gd_place', |
|
1669 | - "post_title" => 'Sampan', |
|
1670 | - "post_desc" => ' |
|
1632 | + "post_images" => $image_array, |
|
1633 | + "post_category" => array('gd_placecategory' => array('Restaurants', 'Food Nightlife')), |
|
1634 | + "post_tags" => array('food'), |
|
1635 | + "geodir_video" => '', |
|
1636 | + "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.', |
|
1637 | + "geodir_contact" => '(113) 121-12344', |
|
1638 | + "geodir_email" => '[email protected]', |
|
1639 | + "geodir_website" => 'http://www.zamarestaurant.com/', |
|
1640 | + "geodir_twitter" => 'http://twitter.com/zamarestaurant', |
|
1641 | + "geodir_facebook" => 'http://facebook.com/zamarestaurant', |
|
1642 | + "post_dummy" => '1' |
|
1643 | + ); |
|
1644 | + |
|
1645 | + ////post end/// |
|
1646 | + /// Restaurants ////post start 7/// |
|
1647 | + |
|
1648 | + break; |
|
1649 | + case 28: |
|
1650 | + |
|
1651 | + $image_array = array(); |
|
1652 | + $post_meta = array(); |
|
1653 | + |
|
1654 | + /// Restaurants ////post start 8// |
|
1655 | + $image_array[] = "$dummy_image_url/restaurants16.jpg"; |
|
1656 | + $image_array[] = "$dummy_image_url/restaurants17.jpg"; |
|
1657 | + $image_array[] = "$dummy_image_url/restaurants18.jpg"; |
|
1658 | + $image_array[] = "$dummy_image_url/restaurants19.jpg"; |
|
1659 | + $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
1660 | + $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
1661 | + $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
1662 | + $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
1663 | + $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
1664 | + $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
1665 | + $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
1666 | + |
|
1667 | + $post_info[] = array( |
|
1668 | + "listing_type" => 'gd_place', |
|
1669 | + "post_title" => 'Sampan', |
|
1670 | + "post_desc" => ' |
|
1671 | 1671 | Chef and charismatic television star Michael Schulson returns to Philadelphia with the opening of Sampan, a modern Asian restaurant where he serves the acclaimed cuisine that has made him one of the country´s highly sought-after culinary talents. |
1672 | 1672 | |
1673 | 1673 | Schulson returns to Philadelphia after having opened Buddakan in New York City for Stephen Starr and Izakaya at the Borgata in Atlantic City and then having gone on to star in Style network´s popular series Pantry Raid and TLC Ultimate Cake Off. |
@@ -1686,45 +1686,45 @@ discard block |
||
1686 | 1686 | |
1687 | 1687 | Prices range from $5 to $19. |
1688 | 1688 | ', |
1689 | - "post_images" => $image_array, |
|
1690 | - "post_category" => array('gd_placecategory' => array('Restaurants', 'Food Nightlife')), |
|
1691 | - "post_tags" => array('restaurant'), |
|
1692 | - "geodir_video" => '', |
|
1693 | - "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.', |
|
1694 | - "geodir_contact" => '(000) 111-2222', |
|
1695 | - "geodir_email" => '[email protected]', |
|
1696 | - "geodir_website" => 'http://www.sampanphilly.com/', |
|
1697 | - "geodir_twitter" => 'http://twitter.com/sampanphilly', |
|
1698 | - "geodir_facebook" => 'http://facebook.com/sampanphilly', |
|
1699 | - "post_dummy" => '1' |
|
1700 | - ); |
|
1701 | - |
|
1702 | - ////post end/// |
|
1703 | - /// Restaurants ////post start 8/// |
|
1704 | - |
|
1705 | - break; |
|
1706 | - case 29: |
|
1707 | - |
|
1708 | - $image_array = array(); |
|
1709 | - $post_meta = array(); |
|
1710 | - |
|
1711 | - /// Restaurants ////post start 9// |
|
1712 | - $image_array[] = "$dummy_image_url/restaurants17.jpg"; |
|
1713 | - $image_array[] = "$dummy_image_url/restaurants16.jpg"; |
|
1714 | - $image_array[] = "$dummy_image_url/restaurants18.jpg"; |
|
1715 | - $image_array[] = "$dummy_image_url/restaurants19.jpg"; |
|
1716 | - $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
1717 | - $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
1718 | - $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
1719 | - $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
1720 | - $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
1721 | - $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
1722 | - $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
1723 | - |
|
1724 | - $post_info[] = array( |
|
1725 | - "listing_type" => 'gd_place', |
|
1726 | - "post_title" => 'Morimoto', |
|
1727 | - "post_desc" => ' |
|
1689 | + "post_images" => $image_array, |
|
1690 | + "post_category" => array('gd_placecategory' => array('Restaurants', 'Food Nightlife')), |
|
1691 | + "post_tags" => array('restaurant'), |
|
1692 | + "geodir_video" => '', |
|
1693 | + "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.', |
|
1694 | + "geodir_contact" => '(000) 111-2222', |
|
1695 | + "geodir_email" => '[email protected]', |
|
1696 | + "geodir_website" => 'http://www.sampanphilly.com/', |
|
1697 | + "geodir_twitter" => 'http://twitter.com/sampanphilly', |
|
1698 | + "geodir_facebook" => 'http://facebook.com/sampanphilly', |
|
1699 | + "post_dummy" => '1' |
|
1700 | + ); |
|
1701 | + |
|
1702 | + ////post end/// |
|
1703 | + /// Restaurants ////post start 8/// |
|
1704 | + |
|
1705 | + break; |
|
1706 | + case 29: |
|
1707 | + |
|
1708 | + $image_array = array(); |
|
1709 | + $post_meta = array(); |
|
1710 | + |
|
1711 | + /// Restaurants ////post start 9// |
|
1712 | + $image_array[] = "$dummy_image_url/restaurants17.jpg"; |
|
1713 | + $image_array[] = "$dummy_image_url/restaurants16.jpg"; |
|
1714 | + $image_array[] = "$dummy_image_url/restaurants18.jpg"; |
|
1715 | + $image_array[] = "$dummy_image_url/restaurants19.jpg"; |
|
1716 | + $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
1717 | + $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
1718 | + $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
1719 | + $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
1720 | + $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
1721 | + $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
1722 | + $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
1723 | + |
|
1724 | + $post_info[] = array( |
|
1725 | + "listing_type" => 'gd_place', |
|
1726 | + "post_title" => 'Morimoto', |
|
1727 | + "post_desc" => ' |
|
1728 | 1728 | Stephen Starr creative Japanese restaurant has garnered all kinds of national and international attention since opening a few years back. Located a block from Independence Hall on Chestnut Street, Morimoto has an interior - awash in glass and colors - that is both striking and serene in its design. |
1729 | 1729 | |
1730 | 1730 | The restaurant´s namesake and head chef, Morimoto (of Food Network´s Iron Chef fame), has created a menu offering the very best in contemporary Japanese cusine. While regulars flock here for the exquisitely prepared sushi, Morimoto offers diners a broad spectrum of flavors that delve beyond nigiri and sashimi. |
@@ -1737,45 +1737,45 @@ discard block |
||
1737 | 1737 | |
1738 | 1738 | The mezzanine level lounge is a great spot to have a pre-meal cocktail while waiting for your table. You can enjoy a sake or try a “Sakura” - a cosmo made with Sake - in the sleek space that overlooks the brilliant restaurant below. |
1739 | 1739 | ', |
1740 | - "post_images" => $image_array, |
|
1741 | - "post_category" => array('gd_placecategory' => array('Restaurants', 'Food Nightlife', 'Feature')), |
|
1742 | - "post_tags" => array('America'), |
|
1743 | - "geodir_video" => '', |
|
1744 | - "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.', |
|
1745 | - "geodir_contact" => '(000) 111-2222', |
|
1746 | - "geodir_email" => '[email protected]', |
|
1747 | - "geodir_website" => 'http://www.morimotorestaurant.com/', |
|
1748 | - "geodir_twitter" => 'http://twitter.com/morimotorestaurant', |
|
1749 | - "geodir_facebook" => 'http://facebook.com/morimotorestaurant', |
|
1750 | - "post_dummy" => '1' |
|
1751 | - ); |
|
1752 | - |
|
1753 | - ////post end/// |
|
1754 | - /// Restaurants ////post start 9/// |
|
1755 | - break; |
|
1756 | - case 30: |
|
1757 | - |
|
1758 | - |
|
1759 | - $image_array = array(); |
|
1760 | - $post_meta = array(); |
|
1761 | - |
|
1762 | - /// Restaurants ////post start 10// |
|
1763 | - $image_array[] = "$dummy_image_url/restaurants19.jpg"; |
|
1764 | - $image_array[] = "$dummy_image_url/restaurants17.jpg"; |
|
1765 | - $image_array[] = "$dummy_image_url/restaurants18.jpg"; |
|
1766 | - $image_array[] = "$dummy_image_url/restaurants16.jpg"; |
|
1767 | - $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
1768 | - $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
1769 | - $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
1770 | - $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
1771 | - $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
1772 | - $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
1773 | - $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
1774 | - |
|
1775 | - $post_info[] = array( |
|
1776 | - "listing_type" => 'gd_place', |
|
1777 | - "post_title" => 'Buddakan', |
|
1778 | - "post_desc" => ' |
|
1740 | + "post_images" => $image_array, |
|
1741 | + "post_category" => array('gd_placecategory' => array('Restaurants', 'Food Nightlife', 'Feature')), |
|
1742 | + "post_tags" => array('America'), |
|
1743 | + "geodir_video" => '', |
|
1744 | + "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.', |
|
1745 | + "geodir_contact" => '(000) 111-2222', |
|
1746 | + "geodir_email" => '[email protected]', |
|
1747 | + "geodir_website" => 'http://www.morimotorestaurant.com/', |
|
1748 | + "geodir_twitter" => 'http://twitter.com/morimotorestaurant', |
|
1749 | + "geodir_facebook" => 'http://facebook.com/morimotorestaurant', |
|
1750 | + "post_dummy" => '1' |
|
1751 | + ); |
|
1752 | + |
|
1753 | + ////post end/// |
|
1754 | + /// Restaurants ////post start 9/// |
|
1755 | + break; |
|
1756 | + case 30: |
|
1757 | + |
|
1758 | + |
|
1759 | + $image_array = array(); |
|
1760 | + $post_meta = array(); |
|
1761 | + |
|
1762 | + /// Restaurants ////post start 10// |
|
1763 | + $image_array[] = "$dummy_image_url/restaurants19.jpg"; |
|
1764 | + $image_array[] = "$dummy_image_url/restaurants17.jpg"; |
|
1765 | + $image_array[] = "$dummy_image_url/restaurants18.jpg"; |
|
1766 | + $image_array[] = "$dummy_image_url/restaurants16.jpg"; |
|
1767 | + $image_array[] = "$dummy_image_url/restaurants5.jpg"; |
|
1768 | + $image_array[] = "$dummy_image_url/restaurants6.jpg"; |
|
1769 | + $image_array[] = "$dummy_image_url/restaurants7.jpg"; |
|
1770 | + $image_array[] = "$dummy_image_url/restaurants8.jpg"; |
|
1771 | + $image_array[] = "$dummy_image_url/restaurants9.jpg"; |
|
1772 | + $image_array[] = "$dummy_image_url/restaurants2.jpg"; |
|
1773 | + $image_array[] = "$dummy_image_url/restaurants4.jpg"; |
|
1774 | + |
|
1775 | + $post_info[] = array( |
|
1776 | + "listing_type" => 'gd_place', |
|
1777 | + "post_title" => 'Buddakan', |
|
1778 | + "post_desc" => ' |
|
1779 | 1779 | <h3>The Experience </h3> |
1780 | 1780 | |
1781 | 1781 | A towering gilded statue of the Buddha generates elegant calm in this 175-seat, Pan Asian restaurant with sleek, modern decor. Immensely popular, Buddakan is a restaurant that is great for both large parties and intimate dinners. |
@@ -1786,87 +1786,87 @@ discard block |
||
1786 | 1786 | |
1787 | 1787 | Be sure to make your reservation before coming to town as Buddakan fills up quickly especially on weekends. Better yet, make your reservation right now . |
1788 | 1788 | ', |
1789 | - "post_images" => $image_array, |
|
1790 | - "post_category" => array('gd_placecategory' => array('Restaurants', 'Food Nightlife')), |
|
1791 | - "post_tags" => array('America'), |
|
1792 | - "geodir_video" => '', |
|
1793 | - "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.', |
|
1794 | - "geodir_contact" => '(000) 111-2222', |
|
1795 | - "geodir_email" => '[email protected]', |
|
1796 | - "geodir_website" => 'http://www.buddakan.com/', |
|
1797 | - "geodir_twitter" => 'http://twitter.com/buddakan', |
|
1798 | - "geodir_facebook" => 'http://facebook.com/buddakan', |
|
1799 | - "post_dummy" => '1' |
|
1800 | - ); |
|
1801 | - break; |
|
1802 | - |
|
1803 | - ////post end/// |
|
1804 | - /// Restaurants ////post start 10/// |
|
1789 | + "post_images" => $image_array, |
|
1790 | + "post_category" => array('gd_placecategory' => array('Restaurants', 'Food Nightlife')), |
|
1791 | + "post_tags" => array('America'), |
|
1792 | + "geodir_video" => '', |
|
1793 | + "geodir_timing" => 'The restaurant is also open for weekend lunch/brunch from 10:30 a.m. to 6:30 p.m.', |
|
1794 | + "geodir_contact" => '(000) 111-2222', |
|
1795 | + "geodir_email" => '[email protected]', |
|
1796 | + "geodir_website" => 'http://www.buddakan.com/', |
|
1797 | + "geodir_twitter" => 'http://twitter.com/buddakan', |
|
1798 | + "geodir_facebook" => 'http://facebook.com/buddakan', |
|
1799 | + "post_dummy" => '1' |
|
1800 | + ); |
|
1801 | + break; |
|
1802 | + |
|
1803 | + ////post end/// |
|
1804 | + /// Restaurants ////post start 10/// |
|
1805 | 1805 | } // end of switch |
1806 | 1806 | |
1807 | 1807 | |
1808 | 1808 | foreach ($post_info as $post_info) { |
1809 | - $default_location = geodir_get_default_location(); |
|
1810 | - if ($city_bound_lat1 > $city_bound_lat2) |
|
1811 | - $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat1, $city_bound_lat2), geodir_random_float($city_bound_lat2, $city_bound_lat1)); |
|
1812 | - else |
|
1813 | - $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat2, $city_bound_lat1), geodir_random_float($city_bound_lat1, $city_bound_lat2)); |
|
1814 | - |
|
1815 | - |
|
1816 | - if ($city_bound_lng1 > $city_bound_lng2) |
|
1817 | - $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng1, $city_bound_lng2), geodir_random_float($city_bound_lng2, $city_bound_lng1)); |
|
1818 | - else |
|
1819 | - $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng2, $city_bound_lng1), geodir_random_float($city_bound_lng1, $city_bound_lng2)); |
|
1820 | - $post_address = array(); |
|
1821 | - $postal_code = ''; |
|
1822 | - $address = ''; |
|
1823 | - |
|
1824 | - $post_address = geodir_get_address_by_lat_lan($dummy_post_latitude, $dummy_post_longitude); |
|
1825 | - |
|
1826 | - |
|
1827 | - if (!empty($post_address)) { |
|
1828 | - foreach ($post_address as $add_key => $add_value) { |
|
1829 | - if ($add_value->types[0] == 'postal_code') { |
|
1830 | - $postal_code = $add_value->long_name; |
|
1831 | - } |
|
1832 | - |
|
1833 | - if ($add_value->types[0] == 'street_number') { |
|
1834 | - if ($address != '') |
|
1835 | - $address .= ',' . $add_value->long_name; |
|
1836 | - else |
|
1837 | - $address .= $add_value->long_name; |
|
1838 | - } |
|
1839 | - if ($add_value->types[0] == 'route') { |
|
1840 | - if ($address != '') |
|
1841 | - $address .= ',' . $add_value->long_name; |
|
1842 | - else |
|
1843 | - $address .= $add_value->long_name; |
|
1844 | - } |
|
1845 | - if ($add_value->types[0] == 'neighborhood') { |
|
1846 | - if ($address != '') |
|
1847 | - $address .= ',' . $add_value->long_name; |
|
1848 | - else |
|
1849 | - $address .= $add_value->long_name; |
|
1850 | - } |
|
1851 | - if ($add_value->types[0] == 'sublocality') { |
|
1852 | - if ($address != '') |
|
1853 | - $address .= ',' . $add_value->long_name; |
|
1854 | - else |
|
1855 | - $address .= $add_value->long_name; |
|
1856 | - } |
|
1857 | - |
|
1858 | - } |
|
1859 | - |
|
1860 | - $post_info['post_address'] = $address; |
|
1861 | - $post_info['post_city'] = $default_location->city; |
|
1862 | - $post_info['post_region'] = $default_location->region; |
|
1863 | - $post_info['post_country'] = $default_location->country; |
|
1864 | - $post_info['post_zip'] = $postal_code; |
|
1865 | - $post_info['post_latitude'] = $dummy_post_latitude; |
|
1866 | - $post_info['post_longitude'] = $dummy_post_longitude; |
|
1867 | - |
|
1868 | - } |
|
1869 | - geodir_save_listing($post_info, true); |
|
1809 | + $default_location = geodir_get_default_location(); |
|
1810 | + if ($city_bound_lat1 > $city_bound_lat2) |
|
1811 | + $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat1, $city_bound_lat2), geodir_random_float($city_bound_lat2, $city_bound_lat1)); |
|
1812 | + else |
|
1813 | + $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat2, $city_bound_lat1), geodir_random_float($city_bound_lat1, $city_bound_lat2)); |
|
1814 | + |
|
1815 | + |
|
1816 | + if ($city_bound_lng1 > $city_bound_lng2) |
|
1817 | + $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng1, $city_bound_lng2), geodir_random_float($city_bound_lng2, $city_bound_lng1)); |
|
1818 | + else |
|
1819 | + $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng2, $city_bound_lng1), geodir_random_float($city_bound_lng1, $city_bound_lng2)); |
|
1820 | + $post_address = array(); |
|
1821 | + $postal_code = ''; |
|
1822 | + $address = ''; |
|
1823 | + |
|
1824 | + $post_address = geodir_get_address_by_lat_lan($dummy_post_latitude, $dummy_post_longitude); |
|
1825 | + |
|
1826 | + |
|
1827 | + if (!empty($post_address)) { |
|
1828 | + foreach ($post_address as $add_key => $add_value) { |
|
1829 | + if ($add_value->types[0] == 'postal_code') { |
|
1830 | + $postal_code = $add_value->long_name; |
|
1831 | + } |
|
1832 | + |
|
1833 | + if ($add_value->types[0] == 'street_number') { |
|
1834 | + if ($address != '') |
|
1835 | + $address .= ',' . $add_value->long_name; |
|
1836 | + else |
|
1837 | + $address .= $add_value->long_name; |
|
1838 | + } |
|
1839 | + if ($add_value->types[0] == 'route') { |
|
1840 | + if ($address != '') |
|
1841 | + $address .= ',' . $add_value->long_name; |
|
1842 | + else |
|
1843 | + $address .= $add_value->long_name; |
|
1844 | + } |
|
1845 | + if ($add_value->types[0] == 'neighborhood') { |
|
1846 | + if ($address != '') |
|
1847 | + $address .= ',' . $add_value->long_name; |
|
1848 | + else |
|
1849 | + $address .= $add_value->long_name; |
|
1850 | + } |
|
1851 | + if ($add_value->types[0] == 'sublocality') { |
|
1852 | + if ($address != '') |
|
1853 | + $address .= ',' . $add_value->long_name; |
|
1854 | + else |
|
1855 | + $address .= $add_value->long_name; |
|
1856 | + } |
|
1857 | + |
|
1858 | + } |
|
1859 | + |
|
1860 | + $post_info['post_address'] = $address; |
|
1861 | + $post_info['post_city'] = $default_location->city; |
|
1862 | + $post_info['post_region'] = $default_location->region; |
|
1863 | + $post_info['post_country'] = $default_location->country; |
|
1864 | + $post_info['post_zip'] = $postal_code; |
|
1865 | + $post_info['post_latitude'] = $dummy_post_latitude; |
|
1866 | + $post_info['post_longitude'] = $dummy_post_longitude; |
|
1867 | + |
|
1868 | + } |
|
1869 | + geodir_save_listing($post_info, true); |
|
1870 | 1870 | |
1871 | 1871 | } |
1872 | 1872 |
@@ -126,10 +126,11 @@ discard block |
||
126 | 126 | } |
127 | 127 | |
128 | 128 | if (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'category_ajax') { |
129 | - if (isset($_REQUEST['main_catid']) && isset($_REQUEST['cat_tax']) && isset($_REQUEST['exclude'])) |
|
130 | - geodir_addpost_categories_html($_REQUEST['cat_tax'], $_REQUEST['main_catid'], '', '', '', $_REQUEST['exclude']); |
|
131 | - else if (isset($_REQUEST['catpid']) && isset($_REQUEST['cat_tax'])) |
|
132 | - geodir_editpost_categories_html($_REQUEST['cat_tax'], $_REQUEST['catpid']); |
|
129 | + if (isset($_REQUEST['main_catid']) && isset($_REQUEST['cat_tax']) && isset($_REQUEST['exclude'])) { |
|
130 | + geodir_addpost_categories_html($_REQUEST['cat_tax'], $_REQUEST['main_catid'], '', '', '', $_REQUEST['exclude']); |
|
131 | + } else if (isset($_REQUEST['catpid']) && isset($_REQUEST['cat_tax'])) { |
|
132 | + geodir_editpost_categories_html($_REQUEST['cat_tax'], $_REQUEST['catpid']); |
|
133 | + } |
|
133 | 134 | } |
134 | 135 | |
135 | 136 | if ((isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'admin_ajax') || isset($_REQUEST['create_field']) || isset($_REQUEST['sort_create_field'])) { |
@@ -151,22 +152,25 @@ discard block |
||
151 | 152 | if (current_user_can('manage_options')) { |
152 | 153 | switch ($_REQUEST['geodir_autofill']): |
153 | 154 | case "geodir_dummy_delete" : |
154 | - if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'geodir_dummy_posts_delete_noncename')) |
|
155 | - return; |
|
155 | + if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'geodir_dummy_posts_delete_noncename')) { |
|
156 | + return; |
|
157 | + } |
|
156 | 158 | |
157 | - if (isset($_REQUEST['posttype'])) |
|
158 | - /** |
|
159 | + if (isset($_REQUEST['posttype'])) { |
|
160 | + /** |
|
159 | 161 | * Used to delete the dummy post data per post type. |
160 | 162 | * |
161 | 163 | * Uses dynamic hook, geodir_delete_dummy_posts_$_REQUEST['posttype']. |
162 | 164 | * |
163 | 165 | * @since 1.0.0 |
164 | 166 | */ |
165 | - do_action('geodir_delete_dummy_posts_' . $_REQUEST['posttype']); |
|
167 | + do_action('geodir_delete_dummy_posts_' . $_REQUEST['posttype']); |
|
168 | + } |
|
166 | 169 | break; |
167 | 170 | case "geodir_dummy_insert" : |
168 | - if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'geodir_dummy_posts_insert_noncename')) |
|
169 | - return; |
|
171 | + if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'geodir_dummy_posts_insert_noncename')) { |
|
172 | + return; |
|
173 | + } |
|
170 | 174 | |
171 | 175 | global $dummy_post_index, $city_bound_lat1, $city_bound_lng1, $city_bound_lat2, $city_bound_lng2; |
172 | 176 | $dummy_post_index = $_REQUEST['insert_dummy_post_index']; |
@@ -175,15 +179,16 @@ discard block |
||
175 | 179 | $city_bound_lat2 = $_REQUEST['city_bound_lat2']; |
176 | 180 | $city_bound_lng2 = $_REQUEST['city_bound_lng2']; |
177 | 181 | |
178 | - if (isset($_REQUEST['posttype'])) |
|
179 | - /** |
|
182 | + if (isset($_REQUEST['posttype'])) { |
|
183 | + /** |
|
180 | 184 | * Used to insert the dummy post data per post type. |
181 | 185 | * |
182 | 186 | * Uses dynamic hook, geodir_insert_dummy_posts_$_REQUEST['posttype']. |
183 | 187 | * |
184 | 188 | * @since 1.0.0 |
185 | 189 | */ |
186 | - do_action('geodir_insert_dummy_posts_' . $_REQUEST['posttype']); |
|
190 | + do_action('geodir_insert_dummy_posts_' . $_REQUEST['posttype']); |
|
191 | + } |
|
187 | 192 | |
188 | 193 | break; |
189 | 194 | endswitch; |
@@ -204,8 +209,9 @@ discard block |
||
204 | 209 | |
205 | 210 | if (isset($_REQUEST['popuptype']) && $_REQUEST['popuptype'] != '' && isset($_REQUEST['post_id']) && $_REQUEST['post_id'] != '') { |
206 | 211 | |
207 | - if ($_REQUEST['popuptype'] == 'b_send_inquiry' || $_REQUEST['popuptype'] == 'b_sendtofriend') |
|
208 | - require_once(geodir_plugin_path() . '/geodirectory-templates/popup-forms.php'); |
|
212 | + if ($_REQUEST['popuptype'] == 'b_send_inquiry' || $_REQUEST['popuptype'] == 'b_sendtofriend') { |
|
213 | + require_once(geodir_plugin_path() . '/geodirectory-templates/popup-forms.php'); |
|
214 | + } |
|
209 | 215 | |
210 | 216 | exit; |
211 | 217 | } |
@@ -266,8 +272,9 @@ discard block |
||
266 | 272 | } elseif (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { |
267 | 273 | $redirect_to = get_permalink(geodir_add_listing_page_id()); |
268 | 274 | $redirect_to = geodir_getlink($redirect_to, array('pid' => $post->pid), false); |
269 | - } else |
|
270 | - $redirect_to = get_permalink(geodir_add_listing_page_id()); |
|
275 | + } else { |
|
276 | + $redirect_to = get_permalink(geodir_add_listing_page_id()); |
|
277 | + } |
|
271 | 278 | |
272 | 279 | wp_redirect($redirect_to); |
273 | 280 | } else { |
@@ -280,9 +287,9 @@ discard block |
||
280 | 287 | |
281 | 288 | $gd_session->un_set('listing'); |
282 | 289 | |
283 | - if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '' && get_permalink($_REQUEST['pid'])) |
|
284 | - wp_redirect(get_permalink($_REQUEST['pid'])); |
|
285 | - else { |
|
290 | + if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '' && get_permalink($_REQUEST['pid'])) { |
|
291 | + wp_redirect(get_permalink($_REQUEST['pid'])); |
|
292 | + } else { |
|
286 | 293 | geodir_remove_temp_images(); |
287 | 294 | wp_redirect(geodir_getlink(get_permalink(geodir_add_listing_page_id()), array('listing_type' => $_REQUEST['listing_type']))); |
288 | 295 | } |
@@ -310,8 +317,9 @@ discard block |
||
310 | 317 | } elseif (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { |
311 | 318 | $redirect_to = get_permalink(geodir_add_listing_page_id()); |
312 | 319 | $redirect_to = geodir_getlink($redirect_to, array('pid' => $post->pid), false); |
313 | - } else |
|
314 | - $redirect_to = get_permalink(geodir_add_listing_page_id()); |
|
320 | + } else { |
|
321 | + $redirect_to = get_permalink(geodir_add_listing_page_id()); |
|
322 | + } |
|
315 | 323 | |
316 | 324 | $gd_session->un_set('listing'); |
317 | 325 | wp_redirect($redirect_to); |
@@ -333,8 +341,9 @@ discard block |
||
333 | 341 | $lastid = wp_delete_post($_REQUEST['pid']); |
334 | 342 | } |
335 | 343 | |
336 | - if ($lastid && !is_wp_error($lastid)) |
|
337 | - wp_redirect($_SERVER['HTTP_REFERER']); |
|
344 | + if ($lastid && !is_wp_error($lastid)) { |
|
345 | + wp_redirect($_SERVER['HTTP_REFERER']); |
|
346 | + } |
|
338 | 347 | |
339 | 348 | //wp_redirect( geodir_getlink(get_author_posts_url($current_user->ID),array('geodir_dashbord'=>'true','stype'=>$post_type ),false) ); |
340 | 349 | } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | */ |
45 | 45 | function geodir_on_wp() |
46 | 46 | { |
47 | - if(geodir_is_page('login')) { |
|
47 | + if (geodir_is_page('login')) { |
|
48 | 48 | geodir_user_signup(); |
49 | 49 | } |
50 | 50 | |
@@ -228,10 +228,10 @@ discard block |
||
228 | 228 | if (is_user_logged_in()) { |
229 | 229 | switch ($_REQUEST['ajax_action']): |
230 | 230 | case "add" : |
231 | - geodir_add_to_favorite((int)$_REQUEST['pid']); |
|
231 | + geodir_add_to_favorite((int) $_REQUEST['pid']); |
|
232 | 232 | break; |
233 | 233 | case "remove" : |
234 | - geodir_remove_from_favorite((int)$_REQUEST['pid']); |
|
234 | + geodir_remove_from_favorite((int) $_REQUEST['pid']); |
|
235 | 235 | break; |
236 | 236 | endswitch; |
237 | 237 | } else { |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | |
245 | 245 | $is_current_user_owner = true; |
246 | 246 | if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { |
247 | - $is_current_user_owner = geodir_listing_belong_to_current_user((int)$_REQUEST['pid']); |
|
247 | + $is_current_user_owner = geodir_listing_belong_to_current_user((int) $_REQUEST['pid']); |
|
248 | 248 | } |
249 | 249 | |
250 | 250 | $request = $gd_session->get('listing'); |
@@ -1,10 +1,10 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Functions that are called via ajax. |
|
4 | - * |
|
5 | - * @since 1.0.0 |
|
6 | - * @package GeoDirectory |
|
7 | - */ |
|
3 | + * Functions that are called via ajax. |
|
4 | + * |
|
5 | + * @since 1.0.0 |
|
6 | + * @package GeoDirectory |
|
7 | + */ |
|
8 | 8 | |
9 | 9 | |
10 | 10 | /** |
@@ -16,22 +16,22 @@ discard block |
||
16 | 16 | */ |
17 | 17 | function geodir_on_wp_loaded() |
18 | 18 | { |
19 | - /** |
|
20 | - * Called on the wp_loaded WP hook and used to send the send inquiry and send to friend forms. |
|
21 | - * |
|
22 | - * @since 1.0.0 |
|
23 | - */ |
|
24 | - do_action('giodir_handle_request_plugins_loaded'); |
|
25 | - global $wpdb; |
|
19 | + /** |
|
20 | + * Called on the wp_loaded WP hook and used to send the send inquiry and send to friend forms. |
|
21 | + * |
|
22 | + * @since 1.0.0 |
|
23 | + */ |
|
24 | + do_action('giodir_handle_request_plugins_loaded'); |
|
25 | + global $wpdb; |
|
26 | 26 | |
27 | 27 | |
28 | - if (isset($_POST['sendact']) && $_POST['sendact'] == 'send_inqury') { |
|
29 | - geodir_send_inquiry($_REQUEST); // function in custom_functions.php |
|
28 | + if (isset($_POST['sendact']) && $_POST['sendact'] == 'send_inqury') { |
|
29 | + geodir_send_inquiry($_REQUEST); // function in custom_functions.php |
|
30 | 30 | |
31 | - } elseif (isset($_POST['sendact']) && $_POST['sendact'] == 'email_frnd') { |
|
32 | - geodir_send_friend($_REQUEST); // function in custom_functions.php |
|
31 | + } elseif (isset($_POST['sendact']) && $_POST['sendact'] == 'email_frnd') { |
|
32 | + geodir_send_friend($_REQUEST); // function in custom_functions.php |
|
33 | 33 | |
34 | - } |
|
34 | + } |
|
35 | 35 | |
36 | 36 | } |
37 | 37 | |
@@ -44,9 +44,9 @@ discard block |
||
44 | 44 | */ |
45 | 45 | function geodir_on_wp() |
46 | 46 | { |
47 | - if(geodir_is_page('login')) { |
|
48 | - geodir_user_signup(); |
|
49 | - } |
|
47 | + if(geodir_is_page('login')) { |
|
48 | + geodir_user_signup(); |
|
49 | + } |
|
50 | 50 | |
51 | 51 | } |
52 | 52 | |
@@ -59,47 +59,47 @@ discard block |
||
59 | 59 | */ |
60 | 60 | function geodir_on_init() |
61 | 61 | { |
62 | - /** |
|
63 | - * Called on the wp_init WP hook at the start of the geodir_on_init() function. |
|
64 | - * |
|
65 | - * @since 1.0.0 |
|
66 | - */ |
|
67 | - do_action('giodir_handle_request'); |
|
68 | - global $wpdb; |
|
69 | - |
|
70 | - |
|
71 | - |
|
72 | - |
|
73 | - if (get_option('geodir_allow_wpadmin') == '0' && is_user_logged_in() && !current_user_can('manage_options')) { |
|
74 | - show_admin_bar(false); |
|
75 | - } |
|
76 | - |
|
77 | - |
|
78 | - if (isset($_REQUEST['ptype']) && $_REQUEST['ptype'] == 'get_markers') { |
|
79 | - /** |
|
80 | - * Contains map marker functions. |
|
81 | - * |
|
82 | - * @since 1.0.0 |
|
83 | - * @package GeoDirectory |
|
84 | - */ |
|
85 | - include_once(geodir_plugin_path() . '/geodirectory-functions/map-functions/get_markers.php'); |
|
86 | - die; |
|
87 | - } |
|
88 | - |
|
89 | - if (isset($_REQUEST['ptype']) && $_REQUEST['ptype'] == 'ga') { |
|
90 | - if (isset($_REQUEST['ga_start'])) { |
|
91 | - $ga_start = $_REQUEST['ga_start']; |
|
92 | - } else { |
|
93 | - $ga_start = ''; |
|
94 | - } |
|
95 | - if (isset($_REQUEST['ga_end'])) { |
|
96 | - $ga_end = $_REQUEST['ga_end']; |
|
97 | - } else { |
|
98 | - $ga_end = ''; |
|
99 | - } |
|
100 | - geodir_getGoogleAnalytics($_REQUEST['ga_page'], $ga_start, $ga_end); |
|
101 | - die; |
|
102 | - } |
|
62 | + /** |
|
63 | + * Called on the wp_init WP hook at the start of the geodir_on_init() function. |
|
64 | + * |
|
65 | + * @since 1.0.0 |
|
66 | + */ |
|
67 | + do_action('giodir_handle_request'); |
|
68 | + global $wpdb; |
|
69 | + |
|
70 | + |
|
71 | + |
|
72 | + |
|
73 | + if (get_option('geodir_allow_wpadmin') == '0' && is_user_logged_in() && !current_user_can('manage_options')) { |
|
74 | + show_admin_bar(false); |
|
75 | + } |
|
76 | + |
|
77 | + |
|
78 | + if (isset($_REQUEST['ptype']) && $_REQUEST['ptype'] == 'get_markers') { |
|
79 | + /** |
|
80 | + * Contains map marker functions. |
|
81 | + * |
|
82 | + * @since 1.0.0 |
|
83 | + * @package GeoDirectory |
|
84 | + */ |
|
85 | + include_once(geodir_plugin_path() . '/geodirectory-functions/map-functions/get_markers.php'); |
|
86 | + die; |
|
87 | + } |
|
88 | + |
|
89 | + if (isset($_REQUEST['ptype']) && $_REQUEST['ptype'] == 'ga') { |
|
90 | + if (isset($_REQUEST['ga_start'])) { |
|
91 | + $ga_start = $_REQUEST['ga_start']; |
|
92 | + } else { |
|
93 | + $ga_start = ''; |
|
94 | + } |
|
95 | + if (isset($_REQUEST['ga_end'])) { |
|
96 | + $ga_end = $_REQUEST['ga_end']; |
|
97 | + } else { |
|
98 | + $ga_end = ''; |
|
99 | + } |
|
100 | + geodir_getGoogleAnalytics($_REQUEST['ga_page'], $ga_start, $ga_end); |
|
101 | + die; |
|
102 | + } |
|
103 | 103 | |
104 | 104 | |
105 | 105 | } |
@@ -118,241 +118,241 @@ discard block |
||
118 | 118 | * @todo check if nonce is required here and if so add one. |
119 | 119 | */ |
120 | 120 | function geodir_ajax_handler() { |
121 | - global $wpdb, $gd_session; |
|
121 | + global $wpdb, $gd_session; |
|
122 | 122 | |
123 | - if (isset($_REQUEST['gd_listing_view']) && $_REQUEST['gd_listing_view'] != '') { |
|
123 | + if (isset($_REQUEST['gd_listing_view']) && $_REQUEST['gd_listing_view'] != '') { |
|
124 | 124 | $gd_session->set('gd_listing_view', $_REQUEST['gd_listing_view']); |
125 | - echo '1'; |
|
126 | - } |
|
127 | - |
|
128 | - if (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'category_ajax') { |
|
129 | - if (isset($_REQUEST['main_catid']) && isset($_REQUEST['cat_tax']) && isset($_REQUEST['exclude'])) |
|
130 | - geodir_addpost_categories_html($_REQUEST['cat_tax'], $_REQUEST['main_catid'], '', '', '', $_REQUEST['exclude']); |
|
131 | - else if (isset($_REQUEST['catpid']) && isset($_REQUEST['cat_tax'])) |
|
132 | - geodir_editpost_categories_html($_REQUEST['cat_tax'], $_REQUEST['catpid']); |
|
133 | - } |
|
134 | - |
|
135 | - if ((isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'admin_ajax') || isset($_REQUEST['create_field']) || isset($_REQUEST['sort_create_field'])) { |
|
136 | - if (current_user_can('manage_options')) { |
|
137 | - /** |
|
138 | - * Contains admin ajax handling functions. |
|
139 | - * |
|
140 | - * @since 1.0.0 |
|
141 | - * @package GeoDirectory |
|
142 | - */ |
|
143 | - include_once(geodir_plugin_path() . '/geodirectory-admin/geodir_admin_ajax.php'); |
|
144 | - } else { |
|
145 | - wp_redirect(geodir_login_url()); |
|
146 | - exit(); |
|
147 | - } |
|
148 | - } |
|
149 | - |
|
150 | - if (isset($_REQUEST['geodir_autofill']) && $_REQUEST['geodir_autofill'] != '' && isset($_REQUEST['_wpnonce'])) { |
|
151 | - if (current_user_can('manage_options')) { |
|
152 | - switch ($_REQUEST['geodir_autofill']): |
|
153 | - case "geodir_dummy_delete" : |
|
154 | - if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'geodir_dummy_posts_delete_noncename')) |
|
155 | - return; |
|
156 | - |
|
157 | - if (isset($_REQUEST['posttype'])) |
|
158 | - /** |
|
159 | - * Used to delete the dummy post data per post type. |
|
160 | - * |
|
161 | - * Uses dynamic hook, geodir_delete_dummy_posts_$_REQUEST['posttype']. |
|
162 | - * |
|
163 | - * @since 1.0.0 |
|
164 | - */ |
|
165 | - do_action('geodir_delete_dummy_posts_' . $_REQUEST['posttype']); |
|
166 | - break; |
|
167 | - case "geodir_dummy_insert" : |
|
168 | - if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'geodir_dummy_posts_insert_noncename')) |
|
169 | - return; |
|
170 | - |
|
171 | - global $dummy_post_index, $city_bound_lat1, $city_bound_lng1, $city_bound_lat2, $city_bound_lng2; |
|
172 | - $dummy_post_index = $_REQUEST['insert_dummy_post_index']; |
|
173 | - $city_bound_lat1 = $_REQUEST['city_bound_lat1']; |
|
174 | - $city_bound_lng1 = $_REQUEST['city_bound_lng1']; |
|
175 | - $city_bound_lat2 = $_REQUEST['city_bound_lat2']; |
|
176 | - $city_bound_lng2 = $_REQUEST['city_bound_lng2']; |
|
177 | - |
|
178 | - if (isset($_REQUEST['posttype'])) |
|
179 | - /** |
|
180 | - * Used to insert the dummy post data per post type. |
|
181 | - * |
|
182 | - * Uses dynamic hook, geodir_insert_dummy_posts_$_REQUEST['posttype']. |
|
183 | - * |
|
184 | - * @since 1.0.0 |
|
185 | - */ |
|
186 | - do_action('geodir_insert_dummy_posts_' . $_REQUEST['posttype']); |
|
187 | - |
|
188 | - break; |
|
189 | - endswitch; |
|
190 | - } else { |
|
191 | - wp_redirect(geodir_login_url()); |
|
192 | - exit(); |
|
193 | - } |
|
194 | - } |
|
195 | - |
|
196 | - if (isset($_REQUEST['popuptype']) && $_REQUEST['popuptype'] != '' && isset($_REQUEST['post_id']) && $_REQUEST['post_id'] != '') { |
|
197 | - |
|
198 | - if ($_REQUEST['popuptype'] == 'b_send_inquiry' || $_REQUEST['popuptype'] == 'b_sendtofriend') |
|
199 | - require_once(geodir_plugin_path() . '/geodirectory-templates/popup-forms.php'); |
|
200 | - |
|
201 | - exit; |
|
202 | - } |
|
203 | - |
|
204 | - /*if(isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'filter_ajax'){ |
|
125 | + echo '1'; |
|
126 | + } |
|
127 | + |
|
128 | + if (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'category_ajax') { |
|
129 | + if (isset($_REQUEST['main_catid']) && isset($_REQUEST['cat_tax']) && isset($_REQUEST['exclude'])) |
|
130 | + geodir_addpost_categories_html($_REQUEST['cat_tax'], $_REQUEST['main_catid'], '', '', '', $_REQUEST['exclude']); |
|
131 | + else if (isset($_REQUEST['catpid']) && isset($_REQUEST['cat_tax'])) |
|
132 | + geodir_editpost_categories_html($_REQUEST['cat_tax'], $_REQUEST['catpid']); |
|
133 | + } |
|
134 | + |
|
135 | + if ((isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'admin_ajax') || isset($_REQUEST['create_field']) || isset($_REQUEST['sort_create_field'])) { |
|
136 | + if (current_user_can('manage_options')) { |
|
137 | + /** |
|
138 | + * Contains admin ajax handling functions. |
|
139 | + * |
|
140 | + * @since 1.0.0 |
|
141 | + * @package GeoDirectory |
|
142 | + */ |
|
143 | + include_once(geodir_plugin_path() . '/geodirectory-admin/geodir_admin_ajax.php'); |
|
144 | + } else { |
|
145 | + wp_redirect(geodir_login_url()); |
|
146 | + exit(); |
|
147 | + } |
|
148 | + } |
|
149 | + |
|
150 | + if (isset($_REQUEST['geodir_autofill']) && $_REQUEST['geodir_autofill'] != '' && isset($_REQUEST['_wpnonce'])) { |
|
151 | + if (current_user_can('manage_options')) { |
|
152 | + switch ($_REQUEST['geodir_autofill']): |
|
153 | + case "geodir_dummy_delete" : |
|
154 | + if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'geodir_dummy_posts_delete_noncename')) |
|
155 | + return; |
|
156 | + |
|
157 | + if (isset($_REQUEST['posttype'])) |
|
158 | + /** |
|
159 | + * Used to delete the dummy post data per post type. |
|
160 | + * |
|
161 | + * Uses dynamic hook, geodir_delete_dummy_posts_$_REQUEST['posttype']. |
|
162 | + * |
|
163 | + * @since 1.0.0 |
|
164 | + */ |
|
165 | + do_action('geodir_delete_dummy_posts_' . $_REQUEST['posttype']); |
|
166 | + break; |
|
167 | + case "geodir_dummy_insert" : |
|
168 | + if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'geodir_dummy_posts_insert_noncename')) |
|
169 | + return; |
|
170 | + |
|
171 | + global $dummy_post_index, $city_bound_lat1, $city_bound_lng1, $city_bound_lat2, $city_bound_lng2; |
|
172 | + $dummy_post_index = $_REQUEST['insert_dummy_post_index']; |
|
173 | + $city_bound_lat1 = $_REQUEST['city_bound_lat1']; |
|
174 | + $city_bound_lng1 = $_REQUEST['city_bound_lng1']; |
|
175 | + $city_bound_lat2 = $_REQUEST['city_bound_lat2']; |
|
176 | + $city_bound_lng2 = $_REQUEST['city_bound_lng2']; |
|
177 | + |
|
178 | + if (isset($_REQUEST['posttype'])) |
|
179 | + /** |
|
180 | + * Used to insert the dummy post data per post type. |
|
181 | + * |
|
182 | + * Uses dynamic hook, geodir_insert_dummy_posts_$_REQUEST['posttype']. |
|
183 | + * |
|
184 | + * @since 1.0.0 |
|
185 | + */ |
|
186 | + do_action('geodir_insert_dummy_posts_' . $_REQUEST['posttype']); |
|
187 | + |
|
188 | + break; |
|
189 | + endswitch; |
|
190 | + } else { |
|
191 | + wp_redirect(geodir_login_url()); |
|
192 | + exit(); |
|
193 | + } |
|
194 | + } |
|
195 | + |
|
196 | + if (isset($_REQUEST['popuptype']) && $_REQUEST['popuptype'] != '' && isset($_REQUEST['post_id']) && $_REQUEST['post_id'] != '') { |
|
197 | + |
|
198 | + if ($_REQUEST['popuptype'] == 'b_send_inquiry' || $_REQUEST['popuptype'] == 'b_sendtofriend') |
|
199 | + require_once(geodir_plugin_path() . '/geodirectory-templates/popup-forms.php'); |
|
200 | + |
|
201 | + exit; |
|
202 | + } |
|
203 | + |
|
204 | + /*if(isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'filter_ajax'){ |
|
205 | 205 | include_once ( geodir_plugin_path() . '/geodirectory-templates/advance-search-form.php'); |
206 | 206 | }*/ |
207 | 207 | |
208 | - if (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'map_ajax') { |
|
209 | - /** |
|
210 | - * Contains map marker functions. |
|
211 | - * |
|
212 | - * @since 1.0.0 |
|
213 | - * @package GeoDirectory |
|
214 | - */ |
|
215 | - include_once(geodir_plugin_path() . '/geodirectory-functions/map-functions/get_markers.php'); |
|
216 | - } |
|
217 | - |
|
218 | - if (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'favorite') { |
|
219 | - if (is_user_logged_in()) { |
|
220 | - switch ($_REQUEST['ajax_action']): |
|
221 | - case "add" : |
|
222 | - geodir_add_to_favorite((int)$_REQUEST['pid']); |
|
223 | - break; |
|
224 | - case "remove" : |
|
225 | - geodir_remove_from_favorite((int)$_REQUEST['pid']); |
|
226 | - break; |
|
227 | - endswitch; |
|
228 | - } else { |
|
229 | - wp_redirect(geodir_login_url()); |
|
230 | - exit(); |
|
231 | - } |
|
232 | - } |
|
233 | - |
|
234 | - if (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'add_listing') { |
|
235 | - |
|
236 | - $is_current_user_owner = true; |
|
237 | - if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { |
|
238 | - $is_current_user_owner = geodir_listing_belong_to_current_user((int)$_REQUEST['pid']); |
|
239 | - } |
|
240 | - |
|
241 | - $request = $gd_session->get('listing'); |
|
242 | - |
|
243 | - if (is_user_logged_in() && $is_current_user_owner) { |
|
244 | - |
|
245 | - switch ($_REQUEST['ajax_action']): |
|
246 | - case "add": |
|
247 | - case "update": |
|
248 | - |
|
249 | - if (isset($request['geodir_spamblocker']) && $request['geodir_spamblocker'] == '64' && isset($request['geodir_filled_by_spam_bot']) && $request['geodir_filled_by_spam_bot'] == '') { |
|
250 | - $last_id = geodir_save_listing(); |
|
251 | - |
|
252 | - if ($last_id) { |
|
253 | - //$redirect_to = get_permalink( $last_id ); |
|
254 | - $redirect_to = geodir_getlink(get_permalink(geodir_success_page_id()), array('pid' => $last_id)); |
|
255 | - |
|
256 | - } elseif (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { |
|
257 | - $redirect_to = get_permalink(geodir_add_listing_page_id()); |
|
258 | - $redirect_to = geodir_getlink($redirect_to, array('pid' => $post->pid), false); |
|
259 | - } else |
|
260 | - $redirect_to = get_permalink(geodir_add_listing_page_id()); |
|
261 | - |
|
262 | - wp_redirect($redirect_to); |
|
263 | - } else { |
|
264 | - $gd_session->un_set('listing'); |
|
265 | - wp_redirect(home_url()); |
|
266 | - } |
|
267 | - |
|
268 | - break; |
|
269 | - case "cancel" : |
|
270 | - |
|
271 | - $gd_session->un_set('listing'); |
|
272 | - |
|
273 | - if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '' && get_permalink($_REQUEST['pid'])) |
|
274 | - wp_redirect(get_permalink($_REQUEST['pid'])); |
|
275 | - else { |
|
276 | - geodir_remove_temp_images(); |
|
277 | - wp_redirect(geodir_getlink(get_permalink(geodir_add_listing_page_id()), array('listing_type' => $_REQUEST['listing_type']))); |
|
278 | - } |
|
279 | - |
|
280 | - break; |
|
281 | - |
|
282 | - case "publish" : |
|
283 | - |
|
284 | - if (isset($request['geodir_spamblocker']) && $request['geodir_spamblocker'] == '64' && isset($request['geodir_filled_by_spam_bot']) && $request['geodir_filled_by_spam_bot'] == '') { |
|
285 | - |
|
286 | - if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { |
|
287 | - $new_post = array(); |
|
288 | - $new_post['ID'] = $_REQUEST['pid']; |
|
289 | - |
|
290 | - $lastid = wp_update_post($new_post); |
|
291 | - |
|
292 | - $gd_session->un_set('listing'); |
|
293 | - wp_redirect(get_permalink($lastid)); |
|
294 | - } else { |
|
295 | - $last_id = geodir_save_listing(); |
|
296 | - |
|
297 | - if ($last_id) { |
|
298 | - //$redirect_to = get_permalink( $last_id ); |
|
299 | - $redirect_to = geodir_getlink(get_permalink(geodir_success_page_id()), array('pid' => $last_id)); |
|
300 | - } elseif (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { |
|
301 | - $redirect_to = get_permalink(geodir_add_listing_page_id()); |
|
302 | - $redirect_to = geodir_getlink($redirect_to, array('pid' => $post->pid), false); |
|
303 | - } else |
|
304 | - $redirect_to = get_permalink(geodir_add_listing_page_id()); |
|
305 | - |
|
306 | - $gd_session->un_set('listing'); |
|
307 | - wp_redirect($redirect_to); |
|
308 | - } |
|
309 | - } else { |
|
310 | - $gd_session->un_set('listing'); |
|
311 | - wp_redirect(home_url()); |
|
312 | - } |
|
313 | - |
|
314 | - break; |
|
315 | - case "delete" : |
|
316 | - if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { |
|
317 | - global $current_user; |
|
318 | - get_currentuserinfo(); |
|
319 | - |
|
320 | - if (get_option('geodir_disable_perm_delete')) { |
|
321 | - $lastid = wp_trash_post($_REQUEST['pid']); |
|
322 | - } else { |
|
323 | - $lastid = wp_delete_post($_REQUEST['pid']); |
|
324 | - } |
|
325 | - |
|
326 | - if ($lastid && !is_wp_error($lastid)) |
|
327 | - wp_redirect($_SERVER['HTTP_REFERER']); |
|
328 | - |
|
329 | - //wp_redirect( geodir_getlink(get_author_posts_url($current_user->ID),array('geodir_dashbord'=>'true','stype'=>$post_type ),false) ); |
|
330 | - } |
|
331 | - break; |
|
332 | - endswitch; |
|
333 | - |
|
334 | - $gd_session->un_set('listing'); |
|
335 | - } else { |
|
336 | - $gd_session->un_set('listing'); |
|
337 | - wp_redirect(geodir_login_url()); |
|
338 | - exit(); |
|
339 | - } |
|
340 | - } |
|
341 | - |
|
342 | - if (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'user_login') { |
|
343 | - /** |
|
344 | - * Contains registration and login functions. |
|
345 | - * @todo Fix the file path. |
|
346 | - * |
|
347 | - * @since 1.0.0 |
|
348 | - * @package GeoDirectory |
|
349 | - */ |
|
350 | - include_once(geodir_plugin_path() . '/geodirectory-functions/geodirectory_reg.php'); |
|
351 | - } |
|
352 | - |
|
353 | - |
|
354 | - if (isset($_REQUEST['ajax_action']) && $_REQUEST['ajax_action'] == 'geodir_get_term_list') { |
|
355 | - $terms_o = get_terms(sanitize_text_field($_REQUEST['term'])); |
|
208 | + if (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'map_ajax') { |
|
209 | + /** |
|
210 | + * Contains map marker functions. |
|
211 | + * |
|
212 | + * @since 1.0.0 |
|
213 | + * @package GeoDirectory |
|
214 | + */ |
|
215 | + include_once(geodir_plugin_path() . '/geodirectory-functions/map-functions/get_markers.php'); |
|
216 | + } |
|
217 | + |
|
218 | + if (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'favorite') { |
|
219 | + if (is_user_logged_in()) { |
|
220 | + switch ($_REQUEST['ajax_action']): |
|
221 | + case "add" : |
|
222 | + geodir_add_to_favorite((int)$_REQUEST['pid']); |
|
223 | + break; |
|
224 | + case "remove" : |
|
225 | + geodir_remove_from_favorite((int)$_REQUEST['pid']); |
|
226 | + break; |
|
227 | + endswitch; |
|
228 | + } else { |
|
229 | + wp_redirect(geodir_login_url()); |
|
230 | + exit(); |
|
231 | + } |
|
232 | + } |
|
233 | + |
|
234 | + if (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'add_listing') { |
|
235 | + |
|
236 | + $is_current_user_owner = true; |
|
237 | + if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { |
|
238 | + $is_current_user_owner = geodir_listing_belong_to_current_user((int)$_REQUEST['pid']); |
|
239 | + } |
|
240 | + |
|
241 | + $request = $gd_session->get('listing'); |
|
242 | + |
|
243 | + if (is_user_logged_in() && $is_current_user_owner) { |
|
244 | + |
|
245 | + switch ($_REQUEST['ajax_action']): |
|
246 | + case "add": |
|
247 | + case "update": |
|
248 | + |
|
249 | + if (isset($request['geodir_spamblocker']) && $request['geodir_spamblocker'] == '64' && isset($request['geodir_filled_by_spam_bot']) && $request['geodir_filled_by_spam_bot'] == '') { |
|
250 | + $last_id = geodir_save_listing(); |
|
251 | + |
|
252 | + if ($last_id) { |
|
253 | + //$redirect_to = get_permalink( $last_id ); |
|
254 | + $redirect_to = geodir_getlink(get_permalink(geodir_success_page_id()), array('pid' => $last_id)); |
|
255 | + |
|
256 | + } elseif (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { |
|
257 | + $redirect_to = get_permalink(geodir_add_listing_page_id()); |
|
258 | + $redirect_to = geodir_getlink($redirect_to, array('pid' => $post->pid), false); |
|
259 | + } else |
|
260 | + $redirect_to = get_permalink(geodir_add_listing_page_id()); |
|
261 | + |
|
262 | + wp_redirect($redirect_to); |
|
263 | + } else { |
|
264 | + $gd_session->un_set('listing'); |
|
265 | + wp_redirect(home_url()); |
|
266 | + } |
|
267 | + |
|
268 | + break; |
|
269 | + case "cancel" : |
|
270 | + |
|
271 | + $gd_session->un_set('listing'); |
|
272 | + |
|
273 | + if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '' && get_permalink($_REQUEST['pid'])) |
|
274 | + wp_redirect(get_permalink($_REQUEST['pid'])); |
|
275 | + else { |
|
276 | + geodir_remove_temp_images(); |
|
277 | + wp_redirect(geodir_getlink(get_permalink(geodir_add_listing_page_id()), array('listing_type' => $_REQUEST['listing_type']))); |
|
278 | + } |
|
279 | + |
|
280 | + break; |
|
281 | + |
|
282 | + case "publish" : |
|
283 | + |
|
284 | + if (isset($request['geodir_spamblocker']) && $request['geodir_spamblocker'] == '64' && isset($request['geodir_filled_by_spam_bot']) && $request['geodir_filled_by_spam_bot'] == '') { |
|
285 | + |
|
286 | + if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { |
|
287 | + $new_post = array(); |
|
288 | + $new_post['ID'] = $_REQUEST['pid']; |
|
289 | + |
|
290 | + $lastid = wp_update_post($new_post); |
|
291 | + |
|
292 | + $gd_session->un_set('listing'); |
|
293 | + wp_redirect(get_permalink($lastid)); |
|
294 | + } else { |
|
295 | + $last_id = geodir_save_listing(); |
|
296 | + |
|
297 | + if ($last_id) { |
|
298 | + //$redirect_to = get_permalink( $last_id ); |
|
299 | + $redirect_to = geodir_getlink(get_permalink(geodir_success_page_id()), array('pid' => $last_id)); |
|
300 | + } elseif (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { |
|
301 | + $redirect_to = get_permalink(geodir_add_listing_page_id()); |
|
302 | + $redirect_to = geodir_getlink($redirect_to, array('pid' => $post->pid), false); |
|
303 | + } else |
|
304 | + $redirect_to = get_permalink(geodir_add_listing_page_id()); |
|
305 | + |
|
306 | + $gd_session->un_set('listing'); |
|
307 | + wp_redirect($redirect_to); |
|
308 | + } |
|
309 | + } else { |
|
310 | + $gd_session->un_set('listing'); |
|
311 | + wp_redirect(home_url()); |
|
312 | + } |
|
313 | + |
|
314 | + break; |
|
315 | + case "delete" : |
|
316 | + if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { |
|
317 | + global $current_user; |
|
318 | + get_currentuserinfo(); |
|
319 | + |
|
320 | + if (get_option('geodir_disable_perm_delete')) { |
|
321 | + $lastid = wp_trash_post($_REQUEST['pid']); |
|
322 | + } else { |
|
323 | + $lastid = wp_delete_post($_REQUEST['pid']); |
|
324 | + } |
|
325 | + |
|
326 | + if ($lastid && !is_wp_error($lastid)) |
|
327 | + wp_redirect($_SERVER['HTTP_REFERER']); |
|
328 | + |
|
329 | + //wp_redirect( geodir_getlink(get_author_posts_url($current_user->ID),array('geodir_dashbord'=>'true','stype'=>$post_type ),false) ); |
|
330 | + } |
|
331 | + break; |
|
332 | + endswitch; |
|
333 | + |
|
334 | + $gd_session->un_set('listing'); |
|
335 | + } else { |
|
336 | + $gd_session->un_set('listing'); |
|
337 | + wp_redirect(geodir_login_url()); |
|
338 | + exit(); |
|
339 | + } |
|
340 | + } |
|
341 | + |
|
342 | + if (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'user_login') { |
|
343 | + /** |
|
344 | + * Contains registration and login functions. |
|
345 | + * @todo Fix the file path. |
|
346 | + * |
|
347 | + * @since 1.0.0 |
|
348 | + * @package GeoDirectory |
|
349 | + */ |
|
350 | + include_once(geodir_plugin_path() . '/geodirectory-functions/geodirectory_reg.php'); |
|
351 | + } |
|
352 | + |
|
353 | + |
|
354 | + if (isset($_REQUEST['ajax_action']) && $_REQUEST['ajax_action'] == 'geodir_get_term_list') { |
|
355 | + $terms_o = get_terms(sanitize_text_field($_REQUEST['term'])); |
|
356 | 356 | |
357 | 357 | // Skip terms which has no listing |
358 | 358 | if (!empty($terms_o)) { |
@@ -366,11 +366,11 @@ discard block |
||
366 | 366 | $terms_o = $filter_terms; |
367 | 367 | } |
368 | 368 | |
369 | - $terms = geodir_sort_terms($terms_o, 'count'); |
|
370 | - geodir_helper_cat_list_output($terms, intval($_REQUEST['limit'])); |
|
371 | - exit(); |
|
369 | + $terms = geodir_sort_terms($terms_o, 'count'); |
|
370 | + geodir_helper_cat_list_output($terms, intval($_REQUEST['limit'])); |
|
371 | + exit(); |
|
372 | 372 | |
373 | - } |
|
373 | + } |
|
374 | 374 | |
375 | - gd_die(); |
|
375 | + gd_die(); |
|
376 | 376 | } |
@@ -24,12 +24,12 @@ discard block |
||
24 | 24 | */ |
25 | 25 | |
26 | 26 | $config = array( |
27 | - 'id' => 'demo_meta_box', // meta box id, unique per meta box |
|
28 | - 'title' => __('Demo Meta Box', 'geodirectory'), // meta box title |
|
29 | - 'pages' => geodir_get_taxonomies(), // taxonomy name, accept categories, post_tag and custom taxonomies |
|
30 | - 'context' => 'normal', // where the meta box appear: normal (default), advanced, side; optional |
|
31 | - 'fields' => array(), // list of meta fields (can be added by field arrays) |
|
32 | - 'local_images' => false, // Use local or hosted images (meta box images for add/remove) |
|
27 | + 'id' => 'demo_meta_box', // meta box id, unique per meta box |
|
28 | + 'title' => __('Demo Meta Box', 'geodirectory'), // meta box title |
|
29 | + 'pages' => geodir_get_taxonomies(), // taxonomy name, accept categories, post_tag and custom taxonomies |
|
30 | + 'context' => 'normal', // where the meta box appear: normal (default), advanced, side; optional |
|
31 | + 'fields' => array(), // list of meta fields (can be added by field arrays) |
|
32 | + 'local_images' => false, // Use local or hosted images (meta box images for add/remove) |
|
33 | 33 | 'use_with_theme' => true //change path if used with theme set to true, false for a plugin or anything else for a custom path(default false). |
34 | 34 | ); |
35 | 35 | |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | * |
50 | 50 | * @since 1.5.7 |
51 | 51 | */ |
52 | - apply_filters('geodir_cat_schemas',array( |
|
52 | + apply_filters('geodir_cat_schemas', array( |
|
53 | 53 | '' => __('Default (LocalBusiness)', 'geodirectory'), |
54 | 54 | 'AccountingService' => 'AccountingService', |
55 | 55 | 'Attorney' => 'Attorney', |
@@ -214,9 +214,9 @@ discard block |
||
214 | 214 | |
215 | 215 | $file_info = pathinfo($term_icon_url['src']); |
216 | 216 | |
217 | - if (isset($file_info['dirname'] ) && $file_info['dirname'] != '.' && $file_info['dirname'] != '..') |
|
217 | + if (isset($file_info['dirname']) && $file_info['dirname'] != '.' && $file_info['dirname'] != '..') |
|
218 | 218 | $sub_dir = $file_info['dirname']; |
219 | - else{$sub_dir = '';} |
|
219 | + else {$sub_dir = ''; } |
|
220 | 220 | |
221 | 221 | $uploads = wp_upload_dir(trim($sub_dir, '/')); // Array of key => value pairs |
222 | 222 | $uploads_baseurl = $uploads['baseurl']; |
@@ -268,8 +268,8 @@ discard block |
||
268 | 268 | jQuery("#addtag iframe").contents().find("body").html(''); |
269 | 269 | jQuery('#addtag [rel="ct_cat_default_img"]').removeClass('at-delete_image_button').addClass('at-upload_image_button'); |
270 | 270 | jQuery('#addtag [rel="ct_cat_icon"]').removeClass('at-delete_image_button').addClass('at-upload_image_button'); |
271 | - jQuery('#addtag [rel="ct_cat_default_img"]').val('<?php _e('Upload Image','geodirectory');?>'); |
|
272 | - jQuery('#addtag [rel="ct_cat_icon"]').val('<?php _e('Upload Image','geodirectory');?>'); |
|
271 | + jQuery('#addtag [rel="ct_cat_default_img"]').val('<?php _e('Upload Image', 'geodirectory'); ?>'); |
|
272 | + jQuery('#addtag [rel="ct_cat_icon"]').val('<?php _e('Upload Image', 'geodirectory'); ?>'); |
|
273 | 273 | } |
274 | 274 | }, 1000); |
275 | 275 |
@@ -204,8 +204,9 @@ discard block |
||
204 | 204 | ############################################################# |
205 | 205 | function manage_category_custom_fields($deprecated, $column_name, $term_id) |
206 | 206 | { |
207 | - if ($column_name == 'cat_ID_num') |
|
208 | - echo $term_id; |
|
207 | + if ($column_name == 'cat_ID_num') { |
|
208 | + echo $term_id; |
|
209 | + } |
|
209 | 210 | |
210 | 211 | if ($column_name == 'cat_icon') { |
211 | 212 | $term_icon_url = get_tax_meta($term_id, 'ct_cat_icon'); |
@@ -214,9 +215,9 @@ discard block |
||
214 | 215 | |
215 | 216 | $file_info = pathinfo($term_icon_url['src']); |
216 | 217 | |
217 | - if (isset($file_info['dirname'] ) && $file_info['dirname'] != '.' && $file_info['dirname'] != '..') |
|
218 | - $sub_dir = $file_info['dirname']; |
|
219 | - else{$sub_dir = '';} |
|
218 | + if (isset($file_info['dirname'] ) && $file_info['dirname'] != '.' && $file_info['dirname'] != '..') { |
|
219 | + $sub_dir = $file_info['dirname']; |
|
220 | + } else{$sub_dir = '';} |
|
220 | 221 | |
221 | 222 | $uploads = wp_upload_dir(trim($sub_dir, '/')); // Array of key => value pairs |
222 | 223 | $uploads_baseurl = $uploads['baseurl']; |
@@ -236,8 +237,9 @@ discard block |
||
236 | 237 | |
237 | 238 | if ($column_name == 'cat_default_img') { |
238 | 239 | $cat_default_img = get_tax_meta($term_id, 'ct_cat_default_img'); |
239 | - if ($cat_default_img != '') |
|
240 | - echo '<img src="' . $cat_default_img['src'] . '" style="max-height:60px;max-width:60px;"/>'; |
|
240 | + if ($cat_default_img != '') { |
|
241 | + echo '<img src="' . $cat_default_img['src'] . '" style="max-height:60px;max-width:60px;"/>'; |
|
242 | + } |
|
241 | 243 | |
242 | 244 | } |
243 | 245 | } |
@@ -245,11 +247,12 @@ discard block |
||
245 | 247 | function geodir_get_default_catimage($term_id, $post_type = 'gd_place') |
246 | 248 | { |
247 | 249 | |
248 | - if ($cat_default_img = get_tax_meta($term_id, 'ct_cat_default_img', '', $post_type)) |
|
249 | - return $cat_default_img; |
|
250 | - else |
|
251 | - return false; |
|
252 | -} |
|
250 | + if ($cat_default_img = get_tax_meta($term_id, 'ct_cat_default_img', '', $post_type)) { |
|
251 | + return $cat_default_img; |
|
252 | + } else { |
|
253 | + return false; |
|
254 | + } |
|
255 | + } |
|
253 | 256 | |
254 | 257 | //Clear custom fields |
255 | 258 | add_action('in_admin_footer', 'geodir_tax_meta_clear_custom_field'); |
@@ -11,139 +11,139 @@ discard block |
||
11 | 11 | //include the main class file |
12 | 12 | require_once("Tax-meta-class.php"); |
13 | 13 | if (is_admin()) { |
14 | - /* |
|
14 | + /* |
|
15 | 15 | * prefix of meta keys, optional |
16 | 16 | * use underscore (_) at the beginning to make keys hidden, for example $prefix = '_ba_'; |
17 | 17 | * you also can make prefix empty to disable it |
18 | 18 | * |
19 | 19 | */ |
20 | 20 | |
21 | - $prefix = 'ct_'; |
|
22 | - /* |
|
21 | + $prefix = 'ct_'; |
|
22 | + /* |
|
23 | 23 | * configure your meta box |
24 | 24 | */ |
25 | 25 | |
26 | - $config = array( |
|
27 | - 'id' => 'demo_meta_box', // meta box id, unique per meta box |
|
28 | - 'title' => __('Demo Meta Box', 'geodirectory'), // meta box title |
|
29 | - 'pages' => geodir_get_taxonomies(), // taxonomy name, accept categories, post_tag and custom taxonomies |
|
30 | - 'context' => 'normal', // where the meta box appear: normal (default), advanced, side; optional |
|
31 | - 'fields' => array(), // list of meta fields (can be added by field arrays) |
|
32 | - 'local_images' => false, // Use local or hosted images (meta box images for add/remove) |
|
33 | - 'use_with_theme' => true //change path if used with theme set to true, false for a plugin or anything else for a custom path(default false). |
|
34 | - ); |
|
26 | + $config = array( |
|
27 | + 'id' => 'demo_meta_box', // meta box id, unique per meta box |
|
28 | + 'title' => __('Demo Meta Box', 'geodirectory'), // meta box title |
|
29 | + 'pages' => geodir_get_taxonomies(), // taxonomy name, accept categories, post_tag and custom taxonomies |
|
30 | + 'context' => 'normal', // where the meta box appear: normal (default), advanced, side; optional |
|
31 | + 'fields' => array(), // list of meta fields (can be added by field arrays) |
|
32 | + 'local_images' => false, // Use local or hosted images (meta box images for add/remove) |
|
33 | + 'use_with_theme' => true //change path if used with theme set to true, false for a plugin or anything else for a custom path(default false). |
|
34 | + ); |
|
35 | 35 | |
36 | 36 | |
37 | - /* |
|
37 | + /* |
|
38 | 38 | * Initiate your meta box |
39 | 39 | */ |
40 | - $my_meta = new Tax_Meta_Class($config); |
|
41 | - $my_meta->addWysiwyg($prefix . 'cat_top_desc', array('name' => __('Category Top Description', 'geodirectory'), 'desc' => __('This will appear at the top of the category listing.', 'geodirectory'))); |
|
42 | - $my_meta->addImage($prefix . 'cat_default_img', array('name' => __('Default Listing Image', 'geodirectory'), 'desc' => __('Choose a default "no image"', 'geodirectory'))); |
|
43 | - $my_meta->addImage($prefix . 'cat_icon', array('name' => __('Category Icon', 'geodirectory'), 'desc' => __('Choose a category icon', 'geodirectory'), 'validate_func' => '!empty')); |
|
44 | - /*$my_meta->addCheckbox($prefix.'pointless',array('name'=> __('<b>Exclude</b> Rating sort option','geodirectory'),'style'=>'hidden'));*/// hidden setting to trick WPML |
|
45 | - |
|
46 | - $my_meta->addSelect($prefix . 'cat_schema', |
|
47 | - /* |
|
40 | + $my_meta = new Tax_Meta_Class($config); |
|
41 | + $my_meta->addWysiwyg($prefix . 'cat_top_desc', array('name' => __('Category Top Description', 'geodirectory'), 'desc' => __('This will appear at the top of the category listing.', 'geodirectory'))); |
|
42 | + $my_meta->addImage($prefix . 'cat_default_img', array('name' => __('Default Listing Image', 'geodirectory'), 'desc' => __('Choose a default "no image"', 'geodirectory'))); |
|
43 | + $my_meta->addImage($prefix . 'cat_icon', array('name' => __('Category Icon', 'geodirectory'), 'desc' => __('Choose a category icon', 'geodirectory'), 'validate_func' => '!empty')); |
|
44 | + /*$my_meta->addCheckbox($prefix.'pointless',array('name'=> __('<b>Exclude</b> Rating sort option','geodirectory'),'style'=>'hidden'));*/// hidden setting to trick WPML |
|
45 | + |
|
46 | + $my_meta->addSelect($prefix . 'cat_schema', |
|
47 | + /* |
|
48 | 48 | * Allows you to add/filter the cat schema types. |
49 | 49 | * |
50 | 50 | * @since 1.5.7 |
51 | 51 | */ |
52 | - apply_filters('geodir_cat_schemas',array( |
|
53 | - '' => __('Default (LocalBusiness)', 'geodirectory'), |
|
54 | - 'AccountingService' => 'AccountingService', |
|
55 | - 'Attorney' => 'Attorney', |
|
56 | - 'AutoBodyShop' => 'AutoBodyShop', |
|
57 | - 'AutoDealer' => 'AutoDealer', |
|
58 | - 'AutoPartsStore' => 'AutoPartsStore', |
|
59 | - 'AutoRental' => 'AutoRental', |
|
60 | - 'AutoRepair' => 'AutoRepair', |
|
61 | - 'AutoWash' => 'AutoWash', |
|
62 | - 'Bakery' => 'Bakery', |
|
63 | - 'BarOrPub' => 'BarOrPub', |
|
64 | - 'BeautySalon' => 'BeautySalon', |
|
65 | - 'BedAndBreakfast' => 'BedAndBreakfast', |
|
66 | - 'BikeStore' => 'BikeStore', |
|
67 | - 'BookStore' => 'BookStore', |
|
68 | - 'CafeOrCoffeeShop' => 'CafeOrCoffeeShop', |
|
69 | - 'ChildCare' => 'ChildCare', |
|
70 | - 'ClothingStore' => 'ClothingStore', |
|
71 | - 'ComputerStore' => 'ComputerStore', |
|
72 | - 'DaySpa' => 'DaySpa', |
|
73 | - 'Dentist' => 'Dentist', |
|
74 | - 'DryCleaningOrLaundry' => 'DryCleaningOrLaundry', |
|
75 | - 'Electrician' => 'Electrician', |
|
76 | - 'ElectronicsStore' => 'ElectronicsStore', |
|
77 | - 'EmergencyService' => 'EmergencyService', |
|
78 | - 'EntertainmentBusiness' => 'EntertainmentBusiness', |
|
79 | - 'Event' => 'Event', |
|
80 | - 'EventVenue' => 'EventVenue', |
|
81 | - 'ExerciseGym' => 'ExerciseGym', |
|
82 | - 'FinancialService' => 'FinancialService', |
|
83 | - 'Florist' => 'Florist', |
|
84 | - 'FoodEstablishment' => 'FoodEstablishment', |
|
85 | - 'FurnitureStore' => 'FurnitureStore', |
|
86 | - 'GardenStore' => 'GardenStore', |
|
87 | - 'GeneralContractor' => 'GeneralContractor', |
|
88 | - 'GolfCourse' => 'GolfCourse', |
|
89 | - 'HairSalon' => 'HairSalon', |
|
90 | - 'HardwareStore' => 'HardwareStore', |
|
91 | - 'HealthAndBeautyBusiness' => 'HealthAndBeautyBusiness', |
|
92 | - 'HobbyShop' => 'HobbyShop', |
|
93 | - 'HomeAndConstructionBusiness' => 'HomeAndConstructionBusiness', |
|
94 | - 'HomeGoodsStore' => 'HomeGoodsStore', |
|
95 | - 'Hospital' => 'Hospital', |
|
96 | - 'Hotel' => 'Hotel', |
|
97 | - 'HousePainter' => 'HousePainter', |
|
98 | - 'HVACBusiness' => 'HVACBusiness', |
|
99 | - 'InsuranceAgency' => 'InsuranceAgency', |
|
100 | - 'JewelryStore' => 'JewelryStore', |
|
101 | - 'LiquorStore' => 'LiquorStore', |
|
102 | - 'Locksmith' => 'Locksmith', |
|
103 | - 'LodgingBusiness' => 'LodgingBusiness', |
|
104 | - 'MedicalClinic' => 'MedicalClinic', |
|
105 | - 'MensClothingStore' => 'MensClothingStore', |
|
106 | - 'MobilePhoneStore' => 'MobilePhoneStore', |
|
107 | - 'Motel' => 'Motel', |
|
108 | - 'MotorcycleDealer' => 'MotorcycleDealer', |
|
109 | - 'MotorcycleRepair' => 'MotorcycleRepair', |
|
110 | - 'MovingCompany' => 'MovingCompany', |
|
111 | - 'MusicStore' => 'MusicStore', |
|
112 | - 'NailSalon' => 'NailSalon', |
|
113 | - 'NightClub' => 'NightClub', |
|
114 | - 'Notary' => 'Notary', |
|
115 | - 'OfficeEquipmentStore' => 'OfficeEquipmentStore', |
|
116 | - 'Optician' => 'Optician', |
|
117 | - 'PetStore' => 'PetStore', |
|
118 | - 'Physician' => 'Physician', |
|
119 | - 'Plumber' => 'Plumber', |
|
120 | - 'ProfessionalService' => 'ProfessionalService', |
|
121 | - 'RealEstateAgent' => 'RealEstateAgent', |
|
122 | - 'Residence' => 'Residence', |
|
123 | - 'Restaurant' => 'Restaurant', |
|
124 | - 'RoofingContractor' => 'RoofingContractor', |
|
125 | - 'RVPark' => 'RVPark', |
|
126 | - 'School' => 'School', |
|
127 | - 'SelfStorage' => 'SelfStorage', |
|
128 | - 'ShoeStore' => 'ShoeStore', |
|
129 | - 'SkiResort' => 'SkiResort', |
|
130 | - 'SportingGoodsStore' => 'SportingGoodsStore', |
|
131 | - 'SportsClub' => 'SportsClub', |
|
132 | - 'Store' => 'Store', |
|
133 | - 'TattooParlor' => 'TattooParlor', |
|
134 | - 'Taxi' => 'Taxi', |
|
135 | - 'TennisComplex' => 'TennisComplex', |
|
136 | - 'TireShop' => 'TireShop', |
|
137 | - 'TouristAttraction' => 'TouristAttraction', |
|
138 | - 'ToyStore' => 'ToyStore', |
|
139 | - 'TravelAgency' => 'TravelAgency', |
|
140 | - 'VeterinaryCare' => 'VeterinaryCare', |
|
141 | - 'WholesaleStore' => 'WholesaleStore', |
|
142 | - 'Winery' => 'Winery' |
|
143 | - )), |
|
144 | - array('name' => __('Schema Type', 'geodirectory'), 'desc' => __('Select the Schema to use for this category', 'geodirectory') . "", 'std' => array('selectkey2'))); |
|
145 | - |
|
146 | - /*$my_meta->addSelect($prefix.'cat_sort',array(''=>__('Default' , 'geodirectory'), |
|
52 | + apply_filters('geodir_cat_schemas',array( |
|
53 | + '' => __('Default (LocalBusiness)', 'geodirectory'), |
|
54 | + 'AccountingService' => 'AccountingService', |
|
55 | + 'Attorney' => 'Attorney', |
|
56 | + 'AutoBodyShop' => 'AutoBodyShop', |
|
57 | + 'AutoDealer' => 'AutoDealer', |
|
58 | + 'AutoPartsStore' => 'AutoPartsStore', |
|
59 | + 'AutoRental' => 'AutoRental', |
|
60 | + 'AutoRepair' => 'AutoRepair', |
|
61 | + 'AutoWash' => 'AutoWash', |
|
62 | + 'Bakery' => 'Bakery', |
|
63 | + 'BarOrPub' => 'BarOrPub', |
|
64 | + 'BeautySalon' => 'BeautySalon', |
|
65 | + 'BedAndBreakfast' => 'BedAndBreakfast', |
|
66 | + 'BikeStore' => 'BikeStore', |
|
67 | + 'BookStore' => 'BookStore', |
|
68 | + 'CafeOrCoffeeShop' => 'CafeOrCoffeeShop', |
|
69 | + 'ChildCare' => 'ChildCare', |
|
70 | + 'ClothingStore' => 'ClothingStore', |
|
71 | + 'ComputerStore' => 'ComputerStore', |
|
72 | + 'DaySpa' => 'DaySpa', |
|
73 | + 'Dentist' => 'Dentist', |
|
74 | + 'DryCleaningOrLaundry' => 'DryCleaningOrLaundry', |
|
75 | + 'Electrician' => 'Electrician', |
|
76 | + 'ElectronicsStore' => 'ElectronicsStore', |
|
77 | + 'EmergencyService' => 'EmergencyService', |
|
78 | + 'EntertainmentBusiness' => 'EntertainmentBusiness', |
|
79 | + 'Event' => 'Event', |
|
80 | + 'EventVenue' => 'EventVenue', |
|
81 | + 'ExerciseGym' => 'ExerciseGym', |
|
82 | + 'FinancialService' => 'FinancialService', |
|
83 | + 'Florist' => 'Florist', |
|
84 | + 'FoodEstablishment' => 'FoodEstablishment', |
|
85 | + 'FurnitureStore' => 'FurnitureStore', |
|
86 | + 'GardenStore' => 'GardenStore', |
|
87 | + 'GeneralContractor' => 'GeneralContractor', |
|
88 | + 'GolfCourse' => 'GolfCourse', |
|
89 | + 'HairSalon' => 'HairSalon', |
|
90 | + 'HardwareStore' => 'HardwareStore', |
|
91 | + 'HealthAndBeautyBusiness' => 'HealthAndBeautyBusiness', |
|
92 | + 'HobbyShop' => 'HobbyShop', |
|
93 | + 'HomeAndConstructionBusiness' => 'HomeAndConstructionBusiness', |
|
94 | + 'HomeGoodsStore' => 'HomeGoodsStore', |
|
95 | + 'Hospital' => 'Hospital', |
|
96 | + 'Hotel' => 'Hotel', |
|
97 | + 'HousePainter' => 'HousePainter', |
|
98 | + 'HVACBusiness' => 'HVACBusiness', |
|
99 | + 'InsuranceAgency' => 'InsuranceAgency', |
|
100 | + 'JewelryStore' => 'JewelryStore', |
|
101 | + 'LiquorStore' => 'LiquorStore', |
|
102 | + 'Locksmith' => 'Locksmith', |
|
103 | + 'LodgingBusiness' => 'LodgingBusiness', |
|
104 | + 'MedicalClinic' => 'MedicalClinic', |
|
105 | + 'MensClothingStore' => 'MensClothingStore', |
|
106 | + 'MobilePhoneStore' => 'MobilePhoneStore', |
|
107 | + 'Motel' => 'Motel', |
|
108 | + 'MotorcycleDealer' => 'MotorcycleDealer', |
|
109 | + 'MotorcycleRepair' => 'MotorcycleRepair', |
|
110 | + 'MovingCompany' => 'MovingCompany', |
|
111 | + 'MusicStore' => 'MusicStore', |
|
112 | + 'NailSalon' => 'NailSalon', |
|
113 | + 'NightClub' => 'NightClub', |
|
114 | + 'Notary' => 'Notary', |
|
115 | + 'OfficeEquipmentStore' => 'OfficeEquipmentStore', |
|
116 | + 'Optician' => 'Optician', |
|
117 | + 'PetStore' => 'PetStore', |
|
118 | + 'Physician' => 'Physician', |
|
119 | + 'Plumber' => 'Plumber', |
|
120 | + 'ProfessionalService' => 'ProfessionalService', |
|
121 | + 'RealEstateAgent' => 'RealEstateAgent', |
|
122 | + 'Residence' => 'Residence', |
|
123 | + 'Restaurant' => 'Restaurant', |
|
124 | + 'RoofingContractor' => 'RoofingContractor', |
|
125 | + 'RVPark' => 'RVPark', |
|
126 | + 'School' => 'School', |
|
127 | + 'SelfStorage' => 'SelfStorage', |
|
128 | + 'ShoeStore' => 'ShoeStore', |
|
129 | + 'SkiResort' => 'SkiResort', |
|
130 | + 'SportingGoodsStore' => 'SportingGoodsStore', |
|
131 | + 'SportsClub' => 'SportsClub', |
|
132 | + 'Store' => 'Store', |
|
133 | + 'TattooParlor' => 'TattooParlor', |
|
134 | + 'Taxi' => 'Taxi', |
|
135 | + 'TennisComplex' => 'TennisComplex', |
|
136 | + 'TireShop' => 'TireShop', |
|
137 | + 'TouristAttraction' => 'TouristAttraction', |
|
138 | + 'ToyStore' => 'ToyStore', |
|
139 | + 'TravelAgency' => 'TravelAgency', |
|
140 | + 'VeterinaryCare' => 'VeterinaryCare', |
|
141 | + 'WholesaleStore' => 'WholesaleStore', |
|
142 | + 'Winery' => 'Winery' |
|
143 | + )), |
|
144 | + array('name' => __('Schema Type', 'geodirectory'), 'desc' => __('Select the Schema to use for this category', 'geodirectory') . "", 'std' => array('selectkey2'))); |
|
145 | + |
|
146 | + /*$my_meta->addSelect($prefix.'cat_sort',array(''=>__('Default' , 'geodirectory'), |
|
147 | 147 | 'random'=>__('Random','geodirectory'), |
148 | 148 | 'az'=>__('Alphabetical' , 'geodirectory'), |
149 | 149 | 'newest'=>__('Newest','geodirectory'), |
@@ -154,8 +154,8 @@ discard block |
||
154 | 154 | 'low_review'=>__('Lowest Reviews','geodirectory')), |
155 | 155 | array('name'=> __('Sort By','geodirectory'),'desc' => __('Select the default sort option.' ,'geodirectory'), 'std'=> array('selectkey2')));*/ |
156 | 156 | |
157 | - // Show options for placecategories only |
|
158 | - /* if(isset($_REQUEST['taxonomy']) && in_array($_REQUEST['taxonomy'],$config['pages']) ){ |
|
157 | + // Show options for placecategories only |
|
158 | + /* if(isset($_REQUEST['taxonomy']) && in_array($_REQUEST['taxonomy'],$config['pages']) ){ |
|
159 | 159 | // Exclude sort options |
160 | 160 | $my_meta->addCheckbox($prefix.'cat_exclude_rating',array('name'=> __('<b>Exclude</b> Rating sort option','geodirectory'))); |
161 | 161 | $my_meta->addCheckbox($prefix.'cat_exclude_reviews',array('name'=> __('<b>Exclude</b> Reviews sort option','geodirectory'))); |
@@ -167,8 +167,8 @@ discard block |
||
167 | 167 | |
168 | 168 | }*/ |
169 | 169 | |
170 | - //Finish Meta Box Decleration |
|
171 | - $my_meta->Finish(); |
|
170 | + //Finish Meta Box Decleration |
|
171 | + $my_meta->Finish(); |
|
172 | 172 | } |
173 | 173 | |
174 | 174 | |
@@ -177,86 +177,86 @@ discard block |
||
177 | 177 | ############################################################## |
178 | 178 | $gd_taxonomies = geodir_get_taxonomies(); |
179 | 179 | if (!empty($gd_taxonomies)) { |
180 | - foreach ($gd_taxonomies as $gd_taxonomy) { |
|
180 | + foreach ($gd_taxonomies as $gd_taxonomy) { |
|
181 | 181 | |
182 | - add_filter('manage_edit-' . $gd_taxonomy . '_columns', 'addCat_column', 10, 2); |
|
183 | - add_action('manage_' . $gd_taxonomy . '_custom_column', 'manage_category_custom_fields', 10, 3); |
|
182 | + add_filter('manage_edit-' . $gd_taxonomy . '_columns', 'addCat_column', 10, 2); |
|
183 | + add_action('manage_' . $gd_taxonomy . '_custom_column', 'manage_category_custom_fields', 10, 3); |
|
184 | 184 | |
185 | - } |
|
185 | + } |
|
186 | 186 | } |
187 | 187 | |
188 | 188 | function addCat_column($columns) |
189 | 189 | { |
190 | - // only edit the columns on the current taxonomy |
|
191 | - /*if ( !isset($_GET['taxonomy']) && !in_array($_GET['taxonomy'],geodir_get_taxonomies()) ) |
|
190 | + // only edit the columns on the current taxonomy |
|
191 | + /*if ( !isset($_GET['taxonomy']) && !in_array($_GET['taxonomy'],geodir_get_taxonomies()) ) |
|
192 | 192 | return $columns; |
193 | 193 | */ |
194 | - if ($posts = $columns['description']) { |
|
195 | - unset($columns['description']); |
|
196 | - } |
|
197 | - |
|
198 | - $columns['cat_icon'] = 'Icon'; |
|
199 | - $columns['cat_default_img'] = __('Default Image', 'geodirectory'); |
|
200 | - $columns['cat_ID_num'] = __('Cat ID', 'geodirectory'); |
|
201 | - return $columns; |
|
194 | + if ($posts = $columns['description']) { |
|
195 | + unset($columns['description']); |
|
196 | + } |
|
197 | + |
|
198 | + $columns['cat_icon'] = 'Icon'; |
|
199 | + $columns['cat_default_img'] = __('Default Image', 'geodirectory'); |
|
200 | + $columns['cat_ID_num'] = __('Cat ID', 'geodirectory'); |
|
201 | + return $columns; |
|
202 | 202 | } |
203 | 203 | |
204 | 204 | ############################################################# |
205 | 205 | function manage_category_custom_fields($deprecated, $column_name, $term_id) |
206 | 206 | { |
207 | - if ($column_name == 'cat_ID_num') |
|
208 | - echo $term_id; |
|
207 | + if ($column_name == 'cat_ID_num') |
|
208 | + echo $term_id; |
|
209 | 209 | |
210 | - if ($column_name == 'cat_icon') { |
|
211 | - $term_icon_url = get_tax_meta($term_id, 'ct_cat_icon'); |
|
210 | + if ($column_name == 'cat_icon') { |
|
211 | + $term_icon_url = get_tax_meta($term_id, 'ct_cat_icon'); |
|
212 | 212 | |
213 | - if ($term_icon_url != '') { |
|
213 | + if ($term_icon_url != '') { |
|
214 | 214 | |
215 | - $file_info = pathinfo($term_icon_url['src']); |
|
215 | + $file_info = pathinfo($term_icon_url['src']); |
|
216 | 216 | |
217 | - if (isset($file_info['dirname'] ) && $file_info['dirname'] != '.' && $file_info['dirname'] != '..') |
|
218 | - $sub_dir = $file_info['dirname']; |
|
219 | - else{$sub_dir = '';} |
|
217 | + if (isset($file_info['dirname'] ) && $file_info['dirname'] != '.' && $file_info['dirname'] != '..') |
|
218 | + $sub_dir = $file_info['dirname']; |
|
219 | + else{$sub_dir = '';} |
|
220 | 220 | |
221 | - $uploads = wp_upload_dir(trim($sub_dir, '/')); // Array of key => value pairs |
|
222 | - $uploads_baseurl = $uploads['baseurl']; |
|
223 | - $uploads_path = $uploads['path']; |
|
221 | + $uploads = wp_upload_dir(trim($sub_dir, '/')); // Array of key => value pairs |
|
222 | + $uploads_baseurl = $uploads['baseurl']; |
|
223 | + $uploads_path = $uploads['path']; |
|
224 | 224 | |
225 | - $file_name = $file_info['basename']; |
|
225 | + $file_name = $file_info['basename']; |
|
226 | 226 | |
227 | - $sub_dir = str_replace($uploads_baseurl, '', $sub_dir); |
|
227 | + $sub_dir = str_replace($uploads_baseurl, '', $sub_dir); |
|
228 | 228 | |
229 | - $uploads_url = $uploads_baseurl . $sub_dir; |
|
229 | + $uploads_url = $uploads_baseurl . $sub_dir; |
|
230 | 230 | |
231 | - $term_icon_url['src'] = $uploads_url . '/' . $file_name; |
|
232 | - echo '<img src="' . $term_icon_url['src'] . '" />'; |
|
231 | + $term_icon_url['src'] = $uploads_url . '/' . $file_name; |
|
232 | + echo '<img src="' . $term_icon_url['src'] . '" />'; |
|
233 | 233 | |
234 | - } |
|
235 | - } |
|
234 | + } |
|
235 | + } |
|
236 | 236 | |
237 | - if ($column_name == 'cat_default_img') { |
|
238 | - $cat_default_img = get_tax_meta($term_id, 'ct_cat_default_img'); |
|
239 | - if ($cat_default_img != '') |
|
240 | - echo '<img src="' . $cat_default_img['src'] . '" style="max-height:60px;max-width:60px;"/>'; |
|
237 | + if ($column_name == 'cat_default_img') { |
|
238 | + $cat_default_img = get_tax_meta($term_id, 'ct_cat_default_img'); |
|
239 | + if ($cat_default_img != '') |
|
240 | + echo '<img src="' . $cat_default_img['src'] . '" style="max-height:60px;max-width:60px;"/>'; |
|
241 | 241 | |
242 | - } |
|
242 | + } |
|
243 | 243 | } |
244 | 244 | |
245 | 245 | function geodir_get_default_catimage($term_id, $post_type = 'gd_place') |
246 | 246 | { |
247 | 247 | |
248 | - if ($cat_default_img = get_tax_meta($term_id, 'ct_cat_default_img', '', $post_type)) |
|
249 | - return $cat_default_img; |
|
250 | - else |
|
251 | - return false; |
|
248 | + if ($cat_default_img = get_tax_meta($term_id, 'ct_cat_default_img', '', $post_type)) |
|
249 | + return $cat_default_img; |
|
250 | + else |
|
251 | + return false; |
|
252 | 252 | } |
253 | 253 | |
254 | 254 | //Clear custom fields |
255 | 255 | add_action('in_admin_footer', 'geodir_tax_meta_clear_custom_field'); |
256 | 256 | function geodir_tax_meta_clear_custom_field() |
257 | 257 | { |
258 | - if (isset($_REQUEST['taxonomy']) && !empty($_REQUEST['taxonomy'])): |
|
259 | - ?> |
|
258 | + if (isset($_REQUEST['taxonomy']) && !empty($_REQUEST['taxonomy'])): |
|
259 | + ?> |
|
260 | 260 | <script type="text/javascript"> |
261 | 261 | jQuery(document).ready(function () { |
262 | 262 | jQuery('#addtag #submit').click(function () { |
@@ -277,5 +277,5 @@ discard block |
||
277 | 277 | }); |
278 | 278 | </script> |
279 | 279 | <?php |
280 | - endif; |
|
280 | + endif; |
|
281 | 281 | } |
@@ -248,8 +248,9 @@ discard block |
||
248 | 248 | |
249 | 249 | $post_id = isset($comment_info->comment_post_ID) ? $comment_info->comment_post_ID : ''; |
250 | 250 | |
251 | - if (!empty($comment_info)) |
|
252 | - $status = $comment_info->comment_approved; |
|
251 | + if (!empty($comment_info)) { |
|
252 | + $status = $comment_info->comment_approved; |
|
253 | + } |
|
253 | 254 | |
254 | 255 | if ($status == 'approve' || $status == 1) { |
255 | 256 | $status = 1; |
@@ -381,12 +382,14 @@ discard block |
||
381 | 382 | function geodir_wrap_comment_text($content, $comment = '') |
382 | 383 | { |
383 | 384 | $rating = 0; |
384 | - if (!empty($comment)) |
|
385 | - $rating = geodir_get_commentoverall($comment->comment_ID); |
|
385 | + if (!empty($comment)) { |
|
386 | + $rating = geodir_get_commentoverall($comment->comment_ID); |
|
387 | + } |
|
386 | 388 | if ($rating != 0 && !is_admin()) { |
387 | 389 | return '<div><div class="gd-rating-text">' . __('Overall Rating', 'geodirectory') . ': <div class="rating">' . $rating . '</div></div>' . geodir_get_rating_stars($rating, $comment->comment_ID) . '</div><div class="description">' . $content . '</div>'; |
388 | - } else |
|
389 | - return $content; |
|
390 | + } else { |
|
391 | + return $content; |
|
392 | + } |
|
390 | 393 | |
391 | 394 | } |
392 | 395 | |
@@ -475,11 +478,12 @@ discard block |
||
475 | 478 | $post_ratings = get_post_meta($post_id, 'overall_rating'); |
476 | 479 | } |
477 | 480 | |
478 | - if ($post_ratings) |
|
479 | - return $post_ratings; |
|
480 | - else |
|
481 | - return false; |
|
482 | -} |
|
481 | + if ($post_ratings) { |
|
482 | + return $post_ratings; |
|
483 | + } else { |
|
484 | + return false; |
|
485 | + } |
|
486 | + } |
|
483 | 487 | |
484 | 488 | |
485 | 489 | /** |
@@ -504,11 +508,12 @@ discard block |
||
504 | 508 | ) |
505 | 509 | ); |
506 | 510 | |
507 | - if (!empty($reatings)) |
|
508 | - return $reatings; |
|
509 | - else |
|
510 | - return false; |
|
511 | -} |
|
511 | + if (!empty($reatings)) { |
|
512 | + return $reatings; |
|
513 | + } else { |
|
514 | + return false; |
|
515 | + } |
|
516 | + } |
|
512 | 517 | |
513 | 518 | /** |
514 | 519 | * Get review total of a Post. |
@@ -532,11 +537,12 @@ discard block |
||
532 | 537 | ) |
533 | 538 | ); |
534 | 539 | |
535 | - if (!empty($results)) |
|
536 | - return $results; |
|
537 | - else |
|
538 | - return false; |
|
539 | -} |
|
540 | + if (!empty($results)) { |
|
541 | + return $results; |
|
542 | + } else { |
|
543 | + return false; |
|
544 | + } |
|
545 | + } |
|
540 | 546 | |
541 | 547 | /** |
542 | 548 | * Get review count by user ID. |
@@ -559,11 +565,12 @@ discard block |
||
559 | 565 | ) |
560 | 566 | ); |
561 | 567 | |
562 | - if (!empty($results)) |
|
563 | - return $results; |
|
564 | - else |
|
565 | - return false; |
|
566 | -} |
|
568 | + if (!empty($results)) { |
|
569 | + return $results; |
|
570 | + } else { |
|
571 | + return false; |
|
572 | + } |
|
573 | + } |
|
567 | 574 | |
568 | 575 | /** |
569 | 576 | * Get average overall rating of a Post. |
@@ -597,11 +604,12 @@ discard block |
||
597 | 604 | ) |
598 | 605 | ); |
599 | 606 | |
600 | - if (!empty($results)) |
|
601 | - return $results; |
|
602 | - else |
|
603 | - return false; |
|
604 | -} |
|
607 | + if (!empty($results)) { |
|
608 | + return $results; |
|
609 | + } else { |
|
610 | + return false; |
|
611 | + } |
|
612 | + } |
|
605 | 613 | |
606 | 614 | /** |
607 | 615 | * Get review count of a Post. |
@@ -625,11 +633,12 @@ discard block |
||
625 | 633 | ) |
626 | 634 | ); |
627 | 635 | |
628 | - if (!empty($results)) |
|
629 | - return $results; |
|
630 | - else |
|
631 | - return false; |
|
632 | -} |
|
636 | + if (!empty($results)) { |
|
637 | + return $results; |
|
638 | + } else { |
|
639 | + return false; |
|
640 | + } |
|
641 | + } |
|
633 | 642 | |
634 | 643 | /** |
635 | 644 | * Get comments count of a Post. |
@@ -655,11 +664,12 @@ discard block |
||
655 | 664 | ); |
656 | 665 | |
657 | 666 | |
658 | - if (!empty($results)) |
|
659 | - return $results; |
|
660 | - else |
|
661 | - return false; |
|
662 | -} |
|
667 | + if (!empty($results)) { |
|
668 | + return $results; |
|
669 | + } else { |
|
670 | + return false; |
|
671 | + } |
|
672 | + } |
|
663 | 673 | |
664 | 674 | /** |
665 | 675 | * Get overall rating of a comment. |
@@ -683,11 +693,12 @@ discard block |
||
683 | 693 | ) |
684 | 694 | ); |
685 | 695 | |
686 | - if ($reatings) |
|
687 | - return $reatings; |
|
688 | - else |
|
689 | - return false; |
|
690 | -} |
|
696 | + if ($reatings) { |
|
697 | + return $reatings; |
|
698 | + } else { |
|
699 | + return false; |
|
700 | + } |
|
701 | + } |
|
691 | 702 | |
692 | 703 | /** |
693 | 704 | * Returns average overall rating of a Post. Depreciated since ver 1.3.6. |
@@ -930,8 +941,9 @@ discard block |
||
930 | 941 | $active_tabs = get_option('geodir_detail_page_tabs_excluded'); |
931 | 942 | |
932 | 943 | $is_display = true; |
933 | - if (!empty($active_tabs) && in_array('reviews', $active_tabs)) |
|
934 | - $is_display = false; |
|
944 | + if (!empty($active_tabs) && in_array('reviews', $active_tabs)) { |
|
945 | + $is_display = false; |
|
946 | + } |
|
935 | 947 | |
936 | 948 | /** |
937 | 949 | * Filter to change display value. |
@@ -68,10 +68,10 @@ discard block |
||
68 | 68 | function geodir_comment_rating_meta($comment) |
69 | 69 | { |
70 | 70 | $post_type = get_post_type($comment->comment_post_ID); |
71 | - if (in_array($post_type, (array)geodir_get_posttypes()) && (int)$comment->comment_parent == 0) { |
|
71 | + if (in_array($post_type, (array) geodir_get_posttypes()) && (int) $comment->comment_parent == 0) { |
|
72 | 72 | $rating = geodir_get_commentoverall($comment->comment_ID); |
73 | 73 | |
74 | - if ((int)get_option('geodir_reviewrating_enable_font_awesome') == 1) { |
|
74 | + if ((int) get_option('geodir_reviewrating_enable_font_awesome') == 1) { |
|
75 | 75 | $star_texts = array(); |
76 | 76 | $star_texts[] = __('Terrible', 'geodirectory'); |
77 | 77 | $star_texts[] = __('Poor', 'geodirectory'); |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | if (isset($_REQUEST['geodir_overallrating'])) { |
194 | 194 | $overall_rating = $_REQUEST['geodir_overallrating']; |
195 | 195 | |
196 | - if (isset($comment_info->comment_parent) && (int)$comment_info->comment_parent == 0) { |
|
196 | + if (isset($comment_info->comment_parent) && (int) $comment_info->comment_parent == 0) { |
|
197 | 197 | $overall_rating = $overall_rating > 0 ? $overall_rating : '0'; |
198 | 198 | |
199 | 199 | $sqlqry = $wpdb->prepare("INSERT INTO " . GEODIR_REVIEW_TABLE . " SET |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | |
338 | 338 | $overall_rating = $_REQUEST['geodir_overallrating']; |
339 | 339 | |
340 | - if (isset($comment_info->comment_parent) && (int)$comment_info->comment_parent == 0) { |
|
340 | + if (isset($comment_info->comment_parent) && (int) $comment_info->comment_parent == 0) { |
|
341 | 341 | $overall_rating = $overall_rating > 0 ? $overall_rating : '0'; |
342 | 342 | |
343 | 343 | if (isset($old_rating)) { |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | * @package GeoDirectory |
458 | 458 | * @param int $post_id The post ID. |
459 | 459 | */ |
460 | - do_action('geodir_update_postrating',$post_id); |
|
460 | + do_action('geodir_update_postrating', $post_id); |
|
461 | 461 | |
462 | 462 | } |
463 | 463 | |
@@ -969,10 +969,10 @@ discard block |
||
969 | 969 | /* |
970 | 970 | * If Disqus plugin is active, do some fixes to show on blogs but no on GD post types |
971 | 971 | */ |
972 | -if(function_exists('dsq_can_replace')) { |
|
972 | +if (function_exists('dsq_can_replace')) { |
|
973 | 973 | remove_filter('comments_template', 'dsq_comments_template'); |
974 | 974 | add_filter('comments_template', 'dsq_comments_template', 100); |
975 | - add_filter('pre_option_disqus_active', 'geodir_option_disqus_active',10,1); |
|
975 | + add_filter('pre_option_disqus_active', 'geodir_option_disqus_active', 10, 1); |
|
976 | 976 | } |
977 | 977 | |
978 | 978 | |
@@ -985,11 +985,11 @@ discard block |
||
985 | 985 | * @param string $disqus_active Hook called before DB call for option so this is empty. |
986 | 986 | * @return string `1` if active `0` if disabled. |
987 | 987 | */ |
988 | -function geodir_option_disqus_active($disqus_active){ |
|
988 | +function geodir_option_disqus_active($disqus_active) { |
|
989 | 989 | global $post; |
990 | 990 | $all_postypes = geodir_get_posttypes(); |
991 | 991 | |
992 | - if(isset($post->post_type) && is_array($all_postypes) && in_array($post->post_type,$all_postypes)){ |
|
992 | + if (isset($post->post_type) && is_array($all_postypes) && in_array($post->post_type, $all_postypes)) { |
|
993 | 993 | $disqus_active = '0'; |
994 | 994 | } |
995 | 995 |
@@ -31,14 +31,14 @@ discard block |
||
31 | 31 | */ |
32 | 32 | function geodir_comment_meta_row_action($a) |
33 | 33 | { |
34 | - global $comment; |
|
35 | - |
|
36 | - $rating = geodir_get_commentoverall($comment->comment_ID); |
|
37 | - if ($rating != 0) { |
|
38 | - //echo '<div class="gd_rating_show" data-average="'.$rating.'" data-id="'.$comment->comment_ID.'"></div>'; |
|
39 | - echo geodir_get_rating_stars($rating, $comment->comment_ID); |
|
40 | - } |
|
41 | - return $a; |
|
34 | + global $comment; |
|
35 | + |
|
36 | + $rating = geodir_get_commentoverall($comment->comment_ID); |
|
37 | + if ($rating != 0) { |
|
38 | + //echo '<div class="gd_rating_show" data-average="'.$rating.'" data-id="'.$comment->comment_ID.'"></div>'; |
|
39 | + echo geodir_get_rating_stars($rating, $comment->comment_ID); |
|
40 | + } |
|
41 | + return $a; |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | add_action('add_meta_boxes_comment', 'geodir_comment_add_meta_box'); |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | */ |
54 | 54 | function geodir_comment_add_meta_box($comment) |
55 | 55 | { |
56 | - add_meta_box('gd-comment-rating', __('Comment Rating', 'geodirectory'), 'geodir_comment_rating_meta', 'comment', 'normal', 'high'); |
|
56 | + add_meta_box('gd-comment-rating', __('Comment Rating', 'geodirectory'), 'geodir_comment_rating_meta', 'comment', 'normal', 'high'); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | */ |
68 | 68 | function geodir_comment_rating_meta($comment) |
69 | 69 | { |
70 | - $post_type = get_post_type($comment->comment_post_ID); |
|
70 | + $post_type = get_post_type($comment->comment_post_ID); |
|
71 | 71 | if (in_array($post_type, (array)geodir_get_posttypes()) && (int)$comment->comment_parent == 0) { |
72 | 72 | $rating = geodir_get_commentoverall($comment->comment_ID); |
73 | 73 | |
@@ -107,12 +107,12 @@ discard block |
||
107 | 107 | */ |
108 | 108 | function geodir_comment_rating_fields() |
109 | 109 | { |
110 | - global $post; |
|
110 | + global $post; |
|
111 | 111 | |
112 | - $post_types = geodir_get_posttypes(); |
|
112 | + $post_types = geodir_get_posttypes(); |
|
113 | 113 | |
114 | - if (in_array($post->post_type, $post_types)) { |
|
115 | - $star_texts = array(); |
|
114 | + if (in_array($post->post_type, $post_types)) { |
|
115 | + $star_texts = array(); |
|
116 | 116 | $star_texts[] = __('Terrible', 'geodirectory'); |
117 | 117 | $star_texts[] = __('Poor', 'geodirectory'); |
118 | 118 | $star_texts[] = __('Average', 'geodirectory'); |
@@ -120,10 +120,10 @@ discard block |
||
120 | 120 | $star_texts[] = __('Excellent', 'geodirectory'); |
121 | 121 | |
122 | 122 | $gd_rating_html = apply_filters('gd_rating_form_html', '<div class="gd_rating" data-average="0" data-id="5"></div>', $star_texts); |
123 | - echo $gd_rating_html; |
|
124 | - ?> |
|
123 | + echo $gd_rating_html; |
|
124 | + ?> |
|
125 | 125 | <input type="hidden" id="geodir_overallrating" name="geodir_overallrating" value="0"/><?php |
126 | - } |
|
126 | + } |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | |
@@ -139,9 +139,9 @@ discard block |
||
139 | 139 | function geodir_comment_replaylink($link) |
140 | 140 | { |
141 | 141 | |
142 | - $link = '<div class="gd_comment_replaylink">' . $link . '</div>'; |
|
142 | + $link = '<div class="gd_comment_replaylink">' . $link . '</div>'; |
|
143 | 143 | |
144 | - return $link; |
|
144 | + return $link; |
|
145 | 145 | } |
146 | 146 | |
147 | 147 | add_filter('cancel_comment_reply_link', 'geodir_cancle_replaylink'); |
@@ -156,9 +156,9 @@ discard block |
||
156 | 156 | function geodir_cancle_replaylink($link) |
157 | 157 | { |
158 | 158 | |
159 | - $link = '<span class="gd-cancel-replaylink">' . $link . '</span>'; |
|
159 | + $link = '<span class="gd-cancel-replaylink">' . $link . '</span>'; |
|
160 | 160 | |
161 | - return $link; |
|
161 | + return $link; |
|
162 | 162 | } |
163 | 163 | |
164 | 164 | add_action('comment_post', 'geodir_save_rating'); |
@@ -174,29 +174,29 @@ discard block |
||
174 | 174 | */ |
175 | 175 | function geodir_save_rating($comment = 0) |
176 | 176 | { |
177 | - global $wpdb, $user_ID, $plugin_prefix; |
|
177 | + global $wpdb, $user_ID, $plugin_prefix; |
|
178 | 178 | |
179 | - $comment_info = get_comment($comment); |
|
179 | + $comment_info = get_comment($comment); |
|
180 | 180 | |
181 | - $post_id = $comment_info->comment_post_ID; |
|
182 | - $status = $comment_info->comment_approved; |
|
183 | - $rating_ip = getenv("REMOTE_ADDR"); |
|
181 | + $post_id = $comment_info->comment_post_ID; |
|
182 | + $status = $comment_info->comment_approved; |
|
183 | + $rating_ip = getenv("REMOTE_ADDR"); |
|
184 | 184 | |
185 | - $post = geodir_get_post_info($post_id); |
|
185 | + $post = geodir_get_post_info($post_id); |
|
186 | 186 | |
187 | - if ($post->post_status == 'publish') { |
|
188 | - $post_status = '1'; |
|
189 | - } else { |
|
190 | - $post_status = '0'; |
|
191 | - } |
|
187 | + if ($post->post_status == 'publish') { |
|
188 | + $post_status = '1'; |
|
189 | + } else { |
|
190 | + $post_status = '0'; |
|
191 | + } |
|
192 | 192 | |
193 | - if (isset($_REQUEST['geodir_overallrating'])) { |
|
194 | - $overall_rating = $_REQUEST['geodir_overallrating']; |
|
193 | + if (isset($_REQUEST['geodir_overallrating'])) { |
|
194 | + $overall_rating = $_REQUEST['geodir_overallrating']; |
|
195 | 195 | |
196 | 196 | if (isset($comment_info->comment_parent) && (int)$comment_info->comment_parent == 0) { |
197 | - $overall_rating = $overall_rating > 0 ? $overall_rating : '0'; |
|
197 | + $overall_rating = $overall_rating > 0 ? $overall_rating : '0'; |
|
198 | 198 | |
199 | - $sqlqry = $wpdb->prepare("INSERT INTO " . GEODIR_REVIEW_TABLE . " SET |
|
199 | + $sqlqry = $wpdb->prepare("INSERT INTO " . GEODIR_REVIEW_TABLE . " SET |
|
200 | 200 | post_id = %d, |
201 | 201 | post_type = %s, |
202 | 202 | post_title = %s, |
@@ -214,35 +214,35 @@ discard block |
||
214 | 214 | post_latitude = %s, |
215 | 215 | comment_content = %s |
216 | 216 | ", |
217 | - array($post_id, $post->post_type, $post->post_title, $user_ID, $comment, $rating_ip, $overall_rating, $status, $post_status, date_i18n('Y-m-d H:i:s', current_time('timestamp')), $post->post_city, $post->post_region, $post->post_country, $post->post_latitude, $post->post_longitude, $comment_info->comment_content) |
|
218 | - ); |
|
219 | - |
|
220 | - $wpdb->query($sqlqry); |
|
221 | - |
|
222 | - /** |
|
223 | - * Called after saving the comment. |
|
224 | - * |
|
225 | - * @since 1.0.0 |
|
226 | - * @package GeoDirectory |
|
227 | - * @param array $_REQUEST { |
|
228 | - * Attributes of the $_REQUEST variable. |
|
229 | - * |
|
230 | - * @type string $geodir_overallrating Overall rating. |
|
231 | - * @type string $comment Comment text. |
|
232 | - * @type string $submit Submit button text. |
|
233 | - * @type string $comment_post_ID Comment post ID. |
|
234 | - * @type string $comment_parent Comment Parent ID. |
|
235 | - * @type string $_wp_unfiltered_html_comment Unfiltered html comment string. |
|
236 | - * |
|
237 | - * } |
|
238 | - */ |
|
239 | - do_action('geodir_after_save_comment', $_REQUEST, 'Comment Your Post'); |
|
240 | - |
|
241 | - if ($status) { |
|
242 | - geodir_update_postrating($post_id); |
|
243 | - } |
|
244 | - } |
|
245 | - } |
|
217 | + array($post_id, $post->post_type, $post->post_title, $user_ID, $comment, $rating_ip, $overall_rating, $status, $post_status, date_i18n('Y-m-d H:i:s', current_time('timestamp')), $post->post_city, $post->post_region, $post->post_country, $post->post_latitude, $post->post_longitude, $comment_info->comment_content) |
|
218 | + ); |
|
219 | + |
|
220 | + $wpdb->query($sqlqry); |
|
221 | + |
|
222 | + /** |
|
223 | + * Called after saving the comment. |
|
224 | + * |
|
225 | + * @since 1.0.0 |
|
226 | + * @package GeoDirectory |
|
227 | + * @param array $_REQUEST { |
|
228 | + * Attributes of the $_REQUEST variable. |
|
229 | + * |
|
230 | + * @type string $geodir_overallrating Overall rating. |
|
231 | + * @type string $comment Comment text. |
|
232 | + * @type string $submit Submit button text. |
|
233 | + * @type string $comment_post_ID Comment post ID. |
|
234 | + * @type string $comment_parent Comment Parent ID. |
|
235 | + * @type string $_wp_unfiltered_html_comment Unfiltered html comment string. |
|
236 | + * |
|
237 | + * } |
|
238 | + */ |
|
239 | + do_action('geodir_after_save_comment', $_REQUEST, 'Comment Your Post'); |
|
240 | + |
|
241 | + if ($status) { |
|
242 | + geodir_update_postrating($post_id); |
|
243 | + } |
|
244 | + } |
|
245 | + } |
|
246 | 246 | } |
247 | 247 | |
248 | 248 | |
@@ -260,51 +260,51 @@ discard block |
||
260 | 260 | */ |
261 | 261 | function geodir_update_rating_status_change($comment_id, $status) |
262 | 262 | { |
263 | - if ($status == 'delete') { |
|
264 | - return; |
|
265 | - } |
|
266 | - global $wpdb, $plugin_prefix, $user_ID; |
|
263 | + if ($status == 'delete') { |
|
264 | + return; |
|
265 | + } |
|
266 | + global $wpdb, $plugin_prefix, $user_ID; |
|
267 | 267 | |
268 | - $comment_info = get_comment($comment_id); |
|
268 | + $comment_info = get_comment($comment_id); |
|
269 | 269 | |
270 | - $post_id = isset($comment_info->comment_post_ID) ? $comment_info->comment_post_ID : ''; |
|
270 | + $post_id = isset($comment_info->comment_post_ID) ? $comment_info->comment_post_ID : ''; |
|
271 | 271 | |
272 | - if (!empty($comment_info)) |
|
273 | - $status = $comment_info->comment_approved; |
|
272 | + if (!empty($comment_info)) |
|
273 | + $status = $comment_info->comment_approved; |
|
274 | 274 | |
275 | - if ($status == 'approve' || $status == 1) { |
|
276 | - $status = 1; |
|
277 | - } else { |
|
278 | - $status = 0; |
|
279 | - } |
|
275 | + if ($status == 'approve' || $status == 1) { |
|
276 | + $status = 1; |
|
277 | + } else { |
|
278 | + $status = 0; |
|
279 | + } |
|
280 | 280 | |
281 | - $comment_info_ID = isset($comment_info->comment_ID) ? $comment_info->comment_ID : ''; |
|
282 | - $old_rating = geodir_get_commentoverall($comment_info_ID); |
|
281 | + $comment_info_ID = isset($comment_info->comment_ID) ? $comment_info->comment_ID : ''; |
|
282 | + $old_rating = geodir_get_commentoverall($comment_info_ID); |
|
283 | 283 | |
284 | - $post_type = get_post_type($post_id); |
|
284 | + $post_type = get_post_type($post_id); |
|
285 | 285 | |
286 | - $detail_table = $plugin_prefix . $post_type . '_detail'; |
|
286 | + $detail_table = $plugin_prefix . $post_type . '_detail'; |
|
287 | 287 | |
288 | - if ($comment_id) { |
|
288 | + if ($comment_id) { |
|
289 | 289 | |
290 | - $overall_rating = $old_rating; |
|
290 | + $overall_rating = $old_rating; |
|
291 | 291 | |
292 | - if (isset($old_rating)) { |
|
292 | + if (isset($old_rating)) { |
|
293 | 293 | |
294 | - $sqlqry = $wpdb->prepare("UPDATE " . GEODIR_REVIEW_TABLE . " SET |
|
294 | + $sqlqry = $wpdb->prepare("UPDATE " . GEODIR_REVIEW_TABLE . " SET |
|
295 | 295 | overall_rating = %f, |
296 | 296 | status = %s, |
297 | 297 | comment_content = %s |
298 | 298 | WHERE comment_id = %d ", array($overall_rating, $status, $comment_info->comment_content, $comment_id)); |
299 | 299 | |
300 | - $wpdb->query($sqlqry); |
|
300 | + $wpdb->query($sqlqry); |
|
301 | 301 | |
302 | - //update rating |
|
303 | - geodir_update_postrating($post_id, $post_type); |
|
302 | + //update rating |
|
303 | + geodir_update_postrating($post_id, $post_type); |
|
304 | 304 | |
305 | - } |
|
305 | + } |
|
306 | 306 | |
307 | - } |
|
307 | + } |
|
308 | 308 | |
309 | 309 | } |
310 | 310 | |
@@ -323,41 +323,41 @@ discard block |
||
323 | 323 | function geodir_update_rating($comment_id = 0) |
324 | 324 | { |
325 | 325 | |
326 | - global $wpdb, $plugin_prefix, $user_ID; |
|
326 | + global $wpdb, $plugin_prefix, $user_ID; |
|
327 | 327 | |
328 | - $comment_info = get_comment($comment_id); |
|
328 | + $comment_info = get_comment($comment_id); |
|
329 | 329 | |
330 | - $post_id = $comment_info->comment_post_ID; |
|
331 | - $status = $comment_info->comment_approved; |
|
332 | - $old_rating = geodir_get_commentoverall($comment_info->comment_ID); |
|
330 | + $post_id = $comment_info->comment_post_ID; |
|
331 | + $status = $comment_info->comment_approved; |
|
332 | + $old_rating = geodir_get_commentoverall($comment_info->comment_ID); |
|
333 | 333 | |
334 | - $post_type = get_post_type($post_id); |
|
334 | + $post_type = get_post_type($post_id); |
|
335 | 335 | |
336 | - $detail_table = $plugin_prefix . $post_type . '_detail'; |
|
336 | + $detail_table = $plugin_prefix . $post_type . '_detail'; |
|
337 | 337 | |
338 | - if (isset($_REQUEST['geodir_overallrating'])) { |
|
338 | + if (isset($_REQUEST['geodir_overallrating'])) { |
|
339 | 339 | |
340 | - $overall_rating = $_REQUEST['geodir_overallrating']; |
|
340 | + $overall_rating = $_REQUEST['geodir_overallrating']; |
|
341 | 341 | |
342 | - if (isset($comment_info->comment_parent) && (int)$comment_info->comment_parent == 0) { |
|
343 | - $overall_rating = $overall_rating > 0 ? $overall_rating : '0'; |
|
342 | + if (isset($comment_info->comment_parent) && (int)$comment_info->comment_parent == 0) { |
|
343 | + $overall_rating = $overall_rating > 0 ? $overall_rating : '0'; |
|
344 | 344 | |
345 | - if (isset($old_rating)) { |
|
345 | + if (isset($old_rating)) { |
|
346 | 346 | |
347 | - $sqlqry = $wpdb->prepare("UPDATE " . GEODIR_REVIEW_TABLE . " SET |
|
347 | + $sqlqry = $wpdb->prepare("UPDATE " . GEODIR_REVIEW_TABLE . " SET |
|
348 | 348 | overall_rating = %f, |
349 | 349 | status = %s, |
350 | 350 | comment_content = %s |
351 | 351 | WHERE comment_id = %d ", array($overall_rating, $status, $comment_info->comment_content, $comment_id)); |
352 | 352 | |
353 | - $wpdb->query($sqlqry); |
|
353 | + $wpdb->query($sqlqry); |
|
354 | 354 | |
355 | - //update rating |
|
356 | - geodir_update_postrating($post_id, $post_type); |
|
355 | + //update rating |
|
356 | + geodir_update_postrating($post_id, $post_type); |
|
357 | 357 | |
358 | - } |
|
359 | - } |
|
360 | - } |
|
358 | + } |
|
359 | + } |
|
360 | + } |
|
361 | 361 | |
362 | 362 | |
363 | 363 | } |
@@ -373,19 +373,19 @@ discard block |
||
373 | 373 | */ |
374 | 374 | function geodir_comment_delete_comment($comment_id) |
375 | 375 | { |
376 | - global $wpdb; |
|
376 | + global $wpdb; |
|
377 | 377 | |
378 | - $review_info = geodir_get_review($comment_id); |
|
379 | - if ($review_info) { |
|
380 | - geodir_update_postrating($review_info->post_id); |
|
381 | - } |
|
378 | + $review_info = geodir_get_review($comment_id); |
|
379 | + if ($review_info) { |
|
380 | + geodir_update_postrating($review_info->post_id); |
|
381 | + } |
|
382 | 382 | |
383 | - $wpdb->query( |
|
384 | - $wpdb->prepare( |
|
385 | - "DELETE FROM " . GEODIR_REVIEW_TABLE . " WHERE comment_id=%d", |
|
386 | - array($comment_id) |
|
387 | - ) |
|
388 | - ); |
|
383 | + $wpdb->query( |
|
384 | + $wpdb->prepare( |
|
385 | + "DELETE FROM " . GEODIR_REVIEW_TABLE . " WHERE comment_id=%d", |
|
386 | + array($comment_id) |
|
387 | + ) |
|
388 | + ); |
|
389 | 389 | |
390 | 390 | } |
391 | 391 | |
@@ -401,13 +401,13 @@ discard block |
||
401 | 401 | */ |
402 | 402 | function geodir_wrap_comment_text($content, $comment = '') |
403 | 403 | { |
404 | - $rating = 0; |
|
405 | - if (!empty($comment)) |
|
406 | - $rating = geodir_get_commentoverall($comment->comment_ID); |
|
407 | - if ($rating != 0 && !is_admin()) { |
|
408 | - return '<div><div class="gd-rating-text">' . __('Overall Rating', 'geodirectory') . ': <div class="rating">' . $rating . '</div></div>' . geodir_get_rating_stars($rating, $comment->comment_ID) . '</div><div class="description">' . $content . '</div>'; |
|
409 | - } else |
|
410 | - return $content; |
|
404 | + $rating = 0; |
|
405 | + if (!empty($comment)) |
|
406 | + $rating = geodir_get_commentoverall($comment->comment_ID); |
|
407 | + if ($rating != 0 && !is_admin()) { |
|
408 | + return '<div><div class="gd-rating-text">' . __('Overall Rating', 'geodirectory') . ': <div class="rating">' . $rating . '</div></div>' . geodir_get_rating_stars($rating, $comment->comment_ID) . '</div><div class="description">' . $content . '</div>'; |
|
409 | + } else |
|
410 | + return $content; |
|
411 | 411 | |
412 | 412 | } |
413 | 413 | |
@@ -425,41 +425,41 @@ discard block |
||
425 | 425 | */ |
426 | 426 | function geodir_update_postrating($post_id = 0, $post_type = '', $delete = false) |
427 | 427 | { |
428 | - global $wpdb, $plugin_prefix, $comment; |
|
429 | - if (!$post_type) { |
|
430 | - $post_type = get_post_type($post_id); |
|
431 | - } |
|
432 | - $detail_table = $plugin_prefix . $post_type . '_detail'; |
|
433 | - $post_newrating = geodir_get_post_rating($post_id, 1); |
|
434 | - $post_newrating_count = geodir_get_review_count_total($post_id); |
|
428 | + global $wpdb, $plugin_prefix, $comment; |
|
429 | + if (!$post_type) { |
|
430 | + $post_type = get_post_type($post_id); |
|
431 | + } |
|
432 | + $detail_table = $plugin_prefix . $post_type . '_detail'; |
|
433 | + $post_newrating = geodir_get_post_rating($post_id, 1); |
|
434 | + $post_newrating_count = geodir_get_review_count_total($post_id); |
|
435 | 435 | |
436 | 436 | |
437 | - //$post_newrating = ( (float)$post_oldrating - (float)$old_rating ) + (float)$overall_rating ; |
|
437 | + //$post_newrating = ( (float)$post_oldrating - (float)$old_rating ) + (float)$overall_rating ; |
|
438 | 438 | |
439 | - if ($wpdb->get_var("SHOW TABLES LIKE '" . $detail_table . "'") == $detail_table) { |
|
439 | + if ($wpdb->get_var("SHOW TABLES LIKE '" . $detail_table . "'") == $detail_table) { |
|
440 | 440 | |
441 | - $wpdb->query( |
|
442 | - $wpdb->prepare( |
|
443 | - "UPDATE " . $detail_table . " SET |
|
441 | + $wpdb->query( |
|
442 | + $wpdb->prepare( |
|
443 | + "UPDATE " . $detail_table . " SET |
|
444 | 444 | overall_rating = %f, |
445 | 445 | rating_count = %f |
446 | 446 | where post_id = %d", |
447 | - array($post_newrating, $post_newrating_count, $post_id) |
|
448 | - ) |
|
449 | - ); |
|
450 | - |
|
451 | - update_post_meta($post_id, 'overall_rating', $post_newrating); |
|
452 | - update_post_meta($post_id, 'rating_count', $post_newrating_count); |
|
453 | - } |
|
454 | - /** |
|
455 | - * Called after Updating post overall rating and rating count. |
|
456 | - * |
|
457 | - * @since 1.0.0 |
|
458 | - * @since 1.4.3 Added `$post_id` param. |
|
459 | - * @package GeoDirectory |
|
460 | - * @param int $post_id The post ID. |
|
461 | - */ |
|
462 | - do_action('geodir_update_postrating',$post_id); |
|
447 | + array($post_newrating, $post_newrating_count, $post_id) |
|
448 | + ) |
|
449 | + ); |
|
450 | + |
|
451 | + update_post_meta($post_id, 'overall_rating', $post_newrating); |
|
452 | + update_post_meta($post_id, 'rating_count', $post_newrating_count); |
|
453 | + } |
|
454 | + /** |
|
455 | + * Called after Updating post overall rating and rating count. |
|
456 | + * |
|
457 | + * @since 1.0.0 |
|
458 | + * @since 1.4.3 Added `$post_id` param. |
|
459 | + * @package GeoDirectory |
|
460 | + * @param int $post_id The post ID. |
|
461 | + */ |
|
462 | + do_action('geodir_update_postrating',$post_id); |
|
463 | 463 | |
464 | 464 | } |
465 | 465 | |
@@ -477,29 +477,29 @@ discard block |
||
477 | 477 | */ |
478 | 478 | function geodir_get_postoverall($post_id = 0) |
479 | 479 | { |
480 | - global $wpdb, $plugin_prefix; |
|
480 | + global $wpdb, $plugin_prefix; |
|
481 | 481 | |
482 | - $post_type = get_post_type($post_id); |
|
483 | - $detail_table = $plugin_prefix . $post_type . '_detail'; |
|
482 | + $post_type = get_post_type($post_id); |
|
483 | + $detail_table = $plugin_prefix . $post_type . '_detail'; |
|
484 | 484 | |
485 | - if ($wpdb->get_var("SHOW TABLES LIKE '" . $detail_table . "'") == $detail_table) { |
|
485 | + if ($wpdb->get_var("SHOW TABLES LIKE '" . $detail_table . "'") == $detail_table) { |
|
486 | 486 | |
487 | - $post_ratings = $wpdb->get_var( |
|
488 | - $wpdb->prepare( |
|
489 | - "SELECT overall_rating FROM " . $detail_table . " WHERE post_id = %d", |
|
490 | - array($post_id) |
|
491 | - ) |
|
492 | - ); |
|
487 | + $post_ratings = $wpdb->get_var( |
|
488 | + $wpdb->prepare( |
|
489 | + "SELECT overall_rating FROM " . $detail_table . " WHERE post_id = %d", |
|
490 | + array($post_id) |
|
491 | + ) |
|
492 | + ); |
|
493 | 493 | |
494 | 494 | |
495 | - } else { |
|
496 | - $post_ratings = get_post_meta($post_id, 'overall_rating'); |
|
497 | - } |
|
495 | + } else { |
|
496 | + $post_ratings = get_post_meta($post_id, 'overall_rating'); |
|
497 | + } |
|
498 | 498 | |
499 | - if ($post_ratings) |
|
500 | - return $post_ratings; |
|
501 | - else |
|
502 | - return false; |
|
499 | + if ($post_ratings) |
|
500 | + return $post_ratings; |
|
501 | + else |
|
502 | + return false; |
|
503 | 503 | } |
504 | 504 | |
505 | 505 | |
@@ -516,19 +516,19 @@ discard block |
||
516 | 516 | */ |
517 | 517 | function geodir_get_review($comment_id = 0) |
518 | 518 | { |
519 | - global $wpdb; |
|
520 | - |
|
521 | - $reatings = $wpdb->get_row( |
|
522 | - $wpdb->prepare( |
|
523 | - "SELECT * FROM " . GEODIR_REVIEW_TABLE . " WHERE comment_id = %d", |
|
524 | - array($comment_id) |
|
525 | - ) |
|
526 | - ); |
|
527 | - |
|
528 | - if (!empty($reatings)) |
|
529 | - return $reatings; |
|
530 | - else |
|
531 | - return false; |
|
519 | + global $wpdb; |
|
520 | + |
|
521 | + $reatings = $wpdb->get_row( |
|
522 | + $wpdb->prepare( |
|
523 | + "SELECT * FROM " . GEODIR_REVIEW_TABLE . " WHERE comment_id = %d", |
|
524 | + array($comment_id) |
|
525 | + ) |
|
526 | + ); |
|
527 | + |
|
528 | + if (!empty($reatings)) |
|
529 | + return $reatings; |
|
530 | + else |
|
531 | + return false; |
|
532 | 532 | } |
533 | 533 | |
534 | 534 | /** |
@@ -544,19 +544,19 @@ discard block |
||
544 | 544 | */ |
545 | 545 | function geodir_get_review_total($post_id = 0) |
546 | 546 | { |
547 | - global $wpdb; |
|
548 | - |
|
549 | - $results = $wpdb->get_var( |
|
550 | - $wpdb->prepare( |
|
551 | - "SELECT SUM(overall_rating) FROM " . GEODIR_REVIEW_TABLE . " WHERE post_id = %d AND status=1 AND overall_rating>0", |
|
552 | - array($post_id) |
|
553 | - ) |
|
554 | - ); |
|
555 | - |
|
556 | - if (!empty($results)) |
|
557 | - return $results; |
|
558 | - else |
|
559 | - return false; |
|
547 | + global $wpdb; |
|
548 | + |
|
549 | + $results = $wpdb->get_var( |
|
550 | + $wpdb->prepare( |
|
551 | + "SELECT SUM(overall_rating) FROM " . GEODIR_REVIEW_TABLE . " WHERE post_id = %d AND status=1 AND overall_rating>0", |
|
552 | + array($post_id) |
|
553 | + ) |
|
554 | + ); |
|
555 | + |
|
556 | + if (!empty($results)) |
|
557 | + return $results; |
|
558 | + else |
|
559 | + return false; |
|
560 | 560 | } |
561 | 561 | |
562 | 562 | /** |
@@ -572,18 +572,18 @@ discard block |
||
572 | 572 | */ |
573 | 573 | function geodir_get_review_count_by_user_id($user_id = 0) |
574 | 574 | { |
575 | - global $wpdb; |
|
576 | - $results = $wpdb->get_var( |
|
577 | - $wpdb->prepare( |
|
578 | - "SELECT COUNT(overall_rating) FROM " . GEODIR_REVIEW_TABLE . " WHERE user_id = %d AND status=1 AND overall_rating>0", |
|
579 | - array($user_id) |
|
580 | - ) |
|
581 | - ); |
|
582 | - |
|
583 | - if (!empty($results)) |
|
584 | - return $results; |
|
585 | - else |
|
586 | - return false; |
|
575 | + global $wpdb; |
|
576 | + $results = $wpdb->get_var( |
|
577 | + $wpdb->prepare( |
|
578 | + "SELECT COUNT(overall_rating) FROM " . GEODIR_REVIEW_TABLE . " WHERE user_id = %d AND status=1 AND overall_rating>0", |
|
579 | + array($user_id) |
|
580 | + ) |
|
581 | + ); |
|
582 | + |
|
583 | + if (!empty($results)) |
|
584 | + return $results; |
|
585 | + else |
|
586 | + return false; |
|
587 | 587 | } |
588 | 588 | |
589 | 589 | /** |
@@ -601,27 +601,27 @@ discard block |
||
601 | 601 | */ |
602 | 602 | function geodir_get_post_rating($post_id = 0, $force_query = 0) |
603 | 603 | { |
604 | - global $wpdb, $post; |
|
605 | - |
|
606 | - if (isset($post->ID) && $post->ID == $post_id && !$force_query) { |
|
607 | - if (isset($post->rating_count) && $post->rating_count > 0 && isset($post->overall_rating) && $post->overall_rating > 0) { |
|
608 | - return $post->overall_rating; |
|
609 | - } else { |
|
610 | - return 0; |
|
611 | - } |
|
612 | - } |
|
613 | - |
|
614 | - $results = $wpdb->get_var( |
|
615 | - $wpdb->prepare( |
|
616 | - "SELECT COALESCE(avg(overall_rating),0) FROM " . GEODIR_REVIEW_TABLE . " WHERE post_id = %d AND status=1 AND overall_rating>0", |
|
617 | - array($post_id) |
|
618 | - ) |
|
619 | - ); |
|
620 | - |
|
621 | - if (!empty($results)) |
|
622 | - return $results; |
|
623 | - else |
|
624 | - return false; |
|
604 | + global $wpdb, $post; |
|
605 | + |
|
606 | + if (isset($post->ID) && $post->ID == $post_id && !$force_query) { |
|
607 | + if (isset($post->rating_count) && $post->rating_count > 0 && isset($post->overall_rating) && $post->overall_rating > 0) { |
|
608 | + return $post->overall_rating; |
|
609 | + } else { |
|
610 | + return 0; |
|
611 | + } |
|
612 | + } |
|
613 | + |
|
614 | + $results = $wpdb->get_var( |
|
615 | + $wpdb->prepare( |
|
616 | + "SELECT COALESCE(avg(overall_rating),0) FROM " . GEODIR_REVIEW_TABLE . " WHERE post_id = %d AND status=1 AND overall_rating>0", |
|
617 | + array($post_id) |
|
618 | + ) |
|
619 | + ); |
|
620 | + |
|
621 | + if (!empty($results)) |
|
622 | + return $results; |
|
623 | + else |
|
624 | + return false; |
|
625 | 625 | } |
626 | 626 | |
627 | 627 | /** |
@@ -637,19 +637,19 @@ discard block |
||
637 | 637 | */ |
638 | 638 | function geodir_get_review_count_total($post_id = 0) |
639 | 639 | { |
640 | - global $wpdb; |
|
641 | - |
|
642 | - $results = $wpdb->get_var( |
|
643 | - $wpdb->prepare( |
|
644 | - "SELECT COUNT(overall_rating) FROM " . GEODIR_REVIEW_TABLE . " WHERE post_id = %d AND status=1 AND overall_rating>0", |
|
645 | - array($post_id) |
|
646 | - ) |
|
647 | - ); |
|
648 | - |
|
649 | - if (!empty($results)) |
|
650 | - return $results; |
|
651 | - else |
|
652 | - return false; |
|
640 | + global $wpdb; |
|
641 | + |
|
642 | + $results = $wpdb->get_var( |
|
643 | + $wpdb->prepare( |
|
644 | + "SELECT COUNT(overall_rating) FROM " . GEODIR_REVIEW_TABLE . " WHERE post_id = %d AND status=1 AND overall_rating>0", |
|
645 | + array($post_id) |
|
646 | + ) |
|
647 | + ); |
|
648 | + |
|
649 | + if (!empty($results)) |
|
650 | + return $results; |
|
651 | + else |
|
652 | + return false; |
|
653 | 653 | } |
654 | 654 | |
655 | 655 | /** |
@@ -666,20 +666,20 @@ discard block |
||
666 | 666 | */ |
667 | 667 | function geodir_get_comments_number($post_id = 0) |
668 | 668 | { |
669 | - global $wpdb; |
|
669 | + global $wpdb; |
|
670 | 670 | |
671 | - $results = $wpdb->get_var( |
|
672 | - $wpdb->prepare( |
|
673 | - "SELECT COUNT(overall_rating) FROM " . GEODIR_REVIEW_TABLE . " WHERE post_id = %d AND status=1 AND overall_rating>0", |
|
674 | - array($post_id) |
|
675 | - ) |
|
676 | - ); |
|
671 | + $results = $wpdb->get_var( |
|
672 | + $wpdb->prepare( |
|
673 | + "SELECT COUNT(overall_rating) FROM " . GEODIR_REVIEW_TABLE . " WHERE post_id = %d AND status=1 AND overall_rating>0", |
|
674 | + array($post_id) |
|
675 | + ) |
|
676 | + ); |
|
677 | 677 | |
678 | 678 | |
679 | - if (!empty($results)) |
|
680 | - return $results; |
|
681 | - else |
|
682 | - return false; |
|
679 | + if (!empty($results)) |
|
680 | + return $results; |
|
681 | + else |
|
682 | + return false; |
|
683 | 683 | } |
684 | 684 | |
685 | 685 | /** |
@@ -695,19 +695,19 @@ discard block |
||
695 | 695 | */ |
696 | 696 | function geodir_get_commentoverall($comment_id = 0) |
697 | 697 | { |
698 | - global $wpdb; |
|
699 | - |
|
700 | - $reatings = $wpdb->get_var( |
|
701 | - $wpdb->prepare( |
|
702 | - "SELECT overall_rating FROM " . GEODIR_REVIEW_TABLE . " WHERE comment_id = %d", |
|
703 | - array($comment_id) |
|
704 | - ) |
|
705 | - ); |
|
706 | - |
|
707 | - if ($reatings) |
|
708 | - return $reatings; |
|
709 | - else |
|
710 | - return false; |
|
698 | + global $wpdb; |
|
699 | + |
|
700 | + $reatings = $wpdb->get_var( |
|
701 | + $wpdb->prepare( |
|
702 | + "SELECT overall_rating FROM " . GEODIR_REVIEW_TABLE . " WHERE comment_id = %d", |
|
703 | + array($comment_id) |
|
704 | + ) |
|
705 | + ); |
|
706 | + |
|
707 | + if ($reatings) |
|
708 | + return $reatings; |
|
709 | + else |
|
710 | + return false; |
|
711 | 711 | } |
712 | 712 | |
713 | 713 | /** |
@@ -721,7 +721,7 @@ discard block |
||
721 | 721 | */ |
722 | 722 | function geodir_get_commentoverall_number($post_id = 0) |
723 | 723 | { |
724 | - return geodir_get_post_rating($post_id); |
|
724 | + return geodir_get_post_rating($post_id); |
|
725 | 725 | } |
726 | 726 | |
727 | 727 | |
@@ -739,98 +739,98 @@ discard block |
||
739 | 739 | */ |
740 | 740 | function geodir_comment_template($comment_template) |
741 | 741 | { |
742 | - global $post; |
|
743 | - |
|
744 | - $post_types = geodir_get_posttypes(); |
|
745 | - |
|
746 | - if (!(is_singular() && (have_comments() || (isset($post->comment_status) && 'open' == $post->comment_status)))) { |
|
747 | - return; |
|
748 | - } |
|
749 | - if (in_array($post->post_type, $post_types)) { // assuming there is a post type called business |
|
750 | - $template = locate_template(array("geodirectory/reviews.php")); // Use theme template if available |
|
751 | - if (!$template) { |
|
752 | - $template = dirname(__FILE__) . '/reviews.php'; |
|
753 | - } |
|
754 | - return $template; |
|
755 | - } |
|
742 | + global $post; |
|
743 | + |
|
744 | + $post_types = geodir_get_posttypes(); |
|
745 | + |
|
746 | + if (!(is_singular() && (have_comments() || (isset($post->comment_status) && 'open' == $post->comment_status)))) { |
|
747 | + return; |
|
748 | + } |
|
749 | + if (in_array($post->post_type, $post_types)) { // assuming there is a post type called business |
|
750 | + $template = locate_template(array("geodirectory/reviews.php")); // Use theme template if available |
|
751 | + if (!$template) { |
|
752 | + $template = dirname(__FILE__) . '/reviews.php'; |
|
753 | + } |
|
754 | + return $template; |
|
755 | + } |
|
756 | 756 | } |
757 | 757 | |
758 | 758 | add_filter("comments_template", "geodir_comment_template"); |
759 | 759 | |
760 | 760 | |
761 | 761 | if (!function_exists('geodir_comment')) { |
762 | - /** |
|
763 | - * Comment HTML markup. |
|
764 | - * |
|
765 | - * @since 1.0.0 |
|
766 | - * @package GeoDirectory |
|
767 | - * @global object $post The current post object. |
|
768 | - * @param object $comment The comment object. |
|
769 | - * @param string|array $args { |
|
770 | - * Optional. Formatting options. |
|
771 | - * |
|
772 | - * @type object $walker Instance of a Walker class to list comments. Default null. |
|
773 | - * @type int $max_depth The maximum comments depth. Default empty. |
|
774 | - * @type string $style The style of list ordering. Default 'ul'. Accepts 'ul', 'ol'. |
|
775 | - * @type string $callback Callback function to use. Default null. |
|
776 | - * @type string $end-callback Callback function to use at the end. Default null. |
|
777 | - * @type string $type Type of comments to list. |
|
778 | - * Default 'all'. Accepts 'all', 'comment', 'pingback', 'trackback', 'pings'. |
|
779 | - * @type int $page Page ID to list comments for. Default empty. |
|
780 | - * @type int $per_page Number of comments to list per page. Default empty. |
|
781 | - * @type int $avatar_size Height and width dimensions of the avatar size. Default 32. |
|
782 | - * @type string $reverse_top_level Ordering of the listed comments. Default null. Accepts 'desc', 'asc'. |
|
783 | - * @type bool $reverse_children Whether to reverse child comments in the list. Default null. |
|
784 | - * @type string $format How to format the comments list. |
|
785 | - * Default 'html5' if the theme supports it. Accepts 'html5', 'xhtml'. |
|
786 | - * @type bool $short_ping Whether to output short pings. Default false. |
|
787 | - * @type bool $echo Whether to echo the output or return it. Default true. |
|
788 | - * } |
|
789 | - * @param int $depth Depth of comment. |
|
790 | - */ |
|
791 | - function geodir_comment($comment, $args, $depth) |
|
792 | - { |
|
793 | - $GLOBALS['comment'] = $comment; |
|
794 | - switch ($comment->comment_type) : |
|
795 | - case 'pingback' : |
|
796 | - case 'trackback' : |
|
797 | - // Display trackbacks differently than normal comments. |
|
798 | - ?> |
|
762 | + /** |
|
763 | + * Comment HTML markup. |
|
764 | + * |
|
765 | + * @since 1.0.0 |
|
766 | + * @package GeoDirectory |
|
767 | + * @global object $post The current post object. |
|
768 | + * @param object $comment The comment object. |
|
769 | + * @param string|array $args { |
|
770 | + * Optional. Formatting options. |
|
771 | + * |
|
772 | + * @type object $walker Instance of a Walker class to list comments. Default null. |
|
773 | + * @type int $max_depth The maximum comments depth. Default empty. |
|
774 | + * @type string $style The style of list ordering. Default 'ul'. Accepts 'ul', 'ol'. |
|
775 | + * @type string $callback Callback function to use. Default null. |
|
776 | + * @type string $end-callback Callback function to use at the end. Default null. |
|
777 | + * @type string $type Type of comments to list. |
|
778 | + * Default 'all'. Accepts 'all', 'comment', 'pingback', 'trackback', 'pings'. |
|
779 | + * @type int $page Page ID to list comments for. Default empty. |
|
780 | + * @type int $per_page Number of comments to list per page. Default empty. |
|
781 | + * @type int $avatar_size Height and width dimensions of the avatar size. Default 32. |
|
782 | + * @type string $reverse_top_level Ordering of the listed comments. Default null. Accepts 'desc', 'asc'. |
|
783 | + * @type bool $reverse_children Whether to reverse child comments in the list. Default null. |
|
784 | + * @type string $format How to format the comments list. |
|
785 | + * Default 'html5' if the theme supports it. Accepts 'html5', 'xhtml'. |
|
786 | + * @type bool $short_ping Whether to output short pings. Default false. |
|
787 | + * @type bool $echo Whether to echo the output or return it. Default true. |
|
788 | + * } |
|
789 | + * @param int $depth Depth of comment. |
|
790 | + */ |
|
791 | + function geodir_comment($comment, $args, $depth) |
|
792 | + { |
|
793 | + $GLOBALS['comment'] = $comment; |
|
794 | + switch ($comment->comment_type) : |
|
795 | + case 'pingback' : |
|
796 | + case 'trackback' : |
|
797 | + // Display trackbacks differently than normal comments. |
|
798 | + ?> |
|
799 | 799 | <li <?php comment_class('geodir-comment'); ?> id="comment-<?php comment_ID(); ?>"> |
800 | 800 | <p><?php _e('Pingback:', 'geodirectory'); ?> <?php comment_author_link(); ?> <?php edit_comment_link(__('(Edit)', 'geodirectory'), '<span class="edit-link">', '</span>'); ?></p> |
801 | 801 | <?php |
802 | - break; |
|
803 | - default : |
|
804 | - // Proceed with normal comments. |
|
805 | - global $post; |
|
806 | - ?> |
|
802 | + break; |
|
803 | + default : |
|
804 | + // Proceed with normal comments. |
|
805 | + global $post; |
|
806 | + ?> |
|
807 | 807 | <li <?php comment_class('geodir-comment'); ?> id="li-comment-<?php comment_ID(); ?>"> |
808 | 808 | <article id="comment-<?php comment_ID(); ?>" class="comment hreview"> |
809 | 809 | <header class="comment-meta comment-author vcard"> |
810 | 810 | <?php |
811 | - /** |
|
812 | - * Filter to modify comment avatar size |
|
813 | - * |
|
814 | - * You can use this filter to change comment avatar size. |
|
815 | - * |
|
816 | - * @since 1.0.0 |
|
817 | - * @package GeoDirectory |
|
818 | - */ |
|
819 | - $avatar_size = apply_filters('geodir_comment_avatar_size', 44); |
|
820 | - echo get_avatar($comment, $avatar_size); |
|
821 | - printf('<cite><b class="reviewer">%1$s</b> %2$s</cite>', |
|
822 | - get_comment_author_link(), |
|
823 | - // If current post author is also comment author, make it known visually. |
|
824 | - ($comment->user_id === $post->post_author) ? '<span>' . __('Post author', 'geodirectory') . '</span>' : '' |
|
825 | - ); |
|
826 | - echo "<span class='item'><small><span class='fn'>$post->post_title</span></small></span>"; |
|
827 | - printf('<a href="%1$s"><time datetime="%2$s" class="dtreviewed">%3$s<span class="value-title" title="%2$s"></span></time></a>', |
|
828 | - esc_url(get_comment_link($comment->comment_ID)), |
|
829 | - get_comment_time('c'), |
|
830 | - /* translators: 1: date, 2: time */ |
|
831 | - sprintf(__('%1$s at %2$s', 'geodirectory'), get_comment_date(), get_comment_time()) |
|
832 | - ); |
|
833 | - ?> |
|
811 | + /** |
|
812 | + * Filter to modify comment avatar size |
|
813 | + * |
|
814 | + * You can use this filter to change comment avatar size. |
|
815 | + * |
|
816 | + * @since 1.0.0 |
|
817 | + * @package GeoDirectory |
|
818 | + */ |
|
819 | + $avatar_size = apply_filters('geodir_comment_avatar_size', 44); |
|
820 | + echo get_avatar($comment, $avatar_size); |
|
821 | + printf('<cite><b class="reviewer">%1$s</b> %2$s</cite>', |
|
822 | + get_comment_author_link(), |
|
823 | + // If current post author is also comment author, make it known visually. |
|
824 | + ($comment->user_id === $post->post_author) ? '<span>' . __('Post author', 'geodirectory') . '</span>' : '' |
|
825 | + ); |
|
826 | + echo "<span class='item'><small><span class='fn'>$post->post_title</span></small></span>"; |
|
827 | + printf('<a href="%1$s"><time datetime="%2$s" class="dtreviewed">%3$s<span class="value-title" title="%2$s"></span></time></a>', |
|
828 | + esc_url(get_comment_link($comment->comment_ID)), |
|
829 | + get_comment_time('c'), |
|
830 | + /* translators: 1: date, 2: time */ |
|
831 | + sprintf(__('%1$s at %2$s', 'geodirectory'), get_comment_date(), get_comment_time()) |
|
832 | + ); |
|
833 | + ?> |
|
834 | 834 | </header> |
835 | 835 | <!-- .comment-meta --> |
836 | 836 | |
@@ -854,47 +854,47 @@ discard block |
||
854 | 854 | </article> |
855 | 855 | <!-- #comment-## --> |
856 | 856 | <?php |
857 | - break; |
|
858 | - endswitch; // end comment_type check |
|
859 | - } |
|
857 | + break; |
|
858 | + endswitch; // end comment_type check |
|
859 | + } |
|
860 | 860 | } |
861 | 861 | |
862 | 862 | |
863 | 863 | add_filter('get_comments_number', 'geodir_fix_comment_count', 10, 2); |
864 | 864 | if (!function_exists('geodir_fix_comment_count')) { |
865 | - /** |
|
866 | - * Fix comment count by not listing replies as reviews |
|
867 | - * |
|
868 | - * @since 1.0.0 |
|
869 | - * @package GeoDirectory |
|
870 | - * @global object $post The current post object. |
|
871 | - * @param int $count The comment count. |
|
872 | - * @param int $post_id The post ID. |
|
873 | - * @todo $post is unreachable since the function return the count before that variable. |
|
874 | - * @return bool|null|string The comment count. |
|
875 | - */ |
|
876 | - function geodir_fix_comment_count($count, $post_id) |
|
877 | - { |
|
878 | - if (!is_admin() || strpos($_SERVER['REQUEST_URI'], 'admin-ajax.php')) { |
|
879 | - global $post; |
|
880 | - $post_types = geodir_get_posttypes(); |
|
881 | - |
|
882 | - if (in_array(get_post_type($post_id), $post_types)) { |
|
883 | - $review_count = geodir_get_review_count_total($post_id); |
|
884 | - return $review_count; |
|
885 | - |
|
886 | - if ($post && isset($post->rating_count)) { |
|
887 | - return $post->rating_count; |
|
888 | - } else { |
|
889 | - return geodir_get_comments_number($post_id); |
|
890 | - } |
|
891 | - } else { |
|
892 | - return $count; |
|
893 | - } |
|
894 | - } else { |
|
895 | - return $count; |
|
896 | - } |
|
897 | - } |
|
865 | + /** |
|
866 | + * Fix comment count by not listing replies as reviews |
|
867 | + * |
|
868 | + * @since 1.0.0 |
|
869 | + * @package GeoDirectory |
|
870 | + * @global object $post The current post object. |
|
871 | + * @param int $count The comment count. |
|
872 | + * @param int $post_id The post ID. |
|
873 | + * @todo $post is unreachable since the function return the count before that variable. |
|
874 | + * @return bool|null|string The comment count. |
|
875 | + */ |
|
876 | + function geodir_fix_comment_count($count, $post_id) |
|
877 | + { |
|
878 | + if (!is_admin() || strpos($_SERVER['REQUEST_URI'], 'admin-ajax.php')) { |
|
879 | + global $post; |
|
880 | + $post_types = geodir_get_posttypes(); |
|
881 | + |
|
882 | + if (in_array(get_post_type($post_id), $post_types)) { |
|
883 | + $review_count = geodir_get_review_count_total($post_id); |
|
884 | + return $review_count; |
|
885 | + |
|
886 | + if ($post && isset($post->rating_count)) { |
|
887 | + return $post->rating_count; |
|
888 | + } else { |
|
889 | + return geodir_get_comments_number($post_id); |
|
890 | + } |
|
891 | + } else { |
|
892 | + return $count; |
|
893 | + } |
|
894 | + } else { |
|
895 | + return $count; |
|
896 | + } |
|
897 | + } |
|
898 | 898 | } |
899 | 899 | |
900 | 900 | /** |
@@ -911,11 +911,11 @@ discard block |
||
911 | 911 | */ |
912 | 912 | function geodir_get_rating_stars($rating, $post_id, $small = false) |
913 | 913 | { |
914 | - $a_rating = $rating / 5 * 100; |
|
914 | + $a_rating = $rating / 5 * 100; |
|
915 | 915 | |
916 | - if ($small) { |
|
917 | - $r_html = '<div class="rating"><div class="gd_rating_map" data-average="' . $rating . '" data-id="' . $post_id . '"><div class="geodir_RatingColor" ></div><div class="geodir_RatingAverage_small" style="width: ' . $a_rating . '%;"></div><div class="geodir_Star_small"></div></div></div>'; |
|
918 | - } else { |
|
916 | + if ($small) { |
|
917 | + $r_html = '<div class="rating"><div class="gd_rating_map" data-average="' . $rating . '" data-id="' . $post_id . '"><div class="geodir_RatingColor" ></div><div class="geodir_RatingAverage_small" style="width: ' . $a_rating . '%;"></div><div class="geodir_Star_small"></div></div></div>'; |
|
918 | + } else { |
|
919 | 919 | if (function_exists('geodir_reviewrating_draw_overall_rating')) { |
920 | 920 | // Show rating stars from review rating manager |
921 | 921 | $r_html = geodir_reviewrating_draw_overall_rating($rating); |
@@ -933,8 +933,8 @@ discard block |
||
933 | 933 | } |
934 | 934 | $r_html = '<div class="geodir-rating" style="' . $attach_style . '"><div class="gd_rating_show" data-average="' . $rating . '" data-id="' . $post_id . '"><div class="geodir_RatingAverage" style="width: ' . $a_rating . '%;"></div><div class="geodir_Star">' . $rating_img . $rating_img . $rating_img . $rating_img . $rating_img . '</div></div></div>'; |
935 | 935 | } |
936 | - } |
|
937 | - return apply_filters('geodir_get_rating_stars_html', $r_html, $rating, 5); |
|
936 | + } |
|
937 | + return apply_filters('geodir_get_rating_stars_html', $r_html, $rating, 5); |
|
938 | 938 | } |
939 | 939 | |
940 | 940 | /** |
@@ -948,23 +948,23 @@ discard block |
||
948 | 948 | function geodir_is_reviews_show($pageview = '') |
949 | 949 | { |
950 | 950 | |
951 | - $active_tabs = get_option('geodir_detail_page_tabs_excluded'); |
|
952 | - |
|
953 | - $is_display = true; |
|
954 | - if (!empty($active_tabs) && in_array('reviews', $active_tabs)) |
|
955 | - $is_display = false; |
|
956 | - |
|
957 | - /** |
|
958 | - * Filter to change display value. |
|
959 | - * |
|
960 | - * You can use this filter to change the is_display value. |
|
961 | - * |
|
962 | - * @since 1.0.0 |
|
963 | - * @package GeoDirectory |
|
964 | - * @param bool $is_display Display ratings when set to true. |
|
965 | - * @param string $pageview The view template. Ex: listview, gridview etc. |
|
966 | - */ |
|
967 | - return apply_filters('geodir_is_reviews_show', $is_display, $pageview); |
|
951 | + $active_tabs = get_option('geodir_detail_page_tabs_excluded'); |
|
952 | + |
|
953 | + $is_display = true; |
|
954 | + if (!empty($active_tabs) && in_array('reviews', $active_tabs)) |
|
955 | + $is_display = false; |
|
956 | + |
|
957 | + /** |
|
958 | + * Filter to change display value. |
|
959 | + * |
|
960 | + * You can use this filter to change the is_display value. |
|
961 | + * |
|
962 | + * @since 1.0.0 |
|
963 | + * @package GeoDirectory |
|
964 | + * @param bool $is_display Display ratings when set to true. |
|
965 | + * @param string $pageview The view template. Ex: listview, gridview etc. |
|
966 | + */ |
|
967 | + return apply_filters('geodir_is_reviews_show', $is_display, $pageview); |
|
968 | 968 | } |
969 | 969 | |
970 | 970 | |
@@ -972,9 +972,9 @@ discard block |
||
972 | 972 | * If Disqus plugin is active, do some fixes to show on blogs but no on GD post types |
973 | 973 | */ |
974 | 974 | if(function_exists('dsq_can_replace')) { |
975 | - remove_filter('comments_template', 'dsq_comments_template'); |
|
976 | - add_filter('comments_template', 'dsq_comments_template', 100); |
|
977 | - add_filter('pre_option_disqus_active', 'geodir_option_disqus_active',10,1); |
|
975 | + remove_filter('comments_template', 'dsq_comments_template'); |
|
976 | + add_filter('comments_template', 'dsq_comments_template', 100); |
|
977 | + add_filter('pre_option_disqus_active', 'geodir_option_disqus_active',10,1); |
|
978 | 978 | } |
979 | 979 | |
980 | 980 | |
@@ -988,13 +988,13 @@ discard block |
||
988 | 988 | * @return string `1` if active `0` if disabled. |
989 | 989 | */ |
990 | 990 | function geodir_option_disqus_active($disqus_active){ |
991 | - global $post; |
|
992 | - $all_postypes = geodir_get_posttypes(); |
|
991 | + global $post; |
|
992 | + $all_postypes = geodir_get_posttypes(); |
|
993 | 993 | |
994 | - if(isset($post->post_type) && is_array($all_postypes) && in_array($post->post_type,$all_postypes)){ |
|
995 | - $disqus_active = '0'; |
|
996 | - } |
|
994 | + if(isset($post->post_type) && is_array($all_postypes) && in_array($post->post_type,$all_postypes)){ |
|
995 | + $disqus_active = '0'; |
|
996 | + } |
|
997 | 997 | |
998 | - return $disqus_active; |
|
998 | + return $disqus_active; |
|
999 | 999 | } |
1000 | 1000 |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | */ |
19 | 19 | function gd_strip_breadcrumb_wrappers($breadcrumb) |
20 | 20 | { |
21 | - $breadcrumb = str_replace(array("<li>","</li>"), "", $breadcrumb); |
|
21 | + $breadcrumb = str_replace(array("<li>", "</li>"), "", $breadcrumb); |
|
22 | 22 | $breadcrumb = str_replace('<div class="geodir-breadcrumb clearfix"><ul id="breadcrumbs">', '<ul class="fusion-breadcrumbs"><li>', $breadcrumb); |
23 | 23 | $breadcrumb = str_replace('</ul></div>', '</li></ul>', $breadcrumb); |
24 | 24 | return $breadcrumb; |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | return $separator; |
40 | 40 | } |
41 | 41 | |
42 | -add_action('avada_override_current_page_title_bar','gd_avada_current_page_title_bar_change'); |
|
42 | +add_action('avada_override_current_page_title_bar', 'gd_avada_current_page_title_bar_change'); |
|
43 | 43 | /** |
44 | 44 | * new title bar functions for gd pages. |
45 | 45 | * |
@@ -51,8 +51,8 @@ discard block |
||
51 | 51 | { |
52 | 52 | if (geodir_is_geodir_page()) { |
53 | 53 | gd_avada_current_page_title_bar(); |
54 | - }else{ |
|
55 | - avada_current_page_title_bar( $c_pageID ); |
|
54 | + } else { |
|
55 | + avada_current_page_title_bar($c_pageID); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | } |
@@ -113,7 +113,7 @@ |
||
113 | 113 | * @since 1.0.0 |
114 | 114 | * @package GeoDirectory |
115 | 115 | * @param array $classes Class array. |
116 | - * @return array Modified class array. |
|
116 | + * @return string[] Modified class array. |
|
117 | 117 | */ |
118 | 118 | function geodir_x_body_class($classes) |
119 | 119 | { |
@@ -353,7 +353,7 @@ |
||
353 | 353 | |
354 | 354 | if(!$cpt_left){ |
355 | 355 | $cpt_left = "gd-cpt-flat"; |
356 | - }else{ |
|
356 | + } else{ |
|
357 | 357 | $cpt_left = ''; |
358 | 358 | } |
359 | 359 |
@@ -1,27 +1,27 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Avada theme compatibility functions. |
|
4 | - * |
|
5 | - * This file lets the GeoDirectory Plugin use the Avada theme HTML wrappers to fit and work perfectly. |
|
6 | - * |
|
7 | - * @since 1.0.0 |
|
8 | - * @package GeoDirectory |
|
9 | - */ |
|
3 | + * Avada theme compatibility functions. |
|
4 | + * |
|
5 | + * This file lets the GeoDirectory Plugin use the Avada theme HTML wrappers to fit and work perfectly. |
|
6 | + * |
|
7 | + * @since 1.0.0 |
|
8 | + * @package GeoDirectory |
|
9 | + */ |
|
10 | 10 | add_filter('geodir_breadcrumb', 'gd_strip_breadcrumb_wrappers'); |
11 | 11 | /** |
12 | - * strips the gd breadcrumb wrappers. |
|
13 | - * |
|
14 | - * @since 1.0.0 |
|
15 | - * @package GeoDirectory |
|
16 | - * @param string $breadcrumb Old breadcrumb HTML. |
|
17 | - * @return string Modified breadcrumb HTML. |
|
18 | - */ |
|
12 | + * strips the gd breadcrumb wrappers. |
|
13 | + * |
|
14 | + * @since 1.0.0 |
|
15 | + * @package GeoDirectory |
|
16 | + * @param string $breadcrumb Old breadcrumb HTML. |
|
17 | + * @return string Modified breadcrumb HTML. |
|
18 | + */ |
|
19 | 19 | function gd_strip_breadcrumb_wrappers($breadcrumb) |
20 | 20 | { |
21 | - $breadcrumb = str_replace(array("<li>","</li>"), "", $breadcrumb); |
|
22 | - $breadcrumb = str_replace('<div class="geodir-breadcrumb clearfix"><ul id="breadcrumbs">', '<ul class="fusion-breadcrumbs"><li>', $breadcrumb); |
|
23 | - $breadcrumb = str_replace('</ul></div>', '</li></ul>', $breadcrumb); |
|
24 | - return $breadcrumb; |
|
21 | + $breadcrumb = str_replace(array("<li>","</li>"), "", $breadcrumb); |
|
22 | + $breadcrumb = str_replace('<div class="geodir-breadcrumb clearfix"><ul id="breadcrumbs">', '<ul class="fusion-breadcrumbs"><li>', $breadcrumb); |
|
23 | + $breadcrumb = str_replace('</ul></div>', '</li></ul>', $breadcrumb); |
|
24 | + return $breadcrumb; |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | add_filter('geodir_breadcrumb_separator', 'gd_change_breadcrumb_separator'); |
@@ -35,8 +35,8 @@ discard block |
||
35 | 35 | */ |
36 | 36 | function gd_change_breadcrumb_separator($separator) |
37 | 37 | { |
38 | - $separator = ' / '; |
|
39 | - return $separator; |
|
38 | + $separator = ' / '; |
|
39 | + return $separator; |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | add_action('avada_override_current_page_title_bar','gd_avada_current_page_title_bar_change'); |
@@ -49,11 +49,11 @@ discard block |
||
49 | 49 | */ |
50 | 50 | function gd_avada_current_page_title_bar_change($c_pageID) |
51 | 51 | { |
52 | - if (geodir_is_geodir_page()) { |
|
53 | - gd_avada_current_page_title_bar(); |
|
54 | - }else{ |
|
55 | - avada_current_page_title_bar( $c_pageID ); |
|
56 | - } |
|
52 | + if (geodir_is_geodir_page()) { |
|
53 | + gd_avada_current_page_title_bar(); |
|
54 | + }else{ |
|
55 | + avada_current_page_title_bar( $c_pageID ); |
|
56 | + } |
|
57 | 57 | |
58 | 58 | } |
59 | 59 | |
@@ -65,46 +65,46 @@ discard block |
||
65 | 65 | */ |
66 | 66 | function gd_avada_current_page_title_bar() |
67 | 67 | { |
68 | - ob_start(); |
|
69 | - geodir_breadcrumb(); |
|
70 | - $secondary_content = ob_get_contents(); |
|
71 | - ob_get_clean(); |
|
72 | - |
|
73 | - $title = ''; |
|
74 | - $subtitle = ''; |
|
75 | - |
|
76 | - if (geodir_is_page('listing')) { |
|
77 | - ob_start(); // Start buffering; |
|
78 | - geodir_action_listings_title(); |
|
79 | - $title = ob_get_clean(); |
|
80 | - avada_page_title_bar($title, $subtitle, $secondary_content); |
|
81 | - } |
|
82 | - |
|
83 | - if (geodir_is_page('add-listing')) { |
|
84 | - ob_start(); // Start buffering; |
|
85 | - geodir_action_add_listing_page_title(); |
|
86 | - $title = ob_get_clean(); |
|
87 | - avada_page_title_bar($title, $subtitle, $secondary_content); |
|
88 | - } |
|
89 | - |
|
90 | - if (geodir_is_page('author')) { |
|
91 | - ob_start(); // Start buffering; |
|
92 | - geodir_action_author_page_title(); |
|
93 | - $title = ob_get_clean(); |
|
94 | - avada_page_title_bar($title, $subtitle, $secondary_content); |
|
95 | - } |
|
96 | - |
|
97 | - if (geodir_is_page('detail') || geodir_is_page('preview')) { |
|
98 | - $title = get_the_title(); |
|
99 | - avada_page_title_bar($title, $subtitle, $secondary_content); |
|
100 | - } |
|
101 | - |
|
102 | - if (geodir_is_page('search')) { |
|
103 | - ob_start(); // Start buffering; |
|
104 | - geodir_action_search_page_title(); |
|
105 | - $title = ob_get_clean(); |
|
106 | - avada_page_title_bar($title, $subtitle, $secondary_content); |
|
107 | - } |
|
68 | + ob_start(); |
|
69 | + geodir_breadcrumb(); |
|
70 | + $secondary_content = ob_get_contents(); |
|
71 | + ob_get_clean(); |
|
72 | + |
|
73 | + $title = ''; |
|
74 | + $subtitle = ''; |
|
75 | + |
|
76 | + if (geodir_is_page('listing')) { |
|
77 | + ob_start(); // Start buffering; |
|
78 | + geodir_action_listings_title(); |
|
79 | + $title = ob_get_clean(); |
|
80 | + avada_page_title_bar($title, $subtitle, $secondary_content); |
|
81 | + } |
|
82 | + |
|
83 | + if (geodir_is_page('add-listing')) { |
|
84 | + ob_start(); // Start buffering; |
|
85 | + geodir_action_add_listing_page_title(); |
|
86 | + $title = ob_get_clean(); |
|
87 | + avada_page_title_bar($title, $subtitle, $secondary_content); |
|
88 | + } |
|
89 | + |
|
90 | + if (geodir_is_page('author')) { |
|
91 | + ob_start(); // Start buffering; |
|
92 | + geodir_action_author_page_title(); |
|
93 | + $title = ob_get_clean(); |
|
94 | + avada_page_title_bar($title, $subtitle, $secondary_content); |
|
95 | + } |
|
96 | + |
|
97 | + if (geodir_is_page('detail') || geodir_is_page('preview')) { |
|
98 | + $title = get_the_title(); |
|
99 | + avada_page_title_bar($title, $subtitle, $secondary_content); |
|
100 | + } |
|
101 | + |
|
102 | + if (geodir_is_page('search')) { |
|
103 | + ob_start(); // Start buffering; |
|
104 | + geodir_action_search_page_title(); |
|
105 | + $title = ob_get_clean(); |
|
106 | + avada_page_title_bar($title, $subtitle, $secondary_content); |
|
107 | + } |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | /** |
@@ -115,34 +115,34 @@ discard block |
||
115 | 115 | */ |
116 | 116 | function gd_compat_php_avada() |
117 | 117 | { |
118 | - // change widget wrappers |
|
119 | - //add_filter( 'geodir_before_widget', 'geodir_before_widget_compat',10,1 ); |
|
120 | - //add_filter( 'geodir_after_widget', 'geodir_after_widget_compat',10,1 ); |
|
121 | - |
|
122 | - // REMOVE BREADCRUMB |
|
123 | - remove_action('geodir_detail_before_main_content', 'geodir_breadcrumb', 20); |
|
124 | - remove_action('geodir_listings_before_main_content', 'geodir_breadcrumb', 20); |
|
125 | - remove_action('geodir_author_before_main_content', 'geodir_breadcrumb', 20); |
|
126 | - remove_action('geodir_search_before_main_content', 'geodir_breadcrumb', 20); |
|
127 | - remove_action('geodir_home_before_main_content', 'geodir_breadcrumb', 20); |
|
128 | - remove_action('geodir_location_before_main_content', 'geodir_breadcrumb', 20); |
|
129 | - |
|
130 | - // REMOVE PAGE TITLES |
|
131 | - remove_action('geodir_listings_page_title', 'geodir_action_listings_title', 10); |
|
132 | - remove_action('geodir_add_listing_page_title', 'geodir_action_add_listing_page_title', 10); |
|
133 | - remove_action('geodir_details_main_content', 'geodir_action_page_title', 20); |
|
134 | - remove_action('geodir_search_page_title', 'geodir_action_search_page_title', 10); |
|
135 | - remove_action('geodir_author_page_title', 'geodir_action_author_page_title', 10); |
|
136 | - |
|
137 | - // make top section wide |
|
138 | - remove_action('geodir_home_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10); |
|
139 | - remove_action('geodir_location_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10); |
|
140 | - remove_action('geodir_author_before_main_content', 'geodir_action_geodir_sidebar_author_top', 10); |
|
141 | - remove_action('geodir_search_before_main_content', 'geodir_action_geodir_sidebar_search_top', 10); |
|
142 | - remove_action('geodir_detail_before_main_content', 'geodir_action_geodir_sidebar_detail_top', 10); |
|
143 | - remove_action('geodir_listings_before_main_content', 'geodir_action_geodir_sidebar_listings_top', 10); |
|
144 | - |
|
145 | - //gd_compat_add_top_section_back(); |
|
118 | + // change widget wrappers |
|
119 | + //add_filter( 'geodir_before_widget', 'geodir_before_widget_compat',10,1 ); |
|
120 | + //add_filter( 'geodir_after_widget', 'geodir_after_widget_compat',10,1 ); |
|
121 | + |
|
122 | + // REMOVE BREADCRUMB |
|
123 | + remove_action('geodir_detail_before_main_content', 'geodir_breadcrumb', 20); |
|
124 | + remove_action('geodir_listings_before_main_content', 'geodir_breadcrumb', 20); |
|
125 | + remove_action('geodir_author_before_main_content', 'geodir_breadcrumb', 20); |
|
126 | + remove_action('geodir_search_before_main_content', 'geodir_breadcrumb', 20); |
|
127 | + remove_action('geodir_home_before_main_content', 'geodir_breadcrumb', 20); |
|
128 | + remove_action('geodir_location_before_main_content', 'geodir_breadcrumb', 20); |
|
129 | + |
|
130 | + // REMOVE PAGE TITLES |
|
131 | + remove_action('geodir_listings_page_title', 'geodir_action_listings_title', 10); |
|
132 | + remove_action('geodir_add_listing_page_title', 'geodir_action_add_listing_page_title', 10); |
|
133 | + remove_action('geodir_details_main_content', 'geodir_action_page_title', 20); |
|
134 | + remove_action('geodir_search_page_title', 'geodir_action_search_page_title', 10); |
|
135 | + remove_action('geodir_author_page_title', 'geodir_action_author_page_title', 10); |
|
136 | + |
|
137 | + // make top section wide |
|
138 | + remove_action('geodir_home_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10); |
|
139 | + remove_action('geodir_location_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10); |
|
140 | + remove_action('geodir_author_before_main_content', 'geodir_action_geodir_sidebar_author_top', 10); |
|
141 | + remove_action('geodir_search_before_main_content', 'geodir_action_geodir_sidebar_search_top', 10); |
|
142 | + remove_action('geodir_detail_before_main_content', 'geodir_action_geodir_sidebar_detail_top', 10); |
|
143 | + remove_action('geodir_listings_before_main_content', 'geodir_action_geodir_sidebar_listings_top', 10); |
|
144 | + |
|
145 | + //gd_compat_add_top_section_back(); |
|
146 | 146 | |
147 | 147 | } |
148 | 148 | |
@@ -156,17 +156,17 @@ discard block |
||
156 | 156 | function gd_compat_add_top_section_back() |
157 | 157 | { |
158 | 158 | |
159 | - if (is_page_geodir_home() || geodir_is_page('location')) { |
|
160 | - geodir_action_geodir_sidebar_home_top(); |
|
161 | - } elseif (geodir_is_page('listing')) { |
|
162 | - geodir_action_geodir_sidebar_listings_top(); |
|
163 | - } elseif (geodir_is_page('detail')) { |
|
164 | - geodir_action_geodir_sidebar_detail_top(); |
|
165 | - } elseif (geodir_is_page('search')) { |
|
166 | - geodir_action_geodir_sidebar_search_top(); |
|
167 | - } elseif (geodir_is_page('author')) { |
|
168 | - geodir_action_geodir_sidebar_author_top(); |
|
169 | - } |
|
159 | + if (is_page_geodir_home() || geodir_is_page('location')) { |
|
160 | + geodir_action_geodir_sidebar_home_top(); |
|
161 | + } elseif (geodir_is_page('listing')) { |
|
162 | + geodir_action_geodir_sidebar_listings_top(); |
|
163 | + } elseif (geodir_is_page('detail')) { |
|
164 | + geodir_action_geodir_sidebar_detail_top(); |
|
165 | + } elseif (geodir_is_page('search')) { |
|
166 | + geodir_action_geodir_sidebar_search_top(); |
|
167 | + } elseif (geodir_is_page('author')) { |
|
168 | + geodir_action_geodir_sidebar_author_top(); |
|
169 | + } |
|
170 | 170 | |
171 | 171 | |
172 | 172 | } |
@@ -183,12 +183,12 @@ discard block |
||
183 | 183 | */ |
184 | 184 | function gd_compat_body_class($classes) |
185 | 185 | { |
186 | - if (geodir_is_geodir_page()) { |
|
187 | - $classes[] = 'wpgeo-avada'; |
|
188 | - } else { |
|
189 | - $classes[] = ''; |
|
190 | - } |
|
191 | - return $classes; |
|
186 | + if (geodir_is_geodir_page()) { |
|
187 | + $classes[] = 'wpgeo-avada'; |
|
188 | + } else { |
|
189 | + $classes[] = ''; |
|
190 | + } |
|
191 | + return $classes; |
|
192 | 192 | } |
193 | 193 | |
194 | 194 | |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | */ |
203 | 203 | function geodir_before_widget_compat($var) |
204 | 204 | { |
205 | - return '<div id="%1$s" class="geodir-widget %2$s">'; |
|
205 | + return '<div id="%1$s" class="geodir-widget %2$s">'; |
|
206 | 206 | } |
207 | 207 | |
208 | 208 | /** |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | */ |
216 | 216 | function geodir_after_widget_compat($var) |
217 | 217 | { |
218 | - return '</div>'; |
|
218 | + return '</div>'; |
|
219 | 219 | } |
220 | 220 | |
221 | 221 | add_filter('geodir_search_form_class', 'geodir_search_form_class_avada'); |
@@ -229,8 +229,8 @@ discard block |
||
229 | 229 | */ |
230 | 230 | function geodir_search_form_class_avada($class) |
231 | 231 | { |
232 | - $class .= ' search'; |
|
233 | - return $class; |
|
232 | + $class .= ' search'; |
|
233 | + return $class; |
|
234 | 234 | } |
235 | 235 | |
236 | 236 |
@@ -61,12 +61,12 @@ discard block |
||
61 | 61 | ?> |
62 | 62 | |
63 | 63 | <b style="cursor:pointer;" |
64 | - onclick="show_hide('field_frm<?php echo $result_str;?>')"><?php echo geodir_ucwords(__('Fieldset:', 'geodirectory') . ' ' . $field_admin_title);?></b> |
|
64 | + onclick="show_hide('field_frm<?php echo $result_str; ?>')"><?php echo geodir_ucwords(__('Fieldset:', 'geodirectory') . ' ' . $field_admin_title); ?></b> |
|
65 | 65 | <?php |
66 | 66 | } else { |
67 | 67 | ?> |
68 | 68 | <b style="cursor:pointer;" |
69 | - onclick="show_hide('field_frm<?php echo $result_str;?>')"><?php echo geodir_ucwords(__('Field:', 'geodirectory') . ' ' . $field_admin_title . ' (' . $field_type . ')');?></b> |
|
69 | + onclick="show_hide('field_frm<?php echo $result_str; ?>')"><?php echo geodir_ucwords(__('Field:', 'geodirectory') . ' ' . $field_admin_title . ' (' . $field_type . ')'); ?></b> |
|
70 | 70 | <?php |
71 | 71 | } |
72 | 72 | ?> |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | ?> |
173 | 173 | |
174 | 174 | <tr> |
175 | - <td><strong><?php _e('HTML variable name :', 'geodirectory');?></strong></td> |
|
175 | + <td><strong><?php _e('HTML variable name :', 'geodirectory'); ?></strong></td> |
|
176 | 176 | <td align="left"> |
177 | 177 | <input type="text" name="htmlvar_name" id="htmlvar_name" |
178 | 178 | value="<?php if (isset($field_info->htmlvar_name)) { |
@@ -180,10 +180,10 @@ discard block |
||
180 | 180 | }?>" <?php if ($default) { |
181 | 181 | echo 'readonly="readonly"'; |
182 | 182 | }?> /> |
183 | - <br/> <span><?php _e('HTML variable name must not be blank', 'geodirectory');?></span> |
|
184 | - <br/> <span><?php _e('This should be a unique name', 'geodirectory');?></span> |
|
183 | + <br/> <span><?php _e('HTML variable name must not be blank', 'geodirectory'); ?></span> |
|
184 | + <br/> <span><?php _e('This should be a unique name', 'geodirectory'); ?></span> |
|
185 | 185 | <br/> |
186 | - <span><?php _e('HTML variable name not use spaces, special characters', 'geodirectory');?></span> |
|
186 | + <span><?php _e('HTML variable name not use spaces, special characters', 'geodirectory'); ?></span> |
|
187 | 187 | </td> |
188 | 188 | </tr> |
189 | 189 | <?php } ?> |
@@ -202,19 +202,19 @@ discard block |
||
202 | 202 | $default_value = isset($field_info->default_value) ? $field_info->default_value : ''; |
203 | 203 | ?> |
204 | 204 | <tr> |
205 | - <td><strong><?php _e('Default value :', 'geodirectory');?></strong></td> |
|
205 | + <td><strong><?php _e('Default value :', 'geodirectory'); ?></strong></td> |
|
206 | 206 | <td align="left"> |
207 | 207 | <?php if ($field_type == 'checkbox') { ?> |
208 | 208 | <select name="default_value" id="default_value"> |
209 | 209 | <option value=""><?php _e('Unchecked', 'geodirectory'); ?></option> |
210 | - <option value="1" <?php selected(true, (int)$default_value === 1);?>><?php _e('Checked', 'geodirectory'); ?></option> |
|
210 | + <option value="1" <?php selected(true, (int) $default_value === 1); ?>><?php _e('Checked', 'geodirectory'); ?></option> |
|
211 | 211 | </select> |
212 | 212 | <?php } else if ($field_type == 'email') { ?> |
213 | - <input type="email" name="default_value" placeholder="<?php _e('[email protected]', 'geodirectory') ;?>" id="default_value" value="<?php echo esc_attr($default_value);?>" /><br/> |
|
214 | - <span><?php _e('Enter the default value. Ex: [email protected]', 'geodirectory');?></span> |
|
213 | + <input type="email" name="default_value" placeholder="<?php _e('[email protected]', 'geodirectory'); ?>" id="default_value" value="<?php echo esc_attr($default_value); ?>" /><br/> |
|
214 | + <span><?php _e('Enter the default value. Ex: [email protected]', 'geodirectory'); ?></span> |
|
215 | 215 | <?php } else { ?> |
216 | - <input type="text" name="default_value" id="default_value" value="<?php echo esc_attr($default_value);?>" /><br/> |
|
217 | - <span><?php _e('Enter the default value (for "link" this will be used as the link text)', 'geodirectory');?></span> |
|
216 | + <input type="text" name="default_value" id="default_value" value="<?php echo esc_attr($default_value); ?>" /><br/> |
|
217 | + <span><?php _e('Enter the default value (for "link" this will be used as the link text)', 'geodirectory'); ?></span> |
|
218 | 218 | <?php } ?> |
219 | 219 | </td> |
220 | 220 | </tr> |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | </td> |
380 | 380 | </tr> |
381 | 381 | |
382 | - <?php if ($field_type == 'text'){?> |
|
382 | + <?php if ($field_type == 'text') {?> |
|
383 | 383 | <tr> |
384 | 384 | <td><strong><?php _e('Validation Pattern:', 'geodirectory'); ?></strong></td> |
385 | 385 | <td align="left"> |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | </tr> |
410 | 410 | <?php } ?> |
411 | 411 | |
412 | - <tr <?php echo (!$display_on_listing ? 'style="display:none"' : '') ;?>> |
|
412 | + <tr <?php echo (!$display_on_listing ? 'style="display:none"' : ''); ?>> |
|
413 | 413 | <td><strong><?php _e('Show on listing page ? :', 'geodirectory'); ?></strong></td> |
414 | 414 | <td align="left"> |
415 | 415 | <select name="show_on_listing" id="show_on_listing"> |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | case 'taxonomy': { |
469 | 469 | ?> |
470 | 470 | <tr> |
471 | - <td><strong><?php _e('Select taxonomy:', 'geodirectory');?></strong></td> |
|
471 | + <td><strong><?php _e('Select taxonomy:', 'geodirectory'); ?></strong></td> |
|
472 | 472 | <td align="left"> |
473 | 473 | <select name="htmlvar_name" id="htmlvar_name"> |
474 | 474 | <?php |
@@ -478,40 +478,40 @@ discard block |
||
478 | 478 | ?> |
479 | 479 | <option <?php if (isset($field_info->htmlvar_name) && $field_info->htmlvar_name == $gd_tax) { |
480 | 480 | echo 'selected="selected"'; |
481 | - }?> id="<?php echo $gd_tax;?>"><?php echo $gd_tax;?></option><?php |
|
481 | + }?> id="<?php echo $gd_tax; ?>"><?php echo $gd_tax; ?></option><?php |
|
482 | 482 | } |
483 | 483 | ?> |
484 | 484 | </select> |
485 | 485 | |
486 | 486 | <br/> |
487 | - <span><?php _e('Selected taxonomy name use as field name index. ex:-( post_category[gd_placecategory] )', 'geodirectory');?></span> |
|
487 | + <span><?php _e('Selected taxonomy name use as field name index. ex:-( post_category[gd_placecategory] )', 'geodirectory'); ?></span> |
|
488 | 488 | </td> |
489 | 489 | </tr> |
490 | 490 | |
491 | 491 | <tr> |
492 | - <td><strong><?php _e('Category display type :', 'geodirectory');?></strong></td> |
|
492 | + <td><strong><?php _e('Category display type :', 'geodirectory'); ?></strong></td> |
|
493 | 493 | <td align="left"> |
494 | 494 | |
495 | 495 | <select name="cat_display_type" id="cat_display_type"> |
496 | 496 | <option <?php if (isset($field_info->extra_fields) && unserialize($field_info->extra_fields) == 'ajax_chained') { |
497 | 497 | echo 'selected="selected"'; |
498 | - }?> value="ajax_chained"><?php _e('Ajax Chained', 'geodirectory');?></option> |
|
498 | + }?> value="ajax_chained"><?php _e('Ajax Chained', 'geodirectory'); ?></option> |
|
499 | 499 | <option <?php if (isset($field_info->extra_fields) && unserialize($field_info->extra_fields) == 'select') { |
500 | 500 | echo 'selected="selected"'; |
501 | - }?> value="select"><?php _e('Select', 'geodirectory');?></option> |
|
501 | + }?> value="select"><?php _e('Select', 'geodirectory'); ?></option> |
|
502 | 502 | <option <?php if (isset($field_info->extra_fields) && unserialize($field_info->extra_fields) == 'multiselect') { |
503 | 503 | echo 'selected="selected"'; |
504 | - }?> value="multiselect"><?php _e('Multiselect', 'geodirectory');?></option> |
|
504 | + }?> value="multiselect"><?php _e('Multiselect', 'geodirectory'); ?></option> |
|
505 | 505 | <option <?php if (isset($field_info->extra_fields) && unserialize($field_info->extra_fields) == 'checkbox') { |
506 | 506 | echo 'selected="selected"'; |
507 | - }?> value="checkbox"><?php _e('Checkbox', 'geodirectory');?></option> |
|
507 | + }?> value="checkbox"><?php _e('Checkbox', 'geodirectory'); ?></option> |
|
508 | 508 | <option <?php if (isset($field_info->extra_fields) && unserialize($field_info->extra_fields) == 'radio') { |
509 | 509 | echo 'selected="selected"'; |
510 | - }?> value="radio"><?php _e('Radio', 'geodirectory');?></option> |
|
510 | + }?> value="radio"><?php _e('Radio', 'geodirectory'); ?></option> |
|
511 | 511 | </select> |
512 | 512 | |
513 | 513 | <br/> |
514 | - <span><?php _e('Show categories list as select,multiselect,checkbox or radio', 'geodirectory');?></span> |
|
514 | + <span><?php _e('Show categories list as select,multiselect,checkbox or radio', 'geodirectory'); ?></span> |
|
515 | 515 | </td> |
516 | 516 | </tr> |
517 | 517 | <?php } // end of additional field for taxonomy field type |
@@ -532,92 +532,92 @@ discard block |
||
532 | 532 | do_action('geodir_address_extra_admin_fields', $address, $field_info); ?> |
533 | 533 | |
534 | 534 | <tr> |
535 | - <td><strong><?php _e('Display zip/post code :', 'geodirectory');?></strong></td> |
|
535 | + <td><strong><?php _e('Display zip/post code :', 'geodirectory'); ?></strong></td> |
|
536 | 536 | <td align="left"> |
537 | 537 | <input type="checkbox" name="extra[show_zip]" id="show_zip" |
538 | 538 | value="1" <?php if (isset($address['show_zip']) && $address['show_zip'] == '1') { |
539 | 539 | echo 'checked="checked"'; |
540 | 540 | }?>/> |
541 | - <span><?php _e('Select if you want to show zip/post code field in address section.', 'geodirectory');?></span> |
|
541 | + <span><?php _e('Select if you want to show zip/post code field in address section.', 'geodirectory'); ?></span> |
|
542 | 542 | </td> |
543 | 543 | </tr> |
544 | 544 | |
545 | 545 | <tr> |
546 | - <td><strong><?php _e('Zip/Post code label :', 'geodirectory');?></strong></td> |
|
546 | + <td><strong><?php _e('Zip/Post code label :', 'geodirectory'); ?></strong></td> |
|
547 | 547 | <td align="left"> |
548 | 548 | <input type="text" name="extra[zip_lable]" id="zip_lable" |
549 | 549 | value="<?php if (isset($address['zip_lable'])) { |
550 | 550 | echo esc_attr($address['zip_lable']); |
551 | 551 | }?>"/> |
552 | - <span><?php _e('Enter zip/post code field label in address section.', 'geodirectory');?></span> |
|
552 | + <span><?php _e('Enter zip/post code field label in address section.', 'geodirectory'); ?></span> |
|
553 | 553 | </td> |
554 | 554 | </tr> |
555 | 555 | |
556 | 556 | <tr style="display:none;"> |
557 | - <td><strong><?php _e('Display map :', 'geodirectory');?></strong></td> |
|
557 | + <td><strong><?php _e('Display map :', 'geodirectory'); ?></strong></td> |
|
558 | 558 | <td align="left"> |
559 | 559 | <input type="checkbox" name="extra[show_map]" id="show_map" |
560 | 560 | value="1" <?php if (isset($address['show_map']) && $address['show_map'] == '1') { |
561 | 561 | echo 'checked="checked"'; |
562 | 562 | }?>/> |
563 | - <span><?php _e('Select if you want to `set address on map` field in address section.', 'geodirectory');?></span> |
|
563 | + <span><?php _e('Select if you want to `set address on map` field in address section.', 'geodirectory'); ?></span> |
|
564 | 564 | </td> |
565 | 565 | </tr> |
566 | 566 | |
567 | 567 | <tr> |
568 | - <td><strong><?php _e('Map button label :', 'geodirectory');?></strong></td> |
|
568 | + <td><strong><?php _e('Map button label :', 'geodirectory'); ?></strong></td> |
|
569 | 569 | <td align="left"> |
570 | 570 | <input type="text" name="extra[map_lable]" id="map_lable" |
571 | 571 | value="<?php if (isset($address['map_lable'])) { |
572 | 572 | echo esc_attr($address['map_lable']); |
573 | 573 | }?>"/> |
574 | - <span><?php _e('Enter text for `set address on map` button in address section.', 'geodirectory');?></span> |
|
574 | + <span><?php _e('Enter text for `set address on map` button in address section.', 'geodirectory'); ?></span> |
|
575 | 575 | </td> |
576 | 576 | </tr> |
577 | 577 | |
578 | 578 | <tr> |
579 | - <td><strong><?php _e('Use user zoom level:', 'geodirectory');?></strong></td> |
|
579 | + <td><strong><?php _e('Use user zoom level:', 'geodirectory'); ?></strong></td> |
|
580 | 580 | <td align="left"> |
581 | 581 | <input type="checkbox" name="extra[show_mapzoom]" id="show_mapzoom" |
582 | 582 | value="1" <?php if (isset($address['show_mapzoom']) && $address['show_mapzoom'] == '1') { |
583 | 583 | echo 'checked="checked"'; |
584 | 584 | }?>/> |
585 | - <span><?php _e('Select if you want to use the user defined map zoom level.', 'geodirectory');?></span> |
|
585 | + <span><?php _e('Select if you want to use the user defined map zoom level.', 'geodirectory'); ?></span> |
|
586 | 586 | </td> |
587 | 587 | </tr> |
588 | 588 | |
589 | 589 | <tr> |
590 | - <td><strong><?php _e('Display map view:', 'geodirectory');?></strong></td> |
|
590 | + <td><strong><?php _e('Display map view:', 'geodirectory'); ?></strong></td> |
|
591 | 591 | <td align="left"> |
592 | 592 | <input type="checkbox" name="extra[show_mapview]" id="show_mapview" |
593 | 593 | value="1" <?php if (isset($address['show_mapview']) && $address['show_mapview'] == '1') { |
594 | 594 | echo 'checked="checked"'; |
595 | 595 | }?>/> |
596 | - <span><?php _e('Select if you want to `set default map` options in address section.', 'geodirectory');?></span> |
|
596 | + <span><?php _e('Select if you want to `set default map` options in address section.', 'geodirectory'); ?></span> |
|
597 | 597 | </td> |
598 | 598 | </tr> |
599 | 599 | |
600 | 600 | |
601 | 601 | <tr> |
602 | - <td><strong><?php _e('Map view label :', 'geodirectory');?></strong></td> |
|
602 | + <td><strong><?php _e('Map view label :', 'geodirectory'); ?></strong></td> |
|
603 | 603 | <td align="left"> |
604 | 604 | <input type="text" name="extra[mapview_lable]" id="mapview_lable" |
605 | 605 | value="<?php if (isset($address['mapview_lable'])) { |
606 | 606 | echo esc_attr($address['mapview_lable']); |
607 | 607 | }?>"/> |
608 | - <span><?php _e('Enter mapview field label in address section.', 'geodirectory');?></span> |
|
608 | + <span><?php _e('Enter mapview field label in address section.', 'geodirectory'); ?></span> |
|
609 | 609 | </td> |
610 | 610 | </tr> |
611 | 611 | <tr> |
612 | 612 | <td> |
613 | - <strong><?php _e('Show latitude and longitude from front-end :', 'geodirectory');?></strong> |
|
613 | + <strong><?php _e('Show latitude and longitude from front-end :', 'geodirectory'); ?></strong> |
|
614 | 614 | </td> |
615 | 615 | <td align="left"> |
616 | 616 | <input type="checkbox" name="extra[show_latlng]" id="show_latlng" |
617 | 617 | value="1" <?php if (isset($address['show_latlng']) && $address['show_latlng'] == '1') { |
618 | 618 | echo 'checked="checked"'; |
619 | 619 | }?>/> |
620 | - <span><?php _e('Select if you want to show latitude and logatude fields in address section from front-end.', 'geodirectory');?></span> |
|
620 | + <span><?php _e('Select if you want to show latitude and logatude fields in address section from front-end.', 'geodirectory'); ?></span> |
|
621 | 621 | </td> |
622 | 622 | </tr> |
623 | 623 | <?php } // end of extra fields for address field type |
@@ -629,41 +629,41 @@ discard block |
||
629 | 629 | |
630 | 630 | ?> |
631 | 631 | <tr> |
632 | - <td><strong><?php _e('Multiselect display type :', 'geodirectory');?></strong></td> |
|
632 | + <td><strong><?php _e('Multiselect display type :', 'geodirectory'); ?></strong></td> |
|
633 | 633 | <td align="left"> |
634 | 634 | |
635 | 635 | <select name="multi_display_type" id="multi_display_type"> |
636 | 636 | <option <?php if (isset($field_info->extra_fields) && unserialize($field_info->extra_fields) == 'select') { |
637 | 637 | echo 'selected="selected"'; |
638 | - }?> value="select"><?php _e('Select', 'geodirectory');?></option> |
|
638 | + }?> value="select"><?php _e('Select', 'geodirectory'); ?></option> |
|
639 | 639 | <option <?php if (isset($field_info->extra_fields) && unserialize($field_info->extra_fields) == 'checkbox') { |
640 | 640 | echo 'selected="selected"'; |
641 | - }?> value="checkbox"><?php _e('Checkbox', 'geodirectory');?></option> |
|
641 | + }?> value="checkbox"><?php _e('Checkbox', 'geodirectory'); ?></option> |
|
642 | 642 | <option <?php if (isset($field_info->extra_fields) && unserialize($field_info->extra_fields) == 'radio') { |
643 | 643 | echo 'selected="selected"'; |
644 | - }?> value="radio"><?php _e('Radio', 'geodirectory');?></option> |
|
644 | + }?> value="radio"><?php _e('Radio', 'geodirectory'); ?></option> |
|
645 | 645 | </select> |
646 | 646 | |
647 | 647 | <br/> |
648 | - <span><?php _e('Show multiselect list as multiselect,checkbox or radio', 'geodirectory');?></span> |
|
648 | + <span><?php _e('Show multiselect list as multiselect,checkbox or radio', 'geodirectory'); ?></span> |
|
649 | 649 | </td> |
650 | 650 | </tr> |
651 | 651 | <?php |
652 | 652 | } |
653 | 653 | ?> |
654 | 654 | <tr> |
655 | - <td><strong><?php _e('Option Values :', 'geodirectory');?></strong></td> |
|
655 | + <td><strong><?php _e('Option Values :', 'geodirectory'); ?></strong></td> |
|
656 | 656 | <td align="left"> |
657 | 657 | <input type="text" name="option_values" id="option_values" |
658 | 658 | value="<?php if (isset($field_info->option_values)) { |
659 | 659 | echo esc_attr($field_info->option_values); |
660 | 660 | }?>"/> |
661 | 661 | <br/> |
662 | - <span><?php _e('Option Values should be separated by comma.', 'geodirectory');?></span> |
|
662 | + <span><?php _e('Option Values should be separated by comma.', 'geodirectory'); ?></span> |
|
663 | 663 | <br/> |
664 | - <span><?php _e('If using for a "tick filter" place a / and then either a 1 for true or 0 for false', 'geodirectory');?></span> |
|
664 | + <span><?php _e('If using for a "tick filter" place a / and then either a 1 for true or 0 for false', 'geodirectory'); ?></span> |
|
665 | 665 | <br/> |
666 | - <span><?php _e('eg: "No Dogs Allowed/0,Dogs Allowed/1" (Select only, not multiselect)', 'geodirectory');?></span> |
|
666 | + <span><?php _e('eg: "No Dogs Allowed/0,Dogs Allowed/1" (Select only, not multiselect)', 'geodirectory'); ?></span> |
|
667 | 667 | <?php if ($field_type == 'multiselect' || $field_type == 'select') { ?> |
668 | 668 | <br/> |
669 | 669 | <span><?php _e('- If using OPTGROUP tag to grouping options, use "{optgroup}OPTGROUP-LABEL|OPTION-1,OPTION-2{/optgroup}"', 'geodirectory'); ?></span> |
@@ -681,12 +681,12 @@ discard block |
||
681 | 681 | } |
682 | 682 | ?> |
683 | 683 | <tr> |
684 | - <td><strong><?php _e('Date Format :', 'geodirectory');?></strong></td> |
|
684 | + <td><strong><?php _e('Date Format :', 'geodirectory'); ?></strong></td> |
|
685 | 685 | <td align="left" style="overflow:inherit;"> |
686 | 686 | <input type="text" name="extra[date_format]" id="date_format" |
687 | 687 | value="<?php if (isset($extra['date_format'])) { |
688 | 688 | echo esc_attr($extra['date_format']); |
689 | - }else{echo "mm/dd/yy";}?>"/> |
|
689 | + } else {echo "mm/dd/yy"; }?>"/> |
|
690 | 690 | |
691 | 691 | <div style="position:relative; cursor:pointer;"> |
692 | 692 | <span onclick="jQuery('#show_dateformat').toggle();"> |
@@ -764,7 +764,7 @@ discard block |
||
764 | 764 | |
765 | 765 | </div> |
766 | 766 | <br/> |
767 | - <span><?php _e('Enter the date format.', 'geodirectory');?></span> |
|
767 | + <span><?php _e('Enter the date format.', 'geodirectory'); ?></span> |
|
768 | 768 | </td> |
769 | 769 | </tr> |
770 | 770 | <?php |
@@ -777,20 +777,20 @@ discard block |
||
777 | 777 | $gd_file_types = !empty($extra_fields) && !empty($extra_fields['gd_file_types']) ? $extra_fields['gd_file_types'] : array('*'); |
778 | 778 | ?> |
779 | 779 | <tr> |
780 | - <td><strong><?php _e('Allowed file types:', 'geodirectory');?></strong></td> |
|
780 | + <td><strong><?php _e('Allowed file types:', 'geodirectory'); ?></strong></td> |
|
781 | 781 | <td align="left"> |
782 | 782 | <select name="extra[gd_file_types][]" id="gd_file_types" multiple="multiple" style="height:100px;width:90%;"> |
783 | - <option value="*" <?php selected(true, in_array('*', $gd_file_types));?>><?php _e('All types', 'geodirectory') ;?></option> |
|
784 | - <?php foreach ( $allowed_file_types as $format => $types ) { ?> |
|
785 | - <optgroup label="<?php echo esc_attr( wp_sprintf(__('%s formats', 'geodirectory'), __($format, 'geodirectory') ) ) ;?>"> |
|
786 | - <?php foreach ( $types as $ext => $type ) { ?> |
|
787 | - <option value="<?php echo esc_attr($ext) ;?>" <?php selected(true, in_array($ext, $gd_file_types));?>><?php echo '.' . $ext ;?></option> |
|
783 | + <option value="*" <?php selected(true, in_array('*', $gd_file_types)); ?>><?php _e('All types', 'geodirectory'); ?></option> |
|
784 | + <?php foreach ($allowed_file_types as $format => $types) { ?> |
|
785 | + <optgroup label="<?php echo esc_attr(wp_sprintf(__('%s formats', 'geodirectory'), __($format, 'geodirectory'))); ?>"> |
|
786 | + <?php foreach ($types as $ext => $type) { ?> |
|
787 | + <option value="<?php echo esc_attr($ext); ?>" <?php selected(true, in_array($ext, $gd_file_types)); ?>><?php echo '.' . $ext; ?></option> |
|
788 | 788 | <?php } ?> |
789 | 789 | </optgroup> |
790 | 790 | <?php } ?> |
791 | 791 | </select> |
792 | 792 | <br /> |
793 | - <span><?php _e('Select file types to allowed for file uploading. (Select multiple file types by holding down "Ctrl" key.)', GEODIRPAYMENT_TEXTDOMAIN);?></span> |
|
793 | + <span><?php _e('Select file types to allowed for file uploading. (Select multiple file types by holding down "Ctrl" key.)', GEODIRPAYMENT_TEXTDOMAIN); ?></span> |
|
794 | 794 | </td> |
795 | 795 | </tr> |
796 | 796 | <?php |
@@ -805,28 +805,28 @@ discard block |
||
805 | 805 | </tr> |
806 | 806 | |
807 | 807 | <tr> |
808 | - <td><strong><?php _e('Upload icon:', 'geodirectory');?></strong></td> |
|
808 | + <td><strong><?php _e('Upload icon:', 'geodirectory'); ?></strong></td> |
|
809 | 809 | <td align="left"> |
810 | 810 | <input type="text" name="field_icon" id="field_icon" |
811 | 811 | value="<?php if (isset($field_info->field_icon)) { |
812 | 812 | echo $field_info->field_icon; |
813 | 813 | }?>"/> |
814 | 814 | <span> |
815 | - <?php _e('Upload icon using media and enter its url path, or enter <a href="http://fortawesome.github.io/Font-Awesome/icons/" target="_blank" >font awesome </a>class eg:"fa fa-home"', 'geodirectory');?> |
|
815 | + <?php _e('Upload icon using media and enter its url path, or enter <a href="http://fortawesome.github.io/Font-Awesome/icons/" target="_blank" >font awesome </a>class eg:"fa fa-home"', 'geodirectory'); ?> |
|
816 | 816 | </span> |
817 | 817 | </td> |
818 | 818 | </td> |
819 | 819 | </tr> |
820 | 820 | |
821 | 821 | <tr> |
822 | - <td><strong><?php _e('Css class:', 'geodirectory');?></strong></td> |
|
822 | + <td><strong><?php _e('Css class:', 'geodirectory'); ?></strong></td> |
|
823 | 823 | <td align="left"> |
824 | 824 | <input type="text" name="css_class" id="css_class" |
825 | 825 | value="<?php if (isset($field_info->css_class)) { |
826 | 826 | echo esc_attr($field_info->css_class); |
827 | 827 | }?>"/> |
828 | 828 | <span> |
829 | - <?php _e('Enter custom css class for field custom style.', 'geodirectory');?> |
|
829 | + <?php _e('Enter custom css class for field custom style.', 'geodirectory'); ?> |
|
830 | 830 | </span> |
831 | 831 | </td> |
832 | 832 | </td> |
@@ -888,7 +888,7 @@ discard block |
||
888 | 888 | * @since 1.0.0 |
889 | 889 | * @param object $field_info The current fields info. |
890 | 890 | */ |
891 | - do_action('geodir_advance_custom_fields', $field_info);?> |
|
891 | + do_action('geodir_advance_custom_fields', $field_info); ?> |
|
892 | 892 | |
893 | 893 | <?php /*if(!in_array($field_type,array() )){?> |
894 | 894 | <tr> |
@@ -907,10 +907,10 @@ discard block |
||
907 | 907 | <td> </td> |
908 | 908 | <td align="left"> |
909 | 909 | |
910 | - <input type="button" class="button" name="save" id="save" value="<?php echo esc_attr(__('Save','geodirectory'));?>" |
|
910 | + <input type="button" class="button" name="save" id="save" value="<?php echo esc_attr(__('Save', 'geodirectory')); ?>" |
|
911 | 911 | onclick="save_field('<?php echo esc_attr($result_str); ?>')"/> |
912 | 912 | <?php if (!$default): ?> |
913 | - <a href="javascript:void(0)"><input type="button" name="delete" value="<?php echo esc_attr(__('Delete','geodirectory'));?>" |
|
913 | + <a href="javascript:void(0)"><input type="button" name="delete" value="<?php echo esc_attr(__('Delete', 'geodirectory')); ?>" |
|
914 | 914 | onclick="delete_field('<?php echo esc_attr($result_str); ?>', '<?php echo $nonce; ?>')" |
915 | 915 | class="button_n"/></a> |
916 | 916 | <?php endif; ?> |
@@ -1,11 +1,11 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Admin custom field form |
|
4 | - * |
|
5 | - * @since 1.0.0 |
|
6 | - * |
|
7 | - * @package GeoDirectory |
|
8 | - */ |
|
3 | + * Admin custom field form |
|
4 | + * |
|
5 | + * @since 1.0.0 |
|
6 | + * |
|
7 | + * @package GeoDirectory |
|
8 | + */ |
|
9 | 9 | |
10 | 10 | /** |
11 | 11 | * Displays the custom field form content. |
@@ -18,9 +18,9 @@ discard block |
||
18 | 18 | global $post_type; |
19 | 19 | |
20 | 20 | if (!isset($field_info->post_type)) { |
21 | - $post_type = sanitize_text_field($_REQUEST['listing_type']); |
|
21 | + $post_type = sanitize_text_field($_REQUEST['listing_type']); |
|
22 | 22 | } else |
23 | - $post_type = $field_info->post_type; |
|
23 | + $post_type = $field_info->post_type; |
|
24 | 24 | |
25 | 25 | $field_info = stripslashes_deep($field_info); // strip slashes from labels |
26 | 26 | |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | |
29 | 29 | $field_admin_title = ''; |
30 | 30 | if (isset($field_info->admin_title)) |
31 | - $field_admin_title = $field_info->admin_title; |
|
31 | + $field_admin_title = $field_info->admin_title; |
|
32 | 32 | |
33 | 33 | $default = isset($field_info->is_admin) ? $field_info->is_admin : ''; |
34 | 34 | |
@@ -47,8 +47,8 @@ discard block |
||
47 | 47 | ondblclick="show_hide('field_frm<?php echo $result_str; ?>')"> |
48 | 48 | <?php |
49 | 49 | |
50 | - $nonce = wp_create_nonce('custom_fields_' . $result_str); |
|
51 | - ?> |
|
50 | + $nonce = wp_create_nonce('custom_fields_' . $result_str); |
|
51 | + ?> |
|
52 | 52 | |
53 | 53 | <?php if ($default): ?> |
54 | 54 | <div title="<?php _e('Drag and drop to sort', 'geodirectory'); ?>" class="handlediv move"></div> |
@@ -57,42 +57,42 @@ discard block |
||
57 | 57 | onclick="delete_field('<?php echo $result_str; ?>', '<?php echo $nonce; ?>')" |
58 | 58 | class="handlediv close"></div> |
59 | 59 | <?php endif; |
60 | - if ($field_type == 'fieldset') { |
|
61 | - ?> |
|
60 | + if ($field_type == 'fieldset') { |
|
61 | + ?> |
|
62 | 62 | |
63 | 63 | <b style="cursor:pointer;" |
64 | 64 | onclick="show_hide('field_frm<?php echo $result_str;?>')"><?php echo geodir_ucwords(__('Fieldset:', 'geodirectory') . ' ' . $field_admin_title);?></b> |
65 | 65 | <?php |
66 | - } else { |
|
67 | - ?> |
|
66 | + } else { |
|
67 | + ?> |
|
68 | 68 | <b style="cursor:pointer;" |
69 | 69 | onclick="show_hide('field_frm<?php echo $result_str;?>')"><?php echo geodir_ucwords(__('Field:', 'geodirectory') . ' ' . $field_admin_title . ' (' . $field_type . ')');?></b> |
70 | 70 | <?php |
71 | - } |
|
72 | - ?> |
|
71 | + } |
|
72 | + ?> |
|
73 | 73 | </div> |
74 | 74 | |
75 | 75 | <div id="field_frm<?php echo $result_str; ?>" class="field_frm" |
76 | 76 | style="display:<?php if ($field_ins_upd == 'submit') { |
77 | - echo 'block;'; |
|
78 | - } else { |
|
79 | - echo 'none;'; |
|
80 | - } ?>"> |
|
77 | + echo 'block;'; |
|
78 | + } else { |
|
79 | + echo 'none;'; |
|
80 | + } ?>"> |
|
81 | 81 | <input type="hidden" name="_wpnonce" value="<?php echo esc_attr($nonce); ?>"/> |
82 | 82 | <input type="hidden" name="listing_type" id="listing_type" value="<?php echo $post_type; ?>"/> |
83 | 83 | <input type="hidden" name="field_type" id="field_type" value="<?php echo $field_type; ?>"/> |
84 | 84 | <input type="hidden" name="field_id" id="field_id" value="<?php echo esc_attr($result_str); ?>"/> |
85 | 85 | <input type="hidden" name="data_type" id="data_type" value="<?php if (isset($field_info->data_type)) { |
86 | - echo $field_info->data_type; |
|
87 | - } ?>"/> |
|
86 | + echo $field_info->data_type; |
|
87 | + } ?>"/> |
|
88 | 88 | <input type="hidden" name="is_active" id="is_active" value="1"/> |
89 | 89 | |
90 | 90 | <table class="widefat post fixed" border="0" style="width:100%;"> |
91 | 91 | <?php if ($field_type != 'text' || $default) { ?> |
92 | 92 | |
93 | 93 | <input type="hidden" name="data_type" id="data_type" value="<?php if (isset($field_info->data_type)) { |
94 | - echo esc_attr($field_info->data_type); |
|
95 | - } ?>"/> |
|
94 | + echo esc_attr($field_info->data_type); |
|
95 | + } ?>"/> |
|
96 | 96 | |
97 | 97 | <?php } else { ?> |
98 | 98 | |
@@ -104,16 +104,16 @@ discard block |
||
104 | 104 | onchange="javascript:gd_data_type_changed(this, '<?php echo $result_str; ?>');"> |
105 | 105 | <option |
106 | 106 | value="VARCHAR" <?php if (isset($field_info->data_type) && $field_info->data_type == 'VARCHAR') { |
107 | - echo 'selected="selected"'; |
|
108 | - } ?>><?php _e('CHARACTER', 'geodirectory'); ?></option> |
|
107 | + echo 'selected="selected"'; |
|
108 | + } ?>><?php _e('CHARACTER', 'geodirectory'); ?></option> |
|
109 | 109 | <option |
110 | 110 | value="INT" <?php if (isset($field_info->data_type) && $field_info->data_type == 'INT') { |
111 | - echo 'selected="selected"'; |
|
112 | - } ?>><?php _e('NUMBER', 'geodirectory'); ?></option> |
|
111 | + echo 'selected="selected"'; |
|
112 | + } ?>><?php _e('NUMBER', 'geodirectory'); ?></option> |
|
113 | 113 | <option |
114 | 114 | value="FLOAT" <?php if (isset($field_info->data_type) && $field_info->data_type == 'FLOAT') { |
115 | - echo 'selected="selected"'; |
|
116 | - } ?>><?php _e('DECIMAL', 'geodirectory'); ?></option> |
|
115 | + echo 'selected="selected"'; |
|
116 | + } ?>><?php _e('DECIMAL', 'geodirectory'); ?></option> |
|
117 | 117 | </select> |
118 | 118 | <br/> <span><?php _e('Select Custom Field type', 'geodirectory'); ?></span> |
119 | 119 | |
@@ -127,8 +127,8 @@ discard block |
||
127 | 127 | <select name="decimal_point" id="decimal_point"> |
128 | 128 | <option value=""><?php echo _e('Select', 'geodirectory'); ?></option> |
129 | 129 | <?php for ($i = 1; $i <= 10; $i++) { |
130 | - $decimal_point = isset($field_info->decimal_point) ? $field_info->decimal_point : ''; |
|
131 | - $selected = $i == $decimal_point ? 'selected="selected"' : ''; ?> |
|
130 | + $decimal_point = isset($field_info->decimal_point) ? $field_info->decimal_point : ''; |
|
131 | + $selected = $i == $decimal_point ? 'selected="selected"' : ''; ?> |
|
132 | 132 | <option value="<?php echo $i; ?>" <?php echo $selected; ?>><?php echo $i; ?></option> |
133 | 133 | <?php } ?> |
134 | 134 | </select> |
@@ -143,8 +143,8 @@ discard block |
||
143 | 143 | <td align="left"> |
144 | 144 | <input type="text" name="admin_title" id="admin_title" |
145 | 145 | value="<?php if (isset($field_info->admin_title)) { |
146 | - echo esc_attr($field_info->admin_title); |
|
147 | - } ?>"/> |
|
146 | + echo esc_attr($field_info->admin_title); |
|
147 | + } ?>"/> |
|
148 | 148 | <br/><span><?php _e('Personal comment, it would not be displayed anywhere except in custom field settings', 'geodirectory'); ?></span> |
149 | 149 | </td> |
150 | 150 | </tr> |
@@ -153,8 +153,8 @@ discard block |
||
153 | 153 | <td align="left"> |
154 | 154 | <input type="text" name="site_title" id="site_title" |
155 | 155 | value="<?php if (isset($field_info->site_title)) { |
156 | - echo esc_attr($field_info->site_title); |
|
157 | - } ?>"/> |
|
156 | + echo esc_attr($field_info->site_title); |
|
157 | + } ?>"/> |
|
158 | 158 | <br/><span><?php _e('Section title which you wish to display in frontend', 'geodirectory'); ?></span> |
159 | 159 | </td> |
160 | 160 | </tr> |
@@ -163,23 +163,23 @@ discard block |
||
163 | 163 | <td align="left"> |
164 | 164 | <input type="text" name="admin_desc" id="admin_desc" |
165 | 165 | value="<?php if (isset($field_info->admin_desc)) { |
166 | - echo esc_attr($field_info->admin_desc); |
|
167 | - } ?>"/> |
|
166 | + echo esc_attr($field_info->admin_desc); |
|
167 | + } ?>"/> |
|
168 | 168 | <br/><span><?php _e('Section description which will appear in frontend', 'geodirectory'); ?></span> |
169 | 169 | </td> |
170 | 170 | </tr> |
171 | 171 | <?php if ($field_type != 'fieldset' && $field_type != 'taxonomy') { |
172 | - ?> |
|
172 | + ?> |
|
173 | 173 | |
174 | 174 | <tr> |
175 | 175 | <td><strong><?php _e('HTML variable name :', 'geodirectory');?></strong></td> |
176 | 176 | <td align="left"> |
177 | 177 | <input type="text" name="htmlvar_name" id="htmlvar_name" |
178 | 178 | value="<?php if (isset($field_info->htmlvar_name)) { |
179 | - echo preg_replace('/geodir_/', '', $field_info->htmlvar_name, 1); |
|
180 | - }?>" <?php if ($default) { |
|
181 | - echo 'readonly="readonly"'; |
|
182 | - }?> /> |
|
179 | + echo preg_replace('/geodir_/', '', $field_info->htmlvar_name, 1); |
|
180 | + }?>" <?php if ($default) { |
|
181 | + echo 'readonly="readonly"'; |
|
182 | + }?> /> |
|
183 | 183 | <br/> <span><?php _e('HTML variable name must not be blank', 'geodirectory');?></span> |
184 | 184 | <br/> <span><?php _e('This should be a unique name', 'geodirectory');?></span> |
185 | 185 | <br/> |
@@ -191,8 +191,8 @@ discard block |
||
191 | 191 | <td><strong><?php _e('Admin label :', 'geodirectory'); ?></strong></td> |
192 | 192 | <td align="left"><input type="text" name="clabels" id="clabels" |
193 | 193 | value="<?php if (isset($field_info->clabels)) { |
194 | - echo esc_attr($field_info->clabels); |
|
195 | - } ?>"/> |
|
194 | + echo esc_attr($field_info->clabels); |
|
195 | + } ?>"/> |
|
196 | 196 | <br/> |
197 | 197 | <span><?php _e('Section Title which will appear in backend', 'geodirectory'); ?></span> |
198 | 198 | </td> |
@@ -223,8 +223,8 @@ discard block |
||
223 | 223 | <td><strong><?php _e('Display order :', 'geodirectory'); ?></strong></td> |
224 | 224 | <td align="left"><input type="text" readonly="readonly" name="sort_order" id="sort_order" |
225 | 225 | value="<?php if (isset($field_info->sort_order)) { |
226 | - echo esc_attr($field_info->sort_order); |
|
227 | - } ?>"/> |
|
226 | + echo esc_attr($field_info->sort_order); |
|
227 | + } ?>"/> |
|
228 | 228 | <br/> |
229 | 229 | <span><?php _e('Enter the display order of this field in backend. e.g. 5', 'geodirectory'); ?></span> |
230 | 230 | </td> |
@@ -235,11 +235,11 @@ discard block |
||
235 | 235 | <td align="left"> |
236 | 236 | <select name="is_default" id="is_default"> |
237 | 237 | <option value="0" <?php if (!isset($field_info->is_default) || $field_info->is_default == '0') { |
238 | - echo 'selected="selected"'; |
|
239 | - } ?>><?php _e('No', 'geodirectory'); ?></option> |
|
238 | + echo 'selected="selected"'; |
|
239 | + } ?>><?php _e('No', 'geodirectory'); ?></option> |
|
240 | 240 | <option value="1" <?php if (isset($field_info->is_default) && $field_info->is_default == '1') { |
241 | - echo 'selected="selected"'; |
|
242 | - } ?>><?php _e('Yes', 'geodirectory'); ?></option> |
|
241 | + echo 'selected="selected"'; |
|
242 | + } ?>><?php _e('Yes', 'geodirectory'); ?></option> |
|
243 | 243 | </select> |
244 | 244 | <br/> |
245 | 245 | <span><?php _e('Select yes or no. If no is selected then the field will be displayed as main form field or additional field', 'geodirectory'); ?></span> |
@@ -254,13 +254,13 @@ discard block |
||
254 | 254 | <td> |
255 | 255 | |
256 | 256 | <?php |
257 | - $selected = ''; |
|
258 | - if (isset($field_info->extra_fields)) |
|
259 | - $advanced_editor = unserialize($field_info->extra_fields); |
|
257 | + $selected = ''; |
|
258 | + if (isset($field_info->extra_fields)) |
|
259 | + $advanced_editor = unserialize($field_info->extra_fields); |
|
260 | 260 | |
261 | - if (!empty($advanced_editor) && is_array($advanced_editor) && in_array('1', $advanced_editor)) |
|
262 | - $selected = 'checked="checked"'; |
|
263 | - ?> |
|
261 | + if (!empty($advanced_editor) && is_array($advanced_editor) && in_array('1', $advanced_editor)) |
|
262 | + $selected = 'checked="checked"'; |
|
263 | + ?> |
|
264 | 264 | |
265 | 265 | <input type="checkbox" name="advanced_editor[]" id="advanced_editor" |
266 | 266 | value="1" <?php echo $selected; ?>/> |
@@ -268,42 +268,42 @@ discard block |
||
268 | 268 | </td> |
269 | 269 | |
270 | 270 | </tr><?php |
271 | - } ?> |
|
271 | + } ?> |
|
272 | 272 | |
273 | 273 | <?php |
274 | 274 | |
275 | - $pricearr = array(); |
|
276 | - if (isset($field_info->packages) && $field_info->packages != '') { |
|
277 | - $pricearr = explode(',', trim($field_info->packages, ',')); |
|
278 | - } else { |
|
279 | - $package_info = array(); |
|
275 | + $pricearr = array(); |
|
276 | + if (isset($field_info->packages) && $field_info->packages != '') { |
|
277 | + $pricearr = explode(',', trim($field_info->packages, ',')); |
|
278 | + } else { |
|
279 | + $package_info = array(); |
|
280 | 280 | |
281 | - $package_info = geodir_post_package_info($package_info, '', $post_type); |
|
282 | - $pricearr[] = $package_info->pid; |
|
283 | - } |
|
281 | + $package_info = geodir_post_package_info($package_info, '', $post_type); |
|
282 | + $pricearr[] = $package_info->pid; |
|
283 | + } |
|
284 | 284 | |
285 | - ob_start() |
|
286 | - ?> |
|
285 | + ob_start() |
|
286 | + ?> |
|
287 | 287 | |
288 | 288 | <select style="display:none" name="show_on_pkg[]" id="show_on_pkg" multiple="multiple"> |
289 | 289 | <?php |
290 | - if (!empty($pricearr)) { |
|
291 | - foreach ($pricearr as $val) { |
|
292 | - ?> |
|
290 | + if (!empty($pricearr)) { |
|
291 | + foreach ($pricearr as $val) { |
|
292 | + ?> |
|
293 | 293 | <option selected="selected" value="<?php echo esc_attr($val); ?>" ><?php echo $val; ?></option><?php |
294 | - } |
|
295 | - } |
|
296 | - ?> |
|
294 | + } |
|
295 | + } |
|
296 | + ?> |
|
297 | 297 | </select> |
298 | 298 | |
299 | 299 | <?php |
300 | - $html = ob_get_clean(); |
|
300 | + $html = ob_get_clean(); |
|
301 | 301 | |
302 | 302 | /** |
303 | 303 | * Filter the price packages list. |
304 | 304 | * |
305 | 305 | * Filter the price packages list in custom field form in admin |
306 | - * custom fields settings. |
|
306 | + * custom fields settings. |
|
307 | 307 | * |
308 | 308 | * @since 1.0.0 |
309 | 309 | * |
@@ -312,26 +312,26 @@ discard block |
||
312 | 312 | */ |
313 | 313 | echo $html = apply_filters('geodir_packages_list_on_custom_fields', $html, $field_info); |
314 | 314 | |
315 | - ?> |
|
315 | + ?> |
|
316 | 316 | |
317 | 317 | <tr> |
318 | 318 | <td><strong><?php _e('Is active :', 'geodirectory'); ?></strong></td> |
319 | 319 | <td align="left"> |
320 | 320 | <select name="is_active" id="is_active"> |
321 | 321 | <option value="1" <?php if (isset($field_info->is_active) && $field_info->is_active == '1') { |
322 | - echo 'selected="selected"'; |
|
323 | - } ?>><?php _e('Yes', 'geodirectory'); ?></option> |
|
322 | + echo 'selected="selected"'; |
|
323 | + } ?>><?php _e('Yes', 'geodirectory'); ?></option> |
|
324 | 324 | <option |
325 | 325 | value="0" <?php if ((isset($field_info->is_active) && $field_info->is_active == '0') || !isset($field_info->is_active)) { |
326 | - echo 'selected="selected"'; |
|
327 | - } ?>><?php _e('No', 'geodirectory'); ?></option> |
|
326 | + echo 'selected="selected"'; |
|
327 | + } ?>><?php _e('No', 'geodirectory'); ?></option> |
|
328 | 328 | </select> |
329 | 329 | <br/> |
330 | 330 | <span><?php _e('Select yes or no. If no is selected then the field will not be displayed anywhere', 'geodirectory'); ?></span> |
331 | 331 | </td> |
332 | 332 | </tr> |
333 | 333 | <?php if (!$default) { /* field for admin use only */ |
334 | - $for_admin_use = isset($field_info->for_admin_use) && $field_info->for_admin_use == '1' ? true : false; ?> |
|
334 | + $for_admin_use = isset($field_info->for_admin_use) && $field_info->for_admin_use == '1' ? true : false; ?> |
|
335 | 335 | <tr> |
336 | 336 | <td><strong><?php _e('For admin use only? :', 'geodirectory'); ?></strong></td> |
337 | 337 | <td align="left"> |
@@ -353,12 +353,12 @@ discard block |
||
353 | 353 | <select name="is_required" id="is_required"> |
354 | 354 | <option |
355 | 355 | value="1" <?php if (isset($field_info->is_required) && $field_info->is_required == '1') { |
356 | - echo 'selected="selected"'; |
|
357 | - } ?>><?php _e('Yes', 'geodirectory'); ?></option> |
|
356 | + echo 'selected="selected"'; |
|
357 | + } ?>><?php _e('Yes', 'geodirectory'); ?></option> |
|
358 | 358 | <option |
359 | 359 | value="0" <?php if ((isset($field_info->is_required) && $field_info->is_required == '0') || !isset($field_info->is_required)) { |
360 | - echo 'selected="selected"'; |
|
361 | - } ?>><?php _e('No', 'geodirectory'); ?></option> |
|
360 | + echo 'selected="selected"'; |
|
361 | + } ?>><?php _e('No', 'geodirectory'); ?></option> |
|
362 | 362 | </select> |
363 | 363 | <br/> <span><?php _e('Select yes to set field as required', 'geodirectory'); ?></span> |
364 | 364 | </td> |
@@ -370,8 +370,8 @@ discard block |
||
370 | 370 | <td align="left"> |
371 | 371 | <input type="text" name="required_msg" id="required_msg" |
372 | 372 | value="<?php if (isset($field_info->required_msg)) { |
373 | - echo esc_attr($field_info->required_msg); |
|
374 | - } ?>"/> |
|
373 | + echo esc_attr($field_info->required_msg); |
|
374 | + } ?>"/> |
|
375 | 375 | <span> |
376 | 376 | <?php _e('Enter text for error message if field required and have not full fill requirement.', 'geodirectory'); ?> |
377 | 377 | </span> |
@@ -385,8 +385,8 @@ discard block |
||
385 | 385 | <td align="left"> |
386 | 386 | <input type="text" name="validation_pattern" id="validation_pattern" |
387 | 387 | value="<?php if (isset($field_info->validation_pattern)) { |
388 | - echo esc_attr($field_info->validation_pattern); |
|
389 | - } ?>"/> |
|
388 | + echo esc_attr($field_info->validation_pattern); |
|
389 | + } ?>"/> |
|
390 | 390 | <span> |
391 | 391 | <?php _e('Enter regex expression for HTML5 pattern validation.', 'geodirectory'); ?> |
392 | 392 | </span> |
@@ -399,8 +399,8 @@ discard block |
||
399 | 399 | <td align="left"> |
400 | 400 | <input type="text" name="validation_msg" id="validation_msg" |
401 | 401 | value="<?php if (isset($field_info->validation_msg)) { |
402 | - echo esc_attr($field_info->validation_msg); |
|
403 | - } ?>"/> |
|
402 | + echo esc_attr($field_info->validation_msg); |
|
403 | + } ?>"/> |
|
404 | 404 | <span> |
405 | 405 | <?php _e('Enter a extra validation message to show to the user if validation fails.', 'geodirectory'); ?> |
406 | 406 | </span> |
@@ -415,12 +415,12 @@ discard block |
||
415 | 415 | <select name="show_on_listing" id="show_on_listing"> |
416 | 416 | <option |
417 | 417 | value="1" <?php if (isset($field_info->show_on_listing) && $field_info->show_on_listing == '1') { |
418 | - echo 'selected="selected"'; |
|
419 | - } ?>><?php _e('Yes', 'geodirectory'); ?></option> |
|
418 | + echo 'selected="selected"'; |
|
419 | + } ?>><?php _e('Yes', 'geodirectory'); ?></option> |
|
420 | 420 | <option |
421 | 421 | value="0" <?php if ((isset($field_info->show_on_listing) && ($field_info->show_on_listing == '0' || $field_info->show_on_listing == '')) || !isset($field_info->show_on_listing)) { |
422 | - echo 'selected="selected"'; |
|
423 | - } ?>><?php _e('No', 'geodirectory'); ?></option> |
|
422 | + echo 'selected="selected"'; |
|
423 | + } ?>><?php _e('No', 'geodirectory'); ?></option> |
|
424 | 424 | </select> |
425 | 425 | <br/> <span><?php _e('Want to show this on listing page ?', 'geodirectory'); ?></span> |
426 | 426 | </td> |
@@ -432,12 +432,12 @@ discard block |
||
432 | 432 | <select name="show_on_detail" id="show_on_detail"> |
433 | 433 | <option |
434 | 434 | value="1" <?php if (isset($field_info->show_on_detail) && $field_info->show_on_detail == '1') { |
435 | - echo 'selected="selected"'; |
|
436 | - } ?>><?php _e('Yes', 'geodirectory'); ?></option> |
|
435 | + echo 'selected="selected"'; |
|
436 | + } ?>><?php _e('Yes', 'geodirectory'); ?></option> |
|
437 | 437 | <option |
438 | 438 | value="0" <?php if ((isset($field_info->show_on_detail) && ($field_info->show_on_detail == '0' || $field_info->show_on_detail == '')) || !isset($field_info->show_on_detail)) { |
439 | - echo 'selected="selected"'; |
|
440 | - } ?>><?php _e('No', 'geodirectory'); ?></option> |
|
439 | + echo 'selected="selected"'; |
|
440 | + } ?>><?php _e('No', 'geodirectory'); ?></option> |
|
441 | 441 | </select> |
442 | 442 | <br/> |
443 | 443 | <span><?php _e('Want to show this in More Info tab on detail page?', 'geodirectory'); ?></span> |
@@ -450,12 +450,12 @@ discard block |
||
450 | 450 | <select name="show_as_tab" id="show_as_tab"> |
451 | 451 | <option |
452 | 452 | value="1" <?php if (isset($field_info->show_as_tab) && $field_info->show_as_tab == '1') { |
453 | - echo 'selected="selected"'; |
|
454 | - } ?>><?php _e('Yes', 'geodirectory'); ?></option> |
|
453 | + echo 'selected="selected"'; |
|
454 | + } ?>><?php _e('Yes', 'geodirectory'); ?></option> |
|
455 | 455 | <option |
456 | 456 | value="0" <?php if ((isset($field_info->show_as_tab) && ($field_info->show_as_tab == '0' || $field_info->show_as_tab == '')) || !isset($field_info->show_as_tab)) { |
457 | - echo 'selected="selected"'; |
|
458 | - } ?>><?php _e('No', 'geodirectory'); ?></option> |
|
457 | + echo 'selected="selected"'; |
|
458 | + } ?>><?php _e('No', 'geodirectory'); ?></option> |
|
459 | 459 | </select> |
460 | 460 | <br/><span><?php _e('Want to display this as a tab on detail page? If "Yes" then "Show on detail page?" must be Yes.', 'geodirectory'); ?></span> |
461 | 461 | </td> |
@@ -464,23 +464,23 @@ discard block |
||
464 | 464 | |
465 | 465 | <?php |
466 | 466 | |
467 | - switch ($field_type): |
|
468 | - case 'taxonomy': { |
|
469 | - ?> |
|
467 | + switch ($field_type): |
|
468 | + case 'taxonomy': { |
|
469 | + ?> |
|
470 | 470 | <tr> |
471 | 471 | <td><strong><?php _e('Select taxonomy:', 'geodirectory');?></strong></td> |
472 | 472 | <td align="left"> |
473 | 473 | <select name="htmlvar_name" id="htmlvar_name"> |
474 | 474 | <?php |
475 | - $gd_taxonomy = geodir_get_taxonomies($post_type); |
|
475 | + $gd_taxonomy = geodir_get_taxonomies($post_type); |
|
476 | 476 | |
477 | - foreach ($gd_taxonomy as $gd_tax) { |
|
478 | - ?> |
|
477 | + foreach ($gd_taxonomy as $gd_tax) { |
|
478 | + ?> |
|
479 | 479 | <option <?php if (isset($field_info->htmlvar_name) && $field_info->htmlvar_name == $gd_tax) { |
480 | - echo 'selected="selected"'; |
|
481 | - }?> id="<?php echo $gd_tax;?>"><?php echo $gd_tax;?></option><?php |
|
482 | - } |
|
483 | - ?> |
|
480 | + echo 'selected="selected"'; |
|
481 | + }?> id="<?php echo $gd_tax;?>"><?php echo $gd_tax;?></option><?php |
|
482 | + } |
|
483 | + ?> |
|
484 | 484 | </select> |
485 | 485 | |
486 | 486 | <br/> |
@@ -494,20 +494,20 @@ discard block |
||
494 | 494 | |
495 | 495 | <select name="cat_display_type" id="cat_display_type"> |
496 | 496 | <option <?php if (isset($field_info->extra_fields) && unserialize($field_info->extra_fields) == 'ajax_chained') { |
497 | - echo 'selected="selected"'; |
|
498 | - }?> value="ajax_chained"><?php _e('Ajax Chained', 'geodirectory');?></option> |
|
497 | + echo 'selected="selected"'; |
|
498 | + }?> value="ajax_chained"><?php _e('Ajax Chained', 'geodirectory');?></option> |
|
499 | 499 | <option <?php if (isset($field_info->extra_fields) && unserialize($field_info->extra_fields) == 'select') { |
500 | - echo 'selected="selected"'; |
|
501 | - }?> value="select"><?php _e('Select', 'geodirectory');?></option> |
|
500 | + echo 'selected="selected"'; |
|
501 | + }?> value="select"><?php _e('Select', 'geodirectory');?></option> |
|
502 | 502 | <option <?php if (isset($field_info->extra_fields) && unserialize($field_info->extra_fields) == 'multiselect') { |
503 | - echo 'selected="selected"'; |
|
504 | - }?> value="multiselect"><?php _e('Multiselect', 'geodirectory');?></option> |
|
503 | + echo 'selected="selected"'; |
|
504 | + }?> value="multiselect"><?php _e('Multiselect', 'geodirectory');?></option> |
|
505 | 505 | <option <?php if (isset($field_info->extra_fields) && unserialize($field_info->extra_fields) == 'checkbox') { |
506 | - echo 'selected="selected"'; |
|
507 | - }?> value="checkbox"><?php _e('Checkbox', 'geodirectory');?></option> |
|
506 | + echo 'selected="selected"'; |
|
507 | + }?> value="checkbox"><?php _e('Checkbox', 'geodirectory');?></option> |
|
508 | 508 | <option <?php if (isset($field_info->extra_fields) && unserialize($field_info->extra_fields) == 'radio') { |
509 | - echo 'selected="selected"'; |
|
510 | - }?> value="radio"><?php _e('Radio', 'geodirectory');?></option> |
|
509 | + echo 'selected="selected"'; |
|
510 | + }?> value="radio"><?php _e('Radio', 'geodirectory');?></option> |
|
511 | 511 | </select> |
512 | 512 | |
513 | 513 | <br/> |
@@ -515,29 +515,29 @@ discard block |
||
515 | 515 | </td> |
516 | 516 | </tr> |
517 | 517 | <?php } // end of additional field for taxonomy field type |
518 | - break; |
|
519 | - case 'address': { |
|
520 | - if (isset($field_info->extra_fields) && $field_info->extra_fields != '') { |
|
521 | - $address = unserialize($field_info->extra_fields); |
|
522 | - } |
|
523 | - ?> |
|
518 | + break; |
|
519 | + case 'address': { |
|
520 | + if (isset($field_info->extra_fields) && $field_info->extra_fields != '') { |
|
521 | + $address = unserialize($field_info->extra_fields); |
|
522 | + } |
|
523 | + ?> |
|
524 | 524 | <?php |
525 | - /** |
|
526 | - * Called on the add custom fields settings page before the address field is output. |
|
527 | - * |
|
528 | - * @since 1.0.0 |
|
529 | - * @param array $address The address settings array. |
|
530 | - * @param object $field_info Extra fileds info. |
|
531 | - */ |
|
532 | - do_action('geodir_address_extra_admin_fields', $address, $field_info); ?> |
|
525 | + /** |
|
526 | + * Called on the add custom fields settings page before the address field is output. |
|
527 | + * |
|
528 | + * @since 1.0.0 |
|
529 | + * @param array $address The address settings array. |
|
530 | + * @param object $field_info Extra fileds info. |
|
531 | + */ |
|
532 | + do_action('geodir_address_extra_admin_fields', $address, $field_info); ?> |
|
533 | 533 | |
534 | 534 | <tr> |
535 | 535 | <td><strong><?php _e('Display zip/post code :', 'geodirectory');?></strong></td> |
536 | 536 | <td align="left"> |
537 | 537 | <input type="checkbox" name="extra[show_zip]" id="show_zip" |
538 | 538 | value="1" <?php if (isset($address['show_zip']) && $address['show_zip'] == '1') { |
539 | - echo 'checked="checked"'; |
|
540 | - }?>/> |
|
539 | + echo 'checked="checked"'; |
|
540 | + }?>/> |
|
541 | 541 | <span><?php _e('Select if you want to show zip/post code field in address section.', 'geodirectory');?></span> |
542 | 542 | </td> |
543 | 543 | </tr> |
@@ -547,8 +547,8 @@ discard block |
||
547 | 547 | <td align="left"> |
548 | 548 | <input type="text" name="extra[zip_lable]" id="zip_lable" |
549 | 549 | value="<?php if (isset($address['zip_lable'])) { |
550 | - echo esc_attr($address['zip_lable']); |
|
551 | - }?>"/> |
|
550 | + echo esc_attr($address['zip_lable']); |
|
551 | + }?>"/> |
|
552 | 552 | <span><?php _e('Enter zip/post code field label in address section.', 'geodirectory');?></span> |
553 | 553 | </td> |
554 | 554 | </tr> |
@@ -558,8 +558,8 @@ discard block |
||
558 | 558 | <td align="left"> |
559 | 559 | <input type="checkbox" name="extra[show_map]" id="show_map" |
560 | 560 | value="1" <?php if (isset($address['show_map']) && $address['show_map'] == '1') { |
561 | - echo 'checked="checked"'; |
|
562 | - }?>/> |
|
561 | + echo 'checked="checked"'; |
|
562 | + }?>/> |
|
563 | 563 | <span><?php _e('Select if you want to `set address on map` field in address section.', 'geodirectory');?></span> |
564 | 564 | </td> |
565 | 565 | </tr> |
@@ -569,8 +569,8 @@ discard block |
||
569 | 569 | <td align="left"> |
570 | 570 | <input type="text" name="extra[map_lable]" id="map_lable" |
571 | 571 | value="<?php if (isset($address['map_lable'])) { |
572 | - echo esc_attr($address['map_lable']); |
|
573 | - }?>"/> |
|
572 | + echo esc_attr($address['map_lable']); |
|
573 | + }?>"/> |
|
574 | 574 | <span><?php _e('Enter text for `set address on map` button in address section.', 'geodirectory');?></span> |
575 | 575 | </td> |
576 | 576 | </tr> |
@@ -580,8 +580,8 @@ discard block |
||
580 | 580 | <td align="left"> |
581 | 581 | <input type="checkbox" name="extra[show_mapzoom]" id="show_mapzoom" |
582 | 582 | value="1" <?php if (isset($address['show_mapzoom']) && $address['show_mapzoom'] == '1') { |
583 | - echo 'checked="checked"'; |
|
584 | - }?>/> |
|
583 | + echo 'checked="checked"'; |
|
584 | + }?>/> |
|
585 | 585 | <span><?php _e('Select if you want to use the user defined map zoom level.', 'geodirectory');?></span> |
586 | 586 | </td> |
587 | 587 | </tr> |
@@ -591,8 +591,8 @@ discard block |
||
591 | 591 | <td align="left"> |
592 | 592 | <input type="checkbox" name="extra[show_mapview]" id="show_mapview" |
593 | 593 | value="1" <?php if (isset($address['show_mapview']) && $address['show_mapview'] == '1') { |
594 | - echo 'checked="checked"'; |
|
595 | - }?>/> |
|
594 | + echo 'checked="checked"'; |
|
595 | + }?>/> |
|
596 | 596 | <span><?php _e('Select if you want to `set default map` options in address section.', 'geodirectory');?></span> |
597 | 597 | </td> |
598 | 598 | </tr> |
@@ -603,8 +603,8 @@ discard block |
||
603 | 603 | <td align="left"> |
604 | 604 | <input type="text" name="extra[mapview_lable]" id="mapview_lable" |
605 | 605 | value="<?php if (isset($address['mapview_lable'])) { |
606 | - echo esc_attr($address['mapview_lable']); |
|
607 | - }?>"/> |
|
606 | + echo esc_attr($address['mapview_lable']); |
|
607 | + }?>"/> |
|
608 | 608 | <span><?php _e('Enter mapview field label in address section.', 'geodirectory');?></span> |
609 | 609 | </td> |
610 | 610 | </tr> |
@@ -615,33 +615,33 @@ discard block |
||
615 | 615 | <td align="left"> |
616 | 616 | <input type="checkbox" name="extra[show_latlng]" id="show_latlng" |
617 | 617 | value="1" <?php if (isset($address['show_latlng']) && $address['show_latlng'] == '1') { |
618 | - echo 'checked="checked"'; |
|
619 | - }?>/> |
|
618 | + echo 'checked="checked"'; |
|
619 | + }?>/> |
|
620 | 620 | <span><?php _e('Select if you want to show latitude and logatude fields in address section from front-end.', 'geodirectory');?></span> |
621 | 621 | </td> |
622 | 622 | </tr> |
623 | 623 | <?php } // end of extra fields for address field type |
624 | - break; |
|
625 | - case 'select': |
|
626 | - case 'multiselect': |
|
627 | - case 'radio' : { |
|
628 | - if ($field_type == 'multiselect') { |
|
624 | + break; |
|
625 | + case 'select': |
|
626 | + case 'multiselect': |
|
627 | + case 'radio' : { |
|
628 | + if ($field_type == 'multiselect') { |
|
629 | 629 | |
630 | - ?> |
|
630 | + ?> |
|
631 | 631 | <tr> |
632 | 632 | <td><strong><?php _e('Multiselect display type :', 'geodirectory');?></strong></td> |
633 | 633 | <td align="left"> |
634 | 634 | |
635 | 635 | <select name="multi_display_type" id="multi_display_type"> |
636 | 636 | <option <?php if (isset($field_info->extra_fields) && unserialize($field_info->extra_fields) == 'select') { |
637 | - echo 'selected="selected"'; |
|
638 | - }?> value="select"><?php _e('Select', 'geodirectory');?></option> |
|
637 | + echo 'selected="selected"'; |
|
638 | + }?> value="select"><?php _e('Select', 'geodirectory');?></option> |
|
639 | 639 | <option <?php if (isset($field_info->extra_fields) && unserialize($field_info->extra_fields) == 'checkbox') { |
640 | - echo 'selected="selected"'; |
|
641 | - }?> value="checkbox"><?php _e('Checkbox', 'geodirectory');?></option> |
|
640 | + echo 'selected="selected"'; |
|
641 | + }?> value="checkbox"><?php _e('Checkbox', 'geodirectory');?></option> |
|
642 | 642 | <option <?php if (isset($field_info->extra_fields) && unserialize($field_info->extra_fields) == 'radio') { |
643 | - echo 'selected="selected"'; |
|
644 | - }?> value="radio"><?php _e('Radio', 'geodirectory');?></option> |
|
643 | + echo 'selected="selected"'; |
|
644 | + }?> value="radio"><?php _e('Radio', 'geodirectory');?></option> |
|
645 | 645 | </select> |
646 | 646 | |
647 | 647 | <br/> |
@@ -649,15 +649,15 @@ discard block |
||
649 | 649 | </td> |
650 | 650 | </tr> |
651 | 651 | <?php |
652 | - } |
|
653 | - ?> |
|
652 | + } |
|
653 | + ?> |
|
654 | 654 | <tr> |
655 | 655 | <td><strong><?php _e('Option Values :', 'geodirectory');?></strong></td> |
656 | 656 | <td align="left"> |
657 | 657 | <input type="text" name="option_values" id="option_values" |
658 | 658 | value="<?php if (isset($field_info->option_values)) { |
659 | - echo esc_attr($field_info->option_values); |
|
660 | - }?>"/> |
|
659 | + echo esc_attr($field_info->option_values); |
|
660 | + }?>"/> |
|
661 | 661 | <br/> |
662 | 662 | <span><?php _e('Option Values should be separated by comma.', 'geodirectory');?></span> |
663 | 663 | <br/> |
@@ -673,20 +673,20 @@ discard block |
||
673 | 673 | </td> |
674 | 674 | </tr> |
675 | 675 | <?php |
676 | - } // end of extra fields for select , multiselect and radio type fields |
|
677 | - break; |
|
678 | - case 'datepicker': { |
|
679 | - if (isset($field_info->extra_fields) && $field_info->extra_fields != '') { |
|
680 | - $extra = unserialize($field_info->extra_fields); |
|
681 | - } |
|
682 | - ?> |
|
676 | + } // end of extra fields for select , multiselect and radio type fields |
|
677 | + break; |
|
678 | + case 'datepicker': { |
|
679 | + if (isset($field_info->extra_fields) && $field_info->extra_fields != '') { |
|
680 | + $extra = unserialize($field_info->extra_fields); |
|
681 | + } |
|
682 | + ?> |
|
683 | 683 | <tr> |
684 | 684 | <td><strong><?php _e('Date Format :', 'geodirectory');?></strong></td> |
685 | 685 | <td align="left" style="overflow:inherit;"> |
686 | 686 | <input type="text" name="extra[date_format]" id="date_format" |
687 | 687 | value="<?php if (isset($extra['date_format'])) { |
688 | - echo esc_attr($extra['date_format']); |
|
689 | - }else{echo "mm/dd/yy";}?>"/> |
|
688 | + echo esc_attr($extra['date_format']); |
|
689 | + }else{echo "mm/dd/yy";}?>"/> |
|
690 | 690 | |
691 | 691 | <div style="position:relative; cursor:pointer;"> |
692 | 692 | <span onclick="jQuery('#show_dateformat').toggle();"> |
@@ -768,8 +768,8 @@ discard block |
||
768 | 768 | </td> |
769 | 769 | </tr> |
770 | 770 | <?php |
771 | - } |
|
772 | - break; |
|
771 | + } |
|
772 | + break; |
|
773 | 773 | case 'file': { |
774 | 774 | $allowed_file_types = geodir_allowed_mime_types(); |
775 | 775 | |
@@ -797,9 +797,9 @@ discard block |
||
797 | 797 | } |
798 | 798 | break; |
799 | 799 | |
800 | - endswitch; ?> |
|
800 | + endswitch; ?> |
|
801 | 801 | <?php if ($field_type != 'fieldset') { |
802 | - ?> |
|
802 | + ?> |
|
803 | 803 | <tr> |
804 | 804 | <td colspan="2" align="left"><h3><?php echo __('Custom css', 'geodirectory'); ?></h3></td> |
805 | 805 | </tr> |
@@ -809,8 +809,8 @@ discard block |
||
809 | 809 | <td align="left"> |
810 | 810 | <input type="text" name="field_icon" id="field_icon" |
811 | 811 | value="<?php if (isset($field_info->field_icon)) { |
812 | - echo $field_info->field_icon; |
|
813 | - }?>"/> |
|
812 | + echo $field_info->field_icon; |
|
813 | + }?>"/> |
|
814 | 814 | <span> |
815 | 815 | <?php _e('Upload icon using media and enter its url path, or enter <a href="http://fortawesome.github.io/Font-Awesome/icons/" target="_blank" >font awesome </a>class eg:"fa fa-home"', 'geodirectory');?> |
816 | 816 | </span> |
@@ -823,8 +823,8 @@ discard block |
||
823 | 823 | <td align="left"> |
824 | 824 | <input type="text" name="css_class" id="css_class" |
825 | 825 | value="<?php if (isset($field_info->css_class)) { |
826 | - echo esc_attr($field_info->css_class); |
|
827 | - }?>"/> |
|
826 | + echo esc_attr($field_info->css_class); |
|
827 | + }?>"/> |
|
828 | 828 | <span> |
829 | 829 | <?php _e('Enter custom css class for field custom style.', 'geodirectory');?> |
830 | 830 | </span> |
@@ -832,19 +832,19 @@ discard block |
||
832 | 832 | </td> |
833 | 833 | </tr> |
834 | 834 | <?php |
835 | - } |
|
836 | - ?> |
|
835 | + } |
|
836 | + ?> |
|
837 | 837 | |
838 | 838 | <?php |
839 | 839 | |
840 | - switch ($field_type): |
|
841 | - case 'html': |
|
842 | - case 'file': |
|
843 | - case 'url': |
|
844 | - case 'fieldset': |
|
845 | - break; |
|
846 | - default: |
|
847 | - ?> |
|
840 | + switch ($field_type): |
|
841 | + case 'html': |
|
842 | + case 'file': |
|
843 | + case 'url': |
|
844 | + case 'fieldset': |
|
845 | + break; |
|
846 | + default: |
|
847 | + ?> |
|
848 | 848 | |
849 | 849 | <tr> |
850 | 850 | <td colspan="2" align="left"> |
@@ -862,7 +862,7 @@ discard block |
||
862 | 862 | */ |
863 | 863 | echo apply_filters('geodir_advance_custom_fields_heading', __('Posts sort options', 'geodirectory'), $field_type); |
864 | 864 | |
865 | - ?></h3> |
|
865 | + ?></h3> |
|
866 | 866 | </td> |
867 | 867 | </tr> |
868 | 868 | |
@@ -872,23 +872,23 @@ discard block |
||
872 | 872 | <td>: |
873 | 873 | <input type="checkbox" name="cat_sort[]" id="cat_sort" |
874 | 874 | value="1" <?php if (isset($field_info->cat_sort[0]) && $field_info->cat_sort[0] == '1') { |
875 | - echo 'checked="checked"'; |
|
876 | - } ?>/> |
|
875 | + echo 'checked="checked"'; |
|
876 | + } ?>/> |
|
877 | 877 | <span><?php _e('Select if you want to show option in sort.', 'geodirectory'); ?></span> |
878 | 878 | </td> |
879 | 879 | </tr> |
880 | 880 | <?php } ?> |
881 | 881 | |
882 | 882 | <?php |
883 | - /** |
|
884 | - * Called at the end of the advanced custom fields settings page loop. |
|
885 | - * |
|
886 | - * Can be used to add or deal with different settings types. |
|
887 | - * |
|
888 | - * @since 1.0.0 |
|
889 | - * @param object $field_info The current fields info. |
|
890 | - */ |
|
891 | - do_action('geodir_advance_custom_fields', $field_info);?> |
|
883 | + /** |
|
884 | + * Called at the end of the advanced custom fields settings page loop. |
|
885 | + * |
|
886 | + * Can be used to add or deal with different settings types. |
|
887 | + * |
|
888 | + * @since 1.0.0 |
|
889 | + * @param object $field_info The current fields info. |
|
890 | + */ |
|
891 | + do_action('geodir_advance_custom_fields', $field_info);?> |
|
892 | 892 | |
893 | 893 | <?php /*if(!in_array($field_type,array() )){?> |
894 | 894 | <tr> |
@@ -19,16 +19,18 @@ discard block |
||
19 | 19 | |
20 | 20 | if (!isset($field_info->post_type)) { |
21 | 21 | $post_type = sanitize_text_field($_REQUEST['listing_type']); |
22 | -} else |
|
23 | - $post_type = $field_info->post_type; |
|
22 | +} else { |
|
23 | + $post_type = $field_info->post_type; |
|
24 | +} |
|
24 | 25 | |
25 | 26 | $field_info = stripslashes_deep($field_info); // strip slashes from labels |
26 | 27 | |
27 | 28 | $nonce = wp_create_nonce('custom_fields_' . $result_str); |
28 | 29 | |
29 | 30 | $field_admin_title = ''; |
30 | -if (isset($field_info->admin_title)) |
|
31 | - $field_admin_title = $field_info->admin_title; |
|
31 | +if (isset($field_info->admin_title)) { |
|
32 | + $field_admin_title = $field_info->admin_title; |
|
33 | +} |
|
32 | 34 | |
33 | 35 | $default = isset($field_info->is_admin) ? $field_info->is_admin : ''; |
34 | 36 | |
@@ -52,8 +54,11 @@ discard block |
||
52 | 54 | |
53 | 55 | <?php if ($default): ?> |
54 | 56 | <div title="<?php _e('Drag and drop to sort', 'geodirectory'); ?>" class="handlediv move"></div> |
55 | - <?php else: ?> |
|
56 | - <div title="<?php _e('Click to remove field', 'geodirectory'); ?>" |
|
57 | + <?php else { |
|
58 | + : ?> |
|
59 | + <div title="<?php _e('Click to remove field', 'geodirectory'); |
|
60 | +} |
|
61 | +?>" |
|
57 | 62 | onclick="delete_field('<?php echo $result_str; ?>', '<?php echo $nonce; ?>')" |
58 | 63 | class="handlediv close"></div> |
59 | 64 | <?php endif; |
@@ -255,11 +260,13 @@ discard block |
||
255 | 260 | |
256 | 261 | <?php |
257 | 262 | $selected = ''; |
258 | - if (isset($field_info->extra_fields)) |
|
259 | - $advanced_editor = unserialize($field_info->extra_fields); |
|
263 | + if (isset($field_info->extra_fields)) { |
|
264 | + $advanced_editor = unserialize($field_info->extra_fields); |
|
265 | + } |
|
260 | 266 | |
261 | - if (!empty($advanced_editor) && is_array($advanced_editor) && in_array('1', $advanced_editor)) |
|
262 | - $selected = 'checked="checked"'; |
|
267 | + if (!empty($advanced_editor) && is_array($advanced_editor) && in_array('1', $advanced_editor)) { |
|
268 | + $selected = 'checked="checked"'; |
|
269 | + } |
|
263 | 270 | ?> |
264 | 271 | |
265 | 272 | <input type="checkbox" name="advanced_editor[]" id="advanced_editor" |
@@ -686,7 +693,7 @@ discard block |
||
686 | 693 | <input type="text" name="extra[date_format]" id="date_format" |
687 | 694 | value="<?php if (isset($extra['date_format'])) { |
688 | 695 | echo esc_attr($extra['date_format']); |
689 | - }else{echo "mm/dd/yy";}?>"/> |
|
696 | + } else{echo "mm/dd/yy";}?>"/> |
|
690 | 697 | |
691 | 698 | <div style="position:relative; cursor:pointer;"> |
692 | 699 | <span onclick="jQuery('#show_dateformat').toggle();"> |
@@ -72,58 +72,58 @@ discard block |
||
72 | 72 | |
73 | 73 | $start_date = ''; |
74 | 74 | $end_date = ''; |
75 | - if(isset($_REQUEST['ga_type']) && $_REQUEST['ga_type']=='thisweek'){ |
|
76 | - if(!$ga_start){$ga_start = date('Y-m-d', strtotime("-6 day"));} |
|
77 | - if(!$ga_end){$ga_end = date('Y-m-d');} |
|
75 | + if (isset($_REQUEST['ga_type']) && $_REQUEST['ga_type'] == 'thisweek') { |
|
76 | + if (!$ga_start) {$ga_start = date('Y-m-d', strtotime("-6 day")); } |
|
77 | + if (!$ga_end) {$ga_end = date('Y-m-d'); } |
|
78 | 78 | $dimensions = "&dimensions=ga:date,ga:nthDay"; |
79 | - }elseif(isset($_REQUEST['ga_type']) && $_REQUEST['ga_type']=='lastweek'){ |
|
80 | - if(!$ga_start){$ga_start = date('Y-m-d', strtotime("-13 day"));} |
|
81 | - if(!$ga_end){$ga_end = date('Y-m-d', strtotime("-7 day"));} |
|
79 | + }elseif (isset($_REQUEST['ga_type']) && $_REQUEST['ga_type'] == 'lastweek') { |
|
80 | + if (!$ga_start) {$ga_start = date('Y-m-d', strtotime("-13 day")); } |
|
81 | + if (!$ga_end) {$ga_end = date('Y-m-d', strtotime("-7 day")); } |
|
82 | 82 | $dimensions = "&dimensions=ga:date,ga:nthDay"; |
83 | 83 | } |
84 | - elseif(isset($_REQUEST['ga_type']) && $_REQUEST['ga_type']=='thisyear'){ |
|
85 | - if(!$ga_start){$ga_start = date('Y')."-01-01";} |
|
86 | - if(!$ga_end){$ga_end = date('Y-m-d');} |
|
84 | + elseif (isset($_REQUEST['ga_type']) && $_REQUEST['ga_type'] == 'thisyear') { |
|
85 | + if (!$ga_start) {$ga_start = date('Y') . "-01-01"; } |
|
86 | + if (!$ga_end) {$ga_end = date('Y-m-d'); } |
|
87 | 87 | $dimensions = "&dimensions=ga:month,ga:nthMonth"; |
88 | 88 | } |
89 | - elseif(isset($_REQUEST['ga_type']) && $_REQUEST['ga_type']=='lastyear'){ |
|
90 | - if(!$ga_start){$ga_start = date('Y', strtotime("-1 year"))."-01-01";} |
|
91 | - if(!$ga_end){$ga_end = date('Y', strtotime("-1 year"))."-12-31";} |
|
89 | + elseif (isset($_REQUEST['ga_type']) && $_REQUEST['ga_type'] == 'lastyear') { |
|
90 | + if (!$ga_start) {$ga_start = date('Y', strtotime("-1 year")) . "-01-01"; } |
|
91 | + if (!$ga_end) {$ga_end = date('Y', strtotime("-1 year")) . "-12-31"; } |
|
92 | 92 | $dimensions = "&dimensions=ga:month,ga:nthMonth"; |
93 | 93 | } |
94 | - elseif(isset($_REQUEST['ga_type']) && $_REQUEST['ga_type']=='country'){ |
|
95 | - if(!$ga_start){$ga_start = "14daysAgo";} |
|
96 | - if(!$ga_end){$ga_end = "yesterday";} |
|
94 | + elseif (isset($_REQUEST['ga_type']) && $_REQUEST['ga_type'] == 'country') { |
|
95 | + if (!$ga_start) {$ga_start = "14daysAgo"; } |
|
96 | + if (!$ga_end) {$ga_end = "yesterday"; } |
|
97 | 97 | $dimensions = "&dimensions=ga:country&sort=-ga:pageviews&max-results=5"; |
98 | 98 | } |
99 | 99 | |
100 | 100 | |
101 | 101 | $APIURL = "https://www.googleapis.com/analytics/v3/data/ga?"; |
102 | - $ids = "ids=".$id; |
|
103 | - if(!$start_date){$start_date = "&start-date=".$ga_start;} |
|
104 | - if(!$end_date){$end_date = "&end-date=".$ga_end;} |
|
102 | + $ids = "ids=" . $id; |
|
103 | + if (!$start_date) {$start_date = "&start-date=" . $ga_start; } |
|
104 | + if (!$end_date) {$end_date = "&end-date=" . $ga_end; } |
|
105 | 105 | $metrics = "&metrics=ga:pageviews"; |
106 | - $filters = "&filters=ga:pagePath==".$page; |
|
107 | - $access_token = "&access_token=".$at; |
|
106 | + $filters = "&filters=ga:pagePath==" . $page; |
|
107 | + $access_token = "&access_token=" . $at; |
|
108 | 108 | |
109 | - $use_url = $APIURL.$ids.$start_date.$end_date.$dimensions.$metrics.$filters.$access_token; |
|
109 | + $use_url = $APIURL . $ids . $start_date . $end_date . $dimensions . $metrics . $filters . $access_token; |
|
110 | 110 | |
111 | - if(isset($_REQUEST['ga_type']) && $_REQUEST['ga_type']=='realtime'){ |
|
111 | + if (isset($_REQUEST['ga_type']) && $_REQUEST['ga_type'] == 'realtime') { |
|
112 | 112 | $metrics = "&metrics=rt:activeUsers"; |
113 | - $dimensions = "&filters=ga:pagePath==".$page; |
|
113 | + $dimensions = "&filters=ga:pagePath==" . $page; |
|
114 | 114 | |
115 | - $use_url = "https://www.googleapis.com/analytics/v3/data/realtime?".$ids.$access_token.$metrics.$dimensions; |
|
115 | + $use_url = "https://www.googleapis.com/analytics/v3/data/realtime?" . $ids . $access_token . $metrics . $dimensions; |
|
116 | 116 | } |
117 | 117 | |
118 | - $response = wp_remote_get($use_url,array('timeout' => 15)); |
|
118 | + $response = wp_remote_get($use_url, array('timeout' => 15)); |
|
119 | 119 | |
120 | 120 | // Make countries translatable |
121 | - if(isset($_REQUEST['ga_type']) && $_REQUEST['ga_type']=='country'){ |
|
121 | + if (isset($_REQUEST['ga_type']) && $_REQUEST['ga_type'] == 'country') { |
|
122 | 122 | $c_arr = json_decode($response['body']); |
123 | - if(is_array($c_arr->rows)){ |
|
123 | + if (is_array($c_arr->rows)) { |
|
124 | 124 | $new_rows = array(); |
125 | - foreach($c_arr->rows as $wow){ |
|
126 | - $new_rows[] = array(__($wow[0],'geodirectory'),$wow[1]); |
|
125 | + foreach ($c_arr->rows as $wow) { |
|
126 | + $new_rows[] = array(__($wow[0], 'geodirectory'), $wow[1]); |
|
127 | 127 | } |
128 | 128 | $c_arr->rows = $new_rows; |
129 | 129 | } |
@@ -136,39 +136,39 @@ discard block |
||
136 | 136 | }// end GA function |
137 | 137 | |
138 | 138 | |
139 | -function geodir_ga_get_token(){ |
|
139 | +function geodir_ga_get_token() { |
|
140 | 140 | $at = get_option('gd_ga_access_token'); |
141 | - $use_url = "https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=".$at; |
|
142 | - $response = wp_remote_get($use_url,array('timeout' => 15)); |
|
141 | + $use_url = "https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=" . $at; |
|
142 | + $response = wp_remote_get($use_url, array('timeout' => 15)); |
|
143 | 143 | |
144 | - if(!empty($response['response']['code']) && $response['response']['code']==200) {//access token is valid |
|
144 | + if (!empty($response['response']['code']) && $response['response']['code'] == 200) {//access token is valid |
|
145 | 145 | |
146 | 146 | return $at; |
147 | - }else{//else get new access token |
|
147 | + } else {//else get new access token |
|
148 | 148 | |
149 | 149 | $refresh_at = get_option('gd_ga_refresh_token'); |
150 | - if(!$refresh_at){ |
|
151 | - echo json_encode(array('error'=>__('Not authorized, please click authorized in GD > Google analytic settings.', 'geodirectory')));exit; |
|
150 | + if (!$refresh_at) { |
|
151 | + echo json_encode(array('error'=>__('Not authorized, please click authorized in GD > Google analytic settings.', 'geodirectory'))); exit; |
|
152 | 152 | } |
153 | 153 | |
154 | 154 | $rat_url = "https://www.googleapis.com/oauth2/v3/token?"; |
155 | - $client_id = "client_id=".get_option('geodir_ga_client_id'); |
|
156 | - $client_secret = "&client_secret=".get_option('geodir_ga_client_secret'); |
|
157 | - $refresh_token = "&refresh_token=".$refresh_at; |
|
155 | + $client_id = "client_id=" . get_option('geodir_ga_client_id'); |
|
156 | + $client_secret = "&client_secret=" . get_option('geodir_ga_client_secret'); |
|
157 | + $refresh_token = "&refresh_token=" . $refresh_at; |
|
158 | 158 | $grant_type = "&grant_type=refresh_token"; |
159 | 159 | |
160 | - $rat_url_use = $rat_url.$client_id.$client_secret.$refresh_token.$grant_type; |
|
160 | + $rat_url_use = $rat_url . $client_id . $client_secret . $refresh_token . $grant_type; |
|
161 | 161 | |
162 | - $rat_response = wp_remote_post($rat_url_use,array('timeout' => 15)); |
|
163 | - if(!empty($rat_response['response']['code']) && $rat_response['response']['code']==200) { |
|
162 | + $rat_response = wp_remote_post($rat_url_use, array('timeout' => 15)); |
|
163 | + if (!empty($rat_response['response']['code']) && $rat_response['response']['code'] == 200) { |
|
164 | 164 | $parts = json_decode($rat_response['body']); |
165 | 165 | |
166 | 166 | |
167 | 167 | update_option('gd_ga_access_token', $parts->access_token); |
168 | 168 | return $parts->access_token; |
169 | 169 | |
170 | - }else{ |
|
171 | - echo json_encode(array('error'=>__('Login failed', 'geodirectory')));exit; |
|
170 | + } else { |
|
171 | + echo json_encode(array('error'=>__('Login failed', 'geodirectory'))); exit; |
|
172 | 172 | } |
173 | 173 | |
174 | 174 |
@@ -76,22 +76,19 @@ discard block |
||
76 | 76 | if(!$ga_start){$ga_start = date('Y-m-d', strtotime("-6 day"));} |
77 | 77 | if(!$ga_end){$ga_end = date('Y-m-d');} |
78 | 78 | $dimensions = "&dimensions=ga:date,ga:nthDay"; |
79 | - }elseif(isset($_REQUEST['ga_type']) && $_REQUEST['ga_type']=='lastweek'){ |
|
79 | + } elseif(isset($_REQUEST['ga_type']) && $_REQUEST['ga_type']=='lastweek'){ |
|
80 | 80 | if(!$ga_start){$ga_start = date('Y-m-d', strtotime("-13 day"));} |
81 | 81 | if(!$ga_end){$ga_end = date('Y-m-d', strtotime("-7 day"));} |
82 | 82 | $dimensions = "&dimensions=ga:date,ga:nthDay"; |
83 | - } |
|
84 | - elseif(isset($_REQUEST['ga_type']) && $_REQUEST['ga_type']=='thisyear'){ |
|
83 | + } elseif(isset($_REQUEST['ga_type']) && $_REQUEST['ga_type']=='thisyear'){ |
|
85 | 84 | if(!$ga_start){$ga_start = date('Y')."-01-01";} |
86 | 85 | if(!$ga_end){$ga_end = date('Y-m-d');} |
87 | 86 | $dimensions = "&dimensions=ga:month,ga:nthMonth"; |
88 | - } |
|
89 | - elseif(isset($_REQUEST['ga_type']) && $_REQUEST['ga_type']=='lastyear'){ |
|
87 | + } elseif(isset($_REQUEST['ga_type']) && $_REQUEST['ga_type']=='lastyear'){ |
|
90 | 88 | if(!$ga_start){$ga_start = date('Y', strtotime("-1 year"))."-01-01";} |
91 | 89 | if(!$ga_end){$ga_end = date('Y', strtotime("-1 year"))."-12-31";} |
92 | 90 | $dimensions = "&dimensions=ga:month,ga:nthMonth"; |
93 | - } |
|
94 | - elseif(isset($_REQUEST['ga_type']) && $_REQUEST['ga_type']=='country'){ |
|
91 | + } elseif(isset($_REQUEST['ga_type']) && $_REQUEST['ga_type']=='country'){ |
|
95 | 92 | if(!$ga_start){$ga_start = "14daysAgo";} |
96 | 93 | if(!$ga_end){$ga_end = "yesterday";} |
97 | 94 | $dimensions = "&dimensions=ga:country&sort=-ga:pageviews&max-results=5"; |
@@ -144,7 +141,7 @@ discard block |
||
144 | 141 | if(!empty($response['response']['code']) && $response['response']['code']==200) {//access token is valid |
145 | 142 | |
146 | 143 | return $at; |
147 | - }else{//else get new access token |
|
144 | + } else{//else get new access token |
|
148 | 145 | |
149 | 146 | $refresh_at = get_option('gd_ga_refresh_token'); |
150 | 147 | if(!$refresh_at){ |
@@ -167,7 +164,7 @@ discard block |
||
167 | 164 | update_option('gd_ga_access_token', $parts->access_token); |
168 | 165 | return $parts->access_token; |
169 | 166 | |
170 | - }else{ |
|
167 | + } else{ |
|
171 | 168 | echo json_encode(array('error'=>__('Login failed', 'geodirectory')));exit; |
172 | 169 | } |
173 | 170 |
@@ -1,10 +1,10 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Google analystics related functions. |
|
4 | - * |
|
5 | - * @since 1.0.0 |
|
6 | - * @package GeoDirectory |
|
7 | - */ |
|
3 | + * Google analystics related functions. |
|
4 | + * |
|
5 | + * @since 1.0.0 |
|
6 | + * @package GeoDirectory |
|
7 | + */ |
|
8 | 8 | |
9 | 9 | /** |
10 | 10 | * Formats seconds into to h:m:s. |
@@ -17,34 +17,34 @@ discard block |
||
17 | 17 | */ |
18 | 18 | function geodir_sec2hms($sec, $padHours = false) |
19 | 19 | { |
20 | - // holds formatted string |
|
21 | - $hms = ""; |
|
22 | - // there are 3600 seconds in an hour, so if we |
|
23 | - // divide total seconds by 3600 and throw away |
|
24 | - // the remainder, we've got the number of hours |
|
25 | - $hours = intval(intval($sec) / 3600); |
|
26 | - |
|
27 | - // add to $hms, with a leading 0 if asked for |
|
28 | - $hms .= ($padHours) ? str_pad($hours, 2, "0", STR_PAD_LEFT) . ':' : $hours . ':'; |
|
29 | - |
|
30 | - // dividing the total seconds by 60 will give us |
|
31 | - // the number of minutes, but we're interested in |
|
32 | - // minutes past the hour: to get that, we need to |
|
33 | - // divide by 60 again and keep the remainder |
|
34 | - $minutes = intval(($sec / 60) % 60); |
|
35 | - |
|
36 | - // then add to $hms (with a leading 0 if needed) |
|
37 | - $hms .= str_pad($minutes, 2, "0", STR_PAD_LEFT) . ':'; |
|
38 | - |
|
39 | - // seconds are simple - just divide the total |
|
40 | - // seconds by 60 and keep the remainder |
|
41 | - $seconds = intval($sec % 60); |
|
42 | - |
|
43 | - // add to $hms, again with a leading 0 if needed |
|
44 | - $hms .= str_pad($seconds, 2, "0", STR_PAD_LEFT); |
|
45 | - |
|
46 | - // done! |
|
47 | - return $hms; |
|
20 | + // holds formatted string |
|
21 | + $hms = ""; |
|
22 | + // there are 3600 seconds in an hour, so if we |
|
23 | + // divide total seconds by 3600 and throw away |
|
24 | + // the remainder, we've got the number of hours |
|
25 | + $hours = intval(intval($sec) / 3600); |
|
26 | + |
|
27 | + // add to $hms, with a leading 0 if asked for |
|
28 | + $hms .= ($padHours) ? str_pad($hours, 2, "0", STR_PAD_LEFT) . ':' : $hours . ':'; |
|
29 | + |
|
30 | + // dividing the total seconds by 60 will give us |
|
31 | + // the number of minutes, but we're interested in |
|
32 | + // minutes past the hour: to get that, we need to |
|
33 | + // divide by 60 again and keep the remainder |
|
34 | + $minutes = intval(($sec / 60) % 60); |
|
35 | + |
|
36 | + // then add to $hms (with a leading 0 if needed) |
|
37 | + $hms .= str_pad($minutes, 2, "0", STR_PAD_LEFT) . ':'; |
|
38 | + |
|
39 | + // seconds are simple - just divide the total |
|
40 | + // seconds by 60 and keep the remainder |
|
41 | + $seconds = intval($sec % 60); |
|
42 | + |
|
43 | + // add to $hms, again with a leading 0 if needed |
|
44 | + $hms .= str_pad($seconds, 2, "0", STR_PAD_LEFT); |
|
45 | + |
|
46 | + // done! |
|
47 | + return $hms; |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | /** |
@@ -61,117 +61,117 @@ discard block |
||
61 | 61 | { |
62 | 62 | |
63 | 63 | |
64 | - // NOTE: the id is in the form ga:12345 and not just 12345 |
|
65 | - // if you do e.g. 12345 then no data will be returned |
|
66 | - // read http://www.electrictoolbox.com/get-id-for-google-analytics-api/ for info about how to get this id from the GA web interface |
|
67 | - // or load the accounts (see below) and get it from there |
|
68 | - // if you don't specify an id here, then you'll get the "Badly formatted request to the Google Analytics API..." error message |
|
69 | - $id = trim(get_option('geodir_ga_id')); |
|
70 | - |
|
71 | - $at = geodir_ga_get_token(); |
|
72 | - |
|
73 | - $start_date = ''; |
|
74 | - $end_date = ''; |
|
75 | - if(isset($_REQUEST['ga_type']) && $_REQUEST['ga_type']=='thisweek'){ |
|
76 | - if(!$ga_start){$ga_start = date('Y-m-d', strtotime("-6 day"));} |
|
77 | - if(!$ga_end){$ga_end = date('Y-m-d');} |
|
78 | - $dimensions = "&dimensions=ga:date,ga:nthDay"; |
|
79 | - }elseif(isset($_REQUEST['ga_type']) && $_REQUEST['ga_type']=='lastweek'){ |
|
80 | - if(!$ga_start){$ga_start = date('Y-m-d', strtotime("-13 day"));} |
|
81 | - if(!$ga_end){$ga_end = date('Y-m-d', strtotime("-7 day"));} |
|
82 | - $dimensions = "&dimensions=ga:date,ga:nthDay"; |
|
83 | - } |
|
84 | - elseif(isset($_REQUEST['ga_type']) && $_REQUEST['ga_type']=='thisyear'){ |
|
85 | - if(!$ga_start){$ga_start = date('Y')."-01-01";} |
|
86 | - if(!$ga_end){$ga_end = date('Y-m-d');} |
|
87 | - $dimensions = "&dimensions=ga:month,ga:nthMonth"; |
|
88 | - } |
|
89 | - elseif(isset($_REQUEST['ga_type']) && $_REQUEST['ga_type']=='lastyear'){ |
|
90 | - if(!$ga_start){$ga_start = date('Y', strtotime("-1 year"))."-01-01";} |
|
91 | - if(!$ga_end){$ga_end = date('Y', strtotime("-1 year"))."-12-31";} |
|
92 | - $dimensions = "&dimensions=ga:month,ga:nthMonth"; |
|
93 | - } |
|
94 | - elseif(isset($_REQUEST['ga_type']) && $_REQUEST['ga_type']=='country'){ |
|
95 | - if(!$ga_start){$ga_start = "14daysAgo";} |
|
96 | - if(!$ga_end){$ga_end = "yesterday";} |
|
97 | - $dimensions = "&dimensions=ga:country&sort=-ga:pageviews&max-results=5"; |
|
98 | - } |
|
99 | - |
|
100 | - |
|
101 | - $APIURL = "https://www.googleapis.com/analytics/v3/data/ga?"; |
|
102 | - $ids = "ids=".$id; |
|
103 | - if(!$start_date){$start_date = "&start-date=".$ga_start;} |
|
104 | - if(!$end_date){$end_date = "&end-date=".$ga_end;} |
|
105 | - $metrics = "&metrics=ga:pageviews"; |
|
106 | - $filters = "&filters=ga:pagePath==".$page; |
|
107 | - $access_token = "&access_token=".$at; |
|
108 | - |
|
109 | - $use_url = $APIURL.$ids.$start_date.$end_date.$dimensions.$metrics.$filters.$access_token; |
|
110 | - |
|
111 | - if(isset($_REQUEST['ga_type']) && $_REQUEST['ga_type']=='realtime'){ |
|
112 | - $metrics = "&metrics=rt:activeUsers"; |
|
113 | - $dimensions = "&filters=ga:pagePath==".$page; |
|
114 | - |
|
115 | - $use_url = "https://www.googleapis.com/analytics/v3/data/realtime?".$ids.$access_token.$metrics.$dimensions; |
|
116 | - } |
|
117 | - |
|
118 | - $response = wp_remote_get($use_url,array('timeout' => 15)); |
|
119 | - |
|
120 | - // Make countries translatable |
|
121 | - if(isset($_REQUEST['ga_type']) && $_REQUEST['ga_type']=='country'){ |
|
122 | - $c_arr = json_decode($response['body']); |
|
123 | - if(is_array($c_arr->rows)){ |
|
124 | - $new_rows = array(); |
|
125 | - foreach($c_arr->rows as $wow){ |
|
126 | - $new_rows[] = array(__($wow[0],'geodirectory'),$wow[1]); |
|
127 | - } |
|
128 | - $c_arr->rows = $new_rows; |
|
129 | - } |
|
130 | - $response['body'] = json_encode($c_arr); |
|
131 | - } |
|
132 | - |
|
133 | - echo $response['body']; |
|
134 | - exit; |
|
64 | + // NOTE: the id is in the form ga:12345 and not just 12345 |
|
65 | + // if you do e.g. 12345 then no data will be returned |
|
66 | + // read http://www.electrictoolbox.com/get-id-for-google-analytics-api/ for info about how to get this id from the GA web interface |
|
67 | + // or load the accounts (see below) and get it from there |
|
68 | + // if you don't specify an id here, then you'll get the "Badly formatted request to the Google Analytics API..." error message |
|
69 | + $id = trim(get_option('geodir_ga_id')); |
|
70 | + |
|
71 | + $at = geodir_ga_get_token(); |
|
72 | + |
|
73 | + $start_date = ''; |
|
74 | + $end_date = ''; |
|
75 | + if(isset($_REQUEST['ga_type']) && $_REQUEST['ga_type']=='thisweek'){ |
|
76 | + if(!$ga_start){$ga_start = date('Y-m-d', strtotime("-6 day"));} |
|
77 | + if(!$ga_end){$ga_end = date('Y-m-d');} |
|
78 | + $dimensions = "&dimensions=ga:date,ga:nthDay"; |
|
79 | + }elseif(isset($_REQUEST['ga_type']) && $_REQUEST['ga_type']=='lastweek'){ |
|
80 | + if(!$ga_start){$ga_start = date('Y-m-d', strtotime("-13 day"));} |
|
81 | + if(!$ga_end){$ga_end = date('Y-m-d', strtotime("-7 day"));} |
|
82 | + $dimensions = "&dimensions=ga:date,ga:nthDay"; |
|
83 | + } |
|
84 | + elseif(isset($_REQUEST['ga_type']) && $_REQUEST['ga_type']=='thisyear'){ |
|
85 | + if(!$ga_start){$ga_start = date('Y')."-01-01";} |
|
86 | + if(!$ga_end){$ga_end = date('Y-m-d');} |
|
87 | + $dimensions = "&dimensions=ga:month,ga:nthMonth"; |
|
88 | + } |
|
89 | + elseif(isset($_REQUEST['ga_type']) && $_REQUEST['ga_type']=='lastyear'){ |
|
90 | + if(!$ga_start){$ga_start = date('Y', strtotime("-1 year"))."-01-01";} |
|
91 | + if(!$ga_end){$ga_end = date('Y', strtotime("-1 year"))."-12-31";} |
|
92 | + $dimensions = "&dimensions=ga:month,ga:nthMonth"; |
|
93 | + } |
|
94 | + elseif(isset($_REQUEST['ga_type']) && $_REQUEST['ga_type']=='country'){ |
|
95 | + if(!$ga_start){$ga_start = "14daysAgo";} |
|
96 | + if(!$ga_end){$ga_end = "yesterday";} |
|
97 | + $dimensions = "&dimensions=ga:country&sort=-ga:pageviews&max-results=5"; |
|
98 | + } |
|
99 | + |
|
100 | + |
|
101 | + $APIURL = "https://www.googleapis.com/analytics/v3/data/ga?"; |
|
102 | + $ids = "ids=".$id; |
|
103 | + if(!$start_date){$start_date = "&start-date=".$ga_start;} |
|
104 | + if(!$end_date){$end_date = "&end-date=".$ga_end;} |
|
105 | + $metrics = "&metrics=ga:pageviews"; |
|
106 | + $filters = "&filters=ga:pagePath==".$page; |
|
107 | + $access_token = "&access_token=".$at; |
|
108 | + |
|
109 | + $use_url = $APIURL.$ids.$start_date.$end_date.$dimensions.$metrics.$filters.$access_token; |
|
110 | + |
|
111 | + if(isset($_REQUEST['ga_type']) && $_REQUEST['ga_type']=='realtime'){ |
|
112 | + $metrics = "&metrics=rt:activeUsers"; |
|
113 | + $dimensions = "&filters=ga:pagePath==".$page; |
|
114 | + |
|
115 | + $use_url = "https://www.googleapis.com/analytics/v3/data/realtime?".$ids.$access_token.$metrics.$dimensions; |
|
116 | + } |
|
117 | + |
|
118 | + $response = wp_remote_get($use_url,array('timeout' => 15)); |
|
119 | + |
|
120 | + // Make countries translatable |
|
121 | + if(isset($_REQUEST['ga_type']) && $_REQUEST['ga_type']=='country'){ |
|
122 | + $c_arr = json_decode($response['body']); |
|
123 | + if(is_array($c_arr->rows)){ |
|
124 | + $new_rows = array(); |
|
125 | + foreach($c_arr->rows as $wow){ |
|
126 | + $new_rows[] = array(__($wow[0],'geodirectory'),$wow[1]); |
|
127 | + } |
|
128 | + $c_arr->rows = $new_rows; |
|
129 | + } |
|
130 | + $response['body'] = json_encode($c_arr); |
|
131 | + } |
|
132 | + |
|
133 | + echo $response['body']; |
|
134 | + exit; |
|
135 | 135 | |
136 | 136 | }// end GA function |
137 | 137 | |
138 | 138 | |
139 | 139 | function geodir_ga_get_token(){ |
140 | - $at = get_option('gd_ga_access_token'); |
|
141 | - $use_url = "https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=".$at; |
|
142 | - $response = wp_remote_get($use_url,array('timeout' => 15)); |
|
140 | + $at = get_option('gd_ga_access_token'); |
|
141 | + $use_url = "https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=".$at; |
|
142 | + $response = wp_remote_get($use_url,array('timeout' => 15)); |
|
143 | 143 | |
144 | - if(!empty($response['response']['code']) && $response['response']['code']==200) {//access token is valid |
|
144 | + if(!empty($response['response']['code']) && $response['response']['code']==200) {//access token is valid |
|
145 | 145 | |
146 | - return $at; |
|
147 | - }else{//else get new access token |
|
146 | + return $at; |
|
147 | + }else{//else get new access token |
|
148 | 148 | |
149 | - $refresh_at = get_option('gd_ga_refresh_token'); |
|
150 | - if(!$refresh_at){ |
|
151 | - echo json_encode(array('error'=>__('Not authorized, please click authorized in GD > Google analytic settings.', 'geodirectory')));exit; |
|
152 | - } |
|
149 | + $refresh_at = get_option('gd_ga_refresh_token'); |
|
150 | + if(!$refresh_at){ |
|
151 | + echo json_encode(array('error'=>__('Not authorized, please click authorized in GD > Google analytic settings.', 'geodirectory')));exit; |
|
152 | + } |
|
153 | 153 | |
154 | - $rat_url = "https://www.googleapis.com/oauth2/v3/token?"; |
|
155 | - $client_id = "client_id=".get_option('geodir_ga_client_id'); |
|
156 | - $client_secret = "&client_secret=".get_option('geodir_ga_client_secret'); |
|
157 | - $refresh_token = "&refresh_token=".$refresh_at; |
|
158 | - $grant_type = "&grant_type=refresh_token"; |
|
154 | + $rat_url = "https://www.googleapis.com/oauth2/v3/token?"; |
|
155 | + $client_id = "client_id=".get_option('geodir_ga_client_id'); |
|
156 | + $client_secret = "&client_secret=".get_option('geodir_ga_client_secret'); |
|
157 | + $refresh_token = "&refresh_token=".$refresh_at; |
|
158 | + $grant_type = "&grant_type=refresh_token"; |
|
159 | 159 | |
160 | - $rat_url_use = $rat_url.$client_id.$client_secret.$refresh_token.$grant_type; |
|
160 | + $rat_url_use = $rat_url.$client_id.$client_secret.$refresh_token.$grant_type; |
|
161 | 161 | |
162 | - $rat_response = wp_remote_post($rat_url_use,array('timeout' => 15)); |
|
163 | - if(!empty($rat_response['response']['code']) && $rat_response['response']['code']==200) { |
|
164 | - $parts = json_decode($rat_response['body']); |
|
162 | + $rat_response = wp_remote_post($rat_url_use,array('timeout' => 15)); |
|
163 | + if(!empty($rat_response['response']['code']) && $rat_response['response']['code']==200) { |
|
164 | + $parts = json_decode($rat_response['body']); |
|
165 | 165 | |
166 | 166 | |
167 | - update_option('gd_ga_access_token', $parts->access_token); |
|
168 | - return $parts->access_token; |
|
167 | + update_option('gd_ga_access_token', $parts->access_token); |
|
168 | + return $parts->access_token; |
|
169 | 169 | |
170 | - }else{ |
|
171 | - echo json_encode(array('error'=>__('Login failed', 'geodirectory')));exit; |
|
172 | - } |
|
170 | + }else{ |
|
171 | + echo json_encode(array('error'=>__('Login failed', 'geodirectory')));exit; |
|
172 | + } |
|
173 | 173 | |
174 | 174 | |
175 | - } |
|
175 | + } |
|
176 | 176 | |
177 | 177 | } |
178 | 178 | \ No newline at end of file |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | $slug = $post->post_name; |
154 | 154 | //$login_url = get_permalink($gd_page_id );// get_permalink can only be user after theme-Setup hook, any earlier and it errors |
155 | 155 | $login_url = trailingslashit($home_url)."$slug/"; |
156 | - }else{ |
|
156 | + } else{ |
|
157 | 157 | $login_url = trailingslashit($home_url)."?geodir_signup=true"; |
158 | 158 | } |
159 | 159 | |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | $slug = $post->post_name; |
203 | 203 | //$login_url = get_permalink($gd_page_id );// get_permalink can only be user after theme-Setup hook, any earlier and it errors |
204 | 204 | $info_url = trailingslashit($home_url)."$slug/"; |
205 | - }else{ |
|
205 | + } else{ |
|
206 | 206 | $info_url = trailingslashit($home_url); |
207 | 207 | } |
208 | 208 |
@@ -13,11 +13,11 @@ discard block |
||
13 | 13 | * @since 1.4.6 |
14 | 14 | * @return int|null Return the page ID if present or null if not. |
15 | 15 | */ |
16 | -function geodir_add_listing_page_id(){ |
|
16 | +function geodir_add_listing_page_id() { |
|
17 | 17 | $gd_page_id = get_option('geodir_add_listing_page'); |
18 | 18 | |
19 | 19 | if (function_exists('icl_object_id')) { |
20 | - $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
20 | + $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | return $gd_page_id; |
@@ -30,11 +30,11 @@ discard block |
||
30 | 30 | * @since 1.4.6 |
31 | 31 | * @return int|null Return the page ID if present or null if not. |
32 | 32 | */ |
33 | -function geodir_preview_page_id(){ |
|
33 | +function geodir_preview_page_id() { |
|
34 | 34 | $gd_page_id = get_option('geodir_preview_page'); |
35 | 35 | |
36 | 36 | if (function_exists('icl_object_id')) { |
37 | - $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
37 | + $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | return $gd_page_id; |
@@ -47,11 +47,11 @@ discard block |
||
47 | 47 | * @since 1.4.6 |
48 | 48 | * @return int|null Return the page ID if present or null if not. |
49 | 49 | */ |
50 | -function geodir_success_page_id(){ |
|
50 | +function geodir_success_page_id() { |
|
51 | 51 | $gd_page_id = get_option('geodir_success_page'); |
52 | 52 | |
53 | 53 | if (function_exists('icl_object_id')) { |
54 | - $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
54 | + $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | return $gd_page_id; |
@@ -64,11 +64,11 @@ discard block |
||
64 | 64 | * @since 1.4.6 |
65 | 65 | * @return int|null Return the page ID if present or null if not. |
66 | 66 | */ |
67 | -function geodir_location_page_id(){ |
|
67 | +function geodir_location_page_id() { |
|
68 | 68 | $gd_page_id = get_option('geodir_location_page'); |
69 | 69 | |
70 | 70 | if (function_exists('icl_object_id')) { |
71 | - $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
71 | + $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | return $gd_page_id; |
@@ -81,11 +81,11 @@ discard block |
||
81 | 81 | * @since 1.5.4 |
82 | 82 | * @return int|null Return the page ID if present or null if not. |
83 | 83 | */ |
84 | -function geodir_home_page_id(){ |
|
84 | +function geodir_home_page_id() { |
|
85 | 85 | $gd_page_id = get_option('geodir_home_page'); |
86 | 86 | |
87 | 87 | if (function_exists('icl_object_id')) { |
88 | - $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
88 | + $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | return $gd_page_id; |
@@ -98,11 +98,11 @@ discard block |
||
98 | 98 | * @since 1.5.3 |
99 | 99 | * @return int|null Return the page ID if present or null if not. |
100 | 100 | */ |
101 | -function geodir_info_page_id(){ |
|
101 | +function geodir_info_page_id() { |
|
102 | 102 | $gd_page_id = get_option('geodir_info_page'); |
103 | 103 | |
104 | 104 | if (function_exists('icl_object_id')) { |
105 | - $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
105 | + $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | return $gd_page_id; |
@@ -115,11 +115,11 @@ discard block |
||
115 | 115 | * @since 1.5.3 |
116 | 116 | * @return int|null Return the page ID if present or null if not. |
117 | 117 | */ |
118 | -function geodir_login_page_id(){ |
|
118 | +function geodir_login_page_id() { |
|
119 | 119 | $gd_page_id = get_option('geodir_login_page'); |
120 | 120 | |
121 | 121 | if (function_exists('icl_object_id')) { |
122 | - $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
122 | + $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
123 | 123 | } |
124 | 124 | |
125 | 125 | return $gd_page_id; |
@@ -133,11 +133,11 @@ discard block |
||
133 | 133 | * @since 1.5.3 |
134 | 134 | * @return int|null Return the page ID if present or null if not. |
135 | 135 | */ |
136 | -function geodir_login_url($args=array()){ |
|
136 | +function geodir_login_url($args = array()) { |
|
137 | 137 | $gd_page_id = get_option('geodir_login_page'); |
138 | 138 | |
139 | 139 | if (function_exists('icl_object_id')) { |
140 | - $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
140 | + $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | if (function_exists('geodir_location_geo_home_link')) { |
@@ -148,17 +148,17 @@ discard block |
||
148 | 148 | add_filter('home_url', 'geodir_location_geo_home_link', 100000, 2); |
149 | 149 | } |
150 | 150 | |
151 | - if($gd_page_id){ |
|
151 | + if ($gd_page_id) { |
|
152 | 152 | $post = get_post($gd_page_id); |
153 | 153 | $slug = $post->post_name; |
154 | 154 | //$login_url = get_permalink($gd_page_id );// get_permalink can only be user after theme-Setup hook, any earlier and it errors |
155 | - $login_url = trailingslashit($home_url)."$slug/"; |
|
156 | - }else{ |
|
157 | - $login_url = trailingslashit($home_url)."?geodir_signup=true"; |
|
155 | + $login_url = trailingslashit($home_url) . "$slug/"; |
|
156 | + } else { |
|
157 | + $login_url = trailingslashit($home_url) . "?geodir_signup=true"; |
|
158 | 158 | } |
159 | 159 | |
160 | - if($args){ |
|
161 | - $login_url = add_query_arg($args,$login_url ); |
|
160 | + if ($args) { |
|
161 | + $login_url = add_query_arg($args, $login_url); |
|
162 | 162 | } |
163 | 163 | |
164 | 164 | /** |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | * @param array $args The array of query args used. |
173 | 173 | * @param int $gd_page_id The page id of the GD login page. |
174 | 174 | */ |
175 | - return apply_filters('geodir_login_url',$login_url,$args,$gd_page_id); |
|
175 | + return apply_filters('geodir_login_url', $login_url, $args, $gd_page_id); |
|
176 | 176 | } |
177 | 177 | |
178 | 178 | /** |
@@ -182,11 +182,11 @@ discard block |
||
182 | 182 | * @since 1.5.4 |
183 | 183 | * @return string Info page url. |
184 | 184 | */ |
185 | -function geodir_info_url($args=array()){ |
|
185 | +function geodir_info_url($args = array()) { |
|
186 | 186 | $gd_page_id = get_option('geodir_info_page'); |
187 | 187 | |
188 | 188 | if (function_exists('icl_object_id')) { |
189 | - $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
189 | + $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
190 | 190 | } |
191 | 191 | |
192 | 192 | if (function_exists('geodir_location_geo_home_link')) { |
@@ -197,17 +197,17 @@ discard block |
||
197 | 197 | add_filter('home_url', 'geodir_location_geo_home_link', 100000, 2); |
198 | 198 | } |
199 | 199 | |
200 | - if($gd_page_id){ |
|
200 | + if ($gd_page_id) { |
|
201 | 201 | $post = get_post($gd_page_id); |
202 | 202 | $slug = $post->post_name; |
203 | 203 | //$login_url = get_permalink($gd_page_id );// get_permalink can only be user after theme-Setup hook, any earlier and it errors |
204 | - $info_url = trailingslashit($home_url)."$slug/"; |
|
205 | - }else{ |
|
204 | + $info_url = trailingslashit($home_url) . "$slug/"; |
|
205 | + } else { |
|
206 | 206 | $info_url = trailingslashit($home_url); |
207 | 207 | } |
208 | 208 | |
209 | - if($args){ |
|
210 | - $info_url = add_query_arg($args,$info_url ); |
|
209 | + if ($args) { |
|
210 | + $info_url = add_query_arg($args, $info_url); |
|
211 | 211 | } |
212 | 212 | |
213 | 213 | return $info_url; |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | * @param string $charset Character set to use for conversion. |
226 | 226 | * @return string Returns converted string. |
227 | 227 | */ |
228 | -function geodir_ucwords($string, $charset='UTF-8') { |
|
228 | +function geodir_ucwords($string, $charset = 'UTF-8') { |
|
229 | 229 | if (function_exists('mb_convert_case')) { |
230 | 230 | return mb_convert_case($string, MB_CASE_TITLE, $charset); |
231 | 231 | } else { |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | * @param string $charset Character set to use for conversion. |
246 | 246 | * @return string Returns converted string. |
247 | 247 | */ |
248 | -function geodir_strtolower($string, $charset='UTF-8') { |
|
248 | +function geodir_strtolower($string, $charset = 'UTF-8') { |
|
249 | 249 | if (function_exists('mb_convert_case')) { |
250 | 250 | return mb_convert_case($string, MB_CASE_LOWER, $charset); |
251 | 251 | } else { |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | * @param string $charset Character set to use for conversion. |
266 | 266 | * @return string Returns converted string. |
267 | 267 | */ |
268 | -function geodir_strtoupper($string, $charset='UTF-8') { |
|
268 | +function geodir_strtoupper($string, $charset = 'UTF-8') { |
|
269 | 269 | if (function_exists('mb_convert_case')) { |
270 | 270 | return mb_convert_case($string, MB_CASE_UPPER, $charset); |
271 | 271 | } else { |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | |
297 | 297 | $url = trim($parts[0]); |
298 | 298 | if ($formatted && $url != '') { |
299 | - $url = str_replace( ' ', '%20', $url ); |
|
299 | + $url = str_replace(' ', '%20', $url); |
|
300 | 300 | $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\|*\'()\[\]\\x80-\\xff]|i', '', $url); |
301 | 301 | |
302 | 302 | if (0 !== stripos($url, 'mailto:')) { |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | |
307 | 307 | $url = str_replace(';//', '://', $url); |
308 | 308 | |
309 | - if (strpos($url, ':') === false && ! in_array($url[0], array('/', '#', '?')) && !preg_match('/^[a-z0-9-]+?\.php/i', $url)) { |
|
309 | + if (strpos($url, ':') === false && !in_array($url[0], array('/', '#', '?')) && !preg_match('/^[a-z0-9-]+?\.php/i', $url)) { |
|
310 | 310 | $url = 'http://' . $url; |
311 | 311 | } |
312 | 312 | |
@@ -449,7 +449,7 @@ discard block |
||
449 | 449 | * @package GeoDirectory |
450 | 450 | */ |
451 | 451 | function _gd_die_handler() { |
452 | - if ( defined( 'GD_TESTING_MODE' ) ) { |
|
452 | + if (defined('GD_TESTING_MODE')) { |
|
453 | 453 | return '_gd_die_handler'; |
454 | 454 | } else { |
455 | 455 | die(); |
@@ -467,8 +467,8 @@ discard block |
||
467 | 467 | * @param string $title Optional. Error title. |
468 | 468 | * @param int $status Optional. Status code. |
469 | 469 | */ |
470 | -function gd_die( $message = '', $title = '', $status = 400 ) { |
|
471 | - add_filter( 'wp_die_ajax_handler', '_gd_die_handler', 10, 3 ); |
|
472 | - add_filter( 'wp_die_handler', '_gd_die_handler', 10, 3 ); |
|
473 | - wp_die( $message, $title, array( 'response' => $status )); |
|
470 | +function gd_die($message = '', $title = '', $status = 400) { |
|
471 | + add_filter('wp_die_ajax_handler', '_gd_die_handler', 10, 3); |
|
472 | + add_filter('wp_die_handler', '_gd_die_handler', 10, 3); |
|
473 | + wp_die($message, $title, array('response' => $status)); |
|
474 | 474 | } |
475 | 475 | \ No newline at end of file |
@@ -1,10 +1,10 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Helper functions, this file contains functions made to make a developer's life easier. |
|
4 | - * |
|
5 | - * @since 1.4.6 |
|
6 | - * @package GeoDirectory |
|
7 | - */ |
|
3 | + * Helper functions, this file contains functions made to make a developer's life easier. |
|
4 | + * |
|
5 | + * @since 1.4.6 |
|
6 | + * @package GeoDirectory |
|
7 | + */ |
|
8 | 8 | |
9 | 9 | /** |
10 | 10 | * Get the page ID of the add listing page. |
@@ -14,13 +14,13 @@ discard block |
||
14 | 14 | * @return int|null Return the page ID if present or null if not. |
15 | 15 | */ |
16 | 16 | function geodir_add_listing_page_id(){ |
17 | - $gd_page_id = get_option('geodir_add_listing_page'); |
|
17 | + $gd_page_id = get_option('geodir_add_listing_page'); |
|
18 | 18 | |
19 | - if (function_exists('icl_object_id')) { |
|
20 | - $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
21 | - } |
|
19 | + if (function_exists('icl_object_id')) { |
|
20 | + $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
21 | + } |
|
22 | 22 | |
23 | - return $gd_page_id; |
|
23 | + return $gd_page_id; |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | /** |
@@ -31,13 +31,13 @@ discard block |
||
31 | 31 | * @return int|null Return the page ID if present or null if not. |
32 | 32 | */ |
33 | 33 | function geodir_preview_page_id(){ |
34 | - $gd_page_id = get_option('geodir_preview_page'); |
|
34 | + $gd_page_id = get_option('geodir_preview_page'); |
|
35 | 35 | |
36 | - if (function_exists('icl_object_id')) { |
|
37 | - $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
38 | - } |
|
36 | + if (function_exists('icl_object_id')) { |
|
37 | + $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
38 | + } |
|
39 | 39 | |
40 | - return $gd_page_id; |
|
40 | + return $gd_page_id; |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | /** |
@@ -48,13 +48,13 @@ discard block |
||
48 | 48 | * @return int|null Return the page ID if present or null if not. |
49 | 49 | */ |
50 | 50 | function geodir_success_page_id(){ |
51 | - $gd_page_id = get_option('geodir_success_page'); |
|
51 | + $gd_page_id = get_option('geodir_success_page'); |
|
52 | 52 | |
53 | - if (function_exists('icl_object_id')) { |
|
54 | - $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
55 | - } |
|
53 | + if (function_exists('icl_object_id')) { |
|
54 | + $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
55 | + } |
|
56 | 56 | |
57 | - return $gd_page_id; |
|
57 | + return $gd_page_id; |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | /** |
@@ -65,13 +65,13 @@ discard block |
||
65 | 65 | * @return int|null Return the page ID if present or null if not. |
66 | 66 | */ |
67 | 67 | function geodir_location_page_id(){ |
68 | - $gd_page_id = get_option('geodir_location_page'); |
|
68 | + $gd_page_id = get_option('geodir_location_page'); |
|
69 | 69 | |
70 | - if (function_exists('icl_object_id')) { |
|
71 | - $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
72 | - } |
|
70 | + if (function_exists('icl_object_id')) { |
|
71 | + $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
72 | + } |
|
73 | 73 | |
74 | - return $gd_page_id; |
|
74 | + return $gd_page_id; |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | /** |
@@ -82,13 +82,13 @@ discard block |
||
82 | 82 | * @return int|null Return the page ID if present or null if not. |
83 | 83 | */ |
84 | 84 | function geodir_home_page_id(){ |
85 | - $gd_page_id = get_option('geodir_home_page'); |
|
85 | + $gd_page_id = get_option('geodir_home_page'); |
|
86 | 86 | |
87 | - if (function_exists('icl_object_id')) { |
|
88 | - $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
89 | - } |
|
87 | + if (function_exists('icl_object_id')) { |
|
88 | + $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
89 | + } |
|
90 | 90 | |
91 | - return $gd_page_id; |
|
91 | + return $gd_page_id; |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | /** |
@@ -99,13 +99,13 @@ discard block |
||
99 | 99 | * @return int|null Return the page ID if present or null if not. |
100 | 100 | */ |
101 | 101 | function geodir_info_page_id(){ |
102 | - $gd_page_id = get_option('geodir_info_page'); |
|
102 | + $gd_page_id = get_option('geodir_info_page'); |
|
103 | 103 | |
104 | - if (function_exists('icl_object_id')) { |
|
105 | - $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
106 | - } |
|
104 | + if (function_exists('icl_object_id')) { |
|
105 | + $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
106 | + } |
|
107 | 107 | |
108 | - return $gd_page_id; |
|
108 | + return $gd_page_id; |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | /** |
@@ -116,13 +116,13 @@ discard block |
||
116 | 116 | * @return int|null Return the page ID if present or null if not. |
117 | 117 | */ |
118 | 118 | function geodir_login_page_id(){ |
119 | - $gd_page_id = get_option('geodir_login_page'); |
|
119 | + $gd_page_id = get_option('geodir_login_page'); |
|
120 | 120 | |
121 | - if (function_exists('icl_object_id')) { |
|
122 | - $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
123 | - } |
|
121 | + if (function_exists('icl_object_id')) { |
|
122 | + $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
123 | + } |
|
124 | 124 | |
125 | - return $gd_page_id; |
|
125 | + return $gd_page_id; |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | |
@@ -134,45 +134,45 @@ discard block |
||
134 | 134 | * @return int|null Return the page ID if present or null if not. |
135 | 135 | */ |
136 | 136 | function geodir_login_url($args=array()){ |
137 | - $gd_page_id = get_option('geodir_login_page'); |
|
138 | - |
|
139 | - if (function_exists('icl_object_id')) { |
|
140 | - $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
141 | - } |
|
142 | - |
|
143 | - if (function_exists('geodir_location_geo_home_link')) { |
|
144 | - remove_filter('home_url', 'geodir_location_geo_home_link', 100000); |
|
145 | - } |
|
146 | - $home_url = get_home_url(); |
|
147 | - if (function_exists('geodir_location_geo_home_link')) { |
|
148 | - add_filter('home_url', 'geodir_location_geo_home_link', 100000, 2); |
|
149 | - } |
|
150 | - |
|
151 | - if($gd_page_id){ |
|
152 | - $post = get_post($gd_page_id); |
|
153 | - $slug = $post->post_name; |
|
154 | - //$login_url = get_permalink($gd_page_id );// get_permalink can only be user after theme-Setup hook, any earlier and it errors |
|
155 | - $login_url = trailingslashit($home_url)."$slug/"; |
|
156 | - }else{ |
|
157 | - $login_url = trailingslashit($home_url)."?geodir_signup=true"; |
|
158 | - } |
|
159 | - |
|
160 | - if($args){ |
|
161 | - $login_url = add_query_arg($args,$login_url ); |
|
162 | - } |
|
163 | - |
|
164 | - /** |
|
165 | - * Filter the GeoDirectory login page url. |
|
166 | - * |
|
167 | - * This filter can be used to change the GeoDirectory page url. |
|
168 | - * |
|
169 | - * @since 1.5.3 |
|
170 | - * @package GeoDirectory |
|
171 | - * @param string $login_url The url of the login page. |
|
172 | - * @param array $args The array of query args used. |
|
173 | - * @param int $gd_page_id The page id of the GD login page. |
|
174 | - */ |
|
175 | - return apply_filters('geodir_login_url',$login_url,$args,$gd_page_id); |
|
137 | + $gd_page_id = get_option('geodir_login_page'); |
|
138 | + |
|
139 | + if (function_exists('icl_object_id')) { |
|
140 | + $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
141 | + } |
|
142 | + |
|
143 | + if (function_exists('geodir_location_geo_home_link')) { |
|
144 | + remove_filter('home_url', 'geodir_location_geo_home_link', 100000); |
|
145 | + } |
|
146 | + $home_url = get_home_url(); |
|
147 | + if (function_exists('geodir_location_geo_home_link')) { |
|
148 | + add_filter('home_url', 'geodir_location_geo_home_link', 100000, 2); |
|
149 | + } |
|
150 | + |
|
151 | + if($gd_page_id){ |
|
152 | + $post = get_post($gd_page_id); |
|
153 | + $slug = $post->post_name; |
|
154 | + //$login_url = get_permalink($gd_page_id );// get_permalink can only be user after theme-Setup hook, any earlier and it errors |
|
155 | + $login_url = trailingslashit($home_url)."$slug/"; |
|
156 | + }else{ |
|
157 | + $login_url = trailingslashit($home_url)."?geodir_signup=true"; |
|
158 | + } |
|
159 | + |
|
160 | + if($args){ |
|
161 | + $login_url = add_query_arg($args,$login_url ); |
|
162 | + } |
|
163 | + |
|
164 | + /** |
|
165 | + * Filter the GeoDirectory login page url. |
|
166 | + * |
|
167 | + * This filter can be used to change the GeoDirectory page url. |
|
168 | + * |
|
169 | + * @since 1.5.3 |
|
170 | + * @package GeoDirectory |
|
171 | + * @param string $login_url The url of the login page. |
|
172 | + * @param array $args The array of query args used. |
|
173 | + * @param int $gd_page_id The page id of the GD login page. |
|
174 | + */ |
|
175 | + return apply_filters('geodir_login_url',$login_url,$args,$gd_page_id); |
|
176 | 176 | } |
177 | 177 | |
178 | 178 | /** |
@@ -183,34 +183,34 @@ discard block |
||
183 | 183 | * @return string Info page url. |
184 | 184 | */ |
185 | 185 | function geodir_info_url($args=array()){ |
186 | - $gd_page_id = get_option('geodir_info_page'); |
|
187 | - |
|
188 | - if (function_exists('icl_object_id')) { |
|
189 | - $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
190 | - } |
|
191 | - |
|
192 | - if (function_exists('geodir_location_geo_home_link')) { |
|
193 | - remove_filter('home_url', 'geodir_location_geo_home_link', 100000); |
|
194 | - } |
|
195 | - $home_url = get_home_url(); |
|
196 | - if (function_exists('geodir_location_geo_home_link')) { |
|
197 | - add_filter('home_url', 'geodir_location_geo_home_link', 100000, 2); |
|
198 | - } |
|
199 | - |
|
200 | - if($gd_page_id){ |
|
201 | - $post = get_post($gd_page_id); |
|
202 | - $slug = $post->post_name; |
|
203 | - //$login_url = get_permalink($gd_page_id );// get_permalink can only be user after theme-Setup hook, any earlier and it errors |
|
204 | - $info_url = trailingslashit($home_url)."$slug/"; |
|
205 | - }else{ |
|
206 | - $info_url = trailingslashit($home_url); |
|
207 | - } |
|
208 | - |
|
209 | - if($args){ |
|
210 | - $info_url = add_query_arg($args,$info_url ); |
|
211 | - } |
|
212 | - |
|
213 | - return $info_url; |
|
186 | + $gd_page_id = get_option('geodir_info_page'); |
|
187 | + |
|
188 | + if (function_exists('icl_object_id')) { |
|
189 | + $gd_page_id = icl_object_id($gd_page_id, 'page', true); |
|
190 | + } |
|
191 | + |
|
192 | + if (function_exists('geodir_location_geo_home_link')) { |
|
193 | + remove_filter('home_url', 'geodir_location_geo_home_link', 100000); |
|
194 | + } |
|
195 | + $home_url = get_home_url(); |
|
196 | + if (function_exists('geodir_location_geo_home_link')) { |
|
197 | + add_filter('home_url', 'geodir_location_geo_home_link', 100000, 2); |
|
198 | + } |
|
199 | + |
|
200 | + if($gd_page_id){ |
|
201 | + $post = get_post($gd_page_id); |
|
202 | + $slug = $post->post_name; |
|
203 | + //$login_url = get_permalink($gd_page_id );// get_permalink can only be user after theme-Setup hook, any earlier and it errors |
|
204 | + $info_url = trailingslashit($home_url)."$slug/"; |
|
205 | + }else{ |
|
206 | + $info_url = trailingslashit($home_url); |
|
207 | + } |
|
208 | + |
|
209 | + if($args){ |
|
210 | + $info_url = add_query_arg($args,$info_url ); |
|
211 | + } |
|
212 | + |
|
213 | + return $info_url; |
|
214 | 214 | } |
215 | 215 | |
216 | 216 | /** |
@@ -226,11 +226,11 @@ discard block |
||
226 | 226 | * @return string Returns converted string. |
227 | 227 | */ |
228 | 228 | function geodir_ucwords($string, $charset='UTF-8') { |
229 | - if (function_exists('mb_convert_case')) { |
|
230 | - return mb_convert_case($string, MB_CASE_TITLE, $charset); |
|
231 | - } else { |
|
232 | - return ucwords($string); |
|
233 | - } |
|
229 | + if (function_exists('mb_convert_case')) { |
|
230 | + return mb_convert_case($string, MB_CASE_TITLE, $charset); |
|
231 | + } else { |
|
232 | + return ucwords($string); |
|
233 | + } |
|
234 | 234 | } |
235 | 235 | |
236 | 236 | /** |
@@ -246,11 +246,11 @@ discard block |
||
246 | 246 | * @return string Returns converted string. |
247 | 247 | */ |
248 | 248 | function geodir_strtolower($string, $charset='UTF-8') { |
249 | - if (function_exists('mb_convert_case')) { |
|
250 | - return mb_convert_case($string, MB_CASE_LOWER, $charset); |
|
251 | - } else { |
|
252 | - return strtolower($string); |
|
253 | - } |
|
249 | + if (function_exists('mb_convert_case')) { |
|
250 | + return mb_convert_case($string, MB_CASE_LOWER, $charset); |
|
251 | + } else { |
|
252 | + return strtolower($string); |
|
253 | + } |
|
254 | 254 | } |
255 | 255 | |
256 | 256 | /** |
@@ -266,11 +266,11 @@ discard block |
||
266 | 266 | * @return string Returns converted string. |
267 | 267 | */ |
268 | 268 | function geodir_strtoupper($string, $charset='UTF-8') { |
269 | - if (function_exists('mb_convert_case')) { |
|
270 | - return mb_convert_case($string, MB_CASE_UPPER, $charset); |
|
271 | - } else { |
|
272 | - return strtoupper($string); |
|
273 | - } |
|
269 | + if (function_exists('mb_convert_case')) { |
|
270 | + return mb_convert_case($string, MB_CASE_UPPER, $charset); |
|
271 | + } else { |
|
272 | + return strtoupper($string); |
|
273 | + } |
|
274 | 274 | } |
275 | 275 | |
276 | 276 | /** |
@@ -449,11 +449,11 @@ discard block |
||
449 | 449 | * @package GeoDirectory |
450 | 450 | */ |
451 | 451 | function _gd_die_handler() { |
452 | - if ( defined( 'GD_TESTING_MODE' ) ) { |
|
453 | - return '_gd_die_handler'; |
|
454 | - } else { |
|
455 | - die(); |
|
456 | - } |
|
452 | + if ( defined( 'GD_TESTING_MODE' ) ) { |
|
453 | + return '_gd_die_handler'; |
|
454 | + } else { |
|
455 | + die(); |
|
456 | + } |
|
457 | 457 | } |
458 | 458 | |
459 | 459 | /** |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | * @param int $status Optional. Status code. |
469 | 469 | */ |
470 | 470 | function gd_die( $message = '', $title = '', $status = 400 ) { |
471 | - add_filter( 'wp_die_ajax_handler', '_gd_die_handler', 10, 3 ); |
|
472 | - add_filter( 'wp_die_handler', '_gd_die_handler', 10, 3 ); |
|
473 | - wp_die( $message, $title, array( 'response' => $status )); |
|
471 | + add_filter( 'wp_die_ajax_handler', '_gd_die_handler', 10, 3 ); |
|
472 | + add_filter( 'wp_die_handler', '_gd_die_handler', 10, 3 ); |
|
473 | + wp_die( $message, $title, array( 'response' => $status )); |
|
474 | 474 | } |
475 | 475 | \ No newline at end of file |
@@ -107,11 +107,13 @@ discard block |
||
107 | 107 | } |
108 | 108 | } |
109 | 109 | |
110 | - if (!empty($field_default_cat)) |
|
111 | - $field_default_cat = ''; |
|
110 | + if (!empty($field_default_cat)) { |
|
111 | + $field_default_cat = ''; |
|
112 | + } |
|
112 | 113 | |
113 | - if (!empty($cat_find_array)) |
|
114 | - $search .= "AND (" . implode(' OR ', $cat_find_array) . ")"; |
|
114 | + if (!empty($cat_find_array)) { |
|
115 | + $search .= "AND (" . implode(' OR ', $cat_find_array) . ")"; |
|
116 | + } |
|
115 | 117 | |
116 | 118 | $main_query_array = $map_cat_ids_array; |
117 | 119 | |
@@ -143,8 +145,9 @@ discard block |
||
143 | 145 | $gd_posttype = " AND p.post_type = %s"; |
144 | 146 | $main_query_array[] = $_REQUEST['gd_posttype']; |
145 | 147 | |
146 | - } else |
|
147 | - $table = $plugin_prefix . 'gd_place_detail'; |
|
148 | + } else { |
|
149 | + $table = $plugin_prefix . 'gd_place_detail'; |
|
150 | + } |
|
148 | 151 | |
149 | 152 | $join = ", " . $table . " AS pd "; |
150 | 153 | |
@@ -309,8 +312,7 @@ discard block |
||
309 | 312 | |
310 | 313 | if (!empty($cat_content_info)) { |
311 | 314 | return '[{"totalcount":"' . $totalcount . '",' . substr(implode(',', $cat_content_info), 1) . ']'; |
312 | - } |
|
313 | - else { |
|
315 | + } else { |
|
314 | 316 | return '[{"totalcount":"0"}]'; |
315 | 317 | } |
316 | 318 | } |
317 | 319 | \ No newline at end of file |
@@ -7,59 +7,59 @@ discard block |
||
7 | 7 | */ |
8 | 8 | |
9 | 9 | if (isset($_REQUEST['ajax_action']) && $_REQUEST['ajax_action'] == 'homemap_catlist') { |
10 | - $gd_post_type = sanitize_text_field($_REQUEST['post_type']); |
|
11 | - $post_taxonomy = geodir_get_taxonomies($gd_post_type); |
|
12 | - $map_canvas_name = sanitize_text_field($_REQUEST['map_canvas']); |
|
13 | - $child_collapse = (bool)$_REQUEST['child_collapse']; |
|
14 | - echo home_map_taxonomy_walker($post_taxonomy, 0, true, 0, $map_canvas_name, $child_collapse, true); |
|
15 | - die; |
|
10 | + $gd_post_type = sanitize_text_field($_REQUEST['post_type']); |
|
11 | + $post_taxonomy = geodir_get_taxonomies($gd_post_type); |
|
12 | + $map_canvas_name = sanitize_text_field($_REQUEST['map_canvas']); |
|
13 | + $child_collapse = (bool)$_REQUEST['child_collapse']; |
|
14 | + echo home_map_taxonomy_walker($post_taxonomy, 0, true, 0, $map_canvas_name, $child_collapse, true); |
|
15 | + die; |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | // Send the content-type header with correct encoding |
19 | 19 | header("Content-type: text/javascript; charset=utf-8"); |
20 | 20 | |
21 | 21 | if (isset($_REQUEST['ajax_action']) && $_REQUEST['ajax_action'] == 'cat') { // Retrives markers data for categories |
22 | - echo get_markers(); |
|
23 | - exit; |
|
22 | + echo get_markers(); |
|
23 | + exit; |
|
24 | 24 | } else if (isset($_REQUEST['ajax_action']) && $_REQUEST['ajax_action'] == 'info') { // Retrives marker info window html |
25 | - /** |
|
26 | - * @global object $wpdb WordPress Database object. |
|
27 | - * @global string $plugin_prefix Geodirectory plugin table prefix. |
|
28 | - * @global object $gd_session GeoDirectory Session object. |
|
29 | - */ |
|
30 | - global $wpdb, $plugin_prefix, $gd_session; |
|
31 | - |
|
32 | - if ($_REQUEST['m_id'] != '') { |
|
33 | - $pid = (int)$_REQUEST['m_id']; |
|
34 | - } else { |
|
35 | - echo __('No marker data found', 'geodirectory'); |
|
36 | - exit; |
|
37 | - } |
|
38 | - |
|
39 | - if (isset($_REQUEST['post_preview']) && $_REQUEST['post_preview'] != '' && $gd_ses_listing = $gd_session->get('listing')) { |
|
40 | - $post = (object)$gd_ses_listing; |
|
41 | - echo geodir_get_infowindow_html($post, $_REQUEST['post_preview']); |
|
42 | - } else { |
|
43 | - $geodir_post_type = get_post_type($pid); |
|
44 | - |
|
45 | - $table = $plugin_prefix . $geodir_post_type . '_detail'; |
|
46 | - |
|
47 | - $sql = $wpdb->prepare("SELECT * FROM " . $table . " WHERE post_id = %d", array($pid)); |
|
48 | - |
|
49 | - $postinfo = $wpdb->get_results($sql); |
|
50 | - |
|
51 | - $data_arr = array(); |
|
52 | - |
|
53 | - if ($postinfo) { |
|
54 | - $srcharr = array("'", "/", "-", '"', '\\'); |
|
55 | - $replarr = array("′", "⁄", "–", "“", ''); |
|
56 | - |
|
57 | - foreach ($postinfo as $postinfo_obj) { |
|
58 | - echo geodir_get_infowindow_html($postinfo_obj); |
|
59 | - } |
|
60 | - } |
|
61 | - } |
|
62 | - exit; |
|
25 | + /** |
|
26 | + * @global object $wpdb WordPress Database object. |
|
27 | + * @global string $plugin_prefix Geodirectory plugin table prefix. |
|
28 | + * @global object $gd_session GeoDirectory Session object. |
|
29 | + */ |
|
30 | + global $wpdb, $plugin_prefix, $gd_session; |
|
31 | + |
|
32 | + if ($_REQUEST['m_id'] != '') { |
|
33 | + $pid = (int)$_REQUEST['m_id']; |
|
34 | + } else { |
|
35 | + echo __('No marker data found', 'geodirectory'); |
|
36 | + exit; |
|
37 | + } |
|
38 | + |
|
39 | + if (isset($_REQUEST['post_preview']) && $_REQUEST['post_preview'] != '' && $gd_ses_listing = $gd_session->get('listing')) { |
|
40 | + $post = (object)$gd_ses_listing; |
|
41 | + echo geodir_get_infowindow_html($post, $_REQUEST['post_preview']); |
|
42 | + } else { |
|
43 | + $geodir_post_type = get_post_type($pid); |
|
44 | + |
|
45 | + $table = $plugin_prefix . $geodir_post_type . '_detail'; |
|
46 | + |
|
47 | + $sql = $wpdb->prepare("SELECT * FROM " . $table . " WHERE post_id = %d", array($pid)); |
|
48 | + |
|
49 | + $postinfo = $wpdb->get_results($sql); |
|
50 | + |
|
51 | + $data_arr = array(); |
|
52 | + |
|
53 | + if ($postinfo) { |
|
54 | + $srcharr = array("'", "/", "-", '"', '\\'); |
|
55 | + $replarr = array("′", "⁄", "–", "“", ''); |
|
56 | + |
|
57 | + foreach ($postinfo as $postinfo_obj) { |
|
58 | + echo geodir_get_infowindow_html($postinfo_obj); |
|
59 | + } |
|
60 | + } |
|
61 | + } |
|
62 | + exit; |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | /** |
@@ -75,80 +75,80 @@ discard block |
||
75 | 75 | * @return string |
76 | 76 | */ |
77 | 77 | function get_markers() { |
78 | - global $wpdb, $plugin_prefix, $geodir_cat_icons; |
|
78 | + global $wpdb, $plugin_prefix, $geodir_cat_icons; |
|
79 | 79 | |
80 | - $search = ''; |
|
81 | - $main_query_array; |
|
80 | + $search = ''; |
|
81 | + $main_query_array; |
|
82 | 82 | |
83 | - $srcharr = array("'", "/", "-", '"', '\\'); |
|
84 | - $replarr = array("′", "⁄", "–", "“", ''); |
|
83 | + $srcharr = array("'", "/", "-", '"', '\\'); |
|
84 | + $replarr = array("′", "⁄", "–", "“", ''); |
|
85 | 85 | |
86 | - $post_type = isset($_REQUEST['gd_posttype']) ? $_REQUEST['gd_posttype'] : 'gd_place'; |
|
86 | + $post_type = isset($_REQUEST['gd_posttype']) ? $_REQUEST['gd_posttype'] : 'gd_place'; |
|
87 | 87 | |
88 | - $map_cat_ids_array = array('0'); |
|
89 | - $cat_find_array = array(" FIND_IN_SET(%d, pd." . $post_type . "category)"); |
|
88 | + $map_cat_ids_array = array('0'); |
|
89 | + $cat_find_array = array(" FIND_IN_SET(%d, pd." . $post_type . "category)"); |
|
90 | 90 | |
91 | 91 | |
92 | - $field_default_cat = ''; |
|
93 | - if (isset($_REQUEST['cat_id']) && $_REQUEST['cat_id'] != '') { |
|
94 | - $map_cat_arr = trim($_REQUEST['cat_id'], ','); |
|
92 | + $field_default_cat = ''; |
|
93 | + if (isset($_REQUEST['cat_id']) && $_REQUEST['cat_id'] != '') { |
|
94 | + $map_cat_arr = trim($_REQUEST['cat_id'], ','); |
|
95 | 95 | |
96 | - if (!empty($map_cat_arr)) { |
|
97 | - $field_default_cat .= "WHEN (default_category IN (" . $map_cat_arr . ")) THEN default_category "; |
|
96 | + if (!empty($map_cat_arr)) { |
|
97 | + $field_default_cat .= "WHEN (default_category IN (" . $map_cat_arr . ")) THEN default_category "; |
|
98 | 98 | |
99 | - $map_cat_ids_array = explode(',', $map_cat_arr); |
|
100 | - $cat_find_array = array(); |
|
101 | - foreach ($map_cat_ids_array as $cat_id) { |
|
102 | - $field_default_cat .= "WHEN (FIND_IN_SET($cat_id, `" . $post_type . "category`) > 0) THEN $cat_id "; |
|
103 | - $cat_find_array[] = " FIND_IN_SET(%d, pd." . $post_type . "category)"; |
|
104 | - $main_query_array[] = $cat_id; |
|
105 | - } |
|
99 | + $map_cat_ids_array = explode(',', $map_cat_arr); |
|
100 | + $cat_find_array = array(); |
|
101 | + foreach ($map_cat_ids_array as $cat_id) { |
|
102 | + $field_default_cat .= "WHEN (FIND_IN_SET($cat_id, `" . $post_type . "category`) > 0) THEN $cat_id "; |
|
103 | + $cat_find_array[] = " FIND_IN_SET(%d, pd." . $post_type . "category)"; |
|
104 | + $main_query_array[] = $cat_id; |
|
105 | + } |
|
106 | 106 | |
107 | - } |
|
108 | - } |
|
107 | + } |
|
108 | + } |
|
109 | 109 | |
110 | - if (!empty($field_default_cat)) |
|
111 | - $field_default_cat = ''; |
|
110 | + if (!empty($field_default_cat)) |
|
111 | + $field_default_cat = ''; |
|
112 | 112 | |
113 | - if (!empty($cat_find_array)) |
|
114 | - $search .= "AND (" . implode(' OR ', $cat_find_array) . ")"; |
|
113 | + if (!empty($cat_find_array)) |
|
114 | + $search .= "AND (" . implode(' OR ', $cat_find_array) . ")"; |
|
115 | 115 | |
116 | - $main_query_array = $map_cat_ids_array; |
|
116 | + $main_query_array = $map_cat_ids_array; |
|
117 | 117 | |
118 | - if (isset($_REQUEST['search']) && !empty($_REQUEST['search']) && $_REQUEST['search'] != __('Title', 'geodirectory')) { |
|
119 | - $search .= " AND p.post_title LIKE %s"; |
|
120 | - $main_query_array[] = "%" . $_REQUEST['search'] . "%"; |
|
121 | - } |
|
122 | - |
|
123 | - /** |
|
124 | - * Filter the marker query search SQL, values are replaces with %s or %d. |
|
125 | - * |
|
126 | - * @since 1.5.3 |
|
127 | - * |
|
128 | - * @param string $search The SQL query for search/where. |
|
129 | - */ |
|
130 | - $search = apply_filters('geodir_marker_search', $search); |
|
131 | - /** |
|
132 | - * Filter the marker query search SQL values %s and %d, this is an array of values. |
|
133 | - * |
|
134 | - * @since 1.5.3 |
|
135 | - * |
|
136 | - * @param array $main_query_array The SQL query values for search/where. |
|
137 | - */ |
|
138 | - $main_query_array = apply_filters('geodir_marker_main_query_array', $main_query_array); |
|
139 | - |
|
140 | - $gd_posttype = ''; |
|
141 | - if (isset($_REQUEST['gd_posttype']) && $_REQUEST['gd_posttype'] != '') { |
|
142 | - $table = $plugin_prefix . $_REQUEST['gd_posttype'] . '_detail'; |
|
143 | - $gd_posttype = " AND p.post_type = %s"; |
|
144 | - $main_query_array[] = $_REQUEST['gd_posttype']; |
|
145 | - |
|
146 | - } else |
|
147 | - $table = $plugin_prefix . 'gd_place_detail'; |
|
148 | - |
|
149 | - $join = ", " . $table . " AS pd "; |
|
150 | - |
|
151 | - /** |
|
118 | + if (isset($_REQUEST['search']) && !empty($_REQUEST['search']) && $_REQUEST['search'] != __('Title', 'geodirectory')) { |
|
119 | + $search .= " AND p.post_title LIKE %s"; |
|
120 | + $main_query_array[] = "%" . $_REQUEST['search'] . "%"; |
|
121 | + } |
|
122 | + |
|
123 | + /** |
|
124 | + * Filter the marker query search SQL, values are replaces with %s or %d. |
|
125 | + * |
|
126 | + * @since 1.5.3 |
|
127 | + * |
|
128 | + * @param string $search The SQL query for search/where. |
|
129 | + */ |
|
130 | + $search = apply_filters('geodir_marker_search', $search); |
|
131 | + /** |
|
132 | + * Filter the marker query search SQL values %s and %d, this is an array of values. |
|
133 | + * |
|
134 | + * @since 1.5.3 |
|
135 | + * |
|
136 | + * @param array $main_query_array The SQL query values for search/where. |
|
137 | + */ |
|
138 | + $main_query_array = apply_filters('geodir_marker_main_query_array', $main_query_array); |
|
139 | + |
|
140 | + $gd_posttype = ''; |
|
141 | + if (isset($_REQUEST['gd_posttype']) && $_REQUEST['gd_posttype'] != '') { |
|
142 | + $table = $plugin_prefix . $_REQUEST['gd_posttype'] . '_detail'; |
|
143 | + $gd_posttype = " AND p.post_type = %s"; |
|
144 | + $main_query_array[] = $_REQUEST['gd_posttype']; |
|
145 | + |
|
146 | + } else |
|
147 | + $table = $plugin_prefix . 'gd_place_detail'; |
|
148 | + |
|
149 | + $join = ", " . $table . " AS pd "; |
|
150 | + |
|
151 | + /** |
|
152 | 152 | * Filter the SQL JOIN clause for the markers data |
153 | 153 | * |
154 | 154 | * @since 1.0.0 |
@@ -165,16 +165,16 @@ discard block |
||
165 | 165 | * @param string $search Row of searched fields to use in WHERE clause. |
166 | 166 | */ |
167 | 167 | $search = apply_filters('geodir_home_map_listing_where', $search); |
168 | - $search = str_replace(array("'%", "%'"), array("'%%", "%%'"), $search); |
|
169 | - $cat_type = $post_type . 'category'; |
|
170 | - if ($post_type == 'gd_event') { |
|
171 | - $event_select = ", pd.recurring_dates, pd.is_recurring"; |
|
172 | - } else { |
|
173 | - $event_select = ""; |
|
174 | - } |
|
175 | - |
|
176 | - $sql_select = 'SELECT pd.default_category, pd.' . $cat_type . ', pd.post_title, pd.post_id, pd.post_latitude, pd.post_longitude' . $event_select; |
|
177 | - /** |
|
168 | + $search = str_replace(array("'%", "%'"), array("'%%", "%%'"), $search); |
|
169 | + $cat_type = $post_type . 'category'; |
|
170 | + if ($post_type == 'gd_event') { |
|
171 | + $event_select = ", pd.recurring_dates, pd.is_recurring"; |
|
172 | + } else { |
|
173 | + $event_select = ""; |
|
174 | + } |
|
175 | + |
|
176 | + $sql_select = 'SELECT pd.default_category, pd.' . $cat_type . ', pd.post_title, pd.post_id, pd.post_latitude, pd.post_longitude' . $event_select; |
|
177 | + /** |
|
178 | 178 | * Filter the SQL SELECT clause to retrive fields data |
179 | 179 | * |
180 | 180 | * @since 1.0.0 |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | */ |
194 | 194 | $groupby = apply_filters('geodir_home_map_listing_groupby', $groupby); |
195 | 195 | |
196 | - $catsql = $wpdb->prepare("$select $field_default_cat FROM " . $wpdb->posts . " as p" . $join . " WHERE p.ID = pd.post_id AND p.post_status = 'publish' " . $search . $gd_posttype . $groupby , $main_query_array); |
|
196 | + $catsql = $wpdb->prepare("$select $field_default_cat FROM " . $wpdb->posts . " as p" . $join . " WHERE p.ID = pd.post_id AND p.post_status = 'publish' " . $search . $gd_posttype . $groupby , $main_query_array); |
|
197 | 197 | |
198 | 198 | /** |
199 | 199 | * Filter the SQL query to retrive markers data |
@@ -205,112 +205,112 @@ discard block |
||
205 | 205 | */ |
206 | 206 | $catsql = apply_filters('geodir_home_map_listing_query', $catsql, $search); |
207 | 207 | |
208 | - $catinfo = $wpdb->get_results($catsql); |
|
208 | + $catinfo = $wpdb->get_results($catsql); |
|
209 | 209 | |
210 | - $cat_content_info = array(); |
|
211 | - $content_data = array(); |
|
212 | - $post_ids = array(); |
|
213 | - |
|
214 | - /** |
|
215 | - * Called before marker data is processed into JSON. |
|
216 | - * |
|
217 | - * Called before marker data is processed into JSON, this action can be used to change the format or add/remove markers. |
|
218 | - * |
|
219 | - * @since 1.5.3 |
|
220 | - * @param object $catinfo The posts object containing all marker data. |
|
221 | - * @see 'geodir_after_marker_post_process' |
|
222 | - */ |
|
223 | - $catinfo = apply_filters('geodir_before_marker_post_process', $catinfo); |
|
224 | - |
|
225 | - /** |
|
226 | - * Called before marker data is processed into JSON. |
|
227 | - * |
|
228 | - * Called before marker data is processed into JSON, this action can be used to change the format or add/remove markers. |
|
229 | - * |
|
230 | - * @since 1.4.9 |
|
231 | - * @param object $catinfo The posts object containing all marker data. |
|
232 | - * @see 'geodir_after_marker_post_process' |
|
233 | - */ |
|
234 | - do_action('geodir_before_marker_post_process_action', $catinfo); |
|
235 | - |
|
236 | - // Sort any posts into a ajax array |
|
237 | - if (!empty($catinfo)) { |
|
238 | - $geodir_cat_icons = geodir_get_term_icon(); |
|
239 | - global $geodir_date_format; |
|
240 | - |
|
241 | - $today = strtotime(date_i18n('Y-m-d')); |
|
210 | + $cat_content_info = array(); |
|
211 | + $content_data = array(); |
|
212 | + $post_ids = array(); |
|
213 | + |
|
214 | + /** |
|
215 | + * Called before marker data is processed into JSON. |
|
216 | + * |
|
217 | + * Called before marker data is processed into JSON, this action can be used to change the format or add/remove markers. |
|
218 | + * |
|
219 | + * @since 1.5.3 |
|
220 | + * @param object $catinfo The posts object containing all marker data. |
|
221 | + * @see 'geodir_after_marker_post_process' |
|
222 | + */ |
|
223 | + $catinfo = apply_filters('geodir_before_marker_post_process', $catinfo); |
|
224 | + |
|
225 | + /** |
|
226 | + * Called before marker data is processed into JSON. |
|
227 | + * |
|
228 | + * Called before marker data is processed into JSON, this action can be used to change the format or add/remove markers. |
|
229 | + * |
|
230 | + * @since 1.4.9 |
|
231 | + * @param object $catinfo The posts object containing all marker data. |
|
232 | + * @see 'geodir_after_marker_post_process' |
|
233 | + */ |
|
234 | + do_action('geodir_before_marker_post_process_action', $catinfo); |
|
235 | + |
|
236 | + // Sort any posts into a ajax array |
|
237 | + if (!empty($catinfo)) { |
|
238 | + $geodir_cat_icons = geodir_get_term_icon(); |
|
239 | + global $geodir_date_format; |
|
240 | + |
|
241 | + $today = strtotime(date_i18n('Y-m-d')); |
|
242 | 242 | |
243 | - foreach ($catinfo as $catinfo_obj) { |
|
244 | - $post_title = $catinfo_obj->post_title; |
|
243 | + foreach ($catinfo as $catinfo_obj) { |
|
244 | + $post_title = $catinfo_obj->post_title; |
|
245 | 245 | |
246 | - if ($post_type == 'gd_event' && !empty($catinfo_obj->recurring_dates)) { |
|
247 | - $event_dates = ''; |
|
248 | - $recurring_data = isset($catinfo_obj->recurring_dates) ? maybe_unserialize($catinfo_obj->recurring_dates) : array(); |
|
246 | + if ($post_type == 'gd_event' && !empty($catinfo_obj->recurring_dates)) { |
|
247 | + $event_dates = ''; |
|
248 | + $recurring_data = isset($catinfo_obj->recurring_dates) ? maybe_unserialize($catinfo_obj->recurring_dates) : array(); |
|
249 | 249 | |
250 | - $post_info = geodir_get_post_info($catinfo_obj->post_id); |
|
251 | - if (!empty($catinfo_obj->is_recurring) && !empty($recurring_data) && !empty($recurring_data['is_recurring']) && geodir_event_recurring_pkg($post_info)) { |
|
252 | - $recurring_dates = explode(',', $recurring_data['event_recurring_dates']); |
|
250 | + $post_info = geodir_get_post_info($catinfo_obj->post_id); |
|
251 | + if (!empty($catinfo_obj->is_recurring) && !empty($recurring_data) && !empty($recurring_data['is_recurring']) && geodir_event_recurring_pkg($post_info)) { |
|
252 | + $recurring_dates = explode(',', $recurring_data['event_recurring_dates']); |
|
253 | 253 | |
254 | - if (!empty($recurring_dates)) { |
|
255 | - $e = 0; |
|
256 | - foreach ($recurring_dates as $date) { |
|
257 | - if (strtotime($date) >= $today) { |
|
258 | - $event_dates .= ' :: ' . date_i18n($geodir_date_format, strtotime($date)); |
|
254 | + if (!empty($recurring_dates)) { |
|
255 | + $e = 0; |
|
256 | + foreach ($recurring_dates as $date) { |
|
257 | + if (strtotime($date) >= $today) { |
|
258 | + $event_dates .= ' :: ' . date_i18n($geodir_date_format, strtotime($date)); |
|
259 | 259 | |
260 | - $e++; |
|
261 | - if ($e == 3) { // only show 3 event dates |
|
262 | - break; |
|
263 | - } |
|
264 | - } |
|
265 | - } |
|
266 | - } |
|
267 | - } else { |
|
268 | - $start_date = !empty($recurring_data['event_start']) && $recurring_data['event_start'] != '0000-00-00 00:00:00' ? $recurring_data['event_start'] : ''; |
|
269 | - $end_date = !empty($recurring_data['event_end']) && $recurring_data['event_end'] != '0000-00-00 00:00:00' ? $recurring_data['event_end'] : $start_date; |
|
260 | + $e++; |
|
261 | + if ($e == 3) { // only show 3 event dates |
|
262 | + break; |
|
263 | + } |
|
264 | + } |
|
265 | + } |
|
266 | + } |
|
267 | + } else { |
|
268 | + $start_date = !empty($recurring_data['event_start']) && $recurring_data['event_start'] != '0000-00-00 00:00:00' ? $recurring_data['event_start'] : ''; |
|
269 | + $end_date = !empty($recurring_data['event_end']) && $recurring_data['event_end'] != '0000-00-00 00:00:00' ? $recurring_data['event_end'] : $start_date; |
|
270 | 270 | |
271 | - if ($end_date != '' && strtotime($end_date) >= $today) { |
|
272 | - $event_dates .= ' :: ' . date_i18n($geodir_date_format, strtotime($start_date)) .' -> ' . date_i18n($geodir_date_format, strtotime($end_date)); |
|
273 | - } |
|
274 | - } |
|
275 | - |
|
276 | - if (empty($event_dates)) { |
|
277 | - continue; |
|
278 | - } |
|
271 | + if ($end_date != '' && strtotime($end_date) >= $today) { |
|
272 | + $event_dates .= ' :: ' . date_i18n($geodir_date_format, strtotime($start_date)) .' -> ' . date_i18n($geodir_date_format, strtotime($end_date)); |
|
273 | + } |
|
274 | + } |
|
275 | + |
|
276 | + if (empty($event_dates)) { |
|
277 | + continue; |
|
278 | + } |
|
279 | 279 | |
280 | - $post_title .= $event_dates; |
|
281 | - } |
|
282 | - |
|
283 | - $icon = !empty($geodir_cat_icons) && isset($geodir_cat_icons[$catinfo_obj->default_category]) ? $geodir_cat_icons[$catinfo_obj->default_category] : ''; |
|
284 | - $mark_extra = (isset($catinfo_obj->marker_extra)) ? $catinfo_obj->marker_extra : ''; |
|
285 | - $title = str_replace($srcharr, $replarr, $post_title); |
|
286 | - |
|
287 | - $content_data[] = '{"id":"' . $catinfo_obj->post_id . '","t": "' . $title . '","lt": "' . $catinfo_obj->post_latitude . '","ln": "' . $catinfo_obj->post_longitude . '","mk_id":"' . $catinfo_obj->post_id . '_' . $catinfo_obj->default_category . '","i":"' . $icon . '"'.$mark_extra.'}'; |
|
288 | - $post_ids[] = $catinfo_obj->post_id; |
|
289 | - } |
|
290 | - } |
|
291 | - |
|
292 | - /** |
|
293 | - * Called after marker data is processed into JSON. |
|
294 | - * |
|
295 | - * Called after marker data is processed into JSON, this action can be used to change the format or add/remove markers. |
|
296 | - * |
|
297 | - * @since 1.4.9 |
|
298 | - * @param array $content_data The array containing all markers in JSON format. |
|
299 | - * @param object $catinfo The posts object containing all marker data. |
|
300 | - * @see 'geodir_before_marker_post_process' |
|
301 | - */ |
|
302 | - do_action('geodir_after_marker_post_process', $content_data, $catinfo); |
|
303 | - |
|
304 | - if (!empty($content_data)) { |
|
305 | - $cat_content_info[] = implode(',', $content_data); |
|
306 | - } |
|
307 | - |
|
308 | - $totalcount = count(array_unique($post_ids)); |
|
309 | - |
|
310 | - if (!empty($cat_content_info)) { |
|
311 | - return '[{"totalcount":"' . $totalcount . '",' . substr(implode(',', $cat_content_info), 1) . ']'; |
|
312 | - } |
|
313 | - else { |
|
314 | - return '[{"totalcount":"0"}]'; |
|
315 | - } |
|
280 | + $post_title .= $event_dates; |
|
281 | + } |
|
282 | + |
|
283 | + $icon = !empty($geodir_cat_icons) && isset($geodir_cat_icons[$catinfo_obj->default_category]) ? $geodir_cat_icons[$catinfo_obj->default_category] : ''; |
|
284 | + $mark_extra = (isset($catinfo_obj->marker_extra)) ? $catinfo_obj->marker_extra : ''; |
|
285 | + $title = str_replace($srcharr, $replarr, $post_title); |
|
286 | + |
|
287 | + $content_data[] = '{"id":"' . $catinfo_obj->post_id . '","t": "' . $title . '","lt": "' . $catinfo_obj->post_latitude . '","ln": "' . $catinfo_obj->post_longitude . '","mk_id":"' . $catinfo_obj->post_id . '_' . $catinfo_obj->default_category . '","i":"' . $icon . '"'.$mark_extra.'}'; |
|
288 | + $post_ids[] = $catinfo_obj->post_id; |
|
289 | + } |
|
290 | + } |
|
291 | + |
|
292 | + /** |
|
293 | + * Called after marker data is processed into JSON. |
|
294 | + * |
|
295 | + * Called after marker data is processed into JSON, this action can be used to change the format or add/remove markers. |
|
296 | + * |
|
297 | + * @since 1.4.9 |
|
298 | + * @param array $content_data The array containing all markers in JSON format. |
|
299 | + * @param object $catinfo The posts object containing all marker data. |
|
300 | + * @see 'geodir_before_marker_post_process' |
|
301 | + */ |
|
302 | + do_action('geodir_after_marker_post_process', $content_data, $catinfo); |
|
303 | + |
|
304 | + if (!empty($content_data)) { |
|
305 | + $cat_content_info[] = implode(',', $content_data); |
|
306 | + } |
|
307 | + |
|
308 | + $totalcount = count(array_unique($post_ids)); |
|
309 | + |
|
310 | + if (!empty($cat_content_info)) { |
|
311 | + return '[{"totalcount":"' . $totalcount . '",' . substr(implode(',', $cat_content_info), 1) . ']'; |
|
312 | + } |
|
313 | + else { |
|
314 | + return '[{"totalcount":"0"}]'; |
|
315 | + } |
|
316 | 316 | } |
317 | 317 | \ No newline at end of file |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | $gd_post_type = sanitize_text_field($_REQUEST['post_type']); |
11 | 11 | $post_taxonomy = geodir_get_taxonomies($gd_post_type); |
12 | 12 | $map_canvas_name = sanitize_text_field($_REQUEST['map_canvas']); |
13 | - $child_collapse = (bool)$_REQUEST['child_collapse']; |
|
13 | + $child_collapse = (bool) $_REQUEST['child_collapse']; |
|
14 | 14 | echo home_map_taxonomy_walker($post_taxonomy, 0, true, 0, $map_canvas_name, $child_collapse, true); |
15 | 15 | die; |
16 | 16 | } |
@@ -30,14 +30,14 @@ discard block |
||
30 | 30 | global $wpdb, $plugin_prefix, $gd_session; |
31 | 31 | |
32 | 32 | if ($_REQUEST['m_id'] != '') { |
33 | - $pid = (int)$_REQUEST['m_id']; |
|
33 | + $pid = (int) $_REQUEST['m_id']; |
|
34 | 34 | } else { |
35 | 35 | echo __('No marker data found', 'geodirectory'); |
36 | 36 | exit; |
37 | 37 | } |
38 | 38 | |
39 | 39 | if (isset($_REQUEST['post_preview']) && $_REQUEST['post_preview'] != '' && $gd_ses_listing = $gd_session->get('listing')) { |
40 | - $post = (object)$gd_ses_listing; |
|
40 | + $post = (object) $gd_ses_listing; |
|
41 | 41 | echo geodir_get_infowindow_html($post, $_REQUEST['post_preview']); |
42 | 42 | } else { |
43 | 43 | $geodir_post_type = get_post_type($pid); |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | */ |
194 | 194 | $groupby = apply_filters('geodir_home_map_listing_groupby', $groupby); |
195 | 195 | |
196 | - $catsql = $wpdb->prepare("$select $field_default_cat FROM " . $wpdb->posts . " as p" . $join . " WHERE p.ID = pd.post_id AND p.post_status = 'publish' " . $search . $gd_posttype . $groupby , $main_query_array); |
|
196 | + $catsql = $wpdb->prepare("$select $field_default_cat FROM " . $wpdb->posts . " as p" . $join . " WHERE p.ID = pd.post_id AND p.post_status = 'publish' " . $search . $gd_posttype . $groupby, $main_query_array); |
|
197 | 197 | |
198 | 198 | /** |
199 | 199 | * Filter the SQL query to retrive markers data |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | $end_date = !empty($recurring_data['event_end']) && $recurring_data['event_end'] != '0000-00-00 00:00:00' ? $recurring_data['event_end'] : $start_date; |
270 | 270 | |
271 | 271 | if ($end_date != '' && strtotime($end_date) >= $today) { |
272 | - $event_dates .= ' :: ' . date_i18n($geodir_date_format, strtotime($start_date)) .' -> ' . date_i18n($geodir_date_format, strtotime($end_date)); |
|
272 | + $event_dates .= ' :: ' . date_i18n($geodir_date_format, strtotime($start_date)) . ' -> ' . date_i18n($geodir_date_format, strtotime($end_date)); |
|
273 | 273 | } |
274 | 274 | } |
275 | 275 | |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | $mark_extra = (isset($catinfo_obj->marker_extra)) ? $catinfo_obj->marker_extra : ''; |
285 | 285 | $title = str_replace($srcharr, $replarr, $post_title); |
286 | 286 | |
287 | - $content_data[] = '{"id":"' . $catinfo_obj->post_id . '","t": "' . $title . '","lt": "' . $catinfo_obj->post_latitude . '","ln": "' . $catinfo_obj->post_longitude . '","mk_id":"' . $catinfo_obj->post_id . '_' . $catinfo_obj->default_category . '","i":"' . $icon . '"'.$mark_extra.'}'; |
|
287 | + $content_data[] = '{"id":"' . $catinfo_obj->post_id . '","t": "' . $title . '","lt": "' . $catinfo_obj->post_latitude . '","ln": "' . $catinfo_obj->post_longitude . '","mk_id":"' . $catinfo_obj->post_id . '_' . $catinfo_obj->default_category . '","i":"' . $icon . '"' . $mark_extra . '}'; |
|
288 | 288 | $post_ids[] = $catinfo_obj->post_id; |
289 | 289 | } |
290 | 290 | } |