@@ -1,13 +1,13 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Template for the send to friend and enquiry popup forms |
|
4 | - * |
|
5 | - * You can make most changes via hooks or see the link below for info on how to replace the template in your theme. |
|
6 | - * |
|
7 | - * @link http://docs.wpgeodirectory.com/customizing-geodirectory-templates/ |
|
8 | - * @since 1.0.0 |
|
9 | - * @package GeoDirectory |
|
10 | - */ |
|
3 | + * Template for the send to friend and enquiry popup forms |
|
4 | + * |
|
5 | + * You can make most changes via hooks or see the link below for info on how to replace the template in your theme. |
|
6 | + * |
|
7 | + * @link http://docs.wpgeodirectory.com/customizing-geodirectory-templates/ |
|
8 | + * @since 1.0.0 |
|
9 | + * @package GeoDirectory |
|
10 | + */ |
|
11 | 11 | |
12 | 12 | $post_id = $_REQUEST['post_id']; |
13 | 13 | $post_info = get_post($post_id); |
@@ -19,14 +19,14 @@ discard block |
||
19 | 19 | * @param int $post_id The post id requested by the popup. |
20 | 20 | * @param object $post_info The post object requested by the popup. |
21 | 21 | */ |
22 | -do_action('geodir_popup_forms_template_start',$post_id,$post_info); |
|
22 | +do_action('geodir_popup_forms_template_start', $post_id, $post_info); |
|
23 | 23 | |
24 | 24 | if ($_REQUEST['popuptype'] == 'b_sendtofriend') { ?> |
25 | 25 | |
26 | 26 | <div id="basic-modal-content" class="clearfix"> |
27 | 27 | <form name="send_to_frnd" id="send_to_frnd" action="<?php echo get_permalink($post_info->ID); ?>" method="post"> |
28 | 28 | <input type="hidden" name="sendact" value="email_frnd"/> |
29 | - <input type="hidden" id="send_to_Frnd_pid" name="pid" value="<?php echo $post_info->ID;?>"/> |
|
29 | + <input type="hidden" id="send_to_Frnd_pid" name="pid" value="<?php echo $post_info->ID; ?>"/> |
|
30 | 30 | |
31 | 31 | <h3><?php |
32 | 32 | /** |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | * @since 1.0.0 |
36 | 36 | * @param string $title The title for the form, defaults to global `SEND_TO_FRIEND` text. |
37 | 37 | */ |
38 | - echo apply_filters('geodir_send_to_friend_page_title', SEND_TO_FRIEND);?></h3> |
|
38 | + echo apply_filters('geodir_send_to_friend_page_title', SEND_TO_FRIEND); ?></h3> |
|
39 | 39 | |
40 | 40 | <p id="reply_send_success" class="sucess_msg" style="display:none;"></p> |
41 | 41 | <?php |
@@ -45,10 +45,10 @@ discard block |
||
45 | 45 | * @since 1.0.0 |
46 | 46 | * @param string $field The field name the actions is called before. |
47 | 47 | */ |
48 | - do_action('geodir_before_stf_form_field', 'to_name');?> |
|
48 | + do_action('geodir_before_stf_form_field', 'to_name'); ?> |
|
49 | 49 | <div class="row clearfix"> |
50 | 50 | <div class="geodir_popup_heading"> |
51 | - <label><?php _e('Friend Name', 'geodirectory');?> : <span>*</span></label></div> |
|
51 | + <label><?php _e('Friend Name', 'geodirectory'); ?> : <span>*</span></label></div> |
|
52 | 52 | <div class="geodir_popup_field"> |
53 | 53 | <input class="is_required" field_type="text" name="to_name" id="to_name" type="text" value=""/> |
54 | 54 | <span class="message_error2" id="to_nameInfo"></span></div> |
@@ -60,75 +60,75 @@ discard block |
||
60 | 60 | * @since 1.0.0 |
61 | 61 | * @param string $field The field name the actions is called after. |
62 | 62 | */ |
63 | - do_action('geodir_after_stf_form_field', 'to_name');?> |
|
63 | + do_action('geodir_after_stf_form_field', 'to_name'); ?> |
|
64 | 64 | <?php |
65 | 65 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
66 | - do_action('geodir_before_stf_form_field', 'to_email');?> |
|
66 | + do_action('geodir_before_stf_form_field', 'to_email'); ?> |
|
67 | 67 | <div class="row clearfix"> |
68 | 68 | <div class="geodir_popup_heading"> |
69 | - <label> <?php _e('Email', 'geodirectory');?> : <span>*</span></label></div> |
|
69 | + <label> <?php _e('Email', 'geodirectory'); ?> : <span>*</span></label></div> |
|
70 | 70 | <div class="geodir_popup_field"> |
71 | 71 | <input class="is_required" field_type="email" name="to_email" id="to_email" type="text" value=""/> |
72 | 72 | <span class="message_error2" id="to_emailInfo"></span></div> |
73 | 73 | </div> |
74 | 74 | <?php |
75 | 75 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
76 | - do_action('geodir_after_stf_form_field', 'to_email');?> |
|
76 | + do_action('geodir_after_stf_form_field', 'to_email'); ?> |
|
77 | 77 | <?php |
78 | 78 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
79 | - do_action('geodir_before_stf_form_field', 'yourname');?> |
|
79 | + do_action('geodir_before_stf_form_field', 'yourname'); ?> |
|
80 | 80 | <div class="row clearfix"> |
81 | 81 | <div class="geodir_popup_heading"> |
82 | - <label><?php _e('Your Name', 'geodirectory');?> : <span>*</span></label></div> |
|
82 | + <label><?php _e('Your Name', 'geodirectory'); ?> : <span>*</span></label></div> |
|
83 | 83 | <div class="geodir_popup_field"> |
84 | 84 | <input class="is_required" field_type="text" name="yourname" id="yourname" type="text" value=""/> |
85 | 85 | <span class="message_error2" id="yournameInfo"></span></div> |
86 | 86 | </div> |
87 | 87 | <?php |
88 | 88 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
89 | - do_action('geodir_after_stf_form_field', 'yourname');?> |
|
89 | + do_action('geodir_after_stf_form_field', 'yourname'); ?> |
|
90 | 90 | <?php |
91 | 91 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
92 | - do_action('geodir_before_stf_form_field', 'youremail');?> |
|
92 | + do_action('geodir_before_stf_form_field', 'youremail'); ?> |
|
93 | 93 | <div class="row clearfix"> |
94 | 94 | <div class="geodir_popup_heading"> |
95 | - <label> <?php _e('Email', 'geodirectory');?> : <span>*</span></label></div> |
|
95 | + <label> <?php _e('Email', 'geodirectory'); ?> : <span>*</span></label></div> |
|
96 | 96 | <div class="geodir_popup_field"> |
97 | 97 | <input class="is_required" field_type="email" name="youremail" id="youremail" type="text" value=""/> |
98 | 98 | <span class="message_error2" id="youremailInfo"></span></div> |
99 | 99 | </div> |
100 | 100 | <?php |
101 | 101 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
102 | - do_action('geodir_after_stf_form_field', 'youremail');?> |
|
102 | + do_action('geodir_after_stf_form_field', 'youremail'); ?> |
|
103 | 103 | <?php |
104 | 104 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
105 | - do_action('geodir_before_stf_form_field', 'frnd_subject');?> |
|
105 | + do_action('geodir_before_stf_form_field', 'frnd_subject'); ?> |
|
106 | 106 | <div class="row clearfix"> |
107 | 107 | <div class="geodir_popup_heading"> |
108 | - <label><?php _e('Subject', 'geodirectory');?> : <span>*</span></label></div> |
|
108 | + <label><?php _e('Subject', 'geodirectory'); ?> : <span>*</span></label></div> |
|
109 | 109 | <div class="geodir_popup_field"> |
110 | 110 | <input class="is_required" field_type="text" name="frnd_subject" |
111 | - value="<?php echo __('About', 'geodirectory') . ' ' . $post_info->post_title;?>" |
|
111 | + value="<?php echo __('About', 'geodirectory') . ' ' . $post_info->post_title; ?>" |
|
112 | 112 | id="frnd_subject" type="text" value=""/> |
113 | 113 | <span class="message_error2" id="frnd_subjectInfo"></span></div> |
114 | 114 | </div> |
115 | 115 | <?php |
116 | 116 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
117 | - do_action('geodir_after_stf_form_field', 'frnd_subject');?> |
|
117 | + do_action('geodir_after_stf_form_field', 'frnd_subject'); ?> |
|
118 | 118 | <?php |
119 | 119 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
120 | - do_action('geodir_before_stf_form_field', 'frnd_comments');?> |
|
120 | + do_action('geodir_before_stf_form_field', 'frnd_comments'); ?> |
|
121 | 121 | <div class="row clearfix"> |
122 | 122 | <div class="geodir_popup_heading"> |
123 | - <label><?php _e('Comments', 'geodirectory');?> : <span>*</span></label></div> |
|
123 | + <label><?php _e('Comments', 'geodirectory'); ?> : <span>*</span></label></div> |
|
124 | 124 | <div class="geodir_popup_field"> |
125 | 125 | <textarea class="is_required" field_type="textarea" name="frnd_comments" id="frnd_comments" cols="" |
126 | - rows=""><?php echo SEND_TO_FRIEND_SAMPLE_CONTENT;?></textarea> |
|
126 | + rows=""><?php echo SEND_TO_FRIEND_SAMPLE_CONTENT; ?></textarea> |
|
127 | 127 | <span class="message_error2" id="frnd_commentsInfo"></span></div> |
128 | 128 | </div> |
129 | 129 | <?php |
130 | 130 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
131 | - do_action('geodir_after_stf_form_field', 'frnd_comments');?> |
|
131 | + do_action('geodir_after_stf_form_field', 'frnd_comments'); ?> |
|
132 | 132 | <?php if (function_exists('geodir_get_captch')) { |
133 | 133 | geodir_get_captch('-1'); |
134 | 134 | }?> |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | <form method="post" name="agt_mail_agent" id="agt_mail_agent" |
143 | 143 | action="<?php echo get_permalink($post_info->ID); ?>"> |
144 | 144 | <input type="hidden" name="sendact" value="send_inqury"/> |
145 | - <input type="hidden" name="pid" value="<?php echo $post_info->ID;?>"/> |
|
145 | + <input type="hidden" name="pid" value="<?php echo $post_info->ID; ?>"/> |
|
146 | 146 | |
147 | 147 | <h3><?php |
148 | 148 | /** |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | * @since 1.0.0 |
152 | 152 | * @param string $title The title for the form, defaults to global `SEND_INQUIRY` text. |
153 | 153 | */ |
154 | - echo apply_filters('geodir_send_inquiry_page_title', SEND_INQUIRY);?> </h3> |
|
154 | + echo apply_filters('geodir_send_inquiry_page_title', SEND_INQUIRY); ?> </h3> |
|
155 | 155 | |
156 | 156 | <p id="inquiry_send_success" class="sucess_msg" style="display:none;"></p> |
157 | 157 | <?php |
@@ -161,9 +161,9 @@ discard block |
||
161 | 161 | * @since 1.0.0 |
162 | 162 | * @param string $field The field name the actions is called before. |
163 | 163 | */ |
164 | - do_action('geodir_before_inquiry_form_field', 'inq_name');?> |
|
164 | + do_action('geodir_before_inquiry_form_field', 'inq_name'); ?> |
|
165 | 165 | <div class="row clearfix"> |
166 | - <div class="geodir_popup_heading"><label><?php _e('Your Name', 'geodirectory');?> : |
|
166 | + <div class="geodir_popup_heading"><label><?php _e('Your Name', 'geodirectory'); ?> : |
|
167 | 167 | <span>*</span></label></div> |
168 | 168 | <div class="geodir_popup_field"> |
169 | 169 | <input class="is_required" field_type="text" name="inq_name" type="text" value=""/> |
@@ -176,13 +176,13 @@ discard block |
||
176 | 176 | * @since 1.0.0 |
177 | 177 | * @param string $field The field name the actions is called after. |
178 | 178 | */ |
179 | - do_action('geodir_after_inquiry_form_field', 'inq_name');?> |
|
179 | + do_action('geodir_after_inquiry_form_field', 'inq_name'); ?> |
|
180 | 180 | <?php |
181 | 181 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
182 | - do_action('geodir_before_inquiry_form_field', 'inq_email');?> |
|
182 | + do_action('geodir_before_inquiry_form_field', 'inq_email'); ?> |
|
183 | 183 | <div class="row clearfix"> |
184 | 184 | <div class="geodir_popup_heading"> |
185 | - <label><?php _e('Email', 'geodirectory');?> : <span>*</span></label></div> |
|
185 | + <label><?php _e('Email', 'geodirectory'); ?> : <span>*</span></label></div> |
|
186 | 186 | <div class="geodir_popup_field"> |
187 | 187 | <input class="is_required" field_type="email" name="inq_email" type="text" value=""/> |
188 | 188 | <span class="message_error2" id="span_agt_mail_email"></span> |
@@ -190,35 +190,35 @@ discard block |
||
190 | 190 | </div> |
191 | 191 | <?php |
192 | 192 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
193 | - do_action('geodir_after_inquiry_form_field', 'inq_email');?> |
|
193 | + do_action('geodir_after_inquiry_form_field', 'inq_email'); ?> |
|
194 | 194 | <?php |
195 | 195 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
196 | - do_action('geodir_before_inquiry_form_field', 'inq_phone');?> |
|
196 | + do_action('geodir_before_inquiry_form_field', 'inq_phone'); ?> |
|
197 | 197 | <div class="row clearfix"> |
198 | 198 | <div class="geodir_popup_heading"> |
199 | - <label><?php _e('Contact Info', 'geodirectory');?> :</label></div> |
|
199 | + <label><?php _e('Contact Info', 'geodirectory'); ?> :</label></div> |
|
200 | 200 | <div class="geodir_popup_field"> |
201 | 201 | <input name="inq_phone" id="agt_mail_phone" type="text" value=""/> |
202 | 202 | </div> |
203 | 203 | </div> |
204 | 204 | <?php |
205 | 205 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
206 | - do_action('geodir_after_inquiry_form_field', 'inq_phone');?> |
|
206 | + do_action('geodir_after_inquiry_form_field', 'inq_phone'); ?> |
|
207 | 207 | <?php |
208 | 208 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
209 | - do_action('geodir_before_inquiry_form_field', 'inq_msg');?> |
|
209 | + do_action('geodir_before_inquiry_form_field', 'inq_msg'); ?> |
|
210 | 210 | <div class="row clearfix"> |
211 | 211 | <div class="geodir_popup_heading"> |
212 | - <label><?php _e('Comments', 'geodirectory');?> : <span>*</span></label></div> |
|
212 | + <label><?php _e('Comments', 'geodirectory'); ?> : <span>*</span></label></div> |
|
213 | 213 | <div class="geodir_popup_field"> |
214 | 214 | <textarea class="is_required" field_type="textarea" name="inq_msg" cols="" |
215 | - rows=""><?php echo SEND_INQUIRY_SAMPLE_CONTENT;?></textarea> |
|
215 | + rows=""><?php echo SEND_INQUIRY_SAMPLE_CONTENT; ?></textarea> |
|
216 | 216 | <span class="message_error2" id="span_agt_mail_msg"></span></div> |
217 | 217 | </div> |
218 | 218 | <?php |
219 | 219 | /** This action is documented in geodirectory-templates/popup-forms.php */ |
220 | - do_action('geodir_after_inquiry_form_field', 'inq_msg');?> |
|
221 | - <input name="Send" type="submit" value="<?php _e('Send', 'geodirectory');?>" |
|
220 | + do_action('geodir_after_inquiry_form_field', 'inq_msg'); ?> |
|
221 | + <input name="Send" type="submit" value="<?php _e('Send', 'geodirectory'); ?>" |
|
222 | 222 | class="button clearfix"/> |
223 | 223 | </form> |
224 | 224 | </div> <?php |
@@ -1,14 +1,14 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Template for the success page after submitting a listing |
|
4 | - * |
|
5 | - * You can make most changes via hooks or see the link below for info on how to replace the template in your theme. |
|
6 | - * |
|
7 | - * @link http://docs.wpgeodirectory.com/customizing-geodirectory-templates/ |
|
8 | - * @since 1.0.0 |
|
9 | - * @package GeoDirectory |
|
10 | - * @deprecated 1.4.2 listing-success.php |
|
11 | - */ |
|
3 | + * Template for the success page after submitting a listing |
|
4 | + * |
|
5 | + * You can make most changes via hooks or see the link below for info on how to replace the template in your theme. |
|
6 | + * |
|
7 | + * @link http://docs.wpgeodirectory.com/customizing-geodirectory-templates/ |
|
8 | + * @since 1.0.0 |
|
9 | + * @package GeoDirectory |
|
10 | + * @deprecated 1.4.2 listing-success.php |
|
11 | + */ |
|
12 | 12 | get_header(); |
13 | 13 | |
14 | 14 | /** |
@@ -143,11 +143,11 @@ |
||
143 | 143 | <?php |
144 | 144 | $publish_listing_form = ob_get_clean(); |
145 | 145 | /** |
146 | - * Filter the HTML for the entire publish listing form preview page message and buttons etc. |
|
147 | - * |
|
148 | - * @since 1.0.0 |
|
149 | - * @param string $publish_listing_form The publish listing HTML form. |
|
150 | - */ |
|
146 | + * Filter the HTML for the entire publish listing form preview page message and buttons etc. |
|
147 | + * |
|
148 | + * @since 1.0.0 |
|
149 | + * @param string $publish_listing_form The publish listing HTML form. |
|
150 | + */ |
|
151 | 151 | $publish_listing_form = apply_filters('geodir_publish_listing_form', $publish_listing_form); |
152 | 152 | echo $publish_listing_form; |
153 | 153 |
@@ -61,10 +61,11 @@ |
||
61 | 61 | ob_start(); |
62 | 62 | echo '<h5 class="geodir_information">'; |
63 | 63 | |
64 | - if (!isset($_REQUEST['pid'])) |
|
65 | - printf(GOING_TO_FREE_MSG, $type_title, $alive_days); |
|
66 | - else |
|
67 | - printf(GOING_TO_UPDATE_MSG, $type_title, $alive_days); |
|
64 | + if (!isset($_REQUEST['pid'])) { |
|
65 | + printf(GOING_TO_FREE_MSG, $type_title, $alive_days); |
|
66 | + } else { |
|
67 | + printf(GOING_TO_UPDATE_MSG, $type_title, $alive_days); |
|
68 | + } |
|
68 | 69 | |
69 | 70 | echo '</h5>'; |
70 | 71 | $publish_listing_form_message = ob_get_clean(); |
@@ -110,7 +110,7 @@ |
||
110 | 110 | if (isset($post->pid)) { |
111 | 111 | $post_id = $post->pid; |
112 | 112 | } else if (isset($_REQUEST['pid'])) { |
113 | - $post_id = (int)$_REQUEST['pid']; |
|
113 | + $post_id = (int) $_REQUEST['pid']; |
|
114 | 114 | } |
115 | 115 | |
116 | 116 | $postlink = get_permalink(geodir_add_listing_page_id()); |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | $username = $user_info->user_login; |
36 | 36 | $user_email = $user_info->user_email; |
37 | 37 | |
38 | - $message = wpautop(__(stripslashes_deep(get_option('geodir_post_added_success_msg_content')),'geodirectory')); |
|
38 | + $message = wpautop(__(stripslashes_deep(get_option('geodir_post_added_success_msg_content')), 'geodirectory')); |
|
39 | 39 | |
40 | 40 | /* |
41 | 41 | * Filter the success page message before variable replacements. |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | * @param object $post_info Post object. |
46 | 46 | * @param object $user_info User object. |
47 | 47 | */ |
48 | - $message = apply_filters('geodir_success_page_msg_before_var_replace', $message,$post_info, $user_info); |
|
48 | + $message = apply_filters('geodir_success_page_msg_before_var_replace', $message, $post_info, $user_info); |
|
49 | 49 | |
50 | 50 | $search_array = array('[#submited_information_link#]', '[#listing_link#]', '[#site_name_url#]', '[#post_id#]', '[#site_name#]', '[#user_email#]', '[#username#]', '[#login_url#]', '[#posted_date#]'); |
51 | 51 | $replace_array = array($productlink, $productlink, $siteurl_link, $post_id, $siteName, $user_email, $username, $loginurl_link, $posted_date); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | * @param object $post_info Post object. |
60 | 60 | * @param object $user_info User object. |
61 | 61 | */ |
62 | - $message = apply_filters('geodir_success_page_msg_after_var_replace', $message,$post_info, $user_info); |
|
62 | + $message = apply_filters('geodir_success_page_msg_after_var_replace', $message, $post_info, $user_info); |
|
63 | 63 | |
64 | 64 | |
65 | 65 | |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | * @param object $post_info Post object. |
76 | 76 | * @param object $user_info User object. |
77 | 77 | */ |
78 | - do_action('geodir_before_success_page_msg_wrapper', $message,$post_info, $user_info); |
|
78 | + do_action('geodir_before_success_page_msg_wrapper', $message, $post_info, $user_info); |
|
79 | 79 | echo '<h5 class="geodir_information">'; |
80 | 80 | echo $message; |
81 | 81 | echo '</h5>'; |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | * @param object $post_info Post object. |
88 | 88 | * @param object $user_info User object. |
89 | 89 | */ |
90 | - do_action('geodir_after_success_page_msg_wrapper', $message,$post_info, $user_info); |
|
90 | + do_action('geodir_after_success_page_msg_wrapper', $message, $post_info, $user_info); |
|
91 | 91 | |
92 | 92 | ?> |
93 | 93 |
@@ -1,13 +1,13 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Template for the register for box on the register/signin page |
|
4 | - * |
|
5 | - * You can make most changes via hooks or see the link below for info on how to replace the template in your theme. |
|
6 | - * |
|
7 | - * @link http://docs.wpgeodirectory.com/customizing-geodirectory-templates/ |
|
8 | - * @since 1.0.0 |
|
9 | - * @package GeoDirectory |
|
10 | - */ |
|
3 | + * Template for the register for box on the register/signin page |
|
4 | + * |
|
5 | + * You can make most changes via hooks or see the link below for info on how to replace the template in your theme. |
|
6 | + * |
|
7 | + * @link http://docs.wpgeodirectory.com/customizing-geodirectory-templates/ |
|
8 | + * @since 1.0.0 |
|
9 | + * @package GeoDirectory |
|
10 | + */ |
|
11 | 11 | if (isset($_GET['redirect_to']) && $_GET['redirect_to'] != '') { |
12 | 12 | $redirect_to = $_GET['redirect_to']; |
13 | 13 | } else { |
@@ -1,16 +1,16 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Template for the list of places |
|
4 | - * |
|
5 | - * This is used mostly by widgets that produce a list of listings and outputs the actual grid or list of listings. |
|
6 | - * See the link below for info on how to replace the template in your theme. |
|
7 | - * |
|
8 | - * @link http://docs.wpgeodirectory.com/customizing-geodirectory-templates/ |
|
9 | - * @since 1.0.0 |
|
10 | - * @package GeoDirectory |
|
11 | - * @global string $gridview_columns_widget The girdview style of the listings for widget. |
|
12 | - * @global object $gd_session GeoDirectory Session object. |
|
13 | - */ |
|
3 | + * Template for the list of places |
|
4 | + * |
|
5 | + * This is used mostly by widgets that produce a list of listings and outputs the actual grid or list of listings. |
|
6 | + * See the link below for info on how to replace the template in your theme. |
|
7 | + * |
|
8 | + * @link http://docs.wpgeodirectory.com/customizing-geodirectory-templates/ |
|
9 | + * @since 1.0.0 |
|
10 | + * @package GeoDirectory |
|
11 | + * @global string $gridview_columns_widget The girdview style of the listings for widget. |
|
12 | + * @global object $gd_session GeoDirectory Session object. |
|
13 | + */ |
|
14 | 14 | |
15 | 15 | /** This action is documented in geodirectory-templates/listing-listview.php */ |
16 | 16 | do_action('geodir_before_listing_listview'); |
@@ -257,9 +257,9 @@ discard block |
||
257 | 257 | /** This action is documented in geodirectory-templates/listing-listview.php */ |
258 | 258 | do_action('geodir_after_listing_post_listview'); |
259 | 259 | } else { |
260 | - $favorite = isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite' ? true : false; |
|
260 | + $favorite = isset($_REQUEST['list']) && $_REQUEST['list'] == 'favourite' ? true : false; |
|
261 | 261 | |
262 | - /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
262 | + /** This action is documented in geodirectory-templates/listing-listview.php */ |
|
263 | 263 | do_action('geodir_message_not_found_on_listing', 'widget-listing-listview', $favorite); |
264 | 264 | } |
265 | 265 | ?> |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | /** This action is documented in geodirectory-templates/listing-listview.php */ |
31 | 31 | do_action('geodir_before_listing_post_listview'); |
32 | 32 | $all_postypes = geodir_get_posttypes(); |
33 | - $geodir_days_new = (int)get_option('geodir_listing_new_days'); |
|
33 | + $geodir_days_new = (int) get_option('geodir_listing_new_days'); |
|
34 | 34 | foreach ($widget_listings as $widget_listing) { |
35 | 35 | global $gd_widget_listing_type; |
36 | 36 | $post = $widget_listing; |
@@ -145,12 +145,12 @@ discard block |
||
145 | 145 | */ |
146 | 146 | $show_listing_excerpt = apply_filters('geodir_show_listing_post_excerpt', true, 'widget', $post); |
147 | 147 | if ($show_listing_excerpt) { |
148 | - if ( isset( $character_count ) && ( $character_count || $character_count == '0' ) ) { |
|
149 | - $content_out = geodir_max_excerpt( $character_count ); |
|
148 | + if (isset($character_count) && ($character_count || $character_count == '0')) { |
|
149 | + $content_out = geodir_max_excerpt($character_count); |
|
150 | 150 | } else { |
151 | 151 | $content_out = get_the_excerpt(); |
152 | 152 | } |
153 | - if ( ! empty( $content_out ) ) { |
|
153 | + if (!empty($content_out)) { |
|
154 | 154 | echo "<p>" . $content_out . "</p>"; |
155 | 155 | } |
156 | 156 | } |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | * @param object $post The post object. |
171 | 171 | * @param string $view The view type, default 'widget'. |
172 | 172 | */ |
173 | - do_action( 'geodir_after_listing_content', $post, 'widget' ); ?> |
|
173 | + do_action('geodir_after_listing_content', $post, 'widget'); ?> |
|
174 | 174 | <footer class="geodir-entry-meta <?php echo apply_filters('geodir_listing_listview_meta_extra_class', '', 'widget'); ?>"> |
175 | 175 | <div class="geodir-addinfo clearfix <?php echo apply_filters('geodir_listing_listview_addinfo_extra_class', '', 'widget'); ?>"> |
176 | 176 | <?php |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | * @param object $post The post object. |
182 | 182 | * @param string $view The view type, default 'widget'. |
183 | 183 | */ |
184 | - do_action( 'geodir_before_review_html', $post, 'widget' ); |
|
184 | + do_action('geodir_before_review_html', $post, 'widget'); |
|
185 | 185 | $review_show = geodir_is_reviews_show('listview'); |
186 | 186 | if ($review_show) { |
187 | 187 | |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | * |
207 | 207 | * @since 1.0.0 |
208 | 208 | */ |
209 | - do_action( 'geodir_after_favorite_html', $post->ID, 'widget' ); |
|
209 | + do_action('geodir_after_favorite_html', $post->ID, 'widget'); |
|
210 | 210 | |
211 | 211 | if ($post->post_author == get_current_user_id()) { |
212 | 212 | $addplacelink = get_permalink(geodir_add_listing_page_id()); |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | title="<?php _e('Edit Listing', 'geodirectory'); ?>"> |
228 | 228 | <?php |
229 | 229 | $geodir_listing_edit_icon = apply_filters('geodir_listing_edit_icon', 'fa fa-edit'); |
230 | - echo '<i class="'. $geodir_listing_edit_icon .'"></i>'; |
|
230 | + echo '<i class="' . $geodir_listing_edit_icon . '"></i>'; |
|
231 | 231 | ?> |
232 | 232 | <?php _e('Edit', 'geodirectory'); ?> |
233 | 233 | </a> |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | title="<?php _e('Delete Listing', 'geodirectory'); ?>"> |
236 | 236 | <?php |
237 | 237 | $geodir_listing_delete_icon = apply_filters('geodir_listing_delete_icon', 'fa fa-close'); |
238 | - echo '<i class="'. $geodir_listing_delete_icon .'"></i>'; |
|
238 | + echo '<i class="' . $geodir_listing_delete_icon . '"></i>'; |
|
239 | 239 | ?> |
240 | 240 | <?php _e('Delete', 'geodirectory'); ?> |
241 | 241 | </a> |
@@ -1,11 +1,11 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * GeoDirectory Best of widget |
|
4 | - * |
|
5 | - * @since 1.3.9 |
|
6 | - * |
|
7 | - * @package GeoDirectory |
|
8 | - */ |
|
3 | + * GeoDirectory Best of widget |
|
4 | + * |
|
5 | + * @since 1.3.9 |
|
6 | + * |
|
7 | + * @package GeoDirectory |
|
8 | + */ |
|
9 | 9 | |
10 | 10 | /** |
11 | 11 | * GeoDirectory Best of widget widget class. |
@@ -15,11 +15,11 @@ discard block |
||
15 | 15 | class geodir_bestof_widget extends WP_Widget |
16 | 16 | { |
17 | 17 | /** |
18 | - * Register the best of widget with WordPress. |
|
19 | - * |
|
20 | - * @since 1.3.9 |
|
18 | + * Register the best of widget with WordPress. |
|
19 | + * |
|
20 | + * @since 1.3.9 |
|
21 | 21 | * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct. |
22 | - */ |
|
22 | + */ |
|
23 | 23 | function __construct() { |
24 | 24 | $widget_ops = array('classname' => 'geodir_bestof_widget', 'description' => __('GD > Best of widget', 'geodirectory')); |
25 | 25 | parent::__construct( |
@@ -29,27 +29,27 @@ discard block |
||
29 | 29 | ); |
30 | 30 | } |
31 | 31 | |
32 | - /** |
|
33 | - * Front-end display content for best of widget. |
|
34 | - * |
|
35 | - * @since 1.3.9 |
|
32 | + /** |
|
33 | + * Front-end display content for best of widget. |
|
34 | + * |
|
35 | + * @since 1.3.9 |
|
36 | 36 | * @since 1.5.1 Added filter to view all link. |
37 | 37 | * @since 1.5.1 Declare function public. |
38 | - * |
|
39 | - * @param array $args Widget arguments. |
|
40 | - * @param array $instance Saved values from database. |
|
41 | - */ |
|
42 | - public function widget($args, $instance) |
|
38 | + * |
|
39 | + * @param array $args Widget arguments. |
|
40 | + * @param array $instance Saved values from database. |
|
41 | + */ |
|
42 | + public function widget($args, $instance) |
|
43 | 43 | { |
44 | 44 | extract($args); |
45 | - /** |
|
46 | - * Filter the best of widget tab layout. |
|
47 | - * |
|
48 | - * @since 1.3.9 |
|
49 | - * |
|
50 | - * @param string $instance['tab_layout'] Best of widget tab layout name. |
|
51 | - */ |
|
52 | - $tab_layout = empty($instance['tab_layout']) ? 'bestof-tabs-on-top' : apply_filters('bestof_widget_tab_layout', $instance['tab_layout']); |
|
45 | + /** |
|
46 | + * Filter the best of widget tab layout. |
|
47 | + * |
|
48 | + * @since 1.3.9 |
|
49 | + * |
|
50 | + * @param string $instance['tab_layout'] Best of widget tab layout name. |
|
51 | + */ |
|
52 | + $tab_layout = empty($instance['tab_layout']) ? 'bestof-tabs-on-top' : apply_filters('bestof_widget_tab_layout', $instance['tab_layout']); |
|
53 | 53 | echo '<div class="bestof-widget-tab-layout ' . $tab_layout . '">'; |
54 | 54 | echo $before_widget; |
55 | 55 | $loc_terms = geodir_get_current_location_terms(); |
@@ -59,32 +59,32 @@ discard block |
||
59 | 59 | $cur_location = ''; |
60 | 60 | } |
61 | 61 | |
62 | - /** |
|
63 | - * Filter the current location name. |
|
64 | - * |
|
65 | - * @since 1.3.9 |
|
66 | - * |
|
67 | - * @param string $cur_location Current location name. |
|
68 | - */ |
|
69 | - $cur_location = apply_filters('bestof_widget_cur_location', $cur_location); |
|
62 | + /** |
|
63 | + * Filter the current location name. |
|
64 | + * |
|
65 | + * @since 1.3.9 |
|
66 | + * |
|
67 | + * @param string $cur_location Current location name. |
|
68 | + */ |
|
69 | + $cur_location = apply_filters('bestof_widget_cur_location', $cur_location); |
|
70 | 70 | |
71 | 71 | /** |
72 | - * Filter the widget title. |
|
73 | - * |
|
74 | - * @since 1.3.9 |
|
75 | - * |
|
76 | - * @param string $instance['title'] The widget title. |
|
77 | - */ |
|
78 | - $title = empty($instance['title']) ? wp_sprintf( __( 'Best of %s', 'geodirectory' ), get_bloginfo('name') . $cur_location ) : apply_filters('bestof_widget_title', __($instance['title'], 'geodirectory')); |
|
72 | + * Filter the widget title. |
|
73 | + * |
|
74 | + * @since 1.3.9 |
|
75 | + * |
|
76 | + * @param string $instance['title'] The widget title. |
|
77 | + */ |
|
78 | + $title = empty($instance['title']) ? wp_sprintf( __( 'Best of %s', 'geodirectory' ), get_bloginfo('name') . $cur_location ) : apply_filters('bestof_widget_title', __($instance['title'], 'geodirectory')); |
|
79 | 79 | |
80 | - /** |
|
81 | - * Filter the post type. |
|
82 | - * |
|
83 | - * @since 1.3.9 |
|
84 | - * |
|
85 | - * @param string $instance['post_type'] The post type. |
|
86 | - */ |
|
87 | - $post_type = empty($instance['post_type']) ? 'gd_place' : apply_filters('bestof_widget_post_type', $instance['post_type']); |
|
80 | + /** |
|
81 | + * Filter the post type. |
|
82 | + * |
|
83 | + * @since 1.3.9 |
|
84 | + * |
|
85 | + * @param string $instance['post_type'] The post type. |
|
86 | + */ |
|
87 | + $post_type = empty($instance['post_type']) ? 'gd_place' : apply_filters('bestof_widget_post_type', $instance['post_type']); |
|
88 | 88 | |
89 | 89 | /** |
90 | 90 | * Filter the excerpt type. |
@@ -97,32 +97,32 @@ discard block |
||
97 | 97 | |
98 | 98 | |
99 | 99 | /** |
100 | - * Filter the listing limit. |
|
101 | - * |
|
102 | - * @since 1.3.9 |
|
103 | - * |
|
104 | - * @param int $instance['post_limit'] No. of posts to display. |
|
105 | - */ |
|
106 | - $post_limit = empty($instance['post_limit']) ? '5' : apply_filters('bestof_widget_post_limit', $instance['post_limit']); |
|
100 | + * Filter the listing limit. |
|
101 | + * |
|
102 | + * @since 1.3.9 |
|
103 | + * |
|
104 | + * @param int $instance['post_limit'] No. of posts to display. |
|
105 | + */ |
|
106 | + $post_limit = empty($instance['post_limit']) ? '5' : apply_filters('bestof_widget_post_limit', $instance['post_limit']); |
|
107 | 107 | |
108 | - /** |
|
109 | - * Filter the category limit. |
|
110 | - * |
|
111 | - * @since 1.3.9 |
|
112 | - * |
|
113 | - * @param int $instance['categ_limit'] No. of categories to display. |
|
114 | - */ |
|
115 | - $categ_limit = empty($instance['categ_limit']) ? '3' : apply_filters('bestof_widget_categ_limit', $instance['categ_limit']); |
|
108 | + /** |
|
109 | + * Filter the category limit. |
|
110 | + * |
|
111 | + * @since 1.3.9 |
|
112 | + * |
|
113 | + * @param int $instance['categ_limit'] No. of categories to display. |
|
114 | + */ |
|
115 | + $categ_limit = empty($instance['categ_limit']) ? '3' : apply_filters('bestof_widget_categ_limit', $instance['categ_limit']); |
|
116 | 116 | $use_viewing_post_type = !empty($instance['use_viewing_post_type']) ? true : false; |
117 | 117 | |
118 | - /** |
|
119 | - * Filter the use of location filter. |
|
120 | - * |
|
121 | - * @since 1.3.9 |
|
122 | - * |
|
123 | - * @param int|bool $instance['add_location_filter'] Filter listings using current location. |
|
124 | - */ |
|
125 | - $add_location_filter = empty($instance['add_location_filter']) ? '1' : apply_filters('bestof_widget_location_filter', $instance['add_location_filter']); |
|
118 | + /** |
|
119 | + * Filter the use of location filter. |
|
120 | + * |
|
121 | + * @since 1.3.9 |
|
122 | + * |
|
123 | + * @param int|bool $instance['add_location_filter'] Filter listings using current location. |
|
124 | + */ |
|
125 | + $add_location_filter = empty($instance['add_location_filter']) ? '1' : apply_filters('bestof_widget_location_filter', $instance['add_location_filter']); |
|
126 | 126 | |
127 | 127 | // set post type to current viewing post type |
128 | 128 | if ($use_viewing_post_type) { |
@@ -133,14 +133,14 @@ discard block |
||
133 | 133 | } |
134 | 134 | |
135 | 135 | if (isset($instance['character_count'])) { |
136 | - /** |
|
137 | - * Filter the widget's excerpt character count. |
|
138 | - * |
|
139 | - * @since 1.3.9 |
|
136 | + /** |
|
137 | + * Filter the widget's excerpt character count. |
|
140 | 138 | * |
141 | - * @param int $instance['character_count'] Excerpt character count. |
|
142 | - */ |
|
143 | - $character_count = apply_filters('bestof_widget_list_character_count', $instance['character_count']); |
|
139 | + * @since 1.3.9 |
|
140 | + * |
|
141 | + * @param int $instance['character_count'] Excerpt character count. |
|
142 | + */ |
|
143 | + $character_count = apply_filters('bestof_widget_list_character_count', $instance['character_count']); |
|
144 | 144 | } else { |
145 | 145 | $character_count = ''; |
146 | 146 | } |
@@ -294,10 +294,10 @@ discard block |
||
294 | 294 | value="<?php echo $category_taxonomy[0]; ?>"> |
295 | 295 | <input type="hidden" id="bestof_widget_location_filter" name="bestof_widget_location_filter" |
296 | 296 | value="<?php if ($add_location_filter) { |
297 | - echo 1; |
|
298 | - } else { |
|
299 | - echo 0; |
|
300 | - } ?>"> |
|
297 | + echo 1; |
|
298 | + } else { |
|
299 | + echo 0; |
|
300 | + } ?>"> |
|
301 | 301 | <input type="hidden" id="bestof_widget_char_count" name="bestof_widget_char_count" |
302 | 302 | value="<?php echo $character_count; ?>"> |
303 | 303 | <div class="geo-bestof-contentwrap geodir-tabs-content" style="position: relative; z-index: 0;"> |
@@ -306,18 +306,18 @@ discard block |
||
306 | 306 | echo '<div id="geodir-bestof-places">'; |
307 | 307 | if ($terms) { |
308 | 308 | $view_all_link = add_query_arg(array('sort_by' => 'rating_count_desc'), get_term_link($first_term, $first_term->taxonomy)); |
309 | - /** |
|
310 | - * Filter the page link to view all lisitngs. |
|
311 | - * |
|
312 | - * @since 1.5.1 |
|
313 | - * |
|
314 | - * @param array $view_all_link View all listings page link. |
|
315 | - * @param array $post_type The Post type. |
|
316 | - * @param array $first_term The category term object. |
|
317 | - */ |
|
318 | - $view_all_link = apply_filters('geodir_bestof_widget_view_all_link', $view_all_link, $post_type, $first_term); |
|
309 | + /** |
|
310 | + * Filter the page link to view all lisitngs. |
|
311 | + * |
|
312 | + * @since 1.5.1 |
|
313 | + * |
|
314 | + * @param array $view_all_link View all listings page link. |
|
315 | + * @param array $post_type The Post type. |
|
316 | + * @param array $first_term The category term object. |
|
317 | + */ |
|
318 | + $view_all_link = apply_filters('geodir_bestof_widget_view_all_link', $view_all_link, $post_type, $first_term); |
|
319 | 319 | |
320 | - echo '<h3 class="bestof-cat-title">' . wp_sprintf( __( 'Best of %s', 'geodirectory' ), $first_term->name ) . '<a href="' . esc_url($view_all_link) . '">' . __("View all", 'geodirectory') . '</a></h3>'; |
|
320 | + echo '<h3 class="bestof-cat-title">' . wp_sprintf( __( 'Best of %s', 'geodirectory' ), $first_term->name ) . '<a href="' . esc_url($view_all_link) . '">' . __("View all", 'geodirectory') . '</a></h3>'; |
|
321 | 321 | } |
322 | 322 | if ($excerpt_type == 'show-reviews') { |
323 | 323 | add_filter('get_the_excerpt', 'best_of_show_review_in_excerpt'); |
@@ -335,18 +335,18 @@ discard block |
||
335 | 335 | echo "</div>"; |
336 | 336 | } |
337 | 337 | |
338 | - /** |
|
339 | - * Sanitize best of widget form values as they are saved. |
|
340 | - * |
|
341 | - * @since 1.3.9 |
|
338 | + /** |
|
339 | + * Sanitize best of widget form values as they are saved. |
|
340 | + * |
|
341 | + * @since 1.3.9 |
|
342 | 342 | * @since 1.5.1 Declare function public. |
343 | - * |
|
344 | - * @param array $new_instance Values just sent to be saved. |
|
345 | - * @param array $old_instance Previously saved values from database. |
|
346 | - * |
|
347 | - * @return array Updated safe values to be saved. |
|
348 | - */ |
|
349 | - public function update($new_instance, $old_instance) |
|
343 | + * |
|
344 | + * @param array $new_instance Values just sent to be saved. |
|
345 | + * @param array $old_instance Previously saved values from database. |
|
346 | + * |
|
347 | + * @return array Updated safe values to be saved. |
|
348 | + */ |
|
349 | + public function update($new_instance, $old_instance) |
|
350 | 350 | { |
351 | 351 | $instance = $old_instance; |
352 | 352 | $instance['title'] = strip_tags($new_instance['title']); |
@@ -364,15 +364,15 @@ discard block |
||
364 | 364 | return $instance; |
365 | 365 | } |
366 | 366 | |
367 | - /** |
|
368 | - * Back-end best of widget settings form. |
|
369 | - * |
|
370 | - * @since 1.3.9 |
|
367 | + /** |
|
368 | + * Back-end best of widget settings form. |
|
369 | + * |
|
370 | + * @since 1.3.9 |
|
371 | 371 | * @since 1.5.1 Declare function public. |
372 | - * |
|
373 | - * @param array $instance Previously saved values from database. |
|
374 | - */ |
|
375 | - public function form($instance) |
|
372 | + * |
|
373 | + * @param array $instance Previously saved values from database. |
|
374 | + */ |
|
375 | + public function form($instance) |
|
376 | 376 | { |
377 | 377 | $instance = wp_parse_args((array)$instance, |
378 | 378 | array( |
@@ -412,14 +412,14 @@ discard block |
||
412 | 412 | for="<?php echo $this->get_field_id('post_type'); ?>"><?php _e('Post Type:', 'geodirectory');?> |
413 | 413 | |
414 | 414 | <?php $postypes = geodir_get_posttypes(); |
415 | - /** |
|
416 | - * Filter the post types to display in widget. |
|
417 | - * |
|
418 | - * @since 1.3.9 |
|
419 | - * |
|
420 | - * @param array $postypes Post types array. |
|
421 | - */ |
|
422 | - $postypes = apply_filters('geodir_post_type_list_in_p_widget', $postypes); ?> |
|
415 | + /** |
|
416 | + * Filter the post types to display in widget. |
|
417 | + * |
|
418 | + * @since 1.3.9 |
|
419 | + * |
|
420 | + * @param array $postypes Post types array. |
|
421 | + */ |
|
422 | + $postypes = apply_filters('geodir_post_type_list_in_p_widget', $postypes); ?> |
|
423 | 423 | |
424 | 424 | <select class="widefat" id="<?php echo $this->get_field_id('post_type'); ?>" |
425 | 425 | name="<?php echo $this->get_field_name('post_type'); ?>" |
@@ -546,7 +546,7 @@ discard block |
||
546 | 546 | function geodir_bestof_places_by_term($query_args) { |
547 | 547 | global $gd_session; |
548 | 548 | |
549 | - /** |
|
549 | + /** |
|
550 | 550 | * This action called before querying widget listings. |
551 | 551 | * |
552 | 552 | * @since 1.0.0 |
@@ -565,12 +565,12 @@ discard block |
||
565 | 565 | $character_count = isset($query_args['excerpt_length']) ? $query_args['excerpt_length'] : ''; |
566 | 566 | |
567 | 567 | if (!isset($character_count)) { |
568 | - /** This filter is documented in geodirectory-widgets/geodirectory_bestof_widget.php */ |
|
569 | - $character_count = $character_count == '' ? 50 : apply_filters('bestof_widget_character_count', $character_count); |
|
568 | + /** This filter is documented in geodirectory-widgets/geodirectory_bestof_widget.php */ |
|
569 | + $character_count = $character_count == '' ? 50 : apply_filters('bestof_widget_character_count', $character_count); |
|
570 | 570 | } |
571 | 571 | |
572 | - /** This filter is documented in geodirectory-functions/general_functions.php */ |
|
573 | - $template = apply_filters("geodir_template_part-widget-listing-listview", geodir_locate_template('widget-listing-listview')); |
|
572 | + /** This filter is documented in geodirectory-functions/general_functions.php */ |
|
573 | + $template = apply_filters("geodir_template_part-widget-listing-listview", geodir_locate_template('widget-listing-listview')); |
|
574 | 574 | |
575 | 575 | global $post, $map_jason, $map_canvas_arr, $gridview_columns_widget, $geodir_is_widget_listing; |
576 | 576 | $current_post = $post; |
@@ -579,30 +579,30 @@ discard block |
||
579 | 579 | $current_grid_view = $gridview_columns_widget; |
580 | 580 | $gridview_columns_widget = null; |
581 | 581 | |
582 | - $gd_listing_view_set = $gd_session->get('gd_listing_view') ? true : false; |
|
583 | - $gd_listing_view_old = $gd_listing_view_set ? $gd_session->get('gd_listing_view') : ''; |
|
582 | + $gd_listing_view_set = $gd_session->get('gd_listing_view') ? true : false; |
|
583 | + $gd_listing_view_old = $gd_listing_view_set ? $gd_session->get('gd_listing_view') : ''; |
|
584 | 584 | |
585 | 585 | $gd_session->set('gd_listing_view', '1'); |
586 | 586 | $geodir_is_widget_listing = true; |
587 | 587 | |
588 | - /** |
|
589 | - * Includes the template for the listing listview. |
|
590 | - * |
|
591 | - * @since 1.3.9 |
|
592 | - */ |
|
593 | - include($template); |
|
588 | + /** |
|
589 | + * Includes the template for the listing listview. |
|
590 | + * |
|
591 | + * @since 1.3.9 |
|
592 | + */ |
|
593 | + include($template); |
|
594 | 594 | |
595 | 595 | $geodir_is_widget_listing = false; |
596 | 596 | |
597 | 597 | $GLOBALS['post'] = $current_post; |
598 | - if (!empty($current_post)) { |
|
599 | - setup_postdata($current_post); |
|
600 | - } |
|
601 | - if ($gd_listing_view_set) { // Set back previous value |
|
602 | - $gd_session->set('gd_listing_view', $gd_listing_view_old); |
|
603 | - } else { |
|
604 | - $gd_session->un_set('gd_listing_view'); |
|
605 | - } |
|
598 | + if (!empty($current_post)) { |
|
599 | + setup_postdata($current_post); |
|
600 | + } |
|
601 | + if ($gd_listing_view_set) { // Set back previous value |
|
602 | + $gd_session->set('gd_listing_view', $gd_listing_view_old); |
|
603 | + } else { |
|
604 | + $gd_session->un_set('gd_listing_view'); |
|
605 | + } |
|
606 | 606 | $map_jason = $current_map_jason; |
607 | 607 | $map_canvas_arr = $current_map_canvas_arr; |
608 | 608 | $gridview_columns_widget = $current_grid_view; |
@@ -655,10 +655,10 @@ discard block |
||
655 | 655 | if ($term_id && $taxonomy) { |
656 | 656 | $term = get_term_by('id', $term_id, $taxonomy); |
657 | 657 | $view_all_link = add_query_arg(array('sort_by' => 'rating_count_desc'), get_term_link($term)) ; |
658 | - /** This filter is documented in geodirectory-widgets/geodirectory_bestof_widget.php */ |
|
659 | - $view_all_link = apply_filters('geodir_bestof_widget_view_all_link', $view_all_link, $post_type, $term); |
|
658 | + /** This filter is documented in geodirectory-widgets/geodirectory_bestof_widget.php */ |
|
659 | + $view_all_link = apply_filters('geodir_bestof_widget_view_all_link', $view_all_link, $post_type, $term); |
|
660 | 660 | |
661 | - echo '<h3 class="bestof-cat-title">' . wp_sprintf( __( 'Best of %s', 'geodirectory' ), $term->name ) . '<a href="' . esc_url( $view_all_link ) . '">' . __("View all", 'geodirectory') . '</a></h3>'; |
|
661 | + echo '<h3 class="bestof-cat-title">' . wp_sprintf( __( 'Best of %s', 'geodirectory' ), $term->name ) . '<a href="' . esc_url( $view_all_link ) . '">' . __("View all", 'geodirectory') . '</a></h3>'; |
|
662 | 662 | } |
663 | 663 | if ($excerpt_type == 'show-reviews') { |
664 | 664 | add_filter('get_the_excerpt', 'best_of_show_review_in_excerpt'); |
@@ -679,7 +679,7 @@ discard block |
||
679 | 679 | * @since 1.3.9 |
680 | 680 | */ |
681 | 681 | function geodir_bestof_js() { |
682 | - $ajax_nonce = wp_create_nonce("geodir-bestof-nonce"); |
|
682 | + $ajax_nonce = wp_create_nonce("geodir-bestof-nonce"); |
|
683 | 683 | ?> |
684 | 684 | <script type="text/javascript"> |
685 | 685 | jQuery(document).ready(function() { |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | * |
76 | 76 | * @param string $instance['title'] The widget title. |
77 | 77 | */ |
78 | - $title = empty($instance['title']) ? wp_sprintf( __( 'Best of %s', 'geodirectory' ), get_bloginfo('name') . $cur_location ) : apply_filters('bestof_widget_title', __($instance['title'], 'geodirectory')); |
|
78 | + $title = empty($instance['title']) ? wp_sprintf(__('Best of %s', 'geodirectory'), get_bloginfo('name') . $cur_location) : apply_filters('bestof_widget_title', __($instance['title'], 'geodirectory')); |
|
79 | 79 | |
80 | 80 | /** |
81 | 81 | * Filter the post type. |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | $is_dropdown = ($tab_layout == 'bestof-tabs-as-dropdown') ? true : false; |
213 | 213 | |
214 | 214 | if ($is_dropdown) { |
215 | - $nav_html .= '<select id="geodir_bestof_tab_dd" class="chosen_select" name="geodir_bestof_tab_dd" data-placeholder="' . esc_attr( __( 'Select Category', 'geodirectory' ) ).'">'; |
|
215 | + $nav_html .= '<select id="geodir_bestof_tab_dd" class="chosen_select" name="geodir_bestof_tab_dd" data-placeholder="' . esc_attr(__('Select Category', 'geodirectory')) . '">'; |
|
216 | 216 | } else { |
217 | 217 | $nav_html .= '<dl class="geodir-tab-head geodir-bestof-cat-list">'; |
218 | 218 | $nav_html .= '<dt></dt>'; |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | */ |
318 | 318 | $view_all_link = apply_filters('geodir_bestof_widget_view_all_link', $view_all_link, $post_type, $first_term); |
319 | 319 | |
320 | - echo '<h3 class="bestof-cat-title">' . wp_sprintf( __( 'Best of %s', 'geodirectory' ), $first_term->name ) . '<a href="' . esc_url($view_all_link) . '">' . __("View all", 'geodirectory') . '</a></h3>'; |
|
320 | + echo '<h3 class="bestof-cat-title">' . wp_sprintf(__('Best of %s', 'geodirectory'), $first_term->name) . '<a href="' . esc_url($view_all_link) . '">' . __("View all", 'geodirectory') . '</a></h3>'; |
|
321 | 321 | } |
322 | 322 | if ($excerpt_type == 'show-reviews') { |
323 | 323 | add_filter('get_the_excerpt', 'best_of_show_review_in_excerpt'); |
@@ -374,7 +374,7 @@ discard block |
||
374 | 374 | */ |
375 | 375 | public function form($instance) |
376 | 376 | { |
377 | - $instance = wp_parse_args((array)$instance, |
|
377 | + $instance = wp_parse_args((array) $instance, |
|
378 | 378 | array( |
379 | 379 | 'title' => '', |
380 | 380 | 'post_type' => '', |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | |
400 | 400 | ?> |
401 | 401 | <p> |
402 | - <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:', 'geodirectory');?> |
|
402 | + <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:', 'geodirectory'); ?> |
|
403 | 403 | |
404 | 404 | <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" |
405 | 405 | name="<?php echo $this->get_field_name('title'); ?>" type="text" |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | |
410 | 410 | <p> |
411 | 411 | <label |
412 | - for="<?php echo $this->get_field_id('post_type'); ?>"><?php _e('Post Type:', 'geodirectory');?> |
|
412 | + for="<?php echo $this->get_field_id('post_type'); ?>"><?php _e('Post Type:', 'geodirectory'); ?> |
|
413 | 413 | |
414 | 414 | <?php $postypes = geodir_get_posttypes(); |
415 | 415 | /** |
@@ -441,7 +441,7 @@ discard block |
||
441 | 441 | <p> |
442 | 442 | |
443 | 443 | <label |
444 | - for="<?php echo $this->get_field_id('post_limit'); ?>"><?php _e('Number of posts:', 'geodirectory');?> |
|
444 | + for="<?php echo $this->get_field_id('post_limit'); ?>"><?php _e('Number of posts:', 'geodirectory'); ?> |
|
445 | 445 | |
446 | 446 | <input class="widefat" id="<?php echo $this->get_field_id('post_limit'); ?>" |
447 | 447 | name="<?php echo $this->get_field_name('post_limit'); ?>" type="text" |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | <p> |
453 | 453 | |
454 | 454 | <label |
455 | - for="<?php echo $this->get_field_id('categ_limit'); ?>"><?php _e('Number of categories:', 'geodirectory');?> |
|
455 | + for="<?php echo $this->get_field_id('categ_limit'); ?>"><?php _e('Number of categories:', 'geodirectory'); ?> |
|
456 | 456 | |
457 | 457 | <input class="widefat" id="<?php echo $this->get_field_id('categ_limit'); ?>" |
458 | 458 | name="<?php echo $this->get_field_name('categ_limit'); ?>" type="text" |
@@ -462,7 +462,7 @@ discard block |
||
462 | 462 | |
463 | 463 | <p> |
464 | 464 | <label |
465 | - for="<?php echo $this->get_field_id('character_count'); ?>"><?php _e('Post Content excerpt character count :', 'geodirectory');?> |
|
465 | + for="<?php echo $this->get_field_id('character_count'); ?>"><?php _e('Post Content excerpt character count :', 'geodirectory'); ?> |
|
466 | 466 | <input class="widefat" id="<?php echo $this->get_field_id('character_count'); ?>" |
467 | 467 | name="<?php echo $this->get_field_name('character_count'); ?>" type="text" |
468 | 468 | value="<?php echo esc_attr($character_count); ?>"/> |
@@ -470,7 +470,7 @@ discard block |
||
470 | 470 | </p> |
471 | 471 | <p> |
472 | 472 | <label |
473 | - for="<?php echo $this->get_field_id('tab_layout'); ?>"><?php _e('Tab Layout:', 'geodirectory');?> |
|
473 | + for="<?php echo $this->get_field_id('tab_layout'); ?>"><?php _e('Tab Layout:', 'geodirectory'); ?> |
|
474 | 474 | |
475 | 475 | <select class="widefat" id="<?php echo $this->get_field_id('tab_layout'); ?>" |
476 | 476 | name="<?php echo $this->get_field_name('tab_layout'); ?>"> |
@@ -491,7 +491,7 @@ discard block |
||
491 | 491 | |
492 | 492 | <p> |
493 | 493 | <label |
494 | - for="<?php echo $this->get_field_id('excerpt_type'); ?>"><?php _e('Excerpt Type:', 'geodirectory');?> |
|
494 | + for="<?php echo $this->get_field_id('excerpt_type'); ?>"><?php _e('Excerpt Type:', 'geodirectory'); ?> |
|
495 | 495 | |
496 | 496 | <select class="widefat" id="<?php echo $this->get_field_id('excerpt_type'); ?>" |
497 | 497 | name="<?php echo $this->get_field_name('excerpt_type'); ?>"> |
@@ -508,9 +508,9 @@ discard block |
||
508 | 508 | |
509 | 509 | <p> |
510 | 510 | <label for="<?php echo $this->get_field_id('add_location_filter'); ?>"> |
511 | - <?php _e('Enable Location Filter:', 'geodirectory');?> |
|
511 | + <?php _e('Enable Location Filter:', 'geodirectory'); ?> |
|
512 | 512 | <input type="checkbox" id="<?php echo $this->get_field_id('add_location_filter'); ?>" |
513 | - name="<?php echo $this->get_field_name('add_location_filter'); ?>" <?php if ($add_location_filter) echo 'checked="checked"';?> |
|
513 | + name="<?php echo $this->get_field_name('add_location_filter'); ?>" <?php if ($add_location_filter) echo 'checked="checked"'; ?> |
|
514 | 514 | value="1"/> |
515 | 515 | </label> |
516 | 516 | </p> |
@@ -654,11 +654,11 @@ discard block |
||
654 | 654 | $query_args['tax_query'] = array($tax_query); |
655 | 655 | if ($term_id && $taxonomy) { |
656 | 656 | $term = get_term_by('id', $term_id, $taxonomy); |
657 | - $view_all_link = add_query_arg(array('sort_by' => 'rating_count_desc'), get_term_link($term)) ; |
|
657 | + $view_all_link = add_query_arg(array('sort_by' => 'rating_count_desc'), get_term_link($term)); |
|
658 | 658 | /** This filter is documented in geodirectory-widgets/geodirectory_bestof_widget.php */ |
659 | 659 | $view_all_link = apply_filters('geodir_bestof_widget_view_all_link', $view_all_link, $post_type, $term); |
660 | 660 | |
661 | - echo '<h3 class="bestof-cat-title">' . wp_sprintf( __( 'Best of %s', 'geodirectory' ), $term->name ) . '<a href="' . esc_url( $view_all_link ) . '">' . __("View all", 'geodirectory') . '</a></h3>'; |
|
661 | + echo '<h3 class="bestof-cat-title">' . wp_sprintf(__('Best of %s', 'geodirectory'), $term->name) . '<a href="' . esc_url($view_all_link) . '">' . __("View all", 'geodirectory') . '</a></h3>'; |
|
662 | 662 | } |
663 | 663 | if ($excerpt_type == 'show-reviews') { |
664 | 664 | add_filter('get_the_excerpt', 'best_of_show_review_in_excerpt'); |
@@ -765,11 +765,11 @@ discard block |
||
765 | 765 | $comments = $wpdb->get_results($request); |
766 | 766 | |
767 | 767 | if ($comments) { |
768 | - foreach($comments as $comment) { |
|
768 | + foreach ($comments as $comment) { |
|
769 | 769 | // Set the extra comment info needed. |
770 | 770 | $comment_extra = $wpdb->get_row("SELECT * FROM $wpdb->comments WHERE comment_ID =$comment->comment_ID"); |
771 | 771 | $comment_content = $comment_extra->comment_content; |
772 | - $excerpt = strip_tags( $comment_content ); |
|
772 | + $excerpt = strip_tags($comment_content); |
|
773 | 773 | } |
774 | 774 | } |
775 | 775 | return $excerpt; |
@@ -118,10 +118,11 @@ discard block |
||
118 | 118 | $instance['listing_width'] = strip_tags($new_instance['listing_width']); |
119 | 119 | $instance['list_sort'] = strip_tags($new_instance['list_sort']); |
120 | 120 | $instance['character_count'] = $new_instance['character_count']; |
121 | - if (isset($new_instance['add_location_filter']) && $new_instance['add_location_filter'] != '') |
|
122 | - $instance['add_location_filter'] = strip_tags($new_instance['add_location_filter']); |
|
123 | - else |
|
124 | - $instance['add_location_filter'] = '0'; |
|
121 | + if (isset($new_instance['add_location_filter']) && $new_instance['add_location_filter'] != '') { |
|
122 | + $instance['add_location_filter'] = strip_tags($new_instance['add_location_filter']); |
|
123 | + } else { |
|
124 | + $instance['add_location_filter'] = '0'; |
|
125 | + } |
|
125 | 126 | |
126 | 127 | return $instance; |
127 | 128 | } |
@@ -279,7 +280,10 @@ discard block |
||
279 | 280 | <label for="<?php echo $this->get_field_id('add_location_filter'); ?>"> |
280 | 281 | <?php _e('Enable Location Filter:', 'geodirectory');?> |
281 | 282 | <input type="checkbox" id="<?php echo $this->get_field_id('add_location_filter'); ?>" |
282 | - name="<?php echo $this->get_field_name('add_location_filter'); ?>" <?php if ($add_location_filter) echo 'checked="checked"';?> |
|
283 | + name="<?php echo $this->get_field_name('add_location_filter'); ?>" <?php if ($add_location_filter) { |
|
284 | + echo 'checked="checked"'; |
|
285 | +} |
|
286 | +?> |
|
283 | 287 | value="1"/> |
284 | 288 | </label> |
285 | 289 | </p> |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * GeoDirectory cpt categories widget. |
|
4 | - * |
|
5 | - * @package GeoDirectory |
|
6 | - * @since 1.5.4 |
|
7 | - */ |
|
3 | + * GeoDirectory cpt categories widget. |
|
4 | + * |
|
5 | + * @package GeoDirectory |
|
6 | + * @since 1.5.4 |
|
7 | + */ |
|
8 | 8 | |
9 | 9 | /** |
10 | 10 | * GeoDirectory CPT categories widget class. |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | $output = geodir_cpt_categories_output($params); |
147 | 147 | |
148 | 148 | echo $args['before_widget']; |
149 | - if ( $params['title'] ) { |
|
149 | + if ($params['title']) { |
|
150 | 150 | echo '<div class="geodir_list_heading clearfix">'; |
151 | 151 | echo $args['before_title'] . $params['title'] . $args['after_title']; |
152 | 152 | echo '</div>'; |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | * @param array $instance Previously saved values from database. |
192 | 192 | */ |
193 | 193 | public function form($instance) { |
194 | - $instance = wp_parse_args( (array)$instance, |
|
194 | + $instance = wp_parse_args((array) $instance, |
|
195 | 195 | array( |
196 | 196 | 'title' => '', |
197 | 197 | 'post_type' => array(), // NULL for all |
@@ -221,42 +221,42 @@ discard block |
||
221 | 221 | <p> |
222 | 222 | <label for="<?php echo $this->get_field_id('post_type'); ?>"><?php _e('Select CPT:', 'geodirectory'); ?></label> |
223 | 223 | <select name="<?php echo $this->get_field_name('post_type'); ?>[]" id="<?php echo $this->get_field_id('post_type'); ?>" class="widefat" multiple="multiple"> |
224 | - <option value="0" <?php selected( (empty($post_type) || (is_array($post_type) && in_array('0', $post_type))), true ); ?>><?php _e('All', 'geodirectory'); ?></option> |
|
224 | + <option value="0" <?php selected((empty($post_type) || (is_array($post_type) && in_array('0', $post_type))), true); ?>><?php _e('All', 'geodirectory'); ?></option> |
|
225 | 225 | <?php foreach ($post_type_options as $name => $title) { ?> |
226 | - <option value="<?php echo $name;?>" <?php selected( is_array($post_type) && in_array($name, $post_type), true ); ?>><?php echo $title; ?></option> |
|
226 | + <option value="<?php echo $name; ?>" <?php selected(is_array($post_type) && in_array($name, $post_type), true); ?>><?php echo $title; ?></option> |
|
227 | 227 | <?php } ?> |
228 | 228 | </select> |
229 | 229 | </p> |
230 | - <p><input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('hide_empty'); ?>" name="<?php echo $this->get_field_name('hide_empty'); ?>"<?php checked( $hide_empty ); ?> value="1" /> |
|
231 | - <label for="<?php echo $this->get_field_id('hide_empty'); ?>"><?php _e( 'Hide empty categories', 'geodirectory' ); ?></label><br /> |
|
232 | - <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('show_count'); ?>" name="<?php echo $this->get_field_name('show_count'); ?>"<?php checked( $show_count ); ?> value="1" /> |
|
233 | - <label for="<?php echo $this->get_field_id('show_count'); ?>"><?php _e( 'Show category count' ); ?></label> <small><?php _e( '( Enabling will slow down page loading for big directories. )', 'geodirectory' ); ?></small><br /> |
|
234 | - <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('hide_icon'); ?>" name="<?php echo $this->get_field_name('hide_icon'); ?>"<?php checked( $hide_icon ); ?> value="1" /> |
|
235 | - <label for="<?php echo $this->get_field_id('hide_icon'); ?>"><?php _e( 'Hide category icon', 'geodirectory' ); ?></label><br /> |
|
236 | - <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('cpt_left'); ?>" name="<?php echo $this->get_field_name('cpt_left'); ?>"<?php checked( $cpt_left ); ?> value="1" /> |
|
237 | - <label for="<?php echo $this->get_field_id('cpt_left'); ?>"><?php _e( 'Show CPT on same line', 'geodirectory' ); ?></label> |
|
230 | + <p><input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('hide_empty'); ?>" name="<?php echo $this->get_field_name('hide_empty'); ?>"<?php checked($hide_empty); ?> value="1" /> |
|
231 | + <label for="<?php echo $this->get_field_id('hide_empty'); ?>"><?php _e('Hide empty categories', 'geodirectory'); ?></label><br /> |
|
232 | + <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('show_count'); ?>" name="<?php echo $this->get_field_name('show_count'); ?>"<?php checked($show_count); ?> value="1" /> |
|
233 | + <label for="<?php echo $this->get_field_id('show_count'); ?>"><?php _e('Show category count'); ?></label> <small><?php _e('( Enabling will slow down page loading for big directories. )', 'geodirectory'); ?></small><br /> |
|
234 | + <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('hide_icon'); ?>" name="<?php echo $this->get_field_name('hide_icon'); ?>"<?php checked($hide_icon); ?> value="1" /> |
|
235 | + <label for="<?php echo $this->get_field_id('hide_icon'); ?>"><?php _e('Hide category icon', 'geodirectory'); ?></label><br /> |
|
236 | + <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('cpt_left'); ?>" name="<?php echo $this->get_field_name('cpt_left'); ?>"<?php checked($cpt_left); ?> value="1" /> |
|
237 | + <label for="<?php echo $this->get_field_id('cpt_left'); ?>"><?php _e('Show CPT on same line', 'geodirectory'); ?></label> |
|
238 | 238 | <p> |
239 | 239 | <label for="<?php echo $this->get_field_id('sort_by'); ?>"><?php _e('Sort by:', 'geodirectory'); ?></label> |
240 | 240 | <select name="<?php echo $this->get_field_name('sort_by'); ?>" id="<?php echo $this->get_field_id('sort_by'); ?>" class="widefat"> |
241 | - <option value="az" <?php selected( $sort_by, 'az' ); ?>><?php _e('A-Z', 'geodirectory'); ?></option> |
|
242 | - <option value="count" <?php selected( $sort_by, 'count' ); ?>><?php _e('Count', 'geodirectory'); ?></option> |
|
241 | + <option value="az" <?php selected($sort_by, 'az'); ?>><?php _e('A-Z', 'geodirectory'); ?></option> |
|
242 | + <option value="count" <?php selected($sort_by, 'count'); ?>><?php _e('Count', 'geodirectory'); ?></option> |
|
243 | 243 | </select> |
244 | 244 | </p> |
245 | 245 | <p> |
246 | 246 | <label for="<?php echo $this->get_field_id('max_count'); ?>"><?php _e('Max no of sub-categories:', 'geodirectory'); ?></label> |
247 | 247 | <select name="<?php echo $this->get_field_name('max_count'); ?>" id="<?php echo $this->get_field_id('max_count'); ?>" class="widefat"> |
248 | - <option value="all" <?php selected( $max_count, 'all' ); ?>><?php _e('All', 'geodirectory'); ?></option> |
|
248 | + <option value="all" <?php selected($max_count, 'all'); ?>><?php _e('All', 'geodirectory'); ?></option> |
|
249 | 249 | <?php for ($n = 10; $n >= 0; $n--) { ?> |
250 | - <option value="<?php echo $n;?>" <?php selected( $max_count, $n ); ?>><?php echo $n; ?></option> |
|
250 | + <option value="<?php echo $n; ?>" <?php selected($max_count, $n); ?>><?php echo $n; ?></option> |
|
251 | 251 | <?php } ?> |
252 | 252 | </select> |
253 | 253 | </p> |
254 | 254 | <p> |
255 | 255 | <label for="<?php echo $this->get_field_id('max_level'); ?>"><?php _e('Show max sub-categories depth:', 'geodirectory'); ?></label> |
256 | 256 | <select name="<?php echo $this->get_field_name('max_level'); ?>" id="<?php echo $this->get_field_id('max_level'); ?>" class="widefat"> |
257 | - <option value="all" <?php selected( $max_level, 'all' ); ?>><?php _e('All', 'geodirectory'); ?></option> |
|
257 | + <option value="all" <?php selected($max_level, 'all'); ?>><?php _e('All', 'geodirectory'); ?></option> |
|
258 | 258 | <?php for ($n = 0; $n <= 10; $n++) { ?> |
259 | - <option value="<?php echo $n;?>" <?php selected( $max_level, $n ); ?>><?php echo $n; ?></option> |
|
259 | + <option value="<?php echo $n; ?>" <?php selected($max_level, $n); ?>><?php echo $n; ?></option> |
|
260 | 260 | <?php } ?> |
261 | 261 | </select> |
262 | 262 | </p> |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | * @return string CPT categories content. |
276 | 276 | */ |
277 | 277 | function geodir_cpt_categories_output($params) { |
278 | - $args = wp_parse_args((array)$params, |
|
278 | + $args = wp_parse_args((array) $params, |
|
279 | 279 | array( |
280 | 280 | 'title' => '', |
281 | 281 | 'post_type' => array(), // NULL for all |
@@ -345,15 +345,15 @@ discard block |
||
345 | 345 | $hide_empty = !empty($args['hide_empty']) ? true : false; |
346 | 346 | $max_count = strip_tags($args['max_count']); |
347 | 347 | $all_childs = $max_count == 'all' ? true : false; |
348 | - $max_count = $max_count > 0 ? (int)$max_count : 0; |
|
348 | + $max_count = $max_count > 0 ? (int) $max_count : 0; |
|
349 | 349 | $max_level = strip_tags($args['max_level']); |
350 | 350 | $show_count = !empty($args['show_count']) ? true : false; |
351 | 351 | $hide_icon = !empty($args['hide_icon']) ? true : false; |
352 | 352 | $cpt_left = !empty($args['cpt_left']) ? true : false; |
353 | 353 | |
354 | - if(!$cpt_left){ |
|
354 | + if (!$cpt_left) { |
|
355 | 355 | $cpt_left = "gd-cpt-flat"; |
356 | - }else{ |
|
356 | + } else { |
|
357 | 357 | $cpt_left = ''; |
358 | 358 | } |
359 | 359 | |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | if ($is_listing) { |
384 | 384 | $row_class = $is_category ? ' gd-cptcat-categ' : ' gd-cptcat-listing'; |
385 | 385 | } |
386 | - $cpt_row = '<div class="gd-cptcat-row gd-cptcat-' . $cpt . $row_class . ' '.$cpt_left.'">'; |
|
386 | + $cpt_row = '<div class="gd-cptcat-row gd-cptcat-' . $cpt . $row_class . ' ' . $cpt_left . '">'; |
|
387 | 387 | |
388 | 388 | if ($is_category) { |
389 | 389 | $term_info = get_term($current_term_id, $cat_taxonomy); |
@@ -400,15 +400,15 @@ discard block |
||
400 | 400 | $term_icon_url = !empty($term_icons) && isset($term_icons[$category->term_id]) ? $term_icons[$category->term_id] : ''; |
401 | 401 | $term_icon_url = $term_icon_url != '' ? '<img alt="' . esc_attr($category->name) . ' icon" src="' . $term_icon_url . '" /> ' : ''; |
402 | 402 | |
403 | - $term_link = get_term_link( $category, $category->taxonomy ); |
|
403 | + $term_link = get_term_link($category, $category->taxonomy); |
|
404 | 404 | /** Filter documented in geodirectory-functions/general_functions.php **/ |
405 | - $term_link = apply_filters( 'geodir_category_term_link', $term_link, $category->term_id, $cpt ); |
|
405 | + $term_link = apply_filters('geodir_category_term_link', $term_link, $category->term_id, $cpt); |
|
406 | 406 | |
407 | - $cpt_row .= '<ul class="gd-cptcat-ul gd-cptcat-parent '.$cpt_left.'">'; |
|
407 | + $cpt_row .= '<ul class="gd-cptcat-ul gd-cptcat-parent ' . $cpt_left . '">'; |
|
408 | 408 | $cpt_row .= '<li class="gd-cptcat-li gd-cptcat-li-main">'; |
409 | 409 | $count = $show_count ? ' <span class="gd-cptcat-count">(' . $category->count . ')</span>' : ''; |
410 | - $cpt_row .= '<h3 class="gd-cptcat-cat"><a href="' . esc_url($term_link) . '" title="' . esc_attr($category->name) . '">' .$term_icon_url . $category->name . $count . '</a></h3>'; |
|
411 | - if (($all_childs || $max_count > 0) && ($max_level == 'all' || (int)$max_level > 0)) { |
|
410 | + $cpt_row .= '<h3 class="gd-cptcat-cat"><a href="' . esc_url($term_link) . '" title="' . esc_attr($category->name) . '">' . $term_icon_url . $category->name . $count . '</a></h3>'; |
|
411 | + if (($all_childs || $max_count > 0) && ($max_level == 'all' || (int) $max_level > 0)) { |
|
412 | 412 | $cpt_row .= geodir_cpt_categories_child_cats($category->term_id, $cpt, $hide_empty, $show_count, $sort_by, $max_count, $max_level, $term_icons); |
413 | 413 | } |
414 | 414 | $cpt_row .= '</li>'; |
@@ -449,7 +449,7 @@ discard block |
||
449 | 449 | $order = 'ASC'; |
450 | 450 | } |
451 | 451 | |
452 | - if ($max_level != 'all' && $depth > (int)$max_level ) { |
|
452 | + if ($max_level != 'all' && $depth > (int) $max_level) { |
|
453 | 453 | return ''; |
454 | 454 | } |
455 | 455 | |
@@ -471,9 +471,9 @@ discard block |
||
471 | 471 | foreach ($child_cats as $category) { |
472 | 472 | $term_icon_url = !empty($term_icons) && isset($term_icons[$category->term_id]) ? $term_icons[$category->term_id] : ''; |
473 | 473 | $term_icon_url = $term_icon_url != '' ? '<img alt="' . esc_attr($category->name) . ' icon" src="' . $term_icon_url . '" /> ' : ''; |
474 | - $term_link = get_term_link( $category, $category->taxonomy ); |
|
474 | + $term_link = get_term_link($category, $category->taxonomy); |
|
475 | 475 | /** Filter documented in geodirectory-functions/general_functions.php **/ |
476 | - $term_link = apply_filters( 'geodir_category_term_link', $term_link, $category->term_id, $cpt ); |
|
476 | + $term_link = apply_filters('geodir_category_term_link', $term_link, $category->term_id, $cpt); |
|
477 | 477 | $count = $show_count ? ' <span class="gd-cptcat-count">(' . $category->count . ')</span>' : ''; |
478 | 478 | |
479 | 479 | $content .= '<li class="gd-cptcat-li gd-cptcat-li-sub">'; |
@@ -353,7 +353,7 @@ |
||
353 | 353 | |
354 | 354 | if(!$cpt_left){ |
355 | 355 | $cpt_left = "gd-cpt-flat"; |
356 | - }else{ |
|
356 | + } else{ |
|
357 | 357 | $cpt_left = ''; |
358 | 358 | } |
359 | 359 |
@@ -7,10 +7,10 @@ discard block |
||
7 | 7 | */ |
8 | 8 | function __construct() { |
9 | 9 | $widget_ops = array( |
10 | - 'description' => __( 'Displays "GD Features" widget', 'geodirectory' ), |
|
10 | + 'description' => __('Displays "GD Features" widget', 'geodirectory'), |
|
11 | 11 | 'classname' => 'widget_gd_features', |
12 | 12 | ); |
13 | - parent::__construct( false, $name = _x( 'GD > Features', 'widget name', 'geodirectory' ), $widget_ops ); |
|
13 | + parent::__construct(false, $name = _x('GD > Features', 'widget name', 'geodirectory'), $widget_ops); |
|
14 | 14 | |
15 | 15 | } |
16 | 16 | |
@@ -20,8 +20,8 @@ discard block |
||
20 | 20 | * @param array $args Widget arguments. |
21 | 21 | * @param array $instance The widget settings, as saved by the user. |
22 | 22 | */ |
23 | - function widget( $args, $instance ) { |
|
24 | - extract( $args ); |
|
23 | + function widget($args, $instance) { |
|
24 | + extract($args); |
|
25 | 25 | |
26 | 26 | $title = empty($instance['title']) ? '' : apply_filters('gd_features_widget_title', __($instance['title'], 'geodirectory')); |
27 | 27 | $icon_color = $instance['icon_color']; |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | function form($instance) |
300 | 300 | { |
301 | 301 | //widgetform in backend |
302 | - $instance = wp_parse_args((array)$instance, array( |
|
302 | + $instance = wp_parse_args((array) $instance, array( |
|
303 | 303 | 'title' => '', |
304 | 304 | 'icon_color' => '#757575', |
305 | 305 | 'title1' => '', |
@@ -400,183 +400,183 @@ discard block |
||
400 | 400 | </p> |
401 | 401 | |
402 | 402 | <p class="features-title"> |
403 | - <label><?php echo __( 'Title 1:', 'geodirectory' ); ?></label> |
|
404 | - <input name="<?php echo $this->get_field_name( 'title1' ); ?>" type="text" value="<?php echo esc_attr($title1); ?>" class="widefat" /> |
|
403 | + <label><?php echo __('Title 1:', 'geodirectory'); ?></label> |
|
404 | + <input name="<?php echo $this->get_field_name('title1'); ?>" type="text" value="<?php echo esc_attr($title1); ?>" class="widefat" /> |
|
405 | 405 | </p> |
406 | 406 | |
407 | 407 | <p class="features-image"> |
408 | - <label><?php echo __( 'Image URL:', 'geodirectory' ); ?></label> |
|
409 | - <input type="text" class="widefat" name="<?php echo $this->get_field_name( 'image1' ); ?>" value="<?php echo esc_attr($image1); ?>" /> |
|
408 | + <label><?php echo __('Image URL:', 'geodirectory'); ?></label> |
|
409 | + <input type="text" class="widefat" name="<?php echo $this->get_field_name('image1'); ?>" value="<?php echo esc_attr($image1); ?>" /> |
|
410 | 410 | </p> |
411 | 411 | |
412 | 412 | <p class="features-desc"> |
413 | - <label><?php echo __( 'Description:', 'geodirectory' ); ?></label> |
|
414 | - <textarea name="<?php echo $this->get_field_name( 'desc1' ); ?>" rows="3" class="widefat"><?php echo esc_attr($desc1); ?></textarea> |
|
413 | + <label><?php echo __('Description:', 'geodirectory'); ?></label> |
|
414 | + <textarea name="<?php echo $this->get_field_name('desc1'); ?>" rows="3" class="widefat"><?php echo esc_attr($desc1); ?></textarea> |
|
415 | 415 | </p> |
416 | 416 | |
417 | 417 | <p class="features-title"> |
418 | - <label><?php echo __( 'Title 2:', 'geodirectory' ); ?></label> |
|
419 | - <input name="<?php echo $this->get_field_name( 'title2' ); ?>" type="text" value="<?php echo esc_attr($title2); ?>" class="widefat" /> |
|
418 | + <label><?php echo __('Title 2:', 'geodirectory'); ?></label> |
|
419 | + <input name="<?php echo $this->get_field_name('title2'); ?>" type="text" value="<?php echo esc_attr($title2); ?>" class="widefat" /> |
|
420 | 420 | </p> |
421 | 421 | |
422 | 422 | <p class="features-image"> |
423 | - <label><?php echo __( 'Image URL:', 'geodirectory' ); ?></label> |
|
424 | - <input type="text" class="widefat" name="<?php echo $this->get_field_name( 'image2' ); ?>" value="<?php echo esc_attr($image2); ?>" /> |
|
423 | + <label><?php echo __('Image URL:', 'geodirectory'); ?></label> |
|
424 | + <input type="text" class="widefat" name="<?php echo $this->get_field_name('image2'); ?>" value="<?php echo esc_attr($image2); ?>" /> |
|
425 | 425 | </p> |
426 | 426 | |
427 | 427 | <p class="features-desc"> |
428 | - <label><?php echo __( 'Description:', 'geodirectory' ); ?></label> |
|
429 | - <textarea name="<?php echo $this->get_field_name( 'desc2' ); ?>" rows="3" class="widefat"><?php echo esc_attr($desc2); ?></textarea> |
|
428 | + <label><?php echo __('Description:', 'geodirectory'); ?></label> |
|
429 | + <textarea name="<?php echo $this->get_field_name('desc2'); ?>" rows="3" class="widefat"><?php echo esc_attr($desc2); ?></textarea> |
|
430 | 430 | </p> |
431 | 431 | |
432 | 432 | <p class="features-title"> |
433 | - <label><?php echo __( 'Title 3:', 'geodirectory' ); ?></label> |
|
434 | - <input name="<?php echo $this->get_field_name( 'title3' ); ?>" type="text" value="<?php echo esc_attr($title3); ?>" class="widefat" /> |
|
433 | + <label><?php echo __('Title 3:', 'geodirectory'); ?></label> |
|
434 | + <input name="<?php echo $this->get_field_name('title3'); ?>" type="text" value="<?php echo esc_attr($title3); ?>" class="widefat" /> |
|
435 | 435 | </p> |
436 | 436 | |
437 | 437 | <p class="features-image"> |
438 | - <label><?php echo __( 'Image URL:', 'geodirectory' ); ?></label> |
|
439 | - <input type="text" class="widefat" name="<?php echo $this->get_field_name( 'image3' ); ?>" value="<?php echo esc_attr($image3); ?>" /> |
|
438 | + <label><?php echo __('Image URL:', 'geodirectory'); ?></label> |
|
439 | + <input type="text" class="widefat" name="<?php echo $this->get_field_name('image3'); ?>" value="<?php echo esc_attr($image3); ?>" /> |
|
440 | 440 | </p> |
441 | 441 | |
442 | 442 | <p class="features-desc"> |
443 | - <label><?php echo __( 'Description:', 'geodirectory' ); ?></label> |
|
444 | - <textarea name="<?php echo $this->get_field_name( 'desc3' ); ?>" rows="3" class="widefat"><?php echo esc_attr($desc3); ?></textarea> |
|
443 | + <label><?php echo __('Description:', 'geodirectory'); ?></label> |
|
444 | + <textarea name="<?php echo $this->get_field_name('desc3'); ?>" rows="3" class="widefat"><?php echo esc_attr($desc3); ?></textarea> |
|
445 | 445 | </p> |
446 | 446 | |
447 | 447 | <p class="features-title"> |
448 | - <label><?php echo __( 'Title 4:', 'geodirectory' ); ?></label> |
|
449 | - <input name="<?php echo $this->get_field_name( 'title4' ); ?>" type="text" value="<?php echo esc_attr($title4); ?>" class="widefat" /> |
|
448 | + <label><?php echo __('Title 4:', 'geodirectory'); ?></label> |
|
449 | + <input name="<?php echo $this->get_field_name('title4'); ?>" type="text" value="<?php echo esc_attr($title4); ?>" class="widefat" /> |
|
450 | 450 | </p> |
451 | 451 | |
452 | 452 | <p class="features-image"> |
453 | - <label><?php echo __( 'Image URL:', 'geodirectory' ); ?></label> |
|
454 | - <input type="text" class="widefat" name="<?php echo $this->get_field_name( 'image4' ); ?>" value="<?php echo esc_attr($image4); ?>" /> |
|
453 | + <label><?php echo __('Image URL:', 'geodirectory'); ?></label> |
|
454 | + <input type="text" class="widefat" name="<?php echo $this->get_field_name('image4'); ?>" value="<?php echo esc_attr($image4); ?>" /> |
|
455 | 455 | </p> |
456 | 456 | |
457 | 457 | <p class="features-desc"> |
458 | - <label><?php echo __( 'Description:', 'geodirectory' ); ?></label> |
|
459 | - <textarea name="<?php echo $this->get_field_name( 'desc4' ); ?>" rows="3" class="widefat"><?php echo esc_attr($desc4); ?></textarea> |
|
458 | + <label><?php echo __('Description:', 'geodirectory'); ?></label> |
|
459 | + <textarea name="<?php echo $this->get_field_name('desc4'); ?>" rows="3" class="widefat"><?php echo esc_attr($desc4); ?></textarea> |
|
460 | 460 | </p> |
461 | 461 | |
462 | 462 | <p class="features-title"> |
463 | - <label><?php echo __( 'Title 5:', 'geodirectory' ); ?></label> |
|
464 | - <input name="<?php echo $this->get_field_name( 'title5' ); ?>" type="text" value="<?php echo esc_attr($title5); ?>" class="widefat" /> |
|
463 | + <label><?php echo __('Title 5:', 'geodirectory'); ?></label> |
|
464 | + <input name="<?php echo $this->get_field_name('title5'); ?>" type="text" value="<?php echo esc_attr($title5); ?>" class="widefat" /> |
|
465 | 465 | </p> |
466 | 466 | |
467 | 467 | <p class="features-image"> |
468 | - <label><?php echo __( 'Image URL:', 'geodirectory' ); ?></label> |
|
469 | - <input type="text" class="widefat" name="<?php echo $this->get_field_name( 'image5' ); ?>" value="<?php echo esc_attr($image5); ?>" /> |
|
468 | + <label><?php echo __('Image URL:', 'geodirectory'); ?></label> |
|
469 | + <input type="text" class="widefat" name="<?php echo $this->get_field_name('image5'); ?>" value="<?php echo esc_attr($image5); ?>" /> |
|
470 | 470 | </p> |
471 | 471 | |
472 | 472 | <p class="features-desc"> |
473 | - <label><?php echo __( 'Description:', 'geodirectory' ); ?></label> |
|
474 | - <textarea name="<?php echo $this->get_field_name( 'desc5' ); ?>" rows="3" class="widefat"><?php echo esc_attr($desc5); ?></textarea> |
|
473 | + <label><?php echo __('Description:', 'geodirectory'); ?></label> |
|
474 | + <textarea name="<?php echo $this->get_field_name('desc5'); ?>" rows="3" class="widefat"><?php echo esc_attr($desc5); ?></textarea> |
|
475 | 475 | </p> |
476 | 476 | |
477 | 477 | <p class="features-title"> |
478 | - <label><?php echo __( 'Title 6:', 'geodirectory' ); ?></label> |
|
479 | - <input name="<?php echo $this->get_field_name( 'title6' ); ?>" type="text" value="<?php echo esc_attr($title6); ?>" class="widefat" /> |
|
478 | + <label><?php echo __('Title 6:', 'geodirectory'); ?></label> |
|
479 | + <input name="<?php echo $this->get_field_name('title6'); ?>" type="text" value="<?php echo esc_attr($title6); ?>" class="widefat" /> |
|
480 | 480 | </p> |
481 | 481 | |
482 | 482 | <p class="features-image"> |
483 | - <label><?php echo __( 'Image URL:', 'geodirectory' ); ?></label> |
|
484 | - <input type="text" class="widefat" name="<?php echo $this->get_field_name( 'image6' ); ?>" value="<?php echo esc_attr($image6); ?>" /> |
|
483 | + <label><?php echo __('Image URL:', 'geodirectory'); ?></label> |
|
484 | + <input type="text" class="widefat" name="<?php echo $this->get_field_name('image6'); ?>" value="<?php echo esc_attr($image6); ?>" /> |
|
485 | 485 | </p> |
486 | 486 | |
487 | 487 | <p class="features-desc"> |
488 | - <label><?php echo __( 'Description:', 'geodirectory' ); ?></label> |
|
489 | - <textarea name="<?php echo $this->get_field_name( 'desc6' ); ?>" rows="3" class="widefat"><?php echo esc_attr($desc6); ?></textarea> |
|
488 | + <label><?php echo __('Description:', 'geodirectory'); ?></label> |
|
489 | + <textarea name="<?php echo $this->get_field_name('desc6'); ?>" rows="3" class="widefat"><?php echo esc_attr($desc6); ?></textarea> |
|
490 | 490 | </p> |
491 | 491 | |
492 | 492 | <p class="features-title"> |
493 | - <label><?php echo __( 'Title 7:', 'geodirectory' ); ?></label> |
|
494 | - <input name="<?php echo $this->get_field_name( 'title7' ); ?>" type="text" value="<?php echo esc_attr($title7); ?>" class="widefat" /> |
|
493 | + <label><?php echo __('Title 7:', 'geodirectory'); ?></label> |
|
494 | + <input name="<?php echo $this->get_field_name('title7'); ?>" type="text" value="<?php echo esc_attr($title7); ?>" class="widefat" /> |
|
495 | 495 | </p> |
496 | 496 | |
497 | 497 | <p class="features-image"> |
498 | - <label><?php echo __( 'Image URL:', 'geodirectory' ); ?></label> |
|
499 | - <input type="text" class="widefat" name="<?php echo $this->get_field_name( 'image7' ); ?>" value="<?php echo esc_attr($image7); ?>" /> |
|
498 | + <label><?php echo __('Image URL:', 'geodirectory'); ?></label> |
|
499 | + <input type="text" class="widefat" name="<?php echo $this->get_field_name('image7'); ?>" value="<?php echo esc_attr($image7); ?>" /> |
|
500 | 500 | </p> |
501 | 501 | |
502 | 502 | <p class="features-desc"> |
503 | - <label><?php echo __( 'Description:', 'geodirectory' ); ?></label> |
|
504 | - <textarea name="<?php echo $this->get_field_name( 'desc7' ); ?>" rows="3" class="widefat"><?php echo esc_attr($desc7); ?></textarea> |
|
503 | + <label><?php echo __('Description:', 'geodirectory'); ?></label> |
|
504 | + <textarea name="<?php echo $this->get_field_name('desc7'); ?>" rows="3" class="widefat"><?php echo esc_attr($desc7); ?></textarea> |
|
505 | 505 | </p> |
506 | 506 | |
507 | 507 | <p class="features-title"> |
508 | - <label><?php echo __( 'Title 8:', 'geodirectory' ); ?></label> |
|
509 | - <input name="<?php echo $this->get_field_name( 'title8' ); ?>" type="text" value="<?php echo esc_attr($title8); ?>" class="widefat" /> |
|
508 | + <label><?php echo __('Title 8:', 'geodirectory'); ?></label> |
|
509 | + <input name="<?php echo $this->get_field_name('title8'); ?>" type="text" value="<?php echo esc_attr($title8); ?>" class="widefat" /> |
|
510 | 510 | </p> |
511 | 511 | |
512 | 512 | <p class="features-image"> |
513 | - <label><?php echo __( 'Image URL:', 'geodirectory' ); ?></label> |
|
514 | - <input type="text" class="widefat" name="<?php echo $this->get_field_name( 'image8' ); ?>" value="<?php echo esc_attr($image8); ?>" /> |
|
513 | + <label><?php echo __('Image URL:', 'geodirectory'); ?></label> |
|
514 | + <input type="text" class="widefat" name="<?php echo $this->get_field_name('image8'); ?>" value="<?php echo esc_attr($image8); ?>" /> |
|
515 | 515 | </p> |
516 | 516 | |
517 | 517 | <p class="features-desc"> |
518 | - <label><?php echo __( 'Description:', 'geodirectory' ); ?></label> |
|
519 | - <textarea name="<?php echo $this->get_field_name( 'desc8' ); ?>" rows="3" class="widefat"><?php echo esc_attr($desc8); ?></textarea> |
|
518 | + <label><?php echo __('Description:', 'geodirectory'); ?></label> |
|
519 | + <textarea name="<?php echo $this->get_field_name('desc8'); ?>" rows="3" class="widefat"><?php echo esc_attr($desc8); ?></textarea> |
|
520 | 520 | </p> |
521 | 521 | |
522 | 522 | <p class="features-title"> |
523 | - <label><?php echo __( 'Title 9:', 'geodirectory' ); ?></label> |
|
524 | - <input name="<?php echo $this->get_field_name( 'title9' ); ?>" type="text" value="<?php echo esc_attr($title9); ?>" class="widefat" /> |
|
523 | + <label><?php echo __('Title 9:', 'geodirectory'); ?></label> |
|
524 | + <input name="<?php echo $this->get_field_name('title9'); ?>" type="text" value="<?php echo esc_attr($title9); ?>" class="widefat" /> |
|
525 | 525 | </p> |
526 | 526 | |
527 | 527 | <p class="features-image"> |
528 | - <label><?php echo __( 'Image URL:', 'geodirectory' ); ?></label> |
|
529 | - <input type="text" class="widefat" name="<?php echo $this->get_field_name( 'image9' ); ?>" value="<?php echo esc_attr($image9); ?>" /> |
|
528 | + <label><?php echo __('Image URL:', 'geodirectory'); ?></label> |
|
529 | + <input type="text" class="widefat" name="<?php echo $this->get_field_name('image9'); ?>" value="<?php echo esc_attr($image9); ?>" /> |
|
530 | 530 | </p> |
531 | 531 | |
532 | 532 | <p class="features-desc"> |
533 | - <label><?php echo __( 'Description:', 'geodirectory' ); ?></label> |
|
534 | - <textarea name="<?php echo $this->get_field_name( 'desc9' ); ?>" rows="3" class="widefat"><?php echo esc_attr($desc9); ?></textarea> |
|
533 | + <label><?php echo __('Description:', 'geodirectory'); ?></label> |
|
534 | + <textarea name="<?php echo $this->get_field_name('desc9'); ?>" rows="3" class="widefat"><?php echo esc_attr($desc9); ?></textarea> |
|
535 | 535 | </p> |
536 | 536 | |
537 | 537 | <p class="features-title"> |
538 | - <label><?php echo __( 'Title 10:', 'geodirectory' ); ?></label> |
|
539 | - <input name="<?php echo $this->get_field_name( 'title10' ); ?>" type="text" value="<?php echo esc_attr($title10); ?>" class="widefat" /> |
|
538 | + <label><?php echo __('Title 10:', 'geodirectory'); ?></label> |
|
539 | + <input name="<?php echo $this->get_field_name('title10'); ?>" type="text" value="<?php echo esc_attr($title10); ?>" class="widefat" /> |
|
540 | 540 | </p> |
541 | 541 | |
542 | 542 | <p class="features-image"> |
543 | - <label><?php echo __( 'Image URL:', 'geodirectory' ); ?></label> |
|
544 | - <input type="text" class="widefat" name="<?php echo $this->get_field_name( 'image10' ); ?>" value="<?php echo esc_attr($image10); ?>" /> |
|
543 | + <label><?php echo __('Image URL:', 'geodirectory'); ?></label> |
|
544 | + <input type="text" class="widefat" name="<?php echo $this->get_field_name('image10'); ?>" value="<?php echo esc_attr($image10); ?>" /> |
|
545 | 545 | </p> |
546 | 546 | |
547 | 547 | <p class="features-desc"> |
548 | - <label><?php echo __( 'Description:', 'geodirectory' ); ?></label> |
|
549 | - <textarea name="<?php echo $this->get_field_name( 'desc10' ); ?>" rows="3" class="widefat"><?php echo esc_attr($desc10); ?></textarea> |
|
548 | + <label><?php echo __('Description:', 'geodirectory'); ?></label> |
|
549 | + <textarea name="<?php echo $this->get_field_name('desc10'); ?>" rows="3" class="widefat"><?php echo esc_attr($desc10); ?></textarea> |
|
550 | 550 | </p> |
551 | 551 | |
552 | 552 | <p class="features-title"> |
553 | - <label><?php echo __( 'Title 11:', 'geodirectory' ); ?></label> |
|
554 | - <input name="<?php echo $this->get_field_name( 'title11' ); ?>" type="text" value="<?php echo esc_attr($title11); ?>" class="widefat" /> |
|
553 | + <label><?php echo __('Title 11:', 'geodirectory'); ?></label> |
|
554 | + <input name="<?php echo $this->get_field_name('title11'); ?>" type="text" value="<?php echo esc_attr($title11); ?>" class="widefat" /> |
|
555 | 555 | </p> |
556 | 556 | |
557 | 557 | <p class="features-image"> |
558 | - <label><?php echo __( 'Image URL:', 'geodirectory' ); ?></label> |
|
559 | - <input type="text" class="widefat" name="<?php echo $this->get_field_name( 'image11' ); ?>" value="<?php echo esc_attr($image11); ?>" /> |
|
558 | + <label><?php echo __('Image URL:', 'geodirectory'); ?></label> |
|
559 | + <input type="text" class="widefat" name="<?php echo $this->get_field_name('image11'); ?>" value="<?php echo esc_attr($image11); ?>" /> |
|
560 | 560 | </p> |
561 | 561 | |
562 | 562 | <p class="features-desc"> |
563 | - <label><?php echo __( 'Description:', 'geodirectory' ); ?></label> |
|
564 | - <textarea name="<?php echo $this->get_field_name( 'desc11' ); ?>" rows="3" class="widefat"><?php echo esc_attr($desc11); ?></textarea> |
|
563 | + <label><?php echo __('Description:', 'geodirectory'); ?></label> |
|
564 | + <textarea name="<?php echo $this->get_field_name('desc11'); ?>" rows="3" class="widefat"><?php echo esc_attr($desc11); ?></textarea> |
|
565 | 565 | </p> |
566 | 566 | |
567 | 567 | <p class="features-title"> |
568 | - <label><?php echo __( 'Title 12:', 'geodirectory' ); ?></label> |
|
569 | - <input name="<?php echo $this->get_field_name( 'title12' ); ?>" type="text" value="<?php echo esc_attr($title12); ?>" class="widefat" /> |
|
568 | + <label><?php echo __('Title 12:', 'geodirectory'); ?></label> |
|
569 | + <input name="<?php echo $this->get_field_name('title12'); ?>" type="text" value="<?php echo esc_attr($title12); ?>" class="widefat" /> |
|
570 | 570 | </p> |
571 | 571 | |
572 | 572 | <p class="features-image"> |
573 | - <label><?php echo __( 'Image URL:', 'geodirectory' ); ?></label> |
|
574 | - <input type="text" class="widefat" name="<?php echo $this->get_field_name( 'image12' ); ?>" value="<?php echo esc_attr($image12); ?>" /> |
|
573 | + <label><?php echo __('Image URL:', 'geodirectory'); ?></label> |
|
574 | + <input type="text" class="widefat" name="<?php echo $this->get_field_name('image12'); ?>" value="<?php echo esc_attr($image12); ?>" /> |
|
575 | 575 | </p> |
576 | 576 | |
577 | 577 | <p class="features-desc"> |
578 | - <label><?php echo __( 'Description:', 'geodirectory' ); ?></label> |
|
579 | - <textarea name="<?php echo $this->get_field_name( 'desc12' ); ?>" rows="3" class="widefat"><?php echo esc_attr($desc12); ?></textarea> |
|
578 | + <label><?php echo __('Description:', 'geodirectory'); ?></label> |
|
579 | + <textarea name="<?php echo $this->get_field_name('desc12'); ?>" rows="3" class="widefat"><?php echo esc_attr($desc12); ?></textarea> |
|
580 | 580 | </p> |
581 | 581 | <?php |
582 | 582 | } |
@@ -584,13 +584,13 @@ discard block |
||
584 | 584 | } |
585 | 585 | register_widget("Geodir_Features_Widget"); |
586 | 586 | function gd_features_parse_image($image, $icon_color) { |
587 | - if (substr( $image, 0, 4 ) === "http") { |
|
588 | - $image = '<img src="'.$image.'" />'; |
|
589 | - } elseif (substr( $image, 0, 3 ) === "fa-") { |
|
587 | + if (substr($image, 0, 4) === "http") { |
|
588 | + $image = '<img src="' . $image . '" />'; |
|
589 | + } elseif (substr($image, 0, 3) === "fa-") { |
|
590 | 590 | if (empty($icon_color)) { |
591 | 591 | $icon_color = '#757575'; |
592 | 592 | } |
593 | - $image = '<i style="color:'.$icon_color.'" class="fa '.$image.'"></i>'; |
|
593 | + $image = '<i style="color:' . $icon_color . '" class="fa ' . $image . '"></i>'; |
|
594 | 594 | } |
595 | 595 | return $image; |
596 | 596 | } |