Changeset 925774
- Timestamp:
- 06/03/2014 04:26:38 PM (12 years ago)
- Location:
- gabfire-widget-pack/trunk
- Files:
-
- 4 edited
-
admin/options.php (modified) (21 diffs)
-
gabfire-widgets.php (modified) (4 diffs)
-
readme.txt (modified) (10 diffs)
-
widget-ajaxtabs.php (modified) (18 diffs)
Legend:
- Unmodified
- Added
- Removed
-
gabfire-widget-pack/trunk/admin/options.php
r848737 r925774 105 105 ?> 106 106 <script type="text/javascript"> 107 $(document).ready(function() { 108 $('#textbox1').val($(this).is(':checked')); 109 107 jQuery(document).ready(function($) { 108 109 //Change widget status 110 111 $(".gabfire_checkbox").change(function() { 112 113 if ($(this).is(":checked")) { 114 $("." + $(this).attr("id")).removeClass("deactive").addClass("active"); 115 } else { 116 $("." + $(this).attr("id")).removeClass("active").addClass("deactive"); 117 } 118 119 }); 120 121 /* 122 $('#textbox1').val($(this).is(':checked')); 123 110 124 $('#checkbox1').change(function() { 111 125 $('.mycheck').val($(this).is(':checked')); 112 126 }); 113 }); 127 */ 128 }); 114 129 </script> 115 116 117 118 130 <div class="wrap gabfire-plugin-settings"> 119 131 120 132 <div id="panelheader"> 121 133 <div id="branding"> … … 127 139 Gabfire Widget Pack 128 140 </div> 129 </div> 130 141 </div> 142 131 143 <div class="metabox-holder has-right-sidebar "> 132 144 <div class="inner-sidebar"> … … 142 154 </div> 143 155 </div> 144 156 145 157 <div class="postbox"> 146 158 <h3><span>Social</span></h3> … … 154 166 </ul> 155 167 </div> 156 </div> 168 </div> 157 169 158 170 <div class="postbox"> … … 178 190 <input type="submit" class="button-primary" value="<?php _e('Save Changes', 'gabfire-widget-pack') ?>" /> 179 191 </div> 180 192 181 193 <div class="inside"> 182 194 183 195 <?php settings_fields('gab_plugin_options'); ?> 184 196 <?php $options = get_option('gab_options'); ?> 185 197 <p class="activate_widgets_notice"></p> 186 198 187 199 <div class="gabfire-col-left"> 188 200 189 201 <?php if(isset($options['about_widget']) && $options['about_widget'] == 1) { $state = "active"; } else { $state = "deactive"; } ?> 190 <div class="gab_option _box <?php echo $state; ?>">202 <div class="gab_options_about_widget gab_option_box <?php echo $state; ?>"> 191 203 <div class="gab_option_box_inner"> 192 204 <h3><?php _e('About Us','gabfire-widget-pack'); ?></h3> 193 205 <label class="widget_trigger"> 194 <input type="checkbox" name="gab_options[about_widget]" value="1" <?php if (isset($options['about_widget'])) { checked('1', $options['about_widget']); } ?> />206 <input type="checkbox" class="gabfire_checkbox" id="gab_options_about_widget" name="gab_options[about_widget]" value="1" <?php if (isset($options['about_widget'])) { checked('1', $options['about_widget']); } ?> /> 195 207 <span class="gab_switcher"> 196 208 <span class="gab_switcheron"><?php _e('ON','gabfire-widget-pack'); ?></span> … … 202 214 </div><!-- .gab_option_box_inner --> 203 215 </div> 204 216 205 217 <?php if(isset($options['ajaxtabs']) && $options['ajaxtabs'] == 1) { $state = "active"; } else { $state = "deactive"; } ?> 206 <div class="gab_option _box <?php echo $state; ?>">218 <div class="gab_options_ajaxtabs gab_option_box <?php echo $state; ?>"> 207 219 <div class="gab_option_box_inner"> 208 220 <h3><?php _e('Posts Tabs Widget','gabfire-widget-pack'); ?></h3> 209 210 <label class="widget_trigger"> 211 <input type="checkbox" name="gab_options[ajaxtabs]" value="1" <?php if (isset($options['ajaxtabs'])) { checked('1', $options['ajaxtabs']); } ?> />221 222 <label class="widget_trigger"> 223 <input type="checkbox" class="gabfire_checkbox" id="gab_options_ajaxtabs" name="gab_options[ajaxtabs]" value="1" <?php if (isset($options['ajaxtabs'])) { checked('1', $options['ajaxtabs']); } ?> /> 212 224 <span class="gab_switcher"> 213 225 <span class="gab_switcheron"><?php _e('ON','gabfire-widget-pack'); ?></span> … … 219 231 </div><!-- .gab_option_box_inner --> 220 232 </div> 221 233 222 234 <?php if(isset($options['authorbadge']) && $options['authorbadge'] == 1) { $state = "active"; } else { $state = "deactive"; } ?> 223 <div class="gab_option _box <?php echo $state; ?>">235 <div class="gab_options_authorbadge gab_option_box <?php echo $state; ?>"> 224 236 <div class="gab_option_box_inner"> 225 237 <h3><?php _e('Author Badge','gabfire-widget-pack'); ?></h3> 226 227 <label class="widget_trigger"> 228 <input type="checkbox" name="gab_options[authorbadge]" value="1" <?php if (isset($options['authorbadge'])) { checked('1', $options['authorbadge']); } ?> />238 239 <label class="widget_trigger"> 240 <input type="checkbox" class="gabfire_checkbox" id="gab_options_authorbadge" name="gab_options[authorbadge]" value="1" <?php if (isset($options['authorbadge'])) { checked('1', $options['authorbadge']); } ?> /> 229 241 <span class="gab_switcher"> 230 242 <span class="gab_switcheron"><?php _e('ON','gabfire-widget-pack'); ?></span> … … 236 248 </div><!-- .gab_option_box_inner --> 237 249 </div> 238 250 239 251 <?php if(isset($options['social']) && $options['social'] == 1) { $state = "active"; } else { $state = "deactive"; } ?> 240 <div class="gab_option _box <?php echo $state; ?>">252 <div class="gab_options_social gab_option_box <?php echo $state; ?>"> 241 253 <div class="gab_option_box_inner"> 242 254 <h3><?php _e('Social Icons','gabfire-widget-pack'); ?></h3> 243 244 <label class="widget_trigger"> 245 <input type="checkbox" name="gab_options[social]" value="1" <?php if (isset($options['social'])) { checked('1', $options['social']); } ?> />255 256 <label class="widget_trigger"> 257 <input type="checkbox" class="gabfire_checkbox" id="gab_options_social" name="gab_options[social]" value="1" <?php if (isset($options['social'])) { checked('1', $options['social']); } ?> /> 246 258 <span class="gab_switcher"> 247 259 <span class="gab_switcheron"><?php _e('ON','gabfire-widget-pack'); ?></span> … … 252 264 <p><?php _e('Get connected with your visitors and let them know where they could find you on social platforms','gabfire-widget-pack'); ?></p> 253 265 </div><!-- .gab_option_box_inner --> 254 </div> 255 266 </div> 267 256 268 <?php if(isset($options['feedburner']) && $options['feedburner'] == 1) { $state = "active"; } else { $state = "deactive"; } ?> 257 <div class="gab_option _box <?php echo $state; ?>">269 <div class="gab_options_feedburner gab_option_box <?php echo $state; ?>"> 258 270 <div class="gab_option_box_inner"> 259 271 <h3><?php _e('Feedburner Email Subscribe','gabfire-widget-pack'); ?></h3> 260 261 <label class="widget_trigger"> 262 <input type="checkbox" name="gab_options[feedburner]" value="1" <?php if (isset($options['feedburner'])) { checked('1', $options['feedburner']); } ?> />272 273 <label class="widget_trigger"> 274 <input type="checkbox" class="gabfire_checkbox" id="gab_options_feedburner" name="gab_options[feedburner]" value="1" <?php if (isset($options['feedburner'])) { checked('1', $options['feedburner']); } ?> /> 263 275 <span class="gab_switcher"> 264 276 <span class="gab_switcheron"><?php _e('ON','gabfire-widget-pack'); ?></span> … … 269 281 <p><?php _e('Display an input field where your visitors could easily signup to Feedburner Email subscription list.','gabfire-widget-pack'); ?></p> 270 282 </div><!-- .gab_option_box_inner --> 271 </div> 272 283 </div> 284 273 285 <?php if(isset($options['popular_random']) && $options['popular_random'] == 1) { $state = "active"; } else { $state = "deactive"; } ?> 274 <div class="gab_option _box <?php echo $state; ?>">275 <div class="gab_option_box_inner"> 286 <div class="gab_options_popular_random gab_option_box <?php echo $state; ?>"> 287 <div class="gab_option_box_inner"> 276 288 <h3><?php _e('Popular/Random Entries','gabfire-widget-pack'); ?></h3> 277 278 <label class="widget_trigger"> 279 <input type="checkbox" name="gab_options[popular_random]" value="1" <?php if (isset($options['popular_random'])) { checked('1', $options['popular_random']); } ?> />289 290 <label class="widget_trigger"> 291 <input type="checkbox" class="gabfire_checkbox" id="gab_options_popular_random" name="gab_options[popular_random]" value="1" <?php if (isset($options['popular_random'])) { checked('1', $options['popular_random']); } ?> /> 280 292 <span class="gab_switcher"> 281 293 <span class="gab_switcheron"><?php _e('ON','gabfire-widget-pack'); ?></span> … … 286 298 <p><?php _e('Gabfire Random/Popular/Recent Posts: Display random, recent or most popular posts.','gabfire-widget-pack'); ?></p> 287 299 </div><!-- .gab_option_box_inner --> 288 </div> 289 300 </div> 301 290 302 </div><!-- .gabfire-col-left --> 291 292 <div class="gabfire-col-right"> 293 303 304 <div class="gabfire-col-right"> 305 294 306 <?php if(isset($options['flickrrss']) && $options['flickrrss'] == 1) { $state = "active"; } else { $state = "deactive"; } ?> 295 <div class="gab_option _box <?php echo $state; ?>">307 <div class="gab_options_flickrrss gab_option_box <?php echo $state; ?>"> 296 308 <div class="gab_option_box_inner"> 297 309 <h3><?php _e('Flickr Images','gabfire-widget-pack'); ?></h3> 298 299 <label class="widget_trigger"> 300 <input type="checkbox" name="gab_options[flickrrss]" value="1" <?php if (isset($options['flickrrss'])) { checked('1', $options['flickrrss']); } ?> />310 311 <label class="widget_trigger"> 312 <input type="checkbox" class="gabfire_checkbox" id="gab_options_flickrrss" name="gab_options[flickrrss]" value="1" <?php if (isset($options['flickrrss'])) { checked('1', $options['flickrrss']); } ?> /> 301 313 <span class="gab_switcher"> 302 314 <span class="gab_switcheron"><?php _e('ON','gabfire-widget-pack'); ?></span> … … 307 319 <p><?php _e('Choose the criteria and display Flickr photos on your site.','gabfire-widget-pack'); ?></p> 308 320 </div><!-- .gab_option_box_inner --> 309 </div> 310 321 </div> 322 311 323 <?php if(isset($options['archive_widget']) && $options['archive_widget'] == 1) { $state = "active"; } else { $state = "deactive"; } ?> 312 <div class="gab_option _box <?php echo $state; ?>">324 <div class="gab_options_archive_widget gab_option_box <?php echo $state; ?>"> 313 325 <div class="gab_option_box_inner"> 314 326 <h3><?php _e('Archive Search','gabfire-widget-pack'); ?></h3> 315 316 <label class="widget_trigger"> 317 <input type="checkbox" name="gab_options[archive_widget]" value="1" <?php if (isset($options['archive_widget'])) { checked('1', $options['archive_widget']); } ?> />327 328 <label class="widget_trigger"> 329 <input type="checkbox" class="gabfire_checkbox" id="gab_options_archive_widget" name="gab_options[archive_widget]" value="1" <?php if (isset($options['archive_widget'])) { checked('1', $options['archive_widget']); } ?> /> 318 330 <span class="gab_switcher"> 319 331 <span class="gab_switcheron"><?php _e('ON','gabfire-widget-pack'); ?></span> … … 324 336 <p><?php _e('A quick option for your visitors to search in archive of your website.','gabfire-widget-pack'); ?></p> 325 337 </div><!-- .gab_option_box_inner --> 326 </div> 327 338 </div> 339 328 340 <?php if(isset($options['relatedposts']) && $options['relatedposts'] == 1) { $state = "active"; } else { $state = "deactive"; } ?> 329 <div class="gab_option _box <?php echo $state; ?>">330 <div class="gab_option_box_inner"> 341 <div class="gab_options_relatedposts gab_option_box <?php echo $state; ?>"> 342 <div class="gab_option_box_inner"> 331 343 <h3><?php _e('Related Posts','gabfire-widget-pack'); ?></h3> 332 333 <label class="widget_trigger"> 334 <input type="checkbox" name="gab_options[relatedposts]" value="1" <?php if (isset($options['relatedposts'])) { checked('1', $options['relatedposts']); } ?> />344 345 <label class="widget_trigger"> 346 <input type="checkbox" class="gabfire_checkbox" id="gab_options_relatedposts" name="gab_options[relatedposts]" value="1" <?php if (isset($options['relatedposts'])) { checked('1', $options['relatedposts']); } ?> /> 335 347 <span class="gab_switcher"> 336 348 <span class="gab_switcheron"><?php _e('ON','gabfire-widget-pack'); ?></span> … … 342 354 </div><!-- .gab_option_box_inner --> 343 355 </div> 344 356 345 357 <?php if(isset($options['search']) && $options['search'] == 1) { $state = "active"; } else { $state = "deactive"; } ?> 346 <div class="gab_option _box <?php echo $state; ?>">347 <div class="gab_option _box_inner">358 <div class="gab_options_search gab_option_box <?php echo $state; ?>"> 359 <div class="gab_options_search gab_option_box_inner"> 348 360 <h3><?php _e('Search','gabfire-widget-pack'); ?></h3> 349 350 <label class="widget_trigger"> 351 <input type="checkbox" name="gab_options[search]" value="1" <?php if (isset($options['search'])) { checked('1', $options['search']); } ?> />361 362 <label class="widget_trigger"> 363 <input type="checkbox" class="gabfire_checkbox" id="gab_options_search" name="gab_options[search]" value="1" <?php if (isset($options['search'])) { checked('1', $options['search']); } ?> /> 352 364 <span class="gab_switcher"> 353 365 <span class="gab_switcheron"><?php _e('ON','gabfire-widget-pack'); ?></span> … … 359 371 </div><!-- .gab_option_box_inner --> 360 372 </div> 361 373 362 374 <?php if(isset($options['share']) && $options['share'] == 1) { $state = "active"; } else { $state = "deactive"; } ?> 363 <div class="gab_option _box <?php echo $state; ?>">364 <div class="gab_option_box_inner"> 375 <div class="gab_options_share gab_option_box <?php echo $state; ?>"> 376 <div class="gab_option_box_inner"> 365 377 <h3><?php _e('Share Posts','gabfire-widget-pack'); ?></h3> 366 367 <label class="widget_trigger"> 368 <input type="checkbox" name="gab_options[share]" value="1" <?php if (isset($options['share'])) { checked('1', $options['share']); } ?> />378 379 <label class="widget_trigger"> 380 <input type="checkbox" class="gabfire_checkbox" id="gab_options_share" name="gab_options[share]" value="1" <?php if (isset($options['share'])) { checked('1', $options['share']); } ?> /> 369 381 <span class="gab_switcher"> 370 382 <span class="gab_switcheron"><?php _e('ON','gabfire-widget-pack'); ?></span> … … 376 388 </div><!-- .gab_option_box_inner --> 377 389 </div> 378 390 379 391 <?php if(isset($options['text_widget']) && $options['text_widget'] == 1) { $state = "active"; } else { $state = "deactive"; } ?> 380 <div class="gab_option _box <?php echo $state; ?>">392 <div class="gab_options_text_widget gab_option_box <?php echo $state; ?>"> 381 393 <div class="gab_option_box_inner"> 382 394 <h3><?php _e('Gabfire Text+ Widget','gabfire-widget-pack'); ?></h3> 383 384 <label class="widget_trigger"> 385 <input type="checkbox" name="gab_options[text_widget]" value="1" <?php if (isset($options['text_widget'])) { checked('1', $options['text_widget']); } ?> />395 396 <label class="widget_trigger"> 397 <input type="checkbox" class="gabfire_checkbox" id="gab_options_text_widget" name="gab_options[text_widget]" value="1" <?php if (isset($options['text_widget'])) { checked('1', $options['text_widget']); } ?> /> 386 398 <span class="gab_switcher"> 387 399 <span class="gab_switcheron"><?php _e('ON','gabfire-widget-pack'); ?></span> … … 393 405 </div><!-- .gab_option_box_inner --> 394 406 </div> 395 407 396 408 <?php if(isset($options['contact_info']) && $options['contact_info'] == 1) { $state = "active"; } else { $state = "deactive"; } ?> 397 <div class="gab_option _box <?php echo $state; ?>">409 <div class="gab_options_contact_info gab_option_box <?php echo $state; ?>"> 398 410 <div class="gab_option_box_inner"> 399 411 <h3><?php _e('Contact Information','gabfire-widget-pack'); ?></h3> 400 401 <label class="widget_trigger"> 402 <input type="checkbox" name="gab_options[contact_info]" value="1" <?php if (isset($options['contact_info'])) { checked('1', $options['contact_info']); } ?> />412 413 <label class="widget_trigger"> 414 <input type="checkbox" class="gabfire_checkbox" id="gab_options_contact_info" name="gab_options[contact_info]" value="1" <?php if (isset($options['contact_info'])) { checked('1', $options['contact_info']); } ?> /> 403 415 <span class="gab_switcher"> 404 416 <span class="gab_switcheron"><?php _e('ON','gabfire-widget-pack'); ?></span> … … 409 421 <p><?php _e('Display company logo and adress and phone number to your visitors','gabfire-widget-pack'); ?></p> 410 422 </div><!-- .gab_option_box_inner --> 411 </div> 412 413 </div><!-- .gabfire-col-right --> 414 423 </div> 424 425 </div><!-- .gabfire-col-right --> 426 415 427 <div class="clearfix"></div> 416 428 417 429 <?php if(isset($options['recent_tweets']) && $options['recent_tweets'] == 1) { $state = "active"; } else { $state = "deactive"; } ?> 418 <div class="gab_option _box <?php echo $state; ?>">430 <div class="gab_options_recent_tweets gab_option_box <?php echo $state; ?>"> 419 431 <div class="gab_option_box_inner"> 420 432 <h3><?php _e('Recent Tweets','gabfire-widget-pack'); ?></h3> 421 433 422 434 <label class="widget_trigger"> 423 <input type="checkbox" name="gab_options[recent_tweets]" value="1" <?php if (isset($options['recent_tweets'])) { checked('1', $options['recent_tweets']); } ?> />435 <input type="checkbox" class="gabfire_checkbox" id="gab_options_recent_tweets" name="gab_options[recent_tweets]" value="1" <?php if (isset($options['recent_tweets'])) { checked('1', $options['recent_tweets']); } ?> /> 424 436 <span class="gab_switcher"> 425 437 <span class="gab_switcheron"><?php _e('ON','gabfire-widget-pack'); ?></span> … … 429 441 </label> 430 442 <p><?php _e('Get recent Tweets based on an username or #hashtag. Visit <a target="_blank" href="https://dev.twitter.com/apps">https://dev.twitter.com/apps</a> to get your application and secret keys.','gabfire-widget-pack'); ?></p> 431 443 432 444 <p><?php _e('','gabfire-widget-pack'); ?></p> 433 445 <div class="gabfire-col-left"> 434 <?php _e('Consumer Key','gabfire-widget-pack'); ?><input type="text" class="widefat" size="57" name="gab_options[key]" value="<?php echo $options['key']; ?>" />435 <?php _e('Consumer Secret','gabfire-widget-pack'); ?><input type="text" class="widefat" size="57" name="gab_options[secret]" value="<?php echo $options['secret']; ?>" />446 <?php _e('Consumer Key','gabfire-widget-pack'); ?><input type="text" class="widefat" size="57" name="gab_options[key]" value="<?php echo esc_attr($options['key']); ?>" /> 447 <?php _e('Consumer Secret','gabfire-widget-pack'); ?><input type="text" class="widefat" size="57" name="gab_options[secret]" value="<?php echo esc_attr($options['secret']); ?>" /> 436 448 </div> 437 449 <div class="gabfire-col-right"> 438 <?php _e('Access Token Key','gabfire-widget-pack'); ?><input type="text" class="widefat" size="57" name="gab_options[token_key]" value="<?php echo $options['token_key']; ?>" />439 <?php _e('Access Token Secret','gabfire-widget-pack'); ?><input type="text" class="widefat" size="57" name="gab_options[token_secret]" value="<?php echo $options['token_secret']; ?>" />450 <?php _e('Access Token Key','gabfire-widget-pack'); ?><input type="text" class="widefat" size="57" name="gab_options[token_key]" value="<?php echo esc_attr($options['token_key']); ?>" /> 451 <?php _e('Access Token Secret','gabfire-widget-pack'); ?><input type="text" class="widefat" size="57" name="gab_options[token_secret]" value="<?php echo esc_attr($options['token_secret']); ?>" /> 440 452 </div> 441 453 <div class="clearfix"></div> 442 454 </div><!-- .gab_option_box_inner --> 443 </div> 455 </div> 444 456 </div> <!-- .inside --> 445 457 446 458 <div class="gabfire_options_submit submit-bottom"> 447 459 <p class="activate_widgets_notice"><?php _e('Activate the widgets you wish to enable and <strong>Save Changes</strong>','gabfire-widget-pack'); ?></p> 448 460 <input type="submit" class="button-primary" value="<?php _e('Save Changes', 'gabfire-widget-pack') ?>" /> 449 </div> 461 </div> 450 462 </div><!-- .postbox --> 451 463 </form> … … 454 466 455 467 </div> <!-- .metabox-holder --> 456 457 </div> <!-- .wrap --> 458 459 <?php 468 469 </div> <!-- .wrap --> 470 471 <?php 460 472 } 461 473 … … 464 476 // strip html from textboxes 465 477 // Sanitize textbox input (strip html tags, and escape characters) 466 $input['key'] = wp_filter_nohtml_kses($input['key']); 478 $input['key'] = wp_filter_nohtml_kses($input['key']); 467 479 $input['secret'] = wp_filter_nohtml_kses($input['secret']); 468 480 $input['token_key'] = wp_filter_nohtml_kses($input['token_key']); -
gabfire-widget-pack/trunk/gabfire-widgets.php
r921164 r925774 5 5 Description: This plugin adds a bundle of the most commonly used widgets to your site. 6 6 Author: Gabfire Themes 7 Version: 1.3. 47 Version: 1.3.5 8 8 Author URI: http://www.gabfirethemes.com 9 9 10 10 Copyright 2013 Gabfire Themes (email : info@gabfire.com) 11 11 12 12 This program is free software; you can redistribute it and/or modify 13 it under the terms of the GNU General Public License, version 2, as 13 it under the terms of the GNU General Public License, version 2, as 14 14 published by the Free Software Foundation. 15 15 … … 17 17 but WITHOUT ANY WARRANTY; without even the implied warranty of 18 18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 GNU General Public License for more details. 19 GNU General Public License for more details. 20 20 */ 21 21 22 define( 'GABFIRE_WIDGETS_VERSION', '1.3. 4');22 define( 'GABFIRE_WIDGETS_VERSION', '1.3.5'); 23 23 define( 'GABFIRE_WIDGETS_DIR', dirname(__FILE__) ); 24 24 define( 'GABFIRE_WIDGETS_URL', plugins_url().'/gabfire-widget-pack' ); … … 33 33 } 34 34 35 add_action('init', 'gabfire_widget_pack_load_plugin_textdomain'); 36 37 function gabfire_widget_pack_load_plugin_textdomain() { 38 load_plugin_textdomain('gabfire-widget-pack', false, basename( dirname( __FILE__ ) ) . '/lang'); 39 } 40 35 41 require_once( GABFIRE_WIDGETS_DIR . '/admin/options.php' ); 36 42 $gabfire_options = get_option('gab_options'); … … 43 49 * Check to see if there is an option if not set to default option 44 50 */ 45 51 46 52 $gabfire_default_option = array( 47 53 'about_widget' => 0, -
gabfire-widget-pack/trunk/readme.txt
r921164 r925774 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html 9 9 10 The Gabfire Widget Pack contains over a dozen useful widgets to extend your WordPress site. It is a free plugin that will work with ANY theme. 10 The Gabfire Widget Pack contains over a dozen useful widgets to extend your WordPress site. It is a free plugin that will work with ANY theme. 11 11 12 12 == Description == 13 13 14 The Gabfire Widget Pack is a feature-packed plugin that adds the most commonly used widgets to your site. Rather than having to download several plugins by various authors, this plugin bundles together the most popular widgets. 14 The Gabfire Widget Pack is a feature-packed plugin that adds the most commonly used widgets to your site. Rather than having to download several plugins by various authors, this plugin bundles together the most popular widgets. 15 15 16 16 It is maintained by the folks over at http://www.gabfirethemes.com … … 24 24 * By Hashtag 25 25 26 This widget uses the latest Twitter oAuth method to retrieve tweets to ensure compatibility. 26 This widget uses the latest Twitter oAuth method to retrieve tweets to ensure compatibility. 27 27 28 28 = Widget: Archive Search = … … 31 31 * By Archive Month 32 32 * By Category 33 * By Keyword using Google Search 33 * By Keyword using Google Search 34 34 35 35 This is great widget for content-heavy sites. … … 41 41 * Retrieve images based on tag 42 42 * Determine order of images 43 * Determine the number and size of images 43 * Determine the number and size of images 44 44 45 45 This is one of those quick set it and forget it widgets that does wonders for your site. … … 49 49 50 50 * Set your label 51 * Set your style and background 51 * Set your style and background 52 52 53 53 Search is not dead! … … 56 56 Every site has a social media presence. Let your visitors find your across any of the social media platforms with this widget. 57 57 58 * Simply provide links to your social media networks 58 * Simply provide links to your social media networks 59 59 60 60 = Widget: Post Tabs = … … 63 63 * Recent Posts 64 64 * Recent Comments 65 * Popular Posts (based on tags) 65 * Popular Posts (based on tags) 66 66 67 67 In addition, the Post Tabs widget offers a light and dark color scheme, ability to show post meta details and avatars, and choose the number of posts to display. … … 73 73 * Author's Gravatar (if any) 74 74 * Author's social media links 75 * Link to Author's Posts 75 * Link to Author's Posts 76 76 77 77 Author badge shows at single post and author pages only. This badge will not shown if Author bio is left empty. Go to User profile page to enter Facebook, Twitter, Google+, and Author website URL details. … … 89 89 * Twitter Share 90 90 * Google+ Box 91 * Pinterest Pin 91 * Pinterest Pin 92 92 93 93 = Widget: Text+ Widget = 94 A slight twist on the original. This text widget gives you the ability to have an icon and button that links to any post or page of your choice. 94 A slight twist on the original. This text widget gives you the ability to have an icon and button that links to any post or page of your choice. 95 95 96 For more details, visit [Gabfire Themes] (http://www.gabfirethemes.com "Best WordPress Themes"). 96 For more details, visit [Gabfire Themes] (http://www.gabfirethemes.com "Best WordPress Themes"). 97 97 98 98 == Installation == 99 99 100 You can install the Gabfire Widget Pack from your WordPress Dashboard or manually via FTP. 100 You can install the Gabfire Widget Pack from your WordPress Dashboard or manually via FTP. 101 101 102 102 = From WordPress Dashboard = 103 103 104 # Navigate to 'Plugins -> Add New' from your WordPress dashboard. 105 # Search for `Gabfire Widget Pack` and install it. 104 # Navigate to 'Plugins -> Add New' from your WordPress dashboard. 105 # Search for `Gabfire Widget Pack` and install it. 106 106 # Activate the plugin from Plugins menu. 107 107 # Enable the widgets you wish to activate from Appearance -> Gabfire Widget Pack … … 135 135 == Changelog == 136 136 137 New Changes 137 = 1.3.5 = 138 * Fixes bug with internationalization 138 139 139 140 = 1.3.4 = -
gabfire-widget-pack/trunk/widget-ajaxtabs.php
r911607 r925774 4 4 if (!function_exists('gabfire_ajaxtabs_js')) { 5 5 function gabfire_ajaxtabs_js() { 6 wp_deregister_script( 'jquery' ); 6 wp_deregister_script( 'jquery' ); 7 7 wp_enqueue_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'); 8 wp_enqueue_script('jquerytools', plugins_url() .'/gabfire-widget-pack/js/jquery.tools.min.js',array( 'jquery' )); 8 wp_enqueue_script('jquerytools', plugins_url() .'/gabfire-widget-pack/js/jquery.tools.min.js',array( 'jquery' )); 9 9 } 10 10 } … … 12 12 /* AJAX TABS */ 13 13 class gabfire_ajaxtabs extends WP_Widget { 14 14 15 15 function gabfire_ajaxtabs() { 16 16 $widget_ops = array( 'classname' => 'gabfire_ajaxtabs', 'description' => 'Display recent entries and comments (ajax tab supported)' ); … … 18 18 $this->WP_Widget( 'gabfire_ajaxtabs', 'Gabfire: Posts Tabs Widget', $widget_ops, $control_ops); 19 19 } 20 21 function widget($args, $instance) { 20 21 function widget($args, $instance) { 22 23 global $post; 24 22 25 extract( $args ); 23 26 $title = $instance['title']; … … 48 51 <?php if (intval($comment_nr) > 0 ) { ?><li class="gab_thirdtab"><a href="#second"><?php echo esc_attr( $comment_label ); ?></a></li><?php } ?> 49 52 </ul> 50 53 51 54 <div class="panes"> 52 55 <?php if (intval($post_nr) > 0 ) { ?> … … 57 60 <ul> 58 61 <?php 59 $count =1;60 $args = array( 'posts_per_page'=> $post_nr, ); 61 $gab_query = new WP_Query();$gab_query->query($args); 62 $count = 1; 63 $args = array( 'posts_per_page'=> $post_nr, ); 64 $gab_query = new WP_Query();$gab_query->query($args); 62 65 while ($gab_query->have_posts()) : $gab_query->the_post(); 63 66 ?> … … 73 76 'enable_thumb' => 1, 74 77 'resize_type' => 'c', 75 'media_width' => 35, 76 'media_height' => 35, 78 'media_width' => 35, 79 'media_height' => 35, 77 80 'enable_default' => 0 78 81 )); … … 89 92 </div> 90 93 <?php } ?> 91 94 92 95 <?php if (intval($popular_nr) > 0 ) { ?> 93 96 <div> … … 98 101 <?php 99 102 $count=1; 100 $args = array( 'posts_per_page'=> $popular_nr, 'orderby' => 'comment_count'); 101 $gab_query = new WP_Query();$gab_query->query($args); 103 $args = array( 'posts_per_page'=> $popular_nr, 'orderby' => 'comment_count'); 104 $gab_query = new WP_Query();$gab_query->query($args); 102 105 while ($gab_query->have_posts()) : $gab_query->the_post(); 103 106 ?> … … 113 116 'enable_thumb' => 1, 114 117 'resize_type' => 'c', 115 'media_width' => 35, 116 'media_height' => 35, 118 'media_width' => 35, 119 'media_height' => 35, 117 120 'enable_default' => 0 118 121 )); 119 } else { 122 } else { 120 123 echo get_the_post_thumbnail($post->ID, 'thumbnail'); 121 } 124 } 122 125 ?> 123 126 <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'gabfire-widget-pack' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a> … … 144 147 $comments = get_comments($args); 145 148 foreach($comments as $comment) : 146 echo '<li class="no-list-image">'; 149 echo '<li class="no-list-image">'; 147 150 if($avatar) { 148 151 echo get_avatar( $comment->comment_author_email, 35 ); … … 157 160 </div> 158 161 </div> 159 160 <?php 161 162 echo $after_widget; 162 163 <?php 164 165 echo $after_widget; 163 166 } 164 167 … … 169 172 $instance['a_avatar'] = $new_instance['a_avatar'] ? '1' : '0'; 170 173 $instance['colorsc'] = $new_instance['colorsc'] ? '1' : '0'; 171 $instance['post_nr'] = (int) $new_instance['post_nr']; 174 $instance['post_nr'] = (int) $new_instance['post_nr']; 172 175 $instance['post_title'] = ( ! empty( $new_instance['post_title'] ) ) ? sanitize_text_field( $new_instance['post_title'] ) : ''; 173 176 $instance['popular_title'] = ( ! empty( $new_instance['popular_title'] ) ) ? sanitize_text_field( $new_instance['popular_title'] ) : ''; … … 175 178 $instance['comment_label'] = ( ! empty( $new_instance['comment_label'] ) ) ? sanitize_text_field( $new_instance['comment_label'] ) : ''; 176 179 $instance['popular_label'] = ( ! empty( $new_instance['popular_label'] ) ) ? sanitize_text_field( $new_instance['popular_label'] ) : ''; 177 $instance['comment_nr'] = (int) $new_instance['comment_nr']; 178 $instance['popular_nr'] = (int) $new_instance['popular_nr']; 180 $instance['comment_nr'] = (int) $new_instance['comment_nr']; 181 $instance['popular_nr'] = (int) $new_instance['popular_nr']; 179 182 return $new_instance; 180 183 } 181 184 182 185 function form($instance) { 183 $defaults = array( 186 $defaults = array( 184 187 'title' => 'Posts', 185 188 'post_label' => 'Latest', 186 189 'comment_label' => 'Comments', 187 190 'popular_label' => 'Popular', 188 'post_nr' => '5', 191 'post_nr' => '5', 189 192 'comment_nr' => '5', 190 193 'popular_nr' => '5', … … 196 199 'a_avatar' => '1', 197 200 ); 198 $instance = wp_parse_args( (array) $instance, $defaults ); 201 $instance = wp_parse_args( (array) $instance, $defaults ); 199 202 ?> 200 203 … … 203 206 <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($instance['title']); ?>" /> 204 207 </p> 205 208 206 209 <p> 207 210 <label for="<?php echo $this->get_field_id('post_label'); ?>"><?php _e('Recent Posts tab label','gabfire-widget-pack'); ?></label> 208 211 <input class="widefat" id="<?php echo $this->get_field_id('post_label'); ?>" name="<?php echo $this->get_field_name('post_label'); ?>" type="text" value="<?php echo esc_attr($instance['post_label']); ?>" /> 209 212 </p> 210 213 211 214 <p> 212 215 <label for="<?php echo $this->get_field_id('comment_label'); ?>"><?php _e('Comments tab label','gabfire-widget-pack'); ?></label> 213 216 <input class="widefat" id="<?php echo $this->get_field_id('comment_label'); ?>" name="<?php echo $this->get_field_name('comment_label'); ?>" type="text" value="<?php echo esc_attr($instance['comment_label']); ?>" /> 214 217 </p> 215 218 216 219 <p> 217 220 <label for="<?php echo $this->get_field_id('popular_label'); ?>"><?php _e('Popular tab label','gabfire-widget-pack'); ?></label> 218 221 <input class="widefat" id="<?php echo $this->get_field_id('popular_label'); ?>" name="<?php echo $this->get_field_name('popular_label'); ?>" type="text" value="<?php echo esc_attr($instance['popular_label']); ?>" /> 219 222 </p> 220 223 221 224 <p> 222 225 <label for="<?php echo $this->get_field_id('post_title'); ?>"><?php _e('Recent Posts List Title','gabfire-widget-pack'); ?></label> 223 226 <input class="widefat" id="<?php echo $this->get_field_id('post_title'); ?>" name="<?php echo $this->get_field_name('post_title'); ?>" type="text" value="<?php echo esc_attr($instance['post_title']); ?>" /> 224 227 </p> 225 228 226 229 <p> 227 230 <label for="<?php echo $this->get_field_id('popular_title'); ?>"><?php _e('Popular Posts List Title','gabfire-widget-pack'); ?></label> 228 231 <input class="widefat" id="<?php echo $this->get_field_id('popular_title'); ?>" name="<?php echo $this->get_field_name('popular_title'); ?>" type="text" value="<?php echo esc_attr($instance['popular_title']); ?>" /> 229 </p> 230 232 </p> 233 231 234 <p> 232 235 <label for="<?php echo $this->get_field_id('comments_title'); ?>"><?php _e('Comments List Title','gabfire-widget-pack'); ?></label> … … 235 238 236 239 <p> 237 <label for="<?php echo $this->get_field_id( 'colorsc' ); ?>"><?php _e('Color Scheme','gabfire-widget-pack'); ?></label> 240 <label for="<?php echo $this->get_field_id( 'colorsc' ); ?>"><?php _e('Color Scheme','gabfire-widget-pack'); ?></label> 238 241 <select id="<?php echo $this->get_field_id( 'colorsc' ); ?>" name="<?php echo $this->get_field_name( 'colorsc' ); ?>"> 239 242 <option value="1" <?php selected( $instance['colorsc'], '1' ); ?>><?php _e('Light','gabfire-widget-pack'); ?></option> 240 <option value="0" <?php selected( $instance['colorsc'], '0' ); ?>><?php _e('Dark','gabfire-widget-pack'); ?></option> 241 </select> 242 </p> 243 244 <p> 245 <label for="<?php echo $this->get_field_id( 'postmeta' ); ?>"><?php _e('Display post meta below title','gabfire-widget-pack'); ?></label> 243 <option value="0" <?php selected( $instance['colorsc'], '0' ); ?>><?php _e('Dark','gabfire-widget-pack'); ?></option> 244 </select> 245 </p> 246 247 <p> 248 <label for="<?php echo $this->get_field_id( 'postmeta' ); ?>"><?php _e('Display post meta below title','gabfire-widget-pack'); ?></label> 246 249 <select id="<?php echo $this->get_field_id( 'postmeta' ); ?>" name="<?php echo $this->get_field_name( 'postmeta' ); ?>"> 247 250 <option value="1" <?php selected( $instance['postmeta'] , '1' ); ?>><?php _e('Enable','gabfire-widget-pack'); ?></option> 248 <option value="0" <?php selected( $instance['postmeta'] , '0' ); ?>><?php _e('Disable','gabfire-widget-pack'); ?></option> 249 </select> 250 </p> 251 252 <p> 253 <label for="<?php echo $this->get_field_id( 'a_avatar' ); ?>"><?php _e('Display author avatar for comments','gabfire-widget-pack'); ?></label> 251 <option value="0" <?php selected( $instance['postmeta'] , '0' ); ?>><?php _e('Disable','gabfire-widget-pack'); ?></option> 252 </select> 253 </p> 254 255 <p> 256 <label for="<?php echo $this->get_field_id( 'a_avatar' ); ?>"><?php _e('Display author avatar for comments','gabfire-widget-pack'); ?></label> 254 257 <select id="<?php echo $this->get_field_id( 'a_avatar' ); ?>" name="<?php echo $this->get_field_name( 'a_avatar' ); ?>"> 255 258 <option value="1" <?php selected( $instance['a_avatar'], '1' ); ?>><?php _e('Enable','gabfire-widget-pack'); ?></option> 256 <option value="0" <?php selected( $instance['a_avatar'], '0' ); ?>><?php _e('Disable','gabfire-widget-pack'); ?></option> 257 </select> 258 </p> 259 259 <option value="0" <?php selected( $instance['a_avatar'], '0' ); ?>><?php _e('Disable','gabfire-widget-pack'); ?></option> 260 </select> 261 </p> 262 260 263 <p> 261 264 <label for="<?php echo $this->get_field_name( 'post_nr' ); ?>"><?php _e('Number of posts','gabfire-widget-pack'); ?></label> 262 <select id="<?php echo $this->get_field_id( 'post_nr' ); ?>" name="<?php echo $this->get_field_name( 'post_nr' ); ?>"> 265 <select id="<?php echo $this->get_field_id( 'post_nr' ); ?>" name="<?php echo $this->get_field_name( 'post_nr' ); ?>"> 263 266 <?php 264 267 for ( $i = 0; $i <= 15; ++$i ) … … 266 269 ?> 267 270 </select> 268 </p> 269 271 </p> 272 270 273 <p> 271 274 <label for="<?php echo $this->get_field_name( 'comment_nr' ); ?>"><?php _e('Number of Comments','gabfire-widget-pack'); ?></label> 272 <select id="<?php echo $this->get_field_id( 'comment_nr' ); ?>" name="<?php echo $this->get_field_name( 'comment_nr' ); ?>"> 275 <select id="<?php echo $this->get_field_id( 'comment_nr' ); ?>" name="<?php echo $this->get_field_name( 'comment_nr' ); ?>"> 273 276 <?php 274 277 for ( $i = 0; $i <= 15; ++$i ) … … 277 280 </select> 278 281 </p> 279 282 280 283 <p> 281 284 <label for="<?php echo $this->get_field_name( 'popular_nr' ); ?>"><?php _e('Number of Popular Posts','gabfire-widget-pack'); ?></label> 282 <select id="<?php echo $this->get_field_id( 'popular_nr' ); ?>" name="<?php echo $this->get_field_name( 'popular_nr' ); ?>"> 285 <select id="<?php echo $this->get_field_id( 'popular_nr' ); ?>" name="<?php echo $this->get_field_name( 'popular_nr' ); ?>"> 283 286 <?php 284 287 for ( $i = 0; $i <= 15; ++$i )
Note: See TracChangeset
for help on using the changeset viewer.