Link Library - Version 6.0-Beta5

Version Description

Download this release

Release Info

Developer jackdewey
Plugin Icon 128x128 Link Library
Version 6.0-Beta5
Comparing to
See all releases

Code changes from version 6.0-Beta4 to 6.0-Beta5

link-library-admin.php CHANGED
@@ -1087,6 +1087,16 @@ class link_library_plugin_admin {
1087
  });
1088
  //]]>
1089
 
 
 
 
 
 
 
 
 
 
 
1090
  // Create the tooltips only on document load
1091
  jQuery(document).ready(function () {
1092
  jQuery('.lltooltip').each(function () {
@@ -1097,7 +1107,8 @@ class link_library_plugin_admin {
1097
  jQuery("#sortable").sortable({
1098
  opacity: 0.6, cursor: 'move', update: function () {
1099
  var order = jQuery("#sortable").sortable('toArray');
1100
- stringorder = order.join(',')
 
1101
  document.getElementById('dragndroporder').value = stringorder;
1102
  }
1103
  });
@@ -3369,6 +3380,7 @@ class link_library_plugin_admin {
3369
  } else {
3370
  $dragndroporder = $options['dragndroporder'];
3371
  }
 
3372
  $dragndroparray = explode( ',', $dragndroporder );
3373
 
3374
  $new_entries = array( '13', '14', '15', '16' );
@@ -3444,7 +3456,7 @@ class link_library_plugin_admin {
3444
  <?php break;
3445
  case 16:
3446
  ?>
3447
- <li id="15" style='background-color: #238e00'><?php _e( 'Price', 'link-library' ); ?></li>
3448
  <?php break;
3449
  }
3450
  }
@@ -5206,7 +5218,7 @@ class link_library_plugin_admin {
5206
  if ( isset( $_POST['link_featured'] ) ) {
5207
  update_post_meta( $link_id, 'link_featured', 1 );
5208
  } else {
5209
- update_post_meta( $link_id, 'link_featured', 2 );
5210
  }
5211
 
5212
  $newrating = intval( $_POST['link_rating'] );
1087
  });
1088
  //]]>
1089
 
1090
+ Array.prototype.clean = function(deleteValue) {
1091
+ for (var i = 0; i < this.length; i++) {
1092
+ if (this[i] == deleteValue) {
1093
+ this.splice(i, 1);
1094
+ i--;
1095
+ }
1096
+ }
1097
+ return this;
1098
+ };
1099
+
1100
  // Create the tooltips only on document load
1101
  jQuery(document).ready(function () {
1102
  jQuery('.lltooltip').each(function () {
1107
  jQuery("#sortable").sortable({
1108
  opacity: 0.6, cursor: 'move', update: function () {
1109
  var order = jQuery("#sortable").sortable('toArray');
1110
+ order.clean("");
1111
+ stringorder = order.join(',');
1112
  document.getElementById('dragndroporder').value = stringorder;
1113
  }
1114
  });
3380
  } else {
3381
  $dragndroporder = $options['dragndroporder'];
3382
  }
3383
+
3384
  $dragndroparray = explode( ',', $dragndroporder );
3385
 
3386
  $new_entries = array( '13', '14', '15', '16' );
3456
  <?php break;
3457
  case 16:
3458
  ?>
3459
+ <li id="16" style='background-color: #238e00'><?php _e( 'Price', 'link-library' ); ?></li>
3460
  <?php break;
3461
  }
3462
  }
5218
  if ( isset( $_POST['link_featured'] ) ) {
5219
  update_post_meta( $link_id, 'link_featured', 1 );
5220
  } else {
5221
+ update_post_meta( $link_id, 'link_featured', 0 );
5222
  }
5223
 
5224
  $newrating = intval( $_POST['link_rating'] );
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: 6.0 Beta 4
7
  Author: Yannick Lefebvre
8
  Author URI: http://ylefebvre.ca/
9
  Text Domain: link-library
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: 6.0 Beta 5
7
  Author: Yannick Lefebvre
8
  Author URI: http://ylefebvre.ca/
9
  Text Domain: link-library
readme.txt CHANGED
@@ -59,6 +59,13 @@ Further configuration is available under the Link Library Settings panel.
59
 
60
  == Changelog ==
61
 
 
 
 
 
 
 
 
62
  = 6.0 Beta 4 =
63
  * Corrected warnings when activating plugin on a site that had never had old version of Link Library
64
  * Added button under General Options to re-import links from 5.9.x to 6.0
59
 
60
  == Changelog ==
61
 
62
+ = 6.0 Beta 5 =
63
+ * Fixed issue with Robothumb link appearing after each category instead of only once after all links
64
+ * Fixed issue with links being displayed as featured even if they had not been set as such
65
+ * Fixed issue with front-end Edit links not sending administrators to the right place
66
+ * Fixed issue with drag-and-drop of elements in advanced section sometimes creating duplicates
67
+ * Fixed issue with category names not displaying if Link Library configured to display with headings instead of divs
68
+
69
  = 6.0 Beta 4 =
70
  * Corrected warnings when activating plugin on a site that had never had old version of Link Library
71
  * Added button under General Options to re-import links from 5.9.x to 6.0
render-link-library-sc.php CHANGED
@@ -866,8 +866,7 @@ function RenderLinkLibrary( $LLPluginClass, $generaloptions, $libraryoptions, $s
866
 
867
  // Display the category name
868
  if ( !$hidecategorynames || empty( $hidecategorynames ) ) {
869
- // TODO: Re-create meta field for category URL
870
- $caturl = get_metadata( 'linkcategory', $link_category->term_id, 'linkcaturl', true );
871
 
872
  if ( $catanchor ) {
873
  $cattext = '<div id="' . $link_category->slug . '"><!-- Div Category Name -->';
@@ -1001,7 +1000,7 @@ function RenderLinkLibrary( $LLPluginClass, $generaloptions, $libraryoptions, $s
1001
 
1002
  $catlink .= '>';
1003
  }
1004
- $catlink .= $linkitem['name'];
1005
  if ( !empty( $caturl ) ) {
1006
  $catlink .= '</a>';
1007
  }
@@ -1524,8 +1523,8 @@ function RenderLinkLibrary( $LLPluginClass, $generaloptions, $libraryoptions, $s
1524
 
1525
  if ( $showadmineditlinks && $linkeditoruser ) {
1526
  $output .= $between . '<span class="editlink"><a href="' . esc_url( add_query_arg( array(
1527
- 'action' => 'edit', 'link_id' => $linkitem['proper_link_id'] ),
1528
- admin_url( 'link.php' ) ) ) . '">(' . __('Edit', 'link-library') . ')</a></span>';
1529
  }
1530
 
1531
  if ( $showupdated && $linkitem['recently_updated'] && 'after' == $showupdatedpos ) {
@@ -1983,14 +1982,6 @@ function RenderLinkLibrary( $LLPluginClass, $generaloptions, $libraryoptions, $s
1983
  $output .= "</div><!-- Div End Category -->\n";
1984
  }
1985
  }
1986
-
1987
- if ( $usethumbshotsforimages ) {
1988
- if ( $thumbnailgenerator == 'robothumb' ) {
1989
- $output .= '<div class="llthumbshotsnotice"><a href="http://www.robothumb.com">Screenshots par Robothumb</a></div>';
1990
- } elseif ( $thumbnailgenerator == 'thumbshots' ) {
1991
- $output .= '<div class="llthumbshotsnotice"><a href="http://www.thumbshots.com" target="_blank" title="Thumbnails Screenshots by Thumbshots">Thumbnail Screenshots by Thumbshots</a></div>';
1992
- }
1993
- }
1994
  }
1995
  }
1996
  } else {
@@ -2000,6 +1991,14 @@ function RenderLinkLibrary( $LLPluginClass, $generaloptions, $libraryoptions, $s
2000
  $output .= $searchnoresultstext . "\n";
2001
  }
2002
  }
 
 
 
 
 
 
 
 
2003
  } else {
2004
  $output .= __( 'No links found', 'link-library' );
2005
  }
866
 
867
  // Display the category name
868
  if ( !$hidecategorynames || empty( $hidecategorynames ) ) {
869
+ $caturl = get_term_meta( $link_category->term_id, 'linkcaturl', true );
 
870
 
871
  if ( $catanchor ) {
872
  $cattext = '<div id="' . $link_category->slug . '"><!-- Div Category Name -->';
1000
 
1001
  $catlink .= '>';
1002
  }
1003
+ $catlink .= $link_category->name;
1004
  if ( !empty( $caturl ) ) {
1005
  $catlink .= '</a>';
1006
  }
1523
 
1524
  if ( $showadmineditlinks && $linkeditoruser ) {
1525
  $output .= $between . '<span class="editlink"><a href="' . esc_url( add_query_arg( array(
1526
+ 'action' => 'edit', 'post' => $linkitem['proper_link_id'] ),
1527
+ admin_url( 'post.php' ) ) ) . '">(' . __('Edit', 'link-library') . ')</a></span>';
1528
  }
1529
 
1530
  if ( $showupdated && $linkitem['recently_updated'] && 'after' == $showupdatedpos ) {
1982
  $output .= "</div><!-- Div End Category -->\n";
1983
  }
1984
  }
 
 
 
 
 
 
 
 
1985
  }
1986
  }
1987
  } else {
1991
  $output .= $searchnoresultstext . "\n";
1992
  }
1993
  }
1994
+
1995
+ if ( $usethumbshotsforimages ) {
1996
+ if ( $thumbnailgenerator == 'robothumb' ) {
1997
+ $output .= '<div class="llthumbshotsnotice"><a href="http://www.robothumb.com">Screenshots par Robothumb</a></div>';
1998
+ } elseif ( $thumbnailgenerator == 'thumbshots' ) {
1999
+ $output .= '<div class="llthumbshotsnotice"><a href="http://www.thumbshots.com" target="_blank" title="Thumbnails Screenshots by Thumbshots">Thumbnail Screenshots by Thumbshots</a></div>';
2000
+ }
2001
+ }
2002
  } else {
2003
  $output .= __( 'No links found', 'link-library' );
2004
  }