Changeset 990833
- Timestamp:
- 09/16/2014 07:46:03 AM (11 years ago)
- Location:
- rss-via-shortcode-on-page-post
- Files:
-
- 5 added
- 2 edited
-
assets/screenshot-4.png (added)
-
assets/screenshot-5.png (added)
-
tags/1.0.d (added)
-
tags/1.0.d/readme.txt (added)
-
tags/1.0.d/rss-via-shortcode.php (added)
-
trunk/readme.txt (modified) (4 diffs)
-
trunk/rss-via-shortcode.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
rss-via-shortcode-on-page-post/trunk/readme.txt
r988820 r990833 1 === Plugin Name===1 === RSS Via Shortcode for Page & Post === 2 2 Contributors: susantabeura 3 3 Donate link: http://susantaslab.com/ … … 5 5 Requires at least: 2.8 6 6 Tested up to: 4.0 7 Stable tag: 1.0. c7 Stable tag: 1.0.d 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 10 11 Simple plugin to show RSS feeds in any posts and/or pages using a simple shortcode.11 Simple plugin to show RSS feeds in any posts and/or pages. It is the simplest and best lugin for Amazon associate and eBay partner network product advertising. 12 12 13 13 == Description == … … 18 18 `[rssonpage rss="Your Feed URL" feeds="Number of Feeds" excerpt="summery true/false" target="_blank|_self|_top|_anyname"]` 19 19 Where: 20 * *rss** = URL of your RSS feed. This is the only tag required.21 * *feeds** = Number of RSS items to be fetched from feed. Default is 1022 * *excerpt** = Extract feed summery? True or False. Default is true.23 * *target** = Default is '_blank'. By default it will open links in a new window/tab.20 * **rss** = URL of your RSS feed. This is the only tag required. 21 * **feeds** = Number of RSS items to be fetched from feed. Default is 10 22 * **excerpt** = Extract feed summery? True or False. Default is true. 23 * **target** = Default is '_blank'. By default it will open links in a new window/tab. 24 24 25 25 **NOTE** Feeds will only be displayed. They will not stored in database. So always new contents for search engines. … … 47 47 2. A page created with two RSS feeds from Elance & oDesk 48 48 3. Live page with text from Elance & oDesk RSS feeds 49 4. A amazon associate product advertising page 50 5. An eBay partner network product advertising 49 51 50 52 == Changelog == 53 54 = 1.0.d = 55 * Error with reading RSS feeds fixed 56 * Support for Amazon associate and eBay partner advertising added 51 57 52 58 = 1.0.c = -
rss-via-shortcode-on-page-post/trunk/rss-via-shortcode.php
r988820 r990833 2 2 /* 3 3 Plugin Name: RSS Via Shortcode for Page & Post 4 Version: 1.0. c4 Version: 1.0.d 5 5 Plugin URI: http://susantaslab.com/ 6 6 Description: Makes it easy to display an RSS feed on a page … … 8 8 Author URI: http://susantaslab.com/ 9 9 License: GPL v2 10 Usages: [rssonpage rss="Your Feed URL" feeds="Number of Feeds" excerpt=" summerytrue/false" target="_blank|_self|_top|_anyname"]10 Usages: [rssonpage rss="Your Feed URL" feeds="Number of Feeds" excerpt="true/false" target="_blank|_self|_top|_anyname"] 11 11 */ 12 12 … … 19 19 ), $atts)); 20 20 require_once(ABSPATH.WPINC.'/rss.php'); 21 if ( $rss != "" && $rss = fetch_rss( $rss ) ) { 22 $remWord = array(" - oDesk", "| Elance Job"); 21 if ( $rss != "" && $rssFeed = fetch_feed( $rss ) ) { 22 23 $rssFeed->enable_order_by_date(false); 24 $maxitems = $rssFeed->get_item_quantity( $feeds ); 25 if ($maxitems == 0) 26 return '<ul><li>Content not available at'.$rss .'.</li></ul>'; 27 28 $rss_items = $rssFeed->get_items( 0, $maxitems ); 29 23 30 $content = '<ul>'; 24 if ( $feeds !== -1 ) { 25 $rss->items = array_slice( $rss->items, 0, $feeds ); 26 } 27 foreach ( (array) $rss->items as $item ) { 31 32 foreach ( $rss_items as $item ) { 28 33 $content .= '<li>'; 29 if ($target != '_self') 30 $content .= '<a href="'.esc_url( $item['link'] ).'" target="'.esc_attr($target).'">'. str_replace($remWord, "", esc_html($item['title'])) .'</a>'; 31 else 32 $content .= '<a href="'.esc_url( $item['link'] ).'">'. esc_html($item['title']) .'</a>'; 34 if ($target != '_self'){ 35 $content .= '<h3><a href="'; 36 $content .= trim($item->get_permalink()); 37 $content .= '" target="'; 38 $content .= $target; 39 $content .= '" rel="external">'; 40 $content .= $item->get_title(); 41 $content .= '</a></h3>'; 42 } 43 else { 44 $content .= '<h3><a href="'; 45 $content .= trim($item->get_permalink()); 46 $content .= '" rel="external">'; 47 $content .= $item->get_title(); 48 $content .= '</a></h3>'; 49 } 33 50 if ( $excerpt != false && $excerpt != "false") { 34 $content .= '<br/><span class="rss_excerpt">'. $item['description'] .'</span>'; 51 $content .= '<br/><span class="rss_excerpt">'; 52 $content .= $item->get_description(); 53 $content .= '</span>'; 35 54 } 36 55 $content .= '</li>'; 37 } 56 } 38 57 $content .= '</ul>'; 39 58 }
Note: See TracChangeset
for help on using the changeset viewer.