Changeset 2725864
- Timestamp:
- 05/18/2022 08:04:03 AM (4 years ago)
- Location:
- likebtn-like-button/tags/2.6.45
- Files:
-
- 9 edited
-
includes/likebtn_like_button_most_liked_widget.class.php (modified) (3 diffs)
-
includes/likebtn_mycred.class.php (modified) (2 diffs)
-
includes/tab_buttons.php (modified) (19 diffs)
-
includes/tab_votes.php (modified) (8 diffs)
-
includes/um.php (modified) (1 diff)
-
likebtn_like_button.php (modified) (5 diffs)
-
templates/admin_mail.php (modified) (2 diffs)
-
templates/liked-by-user-widget.php (modified) (1 diff)
-
templates/most-liked-widget.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
likebtn-like-button/tags/2.6.45/includes/likebtn_like_button_most_liked_widget.class.php
r2724991 r2725864 153 153 <?php endif ?> 154 154 <p> 155 <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title', 'likebtn-like-button'); ?>:</label>156 <input class="widefat" type="text" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo $instance['title']; ?>" data-property="title" />157 </p> 158 <p> 159 <label for="<?php echo $this->get_field_id('entity_name'); ?>"><?php _e('Items to show', 'likebtn-like-button'); ?>:</label><br/>155 <label for="<?php echo esc_attr($this->get_field_id('title')); ?>"><?php _e('Title', 'likebtn-like-button'); ?>:</label> 156 <input class="widefat" type="text" id="<?php echo esc_attr($this->get_field_id('title')); ?>" name="<?php echo esc_attr($this->get_field_name('title')); ?>" value="<?php echo esc_attr($instance['title']); ?>" data-property="title" /> 157 </p> 158 <p> 159 <label for="<?php echo esc_attr($this->get_field_id('entity_name')); ?>"><?php _e('Items to show', 'likebtn-like-button'); ?>:</label><br/> 160 160 161 161 <?php foreach ($likebtn_entities as $entity_name_value => $entity_title): ?> 162 <input type="checkbox" name="<?php echo $this->get_field_name('entity_name'); ?>[]" id="<?php echo $this->get_field_id('entity_name'); ?>_<?php echo $entity_name_value ?>" value="<?php echo $entity_name_value; ?>" <?php echo (in_array($entity_name_value, $instance['entity_name']) ? 'checked="checked"' : ''); ?> data-property="entity_name" /> <label for="<?php echo $this->get_field_id('entity_name'); ?>_<?php echo $entity_name_value ?>"><?php_e($entity_title, 'likebtn-like-button'); ?></label><br/>162 <input type="checkbox" name="<?php echo esc_attr($this->get_field_name('entity_name')); ?>[]" id="<?php echo esc_attr($this->get_field_id('entity_name')); ?>_<?php echo esc_attr($entity_name_value) ?>" value="<?php echo esc_attr($entity_name_value); ?>" <?php echo (in_array($entity_name_value, $instance['entity_name']) ? 'checked="checked"' : ''); ?> data-property="entity_name" /> <label for="<?php echo esc_attr($this->get_field_id('entity_name')); ?>_<?php echo esc_attr($entity_name_value) ?>"><?php esc_attr_e($entity_title, 'likebtn-like-button'); ?></label><br/> 163 163 <?php endforeach ?> 164 164 </p> 165 165 <p> 166 <label for="<?php echo $this->get_field_id('include_categories'); ?>"><?php _e('Allow items by category', 'likebtn-like-button'); ?>:</label><br/>167 <select multiple="multiple" id="<?php echo $this->get_field_id('include_categories'); ?>" name="<?php echo $this->get_field_name('include_categories'); ?>[]" class="likebtn_include_categories widefat" data-property="include_categories" autocomplete="off">166 <label for="<?php echo esc_attr($this->get_field_id('include_categories')); ?>"><?php _e('Allow items by category', 'likebtn-like-button'); ?>:</label><br/> 167 <select multiple="multiple" id="<?php echo esc_attr($this->get_field_id('include_categories')); ?>" name="<?php echo esc_attr($this->get_field_name('include_categories')); ?>[]" class="likebtn_include_categories widefat" data-property="include_categories" autocomplete="off"> 168 168 <?php 169 169 $categories = _likebtn_get_categories(); 170 170 171 171 foreach ($categories as $category) { 172 $selected = (in_array($category->cat_ID, $instance['include_categories'])) ? 'selected="selected"' : ''; 173 $option = '<option value="' . $category->cat_ID . '" ' . $selected . '>'; 174 $option .= $category->cat_name; 175 $option .= ' (' . $category->category_count . ')'; 176 $option .= '</option>'; 177 echo $option; 172 ?> 173 <option value="<?php echo esc_attr($category->cat_ID) ?>" <?php echo ((in_array($category->cat_ID, $instance['include_categories'])) ? 'selected="selected"' : '') ?>><?php echo esc_html($category->cat_name) ?> (<?php echo (int)$category->category_count ?>)</option> 174 <?php 178 175 } 179 176 ?> … … 181 178 </p> 182 179 <p> 183 <label for="<?php echo $this->get_field_id('exclude_categories'); ?>"><?php _e('Exclude items by category', 'likebtn-like-button'); ?>:</label><br/>184 <select multiple="multiple" id="<?php echo $this->get_field_id('exclude_categories'); ?>" name="<?php echo $this->get_field_name('exclude_categories'); ?>[]" class="likebtn_exclude_categories widefat" data-property="exclude_categories" autocomplete="off">180 <label for="<?php echo esc_attr($this->get_field_id('exclude_categories')); ?>"><?php _e('Exclude items by category', 'likebtn-like-button'); ?>:</label><br/> 181 <select multiple="multiple" id="<?php echo esc_attr($this->get_field_id('exclude_categories')); ?>" name="<?php echo esc_attr($this->get_field_name('exclude_categories')); ?>[]" class="likebtn_exclude_categories widefat" data-property="exclude_categories" autocomplete="off"> 185 182 <?php 186 183 $categories = _likebtn_get_categories(); 187 184 188 185 foreach ($categories as $category) { 189 $selected = (in_array($category->cat_ID, $instance['exclude_categories'])) ? 'selected="selected"' : ''; 190 $option = '<option value="' . $category->cat_ID . '" ' . $selected . '>'; 191 $option .= $category->cat_name; 192 $option .= ' (' . $category->category_count . ')'; 193 $option .= '</option>'; 194 echo $option; 186 ?> 187 <option value="<?php echo esc_attr($category->cat_ID) ?>" <?php echo ((in_array($category->cat_ID, $instance['exclude_categories'])) ? 'selected="selected"' : '') ?>><?php echo esc_html($category->cat_name) ?> (<?php echo (int)$category->category_count ?>)</option> 188 <?php 195 189 } 196 190 ?> … … 199 193 <?php if (!$this->liked_by_user): ?> 200 194 <p> 201 <label for="<?php echo $this->get_field_id('author'); ?>"><?php _e('Filter by author (comma separated IDs)', 'likebtn-like-button'); ?>:</label><br/>202 <input type="text" id="<?php echo $this->get_field_id('author'); ?>" name="<?php echo $this->get_field_name('author'); ?>" value="<?php echo $instance['author']; ?>" data-property="author" class="widefat"/>195 <label for="<?php echo esc_attr($this->get_field_id('author')); ?>"><?php _e('Filter by author (comma separated IDs)', 'likebtn-like-button'); ?>:</label><br/> 196 <input type="text" id="<?php echo esc_attr($this->get_field_id('author')); ?>" name="<?php echo esc_attr($this->get_field_name('author')); ?>" value="<?php echo esc_attr($instance['author']); ?>" data-property="author" class="widefat"/> 203 197 </p> 204 198 <?php endif ?> 205 199 <p> 206 <label for="<?php echo $this->get_field_id('number'); ?>"><?php _e('Number of items to show:', 'likebtn-like-button'); ?></label>207 <input type="number" id="<?php echo $this->get_field_id('number'); ?>" name="<?php echo $this->get_field_name('number'); ?>" value="<?php echo $instance['number']; ?>" size="3" data-property="number" class="widefat" />208 </p> 209 <p> 210 <label for="<?php echo $this->get_field_id('order'); ?>"><?php _e('Order by:', 'likebtn-like-button'); ?></label>211 <select name="<?php echo $this->get_field_name('order'); ?>" id="<?php echo $this->get_field_id('order'); ?>" data-property="order" >200 <label for="<?php echo esc_attr($this->get_field_id('number')); ?>"><?php _e('Number of items to show:', 'likebtn-like-button'); ?></label> 201 <input type="number" id="<?php echo esc_attr($this->get_field_id('number')); ?>" name="<?php echo esc_attr($this->get_field_name('number')); ?>" value="<?php echo esc_attr($instance['number']); ?>" size="3" data-property="number" class="widefat" /> 202 </p> 203 <p> 204 <label for="<?php echo esc_attr($this->get_field_id('order')); ?>"><?php _e('Order by:', 'likebtn-like-button'); ?></label> 205 <select name="<?php echo esc_attr($this->get_field_name('order')); ?>" id="<?php echo esc_attr($this->get_field_id('order')); ?>" data-property="order" > 212 206 <?php foreach ($order_list as $order_value => $order_name): ?> 213 <option value="<?php echo $order_value; ?>" <?php selected($order_value, $instance['order']); ?> ><?php_e($order_name, 'likebtn-like-button'); ?></option>207 <option value="<?php echo esc_attr($order_value); ?>" <?php selected($order_value, $instance['order']); ?> ><?php esc_html_e($order_name, 'likebtn-like-button'); ?></option> 214 208 <?php endforeach ?> 215 209 </select> 216 210 </p> 217 211 <p> 218 <label for="<?php echo $this->get_field_id('time_range'); ?>"><?php _e('Item publication period:', 'likebtn-like-button'); ?></label>219 <select name="<?php echo $this->get_field_name('time_range'); ?>" id="<?php echo $this->get_field_id('time_range'); ?>" data-property="time_range" >212 <label for="<?php echo esc_attr($this->get_field_id('time_range')); ?>"><?php _e('Item publication period:', 'likebtn-like-button'); ?></label> 213 <select name="<?php echo esc_attr($this->get_field_name('time_range')); ?>" id="<?php echo esc_attr($this->get_field_id('time_range')); ?>" data-property="time_range" > 220 214 <?php foreach ($time_range_list as $time_range_value => $time_range_name): ?> 221 <option value="<?php echo $time_range_value; ?>" <?php selected($time_range_value, $instance['time_range']); ?> ><?php_e($time_range_name, 'likebtn-like-button'); ?></option>215 <option value="<?php echo esc_attr($time_range_value); ?>" <?php selected($time_range_value, $instance['time_range']); ?> ><?php esc_html_e($time_range_name, 'likebtn-like-button'); ?></option> 222 216 <?php endforeach ?> 223 217 </select> 224 218 </p> 225 219 <p> 226 <label for="<?php echo $this->get_field_id('vote_time_range'); ?>"><?php _e('Votes period:', 'likebtn-like-button'); ?></label>227 <select name="<?php echo $this->get_field_name('vote_time_range'); ?>" id="<?php echo $this->get_field_id('vote_time_range'); ?>" data-property="vote_time_range" >220 <label for="<?php echo esc_attr($this->get_field_id('vote_time_range')); ?>"><?php _e('Votes period:', 'likebtn-like-button'); ?></label> 221 <select name="<?php echo esc_attr($this->get_field_name('vote_time_range')); ?>" id="<?php echo esc_attr($this->get_field_id('vote_time_range')); ?>" data-property="vote_time_range" > 228 222 <?php foreach ($time_range_list as $time_range_value => $time_range_name): ?> 229 <option value="<?php echo $time_range_value; ?>" <?php selected($time_range_value, $instance['vote_time_range']); ?> ><?php_e($time_range_name, 'likebtn-like-button'); ?></option>223 <option value="<?php echo esc_attr($time_range_value); ?>" <?php selected($time_range_value, $instance['vote_time_range']); ?> ><?php esc_html_e($time_range_name, 'likebtn-like-button'); ?></option> 230 224 <?php endforeach ?> 231 225 </select> 232 226 </p> 233 227 <p> 234 <label for="<?php echo $this->get_field_id('title_length'); ?>"><?php _e('Max title length', 'likebtn-like-button'); ?>:</label>235 <input type="number" id="<?php echo $this->get_field_id('title_length'); ?>" name="<?php echo $this->get_field_name('title_length'); ?>" value="<?php echo $instance['title_length']; ?>" data-property="title_length" class="widefat" />236 </p> 237 <p> 238 <input class="checkbox" type="checkbox" id="<?php echo $this->get_field_id('show_likes'); ?>" name="<?php echo $this->get_field_name('show_likes'); ?>" value="1" <?php checked($instance['show_likes']); ?> data-property="show_likes" />239 <label for="<?php echo $this->get_field_id('show_likes'); ?>"><?php _e('Display likes count', 'likebtn-like-button'); ?></label>240 </p> 241 <p> 242 <input class="checkbox" type="checkbox" id="<?php echo $this->get_field_id('show_dislikes'); ?>" name="<?php echo $this->get_field_name('show_dislikes'); ?>" value="1" <?php checked($instance['show_dislikes']); ?> data-property="show_dislikes" />243 <label for="<?php echo $this->get_field_id('show_dislikes'); ?>"><?php _e('Display dislikes count', 'likebtn-like-button'); ?></label>244 </p> 245 <p> 246 <input class="checkbox" type="checkbox" <?php checked($instance['show_thumbnail']); ?> id="<?php echo $this->get_field_id('show_thumbnail'); ?>" name="<?php echo $this->get_field_name('show_thumbnail'); ?>" value="1" data-property="show_thumbnail" />247 <label for="<?php echo $this->get_field_id('show_thumbnail'); ?>"><?php _e('Display featured image', 'likebtn-like-button'); ?></label>248 <select name="<?php echo $this->get_field_name('thumbnail_size'); ?>" id="<?php echo $this->get_field_id('thumbnail_size'); ?>" data-property="thumbnail_size" class="widefat">228 <label for="<?php echo esc_attr($this->get_field_id('title_length')); ?>"><?php _e('Max title length', 'likebtn-like-button'); ?>:</label> 229 <input type="number" id="<?php echo esc_attr($this->get_field_id('title_length')); ?>" name="<?php echo esc_attr($this->get_field_name('title_length')); ?>" value="<?php echo esc_attr($instance['title_length']); ?>" data-property="title_length" class="widefat" /> 230 </p> 231 <p> 232 <input class="checkbox" type="checkbox" id="<?php echo esc_attr($this->get_field_id('show_likes')); ?>" name="<?php echo esc_attr($this->get_field_name('show_likes')); ?>" value="1" <?php checked($instance['show_likes']); ?> data-property="show_likes" /> 233 <label for="<?php echo esc_attr($this->get_field_id('show_likes')); ?>"><?php _e('Display likes count', 'likebtn-like-button'); ?></label> 234 </p> 235 <p> 236 <input class="checkbox" type="checkbox" id="<?php echo esc_attr($this->get_field_id('show_dislikes')); ?>" name="<?php echo esc_attr($this->get_field_name('show_dislikes')); ?>" value="1" <?php checked($instance['show_dislikes']); ?> data-property="show_dislikes" /> 237 <label for="<?php echo esc_attr($this->get_field_id('show_dislikes')); ?>"><?php _e('Display dislikes count', 'likebtn-like-button'); ?></label> 238 </p> 239 <p> 240 <input class="checkbox" type="checkbox" <?php checked($instance['show_thumbnail']); ?> id="<?php echo esc_attr($this->get_field_id('show_thumbnail')); ?>" name="<?php echo esc_attr($this->get_field_name('show_thumbnail')); ?>" value="1" data-property="show_thumbnail" /> 241 <label for="<?php echo esc_attr($this->get_field_id('show_thumbnail')); ?>"><?php _e('Display featured image', 'likebtn-like-button'); ?></label> 242 <select name="<?php echo esc_attr($this->get_field_name('thumbnail_size')); ?>" id="<?php echo esc_attr($this->get_field_id('thumbnail_size')); ?>" data-property="thumbnail_size" class="widefat"> 249 243 <?php foreach ($thumbnail_size_list as $thumbnail_size_value => $thumbnail_size_name): ?> 250 <option value="<?php echo $thumbnail_size_value; ?>" <?php selected($thumbnail_size_value, $instance['thumbnail_size']); ?> ><?php_e($thumbnail_size_name, 'likebtn-like-button'); ?></option>244 <option value="<?php echo esc_attr($thumbnail_size_value); ?>" <?php selected($thumbnail_size_value, $instance['thumbnail_size']); ?> ><?php esc_html_e($thumbnail_size_name, 'likebtn-like-button'); ?></option> 251 245 <?php endforeach ?> 252 246 </select> 253 247 </p> 254 248 <p> 255 <input class="checkbox" type="checkbox" <?php checked($instance['show_excerpt']); ?> id="<?php echo $this->get_field_id('show_excerpt'); ?>" name="<?php echo $this->get_field_name('show_excerpt'); ?>" value="1" data-property="show_excerpt" />256 <label for="<?php echo $this->get_field_id('show_excerpt'); ?>"><?php _e('Display excerpt', 'likebtn-like-button'); ?></label>257 </p> 258 <p> 259 <input class="checkbox" type="checkbox" <?php checked($instance['show_date']); ?> id="<?php echo $this->get_field_id('show_date'); ?>" name="<?php echo $this->get_field_name('show_date'); ?>" value="1" data-property="show_date" />260 <label for="<?php echo $this->get_field_id('show_date'); ?>"><?php _e('Display item date', 'likebtn-like-button'); ?></label>261 </p> 262 <p> 263 <input class="checkbox" type="checkbox" <?php checked($instance['show_author']); ?> id="<?php echo $this->get_field_id('show_author'); ?>" name="<?php echo $this->get_field_name('show_author'); ?>" value="1" data-property="show_author" />264 <label for="<?php echo $this->get_field_id('show_author'); ?>"><?php _e('Display author', 'likebtn-like-button'); ?></label>265 </p> 266 <p> 267 <input class="checkbox" type="checkbox" <?php checked($instance['show_button']); ?> id="<?php echo $this->get_field_id('show_button'); ?>" name="<?php echo $this->get_field_name('show_button'); ?>" value="1" data-property="show_button" />268 <label for="<?php echo $this->get_field_id('show_button'); ?>"><?php _e('Display button and use settings from', 'likebtn-like-button'); ?></label>269 <select name="<?php echo $this->get_field_name('show_button_use_entity'); ?>" id="<?php echo $this->get_field_id('show_button_use_entity'); ?>" data-property="show_button_use_entity" class="widefat">249 <input class="checkbox" type="checkbox" <?php checked($instance['show_excerpt']); ?> id="<?php echo esc_attr($this->get_field_id('show_excerpt')); ?>" name="<?php echo esc_attr($this->get_field_name('show_excerpt')); ?>" value="1" data-property="show_excerpt" /> 250 <label for="<?php echo esc_attr($this->get_field_id('show_excerpt')); ?>"><?php _e('Display excerpt', 'likebtn-like-button'); ?></label> 251 </p> 252 <p> 253 <input class="checkbox" type="checkbox" <?php checked($instance['show_date']); ?> id="<?php echo esc_attr($this->get_field_id('show_date')); ?>" name="<?php echo esc_attr($this->get_field_name('show_date')); ?>" value="1" data-property="show_date" /> 254 <label for="<?php echo esc_attr($this->get_field_id('show_date')); ?>"><?php _e('Display item date', 'likebtn-like-button'); ?></label> 255 </p> 256 <p> 257 <input class="checkbox" type="checkbox" <?php checked($instance['show_author']); ?> id="<?php echo esc_attr($this->get_field_id('show_author')); ?>" name="<?php echo esc_attr($this->get_field_name('show_author')); ?>" value="1" data-property="show_author" /> 258 <label for="<?php echo esc_attr($this->get_field_id('show_author')); ?>"><?php _e('Display author', 'likebtn-like-button'); ?></label> 259 </p> 260 <p> 261 <input class="checkbox" type="checkbox" <?php checked($instance['show_button']); ?> id="<?php echo esc_attr($this->get_field_id('show_button')); ?>" name="<?php echo esc_attr($this->get_field_name('show_button')); ?>" value="1" data-property="show_button" /> 262 <label for="<?php echo esc_attr($this->get_field_id('show_button')); ?>"><?php _e('Display button and use settings from', 'likebtn-like-button'); ?></label> 263 <select name="<?php echo esc_attr($this->get_field_name('show_button_use_entity')); ?>" id="<?php echo esc_attr($this->get_field_id('show_button_use_entity')); ?>" data-property="show_button_use_entity" class="widefat"> 270 264 <?php foreach ($likebtn_entities as $entity_name_value => $entity_title): ?> 271 <option value="<?php echo $entity_name_value; ?>" <?php selected($entity_name_value, $instance['show_button_use_entity']); ?> ><?php_e($entity_title, 'likebtn-like-button'); ?></option>265 <option value="<?php echo esc_attr($entity_name_value); ?>" <?php selected($entity_name_value, $instance['show_button_use_entity']); ?> ><?php esc_html_e($entity_title, 'likebtn-like-button'); ?></option> 272 266 <?php endforeach ?> 273 267 </select> 274 268 </p> 275 269 <p> 276 <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Text when there are no items', 'likebtn-like-button'); ?>:</label>277 <input class="widefat" type="text" id="<?php echo $this->get_field_id('empty_text'); ?>" name="<?php echo $this->get_field_name('empty_text'); ?>" value="<?php echo $instance['empty_text']; ?>" data-property="empty_text" />270 <label for="<?php echo esc_attr($this->get_field_id('title')); ?>"><?php _e('Text when there are no items', 'likebtn-like-button'); ?>:</label> 271 <input class="widefat" type="text" id="<?php echo esc_attr($this->get_field_id('empty_text')); ?>" name="<?php echo esc_attr($this->get_field_name('empty_text')); ?>" value="<?php echo esc_attr($instance['empty_text']); ?>" data-property="empty_text" /> 278 272 </p> 279 273 <p> 280 274 <a href="javascript:likebtnPopup('<?php echo __('http://likebtn.com/en/', 'likebtn-like-button'); ?>wordpress-like-button-plugin#most_liked_template');void(0);"><?php _e('Need a custom template?', 'likebtn-like-button'); ?></a> | 281 <a href="javascript:likebtnWidgetShortcode('<?php echo $widget_mnemonic; ?>', '<?php echo $this->shortcode; ?>', '<?php _e('Please save widget first', 'likebtn-like-button'); ?>')"><?php _e('Get shortcode', 'likebtn-like-button'); ?></a> <small>▼</small>282 </p> 283 <p id="likebtn_sc_wr_<?php echo $widget_mnemonic; ?>" class="likebtn_sc_wr">284 <textarea class="likebtn_input likebtn_disabled" rows="5" id="likebtn_sc_<?php echo $widget_mnemonic; ?>" readonly="readonly"></textarea>275 <a href="javascript:likebtnWidgetShortcode('<?php echo esc_attr($widget_mnemonic); ?>', '<?php echo esc_attr($this->shortcode); ?>', '<?php _e('Please save widget first', 'likebtn-like-button'); ?>')"><?php _e('Get shortcode', 'likebtn-like-button'); ?></a> <small>▼</small> 276 </p> 277 <p id="likebtn_sc_wr_<?php echo esc_attr($widget_mnemonic); ?>" class="likebtn_sc_wr"> 278 <textarea class="likebtn_input likebtn_disabled" rows="5" id="likebtn_sc_<?php echo esc_attr($widget_mnemonic); ?>" readonly="readonly"></textarea> 285 279 </p> 286 280 </div> 287 281 <script type="text/javascript"> 288 282 jQuery(document).ready(function() { 289 jQuery("#likebtn_widget_<?php echo $widget_mnemonic?> :input").on("keyup change", function(event) {290 likebtnWidgetShortcode('<?php echo $widget_mnemonic ?>', '<?php echo $this->shortcode; ?>', '<?php _e('Please save widget first', 'likebtn-like-button'); ?>', true);283 jQuery("#likebtn_widget_<?php echo esc_attr($widget_mnemonic) ?> :input").on("keyup change", function(event) { 284 likebtnWidgetShortcode('<?php echo esc_attr($widget_mnemonic) ?>', '<?php echo esc_attr($this->shortcode); ?>', '<?php _e('Please save widget first', 'likebtn-like-button'); ?>', true); 291 285 }); 292 jQuery("#likebtn_widget_<?php echo $widget_mnemonic?> select.likebtn_include_categories:first").select2();293 jQuery("#likebtn_widget_<?php echo $widget_mnemonic?> select.likebtn_exclude_categories:first").select2();286 jQuery("#likebtn_widget_<?php echo esc_attr($widget_mnemonic) ?> select.likebtn_include_categories:first").select2(); 287 jQuery("#likebtn_widget_<?php echo esc_attr($widget_mnemonic) ?> select.likebtn_exclude_categories:first").select2(); 294 288 }); 295 289 </script> -
likebtn-like-button/tags/2.6.45/includes/likebtn_mycred.class.php
r2722965 r2725864 206 206 <h3 class="nav-tab-wrapper likebtn_mycred_tab_labels" style="padding: 0"> 207 207 <?php foreach ($likebtn_entities as $tab_entity_name => $tab_entity_title): ?> 208 <a class="nav-tab likebtn_mycred_tab_lbl_<?php echo $tab_entity_name; ?> <?php echo ('post' == $tab_entity_name ? 'nav-tab-active' : '') ?>" href="javascript:likebtnGotoTab('<?php echo $tab_entity_name ?>', '.likebtn_mycred_tab', '.likebtn_mycred_tab_', '.likebtn_mycred_tab_labels', 'likebtn_mycred_tab_lbl_');void(0);"><?php_e($tab_entity_title, 'likebtn-like-button'); ?></a>208 <a class="nav-tab likebtn_mycred_tab_lbl_<?php echo esc_attr($tab_entity_name); ?> <?php echo ('post' == $tab_entity_name ? 'nav-tab-active' : '') ?>" href="javascript:likebtnGotoTab('<?php echo esc_attr($tab_entity_name) ?>', '.likebtn_mycred_tab', '.likebtn_mycred_tab_', '.likebtn_mycred_tab_labels', 'likebtn_mycred_tab_lbl_');void(0);"><?php esc_html_e($tab_entity_title, 'likebtn-like-button'); ?></a> 209 209 <?php endforeach ?> 210 210 </h3> 211 211 212 212 <?php foreach ($likebtn_entities as $entity_name => $entity_title): ?> 213 <div class="likebtn_mycred_tab postbox likebtn_mycred_tab_<?php echo $entity_name; ?> <?php if ($entity_name !== 'post'): ?>hidden<?php endif ?>" >213 <div class="likebtn_mycred_tab postbox likebtn_mycred_tab_<?php echo esc_attr($entity_name); ?> <?php if ($entity_name !== 'post'): ?>hidden<?php endif ?>" > 214 214 <div class="inside"> 215 215 <label class="subheader"><?php echo _e( 'Points for Liking Content', 'likebtn-like-button' ); ?></label> … … 246 246 <ol> 247 247 <li> 248 <div class="h2"><input type="text" name="<?php echo $this->field_name( array( $instance => 'creds' ) ); ?>" id="<?php echo $this->field_id( array( $instance => 'creds' ) ); ?>" value="<?php echo $this->core->number( $prefs[$instance]['creds']); ?>" size="8" autocomplete="off" /></div>248 <div class="h2"><input type="text" name="<?php echo esc_attr($this->field_name( array( $instance => 'creds' ) )); ?>" id="<?php echo esc_attr($this->field_id( array( $instance => 'creds' ) )); ?>" value="<?php echo esc_attr($this->core->number( $prefs[$instance]['creds'] )); ?>" size="8" autocomplete="off" /></div> 249 249 </li> 250 250 <li class="empty"></li> 251 251 <li> 252 <label for="<?php echo $this->field_id( array( $instance => 'log' )); ?>"><?php _e('Percent from voter\'s points balance added on voting to the points amount above', 'likebtn-like-button'); ?></label>253 <div class="h2"><input type="text" name="<?php echo $this->field_name( array( $instance => 'share' ) ); ?>" id="<?php echo $this->field_id( array( $instance => 'share' )); ?>" value="<?php echo (float)$prefs[$instance]['share']; ?>" size="8" autocomplete="off" /><small>%</small></div>252 <label for="<?php echo esc_attr($this->field_id( array( $instance => 'log' ) )); ?>"><?php _e('Percent from voter\'s points balance added on voting to the points amount above', 'likebtn-like-button'); ?></label> 253 <div class="h2"><input type="text" name="<?php echo esc_attr($this->field_name( array( $instance => 'share' ) )); ?>" id="<?php echo esc_attr($this->field_id( array( $instance => 'share' ) )); ?>" value="<?php echo (float)$prefs[$instance]['share']; ?>" size="8" autocomplete="off" /><small>%</small></div> 254 254 </li> 255 255 <li class="empty"></li> 256 256 <li> 257 <label for="<?php echo $this->field_id( array( $instance => 'limit' )); ?>"><?php _e( 'Limit', 'likebtn-like-button' ); ?></label>258 <?php echo $this->hook_limit_setting( $this->field_name( array( $instance => 'limit' ) ), $this->field_id( array( $instance => 'limit' ) ), $prefs[$instance]['limit']); ?>257 <label for="<?php echo esc_attr($this->field_id( array( $instance => 'limit' ) )); ?>"><?php _e( 'Limit', 'likebtn-like-button' ); ?></label> 258 <?php echo esc_attr($this->hook_limit_setting( $this->field_name( array( $instance => 'limit' ) ), $this->field_id( array( $instance => 'limit' ) ), $prefs[$instance]['limit'] )); ?> 259 259 </li> 260 260 <li class="empty"></li> 261 261 <li> 262 <label for="<?php echo $this->field_id( array( $instance => 'log' )); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>263 <div class="h2"><input type="text" name="<?php echo $this->field_name( array( $instance => 'log' ) ); ?>" id="<?php echo $this->field_id( array( $instance => 'log' )); ?>" value="<?php echo esc_attr( $prefs[$instance]['log'] ); ?>" class="long" autocomplete="off" /></div>264 <span class="description"><?php echo $this->available_template_tags( array( 'general' )); ?></span>262 <label for="<?php echo esc_attr($this->field_id( array( $instance => 'log' ) )); ?>"><?php _e( 'Log template', 'mycred' ); ?></label> 263 <div class="h2"><input type="text" name="<?php echo esc_attr($this->field_name( array( $instance => 'log' ) )); ?>" id="<?php echo esc_attr($this->field_id( array( $instance => 'log' ) )); ?>" value="<?php echo esc_attr( $prefs[$instance]['log'] ); ?>" class="long" autocomplete="off" /></div> 264 <span class="description"><?php echo esc_attr($this->available_template_tags( array( 'general' ) )); ?></span> 265 265 </li> 266 266 </ol> -
likebtn-like-button/tags/2.6.45/includes/tab_buttons.php
r2724991 r2725864 164 164 <h3 class="nav-tab-wrapper" style="padding: 0" id="likebtn_subpage_tab_wrapper"> 165 165 <?php foreach ($likebtn_entities as $tab_entity_name => $tab_entity_title): ?> 166 <a class="nav-tab likebtn_tab_<?php echo esc_attr($tab_entity_name); ?> <?php echo ($subpage == $tab_entity_name ? 'nav-tab-active' : '') ?>" href="<?php echo admin_url().'admin.php?page=likebtn_buttons&likebtn_subpage='. $tab_entity_name; ?>"><img src="<?php echo _likebtn_get_public_url() ?>img/check.png" class="likebtn_ttip likebtn_show_marker <?php if (get_option('likebtn_show_' . $tab_entity_name) != '1'): ?>hidden<?php endif ?>" title="<?php _e('Like Button enabled', 'likebtn-like-button'); ?>"><?php_e($tab_entity_title, 'likebtn-like-button'); ?></a>166 <a class="nav-tab likebtn_tab_<?php echo esc_attr($tab_entity_name); ?> <?php echo ($subpage == $tab_entity_name ? 'nav-tab-active' : '') ?>" href="<?php echo admin_url().'admin.php?page=likebtn_buttons&likebtn_subpage='.esc_attr($tab_entity_name); ?>"><img src="<?php echo _likebtn_get_public_url() ?>img/check.png" class="likebtn_ttip likebtn_show_marker <?php if (get_option('likebtn_show_' . $tab_entity_name) != '1'): ?>hidden<?php endif ?>" title="<?php _e('Like Button enabled', 'likebtn-like-button'); ?>"><?php esc_html_e($tab_entity_title, 'likebtn-like-button'); ?></a> 167 167 <?php endforeach ?> 168 168 </h3> … … 219 219 220 220 <div id="likebtn_subpage_wrapper_<?php echo esc_attr($entity_name); ?>" class="likebtn_subpage <?php if ($subpage !== $entity_name): ?>hidden<?php endif ?>" > 221 <?php /*<h3><?php _e($entity_title, 'likebtn-like-button'); ?></h3>*/ ?>222 221 <div class="inside entity_tab_container"> 223 222 … … 255 254 } 256 255 ?> 257 <option value="<?php echo esc_attr($use_entity_name); ?>" <?php selected($use_entity_name, get_option('likebtn_use_settings_from_' . $entity_name)); ?> ><?php _e($use_entity_title, 'likebtn-like-button'); ?></option>256 <option value="<?php echo esc_attr($use_entity_name); ?>" <?php selected($use_entity_name, get_option('likebtn_use_settings_from_' . $entity_name)); ?> ><?php esc_html_e($use_entity_title, 'likebtn-like-button'); ?></option> 258 257 <?php endforeach ?> 259 258 </select> … … 315 314 <th scope="row"><label><?php _e('Button size', 'likebtn-like-button'); ?></label></th> 316 315 <td> 317 <input type="number" name="likebtn_settings_btn_size_<?php echo esc_attr($entity_name); ?>" value="<?php echo (get_option('likebtn_settings_btn_size_' . $entity_name) ? get_option('likebtn_settings_btn_size_' . $entity_name) : $likebtn_settings['btn_size']['default']); ?>" class="likebtn_input likebtn_i_sm" min="5" max="500" maxlength="3"/>316 <input type="number" name="likebtn_settings_btn_size_<?php echo esc_attr($entity_name); ?>" value="<?php echo (get_option('likebtn_settings_btn_size_' . $entity_name) ? get_option('likebtn_settings_btn_size_' . $entity_name) : esc_attr($likebtn_settings['btn_size']['default'])); ?>" class="likebtn_input likebtn_i_sm" min="5" max="500" maxlength="3"/> 318 317 </td> 319 318 </tr> … … 321 320 <th scope="row"><label><?php _e('Font size', 'likebtn-like-button'); ?></label></th> 322 321 <td> 323 <input type="number" name="likebtn_settings_f_size_<?php echo esc_attr($entity_name); ?>" value="<?php echo (get_option('likebtn_settings_f_size_' . $entity_name) ? get_option('likebtn_settings_f_size_' . $entity_name) : $likebtn_settings['f_size']['default']); ?>" class="likebtn_input likebtn_i_sm" min="5" max="500" maxlength="3"/>322 <input type="number" name="likebtn_settings_f_size_<?php echo esc_attr($entity_name); ?>" value="<?php echo (get_option('likebtn_settings_f_size_' . $entity_name) ? get_option('likebtn_settings_f_size_' . $entity_name) : esc_attr($likebtn_settings['f_size']['default'])); ?>" class="likebtn_input likebtn_i_sm" min="5" max="500" maxlength="3"/> 324 323 </td> 325 324 </tr> … … 327 326 <th scope="row"><label><?php _e('Icon size', 'likebtn-like-button'); ?></label></th> 328 327 <td> 329 <input type="number" name="likebtn_settings_icon_size_<?php echo esc_attr($entity_name); ?>" value="<?php echo (get_option('likebtn_settings_icon_size_' . $entity_name) ? get_option('likebtn_settings_icon_size_' . $entity_name) : $likebtn_settings['icon_size']['default']); ?>" class="likebtn_input likebtn_i_sm" min="5" max="500" maxlength="3"/>328 <input type="number" name="likebtn_settings_icon_size_<?php echo esc_attr($entity_name); ?>" value="<?php echo (get_option('likebtn_settings_icon_size_' . $entity_name) ? get_option('likebtn_settings_icon_size_' . $entity_name) : esc_attr($likebtn_settings['icon_size']['default'])); ?>" class="likebtn_input likebtn_i_sm" min="5" max="500" maxlength="3"/> 330 329 </td> 331 330 </tr> … … 411 410 <th scope="row"><label><?php _e('Like icon color', 'likebtn-like-button'); ?></label></th> 412 411 <td> 413 <input type="text" name="likebtn_settings_icon_l_c_<?php echo esc_attr($entity_name); ?>" value="<?php echo (get_option('likebtn_settings_icon_l_c_' . $entity_name) ? get_option('likebtn_settings_icon_l_c_' . $entity_name) : $likebtn_settings['icon_l_c']['default']); ?>" data-alpha="true" class="likebtn_input likebtn_i_sm likebtn_cp"/>412 <input type="text" name="likebtn_settings_icon_l_c_<?php echo esc_attr($entity_name); ?>" value="<?php echo (get_option('likebtn_settings_icon_l_c_' . $entity_name) ? get_option('likebtn_settings_icon_l_c_' . $entity_name) : esc_attr($likebtn_settings['icon_l_c']['default'])); ?>" data-alpha="true" class="likebtn_input likebtn_i_sm likebtn_cp"/> 414 413 </td> 415 414 </tr> … … 417 416 <th scope="row"><label><?php _e('Color after voting', 'likebtn-like-button'); ?></label></th> 418 417 <td> 419 <input type="text" name="likebtn_settings_icon_l_c_v_<?php echo esc_attr($entity_name); ?>" value="<?php echo (get_option('likebtn_settings_icon_l_c_v_' . $entity_name) ? get_option('likebtn_settings_icon_l_c_v_' . $entity_name) : $likebtn_settings['icon_l_c_v']['default']); ?>" data-alpha="true" class="likebtn_input likebtn_i_sm likebtn_cp"/>418 <input type="text" name="likebtn_settings_icon_l_c_v_<?php echo esc_attr($entity_name); ?>" value="<?php echo (get_option('likebtn_settings_icon_l_c_v_' . $entity_name) ? get_option('likebtn_settings_icon_l_c_v_' . $entity_name) : esc_attr($likebtn_settings['icon_l_c_v']['default'])); ?>" data-alpha="true" class="likebtn_input likebtn_i_sm likebtn_cp"/> 420 419 </td> 421 420 </tr> … … 423 422 <th scope="row"><label><?php _e('Dislike icon color', 'likebtn-like-button'); ?></label></th> 424 423 <td> 425 <input type="text" name="likebtn_settings_icon_d_c_<?php echo esc_attr($entity_name); ?>" value="<?php echo (get_option('likebtn_settings_icon_d_c_' . $entity_name) ? get_option('likebtn_settings_icon_d_c_' . $entity_name) : $likebtn_settings['icon_d_c']['default']); ?>" data-alpha="true" class="likebtn_input likebtn_i_sm likebtn_cp"/>424 <input type="text" name="likebtn_settings_icon_d_c_<?php echo esc_attr($entity_name); ?>" value="<?php echo (get_option('likebtn_settings_icon_d_c_' . $entity_name) ? get_option('likebtn_settings_icon_d_c_' . $entity_name) : esc_attr($likebtn_settings['icon_d_c']['default'])); ?>" data-alpha="true" class="likebtn_input likebtn_i_sm likebtn_cp"/> 426 425 </td> 427 426 </tr> … … 429 428 <th scope="row"><label><?php _e('Color after voting', 'likebtn-like-button'); ?></label></th> 430 429 <td> 431 <input type="text" name="likebtn_settings_icon_d_c_v_<?php echo esc_attr($entity_name); ?>" value="<?php echo (get_option('likebtn_settings_icon_d_c_v_' . $entity_name) ? get_option('likebtn_settings_icon_d_c_v_' . $entity_name) : $likebtn_settings['icon_d_c_v']['default']); ?>" data-alpha="true" class="likebtn_input likebtn_i_sm likebtn_cp"/>430 <input type="text" name="likebtn_settings_icon_d_c_v_<?php echo esc_attr($entity_name); ?>" value="<?php echo (get_option('likebtn_settings_icon_d_c_v_' . $entity_name) ? get_option('likebtn_settings_icon_d_c_v_' . $entity_name) : esc_attr($likebtn_settings['icon_d_c_v']['default'])); ?>" data-alpha="true" class="likebtn_input likebtn_i_sm likebtn_cp"/> 432 431 </td> 433 432 </tr> … … 435 434 <th scope="row"><label><?php _e('Label color', 'likebtn-like-button'); ?></label></th> 436 435 <td> 437 <input type="text" name="likebtn_settings_label_c_<?php echo esc_attr($entity_name); ?>" value="<?php echo (get_option('likebtn_settings_label_c_' . $entity_name) ? get_option('likebtn_settings_label_c_' . $entity_name) : $likebtn_settings['label_c']['default']); ?>" data-alpha="true" class="likebtn_input likebtn_i_sm likebtn_cp"/>436 <input type="text" name="likebtn_settings_label_c_<?php echo esc_attr($entity_name); ?>" value="<?php echo (get_option('likebtn_settings_label_c_' . $entity_name) ? get_option('likebtn_settings_label_c_' . $entity_name) : esc_attr($likebtn_settings['label_c']['default'])); ?>" data-alpha="true" class="likebtn_input likebtn_i_sm likebtn_cp"/> 438 437 </td> 439 438 </tr> … … 441 440 <th scope="row"><label><?php _e('Color after voting', 'likebtn-like-button'); ?></label></th> 442 441 <td> 443 <input type="text" name="likebtn_settings_label_c_v_<?php echo esc_attr($entity_name); ?>" value="<?php echo (get_option('likebtn_settings_label_c_v_' . $entity_name) ? get_option('likebtn_settings_label_c_v_' . $entity_name) : $likebtn_settings['label_c_v']['default']); ?>" data-alpha="true" class="likebtn_input likebtn_i_sm likebtn_cp"/>442 <input type="text" name="likebtn_settings_label_c_v_<?php echo esc_attr($entity_name); ?>" value="<?php echo (get_option('likebtn_settings_label_c_v_' . $entity_name) ? get_option('likebtn_settings_label_c_v_' . $entity_name) : esc_attr($likebtn_settings['label_c_v']['default'])); ?>" data-alpha="true" class="likebtn_input likebtn_i_sm likebtn_cp"/> 444 443 </td> 445 444 </tr> … … 447 446 <th scope="row"><label><?php _e('Likes counter color', 'likebtn-like-button'); ?></label></th> 448 447 <td> 449 <input type="text" name="likebtn_settings_counter_l_c_<?php echo esc_attr($entity_name); ?>" value="<?php echo (get_option('likebtn_settings_counter_l_c_' . $entity_name) ? get_option('likebtn_settings_counter_l_c_' . $entity_name) : $likebtn_settings['counter_l_c']['default']); ?>" data-alpha="true" class="likebtn_input likebtn_i_sm likebtn_cp"/>448 <input type="text" name="likebtn_settings_counter_l_c_<?php echo esc_attr($entity_name); ?>" value="<?php echo (get_option('likebtn_settings_counter_l_c_' . $entity_name) ? get_option('likebtn_settings_counter_l_c_' . $entity_name) : esc_attr($likebtn_settings['counter_l_c']['default'])); ?>" data-alpha="true" class="likebtn_input likebtn_i_sm likebtn_cp"/> 450 449 </td> 451 450 </tr> … … 453 452 <th scope="row"><label><?php _e('Dislikes counter color', 'likebtn-like-button'); ?></label></th> 454 453 <td> 455 <input type="text" name="likebtn_settings_counter_d_c_<?php echo esc_attr($entity_name); ?>" value="<?php echo (get_option('likebtn_settings_counter_d_c_' . $entity_name) ? get_option('likebtn_settings_counter_d_c_' . $entity_name) : $likebtn_settings['counter_d_c']['default']); ?>" data-alpha="true" class="likebtn_input likebtn_i_sm likebtn_cp"/>454 <input type="text" name="likebtn_settings_counter_d_c_<?php echo esc_attr($entity_name); ?>" value="<?php echo (get_option('likebtn_settings_counter_d_c_' . $entity_name) ? get_option('likebtn_settings_counter_d_c_' . $entity_name) : esc_attr($likebtn_settings['counter_d_c']['default'])); ?>" data-alpha="true" class="likebtn_input likebtn_i_sm likebtn_cp"/> 456 455 </td> 457 456 </tr> … … 459 458 <th scope="row"><label><?php _e('Background color', 'likebtn-like-button'); ?></label></th> 460 459 <td> 461 <input type="text" name="likebtn_settings_bg_c_<?php echo esc_attr($entity_name); ?>" value="<?php echo (get_option('likebtn_settings_bg_c_' . $entity_name) ? get_option('likebtn_settings_bg_c_' . $entity_name) : $likebtn_settings['bg_c']['default']); ?>" data-alpha="true" class="likebtn_input likebtn_i_sm likebtn_cp"/>460 <input type="text" name="likebtn_settings_bg_c_<?php echo esc_attr($entity_name); ?>" value="<?php echo (get_option('likebtn_settings_bg_c_' . $entity_name) ? get_option('likebtn_settings_bg_c_' . $entity_name) : esc_attr($likebtn_settings['bg_c']['default'])); ?>" data-alpha="true" class="likebtn_input likebtn_i_sm likebtn_cp"/> 462 461 </td> 463 462 </tr> … … 465 464 <th scope="row"><label><?php _e('Color after voting', 'likebtn-like-button'); ?></label></th> 466 465 <td> 467 <input type="text" name="likebtn_settings_bg_c_v_<?php echo esc_attr($entity_name); ?>" value="<?php echo (get_option('likebtn_settings_bg_c_v_' . $entity_name) ? get_option('likebtn_settings_bg_c_v_' . $entity_name) : $likebtn_settings['bg_c_v']['default']); ?>" data-alpha="true" class="likebtn_input likebtn_i_sm likebtn_cp"/>466 <input type="text" name="likebtn_settings_bg_c_v_<?php echo esc_attr($entity_name); ?>" value="<?php echo (get_option('likebtn_settings_bg_c_v_' . $entity_name) ? get_option('likebtn_settings_bg_c_v_' . $entity_name) : esc_attr($likebtn_settings['bg_c_v']['default'])); ?>" data-alpha="true" class="likebtn_input likebtn_i_sm likebtn_cp"/> 468 467 </td> 469 468 </tr> … … 471 470 <th scope="row"><label><?php _e('Border color', 'likebtn-like-button'); ?></label></th> 472 471 <td> 473 <input type="text" name="likebtn_settings_brdr_c_<?php echo esc_attr($entity_name); ?>" value="<?php echo (get_option('likebtn_settings_brdr_c_' . $entity_name) ? get_option('likebtn_settings_brdr_c_' . $entity_name) : $likebtn_settings['brdr_c']['default']); ?>" data-alpha="true" class="likebtn_input likebtn_i_sm likebtn_cp"/>472 <input type="text" name="likebtn_settings_brdr_c_<?php echo esc_attr($entity_name); ?>" value="<?php echo (get_option('likebtn_settings_brdr_c_' . $entity_name) ? get_option('likebtn_settings_brdr_c_' . $entity_name) : esc_attr($likebtn_settings['brdr_c']['default'])); ?>" data-alpha="true" class="likebtn_input likebtn_i_sm likebtn_cp"/> 474 473 </td> 475 474 </tr> … … 717 716 718 717 foreach ($categories as $category) { 719 $selected = (in_array($category->cat_ID, $excluded_categories)) ? 'selected="selected"' : ''; 720 echo '<option value="' . esc_attr($category->cat_ID) . '" ' . $selected . '>'; 718 echo '<option value="' . esc_attr($category->cat_ID) . '" ' . ((in_array($category->cat_ID, $excluded_categories)) ? 'selected="selected"' : '') . '>'; 721 719 echo esc_html($category->cat_name); 722 720 echo ' (' . (int)$category->category_count . ')'; … … 737 735 738 736 foreach ($forums as $forum) { 739 $selected = (in_array($forum->ID, $allow_forums)) ? 'selected="selected"' : ''; 740 echo '<option value="' . esc_attr($forum->ID) . '" ' . $selected . '>'; 737 echo '<option value="' . esc_attr($forum->ID) . '" ' . ((in_array($forum->ID, $allow_forums)) ? 'selected="selected"' : '') . '>'; 741 738 echo esc_html($forum->post_title); 742 739 echo '</option>'; -
likebtn-like-button/tags/2.6.45/includes/tab_votes.php
r2724991 r2725864 66 66 67 67 // echo "<pre>"; 68 // echo $query;69 // echo $query_prepared;70 // echo $wpdb->prepare($query, $query_parameters);68 // echo query; 69 // echo query_prepared; 70 // echo wpdb->prepare($query, $query_parameters); 71 71 // $wpdb->show_errors(); 72 72 // exit(); … … 141 141 <option value=""></option> 142 142 <?php foreach ($countries as $country_code => $country_name): ?> 143 <option value="<?php echo $country_code; ?>" <?php selected($country, $country_code); ?> ><?php echo $country_name ?> - <?php echo $country_code; ?></option>143 <option value="<?php echo esc_attr($country_code); ?>" <?php selected($country, $country_code); ?> ><?php echo esc_html($country_name) ?> - <?php echo esc_html($country_code); ?></option> 144 144 <?php endforeach ?> 145 145 </select> … … 187 187 <?php if (count($votes) && $p->lastpage > 1): ?> 188 188 <div class="tablenav-pages"> 189 <?php echo $p->show(); ?>189 <?php echo wp_kses_post($p->show()); ?> 190 190 </div> 191 191 <?php endif ?> … … 264 264 ?> 265 265 266 <tr id="vote_<?php echo $votes_item->id; ?>">267 <?php /*<td><input type="checkbox" class="item_checkbox" value="<?php echo $votes_item->post_id; ?>" name="item[]" <?php if ($blogs && $votes_item->blog_id != $blog_id): ?>disabled="disabled"<?php endif ?>></td>*/ ?>266 <tr id="vote_<?php echo esc_attr($votes_item->id); ?>"> 267 <?php /*<td><input type="checkbox" class="item_checkbox" value="<?php echo votes_item->post_id; ?>" name="item[]" <?php if ($blogs && $votes_item->blog_id != $blog_id): ?>disabled="disabled"<?php endif ?>></td>*/ ?> 268 268 <?php if ($blogs && $votes_blog_id == 'all'): ?> 269 269 <td><?php echo get_blog_option($votes_item->blog_id, 'blogname') ?></td> … … 271 271 <?php if ($avatar_url): ?> 272 272 <td width="32"> 273 <a href="<?php echo $user_url ?>" target="_blank"><img src="<?php echo $avatar_url; ?>" width="32" height="32" /></a>273 <a href="<?php echo esc_attr($user_url) ?>" target="_blank"><img src="<?php echo esc_attr($avatar_url); ?>" width="32" height="32" /></a> 274 274 </td> 275 275 <?php endif ?> 276 276 <td <?php if (!$avatar_url): ?>colspan="2"<?php endif ?>> 277 277 <?php if ($user_name): ?> 278 <a href="<?php echo $user_url ?>" target="_blank"><?php echo $user_name; ?></a>278 <a href="<?php echo esc_attr($user_url) ?>" target="_blank"><?php echo esc_html($user_name); ?></a> 279 279 <?php else: ?> 280 280 <?php echo __('Anonymous', 'likebtn-like-button'); ?> … … 283 283 <td> 284 284 <?php if (likebtn_is_real_ip($votes_item->ip)): ?> 285 <a href="javascript:likebtnIpInfo('<?php echo $votes_item->ip; ?>');" class="likebtn_ttip" title="<?php _e('View IP info', 'likebtn-like-button') ?>"><?php echo $votes_item->ip; ?></a>285 <a href="javascript:likebtnIpInfo('<?php echo esc_attr($votes_item->ip); ?>');" class="likebtn_ttip" title="<?php _e('View IP info', 'likebtn-like-button') ?>"><?php echo esc_html($votes_item->ip); ?></a> 286 286 <?php else: ?> 287 <a href="<?php echo admin_url() ?>admin.php?page=likebtn_settings#gdpr" class="likebtn_ttip" title="<?php _e('Viewing info for this IP is not available as GDPR compliance mode is enabled (click to change)', 'likebtn-like-button') ?>" target="blank"><?php echo $votes_item->ip; ?></a>287 <a href="<?php echo admin_url() ?>admin.php?page=likebtn_settings#gdpr" class="likebtn_ttip" title="<?php _e('Viewing info for this IP is not available as GDPR compliance mode is enabled (click to change)', 'likebtn-like-button') ?>" target="blank"><?php echo esc_html($votes_item->ip); ?></a> 288 288 <?php endif ?> 289 289 </td> 290 290 <td><?php echo date("Y.m.d H:i:s", strtotime($votes_item->created_at)); ?></td> 291 291 <td> 292 <img src="<?php echo _likebtn_get_public_url()?>img/thumb/<?php echo $entity_vote_type; ?>.png" alt="<?php _e(ucfirst($entity_vote_type), 'likebtn-like-button') ?>" title="<?php_e(ucfirst($entity_vote_type), 'likebtn-like-button') ?>" class="likebtn_ttip" />292 <img src="<?php echo _likebtn_get_public_url()?>img/thumb/<?php echo esc_attr($entity_vote_type); ?>.png" alt="<?php esc_attr_e(ucfirst($entity_vote_type), 'likebtn-like-button') ?>" title="<?php esc_attr_e(ucfirst($entity_vote_type), 'likebtn-like-button') ?>" class="likebtn_ttip" /> 293 293 </td> 294 <td><a href="<?php echo $item_url ?>" target="_blank"><?php echo $item_title; ?></a>294 <td><a href="<?php echo esc_attr($item_url) ?>" target="_blank"><?php echo esc_html($item_title); ?></a> 295 295 <?php if ($entity_type_name): ?> 296 296 — <?php echo esc_html($entity_type_name) ?><?php if (isset($entity_info['entity_id'])): ?> (<?php echo esc_html($entity_info['entity_id']); ?>)<?php endif ?> … … 311 311 <div class="tablenav"> 312 312 <div class="tablenav-pages"> 313 <?php echo $p->show(); ?>313 <?php echo wp_kses_post($p->show()); ?> 314 314 </div> 315 315 </div> … … 332 332 <tr> 333 333 <th><strong>IP</strong></th> 334 <td class="likebtn-ii-ip" width="50%"><img src="<?php echo $loader?>" /></td>334 <td class="likebtn-ii-ip" width="50%"><img src="<?php echo esc_attr($loader) ?>" /></td> 335 335 </tr> 336 336 <tr> 337 337 <th><strong><?php _e('Country', 'likebtn-like-button'); ?></strong></th> 338 <td class="likebtn-ii-country"><img src="<?php echo $loader?>" /></td>338 <td class="likebtn-ii-country"><img src="<?php echo esc_attr($loader) ?>" /></td> 339 339 </tr> 340 340 <tr> 341 341 <th><strong><?php _e('City', 'likebtn-like-button'); ?></strong></th> 342 <td class="likebtn-ii-city"><img src="<?php echo $loader?>" /></td>342 <td class="likebtn-ii-city"><img src="<?php echo esc_attr($loader) ?>" /></td> 343 343 </tr> 344 344 <tr> 345 345 <th><strong><?php _e('Lat/Long', 'likebtn-like-button'); ?></strong></th> 346 <td class="likebtn-ii-latlon"><img src="<?php echo $loader?>" /></td>346 <td class="likebtn-ii-latlon"><img src="<?php echo esc_attr($loader) ?>" /></td> 347 347 </tr> 348 348 <tr> 349 349 <th><strong><?php _e('Postal Code', 'likebtn-like-button'); ?></strong></th> 350 <td class="likebtn-ii-postal"><img src="<?php echo $loader?>" /></td>350 <td class="likebtn-ii-postal"><img src="<?php echo esc_attr($loader) ?>" /></td> 351 351 </tr> 352 352 <tr> 353 353 <th><strong><?php _e('Network', 'likebtn-like-button'); ?></strong></th> 354 <td class="likebtn-ii-network"><img src="<?php echo $loader?>" /></td>354 <td class="likebtn-ii-network"><img src="<?php echo esc_attr($loader) ?>" /></td> 355 355 </tr> 356 356 <tr> 357 357 <th><strong><?php _e('Hostname', 'likebtn-like-button'); ?></strong></th> 358 <td class="likebtn-ii-hostname"><img src="<?php echo $loader?>" /></td>358 <td class="likebtn-ii-hostname"><img src="<?php echo esc_attr($loader) ?>" /></td> 359 359 </tr> 360 360 </table> -
likebtn-like-button/tags/2.6.45/includes/um.php
r2722965 r2725864 42 42 ); 43 43 44 echo $widget->widget(array(), $instance);44 echo wp_kses_post($widget->widget(array(), $instance)); 45 45 } 46 46 -
likebtn-like-button/tags/2.6.45/likebtn_like_button.php
r2724991 r2725864 5868 5868 } catch (\Exception $e) { 5869 5869 // Return empty JSON 5870 //echo $e->getMessage();5870 //echo e->getMessage(); 5871 5871 } 5872 5872 … … 6782 6782 @header( 'Content-Type: application/javascript; charset=' . get_option( 'blog_charset' ) ); 6783 6783 if ($callback) { 6784 echo $callback.'(';6784 echo likebtn_strip_html($callback).'('; 6785 6785 } 6786 6786 echo json_encode( $response ); … … 7204 7204 @header( 'Content-Type: application/javascript; charset=' . get_option( 'blog_charset' ) ); 7205 7205 if (is_array($likebtn_response) && !empty($likebtn_response['body'])) { 7206 echo $likebtn_response['body'];7206 echo likebtn_strip_raw($likebtn_response['body']); 7207 7207 } else { 7208 7208 // Error … … 7949 7949 header("Content-type: application/csv; charset=UCS-2LE"); 7950 7950 header("Content-Disposition: attachment; filename=$filename"); 7951 echo $out;7951 echo likebtn_strip_raw($out); 7952 7952 exit; 7953 7953 } … … 8577 8577 } 8578 8578 8579 function likebtn_strip_raw($text) 8580 { 8581 return $text; 8582 } 8583 8579 8584 function likebtn_is_real_ip($ip) 8580 8585 { -
likebtn-like-button/tags/2.6.45/templates/admin_mail.php
r2722965 r2725864 23 23 <tr> 24 24 <td style="font-family: Arial,sans-serif; font-size: 14px; color: #202020; line-height: 1.6;"> 25 <?php echo $content?>25 <?php echo likebtn_strip_html($content) ?> 26 26 </td> 27 27 </tr> … … 39 39 <tr height="16px"> 40 40 <td> 41 <a href="<?php echo $siteurl; ?>" style="color:#bcbcbc;text-decoration:underline"><?php echo $blogname?></a>41 <a href="<?php echo esc_attr($siteurl); ?>" style="color:#bcbcbc;text-decoration:underline"><?php echo esc_html($blogname) ?></a> 42 42 </td> 43 43 </tr> -
likebtn-like-button/tags/2.6.45/templates/liked-by-user-widget.php
r2722965 r2725864 38 38 <?php echo esc_html($post['title']) ?><?php if ($show_likes || $show_dislikes): ?> <span class="likebtn-item-likes"><nobr>( 39 39 <?php endif ?> 40 <?php echo $show_likes ? (int)$post['likes'] : ''; ?>40 <?php echo ($show_likes ? (int)$post['likes'] : ''); ?> 41 41 <?php if ($show_likes && $show_dislikes): ?> 42 42 / 43 43 <?php endif ?> 44 <?php echo $show_dislikes ? (int)$post['dislikes'] : ''; ?>44 <?php echo ($show_dislikes ? (int)$post['dislikes'] : ''); ?> 45 45 <?php if ($show_likes || $show_dislikes): ?> 46 46 )</nobr></span> -
likebtn-like-button/tags/2.6.45/templates/most-liked-widget.php
r2722965 r2725864 38 38 <?php echo esc_html($post['title']) ?><?php if ($show_likes || $show_dislikes): ?> <span class="likebtn-item-likes"><nobr>( 39 39 <?php endif ?> 40 <?php echo $show_likes ? (int)$post['likes'] : ''; ?>40 <?php echo ($show_likes ? (int)$post['likes'] : ''); ?> 41 41 <?php if ($show_likes && $show_dislikes): ?> 42 42 / 43 43 <?php endif ?> 44 <?php echo $show_dislikes ? (int)$post['dislikes'] : ''; ?>44 <?php echo ($show_dislikes ? (int)$post['dislikes'] : ''); ?> 45 45 <?php if ($show_likes || $show_dislikes): ?> 46 46 )</nobr></span> … … 73 73 <p> 74 74 <?php if ($empty_text): ?> 75 <?php echo $empty_text; ?>75 <?php echo esc_html($empty_text); ?> 76 76 <?php else: ?> 77 77 <?php _e('No items liked yet.', 'likebtn-like-button'); ?>
Note: See TracChangeset
for help on using the changeset viewer.