Link Library - Version 7.3.1

Version Description

  • Added extra field to Link Library widget to allow users to select category(ies) to be displayed
Download this release

Release Info

Developer jackdewey
Plugin Icon 128x128 Link Library
Version 7.3.1
Comparing to
See all releases

Code changes from version 7.3 to 7.3.1

Files changed (2) hide show
  1. link-library.php +22 -3
  2. readme.txt +5 -2
link-library.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Link Library
4
  Plugin URI: http://wordpress.org/extend/plugins/link-library/
5
  Description: Display links on pages with a variety of options
6
- Version: 7.3
7
  Author: Yannick Lefebvre
8
  Author URI: http://ylefebvre.github.io/
9
  Text Domain: link-library
@@ -2449,6 +2449,7 @@ class Link_Library_Widget extends WP_Widget {
2449
 
2450
  $selected_library = ( !empty( $instance['selected_library'] ) ? $instance['selected_library'] : 1 );
2451
  $widget_title = ( !empty( $instance['widget_title'] ) ? esc_attr( $instance['widget_title'] ) : 'Links' );
 
2452
  ?>
2453
  <p>
2454
  <label for="<?php echo $this->get_field_id( 'widget_title' ); ?>">
@@ -2460,7 +2461,7 @@ class Link_Library_Widget extends WP_Widget {
2460
  </label>
2461
  </p>
2462
  <p>
2463
- <label for="<?php echo $this->get_field_id( 'nb_book_reviews' ); ?>">
2464
  <?php echo 'Select library configuration to display:'; ?>
2465
  <select id="<?php echo $this->get_field_id( 'selected_library' ); ?>"
2466
  name="<?php echo $this->get_field_name( 'selected_library' ); ?>">
@@ -2481,6 +2482,15 @@ class Link_Library_Widget extends WP_Widget {
2481
  </select>
2482
  </label>
2483
  </p>
 
 
 
 
 
 
 
 
 
2484
  <?php }
2485
 
2486
  function widget( $args, $instance ) {
@@ -2489,13 +2499,22 @@ class Link_Library_Widget extends WP_Widget {
2489
  // Retrieve widget configuration options
2490
  $selected_library = ( !empty( $instance['selected_library'] ) ? $instance['selected_library'] : 1 );
2491
  $widget_title = ( !empty( $instance['widget_title'] ) ? esc_attr( $instance['widget_title'] ) : 'Links' );
 
2492
 
2493
  // Display widget title
2494
  echo $before_widget . $before_title;
2495
  echo apply_filters( 'widget_title', $widget_title );
2496
  echo $after_title;
2497
 
2498
- echo do_shortcode( '[link-library settings="' . $selected_library . '"]');
 
 
 
 
 
 
 
 
2499
 
2500
  echo $after_widget;
2501
  }
3
  Plugin Name: Link Library
4
  Plugin URI: http://wordpress.org/extend/plugins/link-library/
5
  Description: Display links on pages with a variety of options
6
+ Version: 7.3.1
7
  Author: Yannick Lefebvre
8
  Author URI: http://ylefebvre.github.io/
9
  Text Domain: link-library
2449
 
2450
  $selected_library = ( !empty( $instance['selected_library'] ) ? $instance['selected_library'] : 1 );
2451
  $widget_title = ( !empty( $instance['widget_title'] ) ? esc_attr( $instance['widget_title'] ) : 'Links' );
2452
+ $category_list_override = ( !empty( $instance['cat_list_override'] ) ? esc_attr( $instance['cat_list_override'] ) : '' );
2453
  ?>
2454
  <p>
2455
  <label for="<?php echo $this->get_field_id( 'widget_title' ); ?>">
2461
  </label>
2462
  </p>
2463
  <p>
2464
+ <label for="<?php echo $this->get_field_id( 'selected_library' ); ?>">
2465
  <?php echo 'Select library configuration to display:'; ?>
2466
  <select id="<?php echo $this->get_field_id( 'selected_library' ); ?>"
2467
  name="<?php echo $this->get_field_name( 'selected_library' ); ?>">
2482
  </select>
2483
  </label>
2484
  </p>
2485
+ <p>
2486
+ <label for="<?php echo $this->get_field_id( 'cat_list_override' ); ?>">
2487
+ <?php echo 'Comma-separated list of categories to display:'; ?>
2488
+ <input type="text"
2489
+ id="<?php echo $this->get_field_id( 'cat_list_override' );?>"
2490
+ name="<?php echo $this->get_field_name( 'cat_list_override' ); ?>"
2491
+ value="<?php echo $category_list_override; ?>" />
2492
+ </label>
2493
+ </p>
2494
  <?php }
2495
 
2496
  function widget( $args, $instance ) {
2499
  // Retrieve widget configuration options
2500
  $selected_library = ( !empty( $instance['selected_library'] ) ? $instance['selected_library'] : 1 );
2501
  $widget_title = ( !empty( $instance['widget_title'] ) ? esc_attr( $instance['widget_title'] ) : 'Links' );
2502
+ $category_list_override = ( !empty( $instance['cat_list_override'] ) ? esc_attr( $instance['cat_list_override'] ) : '' );
2503
 
2504
  // Display widget title
2505
  echo $before_widget . $before_title;
2506
  echo apply_filters( 'widget_title', $widget_title );
2507
  echo $after_title;
2508
 
2509
+ $shortcode_string = '[link-library settings="' . $selected_library . '"';
2510
+
2511
+ if ( !empty( $category_list_override ) ) {
2512
+ $shortcode_string .= ' categorylistoverride="' . $category_list_override . '"';
2513
+ }
2514
+
2515
+ $shortcode_string .= ']';
2516
+
2517
+ echo do_shortcode( $shortcode_string );
2518
 
2519
  echo $after_widget;
2520
  }
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: jackdewey
3
  Donate link: https://ylefebvre.github.io/wordpress-plugins/link-library/
4
  Tags: link, list, directory, page, library, AJAX, RSS, feeds, inline, search, paging, add, submit, import, batch, pop-up
5
  Requires at least: 4.4
6
- Tested up to: 5.8
7
- Stable tag: 7.3
8
 
9
  The purpose of this plugin is to add the ability to output a list of link categories and a complete list of links with notes and descriptions.
10
 
@@ -48,6 +48,9 @@ Further configuration is available under the Link Library Settings panel.
48
 
49
  == Changelog ==
50
 
 
 
 
51
  = 7.3 =
52
  * Official 7.3 version containing all features from beta 1 to 4
53
 
3
  Donate link: https://ylefebvre.github.io/wordpress-plugins/link-library/
4
  Tags: link, list, directory, page, library, AJAX, RSS, feeds, inline, search, paging, add, submit, import, batch, pop-up
5
  Requires at least: 4.4
6
+ Tested up to: 5.9
7
+ Stable tag: 7.3.1
8
 
9
  The purpose of this plugin is to add the ability to output a list of link categories and a complete list of links with notes and descriptions.
10
 
48
 
49
  == Changelog ==
50
 
51
+ = 7.3.1 =
52
+ * Added extra field to Link Library widget to allow users to select category(ies) to be displayed
53
+
54
  = 7.3 =
55
  * Official 7.3 version containing all features from beta 1 to 4
56