Version Description
- Added option to display link name or description in link title tag
Download this release
Release Info
Developer | jackdewey |
Plugin | Link Library |
Version | 5.8.0.4 |
Comparing to | |
See all releases |
Code changes from version 5.8.0.2 to 5.8.0.4
- link-library-admin.php +30 -1
- link-library.php +12 -8
- readme.txt +6 -0
link-library-admin.php
CHANGED
@@ -1235,7 +1235,7 @@ class link_library_plugin_admin {
|
|
1235 |
'beforelink','afterlink', 'beforeitem', 'afteritem', 'beforedesc', 'afterdesc', 'addbeforelink', 'addafterlink',
|
1236 |
'beforelinkrating', 'afterlinkrating', 'linksubmitternamelabel', 'linksubmitteremaillabel', 'linksubmittercommentlabel',
|
1237 |
'addlinkcatlistoverride', 'beforelargedescription', 'afterlargedescription', 'customcaptchaquestion', 'customcaptchaanswer',
|
1238 |
-
'rssfeedaddress', 'linklargedesclabel', 'flatlist', 'searchresultsaddress', 'link_popup_text') as $option_name) {
|
1239 |
if (isset($_POST[$option_name])) {
|
1240 |
$options[$option_name] = str_replace("\"", "'", $_POST[$option_name]);
|
1241 |
}
|
@@ -1676,6 +1676,7 @@ class link_library_plugin_admin {
|
|
1676 |
}
|
1677 |
|
1678 |
function moderate_meta_box() {
|
|
|
1679 |
?>
|
1680 |
<table class='widefat' style='clear:none;width:100%;background-color:#F1F1F1;background-image: linear-gradient(to top, #ECECEC, #F9F9F9);background-position:initial initial;background-repeat: initial initial'>
|
1681 |
<tr>
|
@@ -1696,8 +1697,18 @@ class link_library_plugin_admin {
|
|
1696 |
$linkquery .= "WHERE tt.taxonomy = 'link_category'";
|
1697 |
$linkquery .= "AND l.link_description like '%LinkLibrary:AwaitingModeration:RemoveTextToApprove%' ";
|
1698 |
$linkquery .= " ORDER by link_name ASC";
|
|
|
|
|
|
|
|
|
1699 |
|
1700 |
$linkitems = $wpdb->get_results($linkquery);
|
|
|
|
|
|
|
|
|
|
|
|
|
1701 |
|
1702 |
if ($linkitems) {
|
1703 |
foreach($linkitems as $linkitem) {
|
@@ -1992,6 +2003,24 @@ class link_library_plugin_admin {
|
|
1992 |
<td style='width:200px'><?php _e('Display categories with search results', 'link-library'); ?> </td>
|
1993 |
<td><input type="checkbox" id="showcatonsearchresults" name="showcatonsearchresults" <?php if ($options['showcatonsearchresults']) echo ' checked="checked" '; ?>/></td>
|
1994 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1995 |
<tr>
|
1996 |
<td class="lltooltip" title="<?php _e('This setting does not apply when selecting My Link Order for the order', 'link-library'); ?>">
|
1997 |
<?php _e('Direction', 'link-library'); ?>
|
1235 |
'beforelink','afterlink', 'beforeitem', 'afteritem', 'beforedesc', 'afterdesc', 'addbeforelink', 'addafterlink',
|
1236 |
'beforelinkrating', 'afterlinkrating', 'linksubmitternamelabel', 'linksubmitteremaillabel', 'linksubmittercommentlabel',
|
1237 |
'addlinkcatlistoverride', 'beforelargedescription', 'afterlargedescription', 'customcaptchaquestion', 'customcaptchaanswer',
|
1238 |
+
'rssfeedaddress', 'linklargedesclabel', 'flatlist', 'searchresultsaddress', 'link_popup_text', 'linktitlecontent') as $option_name) {
|
1239 |
if (isset($_POST[$option_name])) {
|
1240 |
$options[$option_name] = str_replace("\"", "'", $_POST[$option_name]);
|
1241 |
}
|
1676 |
}
|
1677 |
|
1678 |
function moderate_meta_box() {
|
1679 |
+
$genoptions = get_option('LinkLibraryGeneral');
|
1680 |
?>
|
1681 |
<table class='widefat' style='clear:none;width:100%;background-color:#F1F1F1;background-image: linear-gradient(to top, #ECECEC, #F9F9F9);background-position:initial initial;background-repeat: initial initial'>
|
1682 |
<tr>
|
1697 |
$linkquery .= "WHERE tt.taxonomy = 'link_category'";
|
1698 |
$linkquery .= "AND l.link_description like '%LinkLibrary:AwaitingModeration:RemoveTextToApprove%' ";
|
1699 |
$linkquery .= " ORDER by link_name ASC";
|
1700 |
+
|
1701 |
+
if ( $genoptions['debugmode'] ) {
|
1702 |
+
echo '<!-- ' . $linkquery . ' -->' . "\n";
|
1703 |
+
}
|
1704 |
|
1705 |
$linkitems = $wpdb->get_results($linkquery);
|
1706 |
+
|
1707 |
+
if ( $genoptions['debugmode'] ) {
|
1708 |
+
echo '<!-- ';
|
1709 |
+
print_r( $linkitems );
|
1710 |
+
echo ' -->';
|
1711 |
+
}
|
1712 |
|
1713 |
if ($linkitems) {
|
1714 |
foreach($linkitems as $linkitem) {
|
2003 |
<td style='width:200px'><?php _e('Display categories with search results', 'link-library'); ?> </td>
|
2004 |
<td><input type="checkbox" id="showcatonsearchresults" name="showcatonsearchresults" <?php if ($options['showcatonsearchresults']) echo ' checked="checked" '; ?>/></td>
|
2005 |
</tr>
|
2006 |
+
<tr>
|
2007 |
+
<td><?php _e('Link Title Content', 'link-library'); ?></td>
|
2008 |
+
<td>
|
2009 |
+
<select name="linktitlecontent">
|
2010 |
+
|
2011 |
+
<?php $modes = array('linkname' => 'Link Name', 'linkdesc' => 'Link Description');
|
2012 |
+
|
2013 |
+
// Generate all items of drop-down list
|
2014 |
+
foreach ( $modes as $mode => $modename) {
|
2015 |
+
?>
|
2016 |
+
<option value="<?php echo $mode; ?>"
|
2017 |
+
<?php selected( $options['linktitlecontent'], $mode ); ?>>
|
2018 |
+
<?php echo $modename; ?>
|
2019 |
+
<?php } ?>
|
2020 |
+
</select>
|
2021 |
+
</td>
|
2022 |
+
<td style='width:100px'></td><td></td><td></td>
|
2023 |
+
</tr>
|
2024 |
<tr>
|
2025 |
<td class="lltooltip" title="<?php _e('This setting does not apply when selecting My Link Order for the order', 'link-library'); ?>">
|
2026 |
<?php _e('Direction', 'link-library'); ?>
|
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: 5.8.0.
|
7 |
Author: Yannick Lefebvre
|
8 |
Author URI: http://yannickcorner.nayanna.biz/
|
9 |
|
@@ -739,7 +739,7 @@ class link_library_plugin {
|
|
739 |
$beforeemail = '', $afteremail = '', $emaillabel = '', $beforelinkhits = '', $afterlinkhits = '', $emailcommand = '',
|
740 |
$sourceimage = '', $sourcename = '', $thumbshotscid = '', $maxlinks = '', $beforelinkrating = '', $afterlinkrating = '',
|
741 |
$showlargedescription = false, $beforelargedescription = '', $afterlargedescription = '', $featuredfirst = false, $shownameifnoimage = false,
|
742 |
-
$enablelinkpopup = false, $popupwidth = 300, $popupheight = 400, $nocatonstartup = false ) {
|
743 |
|
744 |
global $wpdb;
|
745 |
|
@@ -1235,7 +1235,11 @@ class link_library_plugin {
|
|
1235 |
else
|
1236 |
$name = $cleanname;
|
1237 |
|
1238 |
-
|
|
|
|
|
|
|
|
|
1239 |
|
1240 |
if ($showupdated) {
|
1241 |
if (substr($linkitem['link_updated'],0,2) != '00') {
|
@@ -1244,7 +1248,7 @@ class link_library_plugin {
|
|
1244 |
}
|
1245 |
|
1246 |
if (!empty( $title ) )
|
1247 |
-
$title = ' title="' . $
|
1248 |
|
1249 |
$alt = ' alt="' . $cleanname . '"';
|
1250 |
|
@@ -2154,7 +2158,7 @@ class link_library_plugin {
|
|
2154 |
$beforetelephone = '', $aftertelephone = '', $telephonelabel = '', $beforeemail = '', $afteremail = '', $emaillabel = '', $beforelinkhits = '',
|
2155 |
$afterlinkhits = '', $emailcommand = '', $sourceimage = 'primary', $sourcename = 'primary', $thumbshotscid = '',
|
2156 |
$maxlinks = '', $beforelinkrating = '', $afterlinkrating = '', $showlargedescription = false, $beforelargedescription = '',
|
2157 |
-
$afterlargedescription = '', $featuredfirst = false, $shownameifnoimage = false, $enablelinkpopup = false, $popupwidth = 300, $popupheight = 400, $nocatonstartup = false ) {
|
2158 |
|
2159 |
if (strpos($order, 'AdminSettings') !== false)
|
2160 |
{
|
@@ -2188,7 +2192,7 @@ class link_library_plugin {
|
|
2188 |
$options['sourcename'], $genoptions['thumbshotscid'], $options['maxlinks'], $options['beforelinkrating'],
|
2189 |
$options['afterlinkrating'], $options['showlargedescription'], $options['beforelargedescription'],
|
2190 |
$options['afterlargedescription'], $options['featuredfirst'], $options['shownameifnoimage'], $options['enable_link_popup'],
|
2191 |
-
$options['popup_width'], $options['popup_height'], $options['nocatonstartup'] );
|
2192 |
}
|
2193 |
else
|
2194 |
return $this->PrivateLinkLibrary($order, $hide_if_empty, $catanchor, $showdescription, $shownotes, $showrating,
|
@@ -2206,7 +2210,7 @@ class link_library_plugin {
|
|
2206 |
$sourcetelephone, $showemail, $showlinkhits, $beforeweblink, $afterweblink, $weblinklabel, $beforetelephone, $aftertelephone,
|
2207 |
$telephonelabel, $beforeemail, $afteremail, $emaillabel, $beforelinkhits, $afterlinkhits, $emailcommand, $sourceimage, $sourcename,
|
2208 |
$thumbshotscid, $maxlinks, $beforelinkrating, $afterlinkrating, $showlargedescription, $beforelargedescription,
|
2209 |
-
$afterlargedescription, $featuredfirst, $shownameifnoimage, $enablelinkpopup, $popupwidth, $popupheight, $nocatonstartup );
|
2210 |
}
|
2211 |
|
2212 |
/********************************************** Function to Process [link-library-cats] shortcode *********************************************/
|
@@ -2499,7 +2503,7 @@ class link_library_plugin {
|
|
2499 |
$options['afterlinkhits'], $options['emailcommand'], $options['sourceimage'], $options['sourcename'], $genoptions['thumbshotscid'],
|
2500 |
$options['maxlinks'], $options['beforelinkrating'], $options['afterlinkrating'], $options['showlargedescription'],
|
2501 |
$options['beforelargedescription'], $options['afterlargedescription'], $options['featuredfirst'], $options['shownameifnoimage'],
|
2502 |
-
( isset($options['enable_link_popup']) ? $options['enable_link_popup'] : false ), ( isset($options['popup_width']) ? $options['popup_width'] : 300 ), ( isset( $options['popup_height'] ) ? $options['popup_height'] : 400 ), $options['nocatonstartup'] );
|
2503 |
|
2504 |
return $linklibraryoutput;
|
2505 |
}
|
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: 5.8.0.4
|
7 |
Author: Yannick Lefebvre
|
8 |
Author URI: http://yannickcorner.nayanna.biz/
|
9 |
|
739 |
$beforeemail = '', $afteremail = '', $emaillabel = '', $beforelinkhits = '', $afterlinkhits = '', $emailcommand = '',
|
740 |
$sourceimage = '', $sourcename = '', $thumbshotscid = '', $maxlinks = '', $beforelinkrating = '', $afterlinkrating = '',
|
741 |
$showlargedescription = false, $beforelargedescription = '', $afterlargedescription = '', $featuredfirst = false, $shownameifnoimage = false,
|
742 |
+
$enablelinkpopup = false, $popupwidth = 300, $popupheight = 400, $nocatonstartup = false, $linktitlecontent = 'linkname' ) {
|
743 |
|
744 |
global $wpdb;
|
745 |
|
1235 |
else
|
1236 |
$name = $cleanname;
|
1237 |
|
1238 |
+
if ( $linktitlecontent == 'linkname' ) {
|
1239 |
+
$title = $cleanname;
|
1240 |
+
} elseif ($linktitlecontent == 'linkdesc' ) {
|
1241 |
+
$title = $desc;
|
1242 |
+
}
|
1243 |
|
1244 |
if ($showupdated) {
|
1245 |
if (substr($linkitem['link_updated'],0,2) != '00') {
|
1248 |
}
|
1249 |
|
1250 |
if (!empty( $title ) )
|
1251 |
+
$title = ' title="' . $title . '"';
|
1252 |
|
1253 |
$alt = ' alt="' . $cleanname . '"';
|
1254 |
|
2158 |
$beforetelephone = '', $aftertelephone = '', $telephonelabel = '', $beforeemail = '', $afteremail = '', $emaillabel = '', $beforelinkhits = '',
|
2159 |
$afterlinkhits = '', $emailcommand = '', $sourceimage = 'primary', $sourcename = 'primary', $thumbshotscid = '',
|
2160 |
$maxlinks = '', $beforelinkrating = '', $afterlinkrating = '', $showlargedescription = false, $beforelargedescription = '',
|
2161 |
+
$afterlargedescription = '', $featuredfirst = false, $shownameifnoimage = false, $enablelinkpopup = false, $popupwidth = 300, $popupheight = 400, $nocatonstartup = false, $linktitlecontent = 'linkname' ) {
|
2162 |
|
2163 |
if (strpos($order, 'AdminSettings') !== false)
|
2164 |
{
|
2192 |
$options['sourcename'], $genoptions['thumbshotscid'], $options['maxlinks'], $options['beforelinkrating'],
|
2193 |
$options['afterlinkrating'], $options['showlargedescription'], $options['beforelargedescription'],
|
2194 |
$options['afterlargedescription'], $options['featuredfirst'], $options['shownameifnoimage'], $options['enable_link_popup'],
|
2195 |
+
$options['popup_width'], $options['popup_height'], $options['nocatonstartup'], $options['linktitlecontent'] );
|
2196 |
}
|
2197 |
else
|
2198 |
return $this->PrivateLinkLibrary($order, $hide_if_empty, $catanchor, $showdescription, $shownotes, $showrating,
|
2210 |
$sourcetelephone, $showemail, $showlinkhits, $beforeweblink, $afterweblink, $weblinklabel, $beforetelephone, $aftertelephone,
|
2211 |
$telephonelabel, $beforeemail, $afteremail, $emaillabel, $beforelinkhits, $afterlinkhits, $emailcommand, $sourceimage, $sourcename,
|
2212 |
$thumbshotscid, $maxlinks, $beforelinkrating, $afterlinkrating, $showlargedescription, $beforelargedescription,
|
2213 |
+
$afterlargedescription, $featuredfirst, $shownameifnoimage, $enablelinkpopup, $popupwidth, $popupheight, $nocatonstartup, $linktitlecontent );
|
2214 |
}
|
2215 |
|
2216 |
/********************************************** Function to Process [link-library-cats] shortcode *********************************************/
|
2503 |
$options['afterlinkhits'], $options['emailcommand'], $options['sourceimage'], $options['sourcename'], $genoptions['thumbshotscid'],
|
2504 |
$options['maxlinks'], $options['beforelinkrating'], $options['afterlinkrating'], $options['showlargedescription'],
|
2505 |
$options['beforelargedescription'], $options['afterlargedescription'], $options['featuredfirst'], $options['shownameifnoimage'],
|
2506 |
+
( isset($options['enable_link_popup']) ? $options['enable_link_popup'] : false ), ( isset($options['popup_width']) ? $options['popup_width'] : 300 ), ( isset( $options['popup_height'] ) ? $options['popup_height'] : 400 ), $options['nocatonstartup'], $options['linktitlecontent'] );
|
2507 |
|
2508 |
return $linklibraryoutput;
|
2509 |
}
|
readme.txt
CHANGED
@@ -59,6 +59,12 @@ Further configuration is available under the Link Library Settings panel.
|
|
59 |
|
60 |
== Changelog ==
|
61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
= 5.8.0.2 =
|
63 |
* Small styling change in admin interface to adjust to removal of background image in WP 3.6
|
64 |
|
59 |
|
60 |
== Changelog ==
|
61 |
|
62 |
+
= 5.8.0.4 =
|
63 |
+
* Added option to display link name or description in link title tag
|
64 |
+
|
65 |
+
= 5.8.0.3 =
|
66 |
+
* Added debug code in moderation section to help troubleshoot issues
|
67 |
+
|
68 |
= 5.8.0.2 =
|
69 |
* Small styling change in admin interface to adjust to removal of background image in WP 3.6
|
70 |
|