@@ -15,296 +15,296 @@ discard block |
||
15 | 15 | */ |
16 | 16 | function geodir_register_sidebar() |
17 | 17 | { |
18 | - global $geodir_sidebars; |
|
19 | - |
|
20 | - if (function_exists('register_sidebar')) { |
|
21 | - /*===========================*/ |
|
22 | - /* Home page sidebars start*/ |
|
23 | - /*===========================*/ |
|
24 | - |
|
25 | - /** |
|
26 | - * Filter the `$before_widget` widget opening HTML tag. |
|
27 | - * |
|
28 | - * @since 1.0.0 |
|
29 | - * @param string $var The HTML string to filter. Default = '<section id="%1$s" class="widget geodir-widget %2$s">'. |
|
30 | - * @see 'geodir_after_widget' |
|
31 | - */ |
|
32 | - $before_widget = apply_filters('geodir_before_widget', '<section id="%1$s" class="widget geodir-widget %2$s">'); |
|
33 | - /** |
|
34 | - * Filter the `$after_widget` widget closing HTML tag. |
|
35 | - * |
|
36 | - * @since 1.0.0 |
|
37 | - * @param string $var The HTML string to filter. Default = '</section>'. |
|
38 | - * @see 'geodir_before_widget' |
|
39 | - */ |
|
40 | - $after_widget = apply_filters('geodir_after_widget', '</section>'); |
|
41 | - /** |
|
42 | - * Filter the `$before_title` widget title opening HTML tag. |
|
43 | - * |
|
44 | - * @since 1.0.0 |
|
45 | - * @param string $var The HTML string to filter. Default = '<h3 class="widget-title">'. |
|
46 | - * @see 'geodir_after_title' |
|
47 | - */ |
|
48 | - $before_title = apply_filters('geodir_before_title', '<h3 class="widget-title">'); |
|
49 | - /** |
|
50 | - * Filter the `$after_title` widget title closing HTML tag. |
|
51 | - * |
|
52 | - * @since 1.0.0 |
|
53 | - * @param string $var The HTML string to filter. Default = '</h3>'. |
|
54 | - * @see 'geodir_before_title' |
|
55 | - */ |
|
56 | - $after_title = apply_filters('geodir_after_title', '</h3>'); |
|
57 | - |
|
58 | - if (get_option('geodir_show_home_top_section')) { |
|
59 | - register_sidebars(1, array('id' => 'geodir_home_top', 'name' => __('GD Home Top Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
60 | - |
|
61 | - $geodir_sidebars[] = 'geodir_home_top'; |
|
62 | - } |
|
63 | - |
|
64 | - if (get_option('geodir_show_home_contant_section')) { |
|
65 | - register_sidebars(1, array('id' => 'geodir_home_content', 'name' => __('GD Home Content Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
18 | + global $geodir_sidebars; |
|
66 | 19 | |
67 | - $geodir_sidebars[] = 'geodir_home_content'; |
|
68 | - } |
|
20 | + if (function_exists('register_sidebar')) { |
|
21 | + /*===========================*/ |
|
22 | + /* Home page sidebars start*/ |
|
23 | + /*===========================*/ |
|
69 | 24 | |
70 | - if (get_option('geodir_show_home_right_section')) { |
|
71 | - register_sidebars(1, array('id' => 'geodir_home_right', 'name' => __('GD Home Right Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
25 | + /** |
|
26 | + * Filter the `$before_widget` widget opening HTML tag. |
|
27 | + * |
|
28 | + * @since 1.0.0 |
|
29 | + * @param string $var The HTML string to filter. Default = '<section id="%1$s" class="widget geodir-widget %2$s">'. |
|
30 | + * @see 'geodir_after_widget' |
|
31 | + */ |
|
32 | + $before_widget = apply_filters('geodir_before_widget', '<section id="%1$s" class="widget geodir-widget %2$s">'); |
|
33 | + /** |
|
34 | + * Filter the `$after_widget` widget closing HTML tag. |
|
35 | + * |
|
36 | + * @since 1.0.0 |
|
37 | + * @param string $var The HTML string to filter. Default = '</section>'. |
|
38 | + * @see 'geodir_before_widget' |
|
39 | + */ |
|
40 | + $after_widget = apply_filters('geodir_after_widget', '</section>'); |
|
41 | + /** |
|
42 | + * Filter the `$before_title` widget title opening HTML tag. |
|
43 | + * |
|
44 | + * @since 1.0.0 |
|
45 | + * @param string $var The HTML string to filter. Default = '<h3 class="widget-title">'. |
|
46 | + * @see 'geodir_after_title' |
|
47 | + */ |
|
48 | + $before_title = apply_filters('geodir_before_title', '<h3 class="widget-title">'); |
|
49 | + /** |
|
50 | + * Filter the `$after_title` widget title closing HTML tag. |
|
51 | + * |
|
52 | + * @since 1.0.0 |
|
53 | + * @param string $var The HTML string to filter. Default = '</h3>'. |
|
54 | + * @see 'geodir_before_title' |
|
55 | + */ |
|
56 | + $after_title = apply_filters('geodir_after_title', '</h3>'); |
|
57 | + |
|
58 | + if (get_option('geodir_show_home_top_section')) { |
|
59 | + register_sidebars(1, array('id' => 'geodir_home_top', 'name' => __('GD Home Top Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
72 | 60 | |
73 | - $geodir_sidebars[] = 'geodir_home_right'; |
|
74 | - } |
|
61 | + $geodir_sidebars[] = 'geodir_home_top'; |
|
62 | + } |
|
75 | 63 | |
76 | - if (get_option('geodir_show_home_left_section')) { |
|
77 | - register_sidebars(1, array('id' => 'geodir_home_left', 'name' => __('GD Home Left Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
64 | + if (get_option('geodir_show_home_contant_section')) { |
|
65 | + register_sidebars(1, array('id' => 'geodir_home_content', 'name' => __('GD Home Content Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
78 | 66 | |
79 | - $geodir_sidebars[] = 'geodir_home_left'; |
|
80 | - } |
|
67 | + $geodir_sidebars[] = 'geodir_home_content'; |
|
68 | + } |
|
81 | 69 | |
82 | - if (get_option('geodir_show_home_bottom_section')) { |
|
83 | - register_sidebars(1, array('id' => 'geodir_home_bottom', 'name' => __('GD Home Bottom Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
70 | + if (get_option('geodir_show_home_right_section')) { |
|
71 | + register_sidebars(1, array('id' => 'geodir_home_right', 'name' => __('GD Home Right Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
84 | 72 | |
85 | - $geodir_sidebars[] = 'geodir_home_bottom'; |
|
86 | - } |
|
73 | + $geodir_sidebars[] = 'geodir_home_right'; |
|
74 | + } |
|
87 | 75 | |
88 | - /*===========================*/ |
|
89 | - /* Home page sidebars end*/ |
|
90 | - /*===========================*/ |
|
76 | + if (get_option('geodir_show_home_left_section')) { |
|
77 | + register_sidebars(1, array('id' => 'geodir_home_left', 'name' => __('GD Home Left Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
91 | 78 | |
92 | - /*===========================*/ |
|
93 | - /* Listing page sidebars start*/ |
|
94 | - /*===========================*/ |
|
79 | + $geodir_sidebars[] = 'geodir_home_left'; |
|
80 | + } |
|
95 | 81 | |
96 | - if (get_option('geodir_show_listing_top_section')) { |
|
97 | - register_sidebars(1, array('id' => 'geodir_listing_top', 'name' => __('GD Listing Top Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
82 | + if (get_option('geodir_show_home_bottom_section')) { |
|
83 | + register_sidebars(1, array('id' => 'geodir_home_bottom', 'name' => __('GD Home Bottom Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
98 | 84 | |
99 | - $geodir_sidebars[] = 'geodir_listing_top'; |
|
100 | - } |
|
85 | + $geodir_sidebars[] = 'geodir_home_bottom'; |
|
86 | + } |
|
101 | 87 | |
102 | - if (get_option('geodir_show_listing_left_section')) { |
|
103 | - register_sidebars(1, array('id' => 'geodir_listing_left_sidebar', 'name' => __('GD Listing Left Sidebar', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
88 | + /*===========================*/ |
|
89 | + /* Home page sidebars end*/ |
|
90 | + /*===========================*/ |
|
104 | 91 | |
105 | - $geodir_sidebars[] = 'geodir_listing_left_sidebar'; |
|
106 | - } |
|
92 | + /*===========================*/ |
|
93 | + /* Listing page sidebars start*/ |
|
94 | + /*===========================*/ |
|
107 | 95 | |
108 | - if (get_option('geodir_show_listing_right_section')) { |
|
109 | - register_sidebars(1, array('id' => 'geodir_listing_right_sidebar', 'name' => __('GD Listing Right Sidebar', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
96 | + if (get_option('geodir_show_listing_top_section')) { |
|
97 | + register_sidebars(1, array('id' => 'geodir_listing_top', 'name' => __('GD Listing Top Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
110 | 98 | |
111 | - $geodir_sidebars[] = 'geodir_listing_right_sidebar'; |
|
112 | - } |
|
99 | + $geodir_sidebars[] = 'geodir_listing_top'; |
|
100 | + } |
|
113 | 101 | |
114 | - if (get_option('geodir_show_listing_bottom_section')) { |
|
115 | - register_sidebars(1, array('id' => 'geodir_listing_bottom', 'name' => __('GD Listing Bottom Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
102 | + if (get_option('geodir_show_listing_left_section')) { |
|
103 | + register_sidebars(1, array('id' => 'geodir_listing_left_sidebar', 'name' => __('GD Listing Left Sidebar', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
116 | 104 | |
117 | - $geodir_sidebars[] = 'geodir_listing_bottom'; |
|
118 | - } |
|
105 | + $geodir_sidebars[] = 'geodir_listing_left_sidebar'; |
|
106 | + } |
|
119 | 107 | |
120 | - /*===========================*/ |
|
121 | - /* Listing page sidebars start*/ |
|
122 | - /*===========================*/ |
|
108 | + if (get_option('geodir_show_listing_right_section')) { |
|
109 | + register_sidebars(1, array('id' => 'geodir_listing_right_sidebar', 'name' => __('GD Listing Right Sidebar', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
123 | 110 | |
124 | - /*===========================*/ |
|
125 | - /* Search page sidebars start*/ |
|
126 | - /*===========================*/ |
|
111 | + $geodir_sidebars[] = 'geodir_listing_right_sidebar'; |
|
112 | + } |
|
127 | 113 | |
128 | - if (get_option('geodir_show_search_top_section')) { |
|
129 | - register_sidebars(1, array('id' => 'geodir_search_top', 'name' => __('GD Search Top Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
114 | + if (get_option('geodir_show_listing_bottom_section')) { |
|
115 | + register_sidebars(1, array('id' => 'geodir_listing_bottom', 'name' => __('GD Listing Bottom Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
130 | 116 | |
131 | - $geodir_sidebars[] = 'geodir_search_top'; |
|
132 | - } |
|
117 | + $geodir_sidebars[] = 'geodir_listing_bottom'; |
|
118 | + } |
|
133 | 119 | |
134 | - if (get_option('geodir_show_search_left_section')) { |
|
135 | - register_sidebars(1, array('id' => 'geodir_search_left_sidebar', 'name' => __('GD Search Left Sidebar', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
120 | + /*===========================*/ |
|
121 | + /* Listing page sidebars start*/ |
|
122 | + /*===========================*/ |
|
136 | 123 | |
137 | - $geodir_sidebars[] = 'geodir_search_left_sidebar'; |
|
138 | - } |
|
124 | + /*===========================*/ |
|
125 | + /* Search page sidebars start*/ |
|
126 | + /*===========================*/ |
|
139 | 127 | |
140 | - if (get_option('geodir_show_search_right_section')) { |
|
141 | - register_sidebars(1, array('id' => 'geodir_search_right_sidebar', 'name' => __('GD Search Right Sidebar', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
128 | + if (get_option('geodir_show_search_top_section')) { |
|
129 | + register_sidebars(1, array('id' => 'geodir_search_top', 'name' => __('GD Search Top Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
142 | 130 | |
143 | - $geodir_sidebars[] = 'geodir_search_right_sidebar'; |
|
144 | - } |
|
131 | + $geodir_sidebars[] = 'geodir_search_top'; |
|
132 | + } |
|
145 | 133 | |
146 | - if (get_option('geodir_show_search_bottom_section')) { |
|
147 | - register_sidebars(1, array('id' => 'geodir_search_bottom', 'name' => __('GD Search Bottom Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
134 | + if (get_option('geodir_show_search_left_section')) { |
|
135 | + register_sidebars(1, array('id' => 'geodir_search_left_sidebar', 'name' => __('GD Search Left Sidebar', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
148 | 136 | |
149 | - $geodir_sidebars[] = 'geodir_search_bottom'; |
|
150 | - } |
|
137 | + $geodir_sidebars[] = 'geodir_search_left_sidebar'; |
|
138 | + } |
|
151 | 139 | |
152 | - /*===========================*/ |
|
153 | - /* Search page sidebars end*/ |
|
154 | - /*===========================*/ |
|
140 | + if (get_option('geodir_show_search_right_section')) { |
|
141 | + register_sidebars(1, array('id' => 'geodir_search_right_sidebar', 'name' => __('GD Search Right Sidebar', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
155 | 142 | |
156 | - /*==================================*/ |
|
157 | - /* Detail/Single page sidebars start*/ |
|
158 | - /*==================================*/ |
|
159 | - if (get_option('geodir_show_detail_top_section')) { |
|
160 | - register_sidebars(1, array('id' => 'geodir_detail_top', 'name' => __('GD Detail Top Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
143 | + $geodir_sidebars[] = 'geodir_search_right_sidebar'; |
|
144 | + } |
|
161 | 145 | |
162 | - $geodir_sidebars[] = 'geodir_detail_top'; |
|
163 | - } |
|
146 | + if (get_option('geodir_show_search_bottom_section')) { |
|
147 | + register_sidebars(1, array('id' => 'geodir_search_bottom', 'name' => __('GD Search Bottom Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
164 | 148 | |
165 | - register_sidebars(1, array('id' => 'geodir_detail_sidebar', 'name' => __('GD Detail Sidebar', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
149 | + $geodir_sidebars[] = 'geodir_search_bottom'; |
|
150 | + } |
|
166 | 151 | |
167 | - $geodir_sidebars[] = 'geodir_detail_sidebar'; |
|
152 | + /*===========================*/ |
|
153 | + /* Search page sidebars end*/ |
|
154 | + /*===========================*/ |
|
168 | 155 | |
169 | - if (get_option('geodir_show_detail_bottom_section')) { |
|
170 | - register_sidebars(1, array('id' => 'geodir_detail_bottom', 'name' => __('GD Detail Bottom Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
156 | + /*==================================*/ |
|
157 | + /* Detail/Single page sidebars start*/ |
|
158 | + /*==================================*/ |
|
159 | + if (get_option('geodir_show_detail_top_section')) { |
|
160 | + register_sidebars(1, array('id' => 'geodir_detail_top', 'name' => __('GD Detail Top Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
171 | 161 | |
172 | - $geodir_sidebars[] = 'geodir_detail_bottom'; |
|
173 | - } |
|
162 | + $geodir_sidebars[] = 'geodir_detail_top'; |
|
163 | + } |
|
174 | 164 | |
175 | - /*==================================*/ |
|
176 | - /* Detail/Single page sidebars end*/ |
|
177 | - /*==================================*/ |
|
165 | + register_sidebars(1, array('id' => 'geodir_detail_sidebar', 'name' => __('GD Detail Sidebar', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
178 | 166 | |
179 | - /*==================================*/ |
|
180 | - /* Author page sidebars start */ |
|
181 | - /*==================================*/ |
|
167 | + $geodir_sidebars[] = 'geodir_detail_sidebar'; |
|
182 | 168 | |
183 | - if (get_option('geodir_show_author_top_section')) { |
|
184 | - register_sidebars(1, array('id' => 'geodir_author_top', 'name' => __('GD Author Top Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
169 | + if (get_option('geodir_show_detail_bottom_section')) { |
|
170 | + register_sidebars(1, array('id' => 'geodir_detail_bottom', 'name' => __('GD Detail Bottom Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
185 | 171 | |
186 | - $geodir_sidebars[] = 'geodir_author_top'; |
|
187 | - } |
|
172 | + $geodir_sidebars[] = 'geodir_detail_bottom'; |
|
173 | + } |
|
188 | 174 | |
189 | - if (get_option('geodir_show_author_left_section')) { |
|
190 | - register_sidebars(1, array('id' => 'geodir_author_left_sidebar', 'name' => __('GD Author Left Sidebar', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
175 | + /*==================================*/ |
|
176 | + /* Detail/Single page sidebars end*/ |
|
177 | + /*==================================*/ |
|
191 | 178 | |
192 | - $geodir_sidebars[] = 'geodir_author_left_sidebar'; |
|
193 | - } |
|
179 | + /*==================================*/ |
|
180 | + /* Author page sidebars start */ |
|
181 | + /*==================================*/ |
|
194 | 182 | |
195 | - if (get_option('geodir_show_author_right_section')) { |
|
196 | - register_sidebars(1, array('id' => 'geodir_author_right_sidebar', 'name' => __('GD Author Right Sidebar', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
183 | + if (get_option('geodir_show_author_top_section')) { |
|
184 | + register_sidebars(1, array('id' => 'geodir_author_top', 'name' => __('GD Author Top Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
197 | 185 | |
198 | - $geodir_sidebars[] = 'geodir_author_right_sidebar'; |
|
199 | - } |
|
186 | + $geodir_sidebars[] = 'geodir_author_top'; |
|
187 | + } |
|
200 | 188 | |
201 | - if (get_option('geodir_show_author_bottom_section')) { |
|
202 | - register_sidebars(1, array('id' => 'geodir_author_bottom', 'name' => __('GD Author Bottom Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
189 | + if (get_option('geodir_show_author_left_section')) { |
|
190 | + register_sidebars(1, array('id' => 'geodir_author_left_sidebar', 'name' => __('GD Author Left Sidebar', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
203 | 191 | |
204 | - $geodir_sidebars[] = 'geodir_author_bottom'; |
|
205 | - } |
|
192 | + $geodir_sidebars[] = 'geodir_author_left_sidebar'; |
|
193 | + } |
|
206 | 194 | |
207 | - /*==================================*/ |
|
208 | - /* Author page sidebars end */ |
|
209 | - /*==================================*/ |
|
195 | + if (get_option('geodir_show_author_right_section')) { |
|
196 | + register_sidebars(1, array('id' => 'geodir_author_right_sidebar', 'name' => __('GD Author Right Sidebar', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
210 | 197 | |
211 | - /*==================================*/ |
|
212 | - /* Add listing page sidebars start */ |
|
213 | - /*==================================*/ |
|
198 | + $geodir_sidebars[] = 'geodir_author_right_sidebar'; |
|
199 | + } |
|
214 | 200 | |
215 | - register_sidebars(1, array('id' => 'geodir_add_listing_sidebar', 'name' => __('GD Add Listing Right Sidebar', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
201 | + if (get_option('geodir_show_author_bottom_section')) { |
|
202 | + register_sidebars(1, array('id' => 'geodir_author_bottom', 'name' => __('GD Author Bottom Section', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
216 | 203 | |
217 | - $geodir_sidebars[] = 'geodir_add_listing_sidebar'; |
|
204 | + $geodir_sidebars[] = 'geodir_author_bottom'; |
|
205 | + } |
|
218 | 206 | |
219 | - /*==================================*/ |
|
220 | - /* Add listing page sidebars end */ |
|
221 | - /*==================================*/ |
|
207 | + /*==================================*/ |
|
208 | + /* Author page sidebars end */ |
|
209 | + /*==================================*/ |
|
222 | 210 | |
223 | - } |
|
211 | + /*==================================*/ |
|
212 | + /* Add listing page sidebars start */ |
|
213 | + /*==================================*/ |
|
214 | + |
|
215 | + register_sidebars(1, array('id' => 'geodir_add_listing_sidebar', 'name' => __('GD Add Listing Right Sidebar', 'geodirectory'), 'before_widget' => $before_widget, 'after_widget' => $after_widget, 'before_title' => $before_title, 'after_title' => $after_title)); |
|
216 | + |
|
217 | + $geodir_sidebars[] = 'geodir_add_listing_sidebar'; |
|
218 | + |
|
219 | + /*==================================*/ |
|
220 | + /* Add listing page sidebars end */ |
|
221 | + /*==================================*/ |
|
222 | + |
|
223 | + } |
|
224 | 224 | } |
225 | 225 | |
226 | 226 | |
227 | 227 | if (!function_exists('register_geodir_widgets')) { |
228 | - /** |
|
229 | - * Registers all Widgets. |
|
230 | - * |
|
231 | - * @since 1.0.0 |
|
232 | - * @package GeoDirectory |
|
233 | - */ |
|
234 | - function register_geodir_widgets() |
|
235 | - { |
|
236 | - /** |
|
237 | - * Login Widget. |
|
238 | - * |
|
239 | - * @since 1.0.0 |
|
240 | - */ |
|
241 | - class geodir_loginwidget extends WP_Widget |
|
242 | - { |
|
243 | - /** |
|
244 | - * Register the login widget with WordPress. |
|
245 | - * |
|
246 | - * @since 1.0.0 |
|
247 | - * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
248 | - */ |
|
249 | - public function __construct() { |
|
250 | - $widget_ops = array('classname' => 'geodir_loginbox', 'description' => __('Geodirectory Loginbox Widget', 'geodirectory')); |
|
251 | - parent::__construct( |
|
252 | - 'geodir_loginbox', // Base ID |
|
253 | - __('GD > Loginbox', 'geodirectory'), // Name |
|
254 | - $widget_ops// Args |
|
255 | - ); |
|
256 | - } |
|
257 | - |
|
258 | - /** |
|
259 | - * Front-end display content for login widget. |
|
260 | - * |
|
261 | - * @since 1.0.0 |
|
262 | - * @since 1.5.1 Declare function public. |
|
263 | - * |
|
264 | - * @param array $args Widget arguments. |
|
265 | - * @param array $instance Saved values from database. |
|
266 | - */ |
|
267 | - public function widget($args, $instance) |
|
268 | - { |
|
269 | - geodir_loginwidget_output($args, $instance); |
|
270 | - } |
|
271 | - |
|
272 | - /** |
|
273 | - * Sanitize login widget form values as they are saved. |
|
274 | - * |
|
275 | - * @since 1.0.0 |
|
276 | - * @since 1.5.1 Declare function public. |
|
277 | - * |
|
278 | - * @param array $new_instance Values just sent to be saved. |
|
279 | - * @param array $old_instance Previously saved values from database. |
|
280 | - * |
|
281 | - * @return array Updated safe values to be saved. |
|
282 | - */ |
|
283 | - public function update($new_instance, $old_instance) |
|
284 | - { |
|
285 | - //save the widget |
|
286 | - $instance = $old_instance; |
|
287 | - $instance['title'] = strip_tags($new_instance['title']); |
|
288 | - |
|
289 | - return $instance; |
|
290 | - } |
|
291 | - |
|
292 | - /** |
|
293 | - * Back-end login widget settings form. |
|
294 | - * |
|
295 | - * @since 1.0.0 |
|
296 | - * @since 1.5.1 Declare function public. |
|
297 | - * |
|
298 | - * @param array $instance Previously saved values from database. |
|
299 | - * @return string|void |
|
300 | - */ |
|
301 | - public function form($instance) |
|
302 | - { |
|
303 | - //widgetform in backend |
|
304 | - $instance = wp_parse_args((array)$instance, array('title' => '', 't1' => '', 't2' => '', 't3' => '', 'img1' => '', 'desc1' => '')); |
|
305 | - $title = strip_tags($instance['title']); |
|
306 | - |
|
307 | - ?> |
|
228 | + /** |
|
229 | + * Registers all Widgets. |
|
230 | + * |
|
231 | + * @since 1.0.0 |
|
232 | + * @package GeoDirectory |
|
233 | + */ |
|
234 | + function register_geodir_widgets() |
|
235 | + { |
|
236 | + /** |
|
237 | + * Login Widget. |
|
238 | + * |
|
239 | + * @since 1.0.0 |
|
240 | + */ |
|
241 | + class geodir_loginwidget extends WP_Widget |
|
242 | + { |
|
243 | + /** |
|
244 | + * Register the login widget with WordPress. |
|
245 | + * |
|
246 | + * @since 1.0.0 |
|
247 | + * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
248 | + */ |
|
249 | + public function __construct() { |
|
250 | + $widget_ops = array('classname' => 'geodir_loginbox', 'description' => __('Geodirectory Loginbox Widget', 'geodirectory')); |
|
251 | + parent::__construct( |
|
252 | + 'geodir_loginbox', // Base ID |
|
253 | + __('GD > Loginbox', 'geodirectory'), // Name |
|
254 | + $widget_ops// Args |
|
255 | + ); |
|
256 | + } |
|
257 | + |
|
258 | + /** |
|
259 | + * Front-end display content for login widget. |
|
260 | + * |
|
261 | + * @since 1.0.0 |
|
262 | + * @since 1.5.1 Declare function public. |
|
263 | + * |
|
264 | + * @param array $args Widget arguments. |
|
265 | + * @param array $instance Saved values from database. |
|
266 | + */ |
|
267 | + public function widget($args, $instance) |
|
268 | + { |
|
269 | + geodir_loginwidget_output($args, $instance); |
|
270 | + } |
|
271 | + |
|
272 | + /** |
|
273 | + * Sanitize login widget form values as they are saved. |
|
274 | + * |
|
275 | + * @since 1.0.0 |
|
276 | + * @since 1.5.1 Declare function public. |
|
277 | + * |
|
278 | + * @param array $new_instance Values just sent to be saved. |
|
279 | + * @param array $old_instance Previously saved values from database. |
|
280 | + * |
|
281 | + * @return array Updated safe values to be saved. |
|
282 | + */ |
|
283 | + public function update($new_instance, $old_instance) |
|
284 | + { |
|
285 | + //save the widget |
|
286 | + $instance = $old_instance; |
|
287 | + $instance['title'] = strip_tags($new_instance['title']); |
|
288 | + |
|
289 | + return $instance; |
|
290 | + } |
|
291 | + |
|
292 | + /** |
|
293 | + * Back-end login widget settings form. |
|
294 | + * |
|
295 | + * @since 1.0.0 |
|
296 | + * @since 1.5.1 Declare function public. |
|
297 | + * |
|
298 | + * @param array $instance Previously saved values from database. |
|
299 | + * @return string|void |
|
300 | + */ |
|
301 | + public function form($instance) |
|
302 | + { |
|
303 | + //widgetform in backend |
|
304 | + $instance = wp_parse_args((array)$instance, array('title' => '', 't1' => '', 't2' => '', 't3' => '', 'img1' => '', 'desc1' => '')); |
|
305 | + $title = strip_tags($instance['title']); |
|
306 | + |
|
307 | + ?> |
|
308 | 308 | <p><label |
309 | 309 | for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Widget Title', 'geodirectory'); ?> |
310 | 310 | : <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" |
@@ -313,64 +313,64 @@ discard block |
||
313 | 313 | |
314 | 314 | |
315 | 315 | <?php |
316 | - } |
|
317 | - } |
|
318 | - |
|
319 | - register_widget('geodir_loginwidget'); |
|
320 | - |
|
321 | - |
|
322 | - /** |
|
323 | - * GeoDirectory Social Like Widget. |
|
324 | - * |
|
325 | - * @since 1.0.0 |
|
326 | - */ |
|
327 | - class geodir_social_like_widget extends WP_Widget |
|
328 | - { |
|
329 | - |
|
330 | - /** |
|
331 | - * Register the social like widget with WordPress. |
|
332 | - * |
|
333 | - * @since 1.0.0 |
|
334 | - * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
335 | - */ |
|
336 | - public function __construct() { |
|
337 | - $widget_ops = array('classname' => 'geodir_social_like_widget', 'description' => __('GD > Twitter,Facebook and Google+ buttons', 'geodirectory')); |
|
338 | - parent::__construct( |
|
339 | - 'social_like_widget', // Base ID |
|
340 | - __('GD > Social Like', 'geodirectory'), // Name |
|
341 | - $widget_ops// Args |
|
342 | - ); |
|
343 | - } |
|
344 | - |
|
345 | - /** |
|
346 | - * Front-end display content for social like widget. |
|
347 | - * |
|
348 | - * @since 1.0.0 |
|
349 | - * @since 1.5.1 Declare function public. |
|
350 | - * |
|
351 | - * @param array $args Widget arguments. |
|
352 | - * @param array $instance Saved values from database. |
|
353 | - */ |
|
354 | - public function widget($args, $instance) |
|
355 | - { |
|
356 | - // prints the widget |
|
357 | - extract($args, EXTR_SKIP); |
|
358 | - |
|
359 | - /** |
|
360 | - * Filter the widget title text. |
|
361 | - * |
|
362 | - * @since 1.0.0 |
|
363 | - * @global object $current_user Current user object. |
|
364 | - * @param string $title The widget title text. |
|
365 | - */ |
|
366 | - $title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']); |
|
367 | - |
|
368 | - global $current_user, $post; |
|
369 | - echo $before_widget; |
|
370 | - ?> |
|
316 | + } |
|
317 | + } |
|
318 | + |
|
319 | + register_widget('geodir_loginwidget'); |
|
320 | + |
|
321 | + |
|
322 | + /** |
|
323 | + * GeoDirectory Social Like Widget. |
|
324 | + * |
|
325 | + * @since 1.0.0 |
|
326 | + */ |
|
327 | + class geodir_social_like_widget extends WP_Widget |
|
328 | + { |
|
329 | + |
|
330 | + /** |
|
331 | + * Register the social like widget with WordPress. |
|
332 | + * |
|
333 | + * @since 1.0.0 |
|
334 | + * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
335 | + */ |
|
336 | + public function __construct() { |
|
337 | + $widget_ops = array('classname' => 'geodir_social_like_widget', 'description' => __('GD > Twitter,Facebook and Google+ buttons', 'geodirectory')); |
|
338 | + parent::__construct( |
|
339 | + 'social_like_widget', // Base ID |
|
340 | + __('GD > Social Like', 'geodirectory'), // Name |
|
341 | + $widget_ops// Args |
|
342 | + ); |
|
343 | + } |
|
344 | + |
|
345 | + /** |
|
346 | + * Front-end display content for social like widget. |
|
347 | + * |
|
348 | + * @since 1.0.0 |
|
349 | + * @since 1.5.1 Declare function public. |
|
350 | + * |
|
351 | + * @param array $args Widget arguments. |
|
352 | + * @param array $instance Saved values from database. |
|
353 | + */ |
|
354 | + public function widget($args, $instance) |
|
355 | + { |
|
356 | + // prints the widget |
|
357 | + extract($args, EXTR_SKIP); |
|
358 | + |
|
359 | + /** |
|
360 | + * Filter the widget title text. |
|
361 | + * |
|
362 | + * @since 1.0.0 |
|
363 | + * @global object $current_user Current user object. |
|
364 | + * @param string $title The widget title text. |
|
365 | + */ |
|
366 | + $title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']); |
|
367 | + |
|
368 | + global $current_user, $post; |
|
369 | + echo $before_widget; |
|
370 | + ?> |
|
371 | 371 | |
372 | 372 | <?php //if ( get_option('gd_tweet_button') ) { |
373 | - ?> |
|
373 | + ?> |
|
374 | 374 | |
375 | 375 | <a href="http://twitter.com/share" |
376 | 376 | class="twitter-share-button"><?php _e('Tweet', 'geodirectory');?></a> |
@@ -378,23 +378,23 @@ discard block |
||
378 | 378 | <script type="text/javascript" src="//platform.twitter.com/widgets.js"></script> |
379 | 379 | |
380 | 380 | <?php //} |
381 | - ?> |
|
381 | + ?> |
|
382 | 382 | |
383 | 383 | <?php // if ( get_option('gd_facebook_button') ) { |
384 | - ?> |
|
384 | + ?> |
|
385 | 385 | |
386 | 386 | <iframe <?php if (isset($_SERVER['HTTP_USER_AGENT']) && (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false)) { |
387 | - echo 'allowtransparency="true"'; |
|
388 | - }?> class="facebook" |
|
387 | + echo 'allowtransparency="true"'; |
|
388 | + }?> class="facebook" |
|
389 | 389 | src="//www.facebook.com/plugins/like.php?href=<?php echo urlencode(geodir_curPageURL()); ?>&layout=button_count&show_faces=false&width=100&action=like&colorscheme=light" |
390 | 390 | style="border:none; overflow:hidden; width:100px; height:20px"></iframe> |
391 | 391 | |
392 | 392 | |
393 | 393 | <?php //} |
394 | - ?> |
|
394 | + ?> |
|
395 | 395 | |
396 | 396 | <?php //if ( get_option('gd_google_button') ) { |
397 | - ?> |
|
397 | + ?> |
|
398 | 398 | <script> |
399 | 399 | window.___gcfg = { |
400 | 400 | parsetags: 'explicit' |
@@ -408,118 +408,118 @@ discard block |
||
408 | 408 | "count": "true" |
409 | 409 | });</script> |
410 | 410 | <?php //} |
411 | - echo $after_widget; |
|
412 | - |
|
413 | - } |
|
414 | - |
|
415 | - /** |
|
416 | - * Sanitize social like widget form values as they are saved. |
|
417 | - * |
|
418 | - * @since 1.0.0 |
|
419 | - * @since 1.5.1 Declare function public. |
|
420 | - * |
|
421 | - * @param array $new_instance Values just sent to be saved. |
|
422 | - * @param array $old_instance Previously saved values from database. |
|
423 | - * |
|
424 | - * @return array Updated safe values to be saved. |
|
425 | - */ |
|
426 | - public function update($new_instance, $old_instance) |
|
427 | - { |
|
428 | - //save the widget |
|
429 | - $instance = $old_instance; |
|
430 | - $instance['title'] = strip_tags($new_instance['title']); |
|
431 | - return $instance; |
|
432 | - } |
|
433 | - |
|
434 | - /** |
|
435 | - * Back-end social like widget settings form. |
|
436 | - * |
|
437 | - * @since 1.0.0 |
|
438 | - * @since 1.5.1 Declare function public. |
|
439 | - * |
|
440 | - * @param array $instance Previously saved values from database. |
|
441 | - * @return string|void |
|
442 | - */ |
|
443 | - public function form($instance) |
|
444 | - { |
|
445 | - //widgetform in backend |
|
446 | - $instance = wp_parse_args((array)$instance, array('title' => '')); |
|
447 | - $title = strip_tags($instance['title']); |
|
448 | - ?> |
|
411 | + echo $after_widget; |
|
412 | + |
|
413 | + } |
|
414 | + |
|
415 | + /** |
|
416 | + * Sanitize social like widget form values as they are saved. |
|
417 | + * |
|
418 | + * @since 1.0.0 |
|
419 | + * @since 1.5.1 Declare function public. |
|
420 | + * |
|
421 | + * @param array $new_instance Values just sent to be saved. |
|
422 | + * @param array $old_instance Previously saved values from database. |
|
423 | + * |
|
424 | + * @return array Updated safe values to be saved. |
|
425 | + */ |
|
426 | + public function update($new_instance, $old_instance) |
|
427 | + { |
|
428 | + //save the widget |
|
429 | + $instance = $old_instance; |
|
430 | + $instance['title'] = strip_tags($new_instance['title']); |
|
431 | + return $instance; |
|
432 | + } |
|
433 | + |
|
434 | + /** |
|
435 | + * Back-end social like widget settings form. |
|
436 | + * |
|
437 | + * @since 1.0.0 |
|
438 | + * @since 1.5.1 Declare function public. |
|
439 | + * |
|
440 | + * @param array $instance Previously saved values from database. |
|
441 | + * @return string|void |
|
442 | + */ |
|
443 | + public function form($instance) |
|
444 | + { |
|
445 | + //widgetform in backend |
|
446 | + $instance = wp_parse_args((array)$instance, array('title' => '')); |
|
447 | + $title = strip_tags($instance['title']); |
|
448 | + ?> |
|
449 | 449 | <p>No settings for this widget</p> |
450 | 450 | |
451 | 451 | |
452 | 452 | <?php |
453 | - } |
|
454 | - } |
|
455 | - |
|
456 | - register_widget('geodir_social_like_widget'); |
|
457 | - |
|
458 | - |
|
459 | - /** |
|
460 | - * GeoDirectory Feedburner Subscribe widget. |
|
461 | - * |
|
462 | - * @since 1.0.0 |
|
463 | - */ |
|
464 | - class geodirsubscribeWidget extends WP_Widget |
|
465 | - { |
|
466 | - |
|
467 | - /** |
|
468 | - * Register the feedburner subscribe widget with WordPress. |
|
469 | - * |
|
470 | - * @since 1.0.0 |
|
471 | - * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
472 | - */ |
|
473 | - public function __construct() { |
|
474 | - $widget_ops = array('classname' => 'geodir-subscribe', 'description' => __('GD > Google Feedburner Subscribe', 'geodirectory')); |
|
475 | - parent::__construct( |
|
476 | - 'widget_subscribeWidget', // Base ID |
|
477 | - __('GD > Subscribe', 'geodirectory'), // Name |
|
478 | - $widget_ops// Args |
|
479 | - ); |
|
480 | - } |
|
481 | - |
|
482 | - /** |
|
483 | - * Front-end display content for feedburner subscribe widget. |
|
484 | - * |
|
485 | - * @since 1.0.0 |
|
486 | - * @since 1.5.1 Declare function public. |
|
487 | - * |
|
488 | - * @param array $args Widget arguments. |
|
489 | - * @param array $instance Saved values from database. |
|
490 | - */ |
|
491 | - public function widget($args, $instance) |
|
492 | - { |
|
493 | - // prints the widget |
|
494 | - extract($args, EXTR_SKIP); |
|
495 | - |
|
496 | - /** |
|
497 | - * Filter the widget instance id. |
|
498 | - * |
|
499 | - * @since 1.0.0 |
|
500 | - * @param string $id The widget instance id. |
|
501 | - */ |
|
502 | - $id = empty($instance['id']) ? '' : apply_filters('widget_id', $instance['id']); |
|
503 | - |
|
504 | - /** This filter is documented in geodirectory_widgets.php */ |
|
505 | - $title = empty($instance['title']) ? '' : apply_filters('widget_title', __($instance['title'], 'geodirectory')); |
|
506 | - |
|
507 | - /** |
|
508 | - * Filter the widget text. |
|
509 | - * |
|
510 | - * @since 1.0.0 |
|
511 | - * @param string $text The widget text. |
|
512 | - */ |
|
513 | - $text = empty($instance['text']) ? '' : apply_filters('widget_text', $instance['text']); |
|
514 | - |
|
515 | - echo $before_widget; |
|
516 | - ?> |
|
453 | + } |
|
454 | + } |
|
455 | + |
|
456 | + register_widget('geodir_social_like_widget'); |
|
457 | + |
|
458 | + |
|
459 | + /** |
|
460 | + * GeoDirectory Feedburner Subscribe widget. |
|
461 | + * |
|
462 | + * @since 1.0.0 |
|
463 | + */ |
|
464 | + class geodirsubscribeWidget extends WP_Widget |
|
465 | + { |
|
466 | + |
|
467 | + /** |
|
468 | + * Register the feedburner subscribe widget with WordPress. |
|
469 | + * |
|
470 | + * @since 1.0.0 |
|
471 | + * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
472 | + */ |
|
473 | + public function __construct() { |
|
474 | + $widget_ops = array('classname' => 'geodir-subscribe', 'description' => __('GD > Google Feedburner Subscribe', 'geodirectory')); |
|
475 | + parent::__construct( |
|
476 | + 'widget_subscribeWidget', // Base ID |
|
477 | + __('GD > Subscribe', 'geodirectory'), // Name |
|
478 | + $widget_ops// Args |
|
479 | + ); |
|
480 | + } |
|
481 | + |
|
482 | + /** |
|
483 | + * Front-end display content for feedburner subscribe widget. |
|
484 | + * |
|
485 | + * @since 1.0.0 |
|
486 | + * @since 1.5.1 Declare function public. |
|
487 | + * |
|
488 | + * @param array $args Widget arguments. |
|
489 | + * @param array $instance Saved values from database. |
|
490 | + */ |
|
491 | + public function widget($args, $instance) |
|
492 | + { |
|
493 | + // prints the widget |
|
494 | + extract($args, EXTR_SKIP); |
|
495 | + |
|
496 | + /** |
|
497 | + * Filter the widget instance id. |
|
498 | + * |
|
499 | + * @since 1.0.0 |
|
500 | + * @param string $id The widget instance id. |
|
501 | + */ |
|
502 | + $id = empty($instance['id']) ? '' : apply_filters('widget_id', $instance['id']); |
|
503 | + |
|
504 | + /** This filter is documented in geodirectory_widgets.php */ |
|
505 | + $title = empty($instance['title']) ? '' : apply_filters('widget_title', __($instance['title'], 'geodirectory')); |
|
506 | + |
|
507 | + /** |
|
508 | + * Filter the widget text. |
|
509 | + * |
|
510 | + * @since 1.0.0 |
|
511 | + * @param string $text The widget text. |
|
512 | + */ |
|
513 | + $text = empty($instance['text']) ? '' : apply_filters('widget_text', $instance['text']); |
|
514 | + |
|
515 | + echo $before_widget; |
|
516 | + ?> |
|
517 | 517 | |
518 | 518 | <?php echo $before_title . $title; ?> <a href="<?php if ($id) { |
519 | - echo 'http://feeds2.feedburner.com/' . $id; |
|
520 | - } else { |
|
521 | - bloginfo('rss_url'); |
|
522 | - } ?>"><i class="fa fa-rss-square"></i> </a><?php echo $after_title;?> |
|
519 | + echo 'http://feeds2.feedburner.com/' . $id; |
|
520 | + } else { |
|
521 | + bloginfo('rss_url'); |
|
522 | + } ?>"><i class="fa fa-rss-square"></i> </a><?php echo $after_title;?> |
|
523 | 523 | |
524 | 524 | <?php if ($text <> "") { ?> |
525 | 525 | |
@@ -544,57 +544,57 @@ discard block |
||
544 | 544 | </form> |
545 | 545 | |
546 | 546 | <?php |
547 | - echo $after_widget; |
|
547 | + echo $after_widget; |
|
548 | 548 | |
549 | - } |
|
549 | + } |
|
550 | 550 | |
551 | - /** |
|
552 | - * Sanitize feedburner subscribe widget form values as they are saved. |
|
553 | - * |
|
554 | - * @since 1.0.0 |
|
555 | - * @since 1.5.1 Declare function public. |
|
556 | - * |
|
557 | - * @param array $new_instance Values just sent to be saved. |
|
558 | - * @param array $old_instance Previously saved values from database. |
|
559 | - * |
|
560 | - * @return array Updated safe values to be saved. |
|
561 | - */ |
|
562 | - public function update($new_instance, $old_instance) |
|
563 | - { |
|
551 | + /** |
|
552 | + * Sanitize feedburner subscribe widget form values as they are saved. |
|
553 | + * |
|
554 | + * @since 1.0.0 |
|
555 | + * @since 1.5.1 Declare function public. |
|
556 | + * |
|
557 | + * @param array $new_instance Values just sent to be saved. |
|
558 | + * @param array $old_instance Previously saved values from database. |
|
559 | + * |
|
560 | + * @return array Updated safe values to be saved. |
|
561 | + */ |
|
562 | + public function update($new_instance, $old_instance) |
|
563 | + { |
|
564 | 564 | |
565 | - //save the widget |
|
566 | - $instance = $old_instance; |
|
567 | - $instance['id'] = strip_tags($new_instance['id']); |
|
568 | - $instance['title'] = ($new_instance['title']); |
|
569 | - $instance['text'] = ($new_instance['text']); |
|
565 | + //save the widget |
|
566 | + $instance = $old_instance; |
|
567 | + $instance['id'] = strip_tags($new_instance['id']); |
|
568 | + $instance['title'] = ($new_instance['title']); |
|
569 | + $instance['text'] = ($new_instance['text']); |
|
570 | 570 | |
571 | 571 | |
572 | - return $instance; |
|
573 | - } |
|
572 | + return $instance; |
|
573 | + } |
|
574 | 574 | |
575 | - /** |
|
576 | - * Back-end feedburner subscribe widget settings form. |
|
577 | - * |
|
578 | - * @since 1.0.0 |
|
579 | - * @since 1.5.1 Declare function public. |
|
580 | - * |
|
581 | - * @param array $instance Previously saved values from database. |
|
582 | - * @return string|void |
|
583 | - */ |
|
584 | - public function form($instance) |
|
585 | - { |
|
586 | - //widgetform in backend |
|
587 | - $instance = wp_parse_args((array)$instance, array('title' => '', 'id' => '', 'advt1' => '', 'text' => '', 'twitter' => '', 'facebook' => '', 'digg' => '', 'myspace' => '')); |
|
575 | + /** |
|
576 | + * Back-end feedburner subscribe widget settings form. |
|
577 | + * |
|
578 | + * @since 1.0.0 |
|
579 | + * @since 1.5.1 Declare function public. |
|
580 | + * |
|
581 | + * @param array $instance Previously saved values from database. |
|
582 | + * @return string|void |
|
583 | + */ |
|
584 | + public function form($instance) |
|
585 | + { |
|
586 | + //widgetform in backend |
|
587 | + $instance = wp_parse_args((array)$instance, array('title' => '', 'id' => '', 'advt1' => '', 'text' => '', 'twitter' => '', 'facebook' => '', 'digg' => '', 'myspace' => '')); |
|
588 | 588 | |
589 | - $id = strip_tags($instance['id']); |
|
589 | + $id = strip_tags($instance['id']); |
|
590 | 590 | |
591 | - $title = strip_tags($instance['title']); |
|
591 | + $title = strip_tags($instance['title']); |
|
592 | 592 | |
593 | - $text = strip_tags($instance['text']); |
|
593 | + $text = strip_tags($instance['text']); |
|
594 | 594 | |
595 | 595 | |
596 | 596 | |
597 | - ?> |
|
597 | + ?> |
|
598 | 598 | <p><label |
599 | 599 | for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title', 'geodirectory');?>: |
600 | 600 | <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" |
@@ -613,101 +613,101 @@ discard block |
||
613 | 613 | name="<?php echo $this->get_field_name('text'); ?>"><?php echo esc_attr($text); ?></textarea></label> |
614 | 614 | </p> |
615 | 615 | <?php |
616 | - } |
|
617 | - } |
|
618 | - |
|
619 | - register_widget('geodirsubscribeWidget'); |
|
620 | - |
|
621 | - /** |
|
622 | - * GeoDirectory advertise widget. |
|
623 | - * |
|
624 | - * @since 1.0.0 |
|
625 | - */ |
|
626 | - class geodiradvtwidget extends WP_Widget |
|
627 | - { |
|
628 | - |
|
629 | - /** |
|
630 | - * Register the advertise widget with WordPress. |
|
631 | - * |
|
632 | - * @since 1.0.0 |
|
633 | - * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
634 | - */ |
|
635 | - public function __construct() { |
|
636 | - $widget_ops = array('classname' => 'GeoDirectory Advertise', 'description' => __('GD > common advertise widget in sidebar, bottom section', 'geodirectory')); |
|
637 | - parent::__construct( |
|
638 | - 'advtwidget', // Base ID |
|
639 | - __('GD > Advertise', 'geodirectory'), // Name |
|
640 | - $widget_ops// Args |
|
641 | - ); |
|
642 | - } |
|
643 | - |
|
644 | - |
|
645 | - /** |
|
646 | - * Front-end display content for advertise widget. |
|
647 | - * |
|
648 | - * @since 1.0.0 |
|
649 | - * @since 1.5.1 Declare function public. |
|
650 | - * |
|
651 | - * @param array $args Widget arguments. |
|
652 | - * @param array $instance Saved values from database. |
|
653 | - */ |
|
654 | - public function widget($args, $instance) |
|
655 | - { |
|
656 | - |
|
657 | - // prints the widget |
|
658 | - |
|
659 | - extract($args, EXTR_SKIP); |
|
660 | - |
|
661 | - /** |
|
662 | - * Filter the description text. |
|
663 | - * |
|
664 | - * @since 1.0.0 |
|
665 | - * @param string $desc1 The widget description text. |
|
666 | - */ |
|
667 | - $desc1 = empty($instance['desc1']) ? ' ' : apply_filters('widget_desc1', $instance['desc1']); |
|
668 | - echo $before_widget; |
|
669 | - ?> |
|
616 | + } |
|
617 | + } |
|
618 | + |
|
619 | + register_widget('geodirsubscribeWidget'); |
|
620 | + |
|
621 | + /** |
|
622 | + * GeoDirectory advertise widget. |
|
623 | + * |
|
624 | + * @since 1.0.0 |
|
625 | + */ |
|
626 | + class geodiradvtwidget extends WP_Widget |
|
627 | + { |
|
628 | + |
|
629 | + /** |
|
630 | + * Register the advertise widget with WordPress. |
|
631 | + * |
|
632 | + * @since 1.0.0 |
|
633 | + * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
634 | + */ |
|
635 | + public function __construct() { |
|
636 | + $widget_ops = array('classname' => 'GeoDirectory Advertise', 'description' => __('GD > common advertise widget in sidebar, bottom section', 'geodirectory')); |
|
637 | + parent::__construct( |
|
638 | + 'advtwidget', // Base ID |
|
639 | + __('GD > Advertise', 'geodirectory'), // Name |
|
640 | + $widget_ops// Args |
|
641 | + ); |
|
642 | + } |
|
643 | + |
|
644 | + |
|
645 | + /** |
|
646 | + * Front-end display content for advertise widget. |
|
647 | + * |
|
648 | + * @since 1.0.0 |
|
649 | + * @since 1.5.1 Declare function public. |
|
650 | + * |
|
651 | + * @param array $args Widget arguments. |
|
652 | + * @param array $instance Saved values from database. |
|
653 | + */ |
|
654 | + public function widget($args, $instance) |
|
655 | + { |
|
656 | + |
|
657 | + // prints the widget |
|
658 | + |
|
659 | + extract($args, EXTR_SKIP); |
|
660 | + |
|
661 | + /** |
|
662 | + * Filter the description text. |
|
663 | + * |
|
664 | + * @since 1.0.0 |
|
665 | + * @param string $desc1 The widget description text. |
|
666 | + */ |
|
667 | + $desc1 = empty($instance['desc1']) ? ' ' : apply_filters('widget_desc1', $instance['desc1']); |
|
668 | + echo $before_widget; |
|
669 | + ?> |
|
670 | 670 | <?php if ($desc1 <> "") { ?> |
671 | 671 | <?php echo $desc1; ?> |
672 | 672 | <?php } |
673 | - echo $after_widget; |
|
674 | - } |
|
675 | - |
|
676 | - /** |
|
677 | - * Sanitize advertise widget form values as they are saved. |
|
678 | - * |
|
679 | - * @since 1.0.0 |
|
680 | - * @since 1.5.1 Declare function public. |
|
681 | - * |
|
682 | - * @param array $new_instance Values just sent to be saved. |
|
683 | - * @param array $old_instance Previously saved values from database. |
|
684 | - * |
|
685 | - * @return array Updated safe values to be saved. |
|
686 | - */ |
|
687 | - public function update($new_instance, $old_instance) |
|
688 | - { |
|
689 | - //save the widget |
|
690 | - $instance = $old_instance; |
|
691 | - $instance['desc1'] = ($new_instance['desc1']); |
|
692 | - return $instance; |
|
693 | - } |
|
694 | - |
|
695 | - /** |
|
696 | - * Back-end advertise widget settings form. |
|
697 | - * |
|
698 | - * @since 1.0.0 |
|
699 | - * @since 1.5.1 Declare function public. |
|
700 | - * |
|
701 | - * @param array $instance Previously saved values from database. |
|
702 | - * @return string|void |
|
703 | - */ |
|
704 | - public function form($instance) |
|
705 | - { |
|
706 | - //widgetform in backend |
|
707 | - $instance = wp_parse_args((array)$instance, array('title' => '', 't1' => '', 't2' => '', 't3' => '', 'img1' => '', 'desc1' => '')); |
|
708 | - |
|
709 | - $desc1 = ($instance['desc1']); |
|
710 | - ?> |
|
673 | + echo $after_widget; |
|
674 | + } |
|
675 | + |
|
676 | + /** |
|
677 | + * Sanitize advertise widget form values as they are saved. |
|
678 | + * |
|
679 | + * @since 1.0.0 |
|
680 | + * @since 1.5.1 Declare function public. |
|
681 | + * |
|
682 | + * @param array $new_instance Values just sent to be saved. |
|
683 | + * @param array $old_instance Previously saved values from database. |
|
684 | + * |
|
685 | + * @return array Updated safe values to be saved. |
|
686 | + */ |
|
687 | + public function update($new_instance, $old_instance) |
|
688 | + { |
|
689 | + //save the widget |
|
690 | + $instance = $old_instance; |
|
691 | + $instance['desc1'] = ($new_instance['desc1']); |
|
692 | + return $instance; |
|
693 | + } |
|
694 | + |
|
695 | + /** |
|
696 | + * Back-end advertise widget settings form. |
|
697 | + * |
|
698 | + * @since 1.0.0 |
|
699 | + * @since 1.5.1 Declare function public. |
|
700 | + * |
|
701 | + * @param array $instance Previously saved values from database. |
|
702 | + * @return string|void |
|
703 | + */ |
|
704 | + public function form($instance) |
|
705 | + { |
|
706 | + //widgetform in backend |
|
707 | + $instance = wp_parse_args((array)$instance, array('title' => '', 't1' => '', 't2' => '', 't3' => '', 'img1' => '', 'desc1' => '')); |
|
708 | + |
|
709 | + $desc1 = ($instance['desc1']); |
|
710 | + ?> |
|
711 | 711 | <p><label |
712 | 712 | for="<?php echo $this->get_field_id('desc1'); ?>"><?php _e('Your Advt code (ex.google adsense, etc.)', 'geodirectory');?> |
713 | 713 | <textarea class="widefat" rows="6" cols="20" id="<?php echo $this->get_field_id('desc1'); ?>" |
@@ -715,65 +715,65 @@ discard block |
||
715 | 715 | </p> |
716 | 716 | |
717 | 717 | <?php |
718 | - } |
|
719 | - } |
|
720 | - |
|
721 | - register_widget('geodiradvtwidget'); |
|
722 | - |
|
723 | - /** |
|
724 | - * GeoDirectory Flickr widget. |
|
725 | - * |
|
726 | - * @since 1.0.0 |
|
727 | - */ |
|
728 | - class GeodirFlickrWidget extends WP_Widget |
|
729 | - { |
|
730 | - |
|
731 | - /** |
|
732 | - * Register the flickr widget with WordPress. |
|
733 | - * |
|
734 | - * @since 1.0.0 |
|
735 | - * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
736 | - */ |
|
737 | - public function __construct() { |
|
738 | - $widget_ops = array('classname' => 'Geo Dir Flickr Photos ', 'description' => __('GD > Flickr Photos', 'geodirectory')); |
|
739 | - parent::__construct( |
|
740 | - 'widget_flickrwidget', // Base ID |
|
741 | - __('GD > Flickr Photos', 'geodirectory'), // Name |
|
742 | - $widget_ops// Args |
|
743 | - ); |
|
744 | - } |
|
745 | - |
|
746 | - /** |
|
747 | - * Front-end display content for flickr widget. |
|
748 | - * |
|
749 | - * @since 1.0.0 |
|
750 | - * @since 1.5.1 Declare function public. |
|
751 | - * |
|
752 | - * @param array $args Widget arguments. |
|
753 | - * @param array $instance Saved values from database. |
|
754 | - */ |
|
755 | - public function widget($args, $instance) |
|
756 | - { |
|
757 | - |
|
758 | - // prints the widget |
|
759 | - extract($args, EXTR_SKIP); |
|
760 | - |
|
761 | - echo $before_widget; |
|
762 | - |
|
763 | - /** This filter is documented in geodirectory_widgets.php */ |
|
764 | - $id = empty($instance['id']) ? ' ' : apply_filters('widget_id', $instance['id']); |
|
765 | - |
|
766 | - /** |
|
767 | - * Filter the widget number. |
|
768 | - * |
|
769 | - * This is used in the flicker widget to show how many images to show. |
|
770 | - * |
|
771 | - * @since 1.0.0 |
|
772 | - * @param string $number The image count. |
|
773 | - */ |
|
774 | - $number = empty($instance['number']) ? ' ' : apply_filters('widget_number', $instance['number']); |
|
775 | - echo $before_title . __('Photo Gallery', 'geodirectory') . $after_title; |
|
776 | - ?> |
|
718 | + } |
|
719 | + } |
|
720 | + |
|
721 | + register_widget('geodiradvtwidget'); |
|
722 | + |
|
723 | + /** |
|
724 | + * GeoDirectory Flickr widget. |
|
725 | + * |
|
726 | + * @since 1.0.0 |
|
727 | + */ |
|
728 | + class GeodirFlickrWidget extends WP_Widget |
|
729 | + { |
|
730 | + |
|
731 | + /** |
|
732 | + * Register the flickr widget with WordPress. |
|
733 | + * |
|
734 | + * @since 1.0.0 |
|
735 | + * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
736 | + */ |
|
737 | + public function __construct() { |
|
738 | + $widget_ops = array('classname' => 'Geo Dir Flickr Photos ', 'description' => __('GD > Flickr Photos', 'geodirectory')); |
|
739 | + parent::__construct( |
|
740 | + 'widget_flickrwidget', // Base ID |
|
741 | + __('GD > Flickr Photos', 'geodirectory'), // Name |
|
742 | + $widget_ops// Args |
|
743 | + ); |
|
744 | + } |
|
745 | + |
|
746 | + /** |
|
747 | + * Front-end display content for flickr widget. |
|
748 | + * |
|
749 | + * @since 1.0.0 |
|
750 | + * @since 1.5.1 Declare function public. |
|
751 | + * |
|
752 | + * @param array $args Widget arguments. |
|
753 | + * @param array $instance Saved values from database. |
|
754 | + */ |
|
755 | + public function widget($args, $instance) |
|
756 | + { |
|
757 | + |
|
758 | + // prints the widget |
|
759 | + extract($args, EXTR_SKIP); |
|
760 | + |
|
761 | + echo $before_widget; |
|
762 | + |
|
763 | + /** This filter is documented in geodirectory_widgets.php */ |
|
764 | + $id = empty($instance['id']) ? ' ' : apply_filters('widget_id', $instance['id']); |
|
765 | + |
|
766 | + /** |
|
767 | + * Filter the widget number. |
|
768 | + * |
|
769 | + * This is used in the flicker widget to show how many images to show. |
|
770 | + * |
|
771 | + * @since 1.0.0 |
|
772 | + * @param string $number The image count. |
|
773 | + */ |
|
774 | + $number = empty($instance['number']) ? ' ' : apply_filters('widget_number', $instance['number']); |
|
775 | + echo $before_title . __('Photo Gallery', 'geodirectory') . $after_title; |
|
776 | + ?> |
|
777 | 777 | |
778 | 778 | <div class="geodir-flickr clearfix"> |
779 | 779 | |
@@ -784,45 +784,45 @@ discard block |
||
784 | 784 | |
785 | 785 | |
786 | 786 | <?php echo $after_widget; |
787 | - } |
|
788 | - |
|
789 | - /** |
|
790 | - * Sanitize flickr widget form values as they are saved. |
|
791 | - * |
|
792 | - * @since 1.0.0 |
|
793 | - * @since 1.5.1 Declare function public. |
|
794 | - * |
|
795 | - * @param array $new_instance Values just sent to be saved. |
|
796 | - * @param array $old_instance Previously saved values from database. |
|
797 | - * |
|
798 | - * @return array Updated safe values to be saved. |
|
799 | - */ |
|
800 | - public function update($new_instance, $old_instance) |
|
801 | - { |
|
802 | - //save the widget |
|
803 | - $instance = $old_instance; |
|
804 | - $instance['id'] = strip_tags($new_instance['id']); |
|
805 | - $instance['number'] = strip_tags($new_instance['number']); |
|
806 | - return $instance; |
|
807 | - } |
|
808 | - |
|
809 | - /** |
|
810 | - * Back-end flickr widget settings form. |
|
811 | - * |
|
812 | - * @since 1.0.0 |
|
813 | - * @since 1.5.1 Declare function public. |
|
814 | - * |
|
815 | - * @param array $instance Previously saved values from database. |
|
816 | - * @return string|void |
|
817 | - */ |
|
818 | - public function form($instance) |
|
819 | - { |
|
820 | - |
|
821 | - //widgetform in backend |
|
822 | - $instance = wp_parse_args((array)$instance, array('title' => '', 'id' => '', 'number' => '')); |
|
823 | - $id = strip_tags($instance['id']); |
|
824 | - $number = strip_tags($instance['number']); |
|
825 | - ?> |
|
787 | + } |
|
788 | + |
|
789 | + /** |
|
790 | + * Sanitize flickr widget form values as they are saved. |
|
791 | + * |
|
792 | + * @since 1.0.0 |
|
793 | + * @since 1.5.1 Declare function public. |
|
794 | + * |
|
795 | + * @param array $new_instance Values just sent to be saved. |
|
796 | + * @param array $old_instance Previously saved values from database. |
|
797 | + * |
|
798 | + * @return array Updated safe values to be saved. |
|
799 | + */ |
|
800 | + public function update($new_instance, $old_instance) |
|
801 | + { |
|
802 | + //save the widget |
|
803 | + $instance = $old_instance; |
|
804 | + $instance['id'] = strip_tags($new_instance['id']); |
|
805 | + $instance['number'] = strip_tags($new_instance['number']); |
|
806 | + return $instance; |
|
807 | + } |
|
808 | + |
|
809 | + /** |
|
810 | + * Back-end flickr widget settings form. |
|
811 | + * |
|
812 | + * @since 1.0.0 |
|
813 | + * @since 1.5.1 Declare function public. |
|
814 | + * |
|
815 | + * @param array $instance Previously saved values from database. |
|
816 | + * @return string|void |
|
817 | + */ |
|
818 | + public function form($instance) |
|
819 | + { |
|
820 | + |
|
821 | + //widgetform in backend |
|
822 | + $instance = wp_parse_args((array)$instance, array('title' => '', 'id' => '', 'number' => '')); |
|
823 | + $id = strip_tags($instance['id']); |
|
824 | + $number = strip_tags($instance['number']); |
|
825 | + ?> |
|
826 | 826 | |
827 | 827 | <p> |
828 | 828 | <label |
@@ -843,99 +843,99 @@ discard block |
||
843 | 843 | </label> |
844 | 844 | </p> |
845 | 845 | <?php |
846 | - } |
|
847 | - } |
|
848 | - |
|
849 | - register_widget('GeodirFlickrWidget'); |
|
850 | - |
|
851 | - /** |
|
852 | - * GeoDirectory Twitter widget. |
|
853 | - * |
|
854 | - * @since 1.0.0 |
|
855 | - */ |
|
856 | - class geodir_twitter extends WP_Widget |
|
857 | - { |
|
858 | - /** |
|
859 | - * Register the Twitter widget with WordPress. |
|
860 | - * |
|
861 | - * @since 1.0.0 |
|
862 | - * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
863 | - */ |
|
864 | - public function __construct() { |
|
865 | - $widget_ops = array('classname' => 'Twitter', 'description' => __('GD > Twitter Feed', 'geodirectory')); |
|
866 | - parent::__construct( |
|
867 | - 'widget_Twidget', // Base ID |
|
868 | - __('GD > Twitter', 'geodirectory'), // Name |
|
869 | - $widget_ops// Args |
|
870 | - ); |
|
871 | - } |
|
872 | - |
|
873 | - |
|
874 | - /** |
|
875 | - * Front-end display content for Twitter widget. |
|
876 | - * |
|
877 | - * @since 1.0.0 |
|
878 | - * @since 1.5.1 Declare function public. |
|
879 | - * |
|
880 | - * @param array $args Widget arguments. |
|
881 | - * @param array $instance Saved values from database. |
|
882 | - */ |
|
883 | - public function widget($args, $instance) |
|
884 | - { |
|
885 | - |
|
886 | - // prints the widget |
|
887 | - |
|
888 | - extract($args, EXTR_SKIP); |
|
889 | - |
|
890 | - /** |
|
891 | - * Filter the twitter widget description text. |
|
892 | - * |
|
893 | - * @since 1.0.0 |
|
894 | - * @param string $desc1 The widget description text. |
|
895 | - */ |
|
896 | - $desc1 = empty($instance['gd_tw_desc1']) ? ' ' : apply_filters('gd_tw_widget_desc1', $instance['gd_tw_desc1']); |
|
897 | - echo $before_widget; |
|
898 | - if ($desc1 <> "") { |
|
899 | - echo $desc1; |
|
900 | - } |
|
901 | - echo $after_widget; |
|
902 | - } |
|
903 | - |
|
904 | - /** |
|
905 | - * Sanitize twitter widget form values as they are saved. |
|
906 | - * |
|
907 | - * @since 1.0.0 |
|
908 | - * @since 1.5.1 Declare function public. |
|
909 | - * |
|
910 | - * @param array $new_instance Values just sent to be saved. |
|
911 | - * @param array $old_instance Previously saved values from database. |
|
912 | - * |
|
913 | - * @return array Updated safe values to be saved. |
|
914 | - */ |
|
915 | - public function update($new_instance, $old_instance) |
|
916 | - { |
|
917 | - //save the widget |
|
918 | - $instance = $old_instance; |
|
919 | - $instance['gd_tw_desc1'] = ($new_instance['gd_tw_desc1']); |
|
920 | - return $instance; |
|
921 | - } |
|
922 | - |
|
923 | - /** |
|
924 | - * Back-end twitter widget settings form. |
|
925 | - * |
|
926 | - * @since 1.0.0 |
|
927 | - * @since 1.5.1 Declare function public. |
|
928 | - * |
|
929 | - * @param array $instance Previously saved values from database. |
|
930 | - * @return string|void |
|
931 | - */ |
|
932 | - public function form($instance) |
|
933 | - { |
|
934 | - //widgetform in backend |
|
935 | - $instance = wp_parse_args((array)$instance, array('title' => '', 't1' => '', 't2' => '', 't3' => '', 'img1' => '', 'gd_tw_desc1' => '')); |
|
936 | - |
|
937 | - $desc1 = ($instance['gd_tw_desc1']); |
|
938 | - ?> |
|
846 | + } |
|
847 | + } |
|
848 | + |
|
849 | + register_widget('GeodirFlickrWidget'); |
|
850 | + |
|
851 | + /** |
|
852 | + * GeoDirectory Twitter widget. |
|
853 | + * |
|
854 | + * @since 1.0.0 |
|
855 | + */ |
|
856 | + class geodir_twitter extends WP_Widget |
|
857 | + { |
|
858 | + /** |
|
859 | + * Register the Twitter widget with WordPress. |
|
860 | + * |
|
861 | + * @since 1.0.0 |
|
862 | + * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
863 | + */ |
|
864 | + public function __construct() { |
|
865 | + $widget_ops = array('classname' => 'Twitter', 'description' => __('GD > Twitter Feed', 'geodirectory')); |
|
866 | + parent::__construct( |
|
867 | + 'widget_Twidget', // Base ID |
|
868 | + __('GD > Twitter', 'geodirectory'), // Name |
|
869 | + $widget_ops// Args |
|
870 | + ); |
|
871 | + } |
|
872 | + |
|
873 | + |
|
874 | + /** |
|
875 | + * Front-end display content for Twitter widget. |
|
876 | + * |
|
877 | + * @since 1.0.0 |
|
878 | + * @since 1.5.1 Declare function public. |
|
879 | + * |
|
880 | + * @param array $args Widget arguments. |
|
881 | + * @param array $instance Saved values from database. |
|
882 | + */ |
|
883 | + public function widget($args, $instance) |
|
884 | + { |
|
885 | + |
|
886 | + // prints the widget |
|
887 | + |
|
888 | + extract($args, EXTR_SKIP); |
|
889 | + |
|
890 | + /** |
|
891 | + * Filter the twitter widget description text. |
|
892 | + * |
|
893 | + * @since 1.0.0 |
|
894 | + * @param string $desc1 The widget description text. |
|
895 | + */ |
|
896 | + $desc1 = empty($instance['gd_tw_desc1']) ? ' ' : apply_filters('gd_tw_widget_desc1', $instance['gd_tw_desc1']); |
|
897 | + echo $before_widget; |
|
898 | + if ($desc1 <> "") { |
|
899 | + echo $desc1; |
|
900 | + } |
|
901 | + echo $after_widget; |
|
902 | + } |
|
903 | + |
|
904 | + /** |
|
905 | + * Sanitize twitter widget form values as they are saved. |
|
906 | + * |
|
907 | + * @since 1.0.0 |
|
908 | + * @since 1.5.1 Declare function public. |
|
909 | + * |
|
910 | + * @param array $new_instance Values just sent to be saved. |
|
911 | + * @param array $old_instance Previously saved values from database. |
|
912 | + * |
|
913 | + * @return array Updated safe values to be saved. |
|
914 | + */ |
|
915 | + public function update($new_instance, $old_instance) |
|
916 | + { |
|
917 | + //save the widget |
|
918 | + $instance = $old_instance; |
|
919 | + $instance['gd_tw_desc1'] = ($new_instance['gd_tw_desc1']); |
|
920 | + return $instance; |
|
921 | + } |
|
922 | + |
|
923 | + /** |
|
924 | + * Back-end twitter widget settings form. |
|
925 | + * |
|
926 | + * @since 1.0.0 |
|
927 | + * @since 1.5.1 Declare function public. |
|
928 | + * |
|
929 | + * @param array $instance Previously saved values from database. |
|
930 | + * @return string|void |
|
931 | + */ |
|
932 | + public function form($instance) |
|
933 | + { |
|
934 | + //widgetform in backend |
|
935 | + $instance = wp_parse_args((array)$instance, array('title' => '', 't1' => '', 't2' => '', 't3' => '', 'img1' => '', 'gd_tw_desc1' => '')); |
|
936 | + |
|
937 | + $desc1 = ($instance['gd_tw_desc1']); |
|
938 | + ?> |
|
939 | 939 | <p><label |
940 | 940 | for="<?php echo $this->get_field_id('gd_tw_desc1'); ?>"><?php _e('Your twitter code', 'geodirectory');?> |
941 | 941 | <textarea class="widefat" rows="6" cols="20" |
@@ -944,179 +944,179 @@ discard block |
||
944 | 944 | </p> |
945 | 945 | |
946 | 946 | <?php |
947 | - } |
|
948 | - } |
|
949 | - |
|
950 | - register_widget('geodir_twitter'); |
|
951 | - |
|
952 | - /** |
|
953 | - * GeoDirectory Advanced Search widget. |
|
954 | - * |
|
955 | - * @since 1.0.0 |
|
956 | - */ |
|
957 | - class geodir_advance_search_widget extends WP_Widget |
|
958 | - { |
|
959 | - /** |
|
960 | - * Register the advanced search widget with WordPress. |
|
961 | - * |
|
962 | - * @since 1.0.0 |
|
963 | - * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
964 | - */ |
|
965 | - public function __construct() { |
|
966 | - $widget_ops = array('classname' => 'geodir_advance_search_widget', 'description' => __('GD > Search', 'geodirectory'),'post_type'=>''); |
|
967 | - parent::__construct( |
|
968 | - 'geodir_advance_search', // Base ID |
|
969 | - __('GD > Search', 'geodirectory'), // Name |
|
970 | - $widget_ops// Args |
|
971 | - ); |
|
972 | - } |
|
973 | - |
|
974 | - |
|
975 | - /** |
|
976 | - * Front-end display content for advanced search widget. |
|
977 | - * |
|
978 | - * @since 1.0.0 |
|
979 | - * @since 1.5.1 Declare function public. |
|
980 | - * |
|
981 | - * @param array $args Widget arguments. |
|
982 | - * @param array $instance Saved values from database. |
|
983 | - */ |
|
984 | - public function widget($args, $instance) |
|
985 | - { |
|
986 | - /** |
|
987 | - * Filter the search widget arguments. |
|
988 | - * |
|
989 | - * @since 1.5.7 |
|
990 | - * @param array $args The widget arguments. |
|
991 | - * @param array $instance The widget instance. |
|
992 | - */ |
|
993 | - $args = apply_filters('widget_geodir_advance_search_args',$args,$instance); |
|
994 | - |
|
995 | - // prints the widget |
|
996 | - extract($args, EXTR_SKIP); |
|
997 | - |
|
998 | - if(isset($post_type) && $post_type){ |
|
999 | - geodir_get_search_post_type($post_type);// set the post type |
|
1000 | - }else{ |
|
1001 | - geodir_get_search_post_type();// set the post type |
|
1002 | - } |
|
1003 | - |
|
1004 | - echo $before_widget; |
|
1005 | - |
|
1006 | - /** This filter is documented in geodirectory_widgets.php */ |
|
1007 | - $title = empty($instance['title']) ? __('Search', 'geodirectory') : apply_filters('widget_title', __($instance['title'], 'geodirectory')); |
|
1008 | - |
|
1009 | - geodir_get_template_part('listing', 'filter-form'); |
|
1010 | - |
|
1011 | - echo $after_widget; |
|
1012 | - |
|
1013 | - // after outputing the search reset the CPT |
|
1014 | - global $geodir_search_post_type; |
|
1015 | - $geodir_search_post_type = ''; |
|
1016 | - } |
|
1017 | - |
|
1018 | - /** |
|
1019 | - * Sanitize advanced search widget form values as they are saved. |
|
1020 | - * |
|
1021 | - * @since 1.0.0 |
|
1022 | - * @since 1.5.1 Declare function public. |
|
1023 | - * |
|
1024 | - * @param array $new_instance Values just sent to be saved. |
|
1025 | - * @param array $old_instance Previously saved values from database. |
|
1026 | - * |
|
1027 | - * @return array Updated safe values to be saved. |
|
1028 | - */ |
|
1029 | - public function update($new_instance, $old_instance) |
|
1030 | - { |
|
1031 | - //save the widget |
|
1032 | - //Nothing to save |
|
1033 | - return isset($instance) ? $instance : array(); |
|
1034 | - } |
|
1035 | - |
|
1036 | - /** |
|
1037 | - * Back-end advanced search widget settings form. |
|
1038 | - * |
|
1039 | - * @since 1.0.0 |
|
1040 | - * @since 1.5.1 Declare function public. |
|
1041 | - * |
|
1042 | - * @param array $instance Previously saved values from database. |
|
1043 | - * @return string|void |
|
1044 | - */ |
|
1045 | - public function form($instance) |
|
1046 | - { |
|
1047 | - //widgetform in backend |
|
1048 | - echo __("This is a search widget to show advance search for gedodirectory listings.", 'geodirectory'); |
|
1049 | - } |
|
1050 | - } |
|
1051 | - |
|
1052 | - register_widget('geodir_advance_search_widget'); |
|
1053 | - |
|
1054 | - |
|
1055 | - /** |
|
1056 | - * Contains all functions for popular widget. |
|
1057 | - * |
|
1058 | - * @since 1.0.0 |
|
1059 | - * @package GeoDirectory |
|
1060 | - */ |
|
1061 | - include_once('geodirectory-widgets/geodirectory_popular_widget.php'); |
|
1062 | - /** |
|
1063 | - * Contains all functions for listing slider widget. |
|
1064 | - * |
|
1065 | - * @since 1.0.0 |
|
1066 | - * @package GeoDirectory |
|
1067 | - */ |
|
1068 | - include_once('geodirectory-widgets/geodirectory_listing_slider_widget.php'); |
|
1069 | - /** |
|
1070 | - * Contains all functions for home map widget. |
|
1071 | - * |
|
1072 | - * @since 1.0.0 |
|
1073 | - * @package GeoDirectory |
|
1074 | - */ |
|
1075 | - include_once('geodirectory-widgets/home_map_widget.php'); |
|
1076 | - /** |
|
1077 | - * Contains all functions for listing map widget. |
|
1078 | - * |
|
1079 | - * @since 1.0.0 |
|
1080 | - * @package GeoDirectory |
|
1081 | - */ |
|
1082 | - include_once('geodirectory-widgets/listing_map_widget.php'); |
|
1083 | - /** |
|
1084 | - * Contains all functions for reviews widget. |
|
1085 | - * |
|
1086 | - * @since 1.0.0 |
|
1087 | - * @package GeoDirectory |
|
1088 | - */ |
|
1089 | - include_once('geodirectory-widgets/geodirectory_reviews_widget.php'); |
|
1090 | - /** |
|
1091 | - * Contains all functions for related listing widget. |
|
1092 | - * |
|
1093 | - * @since 1.0.0 |
|
1094 | - * @package GeoDirectory |
|
1095 | - */ |
|
1096 | - include_once('geodirectory-widgets/geodirectory_related_listing_widget.php'); |
|
1097 | - /** |
|
1098 | - * Contains all functions for bestof widget. |
|
1099 | - * |
|
1100 | - * @since 1.0.0 |
|
1101 | - * @package GeoDirectory |
|
1102 | - */ |
|
1103 | - include_once('geodirectory-widgets/geodirectory_bestof_widget.php'); |
|
947 | + } |
|
948 | + } |
|
949 | + |
|
950 | + register_widget('geodir_twitter'); |
|
951 | + |
|
952 | + /** |
|
953 | + * GeoDirectory Advanced Search widget. |
|
954 | + * |
|
955 | + * @since 1.0.0 |
|
956 | + */ |
|
957 | + class geodir_advance_search_widget extends WP_Widget |
|
958 | + { |
|
959 | + /** |
|
960 | + * Register the advanced search widget with WordPress. |
|
961 | + * |
|
962 | + * @since 1.0.0 |
|
963 | + * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
|
964 | + */ |
|
965 | + public function __construct() { |
|
966 | + $widget_ops = array('classname' => 'geodir_advance_search_widget', 'description' => __('GD > Search', 'geodirectory'),'post_type'=>''); |
|
967 | + parent::__construct( |
|
968 | + 'geodir_advance_search', // Base ID |
|
969 | + __('GD > Search', 'geodirectory'), // Name |
|
970 | + $widget_ops// Args |
|
971 | + ); |
|
972 | + } |
|
973 | + |
|
974 | + |
|
975 | + /** |
|
976 | + * Front-end display content for advanced search widget. |
|
977 | + * |
|
978 | + * @since 1.0.0 |
|
979 | + * @since 1.5.1 Declare function public. |
|
980 | + * |
|
981 | + * @param array $args Widget arguments. |
|
982 | + * @param array $instance Saved values from database. |
|
983 | + */ |
|
984 | + public function widget($args, $instance) |
|
985 | + { |
|
986 | + /** |
|
987 | + * Filter the search widget arguments. |
|
988 | + * |
|
989 | + * @since 1.5.7 |
|
990 | + * @param array $args The widget arguments. |
|
991 | + * @param array $instance The widget instance. |
|
992 | + */ |
|
993 | + $args = apply_filters('widget_geodir_advance_search_args',$args,$instance); |
|
994 | + |
|
995 | + // prints the widget |
|
996 | + extract($args, EXTR_SKIP); |
|
997 | + |
|
998 | + if(isset($post_type) && $post_type){ |
|
999 | + geodir_get_search_post_type($post_type);// set the post type |
|
1000 | + }else{ |
|
1001 | + geodir_get_search_post_type();// set the post type |
|
1002 | + } |
|
1003 | + |
|
1004 | + echo $before_widget; |
|
1005 | + |
|
1006 | + /** This filter is documented in geodirectory_widgets.php */ |
|
1007 | + $title = empty($instance['title']) ? __('Search', 'geodirectory') : apply_filters('widget_title', __($instance['title'], 'geodirectory')); |
|
1008 | + |
|
1009 | + geodir_get_template_part('listing', 'filter-form'); |
|
1010 | + |
|
1011 | + echo $after_widget; |
|
1012 | + |
|
1013 | + // after outputing the search reset the CPT |
|
1014 | + global $geodir_search_post_type; |
|
1015 | + $geodir_search_post_type = ''; |
|
1016 | + } |
|
1017 | + |
|
1018 | + /** |
|
1019 | + * Sanitize advanced search widget form values as they are saved. |
|
1020 | + * |
|
1021 | + * @since 1.0.0 |
|
1022 | + * @since 1.5.1 Declare function public. |
|
1023 | + * |
|
1024 | + * @param array $new_instance Values just sent to be saved. |
|
1025 | + * @param array $old_instance Previously saved values from database. |
|
1026 | + * |
|
1027 | + * @return array Updated safe values to be saved. |
|
1028 | + */ |
|
1029 | + public function update($new_instance, $old_instance) |
|
1030 | + { |
|
1031 | + //save the widget |
|
1032 | + //Nothing to save |
|
1033 | + return isset($instance) ? $instance : array(); |
|
1034 | + } |
|
1035 | + |
|
1036 | + /** |
|
1037 | + * Back-end advanced search widget settings form. |
|
1038 | + * |
|
1039 | + * @since 1.0.0 |
|
1040 | + * @since 1.5.1 Declare function public. |
|
1041 | + * |
|
1042 | + * @param array $instance Previously saved values from database. |
|
1043 | + * @return string|void |
|
1044 | + */ |
|
1045 | + public function form($instance) |
|
1046 | + { |
|
1047 | + //widgetform in backend |
|
1048 | + echo __("This is a search widget to show advance search for gedodirectory listings.", 'geodirectory'); |
|
1049 | + } |
|
1050 | + } |
|
1051 | + |
|
1052 | + register_widget('geodir_advance_search_widget'); |
|
1053 | + |
|
1054 | + |
|
1055 | + /** |
|
1056 | + * Contains all functions for popular widget. |
|
1057 | + * |
|
1058 | + * @since 1.0.0 |
|
1059 | + * @package GeoDirectory |
|
1060 | + */ |
|
1061 | + include_once('geodirectory-widgets/geodirectory_popular_widget.php'); |
|
1062 | + /** |
|
1063 | + * Contains all functions for listing slider widget. |
|
1064 | + * |
|
1065 | + * @since 1.0.0 |
|
1066 | + * @package GeoDirectory |
|
1067 | + */ |
|
1068 | + include_once('geodirectory-widgets/geodirectory_listing_slider_widget.php'); |
|
1069 | + /** |
|
1070 | + * Contains all functions for home map widget. |
|
1071 | + * |
|
1072 | + * @since 1.0.0 |
|
1073 | + * @package GeoDirectory |
|
1074 | + */ |
|
1075 | + include_once('geodirectory-widgets/home_map_widget.php'); |
|
1076 | + /** |
|
1077 | + * Contains all functions for listing map widget. |
|
1078 | + * |
|
1079 | + * @since 1.0.0 |
|
1080 | + * @package GeoDirectory |
|
1081 | + */ |
|
1082 | + include_once('geodirectory-widgets/listing_map_widget.php'); |
|
1083 | + /** |
|
1084 | + * Contains all functions for reviews widget. |
|
1085 | + * |
|
1086 | + * @since 1.0.0 |
|
1087 | + * @package GeoDirectory |
|
1088 | + */ |
|
1089 | + include_once('geodirectory-widgets/geodirectory_reviews_widget.php'); |
|
1090 | + /** |
|
1091 | + * Contains all functions for related listing widget. |
|
1092 | + * |
|
1093 | + * @since 1.0.0 |
|
1094 | + * @package GeoDirectory |
|
1095 | + */ |
|
1096 | + include_once('geodirectory-widgets/geodirectory_related_listing_widget.php'); |
|
1097 | + /** |
|
1098 | + * Contains all functions for bestof widget. |
|
1099 | + * |
|
1100 | + * @since 1.0.0 |
|
1101 | + * @package GeoDirectory |
|
1102 | + */ |
|
1103 | + include_once('geodirectory-widgets/geodirectory_bestof_widget.php'); |
|
1104 | + /** |
|
1105 | + * Contains all functions for cpt categories widget. |
|
1106 | + * |
|
1107 | + * @since 1.5.4 |
|
1108 | + * @package GeoDirectory |
|
1109 | + */ |
|
1110 | + include_once('geodirectory-widgets/geodirectory_cpt_categories_widget.php'); |
|
1104 | 1111 | /** |
1105 | - * Contains all functions for cpt categories widget. |
|
1106 | - * |
|
1107 | - * @since 1.5.4 |
|
1108 | - * @package GeoDirectory |
|
1109 | - */ |
|
1110 | - include_once('geodirectory-widgets/geodirectory_cpt_categories_widget.php'); |
|
1111 | - /** |
|
1112 | - * Contains all functions for features widget. |
|
1113 | - * |
|
1114 | - * @since 1.5.6 |
|
1115 | - * @package GeoDirectory |
|
1116 | - * @todo make the image field recurring |
|
1117 | - */ |
|
1118 | - include_once('geodirectory-widgets/geodirectory_features_widget.php'); |
|
1119 | - } |
|
1112 | + * Contains all functions for features widget. |
|
1113 | + * |
|
1114 | + * @since 1.5.6 |
|
1115 | + * @package GeoDirectory |
|
1116 | + * @todo make the image field recurring |
|
1117 | + */ |
|
1118 | + include_once('geodirectory-widgets/geodirectory_features_widget.php'); |
|
1119 | + } |
|
1120 | 1120 | |
1121 | 1121 | } |
1122 | 1122 |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | public function form($instance) |
302 | 302 | { |
303 | 303 | //widgetform in backend |
304 | - $instance = wp_parse_args((array)$instance, array('title' => '', 't1' => '', 't2' => '', 't3' => '', 'img1' => '', 'desc1' => '')); |
|
304 | + $instance = wp_parse_args((array) $instance, array('title' => '', 't1' => '', 't2' => '', 't3' => '', 'img1' => '', 'desc1' => '')); |
|
305 | 305 | $title = strip_tags($instance['title']); |
306 | 306 | |
307 | 307 | ?> |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | ?> |
374 | 374 | |
375 | 375 | <a href="http://twitter.com/share" |
376 | - class="twitter-share-button"><?php _e('Tweet', 'geodirectory');?></a> |
|
376 | + class="twitter-share-button"><?php _e('Tweet', 'geodirectory'); ?></a> |
|
377 | 377 | |
378 | 378 | <script type="text/javascript" src="//platform.twitter.com/widgets.js"></script> |
379 | 379 | |
@@ -443,7 +443,7 @@ discard block |
||
443 | 443 | public function form($instance) |
444 | 444 | { |
445 | 445 | //widgetform in backend |
446 | - $instance = wp_parse_args((array)$instance, array('title' => '')); |
|
446 | + $instance = wp_parse_args((array) $instance, array('title' => '')); |
|
447 | 447 | $title = strip_tags($instance['title']); |
448 | 448 | ?> |
449 | 449 | <p>No settings for this widget</p> |
@@ -515,11 +515,11 @@ discard block |
||
515 | 515 | echo $before_widget; |
516 | 516 | ?> |
517 | 517 | |
518 | - <?php echo $before_title . $title; ?> <a href="<?php if ($id) { |
|
519 | - echo 'http://feeds2.feedburner.com/' . $id; |
|
518 | + <?php echo $before_title.$title; ?> <a href="<?php if ($id) { |
|
519 | + echo 'http://feeds2.feedburner.com/'.$id; |
|
520 | 520 | } else { |
521 | 521 | bloginfo('rss_url'); |
522 | - } ?>"><i class="fa fa-rss-square"></i> </a><?php echo $after_title;?> |
|
522 | + } ?>"><i class="fa fa-rss-square"></i> </a><?php echo $after_title; ?> |
|
523 | 523 | |
524 | 524 | <?php if ($text <> "") { ?> |
525 | 525 | |
@@ -584,7 +584,7 @@ discard block |
||
584 | 584 | public function form($instance) |
585 | 585 | { |
586 | 586 | //widgetform in backend |
587 | - $instance = wp_parse_args((array)$instance, array('title' => '', 'id' => '', 'advt1' => '', 'text' => '', 'twitter' => '', 'facebook' => '', 'digg' => '', 'myspace' => '')); |
|
587 | + $instance = wp_parse_args((array) $instance, array('title' => '', 'id' => '', 'advt1' => '', 'text' => '', 'twitter' => '', 'facebook' => '', 'digg' => '', 'myspace' => '')); |
|
588 | 588 | |
589 | 589 | $id = strip_tags($instance['id']); |
590 | 590 | |
@@ -596,19 +596,19 @@ discard block |
||
596 | 596 | |
597 | 597 | ?> |
598 | 598 | <p><label |
599 | - for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title', 'geodirectory');?>: |
|
599 | + for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title', 'geodirectory'); ?>: |
|
600 | 600 | <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" |
601 | 601 | name="<?php echo $this->get_field_name('title'); ?>" type="text" |
602 | 602 | value="<?php echo esc_attr($title); ?>"/></label></p> |
603 | 603 | |
604 | 604 | <p><label |
605 | - for="<?php echo $this->get_field_id('id'); ?>"><?php _e('Feedburner ID (ex :- geotheme)', 'geodirectory');?> |
|
605 | + for="<?php echo $this->get_field_id('id'); ?>"><?php _e('Feedburner ID (ex :- geotheme)', 'geodirectory'); ?> |
|
606 | 606 | : <input class="widefat" id="<?php echo $this->get_field_id('id'); ?>" |
607 | 607 | name="<?php echo $this->get_field_name('id'); ?>" type="text" |
608 | 608 | value="<?php echo esc_attr($id); ?>"/></label></p> |
609 | 609 | |
610 | 610 | <p><label |
611 | - for="<?php echo $this->get_field_id('text'); ?>"><?php _e('Short Description', 'geodirectory');?> |
|
611 | + for="<?php echo $this->get_field_id('text'); ?>"><?php _e('Short Description', 'geodirectory'); ?> |
|
612 | 612 | <textarea class="widefat" rows="6" cols="20" id="<?php echo $this->get_field_id('text'); ?>" |
613 | 613 | name="<?php echo $this->get_field_name('text'); ?>"><?php echo esc_attr($text); ?></textarea></label> |
614 | 614 | </p> |
@@ -704,12 +704,12 @@ discard block |
||
704 | 704 | public function form($instance) |
705 | 705 | { |
706 | 706 | //widgetform in backend |
707 | - $instance = wp_parse_args((array)$instance, array('title' => '', 't1' => '', 't2' => '', 't3' => '', 'img1' => '', 'desc1' => '')); |
|
707 | + $instance = wp_parse_args((array) $instance, array('title' => '', 't1' => '', 't2' => '', 't3' => '', 'img1' => '', 'desc1' => '')); |
|
708 | 708 | |
709 | 709 | $desc1 = ($instance['desc1']); |
710 | 710 | ?> |
711 | 711 | <p><label |
712 | - for="<?php echo $this->get_field_id('desc1'); ?>"><?php _e('Your Advt code (ex.google adsense, etc.)', 'geodirectory');?> |
|
712 | + for="<?php echo $this->get_field_id('desc1'); ?>"><?php _e('Your Advt code (ex.google adsense, etc.)', 'geodirectory'); ?> |
|
713 | 713 | <textarea class="widefat" rows="6" cols="20" id="<?php echo $this->get_field_id('desc1'); ?>" |
714 | 714 | name="<?php echo $this->get_field_name('desc1'); ?>"><?php echo esc_attr($desc1); ?></textarea></label> |
715 | 715 | </p> |
@@ -772,7 +772,7 @@ discard block |
||
772 | 772 | * @param string $number The image count. |
773 | 773 | */ |
774 | 774 | $number = empty($instance['number']) ? ' ' : apply_filters('widget_number', $instance['number']); |
775 | - echo $before_title . __('Photo Gallery', 'geodirectory') . $after_title; |
|
775 | + echo $before_title.__('Photo Gallery', 'geodirectory').$after_title; |
|
776 | 776 | ?> |
777 | 777 | |
778 | 778 | <div class="geodir-flickr clearfix"> |
@@ -819,14 +819,14 @@ discard block |
||
819 | 819 | { |
820 | 820 | |
821 | 821 | //widgetform in backend |
822 | - $instance = wp_parse_args((array)$instance, array('title' => '', 'id' => '', 'number' => '')); |
|
822 | + $instance = wp_parse_args((array) $instance, array('title' => '', 'id' => '', 'number' => '')); |
|
823 | 823 | $id = strip_tags($instance['id']); |
824 | 824 | $number = strip_tags($instance['number']); |
825 | 825 | ?> |
826 | 826 | |
827 | 827 | <p> |
828 | 828 | <label |
829 | - for="<?php echo $this->get_field_id('id'); ?>"><?php _e('Flickr ID', 'geodirectory');?> |
|
829 | + for="<?php echo $this->get_field_id('id'); ?>"><?php _e('Flickr ID', 'geodirectory'); ?> |
|
830 | 830 | (<a href="http://www.idgettr.com">idGettr</a>): |
831 | 831 | <input class="widefat" id="<?php echo $this->get_field_id('id'); ?>" |
832 | 832 | name="<?php echo $this->get_field_name('id'); ?>" type="text" |
@@ -836,7 +836,7 @@ discard block |
||
836 | 836 | |
837 | 837 | <p> |
838 | 838 | <label |
839 | - for="<?php echo $this->get_field_id('number'); ?>"><?php _e('Number of photos:', 'geodirectory');?> |
|
839 | + for="<?php echo $this->get_field_id('number'); ?>"><?php _e('Number of photos:', 'geodirectory'); ?> |
|
840 | 840 | <input class="widefat" id="<?php echo $this->get_field_id('number'); ?>" |
841 | 841 | name="<?php echo $this->get_field_name('number'); ?>" type="text" |
842 | 842 | value="<?php echo esc_attr($number); ?>"/> |
@@ -932,12 +932,12 @@ discard block |
||
932 | 932 | public function form($instance) |
933 | 933 | { |
934 | 934 | //widgetform in backend |
935 | - $instance = wp_parse_args((array)$instance, array('title' => '', 't1' => '', 't2' => '', 't3' => '', 'img1' => '', 'gd_tw_desc1' => '')); |
|
935 | + $instance = wp_parse_args((array) $instance, array('title' => '', 't1' => '', 't2' => '', 't3' => '', 'img1' => '', 'gd_tw_desc1' => '')); |
|
936 | 936 | |
937 | 937 | $desc1 = ($instance['gd_tw_desc1']); |
938 | 938 | ?> |
939 | 939 | <p><label |
940 | - for="<?php echo $this->get_field_id('gd_tw_desc1'); ?>"><?php _e('Your twitter code', 'geodirectory');?> |
|
940 | + for="<?php echo $this->get_field_id('gd_tw_desc1'); ?>"><?php _e('Your twitter code', 'geodirectory'); ?> |
|
941 | 941 | <textarea class="widefat" rows="6" cols="20" |
942 | 942 | id="<?php echo $this->get_field_id('gd_tw_desc1'); ?>" |
943 | 943 | name="<?php echo $this->get_field_name('gd_tw_desc1'); ?>"><?php echo esc_attr($desc1); ?></textarea></label> |
@@ -963,7 +963,7 @@ discard block |
||
963 | 963 | * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
964 | 964 | */ |
965 | 965 | public function __construct() { |
966 | - $widget_ops = array('classname' => 'geodir_advance_search_widget', 'description' => __('GD > Search', 'geodirectory'),'post_type'=>''); |
|
966 | + $widget_ops = array('classname' => 'geodir_advance_search_widget', 'description' => __('GD > Search', 'geodirectory'), 'post_type'=>''); |
|
967 | 967 | parent::__construct( |
968 | 968 | 'geodir_advance_search', // Base ID |
969 | 969 | __('GD > Search', 'geodirectory'), // Name |
@@ -990,15 +990,15 @@ discard block |
||
990 | 990 | * @param array $args The widget arguments. |
991 | 991 | * @param array $instance The widget instance. |
992 | 992 | */ |
993 | - $args = apply_filters('widget_geodir_advance_search_args',$args,$instance); |
|
993 | + $args = apply_filters('widget_geodir_advance_search_args', $args, $instance); |
|
994 | 994 | |
995 | 995 | // prints the widget |
996 | 996 | extract($args, EXTR_SKIP); |
997 | 997 | |
998 | - if(isset($post_type) && $post_type){ |
|
999 | - geodir_get_search_post_type($post_type);// set the post type |
|
1000 | - }else{ |
|
1001 | - geodir_get_search_post_type();// set the post type |
|
998 | + if (isset($post_type) && $post_type) { |
|
999 | + geodir_get_search_post_type($post_type); // set the post type |
|
1000 | + } else { |
|
1001 | + geodir_get_search_post_type(); // set the post type |
|
1002 | 1002 | } |
1003 | 1003 | |
1004 | 1004 | echo $before_widget; |
@@ -997,7 +997,7 @@ |
||
997 | 997 | |
998 | 998 | if(isset($post_type) && $post_type){ |
999 | 999 | geodir_get_search_post_type($post_type);// set the post type |
1000 | - }else{ |
|
1000 | + } else{ |
|
1001 | 1001 | geodir_get_search_post_type();// set the post type |
1002 | 1002 | } |
1003 | 1003 |
@@ -17,26 +17,26 @@ discard block |
||
17 | 17 | function gd_compat_php_genesis() |
18 | 18 | { |
19 | 19 | // REPLACE GENESIS BREADCRUMBS WITH GD BREADCRUMBS |
20 | - remove_action('geodir_detail_before_main_content', 'geodir_breadcrumb', 20); |
|
21 | - remove_action('geodir_listings_before_main_content', 'geodir_breadcrumb', 20); |
|
22 | - remove_action('geodir_author_before_main_content', 'geodir_breadcrumb', 20); |
|
23 | - remove_action('geodir_search_before_main_content', 'geodir_breadcrumb', 20); |
|
24 | - remove_action('geodir_home_before_main_content', 'geodir_breadcrumb', 20); |
|
25 | - remove_action('geodir_location_before_main_content', 'geodir_breadcrumb', 20); |
|
20 | + remove_action('geodir_detail_before_main_content', 'geodir_breadcrumb', 20); |
|
21 | + remove_action('geodir_listings_before_main_content', 'geodir_breadcrumb', 20); |
|
22 | + remove_action('geodir_author_before_main_content', 'geodir_breadcrumb', 20); |
|
23 | + remove_action('geodir_search_before_main_content', 'geodir_breadcrumb', 20); |
|
24 | + remove_action('geodir_home_before_main_content', 'geodir_breadcrumb', 20); |
|
25 | + remove_action('geodir_location_before_main_content', 'geodir_breadcrumb', 20); |
|
26 | 26 | |
27 | 27 | |
28 | - // make top section wide |
|
29 | - remove_action('geodir_home_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10); |
|
30 | - remove_action('geodir_location_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10); |
|
31 | - remove_action('geodir_author_before_main_content', 'geodir_action_geodir_sidebar_author_top', 10); |
|
32 | - remove_action('geodir_search_before_main_content', 'geodir_action_geodir_sidebar_search_top', 10); |
|
33 | - remove_action('geodir_detail_before_main_content', 'geodir_action_geodir_sidebar_detail_top', 10); |
|
34 | - remove_action('geodir_listings_before_main_content', 'geodir_action_geodir_sidebar_listings_top', 10); |
|
28 | + // make top section wide |
|
29 | + remove_action('geodir_home_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10); |
|
30 | + remove_action('geodir_location_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10); |
|
31 | + remove_action('geodir_author_before_main_content', 'geodir_action_geodir_sidebar_author_top', 10); |
|
32 | + remove_action('geodir_search_before_main_content', 'geodir_action_geodir_sidebar_search_top', 10); |
|
33 | + remove_action('geodir_detail_before_main_content', 'geodir_action_geodir_sidebar_detail_top', 10); |
|
34 | + remove_action('geodir_listings_before_main_content', 'geodir_action_geodir_sidebar_listings_top', 10); |
|
35 | 35 | |
36 | - // REMOVE PAGE TITLES |
|
37 | - remove_action('geodir_listings_page_title', 'geodir_action_listings_title', 10); |
|
38 | - remove_action('geodir_search_page_title', 'geodir_action_search_page_title', 10); |
|
39 | - remove_action('geodir_author_page_title', 'geodir_action_author_page_title', 10); |
|
36 | + // REMOVE PAGE TITLES |
|
37 | + remove_action('geodir_listings_page_title', 'geodir_action_listings_title', 10); |
|
38 | + remove_action('geodir_search_page_title', 'geodir_action_search_page_title', 10); |
|
39 | + remove_action('geodir_author_page_title', 'geodir_action_author_page_title', 10); |
|
40 | 40 | |
41 | 41 | |
42 | 42 | } |
@@ -53,25 +53,25 @@ discard block |
||
53 | 53 | function gd_genesis_compat_left_sidebars() |
54 | 54 | { |
55 | 55 | |
56 | - if (is_page_geodir_home()) { |
|
57 | - remove_action('geodir_home_sidebar_left', 'geodir_action_home_sidebar_left', 10); |
|
58 | - add_action('geodir_wrapper_close', 'geodir_action_home_sidebar_left', 11); |
|
59 | - } elseif (geodir_is_page('location')) { |
|
60 | - remove_action('geodir_location_sidebar_left', 'geodir_action_home_sidebar_left', 10); |
|
61 | - add_action('geodir_wrapper_close', 'geodir_action_home_sidebar_left', 11); |
|
62 | - } elseif (geodir_is_page('listing')) { |
|
63 | - remove_action('geodir_listings_sidebar_left', 'geodir_action_listings_sidebar_left', 10); |
|
64 | - add_action('geodir_wrapper_close', 'geodir_action_listings_sidebar_left', 11); |
|
65 | - } elseif (geodir_is_page('detail') && get_option('geodir_detail_sidebar_left_section')) { |
|
66 | - //remove_action( 'geodir_detail_sidebar', 'geodir_action_details_sidebar', 10 ); |
|
67 | - //add_action( 'geodir_wrapper_close', 'geodir_action_details_sidebar', 11 ); |
|
68 | - } elseif (geodir_is_page('search')) { |
|
69 | - remove_action('geodir_search_sidebar_left', 'geodir_action_search_sidebar_left', 10); |
|
70 | - add_action('geodir_wrapper_close', 'geodir_action_search_sidebar_left', 11); |
|
71 | - } elseif (geodir_is_page('author')) { |
|
72 | - remove_action('geodir_author_sidebar_left', 'geodir_action_author_sidebar_left', 10); |
|
73 | - add_action('geodir_wrapper_close', 'geodir_action_author_sidebar_left', 11); |
|
74 | - } |
|
56 | + if (is_page_geodir_home()) { |
|
57 | + remove_action('geodir_home_sidebar_left', 'geodir_action_home_sidebar_left', 10); |
|
58 | + add_action('geodir_wrapper_close', 'geodir_action_home_sidebar_left', 11); |
|
59 | + } elseif (geodir_is_page('location')) { |
|
60 | + remove_action('geodir_location_sidebar_left', 'geodir_action_home_sidebar_left', 10); |
|
61 | + add_action('geodir_wrapper_close', 'geodir_action_home_sidebar_left', 11); |
|
62 | + } elseif (geodir_is_page('listing')) { |
|
63 | + remove_action('geodir_listings_sidebar_left', 'geodir_action_listings_sidebar_left', 10); |
|
64 | + add_action('geodir_wrapper_close', 'geodir_action_listings_sidebar_left', 11); |
|
65 | + } elseif (geodir_is_page('detail') && get_option('geodir_detail_sidebar_left_section')) { |
|
66 | + //remove_action( 'geodir_detail_sidebar', 'geodir_action_details_sidebar', 10 ); |
|
67 | + //add_action( 'geodir_wrapper_close', 'geodir_action_details_sidebar', 11 ); |
|
68 | + } elseif (geodir_is_page('search')) { |
|
69 | + remove_action('geodir_search_sidebar_left', 'geodir_action_search_sidebar_left', 10); |
|
70 | + add_action('geodir_wrapper_close', 'geodir_action_search_sidebar_left', 11); |
|
71 | + } elseif (geodir_is_page('author')) { |
|
72 | + remove_action('geodir_author_sidebar_left', 'geodir_action_author_sidebar_left', 10); |
|
73 | + add_action('geodir_wrapper_close', 'geodir_action_author_sidebar_left', 11); |
|
74 | + } |
|
75 | 75 | |
76 | 76 | |
77 | 77 | } |
@@ -88,65 +88,65 @@ discard block |
||
88 | 88 | */ |
89 | 89 | function geodir_set_body_scs($classes) |
90 | 90 | { |
91 | - $remove_class = false; |
|
92 | - $new_class = ''; |
|
93 | - if (is_page_geodir_home() || geodir_is_page('location')) { |
|
94 | - $remove_class = true; |
|
95 | - if (get_option('geodir_show_home_left_section')) { |
|
96 | - $new_class .= 'sidebar-'; |
|
97 | - } |
|
98 | - if (get_option('geodir_show_home_contant_section')) { |
|
99 | - $new_class .= 'content'; |
|
100 | - } |
|
101 | - if (get_option('geodir_show_home_right_section')) { |
|
102 | - $new_class .= '-sidebar'; |
|
103 | - } |
|
104 | - } elseif (geodir_is_page('listing')) { |
|
105 | - $remove_class = true; |
|
106 | - if (get_option('geodir_show_listing_left_section')) { |
|
107 | - $new_class .= 'sidebar-'; |
|
108 | - } |
|
109 | - $new_class .= 'content'; |
|
110 | - if (get_option('geodir_show_listing_right_section')) { |
|
111 | - $new_class .= '-sidebar'; |
|
112 | - } |
|
113 | - } elseif (geodir_is_page('detail')) { |
|
114 | - $remove_class = true; |
|
115 | - if (get_option('geodir_detail_sidebar_left_section')) { |
|
116 | - $new_class .= 'sidebar-content gd-details-sidebar-left'; |
|
117 | - } else { |
|
118 | - $new_class .= 'content-sidebar'; |
|
119 | - } |
|
120 | - } elseif (geodir_is_page('search')) { |
|
121 | - $remove_class = true; |
|
122 | - if (get_option('geodir_show_search_left_section')) { |
|
123 | - $new_class .= 'sidebar-'; |
|
124 | - } |
|
125 | - $new_class .= 'content'; |
|
126 | - if (get_option('geodir_show_search_right_section')) { |
|
127 | - $new_class .= '-sidebar'; |
|
128 | - } |
|
129 | - } elseif (geodir_is_page('author')) { |
|
130 | - $remove_class = true; |
|
131 | - if (get_option('geodir_show_author_left_section')) { |
|
132 | - $new_class .= 'sidebar-'; |
|
133 | - } |
|
134 | - $new_class .= 'content'; |
|
135 | - if (get_option('geodir_show_author_right_section')) { |
|
136 | - $new_class .= '-sidebar'; |
|
137 | - } |
|
138 | - } elseif (geodir_is_page('add-listing')) { |
|
139 | - $remove_class = true; |
|
140 | - $new_class .= 'content-sidebar'; |
|
141 | - } |
|
142 | - |
|
143 | - if ($remove_class) { |
|
144 | - $classes = array_diff($classes, array('content-sidebar', 'sidebar-content', 'content-sidebar-sidebar', 'sidebar-sidebar-content', 'sidebar-content-sidebar', 'full-width-content')); |
|
145 | - //str_replace(array('content-sidebar','sidebar-content','content-sidebar-sidebar','sidebar-sidebar-content','sidebar-content-sidebar','full-width-content'),array('','','','','',''),$classes); |
|
146 | - $classes[] = $new_class; |
|
147 | - } |
|
148 | - |
|
149 | - return $classes; |
|
91 | + $remove_class = false; |
|
92 | + $new_class = ''; |
|
93 | + if (is_page_geodir_home() || geodir_is_page('location')) { |
|
94 | + $remove_class = true; |
|
95 | + if (get_option('geodir_show_home_left_section')) { |
|
96 | + $new_class .= 'sidebar-'; |
|
97 | + } |
|
98 | + if (get_option('geodir_show_home_contant_section')) { |
|
99 | + $new_class .= 'content'; |
|
100 | + } |
|
101 | + if (get_option('geodir_show_home_right_section')) { |
|
102 | + $new_class .= '-sidebar'; |
|
103 | + } |
|
104 | + } elseif (geodir_is_page('listing')) { |
|
105 | + $remove_class = true; |
|
106 | + if (get_option('geodir_show_listing_left_section')) { |
|
107 | + $new_class .= 'sidebar-'; |
|
108 | + } |
|
109 | + $new_class .= 'content'; |
|
110 | + if (get_option('geodir_show_listing_right_section')) { |
|
111 | + $new_class .= '-sidebar'; |
|
112 | + } |
|
113 | + } elseif (geodir_is_page('detail')) { |
|
114 | + $remove_class = true; |
|
115 | + if (get_option('geodir_detail_sidebar_left_section')) { |
|
116 | + $new_class .= 'sidebar-content gd-details-sidebar-left'; |
|
117 | + } else { |
|
118 | + $new_class .= 'content-sidebar'; |
|
119 | + } |
|
120 | + } elseif (geodir_is_page('search')) { |
|
121 | + $remove_class = true; |
|
122 | + if (get_option('geodir_show_search_left_section')) { |
|
123 | + $new_class .= 'sidebar-'; |
|
124 | + } |
|
125 | + $new_class .= 'content'; |
|
126 | + if (get_option('geodir_show_search_right_section')) { |
|
127 | + $new_class .= '-sidebar'; |
|
128 | + } |
|
129 | + } elseif (geodir_is_page('author')) { |
|
130 | + $remove_class = true; |
|
131 | + if (get_option('geodir_show_author_left_section')) { |
|
132 | + $new_class .= 'sidebar-'; |
|
133 | + } |
|
134 | + $new_class .= 'content'; |
|
135 | + if (get_option('geodir_show_author_right_section')) { |
|
136 | + $new_class .= '-sidebar'; |
|
137 | + } |
|
138 | + } elseif (geodir_is_page('add-listing')) { |
|
139 | + $remove_class = true; |
|
140 | + $new_class .= 'content-sidebar'; |
|
141 | + } |
|
142 | + |
|
143 | + if ($remove_class) { |
|
144 | + $classes = array_diff($classes, array('content-sidebar', 'sidebar-content', 'content-sidebar-sidebar', 'sidebar-sidebar-content', 'sidebar-content-sidebar', 'full-width-content')); |
|
145 | + //str_replace(array('content-sidebar','sidebar-content','content-sidebar-sidebar','sidebar-sidebar-content','sidebar-content-sidebar','full-width-content'),array('','','','','',''),$classes); |
|
146 | + $classes[] = $new_class; |
|
147 | + } |
|
148 | + |
|
149 | + return $classes; |
|
150 | 150 | |
151 | 151 | } |
152 | 152 | |
@@ -160,17 +160,17 @@ discard block |
||
160 | 160 | function gd_genesis_compat_add_top_section_back() |
161 | 161 | { |
162 | 162 | |
163 | - if (is_page_geodir_home() || geodir_is_page('location')) { |
|
164 | - geodir_action_geodir_sidebar_home_top(); |
|
165 | - } elseif (geodir_is_page('listing')) { |
|
166 | - geodir_action_geodir_sidebar_listings_top(); |
|
167 | - } elseif (geodir_is_page('detail')) { |
|
168 | - geodir_action_geodir_sidebar_detail_top(); |
|
169 | - } elseif (geodir_is_page('search')) { |
|
170 | - geodir_action_geodir_sidebar_search_top(); |
|
171 | - } elseif (geodir_is_page('author')) { |
|
172 | - geodir_action_geodir_sidebar_author_top(); |
|
173 | - } |
|
163 | + if (is_page_geodir_home() || geodir_is_page('location')) { |
|
164 | + geodir_action_geodir_sidebar_home_top(); |
|
165 | + } elseif (geodir_is_page('listing')) { |
|
166 | + geodir_action_geodir_sidebar_listings_top(); |
|
167 | + } elseif (geodir_is_page('detail')) { |
|
168 | + geodir_action_geodir_sidebar_detail_top(); |
|
169 | + } elseif (geodir_is_page('search')) { |
|
170 | + geodir_action_geodir_sidebar_search_top(); |
|
171 | + } elseif (geodir_is_page('author')) { |
|
172 | + geodir_action_geodir_sidebar_author_top(); |
|
173 | + } |
|
174 | 174 | |
175 | 175 | |
176 | 176 | } |
@@ -183,12 +183,12 @@ discard block |
||
183 | 183 | */ |
184 | 184 | function geodir_replace_breadcrumb() |
185 | 185 | { |
186 | - if (is_front_page() && geodir_is_page('home') && !geodir_is_page('login')) { |
|
187 | - } else { |
|
188 | - echo '<div class="geodir-breadcrumb-bar"><div class="wrap">'; |
|
189 | - geodir_breadcrumb(); |
|
190 | - echo '</div></div>'; |
|
191 | - } |
|
186 | + if (is_front_page() && geodir_is_page('home') && !geodir_is_page('login')) { |
|
187 | + } else { |
|
188 | + echo '<div class="geodir-breadcrumb-bar"><div class="wrap">'; |
|
189 | + geodir_breadcrumb(); |
|
190 | + echo '</div></div>'; |
|
191 | + } |
|
192 | 192 | } |
193 | 193 | |
194 | 194 | // Force Full Width on signup page |
@@ -201,9 +201,9 @@ discard block |
||
201 | 201 | */ |
202 | 202 | function geodir_genesis_meta() |
203 | 203 | { |
204 | - if (geodir_is_page('login')) { |
|
205 | - add_filter('genesis_pre_get_option_site_layout', '__genesis_return_full_width_content'); |
|
206 | - } |
|
204 | + if (geodir_is_page('login')) { |
|
205 | + add_filter('genesis_pre_get_option_site_layout', '__genesis_return_full_width_content'); |
|
206 | + } |
|
207 | 207 | } |
208 | 208 | |
209 | 209 | add_action('geodir_add_listing_page_title', 'geodir_add_listing_page_title_genesis_before', 8); |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | function geodir_add_listing_page_title_genesis_before() |
217 | 217 | { |
218 | 218 | |
219 | - echo "<div class='entry' >"; |
|
219 | + echo "<div class='entry' >"; |
|
220 | 220 | } |
221 | 221 | |
222 | 222 | |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | function geodir_add_listing_form_genesis_after() |
231 | 231 | { |
232 | 232 | |
233 | - echo "</div>"; |
|
233 | + echo "</div>"; |
|
234 | 234 | } |
235 | 235 | |
236 | 236 | |
@@ -249,38 +249,38 @@ discard block |
||
249 | 249 | { |
250 | 250 | |
251 | 251 | |
252 | - $title = ''; |
|
253 | - $subtitle = ''; |
|
254 | - |
|
255 | - if (geodir_is_page('listing')) { |
|
256 | - echo '<div class="wrap gd-title-wrap">'; |
|
257 | - geodir_action_listings_title(); |
|
258 | - echo '</div>'; |
|
259 | - } |
|
260 | - |
|
261 | - if (geodir_is_page('add-listing')) { |
|
262 | - echo '<div class="wrap gd-title-wrap">'; |
|
263 | - geodir_action_add_listing_page_title(); |
|
264 | - echo '</div>'; |
|
265 | - } |
|
266 | - |
|
267 | - if (geodir_is_page('author')) { |
|
268 | - echo '<div class="wrap gd-title-wrap">'; |
|
269 | - geodir_action_author_page_title(); |
|
270 | - echo '</div>'; |
|
271 | - } |
|
272 | - |
|
273 | - if (geodir_is_page('detail') || geodir_is_page('preview')) { |
|
274 | - echo '<div class="wrap gd-title-wrap">'; |
|
275 | - echo get_the_title(); |
|
276 | - echo '</div>'; |
|
277 | - } |
|
278 | - |
|
279 | - if (geodir_is_page('search')) { |
|
280 | - echo '<div class="wrap gd-title-wrap">'; |
|
281 | - geodir_action_search_page_title(); |
|
282 | - echo '</div>'; |
|
283 | - } |
|
252 | + $title = ''; |
|
253 | + $subtitle = ''; |
|
254 | + |
|
255 | + if (geodir_is_page('listing')) { |
|
256 | + echo '<div class="wrap gd-title-wrap">'; |
|
257 | + geodir_action_listings_title(); |
|
258 | + echo '</div>'; |
|
259 | + } |
|
260 | + |
|
261 | + if (geodir_is_page('add-listing')) { |
|
262 | + echo '<div class="wrap gd-title-wrap">'; |
|
263 | + geodir_action_add_listing_page_title(); |
|
264 | + echo '</div>'; |
|
265 | + } |
|
266 | + |
|
267 | + if (geodir_is_page('author')) { |
|
268 | + echo '<div class="wrap gd-title-wrap">'; |
|
269 | + geodir_action_author_page_title(); |
|
270 | + echo '</div>'; |
|
271 | + } |
|
272 | + |
|
273 | + if (geodir_is_page('detail') || geodir_is_page('preview')) { |
|
274 | + echo '<div class="wrap gd-title-wrap">'; |
|
275 | + echo get_the_title(); |
|
276 | + echo '</div>'; |
|
277 | + } |
|
278 | + |
|
279 | + if (geodir_is_page('search')) { |
|
280 | + echo '<div class="wrap gd-title-wrap">'; |
|
281 | + geodir_action_search_page_title(); |
|
282 | + echo '</div>'; |
|
283 | + } |
|
284 | 284 | } |
285 | 285 | |
286 | 286 | |
@@ -293,8 +293,8 @@ discard block |
||
293 | 293 | */ |
294 | 294 | function gd_genesis_listing_page_title_bar() |
295 | 295 | { |
296 | - geodir_action_listings_title(); |
|
297 | - //geodir_action_listings_description(); |
|
296 | + geodir_action_listings_title(); |
|
297 | + //geodir_action_listings_description(); |
|
298 | 298 | } |
299 | 299 | |
300 | 300 | |
@@ -307,19 +307,19 @@ discard block |
||
307 | 307 | */ |
308 | 308 | function gd_compat_php_genesis_geo_1280_fix() |
309 | 309 | { |
310 | - if (function_exists('geo1280_search_bar')) { |
|
311 | - remove_action('genesis_after_header', 'geo1280_search_bar', 20); |
|
312 | - add_action('genesis_after_header', 'geo1280_search_bar_fix', 4); |
|
310 | + if (function_exists('geo1280_search_bar')) { |
|
311 | + remove_action('genesis_after_header', 'geo1280_search_bar', 20); |
|
312 | + add_action('genesis_after_header', 'geo1280_search_bar_fix', 4); |
|
313 | 313 | |
314 | - // |
|
314 | + // |
|
315 | 315 | |
316 | - remove_action('genesis_after_header', 'geodir_replace_breadcrumb', 20); |
|
317 | - remove_action('genesis_before_content_sidebar_wrap', 'geodir_replace_breadcrumb', 20); |
|
318 | - add_action('geodir_wrapper_open', 'geodir_replace_breadcrumb', 105); |
|
316 | + remove_action('genesis_after_header', 'geodir_replace_breadcrumb', 20); |
|
317 | + remove_action('genesis_before_content_sidebar_wrap', 'geodir_replace_breadcrumb', 20); |
|
318 | + add_action('geodir_wrapper_open', 'geodir_replace_breadcrumb', 105); |
|
319 | 319 | |
320 | - remove_action('genesis_before_content_sidebar_wrap', 'geo1280_page_title', 10); |
|
321 | - add_action('geodir_wrapper_open', 'geo1280_page_title', 101); |
|
322 | - } |
|
320 | + remove_action('genesis_before_content_sidebar_wrap', 'geo1280_page_title', 10); |
|
321 | + add_action('geodir_wrapper_open', 'geo1280_page_title', 101); |
|
322 | + } |
|
323 | 323 | } |
324 | 324 | |
325 | 325 | /** |
@@ -331,11 +331,11 @@ discard block |
||
331 | 331 | function geo1280_search_bar_fix() |
332 | 332 | { |
333 | 333 | |
334 | - echo '<div class="geo1280-placeholder"></div>'; |
|
335 | - if (is_active_sidebar('search-bar')) { |
|
336 | - genesis_widget_area('search-bar', array( |
|
337 | - 'before' => '<div class="search-bar widget-area"><div class="wrap">', |
|
338 | - 'after' => '</div></div>', |
|
339 | - )); |
|
340 | - } |
|
334 | + echo '<div class="geo1280-placeholder"></div>'; |
|
335 | + if (is_active_sidebar('search-bar')) { |
|
336 | + genesis_widget_area('search-bar', array( |
|
337 | + 'before' => '<div class="search-bar widget-area"><div class="wrap">', |
|
338 | + 'after' => '</div></div>', |
|
339 | + )); |
|
340 | + } |
|
341 | 341 | } |
@@ -12,27 +12,27 @@ |
||
12 | 12 | <div class="clearfix"> |
13 | 13 | <div id="geodir_content"> |
14 | 14 | <?php |
15 | - /** This action is documented in geodirectory-templates/geodir-home.php */ |
|
16 | - do_action('geodir_add_page_content', 'before', 'info-page'); |
|
17 | - global $information; |
|
18 | - echo '<h5 class="geodir_information">'; |
|
19 | - echo $information; |
|
20 | - echo '</h5>'; |
|
21 | - /** This action is documented in geodirectory-templates/geodir-home.php */ |
|
22 | - do_action('geodir_add_page_content', 'after', 'info-page'); |
|
23 | - ?> |
|
15 | + /** This action is documented in geodirectory-templates/geodir-home.php */ |
|
16 | + do_action('geodir_add_page_content', 'before', 'info-page'); |
|
17 | + global $information; |
|
18 | + echo '<h5 class="geodir_information">'; |
|
19 | + echo $information; |
|
20 | + echo '</h5>'; |
|
21 | + /** This action is documented in geodirectory-templates/geodir-home.php */ |
|
22 | + do_action('geodir_add_page_content', 'after', 'info-page'); |
|
23 | + ?> |
|
24 | 24 | </div> |
25 | 25 | <!-- geodir_content ends here--> |
26 | 26 | <div id="gd-sidebar-wrapper"> |
27 | 27 | <div class="geodir-sidebar-main"> |
28 | 28 | <div class="geodir-gd-sidebar"> |
29 | 29 | <?php |
30 | - /** |
|
31 | - * Calls the author sidebar. |
|
32 | - * |
|
33 | - * @since 1.6.11 |
|
34 | - */ |
|
35 | - dynamic_sidebar('geodir_author_right_sidebar'); ?> |
|
30 | + /** |
|
31 | + * Calls the author sidebar. |
|
32 | + * |
|
33 | + * @since 1.6.11 |
|
34 | + */ |
|
35 | + dynamic_sidebar('geodir_author_right_sidebar'); ?> |
|
36 | 36 | </div> |
37 | 37 | </div> |
38 | 38 | </div> |
@@ -263,13 +263,14 @@ discard block |
||
263 | 263 | */ |
264 | 264 | function geodir_add_async_forscript($url) |
265 | 265 | { |
266 | - if (strpos($url, '#asyncload')===false) |
|
267 | - return $url; |
|
268 | - else if (is_admin()) |
|
269 | - return str_replace('#asyncload', '', $url); |
|
270 | - else |
|
271 | - return str_replace('#asyncload', '', $url)."' async='async"; |
|
272 | -} |
|
266 | + if (strpos($url, '#asyncload')===false) { |
|
267 | + return $url; |
|
268 | + } else if (is_admin()) { |
|
269 | + return str_replace('#asyncload', '', $url); |
|
270 | + } else { |
|
271 | + return str_replace('#asyncload', '', $url)."' async='async"; |
|
272 | + } |
|
273 | + } |
|
273 | 274 | add_filter('clean_url', 'geodir_add_async_forscript', 11, 1); |
274 | 275 | |
275 | 276 | /** |
@@ -336,8 +337,10 @@ discard block |
||
336 | 337 | |
337 | 338 | $half_pages_to_show = round($pages_to_show / 2); |
338 | 339 | |
339 | - if (geodir_is_page('home')) // dont apply default pagination for geodirectory home page. |
|
340 | - return; |
|
340 | + if (geodir_is_page('home')) { |
|
341 | + // dont apply default pagination for geodirectory home page. |
|
342 | + return; |
|
343 | + } |
|
341 | 344 | |
342 | 345 | if (!is_single()) { |
343 | 346 | if (function_exists('geodir_location_geo_home_link')) { |
@@ -457,11 +460,21 @@ discard block |
||
457 | 460 | } |
458 | 461 | $dist_dif = 1000; |
459 | 462 | |
460 | - if ($dist <= 5000) $dist_dif = 500; |
|
461 | - if ($dist <= 1000) $dist_dif = 100; |
|
462 | - if ($dist <= 500) $dist_dif = 50; |
|
463 | - if ($dist <= 100) $dist_dif = 10; |
|
464 | - if ($dist <= 50) $dist_dif = 5; |
|
463 | + if ($dist <= 5000) { |
|
464 | + $dist_dif = 500; |
|
465 | + } |
|
466 | + if ($dist <= 1000) { |
|
467 | + $dist_dif = 100; |
|
468 | + } |
|
469 | + if ($dist <= 500) { |
|
470 | + $dist_dif = 50; |
|
471 | + } |
|
472 | + if ($dist <= 100) { |
|
473 | + $dist_dif = 10; |
|
474 | + } |
|
475 | + if ($dist <= 50) { |
|
476 | + $dist_dif = 5; |
|
477 | + } |
|
465 | 478 | |
466 | 479 | ?> |
467 | 480 | <script type="text/javascript"> |
@@ -523,18 +536,23 @@ discard block |
||
523 | 536 | { |
524 | 537 | |
525 | 538 | $default_search_for_text = SEARCH_FOR_TEXT; |
526 | - if (get_option('geodir_search_field_default_text')) |
|
527 | - $default_search_for_text = __(get_option('geodir_search_field_default_text'), 'geodirectory'); |
|
539 | + if (get_option('geodir_search_field_default_text')) { |
|
540 | + $default_search_for_text = __(get_option('geodir_search_field_default_text'), 'geodirectory'); |
|
541 | + } |
|
528 | 542 | |
529 | 543 | $default_near_text = NEAR_TEXT; |
530 | - if (get_option('geodir_near_field_default_text')) |
|
531 | - $default_near_text = __(get_option('geodir_near_field_default_text'), 'geodirectory'); |
|
544 | + if (get_option('geodir_near_field_default_text')) { |
|
545 | + $default_near_text = __(get_option('geodir_near_field_default_text'), 'geodirectory'); |
|
546 | + } |
|
532 | 547 | |
533 | 548 | ?> |
534 | 549 | |
535 | 550 | |
536 | 551 | <script type="text/javascript"> |
537 | - var default_location = '<?php if($search_location = geodir_get_default_location()) echo $search_location->city ;?>'; |
|
552 | + var default_location = '<?php if($search_location = geodir_get_default_location()) { |
|
553 | + echo $search_location->city ; |
|
554 | +} |
|
555 | +?>'; |
|
538 | 556 | var latlng; |
539 | 557 | var address; |
540 | 558 | var dist = 0; |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | */ |
23 | 23 | function geodir_core_dequeue_script() |
24 | 24 | { |
25 | - wp_dequeue_script('flexslider'); |
|
25 | + wp_dequeue_script('flexslider'); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | add_action('wp_print_scripts', 'geodir_core_dequeue_script', 100); |
@@ -35,168 +35,168 @@ discard block |
||
35 | 35 | */ |
36 | 36 | function geodir_templates_scripts() |
37 | 37 | { |
38 | - $is_detail_page = false; |
|
39 | - $geodir_map_name = geodir_map_name(); |
|
38 | + $is_detail_page = false; |
|
39 | + $geodir_map_name = geodir_map_name(); |
|
40 | 40 | |
41 | - if((is_single() && geodir_is_geodir_page()) || (is_page() && geodir_is_page('preview') )) { |
|
42 | - $is_detail_page = true; |
|
43 | - } |
|
44 | - |
|
45 | - wp_enqueue_script('jquery'); |
|
46 | - |
|
47 | - wp_register_script('geodirectory-script', geodir_plugin_url() . '/geodirectory-assets/js/geodirectory.min.js#asyncload', array(), GEODIRECTORY_VERSION); |
|
48 | - wp_enqueue_script('geodirectory-script'); |
|
41 | + if((is_single() && geodir_is_geodir_page()) || (is_page() && geodir_is_page('preview') )) { |
|
42 | + $is_detail_page = true; |
|
43 | + } |
|
49 | 44 | |
50 | - $geodir_vars_data = array( |
|
51 | - 'siteurl' => get_option('siteurl'), |
|
52 | - 'geodir_plugin_url' => geodir_plugin_url(), |
|
53 | - 'geodir_lazy_load' => get_option('geodir_lazy_load',1), |
|
54 | - 'geodir_ajax_url' => geodir_get_ajax_url(), |
|
55 | - 'geodir_gd_modal' => (int)get_option('geodir_disable_gb_modal'), |
|
56 | - 'is_rtl' => is_rtl() ? 1 : 0 // fix rtl issue |
|
57 | - ); |
|
45 | + wp_enqueue_script('jquery'); |
|
46 | + |
|
47 | + wp_register_script('geodirectory-script', geodir_plugin_url() . '/geodirectory-assets/js/geodirectory.min.js#asyncload', array(), GEODIRECTORY_VERSION); |
|
48 | + wp_enqueue_script('geodirectory-script'); |
|
49 | + |
|
50 | + $geodir_vars_data = array( |
|
51 | + 'siteurl' => get_option('siteurl'), |
|
52 | + 'geodir_plugin_url' => geodir_plugin_url(), |
|
53 | + 'geodir_lazy_load' => get_option('geodir_lazy_load',1), |
|
54 | + 'geodir_ajax_url' => geodir_get_ajax_url(), |
|
55 | + 'geodir_gd_modal' => (int)get_option('geodir_disable_gb_modal'), |
|
56 | + 'is_rtl' => is_rtl() ? 1 : 0 // fix rtl issue |
|
57 | + ); |
|
58 | + |
|
59 | + /** |
|
60 | + * Filter the `geodir_var` data array that outputs the wp_localize_script() translations and variables. |
|
61 | + * |
|
62 | + * This is used by addons to add JS translatable variables. |
|
63 | + * |
|
64 | + * @since 1.4.4 |
|
65 | + * @param array $geodir_vars_data { |
|
66 | + * geodir var data used by addons to add JS translatable variables. |
|
67 | + * |
|
68 | + * @type string $siteurl Site url. |
|
69 | + * @type string $geodir_plugin_url Geodirectory core plugin url. |
|
70 | + * @type string $geodir_ajax_url Geodirectory plugin ajax url. |
|
71 | + * @type int $geodir_gd_modal Disable GD modal that displays slideshow images in popup?. |
|
72 | + * @type int $is_rtl Checks if current locale is RTL. |
|
73 | + * |
|
74 | + * } |
|
75 | + */ |
|
76 | + $geodir_vars_data = apply_filters('geodir_vars_data',$geodir_vars_data); |
|
77 | + |
|
78 | + wp_localize_script('geodirectory-script', 'geodir_var', $geodir_vars_data); |
|
79 | + |
|
80 | + wp_register_script('geodirectory-jquery-flexslider-js', geodir_plugin_url() . '/geodirectory-assets/js/jquery.flexslider.min.js', array(), GEODIRECTORY_VERSION,true); |
|
81 | + if($is_detail_page){wp_enqueue_script('geodirectory-jquery-flexslider-js');} |
|
82 | + |
|
83 | + wp_register_script('geodirectory-lightbox-jquery', geodir_plugin_url() . '/geodirectory-assets/js/jquery.lightbox-0.5.min.js', array(), GEODIRECTORY_VERSION,true); |
|
84 | + wp_enqueue_script('geodirectory-lightbox-jquery'); |
|
85 | + |
|
86 | + wp_register_script('geodirectory-jquery-simplemodal', geodir_plugin_url() . '/geodirectory-assets/js/jquery.simplemodal.min.js', array(), GEODIRECTORY_VERSION,true); |
|
87 | + if ($is_detail_page) { |
|
88 | + wp_enqueue_script('geodirectory-jquery-simplemodal'); |
|
89 | + } |
|
58 | 90 | |
59 | - /** |
|
60 | - * Filter the `geodir_var` data array that outputs the wp_localize_script() translations and variables. |
|
61 | - * |
|
62 | - * This is used by addons to add JS translatable variables. |
|
63 | - * |
|
64 | - * @since 1.4.4 |
|
65 | - * @param array $geodir_vars_data { |
|
66 | - * geodir var data used by addons to add JS translatable variables. |
|
67 | - * |
|
68 | - * @type string $siteurl Site url. |
|
69 | - * @type string $geodir_plugin_url Geodirectory core plugin url. |
|
70 | - * @type string $geodir_ajax_url Geodirectory plugin ajax url. |
|
71 | - * @type int $geodir_gd_modal Disable GD modal that displays slideshow images in popup?. |
|
72 | - * @type int $is_rtl Checks if current locale is RTL. |
|
73 | - * |
|
74 | - * } |
|
75 | - */ |
|
76 | - $geodir_vars_data = apply_filters('geodir_vars_data',$geodir_vars_data); |
|
77 | - |
|
78 | - wp_localize_script('geodirectory-script', 'geodir_var', $geodir_vars_data); |
|
79 | - |
|
80 | - wp_register_script('geodirectory-jquery-flexslider-js', geodir_plugin_url() . '/geodirectory-assets/js/jquery.flexslider.min.js', array(), GEODIRECTORY_VERSION,true); |
|
81 | - if($is_detail_page){wp_enqueue_script('geodirectory-jquery-flexslider-js');} |
|
82 | - |
|
83 | - wp_register_script('geodirectory-lightbox-jquery', geodir_plugin_url() . '/geodirectory-assets/js/jquery.lightbox-0.5.min.js', array(), GEODIRECTORY_VERSION,true); |
|
84 | - wp_enqueue_script('geodirectory-lightbox-jquery'); |
|
85 | - |
|
86 | - wp_register_script('geodirectory-jquery-simplemodal', geodir_plugin_url() . '/geodirectory-assets/js/jquery.simplemodal.min.js', array(), GEODIRECTORY_VERSION,true); |
|
87 | - if ($is_detail_page) { |
|
88 | - wp_enqueue_script('geodirectory-jquery-simplemodal'); |
|
89 | - } |
|
90 | - |
|
91 | - if (in_array($geodir_map_name, array('auto', 'google'))) { |
|
92 | - $map_lang = "&language=" . geodir_get_map_default_language(); |
|
93 | - $map_key = "&key=" . geodir_get_map_api_key(); |
|
94 | - /** |
|
95 | - * Filter the variables that are added to the end of the google maps script call. |
|
96 | - * |
|
97 | - * This i used to change things like google maps language etc. |
|
98 | - * |
|
99 | - * @since 1.0.0 |
|
100 | - * @param string $var The string to filter, default is empty string. |
|
101 | - */ |
|
102 | - $map_extra = apply_filters('geodir_googlemap_script_extra', ''); |
|
103 | - wp_enqueue_script('geodirectory-googlemap-script', 'https://maps.google.com/maps/api/js?' . $map_lang . $map_key . $map_extra , '', NULL); |
|
104 | - } |
|
91 | + if (in_array($geodir_map_name, array('auto', 'google'))) { |
|
92 | + $map_lang = "&language=" . geodir_get_map_default_language(); |
|
93 | + $map_key = "&key=" . geodir_get_map_api_key(); |
|
94 | + /** |
|
95 | + * Filter the variables that are added to the end of the google maps script call. |
|
96 | + * |
|
97 | + * This i used to change things like google maps language etc. |
|
98 | + * |
|
99 | + * @since 1.0.0 |
|
100 | + * @param string $var The string to filter, default is empty string. |
|
101 | + */ |
|
102 | + $map_extra = apply_filters('geodir_googlemap_script_extra', ''); |
|
103 | + wp_enqueue_script('geodirectory-googlemap-script', 'https://maps.google.com/maps/api/js?' . $map_lang . $map_key . $map_extra , '', NULL); |
|
104 | + } |
|
105 | 105 | |
106 | - if ($geodir_map_name == 'osm') { |
|
107 | - // Leaflet OpenStreetMap |
|
108 | - wp_register_style('geodirectory-leaflet-style', geodir_plugin_url() . '/geodirectory-assets/leaflet/leaflet.css', array(), GEODIRECTORY_VERSION); |
|
109 | - wp_enqueue_style('geodirectory-leaflet-style'); |
|
106 | + if ($geodir_map_name == 'osm') { |
|
107 | + // Leaflet OpenStreetMap |
|
108 | + wp_register_style('geodirectory-leaflet-style', geodir_plugin_url() . '/geodirectory-assets/leaflet/leaflet.css', array(), GEODIRECTORY_VERSION); |
|
109 | + wp_enqueue_style('geodirectory-leaflet-style'); |
|
110 | 110 | |
111 | - wp_register_script('geodirectory-leaflet-script', geodir_plugin_url() . '/geodirectory-assets/leaflet/leaflet.min.js', array(), GEODIRECTORY_VERSION); |
|
112 | - wp_enqueue_script('geodirectory-leaflet-script'); |
|
111 | + wp_register_script('geodirectory-leaflet-script', geodir_plugin_url() . '/geodirectory-assets/leaflet/leaflet.min.js', array(), GEODIRECTORY_VERSION); |
|
112 | + wp_enqueue_script('geodirectory-leaflet-script'); |
|
113 | 113 | |
114 | - wp_register_script('geodirectory-leaflet-geo-script', geodir_plugin_url() . '/geodirectory-assets/leaflet/osm.geocode.js', array(), GEODIRECTORY_VERSION); |
|
115 | - wp_enqueue_script('geodirectory-leaflet-geo-script'); |
|
114 | + wp_register_script('geodirectory-leaflet-geo-script', geodir_plugin_url() . '/geodirectory-assets/leaflet/osm.geocode.js', array(), GEODIRECTORY_VERSION); |
|
115 | + wp_enqueue_script('geodirectory-leaflet-geo-script'); |
|
116 | 116 | |
117 | - if ($is_detail_page) { |
|
118 | - wp_register_style('geodirectory-leaflet-routing-style', geodir_plugin_url() . '/geodirectory-assets/leaflet/routing/leaflet-routing-machine.css', array(), GEODIRECTORY_VERSION); |
|
119 | - wp_enqueue_style('geodirectory-leaflet-routing-style'); |
|
117 | + if ($is_detail_page) { |
|
118 | + wp_register_style('geodirectory-leaflet-routing-style', geodir_plugin_url() . '/geodirectory-assets/leaflet/routing/leaflet-routing-machine.css', array(), GEODIRECTORY_VERSION); |
|
119 | + wp_enqueue_style('geodirectory-leaflet-routing-style'); |
|
120 | 120 | |
121 | - wp_register_script('geodirectory-leaflet-routing-script', geodir_plugin_url() . '/geodirectory-assets/leaflet/routing/leaflet-routing-machine.js', array(), GEODIRECTORY_VERSION); |
|
122 | - wp_enqueue_script('geodirectory-leaflet-routing-script'); |
|
123 | - } |
|
124 | - } |
|
125 | - wp_enqueue_script( 'jquery-ui-autocomplete' ); |
|
121 | + wp_register_script('geodirectory-leaflet-routing-script', geodir_plugin_url() . '/geodirectory-assets/leaflet/routing/leaflet-routing-machine.js', array(), GEODIRECTORY_VERSION); |
|
122 | + wp_enqueue_script('geodirectory-leaflet-routing-script'); |
|
123 | + } |
|
124 | + } |
|
125 | + wp_enqueue_script( 'jquery-ui-autocomplete' ); |
|
126 | 126 | |
127 | - wp_register_script('geodirectory-goMap-script', geodir_plugin_url() . '/geodirectory-assets/js/goMap.min.js', array(), GEODIRECTORY_VERSION,true); |
|
128 | - wp_enqueue_script('geodirectory-goMap-script'); |
|
129 | - |
|
130 | - |
|
131 | - wp_register_script('chosen', geodir_plugin_url() . '/geodirectory-assets/js/chosen.jquery.min.js', array(), GEODIRECTORY_VERSION); |
|
132 | - wp_enqueue_script('chosen'); |
|
133 | - |
|
134 | - wp_register_script('geodirectory-choose-ajax', geodir_plugin_url() . '/geodirectory-assets/js/ajax-chosen.min.js', array(), GEODIRECTORY_VERSION); |
|
135 | - wp_enqueue_script('geodirectory-choose-ajax'); |
|
136 | - |
|
137 | - wp_enqueue_script('geodirectory-jquery-ui-timepicker-js', geodir_plugin_url() . '/geodirectory-assets/js/jquery.ui.timepicker.min.js', array('jquery-ui-datepicker', 'jquery-ui-slider', 'jquery-effects-core', 'jquery-effects-slide'), '', true); |
|
138 | - |
|
139 | - if (is_page() && geodir_is_page('add-listing')) { |
|
140 | - // SCRIPT FOR UPLOAD |
|
141 | - wp_enqueue_script('plupload-all'); |
|
142 | - wp_enqueue_script('jquery-ui-sortable'); |
|
143 | - |
|
144 | - wp_register_script('geodirectory-plupload-script', geodir_plugin_url() . '/geodirectory-assets/js/geodirectory-plupload.min.js#asyncload', array(), GEODIRECTORY_VERSION,true); |
|
145 | - wp_enqueue_script('geodirectory-plupload-script'); |
|
146 | - // SCRIPT FOR UPLOAD END |
|
147 | - |
|
148 | - // check_ajax_referer function is used to make sure no files are uplaoded remotly but it will fail if used between https and non https so we do the check below of the urls |
|
149 | - if (str_replace("https", "http", admin_url('admin-ajax.php')) && !empty($_SERVER['HTTPS'])) { |
|
150 | - $ajax_url = admin_url('admin-ajax.php'); |
|
151 | - } elseif (!str_replace("https", "http", admin_url('admin-ajax.php')) && empty($_SERVER['HTTPS'])) { |
|
152 | - $ajax_url = admin_url('admin-ajax.php'); |
|
153 | - } elseif (str_replace("https", "http", admin_url('admin-ajax.php')) && empty($_SERVER['HTTPS'])) { |
|
154 | - $ajax_url = str_replace("https", "http", admin_url('admin-ajax.php')); |
|
155 | - } elseif (!str_replace("https", "http", admin_url('admin-ajax.php')) && !empty($_SERVER['HTTPS'])) { |
|
156 | - $ajax_url = str_replace("http", "https", admin_url('admin-ajax.php')); |
|
157 | - } else { |
|
158 | - $ajax_url = admin_url('admin-ajax.php'); |
|
159 | - } |
|
127 | + wp_register_script('geodirectory-goMap-script', geodir_plugin_url() . '/geodirectory-assets/js/goMap.min.js', array(), GEODIRECTORY_VERSION,true); |
|
128 | + wp_enqueue_script('geodirectory-goMap-script'); |
|
129 | + |
|
130 | + |
|
131 | + wp_register_script('chosen', geodir_plugin_url() . '/geodirectory-assets/js/chosen.jquery.min.js', array(), GEODIRECTORY_VERSION); |
|
132 | + wp_enqueue_script('chosen'); |
|
133 | + |
|
134 | + wp_register_script('geodirectory-choose-ajax', geodir_plugin_url() . '/geodirectory-assets/js/ajax-chosen.min.js', array(), GEODIRECTORY_VERSION); |
|
135 | + wp_enqueue_script('geodirectory-choose-ajax'); |
|
136 | + |
|
137 | + wp_enqueue_script('geodirectory-jquery-ui-timepicker-js', geodir_plugin_url() . '/geodirectory-assets/js/jquery.ui.timepicker.min.js', array('jquery-ui-datepicker', 'jquery-ui-slider', 'jquery-effects-core', 'jquery-effects-slide'), '', true); |
|
138 | + |
|
139 | + if (is_page() && geodir_is_page('add-listing')) { |
|
140 | + // SCRIPT FOR UPLOAD |
|
141 | + wp_enqueue_script('plupload-all'); |
|
142 | + wp_enqueue_script('jquery-ui-sortable'); |
|
143 | + |
|
144 | + wp_register_script('geodirectory-plupload-script', geodir_plugin_url() . '/geodirectory-assets/js/geodirectory-plupload.min.js#asyncload', array(), GEODIRECTORY_VERSION,true); |
|
145 | + wp_enqueue_script('geodirectory-plupload-script'); |
|
146 | + // SCRIPT FOR UPLOAD END |
|
147 | + |
|
148 | + // check_ajax_referer function is used to make sure no files are uplaoded remotly but it will fail if used between https and non https so we do the check below of the urls |
|
149 | + if (str_replace("https", "http", admin_url('admin-ajax.php')) && !empty($_SERVER['HTTPS'])) { |
|
150 | + $ajax_url = admin_url('admin-ajax.php'); |
|
151 | + } elseif (!str_replace("https", "http", admin_url('admin-ajax.php')) && empty($_SERVER['HTTPS'])) { |
|
152 | + $ajax_url = admin_url('admin-ajax.php'); |
|
153 | + } elseif (str_replace("https", "http", admin_url('admin-ajax.php')) && empty($_SERVER['HTTPS'])) { |
|
154 | + $ajax_url = str_replace("https", "http", admin_url('admin-ajax.php')); |
|
155 | + } elseif (!str_replace("https", "http", admin_url('admin-ajax.php')) && !empty($_SERVER['HTTPS'])) { |
|
156 | + $ajax_url = str_replace("http", "https", admin_url('admin-ajax.php')); |
|
157 | + } else { |
|
158 | + $ajax_url = admin_url('admin-ajax.php'); |
|
159 | + } |
|
160 | 160 | |
161 | - // place js config array for plupload |
|
162 | - $plupload_init = array( |
|
163 | - 'runtimes' => 'html5,silverlight,flash,browserplus,gears,html4', |
|
164 | - 'browse_button' => 'plupload-browse-button', // will be adjusted per uploader |
|
165 | - 'container' => 'plupload-upload-ui', // will be adjusted per uploader |
|
166 | - 'drop_element' => 'dropbox', // will be adjusted per uploader |
|
167 | - 'file_data_name' => 'async-upload', // will be adjusted per uploader |
|
168 | - 'multiple_queues' => true, |
|
169 | - 'max_file_size' => geodir_max_upload_size(), |
|
170 | - 'url' => $ajax_url, |
|
171 | - 'flash_swf_url' => includes_url('js/plupload/plupload.flash.swf'), |
|
172 | - 'silverlight_xap_url' => includes_url('js/plupload/plupload.silverlight.xap'), |
|
173 | - 'filters' => array(array('title' => __('Allowed Files', 'geodirectory'), 'extensions' => '*')), |
|
174 | - 'multipart' => true, |
|
175 | - 'urlstream_upload' => true, |
|
176 | - 'multi_selection' => false, // will be added per uploader |
|
177 | - // additional post data to send to our ajax hook |
|
178 | - 'multipart_params' => array( |
|
179 | - '_ajax_nonce' => "", // will be added per uploader |
|
180 | - 'action' => 'plupload_action', // the ajax action name |
|
181 | - 'imgid' => 0 // will be added per uploader |
|
182 | - ) |
|
183 | - ); |
|
184 | - $base_plupload_config = json_encode($plupload_init); |
|
185 | - |
|
186 | - $gd_plupload_init = array('base_plupload_config' => $base_plupload_config, |
|
187 | - 'upload_img_size' => geodir_max_upload_size()); |
|
188 | - |
|
189 | - wp_localize_script('geodirectory-plupload-script', 'gd_plupload', $gd_plupload_init); |
|
190 | - |
|
191 | - wp_enqueue_script('geodirectory-listing-validation-script', geodir_plugin_url() . '/geodirectory-assets/js/listing_validation.min.js#asyncload'); |
|
192 | - } // End if for add place page |
|
193 | - |
|
194 | - wp_register_script('geodirectory-post-custom-js', geodir_plugin_url() . '/geodirectory-assets/js/post.custom.min.js#asyncload', array(), GEODIRECTORY_VERSION, true); |
|
195 | - if ($is_detail_page) { |
|
161 | + // place js config array for plupload |
|
162 | + $plupload_init = array( |
|
163 | + 'runtimes' => 'html5,silverlight,flash,browserplus,gears,html4', |
|
164 | + 'browse_button' => 'plupload-browse-button', // will be adjusted per uploader |
|
165 | + 'container' => 'plupload-upload-ui', // will be adjusted per uploader |
|
166 | + 'drop_element' => 'dropbox', // will be adjusted per uploader |
|
167 | + 'file_data_name' => 'async-upload', // will be adjusted per uploader |
|
168 | + 'multiple_queues' => true, |
|
169 | + 'max_file_size' => geodir_max_upload_size(), |
|
170 | + 'url' => $ajax_url, |
|
171 | + 'flash_swf_url' => includes_url('js/plupload/plupload.flash.swf'), |
|
172 | + 'silverlight_xap_url' => includes_url('js/plupload/plupload.silverlight.xap'), |
|
173 | + 'filters' => array(array('title' => __('Allowed Files', 'geodirectory'), 'extensions' => '*')), |
|
174 | + 'multipart' => true, |
|
175 | + 'urlstream_upload' => true, |
|
176 | + 'multi_selection' => false, // will be added per uploader |
|
177 | + // additional post data to send to our ajax hook |
|
178 | + 'multipart_params' => array( |
|
179 | + '_ajax_nonce' => "", // will be added per uploader |
|
180 | + 'action' => 'plupload_action', // the ajax action name |
|
181 | + 'imgid' => 0 // will be added per uploader |
|
182 | + ) |
|
183 | + ); |
|
184 | + $base_plupload_config = json_encode($plupload_init); |
|
185 | + |
|
186 | + $gd_plupload_init = array('base_plupload_config' => $base_plupload_config, |
|
187 | + 'upload_img_size' => geodir_max_upload_size()); |
|
188 | + |
|
189 | + wp_localize_script('geodirectory-plupload-script', 'gd_plupload', $gd_plupload_init); |
|
190 | + |
|
191 | + wp_enqueue_script('geodirectory-listing-validation-script', geodir_plugin_url() . '/geodirectory-assets/js/listing_validation.min.js#asyncload'); |
|
192 | + } // End if for add place page |
|
193 | + |
|
194 | + wp_register_script('geodirectory-post-custom-js', geodir_plugin_url() . '/geodirectory-assets/js/post.custom.min.js#asyncload', array(), GEODIRECTORY_VERSION, true); |
|
195 | + if ($is_detail_page) { |
|
196 | 196 | wp_enqueue_script('geodirectory-post-custom-js'); |
197 | 197 | } |
198 | 198 | |
199 | - // font awesome rating script |
|
199 | + // font awesome rating script |
|
200 | 200 | if (get_option('geodir_reviewrating_enable_font_awesome')) { |
201 | 201 | wp_register_script('geodir-barrating-js', geodir_plugin_url() . '/geodirectory-assets/js/jquery.barrating.min.js', array(), GEODIRECTORY_VERSION, true); |
202 | 202 | wp_enqueue_script('geodir-barrating-js'); |
@@ -205,11 +205,11 @@ discard block |
||
205 | 205 | wp_enqueue_script('geodir-jRating-js'); |
206 | 206 | } |
207 | 207 | |
208 | - wp_register_script('geodir-on-document-load', geodir_plugin_url() . '/geodirectory-assets/js/on_document_load.min.js#asyncload', array(), GEODIRECTORY_VERSION, true); |
|
209 | - wp_enqueue_script('geodir-on-document-load'); |
|
208 | + wp_register_script('geodir-on-document-load', geodir_plugin_url() . '/geodirectory-assets/js/on_document_load.min.js#asyncload', array(), GEODIRECTORY_VERSION, true); |
|
209 | + wp_enqueue_script('geodir-on-document-load'); |
|
210 | 210 | |
211 | - wp_register_script('google-geometa', geodir_plugin_url() . '/geodirectory-assets/js/geometa.min.js#asyncload', array(), GEODIRECTORY_VERSION, true); |
|
212 | - wp_enqueue_script('google-geometa'); |
|
211 | + wp_register_script('google-geometa', geodir_plugin_url() . '/geodirectory-assets/js/geometa.min.js#asyncload', array(), GEODIRECTORY_VERSION, true); |
|
212 | + wp_enqueue_script('google-geometa'); |
|
213 | 213 | } |
214 | 214 | |
215 | 215 | /** |
@@ -223,8 +223,8 @@ discard block |
||
223 | 223 | */ |
224 | 224 | function geodir_header_scripts() |
225 | 225 | { |
226 | - echo '<style>' . stripslashes(get_option('geodir_coustem_css')) . '</style>'; |
|
227 | - echo stripslashes(get_option('geodir_header_scripts')); |
|
226 | + echo '<style>' . stripslashes(get_option('geodir_coustem_css')) . '</style>'; |
|
227 | + echo stripslashes(get_option('geodir_header_scripts')); |
|
228 | 228 | } |
229 | 229 | |
230 | 230 | |
@@ -240,16 +240,16 @@ discard block |
||
240 | 240 | function geodir_footer_scripts() |
241 | 241 | { |
242 | 242 | echo stripslashes(get_option('geodir_ga_tracking_code')); |
243 | - echo stripslashes(get_option('geodir_footer_scripts')); |
|
243 | + echo stripslashes(get_option('geodir_footer_scripts')); |
|
244 | 244 | |
245 | - /* |
|
245 | + /* |
|
246 | 246 | * Apple suck and can't/won't fix bugs: https://bugs.webkit.org/show_bug.cgi?id=136041 |
247 | 247 | * |
248 | 248 | * Flexbox wont wrap on ios for search form items |
249 | 249 | */ |
250 | - if (preg_match( '/iPad|iPod|iPhone|Safari/', $_SERVER['HTTP_USER_AGENT'] ) ) { |
|
251 | - echo "<style>body .geodir-listing-search.gd-search-bar-style .geodir-loc-bar .clearfix.geodir-loc-bar-in .geodir-search .gd-search-input-wrapper{flex:50 1 auto !important;min-width: initial !important;width:auto !important;}.geodir-filter-container .geodir-filter-cat{width:auto !important;}</style>"; |
|
252 | - } |
|
250 | + if (preg_match( '/iPad|iPod|iPhone|Safari/', $_SERVER['HTTP_USER_AGENT'] ) ) { |
|
251 | + echo "<style>body .geodir-listing-search.gd-search-bar-style .geodir-loc-bar .clearfix.geodir-loc-bar-in .geodir-search .gd-search-input-wrapper{flex:50 1 auto !important;min-width: initial !important;width:auto !important;}.geodir-filter-container .geodir-filter-cat{width:auto !important;}</style>"; |
|
252 | + } |
|
253 | 253 | } |
254 | 254 | |
255 | 255 | |
@@ -263,12 +263,12 @@ discard block |
||
263 | 263 | */ |
264 | 264 | function geodir_add_async_forscript($url) |
265 | 265 | { |
266 | - if (strpos($url, '#asyncload')===false) |
|
267 | - return $url; |
|
268 | - else if (is_admin()) |
|
269 | - return str_replace('#asyncload', '', $url); |
|
270 | - else |
|
271 | - return str_replace('#asyncload', '', $url)."' async='async"; |
|
266 | + if (strpos($url, '#asyncload')===false) |
|
267 | + return $url; |
|
268 | + else if (is_admin()) |
|
269 | + return str_replace('#asyncload', '', $url); |
|
270 | + else |
|
271 | + return str_replace('#asyncload', '', $url)."' async='async"; |
|
272 | 272 | } |
273 | 273 | add_filter('clean_url', 'geodir_add_async_forscript', 11, 1); |
274 | 274 | |
@@ -281,17 +281,17 @@ discard block |
||
281 | 281 | function geodir_templates_styles() |
282 | 282 | { |
283 | 283 | |
284 | - wp_register_style('geodir-core-scss', geodir_plugin_url() . '/geodirectory-assets/css/gd_core_frontend.css', array(), GEODIRECTORY_VERSION); |
|
285 | - wp_enqueue_style('geodir-core-scss'); |
|
286 | - wp_register_style('geodir-core-scss-footer', geodir_plugin_url() . '/geodirectory-assets/css/gd_core_frontend_footer.css', array(), GEODIRECTORY_VERSION); |
|
284 | + wp_register_style('geodir-core-scss', geodir_plugin_url() . '/geodirectory-assets/css/gd_core_frontend.css', array(), GEODIRECTORY_VERSION); |
|
285 | + wp_enqueue_style('geodir-core-scss'); |
|
286 | + wp_register_style('geodir-core-scss-footer', geodir_plugin_url() . '/geodirectory-assets/css/gd_core_frontend_footer.css', array(), GEODIRECTORY_VERSION); |
|
287 | 287 | |
288 | - if(is_rtl()){ |
|
289 | - wp_register_style('geodirectory-frontend-rtl-style', geodir_plugin_url() . '/geodirectory-assets/css/rtl-frontend.css', array(), GEODIRECTORY_VERSION); |
|
290 | - wp_enqueue_style('geodirectory-frontend-rtl-style'); |
|
291 | - } |
|
288 | + if(is_rtl()){ |
|
289 | + wp_register_style('geodirectory-frontend-rtl-style', geodir_plugin_url() . '/geodirectory-assets/css/rtl-frontend.css', array(), GEODIRECTORY_VERSION); |
|
290 | + wp_enqueue_style('geodirectory-frontend-rtl-style'); |
|
291 | + } |
|
292 | 292 | |
293 | - wp_register_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css', array(), GEODIRECTORY_VERSION); |
|
294 | - wp_enqueue_style('font-awesome'); |
|
293 | + wp_register_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css', array(), GEODIRECTORY_VERSION); |
|
294 | + wp_enqueue_style('font-awesome'); |
|
295 | 295 | |
296 | 296 | |
297 | 297 | } |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | */ |
306 | 306 | function geodir_get_sidebar() |
307 | 307 | { |
308 | - get_sidebar('geodirectory'); |
|
308 | + get_sidebar('geodirectory'); |
|
309 | 309 | } |
310 | 310 | |
311 | 311 | /** |
@@ -324,122 +324,122 @@ discard block |
||
324 | 324 | * @param bool $always_show Do you want to show the pagination always? Default: false. |
325 | 325 | */ |
326 | 326 | function geodir_pagination($before = '', $after = '', $prelabel = '', $nxtlabel = '', $pages_to_show = 5, $always_show = false) { |
327 | - global $wp_query, $posts_per_page, $wpdb, $paged, $blog_id; |
|
327 | + global $wp_query, $posts_per_page, $wpdb, $paged, $blog_id; |
|
328 | 328 | |
329 | - if (empty($prelabel)) { |
|
330 | - $prelabel = '<strong>«</strong>'; |
|
331 | - } |
|
329 | + if (empty($prelabel)) { |
|
330 | + $prelabel = '<strong>«</strong>'; |
|
331 | + } |
|
332 | 332 | |
333 | - if (empty($nxtlabel)) { |
|
334 | - $nxtlabel = '<strong>»</strong>'; |
|
335 | - } |
|
333 | + if (empty($nxtlabel)) { |
|
334 | + $nxtlabel = '<strong>»</strong>'; |
|
335 | + } |
|
336 | 336 | |
337 | - $half_pages_to_show = round($pages_to_show / 2); |
|
337 | + $half_pages_to_show = round($pages_to_show / 2); |
|
338 | 338 | |
339 | - if (geodir_is_page('home')) // dont apply default pagination for geodirectory home page. |
|
340 | - return; |
|
339 | + if (geodir_is_page('home')) // dont apply default pagination for geodirectory home page. |
|
340 | + return; |
|
341 | 341 | |
342 | - if (!is_single()) { |
|
343 | - if (function_exists('geodir_location_geo_home_link')) { |
|
344 | - remove_filter('home_url', 'geodir_location_geo_home_link', 100000); |
|
345 | - } |
|
346 | - $numposts = $wp_query->found_posts; |
|
342 | + if (!is_single()) { |
|
343 | + if (function_exists('geodir_location_geo_home_link')) { |
|
344 | + remove_filter('home_url', 'geodir_location_geo_home_link', 100000); |
|
345 | + } |
|
346 | + $numposts = $wp_query->found_posts; |
|
347 | 347 | |
348 | - $max_page = ceil($numposts / $posts_per_page); |
|
348 | + $max_page = ceil($numposts / $posts_per_page); |
|
349 | 349 | |
350 | - if (empty($paged)) { |
|
351 | - $paged = 1; |
|
352 | - } |
|
350 | + if (empty($paged)) { |
|
351 | + $paged = 1; |
|
352 | + } |
|
353 | 353 | |
354 | - $post_type = geodir_get_current_posttype(); |
|
355 | - $listing_type_name = get_post_type_plural_label($post_type); |
|
356 | - if (geodir_is_page('listing') || geodir_is_page('search')) { |
|
357 | - $term = array(); |
|
354 | + $post_type = geodir_get_current_posttype(); |
|
355 | + $listing_type_name = get_post_type_plural_label($post_type); |
|
356 | + if (geodir_is_page('listing') || geodir_is_page('search')) { |
|
357 | + $term = array(); |
|
358 | 358 | |
359 | - if (is_tax()) { |
|
360 | - $term_id = get_queried_object_id(); |
|
361 | - $taxonomy = get_query_var('taxonomy'); |
|
359 | + if (is_tax()) { |
|
360 | + $term_id = get_queried_object_id(); |
|
361 | + $taxonomy = get_query_var('taxonomy'); |
|
362 | 362 | |
363 | - if ($term_id && $post_type && get_query_var('taxonomy') == $post_type . 'category' ) { |
|
364 | - $term = get_term($term_id, $post_type . 'category'); |
|
365 | - } |
|
366 | - } |
|
363 | + if ($term_id && $post_type && get_query_var('taxonomy') == $post_type . 'category' ) { |
|
364 | + $term = get_term($term_id, $post_type . 'category'); |
|
365 | + } |
|
366 | + } |
|
367 | 367 | |
368 | - if (geodir_is_page('search') && !empty($_REQUEST['s' . $post_type . 'category'])) { |
|
369 | - $taxonomy_search = $_REQUEST['s' . $post_type . 'category']; |
|
368 | + if (geodir_is_page('search') && !empty($_REQUEST['s' . $post_type . 'category'])) { |
|
369 | + $taxonomy_search = $_REQUEST['s' . $post_type . 'category']; |
|
370 | 370 | |
371 | - if (!is_array($taxonomy_search)) { |
|
372 | - $term = get_term((int)$taxonomy_search, $post_type . 'category'); |
|
373 | - } else if(is_array($taxonomy_search) && count($taxonomy_search) == 1) { // single category search |
|
374 | - $term = get_term((int)$taxonomy_search[0], $post_type . 'category'); |
|
375 | - } |
|
376 | - } |
|
371 | + if (!is_array($taxonomy_search)) { |
|
372 | + $term = get_term((int)$taxonomy_search, $post_type . 'category'); |
|
373 | + } else if(is_array($taxonomy_search) && count($taxonomy_search) == 1) { // single category search |
|
374 | + $term = get_term((int)$taxonomy_search[0], $post_type . 'category'); |
|
375 | + } |
|
376 | + } |
|
377 | 377 | |
378 | - if (!empty($term) && !is_wp_error($term)) { |
|
379 | - $listing_type_name = $term->name; |
|
380 | - } |
|
381 | - } |
|
378 | + if (!empty($term) && !is_wp_error($term)) { |
|
379 | + $listing_type_name = $term->name; |
|
380 | + } |
|
381 | + } |
|
382 | 382 | |
383 | - if ($max_page > 1 || $always_show) { |
|
384 | - // Extra pagination info |
|
385 | - $geodir_pagination_more_info = get_option('geodir_pagination_advance_info'); |
|
386 | - $start_no = ( $paged - 1 ) * $posts_per_page + 1; |
|
387 | - $end_no = min($paged * $posts_per_page, $numposts); |
|
383 | + if ($max_page > 1 || $always_show) { |
|
384 | + // Extra pagination info |
|
385 | + $geodir_pagination_more_info = get_option('geodir_pagination_advance_info'); |
|
386 | + $start_no = ( $paged - 1 ) * $posts_per_page + 1; |
|
387 | + $end_no = min($paged * $posts_per_page, $numposts); |
|
388 | 388 | |
389 | - if ($geodir_pagination_more_info != '') { |
|
390 | - if ($listing_type_name) { |
|
391 | - $listing_type_name = __($listing_type_name, 'geodirectory'); |
|
392 | - $pegination_desc = wp_sprintf(__('Showing %s %d-%d of %d', 'geodirectory'), $listing_type_name, $start_no, $end_no, $numposts); |
|
393 | - } else { |
|
394 | - $pegination_desc = wp_sprintf(__('Showing listings %d-%d of %d', 'geodirectory'), $start_no, $end_no, $numposts); |
|
395 | - } |
|
396 | - $pagination_info = '<div class="gd-pagination-details">' . $pegination_desc . '</div>'; |
|
397 | - /** |
|
398 | - * Adds an extra pagination info above/under pagination. |
|
399 | - * |
|
400 | - * @since 1.5.9 |
|
401 | - * |
|
402 | - * @param string $pagination_info Extra pagination info content. |
|
403 | - * @param string $listing_type_name Listing results type. |
|
404 | - * @param string $start_no First result number. |
|
405 | - * @param string $end_no Last result number. |
|
406 | - * @param string $numposts Total number of listings. |
|
407 | - * @param string $post_type The post type. |
|
408 | - */ |
|
409 | - $pagination_info = apply_filters('geodir_pagination_advance_info', $pagination_info, $listing_type_name, $start_no, $end_no, $numposts, $post_type); |
|
389 | + if ($geodir_pagination_more_info != '') { |
|
390 | + if ($listing_type_name) { |
|
391 | + $listing_type_name = __($listing_type_name, 'geodirectory'); |
|
392 | + $pegination_desc = wp_sprintf(__('Showing %s %d-%d of %d', 'geodirectory'), $listing_type_name, $start_no, $end_no, $numposts); |
|
393 | + } else { |
|
394 | + $pegination_desc = wp_sprintf(__('Showing listings %d-%d of %d', 'geodirectory'), $start_no, $end_no, $numposts); |
|
395 | + } |
|
396 | + $pagination_info = '<div class="gd-pagination-details">' . $pegination_desc . '</div>'; |
|
397 | + /** |
|
398 | + * Adds an extra pagination info above/under pagination. |
|
399 | + * |
|
400 | + * @since 1.5.9 |
|
401 | + * |
|
402 | + * @param string $pagination_info Extra pagination info content. |
|
403 | + * @param string $listing_type_name Listing results type. |
|
404 | + * @param string $start_no First result number. |
|
405 | + * @param string $end_no Last result number. |
|
406 | + * @param string $numposts Total number of listings. |
|
407 | + * @param string $post_type The post type. |
|
408 | + */ |
|
409 | + $pagination_info = apply_filters('geodir_pagination_advance_info', $pagination_info, $listing_type_name, $start_no, $end_no, $numposts, $post_type); |
|
410 | 410 | |
411 | - if ($geodir_pagination_more_info == 'before') { |
|
412 | - $before = $before . $pagination_info; |
|
413 | - } else if ($geodir_pagination_more_info == 'after') { |
|
414 | - $after = $pagination_info . $after; |
|
415 | - } |
|
416 | - } |
|
411 | + if ($geodir_pagination_more_info == 'before') { |
|
412 | + $before = $before . $pagination_info; |
|
413 | + } else if ($geodir_pagination_more_info == 'after') { |
|
414 | + $after = $pagination_info . $after; |
|
415 | + } |
|
416 | + } |
|
417 | 417 | |
418 | - echo "$before <div class='Navi gd-navi'>"; |
|
419 | - if ($paged >= ($pages_to_show - 1)) { |
|
420 | - echo '<a href="' . str_replace('&paged', '&paged', get_pagenum_link()) . '">«</a>'; |
|
421 | - } |
|
422 | - previous_posts_link($prelabel); |
|
423 | - for ($i = $paged - $half_pages_to_show; $i <= $paged + $half_pages_to_show; $i++) { |
|
424 | - if ($i >= 1 && $i <= $max_page) { |
|
425 | - if ($i == $paged) { |
|
426 | - echo "<strong class='on'>$i</strong>"; |
|
427 | - } else { |
|
428 | - echo ' <a href="' . str_replace('&paged', '&paged', get_pagenum_link($i)) . '">' . $i . '</a> '; |
|
429 | - } |
|
430 | - } |
|
431 | - } |
|
432 | - next_posts_link($nxtlabel, $max_page); |
|
433 | - if (($paged + $half_pages_to_show) < ($max_page)) { |
|
434 | - echo '<a href="' . str_replace('&paged', '&paged', get_pagenum_link($max_page)) . '">»</a>'; |
|
435 | - } |
|
436 | - echo "</div> $after"; |
|
437 | - } |
|
418 | + echo "$before <div class='Navi gd-navi'>"; |
|
419 | + if ($paged >= ($pages_to_show - 1)) { |
|
420 | + echo '<a href="' . str_replace('&paged', '&paged', get_pagenum_link()) . '">«</a>'; |
|
421 | + } |
|
422 | + previous_posts_link($prelabel); |
|
423 | + for ($i = $paged - $half_pages_to_show; $i <= $paged + $half_pages_to_show; $i++) { |
|
424 | + if ($i >= 1 && $i <= $max_page) { |
|
425 | + if ($i == $paged) { |
|
426 | + echo "<strong class='on'>$i</strong>"; |
|
427 | + } else { |
|
428 | + echo ' <a href="' . str_replace('&paged', '&paged', get_pagenum_link($i)) . '">' . $i . '</a> '; |
|
429 | + } |
|
430 | + } |
|
431 | + } |
|
432 | + next_posts_link($nxtlabel, $max_page); |
|
433 | + if (($paged + $half_pages_to_show) < ($max_page)) { |
|
434 | + echo '<a href="' . str_replace('&paged', '&paged', get_pagenum_link($max_page)) . '">»</a>'; |
|
435 | + } |
|
436 | + echo "</div> $after"; |
|
437 | + } |
|
438 | 438 | |
439 | - if (function_exists('geodir_location_geo_home_link')) { |
|
440 | - add_filter('home_url', 'geodir_location_geo_home_link', 100000, 2); |
|
441 | - } |
|
442 | - } |
|
439 | + if (function_exists('geodir_location_geo_home_link')) { |
|
440 | + add_filter('home_url', 'geodir_location_geo_home_link', 100000, 2); |
|
441 | + } |
|
442 | + } |
|
443 | 443 | } |
444 | 444 | |
445 | 445 | /** |
@@ -450,20 +450,20 @@ discard block |
||
450 | 450 | */ |
451 | 451 | function geodir_listingsearch_scripts() |
452 | 452 | { |
453 | - if (get_option('gd_search_dist') != '') { |
|
454 | - $dist = get_option('gd_search_dist'); |
|
455 | - } else { |
|
456 | - $dist = 500; |
|
457 | - } |
|
458 | - $dist_dif = 1000; |
|
459 | - |
|
460 | - if ($dist <= 5000) $dist_dif = 500; |
|
461 | - if ($dist <= 1000) $dist_dif = 100; |
|
462 | - if ($dist <= 500) $dist_dif = 50; |
|
463 | - if ($dist <= 100) $dist_dif = 10; |
|
464 | - if ($dist <= 50) $dist_dif = 5; |
|
465 | - |
|
466 | - ?> |
|
453 | + if (get_option('gd_search_dist') != '') { |
|
454 | + $dist = get_option('gd_search_dist'); |
|
455 | + } else { |
|
456 | + $dist = 500; |
|
457 | + } |
|
458 | + $dist_dif = 1000; |
|
459 | + |
|
460 | + if ($dist <= 5000) $dist_dif = 500; |
|
461 | + if ($dist <= 1000) $dist_dif = 100; |
|
462 | + if ($dist <= 500) $dist_dif = 50; |
|
463 | + if ($dist <= 100) $dist_dif = 10; |
|
464 | + if ($dist <= 50) $dist_dif = 5; |
|
465 | + |
|
466 | + ?> |
|
467 | 467 | <script type="text/javascript"> |
468 | 468 | |
469 | 469 | jQuery(function ($) { |
@@ -522,15 +522,15 @@ discard block |
||
522 | 522 | function geodir_add_sharelocation_scripts() |
523 | 523 | { |
524 | 524 | |
525 | - $default_search_for_text = SEARCH_FOR_TEXT; |
|
526 | - if (get_option('geodir_search_field_default_text')) |
|
527 | - $default_search_for_text = __(get_option('geodir_search_field_default_text'), 'geodirectory'); |
|
525 | + $default_search_for_text = SEARCH_FOR_TEXT; |
|
526 | + if (get_option('geodir_search_field_default_text')) |
|
527 | + $default_search_for_text = __(get_option('geodir_search_field_default_text'), 'geodirectory'); |
|
528 | 528 | |
529 | - $default_near_text = NEAR_TEXT; |
|
530 | - if (get_option('geodir_near_field_default_text')) |
|
531 | - $default_near_text = __(get_option('geodir_near_field_default_text'), 'geodirectory'); |
|
529 | + $default_near_text = NEAR_TEXT; |
|
530 | + if (get_option('geodir_near_field_default_text')) |
|
531 | + $default_near_text = __(get_option('geodir_near_field_default_text'), 'geodirectory'); |
|
532 | 532 | |
533 | - ?> |
|
533 | + ?> |
|
534 | 534 | |
535 | 535 | |
536 | 536 | <script type="text/javascript"> |
@@ -613,14 +613,14 @@ discard block |
||
613 | 613 | initialise2(); |
614 | 614 | } else { |
615 | 615 | <?php |
616 | - $near_add = get_option('geodir_search_near_addition'); |
|
617 | - /** |
|
618 | - * Adds any extra info to the near search box query when trying to geolocate it via google api. |
|
619 | - * |
|
620 | - * @since 1.0.0 |
|
621 | - */ |
|
622 | - $near_add2 = apply_filters('geodir_search_near_addition', ''); |
|
623 | - ?> |
|
616 | + $near_add = get_option('geodir_search_near_addition'); |
|
617 | + /** |
|
618 | + * Adds any extra info to the near search box query when trying to geolocate it via google api. |
|
619 | + * |
|
620 | + * @since 1.0.0 |
|
621 | + */ |
|
622 | + $near_add2 = apply_filters('geodir_search_near_addition', ''); |
|
623 | + ?> |
|
624 | 624 | if (window.gdMaps === 'google') { |
625 | 625 | Sgeocoder.geocode({'address': address<?php echo ($near_add ? '+", ' . $near_add . '"' : '') . $near_add2;?>}, |
626 | 626 | function (results, status) { |
@@ -723,30 +723,30 @@ discard block |
||
723 | 723 | */ |
724 | 724 | function geodir_show_badges_on_image($which, $post, $link) |
725 | 725 | { |
726 | - $return = ''; |
|
727 | - switch ($which) { |
|
728 | - case 'featured': |
|
729 | - /** |
|
730 | - * Filter the featured image badge html that appears in the listings pages over the thumbnail. |
|
731 | - * |
|
732 | - * @since 1.0.0 |
|
733 | - * @param object $post The post object. |
|
734 | - * @param string $link The link to the post. |
|
735 | - */ |
|
736 | - $return = apply_filters('geodir_featured_badge_on_image', '<a href="' . $link . '"><span class="geodir_featured_img"> </span></a>',$post,$link); |
|
737 | - break; |
|
738 | - case 'new' : |
|
739 | - /** |
|
740 | - * Filter the new image badge html that appears in the listings pages over the thumbnail. |
|
741 | - * |
|
742 | - * @since 1.0.0 |
|
743 | - * @param object $post The post object. |
|
744 | - * @param string $link The link to the post. |
|
745 | - */ |
|
746 | - $return = apply_filters('geodir_new_badge_on_image', '<a href="' . $link . '"><span class="geodir_new_listing"> </span></a>',$post,$link); |
|
747 | - break; |
|
748 | - |
|
749 | - } |
|
726 | + $return = ''; |
|
727 | + switch ($which) { |
|
728 | + case 'featured': |
|
729 | + /** |
|
730 | + * Filter the featured image badge html that appears in the listings pages over the thumbnail. |
|
731 | + * |
|
732 | + * @since 1.0.0 |
|
733 | + * @param object $post The post object. |
|
734 | + * @param string $link The link to the post. |
|
735 | + */ |
|
736 | + $return = apply_filters('geodir_featured_badge_on_image', '<a href="' . $link . '"><span class="geodir_featured_img"> </span></a>',$post,$link); |
|
737 | + break; |
|
738 | + case 'new' : |
|
739 | + /** |
|
740 | + * Filter the new image badge html that appears in the listings pages over the thumbnail. |
|
741 | + * |
|
742 | + * @since 1.0.0 |
|
743 | + * @param object $post The post object. |
|
744 | + * @param string $link The link to the post. |
|
745 | + */ |
|
746 | + $return = apply_filters('geodir_new_badge_on_image', '<a href="' . $link . '"><span class="geodir_new_listing"> </span></a>',$post,$link); |
|
747 | + break; |
|
748 | + |
|
749 | + } |
|
750 | 750 | |
751 | - return $return; |
|
751 | + return $return; |
|
752 | 752 | } |
@@ -38,21 +38,21 @@ discard block |
||
38 | 38 | $is_detail_page = false; |
39 | 39 | $geodir_map_name = geodir_map_name(); |
40 | 40 | |
41 | - if((is_single() && geodir_is_geodir_page()) || (is_page() && geodir_is_page('preview') )) { |
|
41 | + if ((is_single() && geodir_is_geodir_page()) || (is_page() && geodir_is_page('preview'))) { |
|
42 | 42 | $is_detail_page = true; |
43 | 43 | } |
44 | 44 | |
45 | 45 | wp_enqueue_script('jquery'); |
46 | 46 | |
47 | - wp_register_script('geodirectory-script', geodir_plugin_url() . '/geodirectory-assets/js/geodirectory.min.js#asyncload', array(), GEODIRECTORY_VERSION); |
|
47 | + wp_register_script('geodirectory-script', geodir_plugin_url().'/geodirectory-assets/js/geodirectory.min.js#asyncload', array(), GEODIRECTORY_VERSION); |
|
48 | 48 | wp_enqueue_script('geodirectory-script'); |
49 | 49 | |
50 | 50 | $geodir_vars_data = array( |
51 | 51 | 'siteurl' => get_option('siteurl'), |
52 | 52 | 'geodir_plugin_url' => geodir_plugin_url(), |
53 | - 'geodir_lazy_load' => get_option('geodir_lazy_load',1), |
|
53 | + 'geodir_lazy_load' => get_option('geodir_lazy_load', 1), |
|
54 | 54 | 'geodir_ajax_url' => geodir_get_ajax_url(), |
55 | - 'geodir_gd_modal' => (int)get_option('geodir_disable_gb_modal'), |
|
55 | + 'geodir_gd_modal' => (int) get_option('geodir_disable_gb_modal'), |
|
56 | 56 | 'is_rtl' => is_rtl() ? 1 : 0 // fix rtl issue |
57 | 57 | ); |
58 | 58 | |
@@ -73,24 +73,24 @@ discard block |
||
73 | 73 | * |
74 | 74 | * } |
75 | 75 | */ |
76 | - $geodir_vars_data = apply_filters('geodir_vars_data',$geodir_vars_data); |
|
76 | + $geodir_vars_data = apply_filters('geodir_vars_data', $geodir_vars_data); |
|
77 | 77 | |
78 | 78 | wp_localize_script('geodirectory-script', 'geodir_var', $geodir_vars_data); |
79 | 79 | |
80 | - wp_register_script('geodirectory-jquery-flexslider-js', geodir_plugin_url() . '/geodirectory-assets/js/jquery.flexslider.min.js', array(), GEODIRECTORY_VERSION,true); |
|
81 | - if($is_detail_page){wp_enqueue_script('geodirectory-jquery-flexslider-js');} |
|
80 | + wp_register_script('geodirectory-jquery-flexslider-js', geodir_plugin_url().'/geodirectory-assets/js/jquery.flexslider.min.js', array(), GEODIRECTORY_VERSION, true); |
|
81 | + if ($is_detail_page) {wp_enqueue_script('geodirectory-jquery-flexslider-js'); } |
|
82 | 82 | |
83 | - wp_register_script('geodirectory-lightbox-jquery', geodir_plugin_url() . '/geodirectory-assets/js/jquery.lightbox-0.5.min.js', array(), GEODIRECTORY_VERSION,true); |
|
83 | + wp_register_script('geodirectory-lightbox-jquery', geodir_plugin_url().'/geodirectory-assets/js/jquery.lightbox-0.5.min.js', array(), GEODIRECTORY_VERSION, true); |
|
84 | 84 | wp_enqueue_script('geodirectory-lightbox-jquery'); |
85 | 85 | |
86 | - wp_register_script('geodirectory-jquery-simplemodal', geodir_plugin_url() . '/geodirectory-assets/js/jquery.simplemodal.min.js', array(), GEODIRECTORY_VERSION,true); |
|
86 | + wp_register_script('geodirectory-jquery-simplemodal', geodir_plugin_url().'/geodirectory-assets/js/jquery.simplemodal.min.js', array(), GEODIRECTORY_VERSION, true); |
|
87 | 87 | if ($is_detail_page) { |
88 | 88 | wp_enqueue_script('geodirectory-jquery-simplemodal'); |
89 | 89 | } |
90 | 90 | |
91 | 91 | if (in_array($geodir_map_name, array('auto', 'google'))) { |
92 | - $map_lang = "&language=" . geodir_get_map_default_language(); |
|
93 | - $map_key = "&key=" . geodir_get_map_api_key(); |
|
92 | + $map_lang = "&language=".geodir_get_map_default_language(); |
|
93 | + $map_key = "&key=".geodir_get_map_api_key(); |
|
94 | 94 | /** |
95 | 95 | * Filter the variables that are added to the end of the google maps script call. |
96 | 96 | * |
@@ -100,48 +100,48 @@ discard block |
||
100 | 100 | * @param string $var The string to filter, default is empty string. |
101 | 101 | */ |
102 | 102 | $map_extra = apply_filters('geodir_googlemap_script_extra', ''); |
103 | - wp_enqueue_script('geodirectory-googlemap-script', 'https://maps.google.com/maps/api/js?' . $map_lang . $map_key . $map_extra , '', NULL); |
|
103 | + wp_enqueue_script('geodirectory-googlemap-script', 'https://maps.google.com/maps/api/js?'.$map_lang.$map_key.$map_extra, '', NULL); |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | if ($geodir_map_name == 'osm') { |
107 | 107 | // Leaflet OpenStreetMap |
108 | - wp_register_style('geodirectory-leaflet-style', geodir_plugin_url() . '/geodirectory-assets/leaflet/leaflet.css', array(), GEODIRECTORY_VERSION); |
|
108 | + wp_register_style('geodirectory-leaflet-style', geodir_plugin_url().'/geodirectory-assets/leaflet/leaflet.css', array(), GEODIRECTORY_VERSION); |
|
109 | 109 | wp_enqueue_style('geodirectory-leaflet-style'); |
110 | 110 | |
111 | - wp_register_script('geodirectory-leaflet-script', geodir_plugin_url() . '/geodirectory-assets/leaflet/leaflet.min.js', array(), GEODIRECTORY_VERSION); |
|
111 | + wp_register_script('geodirectory-leaflet-script', geodir_plugin_url().'/geodirectory-assets/leaflet/leaflet.min.js', array(), GEODIRECTORY_VERSION); |
|
112 | 112 | wp_enqueue_script('geodirectory-leaflet-script'); |
113 | 113 | |
114 | - wp_register_script('geodirectory-leaflet-geo-script', geodir_plugin_url() . '/geodirectory-assets/leaflet/osm.geocode.js', array(), GEODIRECTORY_VERSION); |
|
114 | + wp_register_script('geodirectory-leaflet-geo-script', geodir_plugin_url().'/geodirectory-assets/leaflet/osm.geocode.js', array(), GEODIRECTORY_VERSION); |
|
115 | 115 | wp_enqueue_script('geodirectory-leaflet-geo-script'); |
116 | 116 | |
117 | 117 | if ($is_detail_page) { |
118 | - wp_register_style('geodirectory-leaflet-routing-style', geodir_plugin_url() . '/geodirectory-assets/leaflet/routing/leaflet-routing-machine.css', array(), GEODIRECTORY_VERSION); |
|
118 | + wp_register_style('geodirectory-leaflet-routing-style', geodir_plugin_url().'/geodirectory-assets/leaflet/routing/leaflet-routing-machine.css', array(), GEODIRECTORY_VERSION); |
|
119 | 119 | wp_enqueue_style('geodirectory-leaflet-routing-style'); |
120 | 120 | |
121 | - wp_register_script('geodirectory-leaflet-routing-script', geodir_plugin_url() . '/geodirectory-assets/leaflet/routing/leaflet-routing-machine.js', array(), GEODIRECTORY_VERSION); |
|
121 | + wp_register_script('geodirectory-leaflet-routing-script', geodir_plugin_url().'/geodirectory-assets/leaflet/routing/leaflet-routing-machine.js', array(), GEODIRECTORY_VERSION); |
|
122 | 122 | wp_enqueue_script('geodirectory-leaflet-routing-script'); |
123 | 123 | } |
124 | 124 | } |
125 | - wp_enqueue_script( 'jquery-ui-autocomplete' ); |
|
125 | + wp_enqueue_script('jquery-ui-autocomplete'); |
|
126 | 126 | |
127 | - wp_register_script('geodirectory-goMap-script', geodir_plugin_url() . '/geodirectory-assets/js/goMap.min.js', array(), GEODIRECTORY_VERSION,true); |
|
127 | + wp_register_script('geodirectory-goMap-script', geodir_plugin_url().'/geodirectory-assets/js/goMap.min.js', array(), GEODIRECTORY_VERSION, true); |
|
128 | 128 | wp_enqueue_script('geodirectory-goMap-script'); |
129 | 129 | |
130 | 130 | |
131 | - wp_register_script('chosen', geodir_plugin_url() . '/geodirectory-assets/js/chosen.jquery.min.js', array(), GEODIRECTORY_VERSION); |
|
131 | + wp_register_script('chosen', geodir_plugin_url().'/geodirectory-assets/js/chosen.jquery.min.js', array(), GEODIRECTORY_VERSION); |
|
132 | 132 | wp_enqueue_script('chosen'); |
133 | 133 | |
134 | - wp_register_script('geodirectory-choose-ajax', geodir_plugin_url() . '/geodirectory-assets/js/ajax-chosen.min.js', array(), GEODIRECTORY_VERSION); |
|
134 | + wp_register_script('geodirectory-choose-ajax', geodir_plugin_url().'/geodirectory-assets/js/ajax-chosen.min.js', array(), GEODIRECTORY_VERSION); |
|
135 | 135 | wp_enqueue_script('geodirectory-choose-ajax'); |
136 | 136 | |
137 | - wp_enqueue_script('geodirectory-jquery-ui-timepicker-js', geodir_plugin_url() . '/geodirectory-assets/js/jquery.ui.timepicker.min.js', array('jquery-ui-datepicker', 'jquery-ui-slider', 'jquery-effects-core', 'jquery-effects-slide'), '', true); |
|
137 | + wp_enqueue_script('geodirectory-jquery-ui-timepicker-js', geodir_plugin_url().'/geodirectory-assets/js/jquery.ui.timepicker.min.js', array('jquery-ui-datepicker', 'jquery-ui-slider', 'jquery-effects-core', 'jquery-effects-slide'), '', true); |
|
138 | 138 | |
139 | 139 | if (is_page() && geodir_is_page('add-listing')) { |
140 | 140 | // SCRIPT FOR UPLOAD |
141 | 141 | wp_enqueue_script('plupload-all'); |
142 | 142 | wp_enqueue_script('jquery-ui-sortable'); |
143 | 143 | |
144 | - wp_register_script('geodirectory-plupload-script', geodir_plugin_url() . '/geodirectory-assets/js/geodirectory-plupload.min.js#asyncload', array(), GEODIRECTORY_VERSION,true); |
|
144 | + wp_register_script('geodirectory-plupload-script', geodir_plugin_url().'/geodirectory-assets/js/geodirectory-plupload.min.js#asyncload', array(), GEODIRECTORY_VERSION, true); |
|
145 | 145 | wp_enqueue_script('geodirectory-plupload-script'); |
146 | 146 | // SCRIPT FOR UPLOAD END |
147 | 147 | |
@@ -188,27 +188,27 @@ discard block |
||
188 | 188 | |
189 | 189 | wp_localize_script('geodirectory-plupload-script', 'gd_plupload', $gd_plupload_init); |
190 | 190 | |
191 | - wp_enqueue_script('geodirectory-listing-validation-script', geodir_plugin_url() . '/geodirectory-assets/js/listing_validation.min.js#asyncload'); |
|
191 | + wp_enqueue_script('geodirectory-listing-validation-script', geodir_plugin_url().'/geodirectory-assets/js/listing_validation.min.js#asyncload'); |
|
192 | 192 | } // End if for add place page |
193 | 193 | |
194 | - wp_register_script('geodirectory-post-custom-js', geodir_plugin_url() . '/geodirectory-assets/js/post.custom.min.js#asyncload', array(), GEODIRECTORY_VERSION, true); |
|
194 | + wp_register_script('geodirectory-post-custom-js', geodir_plugin_url().'/geodirectory-assets/js/post.custom.min.js#asyncload', array(), GEODIRECTORY_VERSION, true); |
|
195 | 195 | if ($is_detail_page) { |
196 | 196 | wp_enqueue_script('geodirectory-post-custom-js'); |
197 | 197 | } |
198 | 198 | |
199 | 199 | // font awesome rating script |
200 | 200 | if (get_option('geodir_reviewrating_enable_font_awesome')) { |
201 | - wp_register_script('geodir-barrating-js', geodir_plugin_url() . '/geodirectory-assets/js/jquery.barrating.min.js', array(), GEODIRECTORY_VERSION, true); |
|
201 | + wp_register_script('geodir-barrating-js', geodir_plugin_url().'/geodirectory-assets/js/jquery.barrating.min.js', array(), GEODIRECTORY_VERSION, true); |
|
202 | 202 | wp_enqueue_script('geodir-barrating-js'); |
203 | 203 | } else { // default rating script |
204 | - wp_register_script('geodir-jRating-js', geodir_plugin_url() . '/geodirectory-assets/js/jRating.jquery.min.js', array(), GEODIRECTORY_VERSION, true); |
|
204 | + wp_register_script('geodir-jRating-js', geodir_plugin_url().'/geodirectory-assets/js/jRating.jquery.min.js', array(), GEODIRECTORY_VERSION, true); |
|
205 | 205 | wp_enqueue_script('geodir-jRating-js'); |
206 | 206 | } |
207 | 207 | |
208 | - wp_register_script('geodir-on-document-load', geodir_plugin_url() . '/geodirectory-assets/js/on_document_load.min.js#asyncload', array(), GEODIRECTORY_VERSION, true); |
|
208 | + wp_register_script('geodir-on-document-load', geodir_plugin_url().'/geodirectory-assets/js/on_document_load.min.js#asyncload', array(), GEODIRECTORY_VERSION, true); |
|
209 | 209 | wp_enqueue_script('geodir-on-document-load'); |
210 | 210 | |
211 | - wp_register_script('google-geometa', geodir_plugin_url() . '/geodirectory-assets/js/geometa.min.js#asyncload', array(), GEODIRECTORY_VERSION, true); |
|
211 | + wp_register_script('google-geometa', geodir_plugin_url().'/geodirectory-assets/js/geometa.min.js#asyncload', array(), GEODIRECTORY_VERSION, true); |
|
212 | 212 | wp_enqueue_script('google-geometa'); |
213 | 213 | } |
214 | 214 | |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | */ |
224 | 224 | function geodir_header_scripts() |
225 | 225 | { |
226 | - echo '<style>' . stripslashes(get_option('geodir_coustem_css')) . '</style>'; |
|
226 | + echo '<style>'.stripslashes(get_option('geodir_coustem_css')).'</style>'; |
|
227 | 227 | echo stripslashes(get_option('geodir_header_scripts')); |
228 | 228 | } |
229 | 229 | |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | * |
248 | 248 | * Flexbox wont wrap on ios for search form items |
249 | 249 | */ |
250 | - if (preg_match( '/iPad|iPod|iPhone|Safari/', $_SERVER['HTTP_USER_AGENT'] ) ) { |
|
250 | + if (preg_match('/iPad|iPod|iPhone|Safari/', $_SERVER['HTTP_USER_AGENT'])) { |
|
251 | 251 | echo "<style>body .geodir-listing-search.gd-search-bar-style .geodir-loc-bar .clearfix.geodir-loc-bar-in .geodir-search .gd-search-input-wrapper{flex:50 1 auto !important;min-width: initial !important;width:auto !important;}.geodir-filter-container .geodir-filter-cat{width:auto !important;}</style>"; |
252 | 252 | } |
253 | 253 | } |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | */ |
264 | 264 | function geodir_add_async_forscript($url) |
265 | 265 | { |
266 | - if (strpos($url, '#asyncload')===false) |
|
266 | + if (strpos($url, '#asyncload') === false) |
|
267 | 267 | return $url; |
268 | 268 | else if (is_admin()) |
269 | 269 | return str_replace('#asyncload', '', $url); |
@@ -281,12 +281,12 @@ discard block |
||
281 | 281 | function geodir_templates_styles() |
282 | 282 | { |
283 | 283 | |
284 | - wp_register_style('geodir-core-scss', geodir_plugin_url() . '/geodirectory-assets/css/gd_core_frontend.css', array(), GEODIRECTORY_VERSION); |
|
284 | + wp_register_style('geodir-core-scss', geodir_plugin_url().'/geodirectory-assets/css/gd_core_frontend.css', array(), GEODIRECTORY_VERSION); |
|
285 | 285 | wp_enqueue_style('geodir-core-scss'); |
286 | - wp_register_style('geodir-core-scss-footer', geodir_plugin_url() . '/geodirectory-assets/css/gd_core_frontend_footer.css', array(), GEODIRECTORY_VERSION); |
|
286 | + wp_register_style('geodir-core-scss-footer', geodir_plugin_url().'/geodirectory-assets/css/gd_core_frontend_footer.css', array(), GEODIRECTORY_VERSION); |
|
287 | 287 | |
288 | - if(is_rtl()){ |
|
289 | - wp_register_style('geodirectory-frontend-rtl-style', geodir_plugin_url() . '/geodirectory-assets/css/rtl-frontend.css', array(), GEODIRECTORY_VERSION); |
|
288 | + if (is_rtl()) { |
|
289 | + wp_register_style('geodirectory-frontend-rtl-style', geodir_plugin_url().'/geodirectory-assets/css/rtl-frontend.css', array(), GEODIRECTORY_VERSION); |
|
290 | 290 | wp_enqueue_style('geodirectory-frontend-rtl-style'); |
291 | 291 | } |
292 | 292 | |
@@ -360,18 +360,18 @@ discard block |
||
360 | 360 | $term_id = get_queried_object_id(); |
361 | 361 | $taxonomy = get_query_var('taxonomy'); |
362 | 362 | |
363 | - if ($term_id && $post_type && get_query_var('taxonomy') == $post_type . 'category' ) { |
|
364 | - $term = get_term($term_id, $post_type . 'category'); |
|
363 | + if ($term_id && $post_type && get_query_var('taxonomy') == $post_type.'category') { |
|
364 | + $term = get_term($term_id, $post_type.'category'); |
|
365 | 365 | } |
366 | 366 | } |
367 | 367 | |
368 | - if (geodir_is_page('search') && !empty($_REQUEST['s' . $post_type . 'category'])) { |
|
369 | - $taxonomy_search = $_REQUEST['s' . $post_type . 'category']; |
|
368 | + if (geodir_is_page('search') && !empty($_REQUEST['s'.$post_type.'category'])) { |
|
369 | + $taxonomy_search = $_REQUEST['s'.$post_type.'category']; |
|
370 | 370 | |
371 | 371 | if (!is_array($taxonomy_search)) { |
372 | - $term = get_term((int)$taxonomy_search, $post_type . 'category'); |
|
373 | - } else if(is_array($taxonomy_search) && count($taxonomy_search) == 1) { // single category search |
|
374 | - $term = get_term((int)$taxonomy_search[0], $post_type . 'category'); |
|
372 | + $term = get_term((int) $taxonomy_search, $post_type.'category'); |
|
373 | + } else if (is_array($taxonomy_search) && count($taxonomy_search) == 1) { // single category search |
|
374 | + $term = get_term((int) $taxonomy_search[0], $post_type.'category'); |
|
375 | 375 | } |
376 | 376 | } |
377 | 377 | |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | if ($max_page > 1 || $always_show) { |
384 | 384 | // Extra pagination info |
385 | 385 | $geodir_pagination_more_info = get_option('geodir_pagination_advance_info'); |
386 | - $start_no = ( $paged - 1 ) * $posts_per_page + 1; |
|
386 | + $start_no = ($paged - 1) * $posts_per_page + 1; |
|
387 | 387 | $end_no = min($paged * $posts_per_page, $numposts); |
388 | 388 | |
389 | 389 | if ($geodir_pagination_more_info != '') { |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | } else { |
394 | 394 | $pegination_desc = wp_sprintf(__('Showing listings %d-%d of %d', 'geodirectory'), $start_no, $end_no, $numposts); |
395 | 395 | } |
396 | - $pagination_info = '<div class="gd-pagination-details">' . $pegination_desc . '</div>'; |
|
396 | + $pagination_info = '<div class="gd-pagination-details">'.$pegination_desc.'</div>'; |
|
397 | 397 | /** |
398 | 398 | * Adds an extra pagination info above/under pagination. |
399 | 399 | * |
@@ -409,15 +409,15 @@ discard block |
||
409 | 409 | $pagination_info = apply_filters('geodir_pagination_advance_info', $pagination_info, $listing_type_name, $start_no, $end_no, $numposts, $post_type); |
410 | 410 | |
411 | 411 | if ($geodir_pagination_more_info == 'before') { |
412 | - $before = $before . $pagination_info; |
|
412 | + $before = $before.$pagination_info; |
|
413 | 413 | } else if ($geodir_pagination_more_info == 'after') { |
414 | - $after = $pagination_info . $after; |
|
414 | + $after = $pagination_info.$after; |
|
415 | 415 | } |
416 | 416 | } |
417 | 417 | |
418 | 418 | echo "$before <div class='Navi gd-navi'>"; |
419 | 419 | if ($paged >= ($pages_to_show - 1)) { |
420 | - echo '<a href="' . str_replace('&paged', '&paged', get_pagenum_link()) . '">«</a>'; |
|
420 | + echo '<a href="'.str_replace('&paged', '&paged', get_pagenum_link()).'">«</a>'; |
|
421 | 421 | } |
422 | 422 | previous_posts_link($prelabel); |
423 | 423 | for ($i = $paged - $half_pages_to_show; $i <= $paged + $half_pages_to_show; $i++) { |
@@ -425,13 +425,13 @@ discard block |
||
425 | 425 | if ($i == $paged) { |
426 | 426 | echo "<strong class='on'>$i</strong>"; |
427 | 427 | } else { |
428 | - echo ' <a href="' . str_replace('&paged', '&paged', get_pagenum_link($i)) . '">' . $i . '</a> '; |
|
428 | + echo ' <a href="'.str_replace('&paged', '&paged', get_pagenum_link($i)).'">'.$i.'</a> '; |
|
429 | 429 | } |
430 | 430 | } |
431 | 431 | } |
432 | 432 | next_posts_link($nxtlabel, $max_page); |
433 | 433 | if (($paged + $half_pages_to_show) < ($max_page)) { |
434 | - echo '<a href="' . str_replace('&paged', '&paged', get_pagenum_link($max_page)) . '">»</a>'; |
|
434 | + echo '<a href="'.str_replace('&paged', '&paged', get_pagenum_link($max_page)).'">»</a>'; |
|
435 | 435 | } |
436 | 436 | echo "</div> $after"; |
437 | 437 | } |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | jQuery(function ($) { |
470 | 470 | $("#distance_slider").slider({ |
471 | 471 | range: true, |
472 | - values: [0, <?php echo ($_REQUEST['sdist']!='') ? sanitize_text_field($_REQUEST['sdist']) : "0"; ?>], |
|
472 | + values: [0, <?php echo ($_REQUEST['sdist'] != '') ? sanitize_text_field($_REQUEST['sdist']) : "0"; ?>], |
|
473 | 473 | min: 0, |
474 | 474 | max: <?php echo $dist; ?>, |
475 | 475 | step: <?php echo $dist_dif; ?>, |
@@ -534,7 +534,7 @@ discard block |
||
534 | 534 | |
535 | 535 | |
536 | 536 | <script type="text/javascript"> |
537 | - var default_location = '<?php if($search_location = geodir_get_default_location()) echo $search_location->city ;?>'; |
|
537 | + var default_location = '<?php if ($search_location = geodir_get_default_location()) echo $search_location->city; ?>'; |
|
538 | 538 | var latlng; |
539 | 539 | var address; |
540 | 540 | var dist = 0; |
@@ -550,7 +550,7 @@ discard block |
||
550 | 550 | var $form = jQuery(this).closest('form'); |
551 | 551 | |
552 | 552 | if (jQuery("#sdist input[type='radio']:checked").length != 0) dist = jQuery("#sdist input[type='radio']:checked").val(); |
553 | - if (jQuery('.search_text', $form).val() == '' || jQuery('.search_text', $form).val() == '<?php echo $default_search_for_text;?>') jQuery('.search_text', $form).val(s); |
|
553 | + if (jQuery('.search_text', $form).val() == '' || jQuery('.search_text', $form).val() == '<?php echo $default_search_for_text; ?>') jQuery('.search_text', $form).val(s); |
|
554 | 554 | |
555 | 555 | // Disable location based search for disabled location post type. |
556 | 556 | if (jQuery('.search_by_post', $form).val() != '' && typeof gd_cpt_no_location == 'function') { |
@@ -564,7 +564,7 @@ discard block |
||
564 | 564 | } |
565 | 565 | } |
566 | 566 | |
567 | - if (dist > 0 || (jQuery('select[name="sort_by"]').val() == 'nearest' || jQuery('select[name="sort_by"]', $form).val() == 'farthest') || (jQuery(".snear", $form).val() != '' && jQuery(".snear", $form).val() != '<?php echo $default_near_text;?>')) { |
|
567 | + if (dist > 0 || (jQuery('select[name="sort_by"]').val() == 'nearest' || jQuery('select[name="sort_by"]', $form).val() == 'farthest') || (jQuery(".snear", $form).val() != '' && jQuery(".snear", $form).val() != '<?php echo $default_near_text; ?>')) { |
|
568 | 568 | geodir_setsearch($form); |
569 | 569 | } else { |
570 | 570 | jQuery(".snear", $form).val(''); |
@@ -582,7 +582,7 @@ discard block |
||
582 | 582 | }); |
583 | 583 | |
584 | 584 | function geodir_setsearch($form) { |
585 | - if ((dist > 0 || (jQuery('select[name="sort_by"]', $form).val() == 'nearest' || jQuery('select[name="sort_by"]', $form).val() == 'farthest')) && (jQuery(".snear", $form).val() == '' || jQuery(".snear", $form).val() == '<?php echo $default_near_text;?>')) jQuery(".snear", $form).val(default_location); |
|
585 | + if ((dist > 0 || (jQuery('select[name="sort_by"]', $form).val() == 'nearest' || jQuery('select[name="sort_by"]', $form).val() == 'farthest')) && (jQuery(".snear", $form).val() == '' || jQuery(".snear", $form).val() == '<?php echo $default_near_text; ?>')) jQuery(".snear", $form).val(default_location); |
|
586 | 586 | geocodeAddress($form); |
587 | 587 | } |
588 | 588 | |
@@ -601,15 +601,15 @@ discard block |
||
601 | 601 | // Call the geocode function |
602 | 602 | Sgeocoder = window.gdMaps == 'google' ? new google.maps.Geocoder() : null; |
603 | 603 | |
604 | - if (jQuery('.snear', $form).val() == '' || ( jQuery('.sgeo_lat').val() != '' && jQuery('.sgeo_lon').val() != '' ) || jQuery('.snear', $form).val().match("^<?php _e('In:','geodirectory');?>")) { |
|
605 | - if (jQuery('.snear', $form).val().match("^<?php _e('In:','geodirectory');?>")) { |
|
604 | + if (jQuery('.snear', $form).val() == '' || ( jQuery('.sgeo_lat').val() != '' && jQuery('.sgeo_lon').val() != '' ) || jQuery('.snear', $form).val().match("^<?php _e('In:', 'geodirectory'); ?>")) { |
|
605 | + if (jQuery('.snear', $form).val().match("^<?php _e('In:', 'geodirectory'); ?>")) { |
|
606 | 606 | jQuery(".snear", $form).val(''); |
607 | 607 | } |
608 | 608 | jQuery($form).submit(); |
609 | 609 | } else { |
610 | 610 | var address = jQuery(".snear", $form).val(); |
611 | 611 | |
612 | - if (jQuery('.snear', $form).val() == '<?php echo $default_near_text;?>') { |
|
612 | + if (jQuery('.snear', $form).val() == '<?php echo $default_near_text; ?>') { |
|
613 | 613 | initialise2(); |
614 | 614 | } else { |
615 | 615 | <?php |
@@ -622,12 +622,12 @@ discard block |
||
622 | 622 | $near_add2 = apply_filters('geodir_search_near_addition', ''); |
623 | 623 | ?> |
624 | 624 | if (window.gdMaps === 'google') { |
625 | - Sgeocoder.geocode({'address': address<?php echo ($near_add ? '+", ' . $near_add . '"' : '') . $near_add2;?>}, |
|
625 | + Sgeocoder.geocode({'address': address<?php echo ($near_add ? '+", '.$near_add.'"' : '').$near_add2; ?>}, |
|
626 | 626 | function (results, status) { |
627 | 627 | if (status == google.maps.GeocoderStatus.OK) { |
628 | 628 | updateSearchPosition(results[0].geometry.location, $form); |
629 | 629 | } else { |
630 | - alert("<?php esc_attr_e('Search was not successful for the following reason :', 'geodirectory');?>" + status); |
|
630 | + alert("<?php esc_attr_e('Search was not successful for the following reason :', 'geodirectory'); ?>" + status); |
|
631 | 631 | } |
632 | 632 | }); |
633 | 633 | } else if (window.gdMaps === 'osm') { |
@@ -636,7 +636,7 @@ discard block |
||
636 | 636 | if (typeof geo !== 'undefined' && geo.lat && geo.lon) { |
637 | 637 | updateSearchPosition(geo, $form); |
638 | 638 | } else { |
639 | - alert("<?php esc_attr_e('Search was not successful for the requested address.', 'geodirectory');?>"); |
|
639 | + alert("<?php esc_attr_e('Search was not successful for the requested address.', 'geodirectory'); ?>"); |
|
640 | 640 | } |
641 | 641 | }); |
642 | 642 | } else { |
@@ -682,19 +682,19 @@ discard block |
||
682 | 682 | var msg; |
683 | 683 | switch (err.code) { |
684 | 684 | case err.UNKNOWN_ERROR: |
685 | - msg = "<?php _e('Unable to find your location','geodirectory');?>"; |
|
685 | + msg = "<?php _e('Unable to find your location', 'geodirectory'); ?>"; |
|
686 | 686 | break; |
687 | 687 | case err.PERMISSION_DENINED: |
688 | - msg = "<?php _e('Permission denied in finding your location','geodirectory');?>"; |
|
688 | + msg = "<?php _e('Permission denied in finding your location', 'geodirectory'); ?>"; |
|
689 | 689 | break; |
690 | 690 | case err.POSITION_UNAVAILABLE: |
691 | - msg = "<?php _e('Your location is currently unknown','geodirectory');?>"; |
|
691 | + msg = "<?php _e('Your location is currently unknown', 'geodirectory'); ?>"; |
|
692 | 692 | break; |
693 | 693 | case err.BREAK: |
694 | - msg = "<?php _e('Attempt to find location took too long','geodirectory');?>"; |
|
694 | + msg = "<?php _e('Attempt to find location took too long', 'geodirectory'); ?>"; |
|
695 | 695 | break; |
696 | 696 | default: |
697 | - msg = "<?php _e('Location detection not supported in browser','geodirectory');?>"; |
|
697 | + msg = "<?php _e('Location detection not supported in browser', 'geodirectory'); ?>"; |
|
698 | 698 | } |
699 | 699 | jQuery('#info').html(msg); |
700 | 700 | } |
@@ -733,7 +733,7 @@ discard block |
||
733 | 733 | * @param object $post The post object. |
734 | 734 | * @param string $link The link to the post. |
735 | 735 | */ |
736 | - $return = apply_filters('geodir_featured_badge_on_image', '<a href="' . $link . '"><span class="geodir_featured_img"> </span></a>',$post,$link); |
|
736 | + $return = apply_filters('geodir_featured_badge_on_image', '<a href="'.$link.'"><span class="geodir_featured_img"> </span></a>', $post, $link); |
|
737 | 737 | break; |
738 | 738 | case 'new' : |
739 | 739 | /** |
@@ -743,7 +743,7 @@ discard block |
||
743 | 743 | * @param object $post The post object. |
744 | 744 | * @param string $link The link to the post. |
745 | 745 | */ |
746 | - $return = apply_filters('geodir_new_badge_on_image', '<a href="' . $link . '"><span class="geodir_new_listing"> </span></a>',$post,$link); |
|
746 | + $return = apply_filters('geodir_new_badge_on_image', '<a href="'.$link.'"><span class="geodir_new_listing"> </span></a>', $post, $link); |
|
747 | 747 | break; |
748 | 748 | |
749 | 749 | } |
@@ -11,11 +11,11 @@ |
||
11 | 11 | // Page titles translatable CPT names |
12 | 12 | function geodir_kelo_title_translation( $args) { |
13 | 13 | |
14 | - if(function_exists('geodir_is_geodir_page')){ |
|
15 | - $args['title'] = __($args['title'],'geodirectory'); |
|
16 | - } |
|
14 | + if(function_exists('geodir_is_geodir_page')){ |
|
15 | + $args['title'] = __($args['title'],'geodirectory'); |
|
16 | + } |
|
17 | 17 | |
18 | - return $args; |
|
18 | + return $args; |
|
19 | 19 | } |
20 | 20 | add_filter( 'kleo_title_args', 'geodir_kelo_title_translation', 10, 1 ); |
21 | 21 |
@@ -9,14 +9,14 @@ |
||
9 | 9 | */ |
10 | 10 | |
11 | 11 | // Page titles translatable CPT names |
12 | -function geodir_kelo_title_translation( $args) { |
|
12 | +function geodir_kelo_title_translation($args) { |
|
13 | 13 | |
14 | - if(function_exists('geodir_is_geodir_page')){ |
|
15 | - $args['title'] = __($args['title'],'geodirectory'); |
|
14 | + if (function_exists('geodir_is_geodir_page')) { |
|
15 | + $args['title'] = __($args['title'], 'geodirectory'); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | return $args; |
19 | 19 | } |
20 | -add_filter( 'kleo_title_args', 'geodir_kelo_title_translation', 10, 1 ); |
|
20 | +add_filter('kleo_title_args', 'geodir_kelo_title_translation', 10, 1); |
|
21 | 21 | |
22 | 22 |
@@ -15,8 +15,8 @@ discard block |
||
15 | 15 | */ |
16 | 16 | function geodir_init_map_jason() |
17 | 17 | { |
18 | - global $map_jason; |
|
19 | - $map_jason = array(); |
|
18 | + global $map_jason; |
|
19 | + $map_jason = array(); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | /** |
@@ -28,8 +28,8 @@ discard block |
||
28 | 28 | */ |
29 | 29 | function geodir_init_map_canvas_array() |
30 | 30 | { |
31 | - global $map_canvas_arr; |
|
32 | - $map_canvas_arr = array(); |
|
31 | + global $map_canvas_arr; |
|
32 | + $map_canvas_arr = array(); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | |
@@ -50,50 +50,50 @@ discard block |
||
50 | 50 | */ |
51 | 51 | function create_marker_jason_of_posts($post) |
52 | 52 | { |
53 | - global $wpdb, $map_jason, $add_post_in_marker_array, $geodir_cat_icons, $gd_marker_sizes; |
|
53 | + global $wpdb, $map_jason, $add_post_in_marker_array, $geodir_cat_icons, $gd_marker_sizes; |
|
54 | 54 | |
55 | - if (!empty($post) && isset($post->ID) && $post->ID > 0 && (is_main_query() || $add_post_in_marker_array) && $post->marker_json != '') { |
|
55 | + if (!empty($post) && isset($post->ID) && $post->ID > 0 && (is_main_query() || $add_post_in_marker_array) && $post->marker_json != '') { |
|
56 | 56 | |
57 | - if(isset($map_jason[$post->ID])){return null;} |
|
57 | + if(isset($map_jason[$post->ID])){return null;} |
|
58 | 58 | |
59 | - $srcharr = array("'", "/", "-", '"', '\\'); |
|
60 | - $replarr = array("′", "⁄", "–", "“", ''); |
|
59 | + $srcharr = array("'", "/", "-", '"', '\\'); |
|
60 | + $replarr = array("′", "⁄", "–", "“", ''); |
|
61 | 61 | |
62 | 62 | |
63 | - $geodir_cat_icons = geodir_get_term_icon(); |
|
64 | - $icon = !empty($geodir_cat_icons) && isset($geodir_cat_icons[$post->default_category]) ? $geodir_cat_icons[$post->default_category] : ''; |
|
63 | + $geodir_cat_icons = geodir_get_term_icon(); |
|
64 | + $icon = !empty($geodir_cat_icons) && isset($geodir_cat_icons[$post->default_category]) ? $geodir_cat_icons[$post->default_category] : ''; |
|
65 | 65 | |
66 | - $post_title = $post->post_title; |
|
67 | - $title = str_replace($srcharr, $replarr, $post_title); |
|
66 | + $post_title = $post->post_title; |
|
67 | + $title = str_replace($srcharr, $replarr, $post_title); |
|
68 | 68 | |
69 | - if (is_ssl()) { |
|
70 | - $icon = str_replace("http:","https:",$icon ); |
|
71 | - } |
|
69 | + if (is_ssl()) { |
|
70 | + $icon = str_replace("http:","https:",$icon ); |
|
71 | + } |
|
72 | 72 | |
73 | - if ($icon != '') { |
|
74 | - $gd_marker_sizes = empty($gd_marker_sizes) ? array() : $gd_marker_sizes; |
|
73 | + if ($icon != '') { |
|
74 | + $gd_marker_sizes = empty($gd_marker_sizes) ? array() : $gd_marker_sizes; |
|
75 | 75 | |
76 | - if (isset($gd_marker_sizes[$icon])) { |
|
77 | - $icon_size = $gd_marker_sizes[$icon]; |
|
78 | - } else { |
|
79 | - $icon_size = geodir_get_marker_size($icon); |
|
80 | - $gd_marker_sizes[$icon] = $icon_size; |
|
81 | - } |
|
82 | - } else { |
|
83 | - $icon_size = array('w' => 36, 'h' => 45); |
|
84 | - } |
|
85 | - |
|
86 | - $post_json = '{"id":"' . $post->ID . '","t": "' . $title . '","lt": "' . $post->post_latitude . '","ln": "' . $post->post_longitude . '","mk_id":"' . $post->ID . '_' . $post->default_category . '","i":"' . $icon . '","w":"' . $icon_size['w'] . '","h":"' . $icon_size['h'] . '"}'; |
|
87 | - |
|
88 | - /** |
|
89 | - * Filter the json data when creating output for post json marker.. |
|
90 | - * |
|
91 | - * @since 1.5.7 |
|
92 | - * @param string $post_json JSON representation of the post marker info. |
|
93 | - * @param object $post The post object. |
|
94 | - */ |
|
95 | - $map_jason[$post->ID] = apply_filters('geodir_create_marker_jason_of_posts',$post_json, $post); |
|
96 | - } |
|
76 | + if (isset($gd_marker_sizes[$icon])) { |
|
77 | + $icon_size = $gd_marker_sizes[$icon]; |
|
78 | + } else { |
|
79 | + $icon_size = geodir_get_marker_size($icon); |
|
80 | + $gd_marker_sizes[$icon] = $icon_size; |
|
81 | + } |
|
82 | + } else { |
|
83 | + $icon_size = array('w' => 36, 'h' => 45); |
|
84 | + } |
|
85 | + |
|
86 | + $post_json = '{"id":"' . $post->ID . '","t": "' . $title . '","lt": "' . $post->post_latitude . '","ln": "' . $post->post_longitude . '","mk_id":"' . $post->ID . '_' . $post->default_category . '","i":"' . $icon . '","w":"' . $icon_size['w'] . '","h":"' . $icon_size['h'] . '"}'; |
|
87 | + |
|
88 | + /** |
|
89 | + * Filter the json data when creating output for post json marker.. |
|
90 | + * |
|
91 | + * @since 1.5.7 |
|
92 | + * @param string $post_json JSON representation of the post marker info. |
|
93 | + * @param object $post The post object. |
|
94 | + */ |
|
95 | + $map_jason[$post->ID] = apply_filters('geodir_create_marker_jason_of_posts',$post_json, $post); |
|
96 | + } |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | /** |
@@ -106,66 +106,66 @@ discard block |
||
106 | 106 | */ |
107 | 107 | function send_marker_jason_to_js() |
108 | 108 | { |
109 | - global $map_jason, $map_canvas_arr; |
|
110 | - |
|
111 | - if (is_array($map_canvas_arr) && !empty($map_canvas_arr)) { |
|
112 | - foreach ($map_canvas_arr as $canvas => $jason) { |
|
113 | - if (is_array($map_jason) && !empty($map_jason)) { |
|
114 | - |
|
115 | - // on details page only show the main marker on the map |
|
116 | - if(geodir_is_page('detail')){ |
|
117 | - global $post; |
|
118 | - if(isset($map_jason[$post->ID])){ |
|
119 | - $map_jason = array($map_jason[$post->ID]); |
|
120 | - } |
|
121 | - } |
|
122 | - $canvas_jason = $canvas . "_jason"; |
|
123 | - $map_canvas_arr[$canvas] = array_unique($map_jason); |
|
124 | - unset($cat_content_info); |
|
125 | - $cat_content_info[] = implode(',', $map_canvas_arr[$canvas]); |
|
126 | - $totalcount = count(array_unique($map_jason)); |
|
127 | - if (!empty($cat_content_info)) { |
|
128 | - $json_content = substr(implode(',', $cat_content_info), 1); |
|
129 | - $json_content = htmlentities($json_content, ENT_QUOTES, get_option('blog_charset')); // Quotes in csv title import break maps - FIXED by kiran on 2nd March, 2016 |
|
130 | - $canvas_jason = '[{"totalcount":"' . $totalcount . '",' . $json_content . ']'; |
|
131 | - } else { |
|
132 | - $canvas_jason = '[{"totalcount":"0"}]'; |
|
133 | - } |
|
134 | - $map_canvas_jason_args = array($canvas . '_jason' => $canvas_jason); |
|
135 | - |
|
136 | - /** |
|
137 | - * Filter the send_marker_jason_to_js() function map canvas json args. |
|
138 | - * |
|
139 | - * You can use this filter to modify map canvas json args. |
|
140 | - * |
|
141 | - * @since 1.0.0 |
|
142 | - * @package GeoDirectory |
|
143 | - * @param string $canvas Map canvas array key. |
|
144 | - * @param array $map_canvas_jason_args Map canvas args. |
|
145 | - */ |
|
146 | - $map_canvas_jason_args = apply_filters('geodir_map_canvas_jason_' . $canvas, $map_canvas_jason_args); |
|
147 | - |
|
148 | - wp_localize_script('geodir-map-widget', $canvas . '_jason_args', $map_canvas_jason_args); |
|
149 | - } else { |
|
150 | - $canvas_jason = '[{"totalcount":"0"}]'; |
|
151 | - $map_canvas_jason_args = array($canvas . '_jason' => $canvas_jason); |
|
152 | - |
|
153 | - /** |
|
154 | - * Filter the send_marker_jason_to_js() function map canvas json args. |
|
155 | - * |
|
156 | - * You can use this filter to modify map canvas json args. |
|
157 | - * |
|
158 | - * @since 1.0.0 |
|
159 | - * @package GeoDirectory |
|
160 | - * @param string $canvas Map canvas array key. |
|
161 | - * @param array $map_canvas_jason_args Map canvas args. |
|
162 | - */ |
|
163 | - $map_canvas_jason_args = apply_filters('geodir_map_canvas_jason_' . $canvas, $map_canvas_jason_args); |
|
164 | - wp_localize_script('geodir-map-widget', $canvas . '_jason_args', $map_canvas_jason_args); |
|
165 | - } |
|
166 | - } |
|
167 | - |
|
168 | - } |
|
109 | + global $map_jason, $map_canvas_arr; |
|
110 | + |
|
111 | + if (is_array($map_canvas_arr) && !empty($map_canvas_arr)) { |
|
112 | + foreach ($map_canvas_arr as $canvas => $jason) { |
|
113 | + if (is_array($map_jason) && !empty($map_jason)) { |
|
114 | + |
|
115 | + // on details page only show the main marker on the map |
|
116 | + if(geodir_is_page('detail')){ |
|
117 | + global $post; |
|
118 | + if(isset($map_jason[$post->ID])){ |
|
119 | + $map_jason = array($map_jason[$post->ID]); |
|
120 | + } |
|
121 | + } |
|
122 | + $canvas_jason = $canvas . "_jason"; |
|
123 | + $map_canvas_arr[$canvas] = array_unique($map_jason); |
|
124 | + unset($cat_content_info); |
|
125 | + $cat_content_info[] = implode(',', $map_canvas_arr[$canvas]); |
|
126 | + $totalcount = count(array_unique($map_jason)); |
|
127 | + if (!empty($cat_content_info)) { |
|
128 | + $json_content = substr(implode(',', $cat_content_info), 1); |
|
129 | + $json_content = htmlentities($json_content, ENT_QUOTES, get_option('blog_charset')); // Quotes in csv title import break maps - FIXED by kiran on 2nd March, 2016 |
|
130 | + $canvas_jason = '[{"totalcount":"' . $totalcount . '",' . $json_content . ']'; |
|
131 | + } else { |
|
132 | + $canvas_jason = '[{"totalcount":"0"}]'; |
|
133 | + } |
|
134 | + $map_canvas_jason_args = array($canvas . '_jason' => $canvas_jason); |
|
135 | + |
|
136 | + /** |
|
137 | + * Filter the send_marker_jason_to_js() function map canvas json args. |
|
138 | + * |
|
139 | + * You can use this filter to modify map canvas json args. |
|
140 | + * |
|
141 | + * @since 1.0.0 |
|
142 | + * @package GeoDirectory |
|
143 | + * @param string $canvas Map canvas array key. |
|
144 | + * @param array $map_canvas_jason_args Map canvas args. |
|
145 | + */ |
|
146 | + $map_canvas_jason_args = apply_filters('geodir_map_canvas_jason_' . $canvas, $map_canvas_jason_args); |
|
147 | + |
|
148 | + wp_localize_script('geodir-map-widget', $canvas . '_jason_args', $map_canvas_jason_args); |
|
149 | + } else { |
|
150 | + $canvas_jason = '[{"totalcount":"0"}]'; |
|
151 | + $map_canvas_jason_args = array($canvas . '_jason' => $canvas_jason); |
|
152 | + |
|
153 | + /** |
|
154 | + * Filter the send_marker_jason_to_js() function map canvas json args. |
|
155 | + * |
|
156 | + * You can use this filter to modify map canvas json args. |
|
157 | + * |
|
158 | + * @since 1.0.0 |
|
159 | + * @package GeoDirectory |
|
160 | + * @param string $canvas Map canvas array key. |
|
161 | + * @param array $map_canvas_jason_args Map canvas args. |
|
162 | + */ |
|
163 | + $map_canvas_jason_args = apply_filters('geodir_map_canvas_jason_' . $canvas, $map_canvas_jason_args); |
|
164 | + wp_localize_script('geodir-map-widget', $canvas . '_jason_args', $map_canvas_jason_args); |
|
165 | + } |
|
166 | + } |
|
167 | + |
|
168 | + } |
|
169 | 169 | } |
170 | 170 | |
171 | 171 | /** |
@@ -184,99 +184,99 @@ discard block |
||
184 | 184 | */ |
185 | 185 | function home_map_taxonomy_walker($cat_taxonomy, $cat_parent = 0, $hide_empty = true, $pading = 0, $map_canvas_name = '', $child_collapse, $is_home_map = false) |
186 | 186 | { |
187 | - global $cat_count, $geodir_cat_icons; |
|
187 | + global $cat_count, $geodir_cat_icons; |
|
188 | 188 | |
189 | - $exclude_categories = get_option('geodir_exclude_cat_on_map'); |
|
190 | - $exclude_categories_new = get_option('geodir_exclude_cat_on_map_upgrade'); |
|
189 | + $exclude_categories = get_option('geodir_exclude_cat_on_map'); |
|
190 | + $exclude_categories_new = get_option('geodir_exclude_cat_on_map_upgrade'); |
|
191 | 191 | |
192 | - // check if exclude categories saved before fix of categories identical names |
|
193 | - if ($exclude_categories_new) { |
|
194 | - $gd_cat_taxonomy = isset($cat_taxonomy[0]) ? $cat_taxonomy[0] : ''; |
|
195 | - $exclude_categories = !empty($exclude_categories[$gd_cat_taxonomy]) && is_array($exclude_categories[$gd_cat_taxonomy]) ? array_unique($exclude_categories[$gd_cat_taxonomy]) : array(); |
|
196 | - } |
|
192 | + // check if exclude categories saved before fix of categories identical names |
|
193 | + if ($exclude_categories_new) { |
|
194 | + $gd_cat_taxonomy = isset($cat_taxonomy[0]) ? $cat_taxonomy[0] : ''; |
|
195 | + $exclude_categories = !empty($exclude_categories[$gd_cat_taxonomy]) && is_array($exclude_categories[$gd_cat_taxonomy]) ? array_unique($exclude_categories[$gd_cat_taxonomy]) : array(); |
|
196 | + } |
|
197 | 197 | |
198 | - $exclude_cat_str = implode(',', $exclude_categories); |
|
198 | + $exclude_cat_str = implode(',', $exclude_categories); |
|
199 | 199 | |
200 | - if ($exclude_cat_str == '') { |
|
201 | - $exclude_cat_str = '0'; |
|
202 | - } |
|
200 | + if ($exclude_cat_str == '') { |
|
201 | + $exclude_cat_str = '0'; |
|
202 | + } |
|
203 | 203 | |
204 | - $cat_terms = get_terms($cat_taxonomy, array('parent' => $cat_parent, 'exclude' => $exclude_cat_str, 'hide_empty ' => $hide_empty)); |
|
204 | + $cat_terms = get_terms($cat_taxonomy, array('parent' => $cat_parent, 'exclude' => $exclude_cat_str, 'hide_empty ' => $hide_empty)); |
|
205 | 205 | |
206 | - if ($hide_empty) { |
|
207 | - $cat_terms = geodir_filter_empty_terms($cat_terms); |
|
208 | - } |
|
206 | + if ($hide_empty) { |
|
207 | + $cat_terms = geodir_filter_empty_terms($cat_terms); |
|
208 | + } |
|
209 | 209 | |
210 | - $main_list_class = ''; |
|
211 | - //If there are terms, start displaying |
|
212 | - if (count($cat_terms) > 0) { |
|
213 | - //Displaying as a list |
|
214 | - $p = $pading * 15; |
|
215 | - $pading++; |
|
210 | + $main_list_class = ''; |
|
211 | + //If there are terms, start displaying |
|
212 | + if (count($cat_terms) > 0) { |
|
213 | + //Displaying as a list |
|
214 | + $p = $pading * 15; |
|
215 | + $pading++; |
|
216 | 216 | |
217 | - if ($cat_parent == 0) { |
|
218 | - $list_class = 'main_list'; |
|
219 | - $display = ''; |
|
220 | - } else { |
|
221 | - $list_class = 'sub_list'; |
|
222 | - $display = !$child_collapse ? '' : 'display:none'; |
|
223 | - } |
|
217 | + if ($cat_parent == 0) { |
|
218 | + $list_class = 'main_list'; |
|
219 | + $display = ''; |
|
220 | + } else { |
|
221 | + $list_class = 'sub_list'; |
|
222 | + $display = !$child_collapse ? '' : 'display:none'; |
|
223 | + } |
|
224 | 224 | |
225 | 225 | |
226 | - $out = '<ul class="treeview ' . $list_class . '" style="margin-left:' . $p . 'px;' . $display . ';">'; |
|
226 | + $out = '<ul class="treeview ' . $list_class . '" style="margin-left:' . $p . 'px;' . $display . ';">'; |
|
227 | 227 | |
228 | - $geodir_cat_icons = geodir_get_term_icon(); |
|
228 | + $geodir_cat_icons = geodir_get_term_icon(); |
|
229 | 229 | |
230 | - $geodir_default_map_search_pt = (get_option('geodir_default_map_search_pt')) ? get_option('geodir_default_map_search_pt') : 'gd_place'; |
|
231 | - $post_type = isset($_REQUEST['post_type']) ? $_REQUEST['post_type'] : $geodir_default_map_search_pt; |
|
232 | - foreach ($cat_terms as $cat_term): |
|
230 | + $geodir_default_map_search_pt = (get_option('geodir_default_map_search_pt')) ? get_option('geodir_default_map_search_pt') : 'gd_place'; |
|
231 | + $post_type = isset($_REQUEST['post_type']) ? $_REQUEST['post_type'] : $geodir_default_map_search_pt; |
|
232 | + foreach ($cat_terms as $cat_term): |
|
233 | 233 | |
234 | 234 | |
235 | 235 | |
236 | - $icon = !empty($geodir_cat_icons) && isset($geodir_cat_icons[$cat_term->term_id]) ? $geodir_cat_icons[$cat_term->term_id] : ''; |
|
236 | + $icon = !empty($geodir_cat_icons) && isset($geodir_cat_icons[$cat_term->term_id]) ? $geodir_cat_icons[$cat_term->term_id] : ''; |
|
237 | 237 | |
238 | - if (!in_array($cat_term->term_id, $exclude_categories)): |
|
239 | - //Secret sauce. Function calls itself to display child elements, if any |
|
240 | - $checked = 'checked="checked"'; |
|
238 | + if (!in_array($cat_term->term_id, $exclude_categories)): |
|
239 | + //Secret sauce. Function calls itself to display child elements, if any |
|
240 | + $checked = 'checked="checked"'; |
|
241 | 241 | |
242 | - // Untick the category by default on home map |
|
243 | - if ($is_home_map && $geodir_home_map_untick = get_option('geodir_home_map_untick')) { |
|
244 | - if (function_exists('icl_object_id')) { // if WPML |
|
245 | - global $sitepress; |
|
246 | - $default_lang = $sitepress->get_default_language(); |
|
247 | - $term_id = icl_object_id($cat_term->term_id, $post_type.'category', true, $default_lang); |
|
248 | - }else{ |
|
249 | - $term_id = $cat_term->term_id; |
|
250 | - } |
|
251 | - if (!empty($geodir_home_map_untick) && in_array($post_type . '_' . $term_id, $geodir_home_map_untick)) { |
|
252 | - $checked = ''; |
|
253 | - } |
|
254 | - } |
|
242 | + // Untick the category by default on home map |
|
243 | + if ($is_home_map && $geodir_home_map_untick = get_option('geodir_home_map_untick')) { |
|
244 | + if (function_exists('icl_object_id')) { // if WPML |
|
245 | + global $sitepress; |
|
246 | + $default_lang = $sitepress->get_default_language(); |
|
247 | + $term_id = icl_object_id($cat_term->term_id, $post_type.'category', true, $default_lang); |
|
248 | + }else{ |
|
249 | + $term_id = $cat_term->term_id; |
|
250 | + } |
|
251 | + if (!empty($geodir_home_map_untick) && in_array($post_type . '_' . $term_id, $geodir_home_map_untick)) { |
|
252 | + $checked = ''; |
|
253 | + } |
|
254 | + } |
|
255 | 255 | |
256 | - $term_check = '<input type="checkbox" ' . $checked . ' id="' .$map_canvas_name.'_tick_cat_'. $cat_term->term_id . '" class="group_selector ' . $main_list_class . '"'; |
|
257 | - $term_check .= ' name="' . $map_canvas_name . '_cat[]" '; |
|
258 | - $term_check .= ' title="' . esc_attr(ucfirst($cat_term->name)) . '" value="' . $cat_term->term_id . '" onclick="javascript:build_map_ajax_search_param(\'' . $map_canvas_name . '\',false, this)">'; |
|
259 | - $term_img = '<img height="15" width="15" alt="' . $cat_term->taxonomy . '" src="' . $icon . '" title="' . ucfirst($cat_term->name) . '"/>'; |
|
260 | - $out .= '<li>' . $term_check . '<label for="' . $map_canvas_name.'_tick_cat_'. $cat_term->term_id . '">' . $term_img . ucfirst($cat_term->name) . '</label><i class="fa fa-long-arrow-down"></i>'; |
|
256 | + $term_check = '<input type="checkbox" ' . $checked . ' id="' .$map_canvas_name.'_tick_cat_'. $cat_term->term_id . '" class="group_selector ' . $main_list_class . '"'; |
|
257 | + $term_check .= ' name="' . $map_canvas_name . '_cat[]" '; |
|
258 | + $term_check .= ' title="' . esc_attr(ucfirst($cat_term->name)) . '" value="' . $cat_term->term_id . '" onclick="javascript:build_map_ajax_search_param(\'' . $map_canvas_name . '\',false, this)">'; |
|
259 | + $term_img = '<img height="15" width="15" alt="' . $cat_term->taxonomy . '" src="' . $icon . '" title="' . ucfirst($cat_term->name) . '"/>'; |
|
260 | + $out .= '<li>' . $term_check . '<label for="' . $map_canvas_name.'_tick_cat_'. $cat_term->term_id . '">' . $term_img . ucfirst($cat_term->name) . '</label><i class="fa fa-long-arrow-down"></i>'; |
|
261 | 261 | |
262 | - endif; |
|
262 | + endif; |
|
263 | 263 | |
264 | 264 | |
265 | - // get sub category by recursion |
|
266 | - $out .= home_map_taxonomy_walker($cat_taxonomy, $cat_term->term_id, $hide_empty, $pading, $map_canvas_name, $child_collapse, $is_home_map); |
|
265 | + // get sub category by recursion |
|
266 | + $out .= home_map_taxonomy_walker($cat_taxonomy, $cat_term->term_id, $hide_empty, $pading, $map_canvas_name, $child_collapse, $is_home_map); |
|
267 | 267 | |
268 | - $out .= '</li>'; |
|
268 | + $out .= '</li>'; |
|
269 | 269 | |
270 | - endforeach; |
|
270 | + endforeach; |
|
271 | 271 | |
272 | - $out .= '</ul>'; |
|
272 | + $out .= '</ul>'; |
|
273 | 273 | |
274 | - return $out; |
|
275 | - } else { |
|
276 | - if ($cat_parent == 0) |
|
277 | - return _e('No category', 'geodirectory'); |
|
278 | - } |
|
279 | - return; |
|
274 | + return $out; |
|
275 | + } else { |
|
276 | + if ($cat_parent == 0) |
|
277 | + return _e('No category', 'geodirectory'); |
|
278 | + } |
|
279 | + return; |
|
280 | 280 | } |
281 | 281 | |
282 | 282 | /** |
@@ -288,19 +288,19 @@ discard block |
||
288 | 288 | * @return string The map API provider name. |
289 | 289 | */ |
290 | 290 | function geodir_map_name() { |
291 | - $geodir_map_name = get_option('geodir_load_map', 'google'); |
|
291 | + $geodir_map_name = get_option('geodir_load_map', 'google'); |
|
292 | 292 | |
293 | - if (!in_array($geodir_map_name, array('none', 'auto', 'google', 'osm'))) { |
|
294 | - $geodir_map_name = 'auto'; |
|
295 | - } |
|
296 | - |
|
297 | - /** |
|
298 | - * Filter the map JS API provider name. |
|
299 | - * |
|
300 | - * @since 1.6.1 |
|
301 | - * @param string $geodir_map_name The map API provider name. |
|
302 | - */ |
|
303 | - return apply_filters('geodir_map_name', $geodir_map_name); |
|
293 | + if (!in_array($geodir_map_name, array('none', 'auto', 'google', 'osm'))) { |
|
294 | + $geodir_map_name = 'auto'; |
|
295 | + } |
|
296 | + |
|
297 | + /** |
|
298 | + * Filter the map JS API provider name. |
|
299 | + * |
|
300 | + * @since 1.6.1 |
|
301 | + * @param string $geodir_map_name The map API provider name. |
|
302 | + */ |
|
303 | + return apply_filters('geodir_map_name', $geodir_map_name); |
|
304 | 304 | } |
305 | 305 | |
306 | 306 | /** |
@@ -316,48 +316,48 @@ discard block |
||
316 | 316 | * @return array The icon size. |
317 | 317 | */ |
318 | 318 | function geodir_get_marker_size($icon, $default_size = array('w' => 36, 'h' => 45)) { |
319 | - global $gd_marker_sizes; |
|
319 | + global $gd_marker_sizes; |
|
320 | 320 | |
321 | - if (empty($gd_marker_sizes)) { |
|
322 | - $gd_marker_sizes = array(); |
|
323 | - } |
|
321 | + if (empty($gd_marker_sizes)) { |
|
322 | + $gd_marker_sizes = array(); |
|
323 | + } |
|
324 | 324 | |
325 | - if (!empty($gd_marker_sizes[$icon])) { |
|
326 | - return $gd_marker_sizes[$icon]; |
|
327 | - } |
|
325 | + if (!empty($gd_marker_sizes[$icon])) { |
|
326 | + return $gd_marker_sizes[$icon]; |
|
327 | + } |
|
328 | 328 | |
329 | - if (empty($icon)) { |
|
330 | - $gd_marker_sizes[$icon] = $default_size; |
|
329 | + if (empty($icon)) { |
|
330 | + $gd_marker_sizes[$icon] = $default_size; |
|
331 | 331 | |
332 | - return $default_size; |
|
333 | - } |
|
332 | + return $default_size; |
|
333 | + } |
|
334 | 334 | |
335 | - $icon_url = $icon; |
|
335 | + $icon_url = $icon; |
|
336 | 336 | |
337 | - $uploads = wp_upload_dir(); // Array of key => value pairs |
|
337 | + $uploads = wp_upload_dir(); // Array of key => value pairs |
|
338 | 338 | |
339 | - if (!path_is_absolute($icon)) { |
|
340 | - $icon = str_replace($uploads['baseurl'], $uploads['basedir'], $icon); |
|
341 | - } |
|
339 | + if (!path_is_absolute($icon)) { |
|
340 | + $icon = str_replace($uploads['baseurl'], $uploads['basedir'], $icon); |
|
341 | + } |
|
342 | 342 | |
343 | - if (!path_is_absolute($icon) && strpos($icon, WP_CONTENT_URL) !== false) { |
|
344 | - $icon = str_replace(WP_CONTENT_URL, WP_CONTENT_DIR, $icon); |
|
345 | - } |
|
343 | + if (!path_is_absolute($icon) && strpos($icon, WP_CONTENT_URL) !== false) { |
|
344 | + $icon = str_replace(WP_CONTENT_URL, WP_CONTENT_DIR, $icon); |
|
345 | + } |
|
346 | 346 | |
347 | - $sizes = array(); |
|
348 | - if (is_file($icon) && file_exists($icon)) { |
|
349 | - $size = getimagesize(trim($icon)); |
|
347 | + $sizes = array(); |
|
348 | + if (is_file($icon) && file_exists($icon)) { |
|
349 | + $size = getimagesize(trim($icon)); |
|
350 | 350 | |
351 | - if (!empty($size[0]) && !empty($size[1])) { |
|
352 | - $sizes = array('w' => $size[0], 'h' => $size[1]); |
|
353 | - } |
|
354 | - } |
|
351 | + if (!empty($size[0]) && !empty($size[1])) { |
|
352 | + $sizes = array('w' => $size[0], 'h' => $size[1]); |
|
353 | + } |
|
354 | + } |
|
355 | 355 | |
356 | - $sizes = !empty($sizes) ? $sizes : $default_size; |
|
356 | + $sizes = !empty($sizes) ? $sizes : $default_size; |
|
357 | 357 | |
358 | - $gd_marker_sizes[$icon_url] = $sizes; |
|
358 | + $gd_marker_sizes[$icon_url] = $sizes; |
|
359 | 359 | |
360 | - return $sizes; |
|
360 | + return $sizes; |
|
361 | 361 | } |
362 | 362 | |
363 | 363 | add_action('wp_footer', 'geodir_map_load_script', 10); |
@@ -369,8 +369,8 @@ discard block |
||
369 | 369 | * @package GeoDirectory |
370 | 370 | */ |
371 | 371 | function geodir_map_load_script() { |
372 | - if (in_array(geodir_map_name(), array('auto', 'google')) && wp_script_is( 'geodirectory-googlemap-script', 'done')) { |
|
373 | - $plugin_url = geodir_plugin_url(); |
|
372 | + if (in_array(geodir_map_name(), array('auto', 'google')) && wp_script_is( 'geodirectory-googlemap-script', 'done')) { |
|
373 | + $plugin_url = geodir_plugin_url(); |
|
374 | 374 | ?> |
375 | 375 | <script type="text/javascript"> |
376 | 376 | if (!(window.google && typeof google.maps !== 'undefined')) { |
@@ -384,5 +384,5 @@ discard block |
||
384 | 384 | } |
385 | 385 | </script> |
386 | 386 | <?php |
387 | - } |
|
387 | + } |
|
388 | 388 | } |
389 | 389 | \ No newline at end of file |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | |
55 | 55 | if (!empty($post) && isset($post->ID) && $post->ID > 0 && (is_main_query() || $add_post_in_marker_array) && $post->marker_json != '') { |
56 | 56 | |
57 | - if(isset($map_jason[$post->ID])){return null;} |
|
57 | + if (isset($map_jason[$post->ID])) {return null; } |
|
58 | 58 | |
59 | 59 | $srcharr = array("'", "/", "-", '"', '\\'); |
60 | 60 | $replarr = array("′", "⁄", "–", "“", ''); |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $title = str_replace($srcharr, $replarr, $post_title); |
68 | 68 | |
69 | 69 | if (is_ssl()) { |
70 | - $icon = str_replace("http:","https:",$icon ); |
|
70 | + $icon = str_replace("http:", "https:", $icon); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | if ($icon != '') { |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | $icon_size = array('w' => 36, 'h' => 45); |
84 | 84 | } |
85 | 85 | |
86 | - $post_json = '{"id":"' . $post->ID . '","t": "' . $title . '","lt": "' . $post->post_latitude . '","ln": "' . $post->post_longitude . '","mk_id":"' . $post->ID . '_' . $post->default_category . '","i":"' . $icon . '","w":"' . $icon_size['w'] . '","h":"' . $icon_size['h'] . '"}'; |
|
86 | + $post_json = '{"id":"'.$post->ID.'","t": "'.$title.'","lt": "'.$post->post_latitude.'","ln": "'.$post->post_longitude.'","mk_id":"'.$post->ID.'_'.$post->default_category.'","i":"'.$icon.'","w":"'.$icon_size['w'].'","h":"'.$icon_size['h'].'"}'; |
|
87 | 87 | |
88 | 88 | /** |
89 | 89 | * Filter the json data when creating output for post json marker.. |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | * @param string $post_json JSON representation of the post marker info. |
93 | 93 | * @param object $post The post object. |
94 | 94 | */ |
95 | - $map_jason[$post->ID] = apply_filters('geodir_create_marker_jason_of_posts',$post_json, $post); |
|
95 | + $map_jason[$post->ID] = apply_filters('geodir_create_marker_jason_of_posts', $post_json, $post); |
|
96 | 96 | } |
97 | 97 | } |
98 | 98 | |
@@ -113,13 +113,13 @@ discard block |
||
113 | 113 | if (is_array($map_jason) && !empty($map_jason)) { |
114 | 114 | |
115 | 115 | // on details page only show the main marker on the map |
116 | - if(geodir_is_page('detail')){ |
|
116 | + if (geodir_is_page('detail')) { |
|
117 | 117 | global $post; |
118 | - if(isset($map_jason[$post->ID])){ |
|
118 | + if (isset($map_jason[$post->ID])) { |
|
119 | 119 | $map_jason = array($map_jason[$post->ID]); |
120 | 120 | } |
121 | 121 | } |
122 | - $canvas_jason = $canvas . "_jason"; |
|
122 | + $canvas_jason = $canvas."_jason"; |
|
123 | 123 | $map_canvas_arr[$canvas] = array_unique($map_jason); |
124 | 124 | unset($cat_content_info); |
125 | 125 | $cat_content_info[] = implode(',', $map_canvas_arr[$canvas]); |
@@ -127,11 +127,11 @@ discard block |
||
127 | 127 | if (!empty($cat_content_info)) { |
128 | 128 | $json_content = substr(implode(',', $cat_content_info), 1); |
129 | 129 | $json_content = htmlentities($json_content, ENT_QUOTES, get_option('blog_charset')); // Quotes in csv title import break maps - FIXED by kiran on 2nd March, 2016 |
130 | - $canvas_jason = '[{"totalcount":"' . $totalcount . '",' . $json_content . ']'; |
|
130 | + $canvas_jason = '[{"totalcount":"'.$totalcount.'",'.$json_content.']'; |
|
131 | 131 | } else { |
132 | 132 | $canvas_jason = '[{"totalcount":"0"}]'; |
133 | 133 | } |
134 | - $map_canvas_jason_args = array($canvas . '_jason' => $canvas_jason); |
|
134 | + $map_canvas_jason_args = array($canvas.'_jason' => $canvas_jason); |
|
135 | 135 | |
136 | 136 | /** |
137 | 137 | * Filter the send_marker_jason_to_js() function map canvas json args. |
@@ -143,12 +143,12 @@ discard block |
||
143 | 143 | * @param string $canvas Map canvas array key. |
144 | 144 | * @param array $map_canvas_jason_args Map canvas args. |
145 | 145 | */ |
146 | - $map_canvas_jason_args = apply_filters('geodir_map_canvas_jason_' . $canvas, $map_canvas_jason_args); |
|
146 | + $map_canvas_jason_args = apply_filters('geodir_map_canvas_jason_'.$canvas, $map_canvas_jason_args); |
|
147 | 147 | |
148 | - wp_localize_script('geodir-map-widget', $canvas . '_jason_args', $map_canvas_jason_args); |
|
148 | + wp_localize_script('geodir-map-widget', $canvas.'_jason_args', $map_canvas_jason_args); |
|
149 | 149 | } else { |
150 | 150 | $canvas_jason = '[{"totalcount":"0"}]'; |
151 | - $map_canvas_jason_args = array($canvas . '_jason' => $canvas_jason); |
|
151 | + $map_canvas_jason_args = array($canvas.'_jason' => $canvas_jason); |
|
152 | 152 | |
153 | 153 | /** |
154 | 154 | * Filter the send_marker_jason_to_js() function map canvas json args. |
@@ -160,8 +160,8 @@ discard block |
||
160 | 160 | * @param string $canvas Map canvas array key. |
161 | 161 | * @param array $map_canvas_jason_args Map canvas args. |
162 | 162 | */ |
163 | - $map_canvas_jason_args = apply_filters('geodir_map_canvas_jason_' . $canvas, $map_canvas_jason_args); |
|
164 | - wp_localize_script('geodir-map-widget', $canvas . '_jason_args', $map_canvas_jason_args); |
|
163 | + $map_canvas_jason_args = apply_filters('geodir_map_canvas_jason_'.$canvas, $map_canvas_jason_args); |
|
164 | + wp_localize_script('geodir-map-widget', $canvas.'_jason_args', $map_canvas_jason_args); |
|
165 | 165 | } |
166 | 166 | } |
167 | 167 | |
@@ -223,11 +223,11 @@ discard block |
||
223 | 223 | } |
224 | 224 | |
225 | 225 | |
226 | - $out = '<ul class="treeview ' . $list_class . '" style="margin-left:' . $p . 'px;' . $display . ';">'; |
|
226 | + $out = '<ul class="treeview '.$list_class.'" style="margin-left:'.$p.'px;'.$display.';">'; |
|
227 | 227 | |
228 | 228 | $geodir_cat_icons = geodir_get_term_icon(); |
229 | 229 | |
230 | - $geodir_default_map_search_pt = (get_option('geodir_default_map_search_pt')) ? get_option('geodir_default_map_search_pt') : 'gd_place'; |
|
230 | + $geodir_default_map_search_pt = (get_option('geodir_default_map_search_pt')) ? get_option('geodir_default_map_search_pt') : 'gd_place'; |
|
231 | 231 | $post_type = isset($_REQUEST['post_type']) ? $_REQUEST['post_type'] : $geodir_default_map_search_pt; |
232 | 232 | foreach ($cat_terms as $cat_term): |
233 | 233 | |
@@ -245,19 +245,19 @@ discard block |
||
245 | 245 | global $sitepress; |
246 | 246 | $default_lang = $sitepress->get_default_language(); |
247 | 247 | $term_id = icl_object_id($cat_term->term_id, $post_type.'category', true, $default_lang); |
248 | - }else{ |
|
248 | + } else { |
|
249 | 249 | $term_id = $cat_term->term_id; |
250 | 250 | } |
251 | - if (!empty($geodir_home_map_untick) && in_array($post_type . '_' . $term_id, $geodir_home_map_untick)) { |
|
251 | + if (!empty($geodir_home_map_untick) && in_array($post_type.'_'.$term_id, $geodir_home_map_untick)) { |
|
252 | 252 | $checked = ''; |
253 | 253 | } |
254 | 254 | } |
255 | 255 | |
256 | - $term_check = '<input type="checkbox" ' . $checked . ' id="' .$map_canvas_name.'_tick_cat_'. $cat_term->term_id . '" class="group_selector ' . $main_list_class . '"'; |
|
257 | - $term_check .= ' name="' . $map_canvas_name . '_cat[]" '; |
|
258 | - $term_check .= ' title="' . esc_attr(ucfirst($cat_term->name)) . '" value="' . $cat_term->term_id . '" onclick="javascript:build_map_ajax_search_param(\'' . $map_canvas_name . '\',false, this)">'; |
|
259 | - $term_img = '<img height="15" width="15" alt="' . $cat_term->taxonomy . '" src="' . $icon . '" title="' . ucfirst($cat_term->name) . '"/>'; |
|
260 | - $out .= '<li>' . $term_check . '<label for="' . $map_canvas_name.'_tick_cat_'. $cat_term->term_id . '">' . $term_img . ucfirst($cat_term->name) . '</label><i class="fa fa-long-arrow-down"></i>'; |
|
256 | + $term_check = '<input type="checkbox" '.$checked.' id="'.$map_canvas_name.'_tick_cat_'.$cat_term->term_id.'" class="group_selector '.$main_list_class.'"'; |
|
257 | + $term_check .= ' name="'.$map_canvas_name.'_cat[]" '; |
|
258 | + $term_check .= ' title="'.esc_attr(ucfirst($cat_term->name)).'" value="'.$cat_term->term_id.'" onclick="javascript:build_map_ajax_search_param(\''.$map_canvas_name.'\',false, this)">'; |
|
259 | + $term_img = '<img height="15" width="15" alt="'.$cat_term->taxonomy.'" src="'.$icon.'" title="'.ucfirst($cat_term->name).'"/>'; |
|
260 | + $out .= '<li>'.$term_check.'<label for="'.$map_canvas_name.'_tick_cat_'.$cat_term->term_id.'">'.$term_img.ucfirst($cat_term->name).'</label><i class="fa fa-long-arrow-down"></i>'; |
|
261 | 261 | |
262 | 262 | endif; |
263 | 263 | |
@@ -369,18 +369,18 @@ discard block |
||
369 | 369 | * @package GeoDirectory |
370 | 370 | */ |
371 | 371 | function geodir_map_load_script() { |
372 | - if (in_array(geodir_map_name(), array('auto', 'google')) && wp_script_is( 'geodirectory-googlemap-script', 'done')) { |
|
372 | + if (in_array(geodir_map_name(), array('auto', 'google')) && wp_script_is('geodirectory-googlemap-script', 'done')) { |
|
373 | 373 | $plugin_url = geodir_plugin_url(); |
374 | 374 | ?> |
375 | 375 | <script type="text/javascript"> |
376 | 376 | if (!(window.google && typeof google.maps !== 'undefined')) { |
377 | - var css = document.createElement("link");css.setAttribute("rel","stylesheet");css.setAttribute("type","text/css");css.setAttribute("media","all");css.setAttribute("id","geodirectory-leaflet-style-css");css.setAttribute("href","<?php echo $plugin_url;?>/geodirectory-assets/leaflet/leaflet.css?ver=<?php echo GEODIRECTORY_VERSION;?>"); |
|
377 | + var css = document.createElement("link");css.setAttribute("rel","stylesheet");css.setAttribute("type","text/css");css.setAttribute("media","all");css.setAttribute("id","geodirectory-leaflet-style-css");css.setAttribute("href","<?php echo $plugin_url; ?>/geodirectory-assets/leaflet/leaflet.css?ver=<?php echo GEODIRECTORY_VERSION; ?>"); |
|
378 | 378 | document.getElementsByTagName("head")[0].appendChild(css); |
379 | - var css = document.createElement("link");css.setAttribute("rel","stylesheet");css.setAttribute("type","text/css");css.setAttribute("media","all");css.setAttribute("id","geodirectory-leaflet-routing-style");css.setAttribute("href","<?php echo $plugin_url;?>/geodirectory-assets/leaflet/routing/leaflet-routing-machine.css?ver=<?php echo GEODIRECTORY_VERSION;?>"); |
|
379 | + var css = document.createElement("link");css.setAttribute("rel","stylesheet");css.setAttribute("type","text/css");css.setAttribute("media","all");css.setAttribute("id","geodirectory-leaflet-routing-style");css.setAttribute("href","<?php echo $plugin_url; ?>/geodirectory-assets/leaflet/routing/leaflet-routing-machine.css?ver=<?php echo GEODIRECTORY_VERSION; ?>"); |
|
380 | 380 | document.getElementsByTagName("head")[0].appendChild(css); |
381 | - document.write('<' + 'script id="geodirectory-leaflet-script" src="<?php echo $plugin_url;?>/geodirectory-assets/leaflet/leaflet.min.js?ver=<?php echo GEODIRECTORY_VERSION;?>" type="text/javascript"><' + '/script>'); |
|
382 | - document.write('<' + 'script id="geodirectory-leaflet-geo-script" src="<?php echo $plugin_url;?>/geodirectory-assets/leaflet/osm.geocode.js?ver=<?php echo GEODIRECTORY_VERSION;?>" type="text/javascript"><' + '/script>'); |
|
383 | - document.write('<' + 'script id="geodirectory-leaflet-routing-script" src="<?php echo $plugin_url;?>/geodirectory-assets/leaflet/routing/leaflet-routing-machine.js?ver=<?php echo GEODIRECTORY_VERSION;?>" type="text/javascript"><' + '/script>'); |
|
381 | + document.write('<' + 'script id="geodirectory-leaflet-script" src="<?php echo $plugin_url; ?>/geodirectory-assets/leaflet/leaflet.min.js?ver=<?php echo GEODIRECTORY_VERSION; ?>" type="text/javascript"><' + '/script>'); |
|
382 | + document.write('<' + 'script id="geodirectory-leaflet-geo-script" src="<?php echo $plugin_url; ?>/geodirectory-assets/leaflet/osm.geocode.js?ver=<?php echo GEODIRECTORY_VERSION; ?>" type="text/javascript"><' + '/script>'); |
|
383 | + document.write('<' + 'script id="geodirectory-leaflet-routing-script" src="<?php echo $plugin_url; ?>/geodirectory-assets/leaflet/routing/leaflet-routing-machine.js?ver=<?php echo GEODIRECTORY_VERSION; ?>" type="text/javascript"><' + '/script>'); |
|
384 | 384 | } |
385 | 385 | </script> |
386 | 386 | <?php |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | global $sitepress; |
246 | 246 | $default_lang = $sitepress->get_default_language(); |
247 | 247 | $term_id = icl_object_id($cat_term->term_id, $post_type.'category', true, $default_lang); |
248 | - }else{ |
|
248 | + } else{ |
|
249 | 249 | $term_id = $cat_term->term_id; |
250 | 250 | } |
251 | 251 | if (!empty($geodir_home_map_untick) && in_array($post_type . '_' . $term_id, $geodir_home_map_untick)) { |
@@ -273,8 +273,9 @@ discard block |
||
273 | 273 | |
274 | 274 | return $out; |
275 | 275 | } else { |
276 | - if ($cat_parent == 0) |
|
277 | - return _e('No category', 'geodirectory'); |
|
276 | + if ($cat_parent == 0) { |
|
277 | + return _e('No category', 'geodirectory'); |
|
278 | + } |
|
278 | 279 | } |
279 | 280 | return; |
280 | 281 | } |
@@ -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') && !class_exists('BuddyPress')) { |
|
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') && !class_exists('BuddyPress')) { |
|
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,271 +118,271 @@ 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 | - gd_die(); |
|
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_insert_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.6.11 |
|
164 | - * @param string $posttype The post type to insert. |
|
165 | - * @param string $datatype The type of dummy data to insert. |
|
166 | - */ |
|
167 | - do_action('geodir_delete_dummy_posts' ,sanitize_key($_REQUEST['posttype']),sanitize_key(['datatype'])); |
|
168 | - break; |
|
169 | - case "geodir_dummy_insert" : |
|
170 | - if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'geodir_dummy_posts_insert_noncename')) |
|
171 | - return; |
|
172 | - |
|
173 | - global $city_bound_lat1, $city_bound_lng1, $city_bound_lat2, $city_bound_lng2; |
|
174 | - $city_bound_lat1 = $_REQUEST['city_bound_lat1']; |
|
175 | - $city_bound_lng1 = $_REQUEST['city_bound_lng1']; |
|
176 | - $city_bound_lat2 = $_REQUEST['city_bound_lat2']; |
|
177 | - $city_bound_lng2 = $_REQUEST['city_bound_lng2']; |
|
178 | - |
|
179 | - if (isset($_REQUEST['posttype'])){ |
|
180 | - /** |
|
181 | - * Used to insert the dummy post data per post type. |
|
182 | - * |
|
183 | - * Uses dynamic hook, geodir_insert_dummy_posts_$_REQUEST['posttype']. |
|
184 | - * |
|
185 | - * @since 1.6.11 |
|
186 | - * @param string $posttype The post type to insert. |
|
187 | - * @param string $datatype The type of dummy data to insert. |
|
188 | - * @param int $post_index The item number to insert. |
|
189 | - */ |
|
190 | - do_action('geodir_insert_dummy_posts',sanitize_key($_REQUEST['posttype']),sanitize_key($_REQUEST['datatype']),absint($_REQUEST['insert_dummy_post_index'])); |
|
191 | - } |
|
192 | - |
|
193 | - |
|
194 | - break; |
|
195 | - endswitch; |
|
196 | - } else { |
|
197 | - wp_redirect(geodir_login_url()); |
|
198 | - exit(); |
|
199 | - } |
|
200 | - } |
|
201 | - |
|
202 | - if (isset($_REQUEST['popuptype']) && $_REQUEST['popuptype'] != '' && isset($_REQUEST['post_id']) && $_REQUEST['post_id'] != '') { |
|
203 | - |
|
204 | - if ($_REQUEST['popuptype'] == 'b_send_inquiry' || $_REQUEST['popuptype'] == 'b_sendtofriend') { |
|
205 | - $template = locate_template(array("geodirectory/popup-forms.php")); |
|
206 | - if (!$template) { |
|
207 | - $template = geodir_plugin_path() . '/geodirectory-templates/popup-forms.php'; |
|
208 | - } |
|
209 | - require_once($template); |
|
210 | - } |
|
211 | - |
|
212 | - gd_die(); |
|
213 | - } |
|
214 | - |
|
215 | - /*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 | + gd_die(); |
|
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_insert_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.6.11 |
|
164 | + * @param string $posttype The post type to insert. |
|
165 | + * @param string $datatype The type of dummy data to insert. |
|
166 | + */ |
|
167 | + do_action('geodir_delete_dummy_posts' ,sanitize_key($_REQUEST['posttype']),sanitize_key(['datatype'])); |
|
168 | + break; |
|
169 | + case "geodir_dummy_insert" : |
|
170 | + if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'geodir_dummy_posts_insert_noncename')) |
|
171 | + return; |
|
172 | + |
|
173 | + global $city_bound_lat1, $city_bound_lng1, $city_bound_lat2, $city_bound_lng2; |
|
174 | + $city_bound_lat1 = $_REQUEST['city_bound_lat1']; |
|
175 | + $city_bound_lng1 = $_REQUEST['city_bound_lng1']; |
|
176 | + $city_bound_lat2 = $_REQUEST['city_bound_lat2']; |
|
177 | + $city_bound_lng2 = $_REQUEST['city_bound_lng2']; |
|
178 | + |
|
179 | + if (isset($_REQUEST['posttype'])){ |
|
180 | + /** |
|
181 | + * Used to insert the dummy post data per post type. |
|
182 | + * |
|
183 | + * Uses dynamic hook, geodir_insert_dummy_posts_$_REQUEST['posttype']. |
|
184 | + * |
|
185 | + * @since 1.6.11 |
|
186 | + * @param string $posttype The post type to insert. |
|
187 | + * @param string $datatype The type of dummy data to insert. |
|
188 | + * @param int $post_index The item number to insert. |
|
189 | + */ |
|
190 | + do_action('geodir_insert_dummy_posts',sanitize_key($_REQUEST['posttype']),sanitize_key($_REQUEST['datatype']),absint($_REQUEST['insert_dummy_post_index'])); |
|
191 | + } |
|
192 | + |
|
193 | + |
|
194 | + break; |
|
195 | + endswitch; |
|
196 | + } else { |
|
197 | + wp_redirect(geodir_login_url()); |
|
198 | + exit(); |
|
199 | + } |
|
200 | + } |
|
201 | + |
|
202 | + if (isset($_REQUEST['popuptype']) && $_REQUEST['popuptype'] != '' && isset($_REQUEST['post_id']) && $_REQUEST['post_id'] != '') { |
|
203 | + |
|
204 | + if ($_REQUEST['popuptype'] == 'b_send_inquiry' || $_REQUEST['popuptype'] == 'b_sendtofriend') { |
|
205 | + $template = locate_template(array("geodirectory/popup-forms.php")); |
|
206 | + if (!$template) { |
|
207 | + $template = geodir_plugin_path() . '/geodirectory-templates/popup-forms.php'; |
|
208 | + } |
|
209 | + require_once($template); |
|
210 | + } |
|
211 | + |
|
212 | + gd_die(); |
|
213 | + } |
|
214 | + |
|
215 | + /*if(isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'filter_ajax'){ |
|
216 | 216 | include_once ( geodir_plugin_path() . '/geodirectory-templates/advance-search-form.php'); |
217 | 217 | }*/ |
218 | 218 | |
219 | - if (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'map_ajax') { |
|
220 | - /** |
|
221 | - * Contains map marker functions. |
|
222 | - * |
|
223 | - * @since 1.0.0 |
|
224 | - * @package GeoDirectory |
|
225 | - */ |
|
226 | - include_once(geodir_plugin_path() . '/geodirectory-functions/map-functions/get_markers.php'); |
|
227 | - } |
|
228 | - |
|
229 | - if (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'favorite') { |
|
230 | - if (is_user_logged_in()) { |
|
231 | - switch ($_REQUEST['ajax_action']): |
|
232 | - case "add" : |
|
233 | - geodir_add_to_favorite((int)$_REQUEST['pid']); |
|
234 | - break; |
|
235 | - case "remove" : |
|
236 | - geodir_remove_from_favorite((int)$_REQUEST['pid']); |
|
237 | - break; |
|
238 | - endswitch; |
|
239 | - } else { |
|
240 | - wp_redirect(geodir_login_url()); |
|
241 | - exit(); |
|
242 | - } |
|
243 | - } |
|
244 | - |
|
245 | - if (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'add_listing') { |
|
246 | - |
|
247 | - $is_current_user_owner = true; |
|
248 | - if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { |
|
249 | - $is_current_user_owner = geodir_listing_belong_to_current_user((int)$_REQUEST['pid']); |
|
250 | - } |
|
251 | - |
|
252 | - $request = $gd_session->get('listing'); |
|
253 | - |
|
254 | - if (is_user_logged_in() && $is_current_user_owner) { |
|
255 | - |
|
256 | - switch ($_REQUEST['ajax_action']): |
|
257 | - case "add": |
|
258 | - case "update": |
|
259 | - |
|
260 | - if (isset($request['geodir_spamblocker']) && $request['geodir_spamblocker'] == '64' && isset($request['geodir_filled_by_spam_bot']) && $request['geodir_filled_by_spam_bot'] == '') { |
|
261 | - $last_id = geodir_save_listing(); |
|
262 | - |
|
263 | - if ($last_id) { |
|
264 | - //$redirect_to = get_permalink( $last_id ); |
|
265 | - $redirect_to = geodir_getlink(get_permalink(geodir_success_page_id()), array('pid' => $last_id)); |
|
266 | - |
|
267 | - } elseif (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { |
|
268 | - $redirect_to = get_permalink(geodir_add_listing_page_id()); |
|
269 | - $redirect_to = geodir_getlink($redirect_to, array('pid' => $post->pid), false); |
|
270 | - } else |
|
271 | - $redirect_to = get_permalink(geodir_add_listing_page_id()); |
|
272 | - |
|
273 | - wp_redirect($redirect_to); |
|
274 | - } else { |
|
275 | - $gd_session->un_set('listing'); |
|
276 | - wp_redirect(home_url()); |
|
277 | - } |
|
278 | - |
|
279 | - break; |
|
280 | - case "cancel" : |
|
281 | - |
|
282 | - $gd_session->un_set('listing'); |
|
283 | - |
|
284 | - if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '' && get_permalink($_REQUEST['pid'])) |
|
285 | - wp_redirect(get_permalink($_REQUEST['pid'])); |
|
286 | - else { |
|
287 | - geodir_remove_temp_images(); |
|
288 | - wp_redirect(geodir_getlink(get_permalink(geodir_add_listing_page_id()), array('listing_type' => $_REQUEST['listing_type']))); |
|
289 | - } |
|
290 | - |
|
291 | - break; |
|
292 | - |
|
293 | - case "publish" : |
|
294 | - |
|
295 | - if (isset($request['geodir_spamblocker']) && $request['geodir_spamblocker'] == '64' && isset($request['geodir_filled_by_spam_bot']) && $request['geodir_filled_by_spam_bot'] == '') { |
|
296 | - |
|
297 | - if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { |
|
298 | - $new_post = array(); |
|
299 | - $new_post['ID'] = $_REQUEST['pid']; |
|
300 | - |
|
301 | - $lastid = wp_update_post($new_post); |
|
302 | - |
|
303 | - $gd_session->un_set('listing'); |
|
304 | - wp_redirect(get_permalink($lastid)); |
|
305 | - } else { |
|
306 | - $last_id = geodir_save_listing(); |
|
307 | - |
|
308 | - if ($last_id) { |
|
309 | - //$redirect_to = get_permalink( $last_id ); |
|
310 | - $redirect_to = geodir_getlink(get_permalink(geodir_success_page_id()), array('pid' => $last_id)); |
|
311 | - } elseif (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { |
|
312 | - $redirect_to = get_permalink(geodir_add_listing_page_id()); |
|
313 | - $redirect_to = geodir_getlink($redirect_to, array('pid' => $post->pid), false); |
|
314 | - } else |
|
315 | - $redirect_to = get_permalink(geodir_add_listing_page_id()); |
|
316 | - |
|
317 | - $gd_session->un_set('listing'); |
|
318 | - wp_redirect($redirect_to); |
|
319 | - } |
|
320 | - } else { |
|
321 | - $gd_session->un_set('listing'); |
|
322 | - wp_redirect(home_url()); |
|
323 | - } |
|
324 | - |
|
325 | - break; |
|
326 | - case "delete" : |
|
327 | - if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { |
|
328 | - global $current_user; |
|
329 | - |
|
330 | - if (get_option('geodir_disable_perm_delete')) { |
|
331 | - $lastid = wp_trash_post($_REQUEST['pid']); |
|
332 | - } else { |
|
333 | - $lastid = wp_delete_post($_REQUEST['pid']); |
|
334 | - } |
|
335 | - |
|
336 | - if ($lastid && !is_wp_error($lastid)) |
|
337 | - wp_redirect($_SERVER['HTTP_REFERER']); |
|
338 | - |
|
339 | - //wp_redirect( geodir_getlink(get_author_posts_url($current_user->ID),array('geodir_dashbord'=>'true','stype'=>$post_type ),false) ); |
|
340 | - } |
|
341 | - break; |
|
342 | - endswitch; |
|
343 | - |
|
344 | - $gd_session->un_set('listing'); |
|
345 | - } else { |
|
346 | - $gd_session->un_set('listing'); |
|
347 | - wp_redirect(geodir_login_url()); |
|
348 | - exit(); |
|
349 | - } |
|
350 | - } |
|
351 | - |
|
352 | - if (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'user_login') { |
|
353 | - /** |
|
354 | - * Contains registration and login functions. |
|
355 | - * @todo Fix the file path. |
|
356 | - * |
|
357 | - * @since 1.0.0 |
|
358 | - * @package GeoDirectory |
|
359 | - */ |
|
360 | - include_once(geodir_plugin_path() . '/geodirectory-functions/geodirectory_reg.php'); |
|
361 | - } |
|
362 | - |
|
363 | - if (isset($_REQUEST['ajax_action']) && $_REQUEST['ajax_action'] == 'geodir_get_term_list') { |
|
364 | - $args = array('taxonomy' => sanitize_text_field($_REQUEST['term'])); |
|
365 | - if (!empty($_REQUEST['parent_only'])) { |
|
366 | - $args['parent'] = 0; |
|
367 | - } |
|
368 | - $terms_o = get_terms($args); |
|
219 | + if (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'map_ajax') { |
|
220 | + /** |
|
221 | + * Contains map marker functions. |
|
222 | + * |
|
223 | + * @since 1.0.0 |
|
224 | + * @package GeoDirectory |
|
225 | + */ |
|
226 | + include_once(geodir_plugin_path() . '/geodirectory-functions/map-functions/get_markers.php'); |
|
227 | + } |
|
228 | + |
|
229 | + if (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'favorite') { |
|
230 | + if (is_user_logged_in()) { |
|
231 | + switch ($_REQUEST['ajax_action']): |
|
232 | + case "add" : |
|
233 | + geodir_add_to_favorite((int)$_REQUEST['pid']); |
|
234 | + break; |
|
235 | + case "remove" : |
|
236 | + geodir_remove_from_favorite((int)$_REQUEST['pid']); |
|
237 | + break; |
|
238 | + endswitch; |
|
239 | + } else { |
|
240 | + wp_redirect(geodir_login_url()); |
|
241 | + exit(); |
|
242 | + } |
|
243 | + } |
|
244 | + |
|
245 | + if (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'add_listing') { |
|
246 | + |
|
247 | + $is_current_user_owner = true; |
|
248 | + if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { |
|
249 | + $is_current_user_owner = geodir_listing_belong_to_current_user((int)$_REQUEST['pid']); |
|
250 | + } |
|
251 | + |
|
252 | + $request = $gd_session->get('listing'); |
|
253 | + |
|
254 | + if (is_user_logged_in() && $is_current_user_owner) { |
|
255 | + |
|
256 | + switch ($_REQUEST['ajax_action']): |
|
257 | + case "add": |
|
258 | + case "update": |
|
259 | + |
|
260 | + if (isset($request['geodir_spamblocker']) && $request['geodir_spamblocker'] == '64' && isset($request['geodir_filled_by_spam_bot']) && $request['geodir_filled_by_spam_bot'] == '') { |
|
261 | + $last_id = geodir_save_listing(); |
|
262 | + |
|
263 | + if ($last_id) { |
|
264 | + //$redirect_to = get_permalink( $last_id ); |
|
265 | + $redirect_to = geodir_getlink(get_permalink(geodir_success_page_id()), array('pid' => $last_id)); |
|
266 | + |
|
267 | + } elseif (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { |
|
268 | + $redirect_to = get_permalink(geodir_add_listing_page_id()); |
|
269 | + $redirect_to = geodir_getlink($redirect_to, array('pid' => $post->pid), false); |
|
270 | + } else |
|
271 | + $redirect_to = get_permalink(geodir_add_listing_page_id()); |
|
272 | + |
|
273 | + wp_redirect($redirect_to); |
|
274 | + } else { |
|
275 | + $gd_session->un_set('listing'); |
|
276 | + wp_redirect(home_url()); |
|
277 | + } |
|
278 | + |
|
279 | + break; |
|
280 | + case "cancel" : |
|
281 | + |
|
282 | + $gd_session->un_set('listing'); |
|
283 | + |
|
284 | + if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '' && get_permalink($_REQUEST['pid'])) |
|
285 | + wp_redirect(get_permalink($_REQUEST['pid'])); |
|
286 | + else { |
|
287 | + geodir_remove_temp_images(); |
|
288 | + wp_redirect(geodir_getlink(get_permalink(geodir_add_listing_page_id()), array('listing_type' => $_REQUEST['listing_type']))); |
|
289 | + } |
|
290 | + |
|
291 | + break; |
|
292 | + |
|
293 | + case "publish" : |
|
294 | + |
|
295 | + if (isset($request['geodir_spamblocker']) && $request['geodir_spamblocker'] == '64' && isset($request['geodir_filled_by_spam_bot']) && $request['geodir_filled_by_spam_bot'] == '') { |
|
296 | + |
|
297 | + if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { |
|
298 | + $new_post = array(); |
|
299 | + $new_post['ID'] = $_REQUEST['pid']; |
|
300 | + |
|
301 | + $lastid = wp_update_post($new_post); |
|
302 | + |
|
303 | + $gd_session->un_set('listing'); |
|
304 | + wp_redirect(get_permalink($lastid)); |
|
305 | + } else { |
|
306 | + $last_id = geodir_save_listing(); |
|
307 | + |
|
308 | + if ($last_id) { |
|
309 | + //$redirect_to = get_permalink( $last_id ); |
|
310 | + $redirect_to = geodir_getlink(get_permalink(geodir_success_page_id()), array('pid' => $last_id)); |
|
311 | + } elseif (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { |
|
312 | + $redirect_to = get_permalink(geodir_add_listing_page_id()); |
|
313 | + $redirect_to = geodir_getlink($redirect_to, array('pid' => $post->pid), false); |
|
314 | + } else |
|
315 | + $redirect_to = get_permalink(geodir_add_listing_page_id()); |
|
316 | + |
|
317 | + $gd_session->un_set('listing'); |
|
318 | + wp_redirect($redirect_to); |
|
319 | + } |
|
320 | + } else { |
|
321 | + $gd_session->un_set('listing'); |
|
322 | + wp_redirect(home_url()); |
|
323 | + } |
|
324 | + |
|
325 | + break; |
|
326 | + case "delete" : |
|
327 | + if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { |
|
328 | + global $current_user; |
|
329 | + |
|
330 | + if (get_option('geodir_disable_perm_delete')) { |
|
331 | + $lastid = wp_trash_post($_REQUEST['pid']); |
|
332 | + } else { |
|
333 | + $lastid = wp_delete_post($_REQUEST['pid']); |
|
334 | + } |
|
335 | + |
|
336 | + if ($lastid && !is_wp_error($lastid)) |
|
337 | + wp_redirect($_SERVER['HTTP_REFERER']); |
|
338 | + |
|
339 | + //wp_redirect( geodir_getlink(get_author_posts_url($current_user->ID),array('geodir_dashbord'=>'true','stype'=>$post_type ),false) ); |
|
340 | + } |
|
341 | + break; |
|
342 | + endswitch; |
|
343 | + |
|
344 | + $gd_session->un_set('listing'); |
|
345 | + } else { |
|
346 | + $gd_session->un_set('listing'); |
|
347 | + wp_redirect(geodir_login_url()); |
|
348 | + exit(); |
|
349 | + } |
|
350 | + } |
|
351 | + |
|
352 | + if (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'user_login') { |
|
353 | + /** |
|
354 | + * Contains registration and login functions. |
|
355 | + * @todo Fix the file path. |
|
356 | + * |
|
357 | + * @since 1.0.0 |
|
358 | + * @package GeoDirectory |
|
359 | + */ |
|
360 | + include_once(geodir_plugin_path() . '/geodirectory-functions/geodirectory_reg.php'); |
|
361 | + } |
|
362 | + |
|
363 | + if (isset($_REQUEST['ajax_action']) && $_REQUEST['ajax_action'] == 'geodir_get_term_list') { |
|
364 | + $args = array('taxonomy' => sanitize_text_field($_REQUEST['term'])); |
|
365 | + if (!empty($_REQUEST['parent_only'])) { |
|
366 | + $args['parent'] = 0; |
|
367 | + } |
|
368 | + $terms_o = get_terms($args); |
|
369 | 369 | |
370 | - // Skip terms which has no listing |
|
371 | - if (!empty($terms_o)) { |
|
372 | - $filter_terms = array(); |
|
370 | + // Skip terms which has no listing |
|
371 | + if (!empty($terms_o)) { |
|
372 | + $filter_terms = array(); |
|
373 | 373 | |
374 | - foreach ($terms_o as $term) { |
|
375 | - if (isset($term->count) && $term->count > 0) { |
|
376 | - $filter_terms[] = $term; |
|
377 | - } |
|
378 | - } |
|
379 | - $terms_o = $filter_terms; |
|
380 | - } |
|
374 | + foreach ($terms_o as $term) { |
|
375 | + if (isset($term->count) && $term->count > 0) { |
|
376 | + $filter_terms[] = $term; |
|
377 | + } |
|
378 | + } |
|
379 | + $terms_o = $filter_terms; |
|
380 | + } |
|
381 | 381 | |
382 | - $terms = geodir_sort_terms($terms_o, 'count'); |
|
383 | - geodir_helper_cat_list_output($terms, intval($_REQUEST['limit'])); |
|
384 | - exit(); |
|
385 | - } |
|
382 | + $terms = geodir_sort_terms($terms_o, 'count'); |
|
383 | + geodir_helper_cat_list_output($terms, intval($_REQUEST['limit'])); |
|
384 | + exit(); |
|
385 | + } |
|
386 | 386 | |
387 | - gd_die(); |
|
387 | + gd_die(); |
|
388 | 388 | } |
@@ -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 | |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | * @since 1.0.0 |
83 | 83 | * @package GeoDirectory |
84 | 84 | */ |
85 | - include_once(geodir_plugin_path() . '/geodirectory-functions/map-functions/get_markers.php'); |
|
85 | + include_once(geodir_plugin_path().'/geodirectory-functions/map-functions/get_markers.php'); |
|
86 | 86 | die; |
87 | 87 | } |
88 | 88 | |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | * @since 1.0.0 |
141 | 141 | * @package GeoDirectory |
142 | 142 | */ |
143 | - include_once(geodir_plugin_path() . '/geodirectory-admin/geodir_admin_ajax.php'); |
|
143 | + include_once(geodir_plugin_path().'/geodirectory-admin/geodir_admin_ajax.php'); |
|
144 | 144 | } else { |
145 | 145 | wp_redirect(geodir_login_url()); |
146 | 146 | gd_die(); |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | * @param string $posttype The post type to insert. |
165 | 165 | * @param string $datatype The type of dummy data to insert. |
166 | 166 | */ |
167 | - do_action('geodir_delete_dummy_posts' ,sanitize_key($_REQUEST['posttype']),sanitize_key(['datatype'])); |
|
167 | + do_action('geodir_delete_dummy_posts', sanitize_key($_REQUEST['posttype']), sanitize_key(['datatype'])); |
|
168 | 168 | break; |
169 | 169 | case "geodir_dummy_insert" : |
170 | 170 | if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'geodir_dummy_posts_insert_noncename')) |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | $city_bound_lat2 = $_REQUEST['city_bound_lat2']; |
177 | 177 | $city_bound_lng2 = $_REQUEST['city_bound_lng2']; |
178 | 178 | |
179 | - if (isset($_REQUEST['posttype'])){ |
|
179 | + if (isset($_REQUEST['posttype'])) { |
|
180 | 180 | /** |
181 | 181 | * Used to insert the dummy post data per post type. |
182 | 182 | * |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | * @param string $datatype The type of dummy data to insert. |
188 | 188 | * @param int $post_index The item number to insert. |
189 | 189 | */ |
190 | - do_action('geodir_insert_dummy_posts',sanitize_key($_REQUEST['posttype']),sanitize_key($_REQUEST['datatype']),absint($_REQUEST['insert_dummy_post_index'])); |
|
190 | + do_action('geodir_insert_dummy_posts', sanitize_key($_REQUEST['posttype']), sanitize_key($_REQUEST['datatype']), absint($_REQUEST['insert_dummy_post_index'])); |
|
191 | 191 | } |
192 | 192 | |
193 | 193 | |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | if ($_REQUEST['popuptype'] == 'b_send_inquiry' || $_REQUEST['popuptype'] == 'b_sendtofriend') { |
205 | 205 | $template = locate_template(array("geodirectory/popup-forms.php")); |
206 | 206 | if (!$template) { |
207 | - $template = geodir_plugin_path() . '/geodirectory-templates/popup-forms.php'; |
|
207 | + $template = geodir_plugin_path().'/geodirectory-templates/popup-forms.php'; |
|
208 | 208 | } |
209 | 209 | require_once($template); |
210 | 210 | } |
@@ -223,17 +223,17 @@ discard block |
||
223 | 223 | * @since 1.0.0 |
224 | 224 | * @package GeoDirectory |
225 | 225 | */ |
226 | - include_once(geodir_plugin_path() . '/geodirectory-functions/map-functions/get_markers.php'); |
|
226 | + include_once(geodir_plugin_path().'/geodirectory-functions/map-functions/get_markers.php'); |
|
227 | 227 | } |
228 | 228 | |
229 | 229 | if (isset($_REQUEST['geodir_ajax']) && $_REQUEST['geodir_ajax'] == 'favorite') { |
230 | 230 | if (is_user_logged_in()) { |
231 | 231 | switch ($_REQUEST['ajax_action']): |
232 | 232 | case "add" : |
233 | - geodir_add_to_favorite((int)$_REQUEST['pid']); |
|
233 | + geodir_add_to_favorite((int) $_REQUEST['pid']); |
|
234 | 234 | break; |
235 | 235 | case "remove" : |
236 | - geodir_remove_from_favorite((int)$_REQUEST['pid']); |
|
236 | + geodir_remove_from_favorite((int) $_REQUEST['pid']); |
|
237 | 237 | break; |
238 | 238 | endswitch; |
239 | 239 | } else { |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | |
247 | 247 | $is_current_user_owner = true; |
248 | 248 | if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { |
249 | - $is_current_user_owner = geodir_listing_belong_to_current_user((int)$_REQUEST['pid']); |
|
249 | + $is_current_user_owner = geodir_listing_belong_to_current_user((int) $_REQUEST['pid']); |
|
250 | 250 | } |
251 | 251 | |
252 | 252 | $request = $gd_session->get('listing'); |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | * @since 1.0.0 |
358 | 358 | * @package GeoDirectory |
359 | 359 | */ |
360 | - include_once(geodir_plugin_path() . '/geodirectory-functions/geodirectory_reg.php'); |
|
360 | + include_once(geodir_plugin_path().'/geodirectory-functions/geodirectory_reg.php'); |
|
361 | 361 | } |
362 | 362 | |
363 | 363 | if (isset($_REQUEST['ajax_action']) && $_REQUEST['ajax_action'] == 'geodir_get_term_list') { |
@@ -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,11 +152,12 @@ 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_insert_noncename')) |
|
155 | - return; |
|
155 | + if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'geodir_dummy_posts_insert_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']. |
@@ -164,11 +166,13 @@ discard block |
||
164 | 166 | * @param string $posttype The post type to insert. |
165 | 167 | * @param string $datatype The type of dummy data to insert. |
166 | 168 | */ |
167 | - do_action('geodir_delete_dummy_posts' ,sanitize_key($_REQUEST['posttype']),sanitize_key(['datatype'])); |
|
169 | + do_action('geodir_delete_dummy_posts' ,sanitize_key($_REQUEST['posttype']),sanitize_key(['datatype'])); |
|
170 | + } |
|
168 | 171 | break; |
169 | 172 | case "geodir_dummy_insert" : |
170 | - if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'geodir_dummy_posts_insert_noncename')) |
|
171 | - return; |
|
173 | + if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'geodir_dummy_posts_insert_noncename')) { |
|
174 | + return; |
|
175 | + } |
|
172 | 176 | |
173 | 177 | global $city_bound_lat1, $city_bound_lng1, $city_bound_lat2, $city_bound_lng2; |
174 | 178 | $city_bound_lat1 = $_REQUEST['city_bound_lat1']; |
@@ -267,8 +271,9 @@ discard block |
||
267 | 271 | } elseif (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { |
268 | 272 | $redirect_to = get_permalink(geodir_add_listing_page_id()); |
269 | 273 | $redirect_to = geodir_getlink($redirect_to, array('pid' => $post->pid), false); |
270 | - } else |
|
271 | - $redirect_to = get_permalink(geodir_add_listing_page_id()); |
|
274 | + } else { |
|
275 | + $redirect_to = get_permalink(geodir_add_listing_page_id()); |
|
276 | + } |
|
272 | 277 | |
273 | 278 | wp_redirect($redirect_to); |
274 | 279 | } else { |
@@ -281,9 +286,9 @@ discard block |
||
281 | 286 | |
282 | 287 | $gd_session->un_set('listing'); |
283 | 288 | |
284 | - if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '' && get_permalink($_REQUEST['pid'])) |
|
285 | - wp_redirect(get_permalink($_REQUEST['pid'])); |
|
286 | - else { |
|
289 | + if (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '' && get_permalink($_REQUEST['pid'])) { |
|
290 | + wp_redirect(get_permalink($_REQUEST['pid'])); |
|
291 | + } else { |
|
287 | 292 | geodir_remove_temp_images(); |
288 | 293 | wp_redirect(geodir_getlink(get_permalink(geodir_add_listing_page_id()), array('listing_type' => $_REQUEST['listing_type']))); |
289 | 294 | } |
@@ -311,8 +316,9 @@ discard block |
||
311 | 316 | } elseif (isset($_REQUEST['pid']) && $_REQUEST['pid'] != '') { |
312 | 317 | $redirect_to = get_permalink(geodir_add_listing_page_id()); |
313 | 318 | $redirect_to = geodir_getlink($redirect_to, array('pid' => $post->pid), false); |
314 | - } else |
|
315 | - $redirect_to = get_permalink(geodir_add_listing_page_id()); |
|
319 | + } else { |
|
320 | + $redirect_to = get_permalink(geodir_add_listing_page_id()); |
|
321 | + } |
|
316 | 322 | |
317 | 323 | $gd_session->un_set('listing'); |
318 | 324 | wp_redirect($redirect_to); |
@@ -333,8 +339,9 @@ discard block |
||
333 | 339 | $lastid = wp_delete_post($_REQUEST['pid']); |
334 | 340 | } |
335 | 341 | |
336 | - if ($lastid && !is_wp_error($lastid)) |
|
337 | - wp_redirect($_SERVER['HTTP_REFERER']); |
|
342 | + if ($lastid && !is_wp_error($lastid)) { |
|
343 | + wp_redirect($_SERVER['HTTP_REFERER']); |
|
344 | + } |
|
338 | 345 | |
339 | 346 | //wp_redirect( geodir_getlink(get_author_posts_url($current_user->ID),array('geodir_dashbord'=>'true','stype'=>$post_type ),false) ); |
340 | 347 | } |
@@ -7,212 +7,212 @@ discard block |
||
7 | 7 | */ |
8 | 8 | |
9 | 9 | function geodir_property_sale_custom_fields($post_type='gd_place',$package_id=''){ |
10 | - $fields = array(); |
|
11 | - $package = ($package_id=='') ? '' : array($package_id); |
|
12 | - |
|
13 | - // price |
|
14 | - $fields[] = array('listing_type' => $post_type, |
|
15 | - 'field_type' => 'text', |
|
16 | - 'data_type' => 'FLOAT', |
|
17 | - 'decimal_point' => '2', |
|
18 | - 'admin_title' => __('Price', 'geodirectory'), |
|
19 | - 'site_title' => __('Price', 'geodirectory'), |
|
20 | - 'admin_desc' => __('Enter the price per calendar month (PCM)in $ (no currency symbol)', 'geodirectory'), |
|
21 | - 'htmlvar_name' => 'price', |
|
22 | - 'is_active' => true, |
|
23 | - 'for_admin_use' => false, |
|
24 | - 'default_value' => '', |
|
25 | - 'show_in' => '[detail],[listing]', |
|
26 | - 'is_required' => false, |
|
27 | - 'validation_pattern' => '\d+(\.\d{2})?', |
|
28 | - 'validation_msg' => 'Please enter number and decimal only ie: 100.50', |
|
29 | - 'required_msg' => '', |
|
30 | - 'field_icon' => 'fa fa-usd', |
|
31 | - 'css_class' => '', |
|
32 | - 'cat_sort' => true, |
|
33 | - 'cat_filter' => true, |
|
34 | - 'extra' => array( |
|
35 | - 'is_price' => 1, |
|
36 | - 'thousand_separator' => 'comma', |
|
37 | - 'decimal_separator' => 'period', |
|
38 | - 'decimal_display' => 'if', |
|
39 | - 'currency_symbol' => '$', |
|
40 | - 'currency_symbol_placement' => 'left' |
|
41 | - ) |
|
42 | - ); |
|
43 | - |
|
44 | - // property status |
|
45 | - $fields[] = array('listing_type' => $post_type, |
|
46 | - 'data_type' => 'VARCHAR', |
|
47 | - 'field_type' => 'select', |
|
48 | - 'field_type_key' => 'property_status', |
|
49 | - 'is_active' => 1, |
|
50 | - 'for_admin_use' => 0, |
|
51 | - 'is_default' => 0, |
|
52 | - 'admin_title' => __('Property Status', 'geodirectory'), |
|
53 | - 'admin_desc' => __('Enter the status of the property.', 'geodirectory'), |
|
54 | - 'site_title' => __('Property Status', 'geodirectory'), |
|
55 | - 'htmlvar_name' => 'property_status', |
|
56 | - 'default_value' => '', |
|
57 | - 'is_required' => '1', |
|
58 | - 'required_msg' => '', |
|
59 | - 'show_in' => '[detail],[listing]', |
|
60 | - 'show_on_pkg' => $package, |
|
61 | - 'option_values' => 'Select Status/,For Rent,Let,Under Offer', |
|
62 | - 'field_icon' => 'fa fa-home', |
|
63 | - 'css_class' => '', |
|
64 | - 'cat_sort' => 1, |
|
65 | - 'cat_filter' => 1, |
|
66 | - ); |
|
67 | - |
|
68 | - // property furnishing |
|
69 | - $fields[] = array('listing_type' => $post_type, |
|
70 | - 'field_type' => 'select', |
|
71 | - 'data_type' => 'VARCHAR', |
|
72 | - 'admin_title' => __('Furnishing', 'geodirectory'), |
|
73 | - 'site_title' => __('Furnishing', 'geodirectory'), |
|
74 | - 'admin_desc' => __('Enter the furnishing status of the property.', 'geodirectory'), |
|
75 | - 'htmlvar_name' => 'property_furnishing', |
|
76 | - 'is_active' => true, |
|
77 | - 'for_admin_use' => false, |
|
78 | - 'default_value' => '', |
|
79 | - 'show_in' => '[detail],[listing]', |
|
80 | - 'is_required' => true, |
|
81 | - 'option_values' => __('Select Status/,Unfurnished,Furnished,Partially furnished,Optional','geodirectory'), |
|
82 | - 'validation_pattern' => '', |
|
83 | - 'validation_msg' => '', |
|
84 | - 'required_msg' => '', |
|
85 | - 'field_icon' => 'fa fa-th-large', |
|
86 | - 'css_class' => '', |
|
87 | - 'cat_sort' => true, |
|
88 | - 'cat_filter' => true |
|
89 | - ); |
|
90 | - |
|
91 | - // property type |
|
92 | - $fields[] = array('listing_type' => $post_type, |
|
93 | - 'field_type' => 'select', |
|
94 | - 'data_type' => 'VARCHAR', |
|
95 | - 'admin_title' => __('Property Type', 'geodirectory'), |
|
96 | - 'site_title' => __('Property Type', 'geodirectory'), |
|
97 | - 'admin_desc' => __('Select the property type.', 'geodirectory'), |
|
98 | - 'htmlvar_name' => 'property_type', |
|
99 | - 'is_active' => true, |
|
100 | - 'for_admin_use' => false, |
|
101 | - 'default_value' => '', |
|
102 | - 'show_in' => '[detail],[listing]', |
|
103 | - 'is_required' => true, |
|
104 | - 'option_values' => __('Select Type/,Detached house,Semi-detached house,Apartment,Bungalow,Semi-detached bungalow,Chalet,Town House,End-terrace house,Terrace house,Cottage,Hotel,Land','geodirectory'), |
|
105 | - 'validation_pattern' => '', |
|
106 | - 'validation_msg' => '', |
|
107 | - 'required_msg' => '', |
|
108 | - 'field_icon' => 'fa fa-home', |
|
109 | - 'css_class' => '', |
|
110 | - 'cat_sort' => true, |
|
111 | - 'cat_filter' => true |
|
112 | - ); |
|
113 | - |
|
114 | - // property bedrooms |
|
115 | - $fields[] = array('listing_type' => $post_type, |
|
116 | - 'field_type' => 'select', |
|
117 | - 'data_type' => 'VARCHAR', |
|
118 | - 'admin_title' => __('Property Bedrooms', 'geodirectory'), |
|
119 | - 'site_title' => __('Bedrooms', 'geodirectory'), |
|
120 | - 'admin_desc' => __('Select the number of bedrooms', 'geodirectory'), |
|
121 | - 'htmlvar_name' => 'property_bedrooms', |
|
122 | - 'is_active' => true, |
|
123 | - 'for_admin_use' => false, |
|
124 | - 'default_value' => '', |
|
125 | - 'show_in' => '[detail],[listing]', |
|
126 | - 'is_required' => true, |
|
127 | - 'option_values' => __('Select Bedrooms/,1,2,3,4,5,6,7,8,9,10','geodirectory'), |
|
128 | - 'validation_pattern' => '', |
|
129 | - 'validation_msg' => '', |
|
130 | - 'required_msg' => '', |
|
131 | - 'field_icon' => 'fa fa-bed', |
|
132 | - 'css_class' => '', |
|
133 | - 'cat_sort' => true, |
|
134 | - 'cat_filter' => true |
|
135 | - ); |
|
136 | - |
|
137 | - // property bathrooms |
|
138 | - $fields[] = array('listing_type' => $post_type, |
|
139 | - 'field_type' => 'select', |
|
140 | - 'data_type' => 'VARCHAR', |
|
141 | - 'admin_title' => __('Property Bathrooms', 'geodirectory'), |
|
142 | - 'site_title' => __('Bathrooms', 'geodirectory'), |
|
143 | - 'admin_desc' => __('Select the number of bathrooms', 'geodirectory'), |
|
144 | - 'htmlvar_name' => 'property_bathrooms', |
|
145 | - 'is_active' => true, |
|
146 | - 'for_admin_use' => false, |
|
147 | - 'default_value' => '', |
|
148 | - 'show_in' => '[detail],[listing]', |
|
149 | - 'is_required' => true, |
|
150 | - 'option_values' => __('Select Bathrooms/,1,2,3,4,5,6,7,8,9,10','geodirectory'), |
|
151 | - 'validation_pattern' => '', |
|
152 | - 'validation_msg' => '', |
|
153 | - 'required_msg' => '', |
|
154 | - 'field_icon' => 'fa fa-bold', |
|
155 | - 'css_class' => '', |
|
156 | - 'cat_sort' => true, |
|
157 | - 'cat_filter' => true |
|
158 | - ); |
|
159 | - |
|
160 | - // property area |
|
161 | - $fields[] = array('listing_type' => $post_type, |
|
162 | - 'field_type' => 'text', |
|
163 | - 'data_type' => 'FLOAT', |
|
164 | - 'admin_title' => __('Property Area', 'geodirectory'), |
|
165 | - 'site_title' => __('Area (Sq Ft)', 'geodirectory'), |
|
166 | - 'admin_desc' => __('Enter the Sq Ft value for the property', 'geodirectory'), |
|
167 | - 'htmlvar_name' => 'property_area', |
|
168 | - 'is_active' => true, |
|
169 | - 'for_admin_use' => false, |
|
170 | - 'default_value' => '', |
|
171 | - 'show_in' => '[detail],[listing]', |
|
172 | - 'is_required' => false, |
|
173 | - 'validation_pattern' => '\d+(\.\d{2})?', |
|
174 | - 'validation_msg' => 'Please enter the property area in numbers only: 1500', |
|
175 | - 'required_msg' => '', |
|
176 | - 'field_icon' => 'fa fa-area-chart', |
|
177 | - 'css_class' => '', |
|
178 | - 'cat_sort' => true, |
|
179 | - 'cat_filter' => true |
|
180 | - ); |
|
181 | - |
|
182 | - // property features |
|
183 | - $fields[] = array('listing_type' => $post_type, |
|
184 | - 'field_type' => 'multiselect', |
|
185 | - 'data_type' => 'VARCHAR', |
|
186 | - 'admin_title' => __('Property Features', 'geodirectory'), |
|
187 | - 'site_title' => __('Features', 'geodirectory'), |
|
188 | - 'admin_desc' => __('Select the property features.', 'geodirectory'), |
|
189 | - 'htmlvar_name' => 'property_features', |
|
190 | - 'is_active' => true, |
|
191 | - 'for_admin_use' => false, |
|
192 | - 'default_value' => '', |
|
193 | - 'show_in' => '[detail],[listing]', |
|
194 | - 'is_required' => true, |
|
195 | - 'option_values' => __('Select Features/,Gas Central Heating,Oil Central Heating,Double Glazing,Triple Glazing,Front Garden,Garage,Private driveway,Off Road Parking,Fireplace','geodirectory'), |
|
196 | - 'validation_pattern' => '', |
|
197 | - 'validation_msg' => '', |
|
198 | - 'required_msg' => '', |
|
199 | - 'field_icon' => 'fa fa-plus-square', |
|
200 | - 'css_class' => 'gd-comma-list', |
|
201 | - 'cat_sort' => true, |
|
202 | - 'cat_filter' => true |
|
203 | - ); |
|
204 | - |
|
205 | - |
|
206 | - |
|
207 | - /** |
|
208 | - * Filter the array of default custom fields DB table data. |
|
209 | - * |
|
210 | - * @since 1.6.6 |
|
211 | - * @param string $fields The default custom fields as an array. |
|
212 | - */ |
|
213 | - $fields = apply_filters('geodir_property_sale_custom_fields', $fields); |
|
214 | - |
|
215 | - return $fields; |
|
10 | + $fields = array(); |
|
11 | + $package = ($package_id=='') ? '' : array($package_id); |
|
12 | + |
|
13 | + // price |
|
14 | + $fields[] = array('listing_type' => $post_type, |
|
15 | + 'field_type' => 'text', |
|
16 | + 'data_type' => 'FLOAT', |
|
17 | + 'decimal_point' => '2', |
|
18 | + 'admin_title' => __('Price', 'geodirectory'), |
|
19 | + 'site_title' => __('Price', 'geodirectory'), |
|
20 | + 'admin_desc' => __('Enter the price per calendar month (PCM)in $ (no currency symbol)', 'geodirectory'), |
|
21 | + 'htmlvar_name' => 'price', |
|
22 | + 'is_active' => true, |
|
23 | + 'for_admin_use' => false, |
|
24 | + 'default_value' => '', |
|
25 | + 'show_in' => '[detail],[listing]', |
|
26 | + 'is_required' => false, |
|
27 | + 'validation_pattern' => '\d+(\.\d{2})?', |
|
28 | + 'validation_msg' => 'Please enter number and decimal only ie: 100.50', |
|
29 | + 'required_msg' => '', |
|
30 | + 'field_icon' => 'fa fa-usd', |
|
31 | + 'css_class' => '', |
|
32 | + 'cat_sort' => true, |
|
33 | + 'cat_filter' => true, |
|
34 | + 'extra' => array( |
|
35 | + 'is_price' => 1, |
|
36 | + 'thousand_separator' => 'comma', |
|
37 | + 'decimal_separator' => 'period', |
|
38 | + 'decimal_display' => 'if', |
|
39 | + 'currency_symbol' => '$', |
|
40 | + 'currency_symbol_placement' => 'left' |
|
41 | + ) |
|
42 | + ); |
|
43 | + |
|
44 | + // property status |
|
45 | + $fields[] = array('listing_type' => $post_type, |
|
46 | + 'data_type' => 'VARCHAR', |
|
47 | + 'field_type' => 'select', |
|
48 | + 'field_type_key' => 'property_status', |
|
49 | + 'is_active' => 1, |
|
50 | + 'for_admin_use' => 0, |
|
51 | + 'is_default' => 0, |
|
52 | + 'admin_title' => __('Property Status', 'geodirectory'), |
|
53 | + 'admin_desc' => __('Enter the status of the property.', 'geodirectory'), |
|
54 | + 'site_title' => __('Property Status', 'geodirectory'), |
|
55 | + 'htmlvar_name' => 'property_status', |
|
56 | + 'default_value' => '', |
|
57 | + 'is_required' => '1', |
|
58 | + 'required_msg' => '', |
|
59 | + 'show_in' => '[detail],[listing]', |
|
60 | + 'show_on_pkg' => $package, |
|
61 | + 'option_values' => 'Select Status/,For Rent,Let,Under Offer', |
|
62 | + 'field_icon' => 'fa fa-home', |
|
63 | + 'css_class' => '', |
|
64 | + 'cat_sort' => 1, |
|
65 | + 'cat_filter' => 1, |
|
66 | + ); |
|
67 | + |
|
68 | + // property furnishing |
|
69 | + $fields[] = array('listing_type' => $post_type, |
|
70 | + 'field_type' => 'select', |
|
71 | + 'data_type' => 'VARCHAR', |
|
72 | + 'admin_title' => __('Furnishing', 'geodirectory'), |
|
73 | + 'site_title' => __('Furnishing', 'geodirectory'), |
|
74 | + 'admin_desc' => __('Enter the furnishing status of the property.', 'geodirectory'), |
|
75 | + 'htmlvar_name' => 'property_furnishing', |
|
76 | + 'is_active' => true, |
|
77 | + 'for_admin_use' => false, |
|
78 | + 'default_value' => '', |
|
79 | + 'show_in' => '[detail],[listing]', |
|
80 | + 'is_required' => true, |
|
81 | + 'option_values' => __('Select Status/,Unfurnished,Furnished,Partially furnished,Optional','geodirectory'), |
|
82 | + 'validation_pattern' => '', |
|
83 | + 'validation_msg' => '', |
|
84 | + 'required_msg' => '', |
|
85 | + 'field_icon' => 'fa fa-th-large', |
|
86 | + 'css_class' => '', |
|
87 | + 'cat_sort' => true, |
|
88 | + 'cat_filter' => true |
|
89 | + ); |
|
90 | + |
|
91 | + // property type |
|
92 | + $fields[] = array('listing_type' => $post_type, |
|
93 | + 'field_type' => 'select', |
|
94 | + 'data_type' => 'VARCHAR', |
|
95 | + 'admin_title' => __('Property Type', 'geodirectory'), |
|
96 | + 'site_title' => __('Property Type', 'geodirectory'), |
|
97 | + 'admin_desc' => __('Select the property type.', 'geodirectory'), |
|
98 | + 'htmlvar_name' => 'property_type', |
|
99 | + 'is_active' => true, |
|
100 | + 'for_admin_use' => false, |
|
101 | + 'default_value' => '', |
|
102 | + 'show_in' => '[detail],[listing]', |
|
103 | + 'is_required' => true, |
|
104 | + 'option_values' => __('Select Type/,Detached house,Semi-detached house,Apartment,Bungalow,Semi-detached bungalow,Chalet,Town House,End-terrace house,Terrace house,Cottage,Hotel,Land','geodirectory'), |
|
105 | + 'validation_pattern' => '', |
|
106 | + 'validation_msg' => '', |
|
107 | + 'required_msg' => '', |
|
108 | + 'field_icon' => 'fa fa-home', |
|
109 | + 'css_class' => '', |
|
110 | + 'cat_sort' => true, |
|
111 | + 'cat_filter' => true |
|
112 | + ); |
|
113 | + |
|
114 | + // property bedrooms |
|
115 | + $fields[] = array('listing_type' => $post_type, |
|
116 | + 'field_type' => 'select', |
|
117 | + 'data_type' => 'VARCHAR', |
|
118 | + 'admin_title' => __('Property Bedrooms', 'geodirectory'), |
|
119 | + 'site_title' => __('Bedrooms', 'geodirectory'), |
|
120 | + 'admin_desc' => __('Select the number of bedrooms', 'geodirectory'), |
|
121 | + 'htmlvar_name' => 'property_bedrooms', |
|
122 | + 'is_active' => true, |
|
123 | + 'for_admin_use' => false, |
|
124 | + 'default_value' => '', |
|
125 | + 'show_in' => '[detail],[listing]', |
|
126 | + 'is_required' => true, |
|
127 | + 'option_values' => __('Select Bedrooms/,1,2,3,4,5,6,7,8,9,10','geodirectory'), |
|
128 | + 'validation_pattern' => '', |
|
129 | + 'validation_msg' => '', |
|
130 | + 'required_msg' => '', |
|
131 | + 'field_icon' => 'fa fa-bed', |
|
132 | + 'css_class' => '', |
|
133 | + 'cat_sort' => true, |
|
134 | + 'cat_filter' => true |
|
135 | + ); |
|
136 | + |
|
137 | + // property bathrooms |
|
138 | + $fields[] = array('listing_type' => $post_type, |
|
139 | + 'field_type' => 'select', |
|
140 | + 'data_type' => 'VARCHAR', |
|
141 | + 'admin_title' => __('Property Bathrooms', 'geodirectory'), |
|
142 | + 'site_title' => __('Bathrooms', 'geodirectory'), |
|
143 | + 'admin_desc' => __('Select the number of bathrooms', 'geodirectory'), |
|
144 | + 'htmlvar_name' => 'property_bathrooms', |
|
145 | + 'is_active' => true, |
|
146 | + 'for_admin_use' => false, |
|
147 | + 'default_value' => '', |
|
148 | + 'show_in' => '[detail],[listing]', |
|
149 | + 'is_required' => true, |
|
150 | + 'option_values' => __('Select Bathrooms/,1,2,3,4,5,6,7,8,9,10','geodirectory'), |
|
151 | + 'validation_pattern' => '', |
|
152 | + 'validation_msg' => '', |
|
153 | + 'required_msg' => '', |
|
154 | + 'field_icon' => 'fa fa-bold', |
|
155 | + 'css_class' => '', |
|
156 | + 'cat_sort' => true, |
|
157 | + 'cat_filter' => true |
|
158 | + ); |
|
159 | + |
|
160 | + // property area |
|
161 | + $fields[] = array('listing_type' => $post_type, |
|
162 | + 'field_type' => 'text', |
|
163 | + 'data_type' => 'FLOAT', |
|
164 | + 'admin_title' => __('Property Area', 'geodirectory'), |
|
165 | + 'site_title' => __('Area (Sq Ft)', 'geodirectory'), |
|
166 | + 'admin_desc' => __('Enter the Sq Ft value for the property', 'geodirectory'), |
|
167 | + 'htmlvar_name' => 'property_area', |
|
168 | + 'is_active' => true, |
|
169 | + 'for_admin_use' => false, |
|
170 | + 'default_value' => '', |
|
171 | + 'show_in' => '[detail],[listing]', |
|
172 | + 'is_required' => false, |
|
173 | + 'validation_pattern' => '\d+(\.\d{2})?', |
|
174 | + 'validation_msg' => 'Please enter the property area in numbers only: 1500', |
|
175 | + 'required_msg' => '', |
|
176 | + 'field_icon' => 'fa fa-area-chart', |
|
177 | + 'css_class' => '', |
|
178 | + 'cat_sort' => true, |
|
179 | + 'cat_filter' => true |
|
180 | + ); |
|
181 | + |
|
182 | + // property features |
|
183 | + $fields[] = array('listing_type' => $post_type, |
|
184 | + 'field_type' => 'multiselect', |
|
185 | + 'data_type' => 'VARCHAR', |
|
186 | + 'admin_title' => __('Property Features', 'geodirectory'), |
|
187 | + 'site_title' => __('Features', 'geodirectory'), |
|
188 | + 'admin_desc' => __('Select the property features.', 'geodirectory'), |
|
189 | + 'htmlvar_name' => 'property_features', |
|
190 | + 'is_active' => true, |
|
191 | + 'for_admin_use' => false, |
|
192 | + 'default_value' => '', |
|
193 | + 'show_in' => '[detail],[listing]', |
|
194 | + 'is_required' => true, |
|
195 | + 'option_values' => __('Select Features/,Gas Central Heating,Oil Central Heating,Double Glazing,Triple Glazing,Front Garden,Garage,Private driveway,Off Road Parking,Fireplace','geodirectory'), |
|
196 | + 'validation_pattern' => '', |
|
197 | + 'validation_msg' => '', |
|
198 | + 'required_msg' => '', |
|
199 | + 'field_icon' => 'fa fa-plus-square', |
|
200 | + 'css_class' => 'gd-comma-list', |
|
201 | + 'cat_sort' => true, |
|
202 | + 'cat_filter' => true |
|
203 | + ); |
|
204 | + |
|
205 | + |
|
206 | + |
|
207 | + /** |
|
208 | + * Filter the array of default custom fields DB table data. |
|
209 | + * |
|
210 | + * @since 1.6.6 |
|
211 | + * @param string $fields The default custom fields as an array. |
|
212 | + */ |
|
213 | + $fields = apply_filters('geodir_property_sale_custom_fields', $fields); |
|
214 | + |
|
215 | + return $fields; |
|
216 | 216 | } |
217 | 217 | |
218 | 218 | global $city_bound_lat1, $city_bound_lng1, $city_bound_lat2, $city_bound_lng2,$wpdb, $current_user,$dummy_post_index; |
@@ -222,37 +222,37 @@ discard block |
||
222 | 222 | $category_array = array('Apartments', 'Houses', 'Commercial', 'Land'); |
223 | 223 | |
224 | 224 | if($dummy_post_index==1){ |
225 | - // add the dummy categories |
|
226 | - geodir_dummy_data_taxonomies($post_type,$category_array ); |
|
227 | - |
|
228 | - // add the dummy custom fields |
|
229 | - $fields = geodir_property_sale_custom_fields($post_type); |
|
230 | - geodir_create_dummy_fields($fields); |
|
231 | - // update the type currently installed |
|
232 | - update_option($post_type.'_dummy_data_type','property_rent'); |
|
225 | + // add the dummy categories |
|
226 | + geodir_dummy_data_taxonomies($post_type,$category_array ); |
|
227 | + |
|
228 | + // add the dummy custom fields |
|
229 | + $fields = geodir_property_sale_custom_fields($post_type); |
|
230 | + geodir_create_dummy_fields($fields); |
|
231 | + // update the type currently installed |
|
232 | + update_option($post_type.'_dummy_data_type','property_rent'); |
|
233 | 233 | } |
234 | 234 | |
235 | 235 | if (geodir_dummy_folder_exists()) |
236 | - $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy"; |
|
236 | + $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy"; |
|
237 | 237 | else |
238 | - $dummy_image_url = 'http://www.wpgeodirectory.com/dummy'; |
|
238 | + $dummy_image_url = 'http://www.wpgeodirectory.com/dummy'; |
|
239 | 239 | |
240 | 240 | $dummy_image_url = apply_filters('place_dummy_image_url', $dummy_image_url); |
241 | 241 | |
242 | 242 | switch ($dummy_post_index) { |
243 | 243 | |
244 | - case(1): |
|
245 | - $image_array[] = "$dummy_image_url/ps/psf1.jpg"; |
|
246 | - $image_array[] = "$dummy_image_url/ps/psl1.jpg"; |
|
247 | - $image_array[] = "$dummy_image_url/ps/psb1.jpg"; |
|
248 | - $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
249 | - $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
244 | + case(1): |
|
245 | + $image_array[] = "$dummy_image_url/ps/psf1.jpg"; |
|
246 | + $image_array[] = "$dummy_image_url/ps/psl1.jpg"; |
|
247 | + $image_array[] = "$dummy_image_url/ps/psb1.jpg"; |
|
248 | + $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
249 | + $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
250 | 250 | |
251 | 251 | |
252 | - $post_info[] = array( |
|
253 | - "listing_type" => $post_type, |
|
254 | - "post_title" => 'Eastern Lodge', |
|
255 | - "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec non augue ultrices, vulputate nulla at, consectetur ante. Quisque neque mi, vulputate quis nulla a, sollicitudin fringilla leo. Nam dictum id neque eu imperdiet. Curabitur ligula turpis, malesuada at lobortis commodo, vulputate volutpat arcu. Duis bibendum blandit aliquam. In ipsum diam, tristique ut bibendum vel, lobortis non tellus. Nulla ultricies, ante vitae placerat auctor, nisi quam blandit enim, sit amet aliquam est diam id urna. Suspendisse eget nibh volutpat, malesuada enim sed, egestas massa. |
|
252 | + $post_info[] = array( |
|
253 | + "listing_type" => $post_type, |
|
254 | + "post_title" => 'Eastern Lodge', |
|
255 | + "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec non augue ultrices, vulputate nulla at, consectetur ante. Quisque neque mi, vulputate quis nulla a, sollicitudin fringilla leo. Nam dictum id neque eu imperdiet. Curabitur ligula turpis, malesuada at lobortis commodo, vulputate volutpat arcu. Duis bibendum blandit aliquam. In ipsum diam, tristique ut bibendum vel, lobortis non tellus. Nulla ultricies, ante vitae placerat auctor, nisi quam blandit enim, sit amet aliquam est diam id urna. Suspendisse eget nibh volutpat, malesuada enim sed, egestas massa. |
|
256 | 256 | |
257 | 257 | Aliquam ut odio ullamcorper, posuere enim sed, venenatis tortor. Donec justo elit, aliquam sed cursus sed, semper eget libero. Mauris consequat lorem sed fringilla tincidunt. Phasellus suscipit velit et elit tristique, ac commodo metus scelerisque. Vivamus finibus ipsum placerat pulvinar aliquet. Maecenas augue orci, blandit at nibh pharetra, condimentum congue ligula. Duis non ante sagittis odio convallis lacinia in quis sapien. |
258 | 258 | |
@@ -261,42 +261,42 @@ discard block |
||
261 | 261 | Vestibulum tristique quam eget bibendum pulvinar. Mauris sit amet magna ut arcu rutrum pellentesque feugiat et ipsum. Proin porta quam sed risus accumsan pharetra. Nulla quis semper nisl. Nulla facilisi. Nulla facilisi. Pellentesque euismod sollicitudin lacus vel ultricies. Vestibulum ut sem ut nulla ultricies convallis in at mi. Nunc vitae nibh arcu. Maecenas nunc enim, tempus a rhoncus eget, pellentesque ut erat. |
262 | 262 | |
263 | 263 | Suspendisse interdum accumsan magna et tempor. Suspendisse scelerisque at lorem sit amet faucibus. Aenean quis consectetur enim. Duis aliquet tristique tempus. Suspendisse id ullamcorper mauris. Aliquam in libero eu justo porttitor pulvinar. Nulla semper placerat lectus. Nulla mollis suscipit lacus, a blandit purus cursus non. Maecenas id tellus mi. Pellentesque sollicitudin nibh eget magna scelerisque consequat. Aliquam convallis orci arcu, et euismod dui cursus et. Donec nec pellentesque nulla, ac pretium massa. In gravida bibendum ornare.', |
264 | - "post_images" => $image_array, |
|
265 | - "post_category" => array($post_type.'category' => array($category_array[1])), |
|
266 | - "post_tags" => array('Tags', 'Sample Tags'), |
|
267 | - "geodir_video" => '', |
|
268 | - "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
269 | - "geodir_contact" => '(111) 677-4444', |
|
270 | - "geodir_email" => '[email protected]', |
|
271 | - "geodir_website" => 'http://example.com/', |
|
272 | - "geodir_twitter" => 'http://example.com/', |
|
273 | - "geodir_facebook" => 'http://example.com/', |
|
274 | - "geodir_price" => '1750', |
|
275 | - "geodir_property_status" => 'For Sale', |
|
276 | - 'geodir_property_furnishing' => 'Furnished', |
|
277 | - 'geodir_property_type' => 'Detached house', |
|
278 | - 'geodir_property_bedrooms' => '3', |
|
279 | - 'geodir_property_bathrooms' => '2', |
|
280 | - 'geodir_property_area' => '1850', |
|
281 | - 'geodir_property_features' => 'Gas Central Heating,Triple Glazing,Front Garden,Private driveway,Fireplace', |
|
282 | - "post_dummy" => '1' |
|
283 | - ); |
|
284 | - |
|
285 | - |
|
286 | - break; |
|
287 | - case 2: |
|
288 | - $image_array = array(); |
|
289 | - $post_meta = array(); |
|
290 | - $image_array[] = "$dummy_image_url/ps/psf2.jpg"; |
|
291 | - $image_array[] = "$dummy_image_url/ps/psl2.jpg"; |
|
292 | - $image_array[] = "$dummy_image_url/ps/psb2.jpg"; |
|
293 | - $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
294 | - $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
295 | - |
|
296 | - $post_info[] = array( |
|
297 | - "listing_type" => $post_type, |
|
298 | - "post_title" => 'Daisy Street', |
|
299 | - "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
264 | + "post_images" => $image_array, |
|
265 | + "post_category" => array($post_type.'category' => array($category_array[1])), |
|
266 | + "post_tags" => array('Tags', 'Sample Tags'), |
|
267 | + "geodir_video" => '', |
|
268 | + "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
269 | + "geodir_contact" => '(111) 677-4444', |
|
270 | + "geodir_email" => '[email protected]', |
|
271 | + "geodir_website" => 'http://example.com/', |
|
272 | + "geodir_twitter" => 'http://example.com/', |
|
273 | + "geodir_facebook" => 'http://example.com/', |
|
274 | + "geodir_price" => '1750', |
|
275 | + "geodir_property_status" => 'For Sale', |
|
276 | + 'geodir_property_furnishing' => 'Furnished', |
|
277 | + 'geodir_property_type' => 'Detached house', |
|
278 | + 'geodir_property_bedrooms' => '3', |
|
279 | + 'geodir_property_bathrooms' => '2', |
|
280 | + 'geodir_property_area' => '1850', |
|
281 | + 'geodir_property_features' => 'Gas Central Heating,Triple Glazing,Front Garden,Private driveway,Fireplace', |
|
282 | + "post_dummy" => '1' |
|
283 | + ); |
|
284 | + |
|
285 | + |
|
286 | + break; |
|
287 | + case 2: |
|
288 | + $image_array = array(); |
|
289 | + $post_meta = array(); |
|
290 | + $image_array[] = "$dummy_image_url/ps/psf2.jpg"; |
|
291 | + $image_array[] = "$dummy_image_url/ps/psl2.jpg"; |
|
292 | + $image_array[] = "$dummy_image_url/ps/psb2.jpg"; |
|
293 | + $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
294 | + $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
295 | + |
|
296 | + $post_info[] = array( |
|
297 | + "listing_type" => $post_type, |
|
298 | + "post_title" => 'Daisy Street', |
|
299 | + "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
300 | 300 | |
301 | 301 | Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel. |
302 | 302 | |
@@ -306,42 +306,42 @@ discard block |
||
306 | 306 | |
307 | 307 | Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.', |
308 | 308 | |
309 | - "post_images" => $image_array, |
|
310 | - "post_category" => array($post_type.'category' => array($category_array[1])), |
|
311 | - "post_tags" => array('Garage'), |
|
312 | - "geodir_video" => '', |
|
313 | - "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
314 | - "geodir_contact" => '(222) 777-1111', |
|
315 | - "geodir_email" => '[email protected]', |
|
316 | - "geodir_website" => 'http://example.com/', |
|
317 | - "geodir_twitter" => 'http://example.com/', |
|
318 | - "geodir_facebook" => 'http://example.com/', |
|
319 | - "geodir_price" => '1150', |
|
320 | - "geodir_property_status" => 'Sold', |
|
321 | - 'geodir_property_furnishing' => 'Unfurnished', |
|
322 | - 'geodir_property_type' => 'Detached house', |
|
323 | - 'geodir_property_bedrooms' => '5', |
|
324 | - 'geodir_property_bathrooms' => '3', |
|
325 | - 'geodir_property_area' => '2650', |
|
326 | - 'geodir_property_features' => 'Select Features/,Oil Central Heating,Front Garden,Garage,Private driveway,Fireplace', |
|
327 | - "post_dummy" => '1' |
|
328 | - ); |
|
329 | - |
|
330 | - break; |
|
331 | - |
|
332 | - case 3: |
|
333 | - $image_array = array(); |
|
334 | - $post_meta = array(); |
|
335 | - $image_array[] = "$dummy_image_url/ps/psf3.jpg"; |
|
336 | - $image_array[] = "$dummy_image_url/ps/psl3.jpg"; |
|
337 | - $image_array[] = "$dummy_image_url/ps/psb3.jpg"; |
|
338 | - $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
339 | - $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
340 | - |
|
341 | - $post_info[] = array( |
|
342 | - "listing_type" => $post_type, |
|
343 | - "post_title" => 'Northbay House', |
|
344 | - "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
309 | + "post_images" => $image_array, |
|
310 | + "post_category" => array($post_type.'category' => array($category_array[1])), |
|
311 | + "post_tags" => array('Garage'), |
|
312 | + "geodir_video" => '', |
|
313 | + "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
314 | + "geodir_contact" => '(222) 777-1111', |
|
315 | + "geodir_email" => '[email protected]', |
|
316 | + "geodir_website" => 'http://example.com/', |
|
317 | + "geodir_twitter" => 'http://example.com/', |
|
318 | + "geodir_facebook" => 'http://example.com/', |
|
319 | + "geodir_price" => '1150', |
|
320 | + "geodir_property_status" => 'Sold', |
|
321 | + 'geodir_property_furnishing' => 'Unfurnished', |
|
322 | + 'geodir_property_type' => 'Detached house', |
|
323 | + 'geodir_property_bedrooms' => '5', |
|
324 | + 'geodir_property_bathrooms' => '3', |
|
325 | + 'geodir_property_area' => '2650', |
|
326 | + 'geodir_property_features' => 'Select Features/,Oil Central Heating,Front Garden,Garage,Private driveway,Fireplace', |
|
327 | + "post_dummy" => '1' |
|
328 | + ); |
|
329 | + |
|
330 | + break; |
|
331 | + |
|
332 | + case 3: |
|
333 | + $image_array = array(); |
|
334 | + $post_meta = array(); |
|
335 | + $image_array[] = "$dummy_image_url/ps/psf3.jpg"; |
|
336 | + $image_array[] = "$dummy_image_url/ps/psl3.jpg"; |
|
337 | + $image_array[] = "$dummy_image_url/ps/psb3.jpg"; |
|
338 | + $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
339 | + $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
340 | + |
|
341 | + $post_info[] = array( |
|
342 | + "listing_type" => $post_type, |
|
343 | + "post_title" => 'Northbay House', |
|
344 | + "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
345 | 345 | |
346 | 346 | Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel. |
347 | 347 | |
@@ -351,43 +351,43 @@ discard block |
||
351 | 351 | |
352 | 352 | Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.', |
353 | 353 | |
354 | - "post_images" => $image_array, |
|
355 | - "post_category" => array($post_type.'category' => array($category_array[1])), |
|
356 | - "post_tags" => array('Tags', 'Sample Tags'), |
|
357 | - "geodir_video" => '', |
|
358 | - "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
359 | - "geodir_contact" => '(222) 777-1111', |
|
360 | - "geodir_email" => '[email protected]', |
|
361 | - "geodir_website" => 'http://example.com/', |
|
362 | - "geodir_twitter" => 'http://example.com/', |
|
363 | - "geodir_facebook" => 'http://example.com/', |
|
364 | - "geodir_price" => '1300', |
|
365 | - "geodir_property_status" => 'Under Offer', |
|
366 | - 'geodir_property_furnishing' => 'Unfurnished', |
|
367 | - 'geodir_property_type' => 'Detached house', |
|
368 | - 'geodir_property_bedrooms' => '6', |
|
369 | - 'geodir_property_bathrooms' => '6', |
|
370 | - 'geodir_property_area' => '1650', |
|
371 | - 'geodir_property_features' => 'Select Features/,Gas Central Heating,Triple Glazing,Off Road Parking,Fireplace', |
|
372 | - "post_dummy" => '1' |
|
373 | - ); |
|
374 | - |
|
375 | - break; |
|
376 | - |
|
377 | - |
|
378 | - case 4: |
|
379 | - $image_array = array(); |
|
380 | - $post_meta = array(); |
|
381 | - $image_array[] = "$dummy_image_url/ps/psf4.jpg"; |
|
382 | - $image_array[] = "$dummy_image_url/ps/psl4.jpg"; |
|
383 | - $image_array[] = "$dummy_image_url/ps/psb4.jpg"; |
|
384 | - $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
385 | - $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
386 | - |
|
387 | - $post_info[] = array( |
|
388 | - "listing_type" => $post_type, |
|
389 | - "post_title" => 'Jesmond Mansion', |
|
390 | - "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
354 | + "post_images" => $image_array, |
|
355 | + "post_category" => array($post_type.'category' => array($category_array[1])), |
|
356 | + "post_tags" => array('Tags', 'Sample Tags'), |
|
357 | + "geodir_video" => '', |
|
358 | + "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
359 | + "geodir_contact" => '(222) 777-1111', |
|
360 | + "geodir_email" => '[email protected]', |
|
361 | + "geodir_website" => 'http://example.com/', |
|
362 | + "geodir_twitter" => 'http://example.com/', |
|
363 | + "geodir_facebook" => 'http://example.com/', |
|
364 | + "geodir_price" => '1300', |
|
365 | + "geodir_property_status" => 'Under Offer', |
|
366 | + 'geodir_property_furnishing' => 'Unfurnished', |
|
367 | + 'geodir_property_type' => 'Detached house', |
|
368 | + 'geodir_property_bedrooms' => '6', |
|
369 | + 'geodir_property_bathrooms' => '6', |
|
370 | + 'geodir_property_area' => '1650', |
|
371 | + 'geodir_property_features' => 'Select Features/,Gas Central Heating,Triple Glazing,Off Road Parking,Fireplace', |
|
372 | + "post_dummy" => '1' |
|
373 | + ); |
|
374 | + |
|
375 | + break; |
|
376 | + |
|
377 | + |
|
378 | + case 4: |
|
379 | + $image_array = array(); |
|
380 | + $post_meta = array(); |
|
381 | + $image_array[] = "$dummy_image_url/ps/psf4.jpg"; |
|
382 | + $image_array[] = "$dummy_image_url/ps/psl4.jpg"; |
|
383 | + $image_array[] = "$dummy_image_url/ps/psb4.jpg"; |
|
384 | + $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
385 | + $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
386 | + |
|
387 | + $post_info[] = array( |
|
388 | + "listing_type" => $post_type, |
|
389 | + "post_title" => 'Jesmond Mansion', |
|
390 | + "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
391 | 391 | |
392 | 392 | Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel. |
393 | 393 | |
@@ -397,42 +397,42 @@ discard block |
||
397 | 397 | |
398 | 398 | Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.', |
399 | 399 | |
400 | - "post_images" => $image_array, |
|
401 | - "post_category" => array($post_type.'category' => array($category_array[1])), |
|
402 | - "post_tags" => array('Tags', 'Sample Tags'), |
|
403 | - "geodir_video" => '', |
|
404 | - "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
405 | - "geodir_contact" => '(222) 777-1111', |
|
406 | - "geodir_email" => '[email protected]', |
|
407 | - "geodir_website" => 'http://example.com/', |
|
408 | - "geodir_twitter" => 'http://example.com/', |
|
409 | - "geodir_facebook" => 'http://example.com/', |
|
410 | - "geodir_price" => '13000', |
|
411 | - "geodir_property_status" => 'Under Offer', |
|
412 | - 'geodir_property_furnishing' => 'Partially furnished', |
|
413 | - 'geodir_property_type' => 'Detached house', |
|
414 | - 'geodir_property_bedrooms' => '10', |
|
415 | - 'geodir_property_bathrooms' => '7', |
|
416 | - 'geodir_property_area' => '6600', |
|
417 | - 'geodir_property_features' => 'Select Features/,Oil Central Heating,Double Glazing,Front Garden,Garage,Private driveway,Fireplace', |
|
418 | - "post_dummy" => '1' |
|
419 | - ); |
|
420 | - |
|
421 | - break; |
|
422 | - |
|
423 | - case 5: |
|
424 | - $image_array = array(); |
|
425 | - $post_meta = array(); |
|
426 | - $image_array[] = "$dummy_image_url/ps/psf5.jpg"; |
|
427 | - $image_array[] = "$dummy_image_url/ps/psl5.jpg"; |
|
428 | - $image_array[] = "$dummy_image_url/ps/psb5.jpg"; |
|
429 | - $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
430 | - $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
431 | - |
|
432 | - $post_info[] = array( |
|
433 | - "listing_type" => $post_type, |
|
434 | - "post_title" => 'Springfield Lodge', |
|
435 | - "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
400 | + "post_images" => $image_array, |
|
401 | + "post_category" => array($post_type.'category' => array($category_array[1])), |
|
402 | + "post_tags" => array('Tags', 'Sample Tags'), |
|
403 | + "geodir_video" => '', |
|
404 | + "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
405 | + "geodir_contact" => '(222) 777-1111', |
|
406 | + "geodir_email" => '[email protected]', |
|
407 | + "geodir_website" => 'http://example.com/', |
|
408 | + "geodir_twitter" => 'http://example.com/', |
|
409 | + "geodir_facebook" => 'http://example.com/', |
|
410 | + "geodir_price" => '13000', |
|
411 | + "geodir_property_status" => 'Under Offer', |
|
412 | + 'geodir_property_furnishing' => 'Partially furnished', |
|
413 | + 'geodir_property_type' => 'Detached house', |
|
414 | + 'geodir_property_bedrooms' => '10', |
|
415 | + 'geodir_property_bathrooms' => '7', |
|
416 | + 'geodir_property_area' => '6600', |
|
417 | + 'geodir_property_features' => 'Select Features/,Oil Central Heating,Double Glazing,Front Garden,Garage,Private driveway,Fireplace', |
|
418 | + "post_dummy" => '1' |
|
419 | + ); |
|
420 | + |
|
421 | + break; |
|
422 | + |
|
423 | + case 5: |
|
424 | + $image_array = array(); |
|
425 | + $post_meta = array(); |
|
426 | + $image_array[] = "$dummy_image_url/ps/psf5.jpg"; |
|
427 | + $image_array[] = "$dummy_image_url/ps/psl5.jpg"; |
|
428 | + $image_array[] = "$dummy_image_url/ps/psb5.jpg"; |
|
429 | + $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
430 | + $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
431 | + |
|
432 | + $post_info[] = array( |
|
433 | + "listing_type" => $post_type, |
|
434 | + "post_title" => 'Springfield Lodge', |
|
435 | + "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
436 | 436 | |
437 | 437 | Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel. |
438 | 438 | |
@@ -442,42 +442,42 @@ discard block |
||
442 | 442 | |
443 | 443 | Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.', |
444 | 444 | |
445 | - "post_images" => $image_array, |
|
446 | - "post_category" => array($post_type.'category' => array($category_array[1])), |
|
447 | - "post_tags" => array('Tags', 'Sample Tags'), |
|
448 | - "geodir_video" => '', |
|
449 | - "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
450 | - "geodir_contact" => '(222) 777-1111', |
|
451 | - "geodir_email" => '[email protected]', |
|
452 | - "geodir_website" => 'http://example.com/', |
|
453 | - "geodir_twitter" => 'http://example.com/', |
|
454 | - "geodir_facebook" => 'http://example.com/', |
|
455 | - "geodir_price" => '1800', |
|
456 | - "geodir_property_status" => 'For Sale', |
|
457 | - 'geodir_property_furnishing' => 'Optional', |
|
458 | - 'geodir_property_type' => 'Detached house', |
|
459 | - 'geodir_property_bedrooms' => '4', |
|
460 | - 'geodir_property_bathrooms' => '3', |
|
461 | - 'geodir_property_area' => '3700', |
|
462 | - 'geodir_property_features' => 'Select Features/,Oil Central Heating,Double Glazing,Front Garden', |
|
463 | - "post_dummy" => '1' |
|
464 | - ); |
|
465 | - |
|
466 | - break; |
|
467 | - |
|
468 | - case 6: |
|
469 | - $image_array = array(); |
|
470 | - $post_meta = array(); |
|
471 | - $image_array[] = "$dummy_image_url/ps/psf6.jpg"; |
|
472 | - $image_array[] = "$dummy_image_url/ps/psl6.jpg"; |
|
473 | - $image_array[] = "$dummy_image_url/ps/psb5.jpg"; |
|
474 | - $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
475 | - $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
476 | - |
|
477 | - $post_info[] = array( |
|
478 | - "listing_type" => $post_type, |
|
479 | - "post_title" => 'Forrest Park', |
|
480 | - "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
445 | + "post_images" => $image_array, |
|
446 | + "post_category" => array($post_type.'category' => array($category_array[1])), |
|
447 | + "post_tags" => array('Tags', 'Sample Tags'), |
|
448 | + "geodir_video" => '', |
|
449 | + "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
450 | + "geodir_contact" => '(222) 777-1111', |
|
451 | + "geodir_email" => '[email protected]', |
|
452 | + "geodir_website" => 'http://example.com/', |
|
453 | + "geodir_twitter" => 'http://example.com/', |
|
454 | + "geodir_facebook" => 'http://example.com/', |
|
455 | + "geodir_price" => '1800', |
|
456 | + "geodir_property_status" => 'For Sale', |
|
457 | + 'geodir_property_furnishing' => 'Optional', |
|
458 | + 'geodir_property_type' => 'Detached house', |
|
459 | + 'geodir_property_bedrooms' => '4', |
|
460 | + 'geodir_property_bathrooms' => '3', |
|
461 | + 'geodir_property_area' => '3700', |
|
462 | + 'geodir_property_features' => 'Select Features/,Oil Central Heating,Double Glazing,Front Garden', |
|
463 | + "post_dummy" => '1' |
|
464 | + ); |
|
465 | + |
|
466 | + break; |
|
467 | + |
|
468 | + case 6: |
|
469 | + $image_array = array(); |
|
470 | + $post_meta = array(); |
|
471 | + $image_array[] = "$dummy_image_url/ps/psf6.jpg"; |
|
472 | + $image_array[] = "$dummy_image_url/ps/psl6.jpg"; |
|
473 | + $image_array[] = "$dummy_image_url/ps/psb5.jpg"; |
|
474 | + $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
475 | + $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
476 | + |
|
477 | + $post_info[] = array( |
|
478 | + "listing_type" => $post_type, |
|
479 | + "post_title" => 'Forrest Park', |
|
480 | + "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
481 | 481 | |
482 | 482 | Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel. |
483 | 483 | |
@@ -487,42 +487,42 @@ discard block |
||
487 | 487 | |
488 | 488 | Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.', |
489 | 489 | |
490 | - "post_images" => $image_array, |
|
491 | - "post_category" => array($post_type.'category' => array($category_array[1])), |
|
492 | - "post_tags" => array('Tags', 'Sample Tags'), |
|
493 | - "geodir_video" => '', |
|
494 | - "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
495 | - "geodir_contact" => '(222) 777-1111', |
|
496 | - "geodir_email" => '[email protected]', |
|
497 | - "geodir_website" => 'http://example.com/', |
|
498 | - "geodir_twitter" => 'http://example.com/', |
|
499 | - "geodir_facebook" => 'http://example.com/', |
|
500 | - "geodir_price" => '2700', |
|
501 | - "geodir_property_status" => 'For Sale', |
|
502 | - 'geodir_property_furnishing' => 'Unfurnished', |
|
503 | - 'geodir_property_type' => 'Detached house', |
|
504 | - 'geodir_property_bedrooms' => '5', |
|
505 | - 'geodir_property_bathrooms' => '4', |
|
506 | - 'geodir_property_area' => '2250', |
|
507 | - 'geodir_property_features' => 'Select Features/,Gas Central Heating,Double Glazing,Front Garden,Private driveway', |
|
508 | - "post_dummy" => '1' |
|
509 | - ); |
|
510 | - |
|
511 | - break; |
|
512 | - |
|
513 | - case 7: |
|
514 | - $image_array = array(); |
|
515 | - $post_meta = array(); |
|
516 | - $image_array[] = "$dummy_image_url/ps/psf7.jpg"; |
|
517 | - $image_array[] = "$dummy_image_url/ps/psl4.jpg"; |
|
518 | - $image_array[] = "$dummy_image_url/ps/psb4.jpg"; |
|
519 | - $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
520 | - $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
521 | - |
|
522 | - $post_info[] = array( |
|
523 | - "listing_type" => $post_type, |
|
524 | - "post_title" => 'Fraser Suites', |
|
525 | - "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
490 | + "post_images" => $image_array, |
|
491 | + "post_category" => array($post_type.'category' => array($category_array[1])), |
|
492 | + "post_tags" => array('Tags', 'Sample Tags'), |
|
493 | + "geodir_video" => '', |
|
494 | + "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
495 | + "geodir_contact" => '(222) 777-1111', |
|
496 | + "geodir_email" => '[email protected]', |
|
497 | + "geodir_website" => 'http://example.com/', |
|
498 | + "geodir_twitter" => 'http://example.com/', |
|
499 | + "geodir_facebook" => 'http://example.com/', |
|
500 | + "geodir_price" => '2700', |
|
501 | + "geodir_property_status" => 'For Sale', |
|
502 | + 'geodir_property_furnishing' => 'Unfurnished', |
|
503 | + 'geodir_property_type' => 'Detached house', |
|
504 | + 'geodir_property_bedrooms' => '5', |
|
505 | + 'geodir_property_bathrooms' => '4', |
|
506 | + 'geodir_property_area' => '2250', |
|
507 | + 'geodir_property_features' => 'Select Features/,Gas Central Heating,Double Glazing,Front Garden,Private driveway', |
|
508 | + "post_dummy" => '1' |
|
509 | + ); |
|
510 | + |
|
511 | + break; |
|
512 | + |
|
513 | + case 7: |
|
514 | + $image_array = array(); |
|
515 | + $post_meta = array(); |
|
516 | + $image_array[] = "$dummy_image_url/ps/psf7.jpg"; |
|
517 | + $image_array[] = "$dummy_image_url/ps/psl4.jpg"; |
|
518 | + $image_array[] = "$dummy_image_url/ps/psb4.jpg"; |
|
519 | + $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
520 | + $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
521 | + |
|
522 | + $post_info[] = array( |
|
523 | + "listing_type" => $post_type, |
|
524 | + "post_title" => 'Fraser Suites', |
|
525 | + "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
526 | 526 | |
527 | 527 | Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel. |
528 | 528 | |
@@ -532,42 +532,42 @@ discard block |
||
532 | 532 | |
533 | 533 | Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.', |
534 | 534 | |
535 | - "post_images" => $image_array, |
|
536 | - "post_category" => array($post_type.'category' => array($category_array[0])), |
|
537 | - "post_tags" => array('Tags', 'Sample Tags'), |
|
538 | - "geodir_video" => '', |
|
539 | - "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
540 | - "geodir_contact" => '(222) 777-1111', |
|
541 | - "geodir_email" => '[email protected]', |
|
542 | - "geodir_website" => 'http://example.com/', |
|
543 | - "geodir_twitter" => 'http://example.com/', |
|
544 | - "geodir_facebook" => 'http://example.com/', |
|
545 | - "geodir_price" => '1450', |
|
546 | - "geodir_property_status" => 'For Sale', |
|
547 | - 'geodir_property_furnishing' => 'Unfurnished', |
|
548 | - 'geodir_property_type' => 'Apartment', |
|
549 | - 'geodir_property_bedrooms' => '3', |
|
550 | - 'geodir_property_bathrooms' => '2', |
|
551 | - 'geodir_property_area' => '1250', |
|
552 | - 'geodir_property_features' => 'Select Features/,Gas Central Heating,Double Glazing', |
|
553 | - "post_dummy" => '1' |
|
554 | - ); |
|
555 | - |
|
556 | - break; |
|
557 | - |
|
558 | - case 8: |
|
559 | - $image_array = array(); |
|
560 | - $post_meta = array(); |
|
561 | - $image_array[] = "$dummy_image_url/ps/psf8.jpg"; |
|
562 | - $image_array[] = "$dummy_image_url/ps/psl2.jpg"; |
|
563 | - $image_array[] = "$dummy_image_url/ps/psb2.jpg"; |
|
564 | - $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
565 | - $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
566 | - |
|
567 | - $post_info[] = array( |
|
568 | - "listing_type" => $post_type, |
|
569 | - "post_title" => 'Richmore Apartments', |
|
570 | - "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
535 | + "post_images" => $image_array, |
|
536 | + "post_category" => array($post_type.'category' => array($category_array[0])), |
|
537 | + "post_tags" => array('Tags', 'Sample Tags'), |
|
538 | + "geodir_video" => '', |
|
539 | + "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
540 | + "geodir_contact" => '(222) 777-1111', |
|
541 | + "geodir_email" => '[email protected]', |
|
542 | + "geodir_website" => 'http://example.com/', |
|
543 | + "geodir_twitter" => 'http://example.com/', |
|
544 | + "geodir_facebook" => 'http://example.com/', |
|
545 | + "geodir_price" => '1450', |
|
546 | + "geodir_property_status" => 'For Sale', |
|
547 | + 'geodir_property_furnishing' => 'Unfurnished', |
|
548 | + 'geodir_property_type' => 'Apartment', |
|
549 | + 'geodir_property_bedrooms' => '3', |
|
550 | + 'geodir_property_bathrooms' => '2', |
|
551 | + 'geodir_property_area' => '1250', |
|
552 | + 'geodir_property_features' => 'Select Features/,Gas Central Heating,Double Glazing', |
|
553 | + "post_dummy" => '1' |
|
554 | + ); |
|
555 | + |
|
556 | + break; |
|
557 | + |
|
558 | + case 8: |
|
559 | + $image_array = array(); |
|
560 | + $post_meta = array(); |
|
561 | + $image_array[] = "$dummy_image_url/ps/psf8.jpg"; |
|
562 | + $image_array[] = "$dummy_image_url/ps/psl2.jpg"; |
|
563 | + $image_array[] = "$dummy_image_url/ps/psb2.jpg"; |
|
564 | + $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
565 | + $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
566 | + |
|
567 | + $post_info[] = array( |
|
568 | + "listing_type" => $post_type, |
|
569 | + "post_title" => 'Richmore Apartments', |
|
570 | + "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
571 | 571 | |
572 | 572 | Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel. |
573 | 573 | |
@@ -577,43 +577,43 @@ discard block |
||
577 | 577 | |
578 | 578 | Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.', |
579 | 579 | |
580 | - "post_images" => $image_array, |
|
581 | - "post_category" => array($post_type.'category' => array($category_array[0])), |
|
582 | - "post_tags" => array('Tags', 'Sample Tags'), |
|
583 | - "geodir_video" => '', |
|
584 | - "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
585 | - "geodir_contact" => '(222) 777-1111', |
|
586 | - "geodir_email" => '[email protected]', |
|
587 | - "geodir_website" => 'http://example.com/', |
|
588 | - "geodir_twitter" => 'http://example.com/', |
|
589 | - "geodir_facebook" => 'http://example.com/', |
|
590 | - "geodir_price" => '2000', |
|
591 | - "geodir_property_status" => 'For Sale', |
|
592 | - 'geodir_property_furnishing' => 'Unfurnished', |
|
593 | - 'geodir_property_type' => 'Apartment', |
|
594 | - 'geodir_property_bedrooms' => '2', |
|
595 | - 'geodir_property_bathrooms' => '2', |
|
596 | - 'geodir_property_area' => '1750', |
|
597 | - 'geodir_property_features' => 'Select Features/,Gas Central Heating,Double Glazing,Garage', |
|
598 | - "post_dummy" => '1' |
|
599 | - ); |
|
600 | - |
|
601 | - break; |
|
602 | - |
|
603 | - |
|
604 | - case 9: |
|
605 | - $image_array = array(); |
|
606 | - $post_meta = array(); |
|
607 | - $image_array[] = "$dummy_image_url/ps/psf9.jpg"; |
|
608 | - $image_array[] = "$dummy_image_url/ps/psc9.jpg"; |
|
609 | - $image_array[] = "$dummy_image_url/ps/psb2.jpg"; |
|
610 | - $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
611 | - $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
612 | - |
|
613 | - $post_info[] = array( |
|
614 | - "listing_type" => $post_type, |
|
615 | - "post_title" => 'Hotel Alpina', |
|
616 | - "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
580 | + "post_images" => $image_array, |
|
581 | + "post_category" => array($post_type.'category' => array($category_array[0])), |
|
582 | + "post_tags" => array('Tags', 'Sample Tags'), |
|
583 | + "geodir_video" => '', |
|
584 | + "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
585 | + "geodir_contact" => '(222) 777-1111', |
|
586 | + "geodir_email" => '[email protected]', |
|
587 | + "geodir_website" => 'http://example.com/', |
|
588 | + "geodir_twitter" => 'http://example.com/', |
|
589 | + "geodir_facebook" => 'http://example.com/', |
|
590 | + "geodir_price" => '2000', |
|
591 | + "geodir_property_status" => 'For Sale', |
|
592 | + 'geodir_property_furnishing' => 'Unfurnished', |
|
593 | + 'geodir_property_type' => 'Apartment', |
|
594 | + 'geodir_property_bedrooms' => '2', |
|
595 | + 'geodir_property_bathrooms' => '2', |
|
596 | + 'geodir_property_area' => '1750', |
|
597 | + 'geodir_property_features' => 'Select Features/,Gas Central Heating,Double Glazing,Garage', |
|
598 | + "post_dummy" => '1' |
|
599 | + ); |
|
600 | + |
|
601 | + break; |
|
602 | + |
|
603 | + |
|
604 | + case 9: |
|
605 | + $image_array = array(); |
|
606 | + $post_meta = array(); |
|
607 | + $image_array[] = "$dummy_image_url/ps/psf9.jpg"; |
|
608 | + $image_array[] = "$dummy_image_url/ps/psc9.jpg"; |
|
609 | + $image_array[] = "$dummy_image_url/ps/psb2.jpg"; |
|
610 | + $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
611 | + $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
612 | + |
|
613 | + $post_info[] = array( |
|
614 | + "listing_type" => $post_type, |
|
615 | + "post_title" => 'Hotel Alpina', |
|
616 | + "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
617 | 617 | |
618 | 618 | Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel. |
619 | 619 | |
@@ -623,39 +623,39 @@ discard block |
||
623 | 623 | |
624 | 624 | Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.', |
625 | 625 | |
626 | - "post_images" => $image_array, |
|
627 | - "post_category" => array($post_type.'category' => array($category_array[2])), |
|
628 | - "post_tags" => array('Tags', 'Sample Tags'), |
|
629 | - "geodir_video" => '', |
|
630 | - "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
631 | - "geodir_contact" => '(222) 777-1111', |
|
632 | - "geodir_email" => '[email protected]', |
|
633 | - "geodir_website" => 'http://example.com/', |
|
634 | - "geodir_twitter" => 'http://example.com/', |
|
635 | - "geodir_facebook" => 'http://example.com/', |
|
636 | - "geodir_price" => '60000', |
|
637 | - "geodir_property_status" => 'For Sale', |
|
638 | - 'geodir_property_furnishing' => 'Furnished', |
|
639 | - 'geodir_property_type' => 'Hotel', |
|
640 | - 'geodir_property_bedrooms' => '120', |
|
641 | - 'geodir_property_bathrooms' => '133', |
|
642 | - 'geodir_property_area' => '35000', |
|
643 | - 'geodir_property_features' => 'Select Features/,Gas Central Heating,Double Glazing,Garage', |
|
644 | - "post_dummy" => '1' |
|
645 | - ); |
|
646 | - |
|
647 | - break; |
|
648 | - |
|
649 | - case 10: |
|
650 | - $image_array = array(); |
|
651 | - $post_meta = array(); |
|
652 | - $image_array[] = "$dummy_image_url/ps/psf10.jpg"; |
|
653 | - $image_array[] = "$dummy_image_url/ps/psf102.jpg"; |
|
654 | - |
|
655 | - $post_info[] = array( |
|
656 | - "listing_type" => $post_type, |
|
657 | - "post_title" => 'Development Land', |
|
658 | - "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
626 | + "post_images" => $image_array, |
|
627 | + "post_category" => array($post_type.'category' => array($category_array[2])), |
|
628 | + "post_tags" => array('Tags', 'Sample Tags'), |
|
629 | + "geodir_video" => '', |
|
630 | + "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
631 | + "geodir_contact" => '(222) 777-1111', |
|
632 | + "geodir_email" => '[email protected]', |
|
633 | + "geodir_website" => 'http://example.com/', |
|
634 | + "geodir_twitter" => 'http://example.com/', |
|
635 | + "geodir_facebook" => 'http://example.com/', |
|
636 | + "geodir_price" => '60000', |
|
637 | + "geodir_property_status" => 'For Sale', |
|
638 | + 'geodir_property_furnishing' => 'Furnished', |
|
639 | + 'geodir_property_type' => 'Hotel', |
|
640 | + 'geodir_property_bedrooms' => '120', |
|
641 | + 'geodir_property_bathrooms' => '133', |
|
642 | + 'geodir_property_area' => '35000', |
|
643 | + 'geodir_property_features' => 'Select Features/,Gas Central Heating,Double Glazing,Garage', |
|
644 | + "post_dummy" => '1' |
|
645 | + ); |
|
646 | + |
|
647 | + break; |
|
648 | + |
|
649 | + case 10: |
|
650 | + $image_array = array(); |
|
651 | + $post_meta = array(); |
|
652 | + $image_array[] = "$dummy_image_url/ps/psf10.jpg"; |
|
653 | + $image_array[] = "$dummy_image_url/ps/psf102.jpg"; |
|
654 | + |
|
655 | + $post_info[] = array( |
|
656 | + "listing_type" => $post_type, |
|
657 | + "post_title" => 'Development Land', |
|
658 | + "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
659 | 659 | |
660 | 660 | Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel. |
661 | 661 | |
@@ -665,93 +665,93 @@ discard block |
||
665 | 665 | |
666 | 666 | Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.', |
667 | 667 | |
668 | - "post_images" => $image_array, |
|
669 | - "post_category" => array($post_type.'category' => array($category_array[3])), |
|
670 | - "post_tags" => array('Tags', 'Sample Tags'), |
|
671 | - "geodir_video" => '', |
|
672 | - "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
673 | - "geodir_contact" => '(222) 777-1111', |
|
674 | - "geodir_email" => '[email protected]', |
|
675 | - "geodir_website" => 'http://example.com/', |
|
676 | - "geodir_twitter" => 'http://example.com/', |
|
677 | - "geodir_facebook" => 'http://example.com/', |
|
678 | - "geodir_price" => '800', |
|
679 | - "geodir_property_status" => 'For Sale', |
|
680 | - 'geodir_property_furnishing' => '', |
|
681 | - 'geodir_property_type' => 'Land', |
|
682 | - 'geodir_property_bedrooms' => '', |
|
683 | - 'geodir_property_bathrooms' => '', |
|
684 | - 'geodir_property_area' => '250000', |
|
685 | - 'geodir_property_features' => '', |
|
686 | - "post_dummy" => '1' |
|
687 | - ); |
|
688 | - |
|
689 | - break; |
|
668 | + "post_images" => $image_array, |
|
669 | + "post_category" => array($post_type.'category' => array($category_array[3])), |
|
670 | + "post_tags" => array('Tags', 'Sample Tags'), |
|
671 | + "geodir_video" => '', |
|
672 | + "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
673 | + "geodir_contact" => '(222) 777-1111', |
|
674 | + "geodir_email" => '[email protected]', |
|
675 | + "geodir_website" => 'http://example.com/', |
|
676 | + "geodir_twitter" => 'http://example.com/', |
|
677 | + "geodir_facebook" => 'http://example.com/', |
|
678 | + "geodir_price" => '800', |
|
679 | + "geodir_property_status" => 'For Sale', |
|
680 | + 'geodir_property_furnishing' => '', |
|
681 | + 'geodir_property_type' => 'Land', |
|
682 | + 'geodir_property_bedrooms' => '', |
|
683 | + 'geodir_property_bathrooms' => '', |
|
684 | + 'geodir_property_area' => '250000', |
|
685 | + 'geodir_property_features' => '', |
|
686 | + "post_dummy" => '1' |
|
687 | + ); |
|
688 | + |
|
689 | + break; |
|
690 | 690 | |
691 | 691 | } // end of switch |
692 | 692 | |
693 | 693 | foreach ($post_info as $post_info) { |
694 | - $default_location = geodir_get_default_location(); |
|
695 | - if ($city_bound_lat1 > $city_bound_lat2) |
|
696 | - $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat1, $city_bound_lat2), geodir_random_float($city_bound_lat2, $city_bound_lat1)); |
|
697 | - else |
|
698 | - $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat2, $city_bound_lat1), geodir_random_float($city_bound_lat1, $city_bound_lat2)); |
|
694 | + $default_location = geodir_get_default_location(); |
|
695 | + if ($city_bound_lat1 > $city_bound_lat2) |
|
696 | + $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat1, $city_bound_lat2), geodir_random_float($city_bound_lat2, $city_bound_lat1)); |
|
697 | + else |
|
698 | + $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat2, $city_bound_lat1), geodir_random_float($city_bound_lat1, $city_bound_lat2)); |
|
699 | 699 | |
700 | 700 | |
701 | - if ($city_bound_lng1 > $city_bound_lng2) |
|
702 | - $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng1, $city_bound_lng2), geodir_random_float($city_bound_lng2, $city_bound_lng1)); |
|
703 | - else |
|
704 | - $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng2, $city_bound_lng1), geodir_random_float($city_bound_lng1, $city_bound_lng2)); |
|
701 | + if ($city_bound_lng1 > $city_bound_lng2) |
|
702 | + $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng1, $city_bound_lng2), geodir_random_float($city_bound_lng2, $city_bound_lng1)); |
|
703 | + else |
|
704 | + $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng2, $city_bound_lng1), geodir_random_float($city_bound_lng1, $city_bound_lng2)); |
|
705 | 705 | |
706 | - $load_map = get_option('geodir_load_map'); |
|
706 | + $load_map = get_option('geodir_load_map'); |
|
707 | 707 | |
708 | - if ($load_map == 'osm') { |
|
709 | - $post_address = geodir_get_osm_address_by_lat_lan($dummy_post_latitude, $dummy_post_longitude); |
|
710 | - } else { |
|
711 | - $post_address = geodir_get_address_by_lat_lan($dummy_post_latitude, $dummy_post_longitude); |
|
712 | - } |
|
713 | - |
|
714 | - $postal_code = ''; |
|
715 | - if (!empty($post_address)) { |
|
716 | - if ($load_map == 'osm') { |
|
717 | - $address = !empty($post_address->formatted_address) ? $post_address->formatted_address : ''; |
|
718 | - $postal_code = !empty($post_address->address->postcode) ? $post_address->address->postcode : ''; |
|
719 | - } else { |
|
720 | - $addresses = array(); |
|
721 | - $addresses_default = array(); |
|
708 | + if ($load_map == 'osm') { |
|
709 | + $post_address = geodir_get_osm_address_by_lat_lan($dummy_post_latitude, $dummy_post_longitude); |
|
710 | + } else { |
|
711 | + $post_address = geodir_get_address_by_lat_lan($dummy_post_latitude, $dummy_post_longitude); |
|
712 | + } |
|
713 | + |
|
714 | + $postal_code = ''; |
|
715 | + if (!empty($post_address)) { |
|
716 | + if ($load_map == 'osm') { |
|
717 | + $address = !empty($post_address->formatted_address) ? $post_address->formatted_address : ''; |
|
718 | + $postal_code = !empty($post_address->address->postcode) ? $post_address->address->postcode : ''; |
|
719 | + } else { |
|
720 | + $addresses = array(); |
|
721 | + $addresses_default = array(); |
|
722 | 722 | |
723 | - foreach ($post_address as $add_key => $add_value) { |
|
724 | - if ($add_key < 2 && !empty($add_value->long_name)) { |
|
725 | - $addresses_default[] = $add_value->long_name; |
|
726 | - } |
|
727 | - if ($add_value->types[0] == 'postal_code') { |
|
728 | - $postal_code = $add_value->long_name; |
|
729 | - } |
|
730 | - if ($add_value->types[0] == 'street_number') { |
|
731 | - $addresses[] = $add_value->long_name; |
|
732 | - } |
|
733 | - if ($add_value->types[0] == 'route') { |
|
734 | - $addresses[] = $add_value->long_name; |
|
735 | - } |
|
736 | - if ($add_value->types[0] == 'neighborhood') { |
|
737 | - $addresses[] = $add_value->long_name; |
|
738 | - } |
|
739 | - if ($add_value->types[0] == 'sublocality') { |
|
740 | - $addresses[] = $add_value->long_name; |
|
741 | - } |
|
742 | - } |
|
743 | - $address = !empty($addresses) ? implode(', ', $addresses) : (!empty($addresses_default) ? implode(', ', $addresses_default) : ''); |
|
744 | - } |
|
745 | - |
|
746 | - $post_info['post_address'] = !empty($address) ? $address : $default_location->city; |
|
747 | - $post_info['post_city'] = $default_location->city; |
|
748 | - $post_info['post_region'] = $default_location->region; |
|
749 | - $post_info['post_country'] = $default_location->country; |
|
750 | - $post_info['post_zip'] = $postal_code; |
|
751 | - $post_info['post_latitude'] = $dummy_post_latitude; |
|
752 | - $post_info['post_longitude'] = $dummy_post_longitude; |
|
753 | - } |
|
723 | + foreach ($post_address as $add_key => $add_value) { |
|
724 | + if ($add_key < 2 && !empty($add_value->long_name)) { |
|
725 | + $addresses_default[] = $add_value->long_name; |
|
726 | + } |
|
727 | + if ($add_value->types[0] == 'postal_code') { |
|
728 | + $postal_code = $add_value->long_name; |
|
729 | + } |
|
730 | + if ($add_value->types[0] == 'street_number') { |
|
731 | + $addresses[] = $add_value->long_name; |
|
732 | + } |
|
733 | + if ($add_value->types[0] == 'route') { |
|
734 | + $addresses[] = $add_value->long_name; |
|
735 | + } |
|
736 | + if ($add_value->types[0] == 'neighborhood') { |
|
737 | + $addresses[] = $add_value->long_name; |
|
738 | + } |
|
739 | + if ($add_value->types[0] == 'sublocality') { |
|
740 | + $addresses[] = $add_value->long_name; |
|
741 | + } |
|
742 | + } |
|
743 | + $address = !empty($addresses) ? implode(', ', $addresses) : (!empty($addresses_default) ? implode(', ', $addresses_default) : ''); |
|
744 | + } |
|
745 | + |
|
746 | + $post_info['post_address'] = !empty($address) ? $address : $default_location->city; |
|
747 | + $post_info['post_city'] = $default_location->city; |
|
748 | + $post_info['post_region'] = $default_location->region; |
|
749 | + $post_info['post_country'] = $default_location->country; |
|
750 | + $post_info['post_zip'] = $postal_code; |
|
751 | + $post_info['post_latitude'] = $dummy_post_latitude; |
|
752 | + $post_info['post_longitude'] = $dummy_post_longitude; |
|
753 | + } |
|
754 | 754 | |
755 | - geodir_save_listing($post_info, true); |
|
756 | - echo 1; |
|
755 | + geodir_save_listing($post_info, true); |
|
756 | + echo 1; |
|
757 | 757 | } |
@@ -6,9 +6,9 @@ discard block |
||
6 | 6 | * @package GeoDirectory |
7 | 7 | */ |
8 | 8 | |
9 | -function geodir_property_sale_custom_fields($post_type='gd_place',$package_id=''){ |
|
9 | +function geodir_property_sale_custom_fields($post_type = 'gd_place', $package_id = '') { |
|
10 | 10 | $fields = array(); |
11 | - $package = ($package_id=='') ? '' : array($package_id); |
|
11 | + $package = ($package_id == '') ? '' : array($package_id); |
|
12 | 12 | |
13 | 13 | // price |
14 | 14 | $fields[] = array('listing_type' => $post_type, |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | 'default_value' => '', |
79 | 79 | 'show_in' => '[detail],[listing]', |
80 | 80 | 'is_required' => true, |
81 | - 'option_values' => __('Select Status/,Unfurnished,Furnished,Partially furnished,Optional','geodirectory'), |
|
81 | + 'option_values' => __('Select Status/,Unfurnished,Furnished,Partially furnished,Optional', 'geodirectory'), |
|
82 | 82 | 'validation_pattern' => '', |
83 | 83 | 'validation_msg' => '', |
84 | 84 | 'required_msg' => '', |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | 'default_value' => '', |
102 | 102 | 'show_in' => '[detail],[listing]', |
103 | 103 | 'is_required' => true, |
104 | - 'option_values' => __('Select Type/,Detached house,Semi-detached house,Apartment,Bungalow,Semi-detached bungalow,Chalet,Town House,End-terrace house,Terrace house,Cottage,Hotel,Land','geodirectory'), |
|
104 | + 'option_values' => __('Select Type/,Detached house,Semi-detached house,Apartment,Bungalow,Semi-detached bungalow,Chalet,Town House,End-terrace house,Terrace house,Cottage,Hotel,Land', 'geodirectory'), |
|
105 | 105 | 'validation_pattern' => '', |
106 | 106 | 'validation_msg' => '', |
107 | 107 | 'required_msg' => '', |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | 'default_value' => '', |
125 | 125 | 'show_in' => '[detail],[listing]', |
126 | 126 | 'is_required' => true, |
127 | - 'option_values' => __('Select Bedrooms/,1,2,3,4,5,6,7,8,9,10','geodirectory'), |
|
127 | + 'option_values' => __('Select Bedrooms/,1,2,3,4,5,6,7,8,9,10', 'geodirectory'), |
|
128 | 128 | 'validation_pattern' => '', |
129 | 129 | 'validation_msg' => '', |
130 | 130 | 'required_msg' => '', |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | 'default_value' => '', |
148 | 148 | 'show_in' => '[detail],[listing]', |
149 | 149 | 'is_required' => true, |
150 | - 'option_values' => __('Select Bathrooms/,1,2,3,4,5,6,7,8,9,10','geodirectory'), |
|
150 | + 'option_values' => __('Select Bathrooms/,1,2,3,4,5,6,7,8,9,10', 'geodirectory'), |
|
151 | 151 | 'validation_pattern' => '', |
152 | 152 | 'validation_msg' => '', |
153 | 153 | 'required_msg' => '', |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | 'default_value' => '', |
193 | 193 | 'show_in' => '[detail],[listing]', |
194 | 194 | 'is_required' => true, |
195 | - 'option_values' => __('Select Features/,Gas Central Heating,Oil Central Heating,Double Glazing,Triple Glazing,Front Garden,Garage,Private driveway,Off Road Parking,Fireplace','geodirectory'), |
|
195 | + 'option_values' => __('Select Features/,Gas Central Heating,Oil Central Heating,Double Glazing,Triple Glazing,Front Garden,Garage,Private driveway,Off Road Parking,Fireplace', 'geodirectory'), |
|
196 | 196 | 'validation_pattern' => '', |
197 | 197 | 'validation_msg' => '', |
198 | 198 | 'required_msg' => '', |
@@ -215,25 +215,25 @@ discard block |
||
215 | 215 | return $fields; |
216 | 216 | } |
217 | 217 | |
218 | -global $city_bound_lat1, $city_bound_lng1, $city_bound_lat2, $city_bound_lng2,$wpdb, $current_user,$dummy_post_index; |
|
218 | +global $city_bound_lat1, $city_bound_lng1, $city_bound_lat2, $city_bound_lng2, $wpdb, $current_user, $dummy_post_index; |
|
219 | 219 | $post_info = array(); |
220 | 220 | $image_array = array(); |
221 | 221 | $post_meta = array(); |
222 | 222 | $category_array = array('Apartments', 'Houses', 'Commercial', 'Land'); |
223 | 223 | |
224 | -if($dummy_post_index==1){ |
|
224 | +if ($dummy_post_index == 1) { |
|
225 | 225 | // add the dummy categories |
226 | - geodir_dummy_data_taxonomies($post_type,$category_array ); |
|
226 | + geodir_dummy_data_taxonomies($post_type, $category_array); |
|
227 | 227 | |
228 | 228 | // add the dummy custom fields |
229 | 229 | $fields = geodir_property_sale_custom_fields($post_type); |
230 | 230 | geodir_create_dummy_fields($fields); |
231 | 231 | // update the type currently installed |
232 | - update_option($post_type.'_dummy_data_type','property_rent'); |
|
232 | + update_option($post_type.'_dummy_data_type', 'property_rent'); |
|
233 | 233 | } |
234 | 234 | |
235 | 235 | if (geodir_dummy_folder_exists()) |
236 | - $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy"; |
|
236 | + $dummy_image_url = geodir_plugin_url()."/geodirectory-admin/dummy"; |
|
237 | 237 | else |
238 | 238 | $dummy_image_url = 'http://www.wpgeodirectory.com/dummy'; |
239 | 239 |
@@ -17,10 +17,11 @@ discard block |
||
17 | 17 | update_option($post_type.'_dummy_data_type','standard_places'); |
18 | 18 | } |
19 | 19 | |
20 | -if (geodir_dummy_folder_exists()) |
|
20 | +if (geodir_dummy_folder_exists()) { |
|
21 | 21 | $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy"; |
22 | -else |
|
22 | +} else { |
|
23 | 23 | $dummy_image_url = 'http://www.wpgeodirectory.com/dummy'; |
24 | +} |
|
24 | 25 | |
25 | 26 | $dummy_image_url = apply_filters('place_dummy_image_url', $dummy_image_url); |
26 | 27 | |
@@ -1815,16 +1816,18 @@ discard block |
||
1815 | 1816 | echo '###4.1'; |
1816 | 1817 | foreach ($post_info as $post_info) {echo '###5'; |
1817 | 1818 | $default_location = geodir_get_default_location(); |
1818 | - if ($city_bound_lat1 > $city_bound_lat2) |
|
1819 | - $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat1, $city_bound_lat2), geodir_random_float($city_bound_lat2, $city_bound_lat1)); |
|
1820 | - else |
|
1821 | - $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat2, $city_bound_lat1), geodir_random_float($city_bound_lat1, $city_bound_lat2)); |
|
1819 | + if ($city_bound_lat1 > $city_bound_lat2) { |
|
1820 | + $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat1, $city_bound_lat2), geodir_random_float($city_bound_lat2, $city_bound_lat1)); |
|
1821 | + } else { |
|
1822 | + $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat2, $city_bound_lat1), geodir_random_float($city_bound_lat1, $city_bound_lat2)); |
|
1823 | + } |
|
1822 | 1824 | |
1823 | 1825 | |
1824 | - if ($city_bound_lng1 > $city_bound_lng2) |
|
1825 | - $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng1, $city_bound_lng2), geodir_random_float($city_bound_lng2, $city_bound_lng1)); |
|
1826 | - else |
|
1827 | - $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng2, $city_bound_lng1), geodir_random_float($city_bound_lng1, $city_bound_lng2)); |
|
1826 | + if ($city_bound_lng1 > $city_bound_lng2) { |
|
1827 | + $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng1, $city_bound_lng2), geodir_random_float($city_bound_lng2, $city_bound_lng1)); |
|
1828 | + } else { |
|
1829 | + $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng2, $city_bound_lng1), geodir_random_float($city_bound_lng1, $city_bound_lng2)); |
|
1830 | + } |
|
1828 | 1831 | |
1829 | 1832 | $load_map = get_option('geodir_load_map'); |
1830 | 1833 |
@@ -7,212 +7,212 @@ discard block |
||
7 | 7 | */ |
8 | 8 | |
9 | 9 | function geodir_property_sale_custom_fields($post_type='gd_place',$package_id=''){ |
10 | - $fields = array(); |
|
11 | - $package = ($package_id=='') ? '' : array($package_id); |
|
12 | - |
|
13 | - // price |
|
14 | - $fields[] = array('listing_type' => $post_type, |
|
15 | - 'field_type' => 'text', |
|
16 | - 'data_type' => 'FLOAT', |
|
17 | - 'decimal_point' => '2', |
|
18 | - 'admin_title' => __('Price', 'geodirectory'), |
|
19 | - 'site_title' => __('Price', 'geodirectory'), |
|
20 | - 'admin_desc' => __('Enter the price in $ (no currency symbol)', 'geodirectory'), |
|
21 | - 'htmlvar_name' => 'price', |
|
22 | - 'is_active' => true, |
|
23 | - 'for_admin_use' => false, |
|
24 | - 'default_value' => '', |
|
25 | - 'show_in' => '[detail],[listing]', |
|
26 | - 'is_required' => false, |
|
27 | - 'validation_pattern' => '\d+(\.\d{2})?', |
|
28 | - 'validation_msg' => 'Please enter number and decimal only ie: 100.50', |
|
29 | - 'required_msg' => '', |
|
30 | - 'field_icon' => 'fa fa-usd', |
|
31 | - 'css_class' => '', |
|
32 | - 'cat_sort' => true, |
|
33 | - 'cat_filter' => true, |
|
34 | - 'extra' => array( |
|
35 | - 'is_price' => 1, |
|
36 | - 'thousand_separator' => 'comma', |
|
37 | - 'decimal_separator' => 'period', |
|
38 | - 'decimal_display' => 'if', |
|
39 | - 'currency_symbol' => '$', |
|
40 | - 'currency_symbol_placement' => 'left' |
|
41 | - ) |
|
42 | - ); |
|
43 | - |
|
44 | - // property status |
|
45 | - $fields[] = array('listing_type' => $post_type, |
|
46 | - 'data_type' => 'VARCHAR', |
|
47 | - 'field_type' => 'select', |
|
48 | - 'field_type_key' => 'property_status', |
|
49 | - 'is_active' => 1, |
|
50 | - 'for_admin_use' => 0, |
|
51 | - 'is_default' => 0, |
|
52 | - 'admin_title' => __('Property Status', 'geodirectory'), |
|
53 | - 'admin_desc' => __('Enter the status of the property.', 'geodirectory'), |
|
54 | - 'site_title' => __('Property Status', 'geodirectory'), |
|
55 | - 'htmlvar_name' => 'property_status', |
|
56 | - 'default_value' => '', |
|
57 | - 'is_required' => '1', |
|
58 | - 'required_msg' => '', |
|
59 | - 'show_in' => '[detail],[listing]', |
|
60 | - 'show_on_pkg' => $package, |
|
61 | - 'option_values' => 'Select Status/,For Sale,Sold,Under Offer', |
|
62 | - 'field_icon' => 'fa fa-home', |
|
63 | - 'css_class' => '', |
|
64 | - 'cat_sort' => 1, |
|
65 | - 'cat_filter' => 1, |
|
66 | - ); |
|
67 | - |
|
68 | - // property furnishing |
|
69 | - $fields[] = array('listing_type' => $post_type, |
|
70 | - 'field_type' => 'select', |
|
71 | - 'data_type' => 'VARCHAR', |
|
72 | - 'admin_title' => __('Furnishing', 'geodirectory'), |
|
73 | - 'site_title' => __('Furnishing', 'geodirectory'), |
|
74 | - 'admin_desc' => __('Enter the furnishing status of the property.', 'geodirectory'), |
|
75 | - 'htmlvar_name' => 'property_furnishing', |
|
76 | - 'is_active' => true, |
|
77 | - 'for_admin_use' => false, |
|
78 | - 'default_value' => '', |
|
79 | - 'show_in' => '[detail],[listing]', |
|
80 | - 'is_required' => true, |
|
81 | - 'option_values' => __('Select Status/,Unfurnished,Furnished,Partially furnished,Optional','geodirectory'), |
|
82 | - 'validation_pattern' => '', |
|
83 | - 'validation_msg' => '', |
|
84 | - 'required_msg' => '', |
|
85 | - 'field_icon' => 'fa fa-th-large', |
|
86 | - 'css_class' => '', |
|
87 | - 'cat_sort' => true, |
|
88 | - 'cat_filter' => true |
|
89 | - ); |
|
90 | - |
|
91 | - // property type |
|
92 | - $fields[] = array('listing_type' => $post_type, |
|
93 | - 'field_type' => 'select', |
|
94 | - 'data_type' => 'VARCHAR', |
|
95 | - 'admin_title' => __('Property Type', 'geodirectory'), |
|
96 | - 'site_title' => __('Property Type', 'geodirectory'), |
|
97 | - 'admin_desc' => __('Select the property type.', 'geodirectory'), |
|
98 | - 'htmlvar_name' => 'property_type', |
|
99 | - 'is_active' => true, |
|
100 | - 'for_admin_use' => false, |
|
101 | - 'default_value' => '', |
|
102 | - 'show_in' => '[detail],[listing]', |
|
103 | - 'is_required' => true, |
|
104 | - 'option_values' => __('Select Type/,Detached house,Semi-detached house,Apartment,Bungalow,Semi-detached bungalow,Chalet,Town House,End-terrace house,Terrace house,Cottage,Hotel,Land','geodirectory'), |
|
105 | - 'validation_pattern' => '', |
|
106 | - 'validation_msg' => '', |
|
107 | - 'required_msg' => '', |
|
108 | - 'field_icon' => 'fa fa-home', |
|
109 | - 'css_class' => '', |
|
110 | - 'cat_sort' => true, |
|
111 | - 'cat_filter' => true |
|
112 | - ); |
|
113 | - |
|
114 | - // property bedrooms |
|
115 | - $fields[] = array('listing_type' => $post_type, |
|
116 | - 'field_type' => 'select', |
|
117 | - 'data_type' => 'VARCHAR', |
|
118 | - 'admin_title' => __('Property Bedrooms', 'geodirectory'), |
|
119 | - 'site_title' => __('Bedrooms', 'geodirectory'), |
|
120 | - 'admin_desc' => __('Select the number of bedrooms', 'geodirectory'), |
|
121 | - 'htmlvar_name' => 'property_bedrooms', |
|
122 | - 'is_active' => true, |
|
123 | - 'for_admin_use' => false, |
|
124 | - 'default_value' => '', |
|
125 | - 'show_in' => '[detail],[listing]', |
|
126 | - 'is_required' => true, |
|
127 | - 'option_values' => __('Select Bedrooms/,1,2,3,4,5,6,7,8,9,10','geodirectory'), |
|
128 | - 'validation_pattern' => '', |
|
129 | - 'validation_msg' => '', |
|
130 | - 'required_msg' => '', |
|
131 | - 'field_icon' => 'fa fa-bed', |
|
132 | - 'css_class' => '', |
|
133 | - 'cat_sort' => true, |
|
134 | - 'cat_filter' => true |
|
135 | - ); |
|
136 | - |
|
137 | - // property bathrooms |
|
138 | - $fields[] = array('listing_type' => $post_type, |
|
139 | - 'field_type' => 'select', |
|
140 | - 'data_type' => 'VARCHAR', |
|
141 | - 'admin_title' => __('Property Bathrooms', 'geodirectory'), |
|
142 | - 'site_title' => __('Bathrooms', 'geodirectory'), |
|
143 | - 'admin_desc' => __('Select the number of bathrooms', 'geodirectory'), |
|
144 | - 'htmlvar_name' => 'property_bathrooms', |
|
145 | - 'is_active' => true, |
|
146 | - 'for_admin_use' => false, |
|
147 | - 'default_value' => '', |
|
148 | - 'show_in' => '[detail],[listing]', |
|
149 | - 'is_required' => true, |
|
150 | - 'option_values' => __('Select Bathrooms/,1,2,3,4,5,6,7,8,9,10','geodirectory'), |
|
151 | - 'validation_pattern' => '', |
|
152 | - 'validation_msg' => '', |
|
153 | - 'required_msg' => '', |
|
154 | - 'field_icon' => 'fa fa-bold', |
|
155 | - 'css_class' => '', |
|
156 | - 'cat_sort' => true, |
|
157 | - 'cat_filter' => true |
|
158 | - ); |
|
159 | - |
|
160 | - // property area |
|
161 | - $fields[] = array('listing_type' => $post_type, |
|
162 | - 'field_type' => 'text', |
|
163 | - 'data_type' => 'FLOAT', |
|
164 | - 'admin_title' => __('Property Area', 'geodirectory'), |
|
165 | - 'site_title' => __('Area (Sq Ft)', 'geodirectory'), |
|
166 | - 'admin_desc' => __('Enter the Sq Ft value for the property', 'geodirectory'), |
|
167 | - 'htmlvar_name' => 'property_area', |
|
168 | - 'is_active' => true, |
|
169 | - 'for_admin_use' => false, |
|
170 | - 'default_value' => '', |
|
171 | - 'show_in' => '[detail],[listing]', |
|
172 | - 'is_required' => false, |
|
173 | - 'validation_pattern' => '\d+(\.\d{2})?', |
|
174 | - 'validation_msg' => 'Please enter the property area in numbers only: 1500', |
|
175 | - 'required_msg' => '', |
|
176 | - 'field_icon' => 'fa fa-area-chart', |
|
177 | - 'css_class' => '', |
|
178 | - 'cat_sort' => true, |
|
179 | - 'cat_filter' => true |
|
180 | - ); |
|
181 | - |
|
182 | - // property features |
|
183 | - $fields[] = array('listing_type' => $post_type, |
|
184 | - 'field_type' => 'multiselect', |
|
185 | - 'data_type' => 'VARCHAR', |
|
186 | - 'admin_title' => __('Property Features', 'geodirectory'), |
|
187 | - 'site_title' => __('Features', 'geodirectory'), |
|
188 | - 'admin_desc' => __('Select the property features.', 'geodirectory'), |
|
189 | - 'htmlvar_name' => 'property_features', |
|
190 | - 'is_active' => true, |
|
191 | - 'for_admin_use' => false, |
|
192 | - 'default_value' => '', |
|
193 | - 'show_in' => '[detail],[listing]', |
|
194 | - 'is_required' => true, |
|
195 | - 'option_values' => __('Select Features/,Gas Central Heating,Oil Central Heating,Double Glazing,Triple Glazing,Front Garden,Garage,Private driveway,Off Road Parking,Fireplace','geodirectory'), |
|
196 | - 'validation_pattern' => '', |
|
197 | - 'validation_msg' => '', |
|
198 | - 'required_msg' => '', |
|
199 | - 'field_icon' => 'fa fa-plus-square', |
|
200 | - 'css_class' => 'gd-comma-list', |
|
201 | - 'cat_sort' => true, |
|
202 | - 'cat_filter' => true |
|
203 | - ); |
|
204 | - |
|
205 | - |
|
206 | - |
|
207 | - /** |
|
208 | - * Filter the array of default custom fields DB table data. |
|
209 | - * |
|
210 | - * @since 1.6.6 |
|
211 | - * @param string $fields The default custom fields as an array. |
|
212 | - */ |
|
213 | - $fields = apply_filters('geodir_property_sale_custom_fields', $fields); |
|
214 | - |
|
215 | - return $fields; |
|
10 | + $fields = array(); |
|
11 | + $package = ($package_id=='') ? '' : array($package_id); |
|
12 | + |
|
13 | + // price |
|
14 | + $fields[] = array('listing_type' => $post_type, |
|
15 | + 'field_type' => 'text', |
|
16 | + 'data_type' => 'FLOAT', |
|
17 | + 'decimal_point' => '2', |
|
18 | + 'admin_title' => __('Price', 'geodirectory'), |
|
19 | + 'site_title' => __('Price', 'geodirectory'), |
|
20 | + 'admin_desc' => __('Enter the price in $ (no currency symbol)', 'geodirectory'), |
|
21 | + 'htmlvar_name' => 'price', |
|
22 | + 'is_active' => true, |
|
23 | + 'for_admin_use' => false, |
|
24 | + 'default_value' => '', |
|
25 | + 'show_in' => '[detail],[listing]', |
|
26 | + 'is_required' => false, |
|
27 | + 'validation_pattern' => '\d+(\.\d{2})?', |
|
28 | + 'validation_msg' => 'Please enter number and decimal only ie: 100.50', |
|
29 | + 'required_msg' => '', |
|
30 | + 'field_icon' => 'fa fa-usd', |
|
31 | + 'css_class' => '', |
|
32 | + 'cat_sort' => true, |
|
33 | + 'cat_filter' => true, |
|
34 | + 'extra' => array( |
|
35 | + 'is_price' => 1, |
|
36 | + 'thousand_separator' => 'comma', |
|
37 | + 'decimal_separator' => 'period', |
|
38 | + 'decimal_display' => 'if', |
|
39 | + 'currency_symbol' => '$', |
|
40 | + 'currency_symbol_placement' => 'left' |
|
41 | + ) |
|
42 | + ); |
|
43 | + |
|
44 | + // property status |
|
45 | + $fields[] = array('listing_type' => $post_type, |
|
46 | + 'data_type' => 'VARCHAR', |
|
47 | + 'field_type' => 'select', |
|
48 | + 'field_type_key' => 'property_status', |
|
49 | + 'is_active' => 1, |
|
50 | + 'for_admin_use' => 0, |
|
51 | + 'is_default' => 0, |
|
52 | + 'admin_title' => __('Property Status', 'geodirectory'), |
|
53 | + 'admin_desc' => __('Enter the status of the property.', 'geodirectory'), |
|
54 | + 'site_title' => __('Property Status', 'geodirectory'), |
|
55 | + 'htmlvar_name' => 'property_status', |
|
56 | + 'default_value' => '', |
|
57 | + 'is_required' => '1', |
|
58 | + 'required_msg' => '', |
|
59 | + 'show_in' => '[detail],[listing]', |
|
60 | + 'show_on_pkg' => $package, |
|
61 | + 'option_values' => 'Select Status/,For Sale,Sold,Under Offer', |
|
62 | + 'field_icon' => 'fa fa-home', |
|
63 | + 'css_class' => '', |
|
64 | + 'cat_sort' => 1, |
|
65 | + 'cat_filter' => 1, |
|
66 | + ); |
|
67 | + |
|
68 | + // property furnishing |
|
69 | + $fields[] = array('listing_type' => $post_type, |
|
70 | + 'field_type' => 'select', |
|
71 | + 'data_type' => 'VARCHAR', |
|
72 | + 'admin_title' => __('Furnishing', 'geodirectory'), |
|
73 | + 'site_title' => __('Furnishing', 'geodirectory'), |
|
74 | + 'admin_desc' => __('Enter the furnishing status of the property.', 'geodirectory'), |
|
75 | + 'htmlvar_name' => 'property_furnishing', |
|
76 | + 'is_active' => true, |
|
77 | + 'for_admin_use' => false, |
|
78 | + 'default_value' => '', |
|
79 | + 'show_in' => '[detail],[listing]', |
|
80 | + 'is_required' => true, |
|
81 | + 'option_values' => __('Select Status/,Unfurnished,Furnished,Partially furnished,Optional','geodirectory'), |
|
82 | + 'validation_pattern' => '', |
|
83 | + 'validation_msg' => '', |
|
84 | + 'required_msg' => '', |
|
85 | + 'field_icon' => 'fa fa-th-large', |
|
86 | + 'css_class' => '', |
|
87 | + 'cat_sort' => true, |
|
88 | + 'cat_filter' => true |
|
89 | + ); |
|
90 | + |
|
91 | + // property type |
|
92 | + $fields[] = array('listing_type' => $post_type, |
|
93 | + 'field_type' => 'select', |
|
94 | + 'data_type' => 'VARCHAR', |
|
95 | + 'admin_title' => __('Property Type', 'geodirectory'), |
|
96 | + 'site_title' => __('Property Type', 'geodirectory'), |
|
97 | + 'admin_desc' => __('Select the property type.', 'geodirectory'), |
|
98 | + 'htmlvar_name' => 'property_type', |
|
99 | + 'is_active' => true, |
|
100 | + 'for_admin_use' => false, |
|
101 | + 'default_value' => '', |
|
102 | + 'show_in' => '[detail],[listing]', |
|
103 | + 'is_required' => true, |
|
104 | + 'option_values' => __('Select Type/,Detached house,Semi-detached house,Apartment,Bungalow,Semi-detached bungalow,Chalet,Town House,End-terrace house,Terrace house,Cottage,Hotel,Land','geodirectory'), |
|
105 | + 'validation_pattern' => '', |
|
106 | + 'validation_msg' => '', |
|
107 | + 'required_msg' => '', |
|
108 | + 'field_icon' => 'fa fa-home', |
|
109 | + 'css_class' => '', |
|
110 | + 'cat_sort' => true, |
|
111 | + 'cat_filter' => true |
|
112 | + ); |
|
113 | + |
|
114 | + // property bedrooms |
|
115 | + $fields[] = array('listing_type' => $post_type, |
|
116 | + 'field_type' => 'select', |
|
117 | + 'data_type' => 'VARCHAR', |
|
118 | + 'admin_title' => __('Property Bedrooms', 'geodirectory'), |
|
119 | + 'site_title' => __('Bedrooms', 'geodirectory'), |
|
120 | + 'admin_desc' => __('Select the number of bedrooms', 'geodirectory'), |
|
121 | + 'htmlvar_name' => 'property_bedrooms', |
|
122 | + 'is_active' => true, |
|
123 | + 'for_admin_use' => false, |
|
124 | + 'default_value' => '', |
|
125 | + 'show_in' => '[detail],[listing]', |
|
126 | + 'is_required' => true, |
|
127 | + 'option_values' => __('Select Bedrooms/,1,2,3,4,5,6,7,8,9,10','geodirectory'), |
|
128 | + 'validation_pattern' => '', |
|
129 | + 'validation_msg' => '', |
|
130 | + 'required_msg' => '', |
|
131 | + 'field_icon' => 'fa fa-bed', |
|
132 | + 'css_class' => '', |
|
133 | + 'cat_sort' => true, |
|
134 | + 'cat_filter' => true |
|
135 | + ); |
|
136 | + |
|
137 | + // property bathrooms |
|
138 | + $fields[] = array('listing_type' => $post_type, |
|
139 | + 'field_type' => 'select', |
|
140 | + 'data_type' => 'VARCHAR', |
|
141 | + 'admin_title' => __('Property Bathrooms', 'geodirectory'), |
|
142 | + 'site_title' => __('Bathrooms', 'geodirectory'), |
|
143 | + 'admin_desc' => __('Select the number of bathrooms', 'geodirectory'), |
|
144 | + 'htmlvar_name' => 'property_bathrooms', |
|
145 | + 'is_active' => true, |
|
146 | + 'for_admin_use' => false, |
|
147 | + 'default_value' => '', |
|
148 | + 'show_in' => '[detail],[listing]', |
|
149 | + 'is_required' => true, |
|
150 | + 'option_values' => __('Select Bathrooms/,1,2,3,4,5,6,7,8,9,10','geodirectory'), |
|
151 | + 'validation_pattern' => '', |
|
152 | + 'validation_msg' => '', |
|
153 | + 'required_msg' => '', |
|
154 | + 'field_icon' => 'fa fa-bold', |
|
155 | + 'css_class' => '', |
|
156 | + 'cat_sort' => true, |
|
157 | + 'cat_filter' => true |
|
158 | + ); |
|
159 | + |
|
160 | + // property area |
|
161 | + $fields[] = array('listing_type' => $post_type, |
|
162 | + 'field_type' => 'text', |
|
163 | + 'data_type' => 'FLOAT', |
|
164 | + 'admin_title' => __('Property Area', 'geodirectory'), |
|
165 | + 'site_title' => __('Area (Sq Ft)', 'geodirectory'), |
|
166 | + 'admin_desc' => __('Enter the Sq Ft value for the property', 'geodirectory'), |
|
167 | + 'htmlvar_name' => 'property_area', |
|
168 | + 'is_active' => true, |
|
169 | + 'for_admin_use' => false, |
|
170 | + 'default_value' => '', |
|
171 | + 'show_in' => '[detail],[listing]', |
|
172 | + 'is_required' => false, |
|
173 | + 'validation_pattern' => '\d+(\.\d{2})?', |
|
174 | + 'validation_msg' => 'Please enter the property area in numbers only: 1500', |
|
175 | + 'required_msg' => '', |
|
176 | + 'field_icon' => 'fa fa-area-chart', |
|
177 | + 'css_class' => '', |
|
178 | + 'cat_sort' => true, |
|
179 | + 'cat_filter' => true |
|
180 | + ); |
|
181 | + |
|
182 | + // property features |
|
183 | + $fields[] = array('listing_type' => $post_type, |
|
184 | + 'field_type' => 'multiselect', |
|
185 | + 'data_type' => 'VARCHAR', |
|
186 | + 'admin_title' => __('Property Features', 'geodirectory'), |
|
187 | + 'site_title' => __('Features', 'geodirectory'), |
|
188 | + 'admin_desc' => __('Select the property features.', 'geodirectory'), |
|
189 | + 'htmlvar_name' => 'property_features', |
|
190 | + 'is_active' => true, |
|
191 | + 'for_admin_use' => false, |
|
192 | + 'default_value' => '', |
|
193 | + 'show_in' => '[detail],[listing]', |
|
194 | + 'is_required' => true, |
|
195 | + 'option_values' => __('Select Features/,Gas Central Heating,Oil Central Heating,Double Glazing,Triple Glazing,Front Garden,Garage,Private driveway,Off Road Parking,Fireplace','geodirectory'), |
|
196 | + 'validation_pattern' => '', |
|
197 | + 'validation_msg' => '', |
|
198 | + 'required_msg' => '', |
|
199 | + 'field_icon' => 'fa fa-plus-square', |
|
200 | + 'css_class' => 'gd-comma-list', |
|
201 | + 'cat_sort' => true, |
|
202 | + 'cat_filter' => true |
|
203 | + ); |
|
204 | + |
|
205 | + |
|
206 | + |
|
207 | + /** |
|
208 | + * Filter the array of default custom fields DB table data. |
|
209 | + * |
|
210 | + * @since 1.6.6 |
|
211 | + * @param string $fields The default custom fields as an array. |
|
212 | + */ |
|
213 | + $fields = apply_filters('geodir_property_sale_custom_fields', $fields); |
|
214 | + |
|
215 | + return $fields; |
|
216 | 216 | } |
217 | 217 | |
218 | 218 | global $city_bound_lat1, $city_bound_lng1, $city_bound_lat2, $city_bound_lng2,$wpdb, $current_user,$dummy_post_index; |
@@ -222,36 +222,36 @@ discard block |
||
222 | 222 | $category_array = array('Apartments', 'Houses', 'Commercial', 'Land'); |
223 | 223 | |
224 | 224 | if($dummy_post_index==1){ |
225 | - // add the dummy categories |
|
226 | - geodir_dummy_data_taxonomies($post_type,$category_array ); |
|
225 | + // add the dummy categories |
|
226 | + geodir_dummy_data_taxonomies($post_type,$category_array ); |
|
227 | 227 | |
228 | - // add the dummy custom fields |
|
229 | - $fields = geodir_property_sale_custom_fields($post_type); |
|
230 | - geodir_create_dummy_fields($fields); |
|
231 | - update_option($post_type.'_dummy_data_type','property_sale'); |
|
228 | + // add the dummy custom fields |
|
229 | + $fields = geodir_property_sale_custom_fields($post_type); |
|
230 | + geodir_create_dummy_fields($fields); |
|
231 | + update_option($post_type.'_dummy_data_type','property_sale'); |
|
232 | 232 | } |
233 | 233 | |
234 | 234 | if (geodir_dummy_folder_exists()) |
235 | - $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy"; |
|
235 | + $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy"; |
|
236 | 236 | else |
237 | - $dummy_image_url = 'http://www.wpgeodirectory.com/dummy'; |
|
237 | + $dummy_image_url = 'http://www.wpgeodirectory.com/dummy'; |
|
238 | 238 | |
239 | 239 | $dummy_image_url = apply_filters('place_dummy_image_url', $dummy_image_url); |
240 | 240 | |
241 | 241 | switch ($dummy_post_index) { |
242 | 242 | |
243 | - case(1): |
|
244 | - $image_array[] = "$dummy_image_url/ps/psf1.jpg"; |
|
245 | - $image_array[] = "$dummy_image_url/ps/psl1.jpg"; |
|
246 | - $image_array[] = "$dummy_image_url/ps/psb1.jpg"; |
|
247 | - $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
248 | - $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
243 | + case(1): |
|
244 | + $image_array[] = "$dummy_image_url/ps/psf1.jpg"; |
|
245 | + $image_array[] = "$dummy_image_url/ps/psl1.jpg"; |
|
246 | + $image_array[] = "$dummy_image_url/ps/psb1.jpg"; |
|
247 | + $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
248 | + $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
249 | 249 | |
250 | 250 | |
251 | - $post_info[] = array( |
|
252 | - "listing_type" => $post_type, |
|
253 | - "post_title" => 'Eastern Lodge', |
|
254 | - "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec non augue ultrices, vulputate nulla at, consectetur ante. Quisque neque mi, vulputate quis nulla a, sollicitudin fringilla leo. Nam dictum id neque eu imperdiet. Curabitur ligula turpis, malesuada at lobortis commodo, vulputate volutpat arcu. Duis bibendum blandit aliquam. In ipsum diam, tristique ut bibendum vel, lobortis non tellus. Nulla ultricies, ante vitae placerat auctor, nisi quam blandit enim, sit amet aliquam est diam id urna. Suspendisse eget nibh volutpat, malesuada enim sed, egestas massa. |
|
251 | + $post_info[] = array( |
|
252 | + "listing_type" => $post_type, |
|
253 | + "post_title" => 'Eastern Lodge', |
|
254 | + "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec non augue ultrices, vulputate nulla at, consectetur ante. Quisque neque mi, vulputate quis nulla a, sollicitudin fringilla leo. Nam dictum id neque eu imperdiet. Curabitur ligula turpis, malesuada at lobortis commodo, vulputate volutpat arcu. Duis bibendum blandit aliquam. In ipsum diam, tristique ut bibendum vel, lobortis non tellus. Nulla ultricies, ante vitae placerat auctor, nisi quam blandit enim, sit amet aliquam est diam id urna. Suspendisse eget nibh volutpat, malesuada enim sed, egestas massa. |
|
255 | 255 | |
256 | 256 | Aliquam ut odio ullamcorper, posuere enim sed, venenatis tortor. Donec justo elit, aliquam sed cursus sed, semper eget libero. Mauris consequat lorem sed fringilla tincidunt. Phasellus suscipit velit et elit tristique, ac commodo metus scelerisque. Vivamus finibus ipsum placerat pulvinar aliquet. Maecenas augue orci, blandit at nibh pharetra, condimentum congue ligula. Duis non ante sagittis odio convallis lacinia in quis sapien. |
257 | 257 | |
@@ -260,42 +260,42 @@ discard block |
||
260 | 260 | Vestibulum tristique quam eget bibendum pulvinar. Mauris sit amet magna ut arcu rutrum pellentesque feugiat et ipsum. Proin porta quam sed risus accumsan pharetra. Nulla quis semper nisl. Nulla facilisi. Nulla facilisi. Pellentesque euismod sollicitudin lacus vel ultricies. Vestibulum ut sem ut nulla ultricies convallis in at mi. Nunc vitae nibh arcu. Maecenas nunc enim, tempus a rhoncus eget, pellentesque ut erat. |
261 | 261 | |
262 | 262 | Suspendisse interdum accumsan magna et tempor. Suspendisse scelerisque at lorem sit amet faucibus. Aenean quis consectetur enim. Duis aliquet tristique tempus. Suspendisse id ullamcorper mauris. Aliquam in libero eu justo porttitor pulvinar. Nulla semper placerat lectus. Nulla mollis suscipit lacus, a blandit purus cursus non. Maecenas id tellus mi. Pellentesque sollicitudin nibh eget magna scelerisque consequat. Aliquam convallis orci arcu, et euismod dui cursus et. Donec nec pellentesque nulla, ac pretium massa. In gravida bibendum ornare.', |
263 | - "post_images" => $image_array, |
|
264 | - "post_category" => array($post_type.'category' => array($category_array[1])), |
|
265 | - "post_tags" => array('Tags', 'Sample Tags'), |
|
266 | - "geodir_video" => '', |
|
267 | - "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
268 | - "geodir_contact" => '(111) 677-4444', |
|
269 | - "geodir_email" => '[email protected]', |
|
270 | - "geodir_website" => 'http://example.com/', |
|
271 | - "geodir_twitter" => 'http://example.com/', |
|
272 | - "geodir_facebook" => 'http://example.com/', |
|
273 | - "geodir_price" => '350000', |
|
274 | - "geodir_property_status" => 'For Sale', |
|
275 | - 'geodir_property_furnishing' => 'Furnished', |
|
276 | - 'geodir_property_type' => 'Detached house', |
|
277 | - 'geodir_property_bedrooms' => '3', |
|
278 | - 'geodir_property_bathrooms' => '2', |
|
279 | - 'geodir_property_area' => '1850', |
|
280 | - 'geodir_property_features' => 'Gas Central Heating,Triple Glazing,Front Garden,Private driveway,Fireplace', |
|
281 | - "post_dummy" => '1' |
|
282 | - ); |
|
283 | - |
|
284 | - |
|
285 | - break; |
|
286 | - case 2: |
|
287 | - $image_array = array(); |
|
288 | - $post_meta = array(); |
|
289 | - $image_array[] = "$dummy_image_url/ps/psf2.jpg"; |
|
290 | - $image_array[] = "$dummy_image_url/ps/psl2.jpg"; |
|
291 | - $image_array[] = "$dummy_image_url/ps/psb2.jpg"; |
|
292 | - $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
293 | - $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
294 | - |
|
295 | - $post_info[] = array( |
|
296 | - "listing_type" => $post_type, |
|
297 | - "post_title" => 'Daisy Street', |
|
298 | - "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
263 | + "post_images" => $image_array, |
|
264 | + "post_category" => array($post_type.'category' => array($category_array[1])), |
|
265 | + "post_tags" => array('Tags', 'Sample Tags'), |
|
266 | + "geodir_video" => '', |
|
267 | + "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
268 | + "geodir_contact" => '(111) 677-4444', |
|
269 | + "geodir_email" => '[email protected]', |
|
270 | + "geodir_website" => 'http://example.com/', |
|
271 | + "geodir_twitter" => 'http://example.com/', |
|
272 | + "geodir_facebook" => 'http://example.com/', |
|
273 | + "geodir_price" => '350000', |
|
274 | + "geodir_property_status" => 'For Sale', |
|
275 | + 'geodir_property_furnishing' => 'Furnished', |
|
276 | + 'geodir_property_type' => 'Detached house', |
|
277 | + 'geodir_property_bedrooms' => '3', |
|
278 | + 'geodir_property_bathrooms' => '2', |
|
279 | + 'geodir_property_area' => '1850', |
|
280 | + 'geodir_property_features' => 'Gas Central Heating,Triple Glazing,Front Garden,Private driveway,Fireplace', |
|
281 | + "post_dummy" => '1' |
|
282 | + ); |
|
283 | + |
|
284 | + |
|
285 | + break; |
|
286 | + case 2: |
|
287 | + $image_array = array(); |
|
288 | + $post_meta = array(); |
|
289 | + $image_array[] = "$dummy_image_url/ps/psf2.jpg"; |
|
290 | + $image_array[] = "$dummy_image_url/ps/psl2.jpg"; |
|
291 | + $image_array[] = "$dummy_image_url/ps/psb2.jpg"; |
|
292 | + $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
293 | + $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
294 | + |
|
295 | + $post_info[] = array( |
|
296 | + "listing_type" => $post_type, |
|
297 | + "post_title" => 'Daisy Street', |
|
298 | + "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
299 | 299 | |
300 | 300 | Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel. |
301 | 301 | |
@@ -305,42 +305,42 @@ discard block |
||
305 | 305 | |
306 | 306 | Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.', |
307 | 307 | |
308 | - "post_images" => $image_array, |
|
309 | - "post_category" => array($post_type.'category' => array($category_array[1])), |
|
310 | - "post_tags" => array('Garage'), |
|
311 | - "geodir_video" => '', |
|
312 | - "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
313 | - "geodir_contact" => '(222) 777-1111', |
|
314 | - "geodir_email" => '[email protected]', |
|
315 | - "geodir_website" => 'http://example.com/', |
|
316 | - "geodir_twitter" => 'http://example.com/', |
|
317 | - "geodir_facebook" => 'http://example.com/', |
|
318 | - "geodir_price" => '230000', |
|
319 | - "geodir_property_status" => 'Sold', |
|
320 | - 'geodir_property_furnishing' => 'Unfurnished', |
|
321 | - 'geodir_property_type' => 'Detached house', |
|
322 | - 'geodir_property_bedrooms' => '5', |
|
323 | - 'geodir_property_bathrooms' => '3', |
|
324 | - 'geodir_property_area' => '2650', |
|
325 | - 'geodir_property_features' => 'Select Features/,Oil Central Heating,Front Garden,Garage,Private driveway,Fireplace', |
|
326 | - "post_dummy" => '1' |
|
327 | - ); |
|
328 | - |
|
329 | - break; |
|
330 | - |
|
331 | - case 3: |
|
332 | - $image_array = array(); |
|
333 | - $post_meta = array(); |
|
334 | - $image_array[] = "$dummy_image_url/ps/psf3.jpg"; |
|
335 | - $image_array[] = "$dummy_image_url/ps/psl3.jpg"; |
|
336 | - $image_array[] = "$dummy_image_url/ps/psb3.jpg"; |
|
337 | - $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
338 | - $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
339 | - |
|
340 | - $post_info[] = array( |
|
341 | - "listing_type" => $post_type, |
|
342 | - "post_title" => 'Northbay House', |
|
343 | - "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
308 | + "post_images" => $image_array, |
|
309 | + "post_category" => array($post_type.'category' => array($category_array[1])), |
|
310 | + "post_tags" => array('Garage'), |
|
311 | + "geodir_video" => '', |
|
312 | + "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
313 | + "geodir_contact" => '(222) 777-1111', |
|
314 | + "geodir_email" => '[email protected]', |
|
315 | + "geodir_website" => 'http://example.com/', |
|
316 | + "geodir_twitter" => 'http://example.com/', |
|
317 | + "geodir_facebook" => 'http://example.com/', |
|
318 | + "geodir_price" => '230000', |
|
319 | + "geodir_property_status" => 'Sold', |
|
320 | + 'geodir_property_furnishing' => 'Unfurnished', |
|
321 | + 'geodir_property_type' => 'Detached house', |
|
322 | + 'geodir_property_bedrooms' => '5', |
|
323 | + 'geodir_property_bathrooms' => '3', |
|
324 | + 'geodir_property_area' => '2650', |
|
325 | + 'geodir_property_features' => 'Select Features/,Oil Central Heating,Front Garden,Garage,Private driveway,Fireplace', |
|
326 | + "post_dummy" => '1' |
|
327 | + ); |
|
328 | + |
|
329 | + break; |
|
330 | + |
|
331 | + case 3: |
|
332 | + $image_array = array(); |
|
333 | + $post_meta = array(); |
|
334 | + $image_array[] = "$dummy_image_url/ps/psf3.jpg"; |
|
335 | + $image_array[] = "$dummy_image_url/ps/psl3.jpg"; |
|
336 | + $image_array[] = "$dummy_image_url/ps/psb3.jpg"; |
|
337 | + $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
338 | + $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
339 | + |
|
340 | + $post_info[] = array( |
|
341 | + "listing_type" => $post_type, |
|
342 | + "post_title" => 'Northbay House', |
|
343 | + "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
344 | 344 | |
345 | 345 | Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel. |
346 | 346 | |
@@ -350,43 +350,43 @@ discard block |
||
350 | 350 | |
351 | 351 | Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.', |
352 | 352 | |
353 | - "post_images" => $image_array, |
|
354 | - "post_category" => array($post_type.'category' => array($category_array[1])), |
|
355 | - "post_tags" => array('Tags', 'Sample Tags'), |
|
356 | - "geodir_video" => '', |
|
357 | - "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
358 | - "geodir_contact" => '(222) 777-1111', |
|
359 | - "geodir_email" => '[email protected]', |
|
360 | - "geodir_website" => 'http://example.com/', |
|
361 | - "geodir_twitter" => 'http://example.com/', |
|
362 | - "geodir_facebook" => 'http://example.com/', |
|
363 | - "geodir_price" => '260000', |
|
364 | - "geodir_property_status" => 'Under Offer', |
|
365 | - 'geodir_property_furnishing' => 'Unfurnished', |
|
366 | - 'geodir_property_type' => 'Detached house', |
|
367 | - 'geodir_property_bedrooms' => '6', |
|
368 | - 'geodir_property_bathrooms' => '6', |
|
369 | - 'geodir_property_area' => '1650', |
|
370 | - 'geodir_property_features' => 'Select Features/,Gas Central Heating,Triple Glazing,Off Road Parking,Fireplace', |
|
371 | - "post_dummy" => '1' |
|
372 | - ); |
|
373 | - |
|
374 | - break; |
|
375 | - |
|
376 | - |
|
377 | - case 4: |
|
378 | - $image_array = array(); |
|
379 | - $post_meta = array(); |
|
380 | - $image_array[] = "$dummy_image_url/ps/psf4.jpg"; |
|
381 | - $image_array[] = "$dummy_image_url/ps/psl4.jpg"; |
|
382 | - $image_array[] = "$dummy_image_url/ps/psb4.jpg"; |
|
383 | - $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
384 | - $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
385 | - |
|
386 | - $post_info[] = array( |
|
387 | - "listing_type" => $post_type, |
|
388 | - "post_title" => 'Jesmond Mansion', |
|
389 | - "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
353 | + "post_images" => $image_array, |
|
354 | + "post_category" => array($post_type.'category' => array($category_array[1])), |
|
355 | + "post_tags" => array('Tags', 'Sample Tags'), |
|
356 | + "geodir_video" => '', |
|
357 | + "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
358 | + "geodir_contact" => '(222) 777-1111', |
|
359 | + "geodir_email" => '[email protected]', |
|
360 | + "geodir_website" => 'http://example.com/', |
|
361 | + "geodir_twitter" => 'http://example.com/', |
|
362 | + "geodir_facebook" => 'http://example.com/', |
|
363 | + "geodir_price" => '260000', |
|
364 | + "geodir_property_status" => 'Under Offer', |
|
365 | + 'geodir_property_furnishing' => 'Unfurnished', |
|
366 | + 'geodir_property_type' => 'Detached house', |
|
367 | + 'geodir_property_bedrooms' => '6', |
|
368 | + 'geodir_property_bathrooms' => '6', |
|
369 | + 'geodir_property_area' => '1650', |
|
370 | + 'geodir_property_features' => 'Select Features/,Gas Central Heating,Triple Glazing,Off Road Parking,Fireplace', |
|
371 | + "post_dummy" => '1' |
|
372 | + ); |
|
373 | + |
|
374 | + break; |
|
375 | + |
|
376 | + |
|
377 | + case 4: |
|
378 | + $image_array = array(); |
|
379 | + $post_meta = array(); |
|
380 | + $image_array[] = "$dummy_image_url/ps/psf4.jpg"; |
|
381 | + $image_array[] = "$dummy_image_url/ps/psl4.jpg"; |
|
382 | + $image_array[] = "$dummy_image_url/ps/psb4.jpg"; |
|
383 | + $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
384 | + $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
385 | + |
|
386 | + $post_info[] = array( |
|
387 | + "listing_type" => $post_type, |
|
388 | + "post_title" => 'Jesmond Mansion', |
|
389 | + "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
390 | 390 | |
391 | 391 | Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel. |
392 | 392 | |
@@ -396,42 +396,42 @@ discard block |
||
396 | 396 | |
397 | 397 | Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.', |
398 | 398 | |
399 | - "post_images" => $image_array, |
|
400 | - "post_category" => array($post_type.'category' => array($category_array[1])), |
|
401 | - "post_tags" => array('Tags', 'Sample Tags'), |
|
402 | - "geodir_video" => '', |
|
403 | - "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
404 | - "geodir_contact" => '(222) 777-1111', |
|
405 | - "geodir_email" => '[email protected]', |
|
406 | - "geodir_website" => 'http://example.com/', |
|
407 | - "geodir_twitter" => 'http://example.com/', |
|
408 | - "geodir_facebook" => 'http://example.com/', |
|
409 | - "geodir_price" => '2300000', |
|
410 | - "geodir_property_status" => 'Under Offer', |
|
411 | - 'geodir_property_furnishing' => 'Partially furnished', |
|
412 | - 'geodir_property_type' => 'Detached house', |
|
413 | - 'geodir_property_bedrooms' => '10', |
|
414 | - 'geodir_property_bathrooms' => '7', |
|
415 | - 'geodir_property_area' => '6600', |
|
416 | - 'geodir_property_features' => 'Select Features/,Oil Central Heating,Double Glazing,Front Garden,Garage,Private driveway,Fireplace', |
|
417 | - "post_dummy" => '1' |
|
418 | - ); |
|
419 | - |
|
420 | - break; |
|
421 | - |
|
422 | - case 5: |
|
423 | - $image_array = array(); |
|
424 | - $post_meta = array(); |
|
425 | - $image_array[] = "$dummy_image_url/ps/psf5.jpg"; |
|
426 | - $image_array[] = "$dummy_image_url/ps/psl5.jpg"; |
|
427 | - $image_array[] = "$dummy_image_url/ps/psb5.jpg"; |
|
428 | - $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
429 | - $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
430 | - |
|
431 | - $post_info[] = array( |
|
432 | - "listing_type" => $post_type, |
|
433 | - "post_title" => 'Springfield Lodge', |
|
434 | - "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
399 | + "post_images" => $image_array, |
|
400 | + "post_category" => array($post_type.'category' => array($category_array[1])), |
|
401 | + "post_tags" => array('Tags', 'Sample Tags'), |
|
402 | + "geodir_video" => '', |
|
403 | + "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
404 | + "geodir_contact" => '(222) 777-1111', |
|
405 | + "geodir_email" => '[email protected]', |
|
406 | + "geodir_website" => 'http://example.com/', |
|
407 | + "geodir_twitter" => 'http://example.com/', |
|
408 | + "geodir_facebook" => 'http://example.com/', |
|
409 | + "geodir_price" => '2300000', |
|
410 | + "geodir_property_status" => 'Under Offer', |
|
411 | + 'geodir_property_furnishing' => 'Partially furnished', |
|
412 | + 'geodir_property_type' => 'Detached house', |
|
413 | + 'geodir_property_bedrooms' => '10', |
|
414 | + 'geodir_property_bathrooms' => '7', |
|
415 | + 'geodir_property_area' => '6600', |
|
416 | + 'geodir_property_features' => 'Select Features/,Oil Central Heating,Double Glazing,Front Garden,Garage,Private driveway,Fireplace', |
|
417 | + "post_dummy" => '1' |
|
418 | + ); |
|
419 | + |
|
420 | + break; |
|
421 | + |
|
422 | + case 5: |
|
423 | + $image_array = array(); |
|
424 | + $post_meta = array(); |
|
425 | + $image_array[] = "$dummy_image_url/ps/psf5.jpg"; |
|
426 | + $image_array[] = "$dummy_image_url/ps/psl5.jpg"; |
|
427 | + $image_array[] = "$dummy_image_url/ps/psb5.jpg"; |
|
428 | + $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
429 | + $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
430 | + |
|
431 | + $post_info[] = array( |
|
432 | + "listing_type" => $post_type, |
|
433 | + "post_title" => 'Springfield Lodge', |
|
434 | + "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
435 | 435 | |
436 | 436 | Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel. |
437 | 437 | |
@@ -441,42 +441,42 @@ discard block |
||
441 | 441 | |
442 | 442 | Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.', |
443 | 443 | |
444 | - "post_images" => $image_array, |
|
445 | - "post_category" => array($post_type.'category' => array($category_array[1])), |
|
446 | - "post_tags" => array('Tags', 'Sample Tags'), |
|
447 | - "geodir_video" => '', |
|
448 | - "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
449 | - "geodir_contact" => '(222) 777-1111', |
|
450 | - "geodir_email" => '[email protected]', |
|
451 | - "geodir_website" => 'http://example.com/', |
|
452 | - "geodir_twitter" => 'http://example.com/', |
|
453 | - "geodir_facebook" => 'http://example.com/', |
|
454 | - "geodir_price" => '330000', |
|
455 | - "geodir_property_status" => 'For Sale', |
|
456 | - 'geodir_property_furnishing' => 'Optional', |
|
457 | - 'geodir_property_type' => 'Detached house', |
|
458 | - 'geodir_property_bedrooms' => '4', |
|
459 | - 'geodir_property_bathrooms' => '3', |
|
460 | - 'geodir_property_area' => '3700', |
|
461 | - 'geodir_property_features' => 'Select Features/,Oil Central Heating,Double Glazing,Front Garden', |
|
462 | - "post_dummy" => '1' |
|
463 | - ); |
|
464 | - |
|
465 | - break; |
|
466 | - |
|
467 | - case 6: |
|
468 | - $image_array = array(); |
|
469 | - $post_meta = array(); |
|
470 | - $image_array[] = "$dummy_image_url/ps/psf6.jpg"; |
|
471 | - $image_array[] = "$dummy_image_url/ps/psl6.jpg"; |
|
472 | - $image_array[] = "$dummy_image_url/ps/psb5.jpg"; |
|
473 | - $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
474 | - $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
475 | - |
|
476 | - $post_info[] = array( |
|
477 | - "listing_type" => $post_type, |
|
478 | - "post_title" => 'Forrest Park', |
|
479 | - "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
444 | + "post_images" => $image_array, |
|
445 | + "post_category" => array($post_type.'category' => array($category_array[1])), |
|
446 | + "post_tags" => array('Tags', 'Sample Tags'), |
|
447 | + "geodir_video" => '', |
|
448 | + "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
449 | + "geodir_contact" => '(222) 777-1111', |
|
450 | + "geodir_email" => '[email protected]', |
|
451 | + "geodir_website" => 'http://example.com/', |
|
452 | + "geodir_twitter" => 'http://example.com/', |
|
453 | + "geodir_facebook" => 'http://example.com/', |
|
454 | + "geodir_price" => '330000', |
|
455 | + "geodir_property_status" => 'For Sale', |
|
456 | + 'geodir_property_furnishing' => 'Optional', |
|
457 | + 'geodir_property_type' => 'Detached house', |
|
458 | + 'geodir_property_bedrooms' => '4', |
|
459 | + 'geodir_property_bathrooms' => '3', |
|
460 | + 'geodir_property_area' => '3700', |
|
461 | + 'geodir_property_features' => 'Select Features/,Oil Central Heating,Double Glazing,Front Garden', |
|
462 | + "post_dummy" => '1' |
|
463 | + ); |
|
464 | + |
|
465 | + break; |
|
466 | + |
|
467 | + case 6: |
|
468 | + $image_array = array(); |
|
469 | + $post_meta = array(); |
|
470 | + $image_array[] = "$dummy_image_url/ps/psf6.jpg"; |
|
471 | + $image_array[] = "$dummy_image_url/ps/psl6.jpg"; |
|
472 | + $image_array[] = "$dummy_image_url/ps/psb5.jpg"; |
|
473 | + $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
474 | + $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
475 | + |
|
476 | + $post_info[] = array( |
|
477 | + "listing_type" => $post_type, |
|
478 | + "post_title" => 'Forrest Park', |
|
479 | + "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
480 | 480 | |
481 | 481 | Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel. |
482 | 482 | |
@@ -486,42 +486,42 @@ discard block |
||
486 | 486 | |
487 | 487 | Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.', |
488 | 488 | |
489 | - "post_images" => $image_array, |
|
490 | - "post_category" => array($post_type.'category' => array($category_array[1])), |
|
491 | - "post_tags" => array('Tags', 'Sample Tags'), |
|
492 | - "geodir_video" => '', |
|
493 | - "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
494 | - "geodir_contact" => '(222) 777-1111', |
|
495 | - "geodir_email" => '[email protected]', |
|
496 | - "geodir_website" => 'http://example.com/', |
|
497 | - "geodir_twitter" => 'http://example.com/', |
|
498 | - "geodir_facebook" => 'http://example.com/', |
|
499 | - "geodir_price" => '530000', |
|
500 | - "geodir_property_status" => 'For Sale', |
|
501 | - 'geodir_property_furnishing' => 'Unfurnished', |
|
502 | - 'geodir_property_type' => 'Detached house', |
|
503 | - 'geodir_property_bedrooms' => '5', |
|
504 | - 'geodir_property_bathrooms' => '4', |
|
505 | - 'geodir_property_area' => '2250', |
|
506 | - 'geodir_property_features' => 'Select Features/,Gas Central Heating,Double Glazing,Front Garden,Private driveway', |
|
507 | - "post_dummy" => '1' |
|
508 | - ); |
|
509 | - |
|
510 | - break; |
|
511 | - |
|
512 | - case 7: |
|
513 | - $image_array = array(); |
|
514 | - $post_meta = array(); |
|
515 | - $image_array[] = "$dummy_image_url/ps/psf7.jpg"; |
|
516 | - $image_array[] = "$dummy_image_url/ps/psl4.jpg"; |
|
517 | - $image_array[] = "$dummy_image_url/ps/psb4.jpg"; |
|
518 | - $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
519 | - $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
520 | - |
|
521 | - $post_info[] = array( |
|
522 | - "listing_type" => $post_type, |
|
523 | - "post_title" => 'Fraser Suites', |
|
524 | - "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
489 | + "post_images" => $image_array, |
|
490 | + "post_category" => array($post_type.'category' => array($category_array[1])), |
|
491 | + "post_tags" => array('Tags', 'Sample Tags'), |
|
492 | + "geodir_video" => '', |
|
493 | + "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
494 | + "geodir_contact" => '(222) 777-1111', |
|
495 | + "geodir_email" => '[email protected]', |
|
496 | + "geodir_website" => 'http://example.com/', |
|
497 | + "geodir_twitter" => 'http://example.com/', |
|
498 | + "geodir_facebook" => 'http://example.com/', |
|
499 | + "geodir_price" => '530000', |
|
500 | + "geodir_property_status" => 'For Sale', |
|
501 | + 'geodir_property_furnishing' => 'Unfurnished', |
|
502 | + 'geodir_property_type' => 'Detached house', |
|
503 | + 'geodir_property_bedrooms' => '5', |
|
504 | + 'geodir_property_bathrooms' => '4', |
|
505 | + 'geodir_property_area' => '2250', |
|
506 | + 'geodir_property_features' => 'Select Features/,Gas Central Heating,Double Glazing,Front Garden,Private driveway', |
|
507 | + "post_dummy" => '1' |
|
508 | + ); |
|
509 | + |
|
510 | + break; |
|
511 | + |
|
512 | + case 7: |
|
513 | + $image_array = array(); |
|
514 | + $post_meta = array(); |
|
515 | + $image_array[] = "$dummy_image_url/ps/psf7.jpg"; |
|
516 | + $image_array[] = "$dummy_image_url/ps/psl4.jpg"; |
|
517 | + $image_array[] = "$dummy_image_url/ps/psb4.jpg"; |
|
518 | + $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
519 | + $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
520 | + |
|
521 | + $post_info[] = array( |
|
522 | + "listing_type" => $post_type, |
|
523 | + "post_title" => 'Fraser Suites', |
|
524 | + "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
525 | 525 | |
526 | 526 | Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel. |
527 | 527 | |
@@ -531,42 +531,42 @@ discard block |
||
531 | 531 | |
532 | 532 | Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.', |
533 | 533 | |
534 | - "post_images" => $image_array, |
|
535 | - "post_category" => array($post_type.'category' => array($category_array[0])), |
|
536 | - "post_tags" => array('Tags', 'Sample Tags'), |
|
537 | - "geodir_video" => '', |
|
538 | - "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
539 | - "geodir_contact" => '(222) 777-1111', |
|
540 | - "geodir_email" => '[email protected]', |
|
541 | - "geodir_website" => 'http://example.com/', |
|
542 | - "geodir_twitter" => 'http://example.com/', |
|
543 | - "geodir_facebook" => 'http://example.com/', |
|
544 | - "geodir_price" => '245000', |
|
545 | - "geodir_property_status" => 'For Sale', |
|
546 | - 'geodir_property_furnishing' => 'Unfurnished', |
|
547 | - 'geodir_property_type' => 'Apartment', |
|
548 | - 'geodir_property_bedrooms' => '3', |
|
549 | - 'geodir_property_bathrooms' => '2', |
|
550 | - 'geodir_property_area' => '1250', |
|
551 | - 'geodir_property_features' => 'Select Features/,Gas Central Heating,Double Glazing', |
|
552 | - "post_dummy" => '1' |
|
553 | - ); |
|
554 | - |
|
555 | - break; |
|
556 | - |
|
557 | - case 8: |
|
558 | - $image_array = array(); |
|
559 | - $post_meta = array(); |
|
560 | - $image_array[] = "$dummy_image_url/ps/psf8.jpg"; |
|
561 | - $image_array[] = "$dummy_image_url/ps/psl2.jpg"; |
|
562 | - $image_array[] = "$dummy_image_url/ps/psb2.jpg"; |
|
563 | - $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
564 | - $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
565 | - |
|
566 | - $post_info[] = array( |
|
567 | - "listing_type" => $post_type, |
|
568 | - "post_title" => 'Richmore Apartments', |
|
569 | - "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
534 | + "post_images" => $image_array, |
|
535 | + "post_category" => array($post_type.'category' => array($category_array[0])), |
|
536 | + "post_tags" => array('Tags', 'Sample Tags'), |
|
537 | + "geodir_video" => '', |
|
538 | + "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
539 | + "geodir_contact" => '(222) 777-1111', |
|
540 | + "geodir_email" => '[email protected]', |
|
541 | + "geodir_website" => 'http://example.com/', |
|
542 | + "geodir_twitter" => 'http://example.com/', |
|
543 | + "geodir_facebook" => 'http://example.com/', |
|
544 | + "geodir_price" => '245000', |
|
545 | + "geodir_property_status" => 'For Sale', |
|
546 | + 'geodir_property_furnishing' => 'Unfurnished', |
|
547 | + 'geodir_property_type' => 'Apartment', |
|
548 | + 'geodir_property_bedrooms' => '3', |
|
549 | + 'geodir_property_bathrooms' => '2', |
|
550 | + 'geodir_property_area' => '1250', |
|
551 | + 'geodir_property_features' => 'Select Features/,Gas Central Heating,Double Glazing', |
|
552 | + "post_dummy" => '1' |
|
553 | + ); |
|
554 | + |
|
555 | + break; |
|
556 | + |
|
557 | + case 8: |
|
558 | + $image_array = array(); |
|
559 | + $post_meta = array(); |
|
560 | + $image_array[] = "$dummy_image_url/ps/psf8.jpg"; |
|
561 | + $image_array[] = "$dummy_image_url/ps/psl2.jpg"; |
|
562 | + $image_array[] = "$dummy_image_url/ps/psb2.jpg"; |
|
563 | + $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
564 | + $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
565 | + |
|
566 | + $post_info[] = array( |
|
567 | + "listing_type" => $post_type, |
|
568 | + "post_title" => 'Richmore Apartments', |
|
569 | + "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
570 | 570 | |
571 | 571 | Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel. |
572 | 572 | |
@@ -576,43 +576,43 @@ discard block |
||
576 | 576 | |
577 | 577 | Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.', |
578 | 578 | |
579 | - "post_images" => $image_array, |
|
580 | - "post_category" => array($post_type.'category' => array($category_array[0])), |
|
581 | - "post_tags" => array('Tags', 'Sample Tags'), |
|
582 | - "geodir_video" => '', |
|
583 | - "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
584 | - "geodir_contact" => '(222) 777-1111', |
|
585 | - "geodir_email" => '[email protected]', |
|
586 | - "geodir_website" => 'http://example.com/', |
|
587 | - "geodir_twitter" => 'http://example.com/', |
|
588 | - "geodir_facebook" => 'http://example.com/', |
|
589 | - "geodir_price" => '395000', |
|
590 | - "geodir_property_status" => 'For Sale', |
|
591 | - 'geodir_property_furnishing' => 'Unfurnished', |
|
592 | - 'geodir_property_type' => 'Apartment', |
|
593 | - 'geodir_property_bedrooms' => '2', |
|
594 | - 'geodir_property_bathrooms' => '2', |
|
595 | - 'geodir_property_area' => '1750', |
|
596 | - 'geodir_property_features' => 'Select Features/,Gas Central Heating,Double Glazing,Garage', |
|
597 | - "post_dummy" => '1' |
|
598 | - ); |
|
599 | - |
|
600 | - break; |
|
601 | - |
|
602 | - |
|
603 | - case 9: |
|
604 | - $image_array = array(); |
|
605 | - $post_meta = array(); |
|
606 | - $image_array[] = "$dummy_image_url/ps/psf9.jpg"; |
|
607 | - $image_array[] = "$dummy_image_url/ps/psc9.jpg"; |
|
608 | - $image_array[] = "$dummy_image_url/ps/psb2.jpg"; |
|
609 | - $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
610 | - $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
611 | - |
|
612 | - $post_info[] = array( |
|
613 | - "listing_type" => $post_type, |
|
614 | - "post_title" => 'Hotel Alpina', |
|
615 | - "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
579 | + "post_images" => $image_array, |
|
580 | + "post_category" => array($post_type.'category' => array($category_array[0])), |
|
581 | + "post_tags" => array('Tags', 'Sample Tags'), |
|
582 | + "geodir_video" => '', |
|
583 | + "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
584 | + "geodir_contact" => '(222) 777-1111', |
|
585 | + "geodir_email" => '[email protected]', |
|
586 | + "geodir_website" => 'http://example.com/', |
|
587 | + "geodir_twitter" => 'http://example.com/', |
|
588 | + "geodir_facebook" => 'http://example.com/', |
|
589 | + "geodir_price" => '395000', |
|
590 | + "geodir_property_status" => 'For Sale', |
|
591 | + 'geodir_property_furnishing' => 'Unfurnished', |
|
592 | + 'geodir_property_type' => 'Apartment', |
|
593 | + 'geodir_property_bedrooms' => '2', |
|
594 | + 'geodir_property_bathrooms' => '2', |
|
595 | + 'geodir_property_area' => '1750', |
|
596 | + 'geodir_property_features' => 'Select Features/,Gas Central Heating,Double Glazing,Garage', |
|
597 | + "post_dummy" => '1' |
|
598 | + ); |
|
599 | + |
|
600 | + break; |
|
601 | + |
|
602 | + |
|
603 | + case 9: |
|
604 | + $image_array = array(); |
|
605 | + $post_meta = array(); |
|
606 | + $image_array[] = "$dummy_image_url/ps/psf9.jpg"; |
|
607 | + $image_array[] = "$dummy_image_url/ps/psc9.jpg"; |
|
608 | + $image_array[] = "$dummy_image_url/ps/psb2.jpg"; |
|
609 | + $image_array[] = "$dummy_image_url/ps/psk.jpg"; |
|
610 | + $image_array[] = "$dummy_image_url/ps/psbr.jpg"; |
|
611 | + |
|
612 | + $post_info[] = array( |
|
613 | + "listing_type" => $post_type, |
|
614 | + "post_title" => 'Hotel Alpina', |
|
615 | + "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
616 | 616 | |
617 | 617 | Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel. |
618 | 618 | |
@@ -622,39 +622,39 @@ discard block |
||
622 | 622 | |
623 | 623 | Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.', |
624 | 624 | |
625 | - "post_images" => $image_array, |
|
626 | - "post_category" => array($post_type.'category' => array($category_array[2])), |
|
627 | - "post_tags" => array('Tags', 'Sample Tags'), |
|
628 | - "geodir_video" => '', |
|
629 | - "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
630 | - "geodir_contact" => '(222) 777-1111', |
|
631 | - "geodir_email" => '[email protected]', |
|
632 | - "geodir_website" => 'http://example.com/', |
|
633 | - "geodir_twitter" => 'http://example.com/', |
|
634 | - "geodir_facebook" => 'http://example.com/', |
|
635 | - "geodir_price" => '12500000', |
|
636 | - "geodir_property_status" => 'For Sale', |
|
637 | - 'geodir_property_furnishing' => 'Furnished', |
|
638 | - 'geodir_property_type' => 'Hotel', |
|
639 | - 'geodir_property_bedrooms' => '120', |
|
640 | - 'geodir_property_bathrooms' => '133', |
|
641 | - 'geodir_property_area' => '35000', |
|
642 | - 'geodir_property_features' => 'Select Features/,Gas Central Heating,Double Glazing,Garage', |
|
643 | - "post_dummy" => '1' |
|
644 | - ); |
|
645 | - |
|
646 | - break; |
|
647 | - |
|
648 | - case 10: |
|
649 | - $image_array = array(); |
|
650 | - $post_meta = array(); |
|
651 | - $image_array[] = "$dummy_image_url/ps/psf10.jpg"; |
|
652 | - $image_array[] = "$dummy_image_url/ps/psf102.jpg"; |
|
653 | - |
|
654 | - $post_info[] = array( |
|
655 | - "listing_type" => $post_type, |
|
656 | - "post_title" => 'Development Land', |
|
657 | - "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
625 | + "post_images" => $image_array, |
|
626 | + "post_category" => array($post_type.'category' => array($category_array[2])), |
|
627 | + "post_tags" => array('Tags', 'Sample Tags'), |
|
628 | + "geodir_video" => '', |
|
629 | + "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
630 | + "geodir_contact" => '(222) 777-1111', |
|
631 | + "geodir_email" => '[email protected]', |
|
632 | + "geodir_website" => 'http://example.com/', |
|
633 | + "geodir_twitter" => 'http://example.com/', |
|
634 | + "geodir_facebook" => 'http://example.com/', |
|
635 | + "geodir_price" => '12500000', |
|
636 | + "geodir_property_status" => 'For Sale', |
|
637 | + 'geodir_property_furnishing' => 'Furnished', |
|
638 | + 'geodir_property_type' => 'Hotel', |
|
639 | + 'geodir_property_bedrooms' => '120', |
|
640 | + 'geodir_property_bathrooms' => '133', |
|
641 | + 'geodir_property_area' => '35000', |
|
642 | + 'geodir_property_features' => 'Select Features/,Gas Central Heating,Double Glazing,Garage', |
|
643 | + "post_dummy" => '1' |
|
644 | + ); |
|
645 | + |
|
646 | + break; |
|
647 | + |
|
648 | + case 10: |
|
649 | + $image_array = array(); |
|
650 | + $post_meta = array(); |
|
651 | + $image_array[] = "$dummy_image_url/ps/psf10.jpg"; |
|
652 | + $image_array[] = "$dummy_image_url/ps/psf102.jpg"; |
|
653 | + |
|
654 | + $post_info[] = array( |
|
655 | + "listing_type" => $post_type, |
|
656 | + "post_title" => 'Development Land', |
|
657 | + "post_desc" => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut fringilla ipsum congue enim elementum ornare. Vestibulum id ipsum ac massa malesuada rutrum. Curabitur id erat nec mauris hendrerit pretium. Aliquam pretium sollicitudin enim ac hendrerit. Phasellus et enim elit. Mauris ac maximus enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut ut cursus leo. Aenean lacinia risus ut ex sodales, a dictum eros vulputate. Sed ornare ex eget velit fringilla luctus. Etiam a purus massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam non felis ultrices, dignissim metus mattis, interdum urna. |
|
658 | 658 | |
659 | 659 | Vivamus at ipsum consectetur, pellentesque lectus vitae, vulputate leo. Cras tincidunt suscipit vulputate. Aenean pretium diam dui, efficitur porttitor lorem cursus in. Aenean convallis, mauris quis fermentum vehicula, purus libero fringilla lorem, placerat ultricies magna velit sit amet neque. Aenean tempor ut eros et volutpat. Proin ac lacus et odio volutpat aliquet. Proin at erat enim. Vivamus venenatis dictum magna, id dignissim lacus molestie non. Nullam ornare placerat metus, quis aliquam orci tincidunt at. Sed semper imperdiet arcu, eu convallis eros fringilla vel. |
660 | 660 | |
@@ -664,93 +664,93 @@ discard block |
||
664 | 664 | |
665 | 665 | Mauris ac elit vitae massa dignissim posuere. Sed blandit nibh ut elementum ullamcorper. Nunc facilisis elit eget lorem bibendum, eu fermentum neque ultrices. Etiam vestibulum gravida sollicitudin. Nullam velit quam, luctus vel suscipit id, ullamcorper sit amet ipsum. Donec a elit ac lorem porttitor gravida. Sed non dui sed lacus vulputate varius. Nullam in tincidunt odio, ac pharetra mauris. Integer ac volutpat quam. Mauris fermentum facilisis porttitor. Nunc ornare vel erat volutpat consectetur. Phasellus ut lacinia ante. Vestibulum massa orci, tincidunt sit amet urna in, maximus mollis ligula.', |
666 | 666 | |
667 | - "post_images" => $image_array, |
|
668 | - "post_category" => array($post_type.'category' => array($category_array[3])), |
|
669 | - "post_tags" => array('Tags', 'Sample Tags'), |
|
670 | - "geodir_video" => '', |
|
671 | - "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
672 | - "geodir_contact" => '(222) 777-1111', |
|
673 | - "geodir_email" => '[email protected]', |
|
674 | - "geodir_website" => 'http://example.com/', |
|
675 | - "geodir_twitter" => 'http://example.com/', |
|
676 | - "geodir_facebook" => 'http://example.com/', |
|
677 | - "geodir_price" => '80000', |
|
678 | - "geodir_property_status" => 'For Sale', |
|
679 | - 'geodir_property_furnishing' => '', |
|
680 | - 'geodir_property_type' => 'Land', |
|
681 | - 'geodir_property_bedrooms' => '', |
|
682 | - 'geodir_property_bathrooms' => '', |
|
683 | - 'geodir_property_area' => '250000', |
|
684 | - 'geodir_property_features' => '', |
|
685 | - "post_dummy" => '1' |
|
686 | - ); |
|
687 | - |
|
688 | - break; |
|
667 | + "post_images" => $image_array, |
|
668 | + "post_category" => array($post_type.'category' => array($category_array[3])), |
|
669 | + "post_tags" => array('Tags', 'Sample Tags'), |
|
670 | + "geodir_video" => '', |
|
671 | + "geodir_timing" => 'Viewing Sunday 10 am to 9 pm', |
|
672 | + "geodir_contact" => '(222) 777-1111', |
|
673 | + "geodir_email" => '[email protected]', |
|
674 | + "geodir_website" => 'http://example.com/', |
|
675 | + "geodir_twitter" => 'http://example.com/', |
|
676 | + "geodir_facebook" => 'http://example.com/', |
|
677 | + "geodir_price" => '80000', |
|
678 | + "geodir_property_status" => 'For Sale', |
|
679 | + 'geodir_property_furnishing' => '', |
|
680 | + 'geodir_property_type' => 'Land', |
|
681 | + 'geodir_property_bedrooms' => '', |
|
682 | + 'geodir_property_bathrooms' => '', |
|
683 | + 'geodir_property_area' => '250000', |
|
684 | + 'geodir_property_features' => '', |
|
685 | + "post_dummy" => '1' |
|
686 | + ); |
|
687 | + |
|
688 | + break; |
|
689 | 689 | |
690 | 690 | } // end of switch |
691 | 691 | |
692 | 692 | foreach ($post_info as $post_info) { |
693 | - $default_location = geodir_get_default_location(); |
|
694 | - if ($city_bound_lat1 > $city_bound_lat2) |
|
695 | - $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat1, $city_bound_lat2), geodir_random_float($city_bound_lat2, $city_bound_lat1)); |
|
696 | - else |
|
697 | - $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat2, $city_bound_lat1), geodir_random_float($city_bound_lat1, $city_bound_lat2)); |
|
693 | + $default_location = geodir_get_default_location(); |
|
694 | + if ($city_bound_lat1 > $city_bound_lat2) |
|
695 | + $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat1, $city_bound_lat2), geodir_random_float($city_bound_lat2, $city_bound_lat1)); |
|
696 | + else |
|
697 | + $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat2, $city_bound_lat1), geodir_random_float($city_bound_lat1, $city_bound_lat2)); |
|
698 | 698 | |
699 | 699 | |
700 | - if ($city_bound_lng1 > $city_bound_lng2) |
|
701 | - $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng1, $city_bound_lng2), geodir_random_float($city_bound_lng2, $city_bound_lng1)); |
|
702 | - else |
|
703 | - $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng2, $city_bound_lng1), geodir_random_float($city_bound_lng1, $city_bound_lng2)); |
|
700 | + if ($city_bound_lng1 > $city_bound_lng2) |
|
701 | + $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng1, $city_bound_lng2), geodir_random_float($city_bound_lng2, $city_bound_lng1)); |
|
702 | + else |
|
703 | + $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng2, $city_bound_lng1), geodir_random_float($city_bound_lng1, $city_bound_lng2)); |
|
704 | 704 | |
705 | - $load_map = get_option('geodir_load_map'); |
|
705 | + $load_map = get_option('geodir_load_map'); |
|
706 | 706 | |
707 | - if ($load_map == 'osm') { |
|
708 | - $post_address = geodir_get_osm_address_by_lat_lan($dummy_post_latitude, $dummy_post_longitude); |
|
709 | - } else { |
|
710 | - $post_address = geodir_get_address_by_lat_lan($dummy_post_latitude, $dummy_post_longitude); |
|
711 | - } |
|
712 | - |
|
713 | - $postal_code = ''; |
|
714 | - if (!empty($post_address)) { |
|
715 | - if ($load_map == 'osm') { |
|
716 | - $address = !empty($post_address->formatted_address) ? $post_address->formatted_address : ''; |
|
717 | - $postal_code = !empty($post_address->address->postcode) ? $post_address->address->postcode : ''; |
|
718 | - } else { |
|
719 | - $addresses = array(); |
|
720 | - $addresses_default = array(); |
|
707 | + if ($load_map == 'osm') { |
|
708 | + $post_address = geodir_get_osm_address_by_lat_lan($dummy_post_latitude, $dummy_post_longitude); |
|
709 | + } else { |
|
710 | + $post_address = geodir_get_address_by_lat_lan($dummy_post_latitude, $dummy_post_longitude); |
|
711 | + } |
|
712 | + |
|
713 | + $postal_code = ''; |
|
714 | + if (!empty($post_address)) { |
|
715 | + if ($load_map == 'osm') { |
|
716 | + $address = !empty($post_address->formatted_address) ? $post_address->formatted_address : ''; |
|
717 | + $postal_code = !empty($post_address->address->postcode) ? $post_address->address->postcode : ''; |
|
718 | + } else { |
|
719 | + $addresses = array(); |
|
720 | + $addresses_default = array(); |
|
721 | 721 | |
722 | - foreach ($post_address as $add_key => $add_value) { |
|
723 | - if ($add_key < 2 && !empty($add_value->long_name)) { |
|
724 | - $addresses_default[] = $add_value->long_name; |
|
725 | - } |
|
726 | - if ($add_value->types[0] == 'postal_code') { |
|
727 | - $postal_code = $add_value->long_name; |
|
728 | - } |
|
729 | - if ($add_value->types[0] == 'street_number') { |
|
730 | - $addresses[] = $add_value->long_name; |
|
731 | - } |
|
732 | - if ($add_value->types[0] == 'route') { |
|
733 | - $addresses[] = $add_value->long_name; |
|
734 | - } |
|
735 | - if ($add_value->types[0] == 'neighborhood') { |
|
736 | - $addresses[] = $add_value->long_name; |
|
737 | - } |
|
738 | - if ($add_value->types[0] == 'sublocality') { |
|
739 | - $addresses[] = $add_value->long_name; |
|
740 | - } |
|
741 | - } |
|
742 | - $address = !empty($addresses) ? implode(', ', $addresses) : (!empty($addresses_default) ? implode(', ', $addresses_default) : ''); |
|
743 | - } |
|
744 | - |
|
745 | - $post_info['post_address'] = !empty($address) ? $address : $default_location->city; |
|
746 | - $post_info['post_city'] = $default_location->city; |
|
747 | - $post_info['post_region'] = $default_location->region; |
|
748 | - $post_info['post_country'] = $default_location->country; |
|
749 | - $post_info['post_zip'] = $postal_code; |
|
750 | - $post_info['post_latitude'] = $dummy_post_latitude; |
|
751 | - $post_info['post_longitude'] = $dummy_post_longitude; |
|
752 | - } |
|
722 | + foreach ($post_address as $add_key => $add_value) { |
|
723 | + if ($add_key < 2 && !empty($add_value->long_name)) { |
|
724 | + $addresses_default[] = $add_value->long_name; |
|
725 | + } |
|
726 | + if ($add_value->types[0] == 'postal_code') { |
|
727 | + $postal_code = $add_value->long_name; |
|
728 | + } |
|
729 | + if ($add_value->types[0] == 'street_number') { |
|
730 | + $addresses[] = $add_value->long_name; |
|
731 | + } |
|
732 | + if ($add_value->types[0] == 'route') { |
|
733 | + $addresses[] = $add_value->long_name; |
|
734 | + } |
|
735 | + if ($add_value->types[0] == 'neighborhood') { |
|
736 | + $addresses[] = $add_value->long_name; |
|
737 | + } |
|
738 | + if ($add_value->types[0] == 'sublocality') { |
|
739 | + $addresses[] = $add_value->long_name; |
|
740 | + } |
|
741 | + } |
|
742 | + $address = !empty($addresses) ? implode(', ', $addresses) : (!empty($addresses_default) ? implode(', ', $addresses_default) : ''); |
|
743 | + } |
|
744 | + |
|
745 | + $post_info['post_address'] = !empty($address) ? $address : $default_location->city; |
|
746 | + $post_info['post_city'] = $default_location->city; |
|
747 | + $post_info['post_region'] = $default_location->region; |
|
748 | + $post_info['post_country'] = $default_location->country; |
|
749 | + $post_info['post_zip'] = $postal_code; |
|
750 | + $post_info['post_latitude'] = $dummy_post_latitude; |
|
751 | + $post_info['post_longitude'] = $dummy_post_longitude; |
|
752 | + } |
|
753 | 753 | |
754 | - geodir_save_listing($post_info, true); |
|
755 | - echo 1; |
|
754 | + geodir_save_listing($post_info, true); |
|
755 | + echo 1; |
|
756 | 756 | } |
@@ -6,9 +6,9 @@ discard block |
||
6 | 6 | * @package GeoDirectory |
7 | 7 | */ |
8 | 8 | |
9 | -function geodir_property_sale_custom_fields($post_type='gd_place',$package_id=''){ |
|
9 | +function geodir_property_sale_custom_fields($post_type = 'gd_place', $package_id = '') { |
|
10 | 10 | $fields = array(); |
11 | - $package = ($package_id=='') ? '' : array($package_id); |
|
11 | + $package = ($package_id == '') ? '' : array($package_id); |
|
12 | 12 | |
13 | 13 | // price |
14 | 14 | $fields[] = array('listing_type' => $post_type, |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | 'default_value' => '', |
79 | 79 | 'show_in' => '[detail],[listing]', |
80 | 80 | 'is_required' => true, |
81 | - 'option_values' => __('Select Status/,Unfurnished,Furnished,Partially furnished,Optional','geodirectory'), |
|
81 | + 'option_values' => __('Select Status/,Unfurnished,Furnished,Partially furnished,Optional', 'geodirectory'), |
|
82 | 82 | 'validation_pattern' => '', |
83 | 83 | 'validation_msg' => '', |
84 | 84 | 'required_msg' => '', |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | 'default_value' => '', |
102 | 102 | 'show_in' => '[detail],[listing]', |
103 | 103 | 'is_required' => true, |
104 | - 'option_values' => __('Select Type/,Detached house,Semi-detached house,Apartment,Bungalow,Semi-detached bungalow,Chalet,Town House,End-terrace house,Terrace house,Cottage,Hotel,Land','geodirectory'), |
|
104 | + 'option_values' => __('Select Type/,Detached house,Semi-detached house,Apartment,Bungalow,Semi-detached bungalow,Chalet,Town House,End-terrace house,Terrace house,Cottage,Hotel,Land', 'geodirectory'), |
|
105 | 105 | 'validation_pattern' => '', |
106 | 106 | 'validation_msg' => '', |
107 | 107 | 'required_msg' => '', |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | 'default_value' => '', |
125 | 125 | 'show_in' => '[detail],[listing]', |
126 | 126 | 'is_required' => true, |
127 | - 'option_values' => __('Select Bedrooms/,1,2,3,4,5,6,7,8,9,10','geodirectory'), |
|
127 | + 'option_values' => __('Select Bedrooms/,1,2,3,4,5,6,7,8,9,10', 'geodirectory'), |
|
128 | 128 | 'validation_pattern' => '', |
129 | 129 | 'validation_msg' => '', |
130 | 130 | 'required_msg' => '', |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | 'default_value' => '', |
148 | 148 | 'show_in' => '[detail],[listing]', |
149 | 149 | 'is_required' => true, |
150 | - 'option_values' => __('Select Bathrooms/,1,2,3,4,5,6,7,8,9,10','geodirectory'), |
|
150 | + 'option_values' => __('Select Bathrooms/,1,2,3,4,5,6,7,8,9,10', 'geodirectory'), |
|
151 | 151 | 'validation_pattern' => '', |
152 | 152 | 'validation_msg' => '', |
153 | 153 | 'required_msg' => '', |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | 'default_value' => '', |
193 | 193 | 'show_in' => '[detail],[listing]', |
194 | 194 | 'is_required' => true, |
195 | - 'option_values' => __('Select Features/,Gas Central Heating,Oil Central Heating,Double Glazing,Triple Glazing,Front Garden,Garage,Private driveway,Off Road Parking,Fireplace','geodirectory'), |
|
195 | + 'option_values' => __('Select Features/,Gas Central Heating,Oil Central Heating,Double Glazing,Triple Glazing,Front Garden,Garage,Private driveway,Off Road Parking,Fireplace', 'geodirectory'), |
|
196 | 196 | 'validation_pattern' => '', |
197 | 197 | 'validation_msg' => '', |
198 | 198 | 'required_msg' => '', |
@@ -215,24 +215,24 @@ discard block |
||
215 | 215 | return $fields; |
216 | 216 | } |
217 | 217 | |
218 | -global $city_bound_lat1, $city_bound_lng1, $city_bound_lat2, $city_bound_lng2,$wpdb, $current_user,$dummy_post_index; |
|
218 | +global $city_bound_lat1, $city_bound_lng1, $city_bound_lat2, $city_bound_lng2, $wpdb, $current_user, $dummy_post_index; |
|
219 | 219 | $post_info = array(); |
220 | 220 | $image_array = array(); |
221 | 221 | $post_meta = array(); |
222 | 222 | $category_array = array('Apartments', 'Houses', 'Commercial', 'Land'); |
223 | 223 | |
224 | -if($dummy_post_index==1){ |
|
224 | +if ($dummy_post_index == 1) { |
|
225 | 225 | // add the dummy categories |
226 | - geodir_dummy_data_taxonomies($post_type,$category_array ); |
|
226 | + geodir_dummy_data_taxonomies($post_type, $category_array); |
|
227 | 227 | |
228 | 228 | // add the dummy custom fields |
229 | 229 | $fields = geodir_property_sale_custom_fields($post_type); |
230 | 230 | geodir_create_dummy_fields($fields); |
231 | - update_option($post_type.'_dummy_data_type','property_sale'); |
|
231 | + update_option($post_type.'_dummy_data_type', 'property_sale'); |
|
232 | 232 | } |
233 | 233 | |
234 | 234 | if (geodir_dummy_folder_exists()) |
235 | - $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy"; |
|
235 | + $dummy_image_url = geodir_plugin_url()."/geodirectory-admin/dummy"; |
|
236 | 236 | else |
237 | 237 | $dummy_image_url = 'http://www.wpgeodirectory.com/dummy'; |
238 | 238 |
@@ -17,10 +17,11 @@ discard block |
||
17 | 17 | update_option($post_type.'_dummy_data_type','standard_places'); |
18 | 18 | } |
19 | 19 | |
20 | -if (geodir_dummy_folder_exists()) |
|
20 | +if (geodir_dummy_folder_exists()) { |
|
21 | 21 | $dummy_image_url = geodir_plugin_url() . "/geodirectory-admin/dummy"; |
22 | -else |
|
22 | +} else { |
|
23 | 23 | $dummy_image_url = 'http://www.wpgeodirectory.com/dummy'; |
24 | +} |
|
24 | 25 | |
25 | 26 | $dummy_image_url = apply_filters('place_dummy_image_url', $dummy_image_url); |
26 | 27 | |
@@ -1815,16 +1816,18 @@ discard block |
||
1815 | 1816 | echo '###4.1'; |
1816 | 1817 | foreach ($post_info as $post_info) {echo '###5'; |
1817 | 1818 | $default_location = geodir_get_default_location(); |
1818 | - if ($city_bound_lat1 > $city_bound_lat2) |
|
1819 | - $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat1, $city_bound_lat2), geodir_random_float($city_bound_lat2, $city_bound_lat1)); |
|
1820 | - else |
|
1821 | - $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat2, $city_bound_lat1), geodir_random_float($city_bound_lat1, $city_bound_lat2)); |
|
1819 | + if ($city_bound_lat1 > $city_bound_lat2) { |
|
1820 | + $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat1, $city_bound_lat2), geodir_random_float($city_bound_lat2, $city_bound_lat1)); |
|
1821 | + } else { |
|
1822 | + $dummy_post_latitude = geodir_random_float(geodir_random_float($city_bound_lat2, $city_bound_lat1), geodir_random_float($city_bound_lat1, $city_bound_lat2)); |
|
1823 | + } |
|
1822 | 1824 | |
1823 | 1825 | |
1824 | - if ($city_bound_lng1 > $city_bound_lng2) |
|
1825 | - $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng1, $city_bound_lng2), geodir_random_float($city_bound_lng2, $city_bound_lng1)); |
|
1826 | - else |
|
1827 | - $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng2, $city_bound_lng1), geodir_random_float($city_bound_lng1, $city_bound_lng2)); |
|
1826 | + if ($city_bound_lng1 > $city_bound_lng2) { |
|
1827 | + $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng1, $city_bound_lng2), geodir_random_float($city_bound_lng2, $city_bound_lng1)); |
|
1828 | + } else { |
|
1829 | + $dummy_post_longitude = geodir_random_float(geodir_random_float($city_bound_lng2, $city_bound_lng1), geodir_random_float($city_bound_lng1, $city_bound_lng2)); |
|
1830 | + } |
|
1828 | 1831 | |
1829 | 1832 | $load_map = get_option('geodir_load_map'); |
1830 | 1833 |