Plugin Directory

Changeset 3451365


Ignore:
Timestamp:
02/01/2026 12:39:31 PM (8 weeks ago)
Author:
Workshopshed
Message:

Target added to Links

Location:
rssfeedchecker
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • rssfeedchecker/tags/2.0/RSSFeedCheckerDB.php

    r3451348 r3451365  
    6363        $tblrss = $wpdb->prefix . self::$tablename;
    6464        $count = absint($count);  // Sanitize
    65         $links = $wpdb->get_results( $wpdb->prepare("SELECT l.link_id,l.link_name,l.link_url,rss_address,latest_item_url,latest_item_title,last_updated FROM $tblrss r inner join $wpdb->links l on r.link_id = l.link_id where latest_item_url is not null and l.link_visible = 'Y' order by last_updated desc limit 0, %d", $count) );
     65        $links = $wpdb->get_results( $wpdb->prepare("SELECT l.link_id,l.link_name,l.link_url,rss_address,latest_item_url,latest_item_title,last_updated,l.link_target FROM $tblrss r inner join $wpdb->links l on r.link_id = l.link_id where latest_item_url is not null and l.link_visible = 'Y' order by last_updated desc limit 0, %d", $count) );
    6666        return $links;   
    6767        }
  • rssfeedchecker/tags/2.0/RSSFeedCheckerWidget.php

    r3451348 r3451365  
    8080            $links = RSSCheckerDB::rss_list($count);
    8181            foreach ($links as $link){
    82                 $htmlout = $htmlout . sprintf('<li class="blogrollitem"><a href="%s" class="blogrollbloglink">%s</a><p style="margin-left:px;"><a href="%s" class="blogrollfeedlink">%s</a><br />%s</p></li>',esc_url($link->link_url),esc_html($link->link_name),esc_url($link->latest_item_url),esc_html($link->latest_item_title),self::pretty_date($link->last_updated));
     82                $htmlout = $htmlout . sprintf('<li class="blogrollitem"><a href="%s" target="%s" class="blogrollbloglink">%s</a><p style="margin-left:px;">
     83                <a href="%s" target="%s" class="blogrollfeedlink">%s</a><br />%s</p></li>',
     84                esc_url($link->link_url),esc_attr($link->link_target),
     85                esc_html($link->link_name),esc_url($link->latest_item_url),esc_attr($link->link_target),
     86                esc_html($link->latest_item_title),self::pretty_date($link->last_updated));
    8387            }
    8488            $htmlout = $htmlout . '</ul>';
  • rssfeedchecker/tags/2.0/readme.txt

    r3451359 r3451365  
    77Stable tag: 2.0
    88License: GPLv2 or later
     9
    910The RSS Feed checker looks through your blogroll for links with rss feeds and captures the details to be shown in a widget.
    1011
     
    5758
    5859[LinksRSSEnhanced count="number"]
     60
     61= How can I open the links in another tab? =
     62
     63The widget and shortcode will add the target attribute to the link based on the target assigned to the link e.g. _blank, _top, _none
    5964
    6065== Screenshots ==
  • rssfeedchecker/trunk/RSSFeedCheckerDB.php

    r3451348 r3451365  
    6363        $tblrss = $wpdb->prefix . self::$tablename;
    6464        $count = absint($count);  // Sanitize
    65         $links = $wpdb->get_results( $wpdb->prepare("SELECT l.link_id,l.link_name,l.link_url,rss_address,latest_item_url,latest_item_title,last_updated FROM $tblrss r inner join $wpdb->links l on r.link_id = l.link_id where latest_item_url is not null and l.link_visible = 'Y' order by last_updated desc limit 0, %d", $count) );
     65        $links = $wpdb->get_results( $wpdb->prepare("SELECT l.link_id,l.link_name,l.link_url,rss_address,latest_item_url,latest_item_title,last_updated,l.link_target FROM $tblrss r inner join $wpdb->links l on r.link_id = l.link_id where latest_item_url is not null and l.link_visible = 'Y' order by last_updated desc limit 0, %d", $count) );
    6666        return $links;   
    6767        }
  • rssfeedchecker/trunk/RSSFeedCheckerWidget.php

    r3451348 r3451365  
    8080            $links = RSSCheckerDB::rss_list($count);
    8181            foreach ($links as $link){
    82                 $htmlout = $htmlout . sprintf('<li class="blogrollitem"><a href="%s" class="blogrollbloglink">%s</a><p style="margin-left:px;"><a href="%s" class="blogrollfeedlink">%s</a><br />%s</p></li>',esc_url($link->link_url),esc_html($link->link_name),esc_url($link->latest_item_url),esc_html($link->latest_item_title),self::pretty_date($link->last_updated));
     82                $htmlout = $htmlout . sprintf('<li class="blogrollitem"><a href="%s" target="%s" class="blogrollbloglink">%s</a><p style="margin-left:px;">
     83                <a href="%s" target="%s" class="blogrollfeedlink">%s</a><br />%s</p></li>',
     84                esc_url($link->link_url),esc_attr($link->link_target),
     85                esc_html($link->link_name),esc_url($link->latest_item_url),esc_attr($link->link_target),
     86                esc_html($link->latest_item_title),self::pretty_date($link->last_updated));
    8387            }
    8488            $htmlout = $htmlout . '</ul>';
  • rssfeedchecker/trunk/readme.txt

    r3451359 r3451365  
    77Stable tag: 2.0
    88License: GPLv2 or later
     9
    910The RSS Feed checker looks through your blogroll for links with rss feeds and captures the details to be shown in a widget.
    1011
     
    5758
    5859[LinksRSSEnhanced count="number"]
     60
     61= How can I open the links in another tab? =
     62
     63The widget and shortcode will add the target attribute to the link based on the target assigned to the link e.g. _blank, _top, _none
    5964
    6065== Screenshots ==
Note: See TracChangeset for help on using the changeset viewer.