@@ -1,13 +1,13 @@ |
||
| 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 | - */ |
|
| 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 | + */ |
|
| 11 | 11 | |
| 12 | 12 | // call header |
| 13 | 13 | get_header(); |
@@ -64,10 +64,10 @@ |
||
| 64 | 64 | <div class="form_row clearfix"> |
| 65 | 65 | <input placeholder='<?php echo USERNAME_TEXT; ?>' type="text" name="log" id="user_login" |
| 66 | 66 | value="<?php global $user_login; |
| 67 | - if (!isset($user_login)) {
|
|
| 68 | - $user_login = ''; |
|
| 69 | - } |
|
| 70 | - echo esc_attr($user_login); ?>" size="20" class="textfield"/> |
|
| 67 | + if (!isset($user_login)) {
|
|
| 68 | + $user_login = ''; |
|
| 69 | + } |
|
| 70 | + echo esc_attr($user_login); ?>" size="20" class="textfield"/> |
|
| 71 | 71 | <span class="user_loginInfo"></span> |
| 72 | 72 | </div> |
| 73 | 73 | |
@@ -54,8 +54,9 @@ |
||
| 54 | 54 | echo "<p class=\"error_msg\"> " . INVALID_USER_PW_MSG . " </p>"; |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | - if (isset($_REQUEST['checkemail']) && $_REQUEST['checkemail'] == 'confirm') |
|
| 58 | - echo '<p class="sucess_msg">' . PW_SEND_CONFIRM_MSG . '</p>'; |
|
| 57 | + if (isset($_REQUEST['checkemail']) && $_REQUEST['checkemail'] == 'confirm') { |
|
| 58 | + echo '<p class="sucess_msg">' . PW_SEND_CONFIRM_MSG . '</p>'; |
|
| 59 | + } |
|
| 59 | 60 | |
| 60 | 61 | ?> |
| 61 | 62 | <form name="cus_loginform" id="cus_loginform" action="<?php echo esc_url(geodir_curPageURL()); ?>" |
@@ -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(); |
@@ -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> |