Version Description
- Shortcode can now be displayed everywhere in the page (CSS is loaded via global var)
Download this release
Release Info
Developer | briKou |
Plugin | FEEDZY RSS Feeds Lite |
Version | 1.03 |
Comparing to | |
See all releases |
Code changes from version 1.02 to 1.03
- feedzy-rss-feed.php +23 -12
- readme.txt +5 -1
feedzy-rss-feed.php
CHANGED
@@ -3,9 +3,9 @@
|
|
3 |
* Plugin Name: FEEDZY RSS Feeds by b*web
|
4 |
* Plugin URI: http://b-website.com/feedzy-rss-feeds-plugin-wordpress-gratuit-utilisant-simplepie
|
5 |
* Description: FEEDZY RSS Feeds is a small and lightweight plugin. Fast and easy to use, it aggregates RSS feeds into your WordPress site through simple shortcodes.
|
6 |
-
* Author: Brice CAPOBIANCO
|
7 |
* Author URI: http://b-website.com/
|
8 |
-
* Version: 1.
|
9 |
* Text Domain: feedzy_rss_translate
|
10 |
*/
|
11 |
|
@@ -15,6 +15,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
15 |
exit;
|
16 |
}
|
17 |
|
|
|
18 |
//Load plugin textdomain
|
19 |
if (!function_exists('feedzy_rss_load_textdomain')) {
|
20 |
function feedzy_rss_load_textdomain() {
|
@@ -24,18 +25,21 @@ if (!function_exists('feedzy_rss_load_textdomain')) {
|
|
24 |
add_action('init', 'feedzy_rss_load_textdomain');
|
25 |
}
|
26 |
|
|
|
27 |
//Enqueue custom CSS
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
add_action( 'wp_enqueue_scripts', 'feedzy_rss_enqueue_custom_style');
|
38 |
}
|
|
|
|
|
|
|
39 |
|
40 |
//This function will get an image from the feed
|
41 |
if (!function_exists('returnImage')) {
|
@@ -48,6 +52,7 @@ if (!function_exists('returnImage')) {
|
|
48 |
}
|
49 |
}
|
50 |
|
|
|
51 |
//This function will filter out image url which we got from previous returnImage() function
|
52 |
if (!function_exists('scrapeImage')) {
|
53 |
function scrapeImage($text) {
|
@@ -59,9 +64,14 @@ if (!function_exists('scrapeImage')) {
|
|
59 |
}
|
60 |
}
|
61 |
|
|
|
62 |
//Main shortcode function
|
63 |
if (!function_exists('feedzy_rss')) {
|
64 |
function feedzy_rss( $atts, $content="" ) {
|
|
|
|
|
|
|
|
|
65 |
//Retrieve & extract shorcode parameters
|
66 |
extract(shortcode_atts(array(
|
67 |
"feeds" => '', //comma separated feeds url
|
@@ -200,6 +210,7 @@ if (!function_exists('feedzy_rss')) {
|
|
200 |
add_shortcode( 'feedzy-rss', 'feedzy_rss' );
|
201 |
}
|
202 |
|
|
|
203 |
//Insert cover picture to main rss feed
|
204 |
if (!function_exists('insertThumbnailRSS')) {
|
205 |
function insertThumbnailRSS($content) {
|
3 |
* Plugin Name: FEEDZY RSS Feeds by b*web
|
4 |
* Plugin URI: http://b-website.com/feedzy-rss-feeds-plugin-wordpress-gratuit-utilisant-simplepie
|
5 |
* Description: FEEDZY RSS Feeds is a small and lightweight plugin. Fast and easy to use, it aggregates RSS feeds into your WordPress site through simple shortcodes.
|
6 |
+
* Author: Brice CAPOBIANCO
|
7 |
* Author URI: http://b-website.com/
|
8 |
+
* Version: 1.03
|
9 |
* Text Domain: feedzy_rss_translate
|
10 |
*/
|
11 |
|
15 |
exit;
|
16 |
}
|
17 |
|
18 |
+
|
19 |
//Load plugin textdomain
|
20 |
if (!function_exists('feedzy_rss_load_textdomain')) {
|
21 |
function feedzy_rss_load_textdomain() {
|
25 |
add_action('init', 'feedzy_rss_load_textdomain');
|
26 |
}
|
27 |
|
28 |
+
|
29 |
//Enqueue custom CSS
|
30 |
+
function register_feedzy_custom_style() {
|
31 |
+
wp_register_style( 'feedzy-CSS', plugins_url('/feedzy-rss-style.css', __FILE__ ), NULL, NULL);
|
32 |
+
}
|
33 |
+
function print_feedzy_custom_style() {
|
34 |
+
global $enqueueStyle;
|
35 |
+
if ( ! $enqueueStyle )
|
36 |
+
return;
|
37 |
+
|
38 |
+
wp_print_styles('feedzy-CSS');
|
|
|
39 |
}
|
40 |
+
add_action('wp_footer', 'print_feedzy_custom_style');
|
41 |
+
add_action('init', 'register_feedzy_custom_style');
|
42 |
+
|
43 |
|
44 |
//This function will get an image from the feed
|
45 |
if (!function_exists('returnImage')) {
|
52 |
}
|
53 |
}
|
54 |
|
55 |
+
|
56 |
//This function will filter out image url which we got from previous returnImage() function
|
57 |
if (!function_exists('scrapeImage')) {
|
58 |
function scrapeImage($text) {
|
64 |
}
|
65 |
}
|
66 |
|
67 |
+
|
68 |
//Main shortcode function
|
69 |
if (!function_exists('feedzy_rss')) {
|
70 |
function feedzy_rss( $atts, $content="" ) {
|
71 |
+
|
72 |
+
global $enqueueStyle;
|
73 |
+
$enqueueStyle = true;
|
74 |
+
|
75 |
//Retrieve & extract shorcode parameters
|
76 |
extract(shortcode_atts(array(
|
77 |
"feeds" => '', //comma separated feeds url
|
210 |
add_shortcode( 'feedzy-rss', 'feedzy_rss' );
|
211 |
}
|
212 |
|
213 |
+
|
214 |
//Insert cover picture to main rss feed
|
215 |
if (!function_exists('insertThumbnailRSS')) {
|
216 |
function insertThumbnailRSS($content) {
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: RSS, SimplePie, shortcode, feed, thumbnail, image, rss feeds, aggregator
|
5 |
Requires at least: 3.7
|
6 |
Tested up to: 4.0
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -131,6 +131,10 @@ Yes it is.
|
|
131 |
|
132 |
== Changelog ==
|
133 |
|
|
|
|
|
|
|
|
|
134 |
= 1.02 =
|
135 |
* Error on svn tag
|
136 |
|
4 |
Tags: RSS, SimplePie, shortcode, feed, thumbnail, image, rss feeds, aggregator
|
5 |
Requires at least: 3.7
|
6 |
Tested up to: 4.0
|
7 |
+
Stable tag: 1.03
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
131 |
|
132 |
== Changelog ==
|
133 |
|
134 |
+
|
135 |
+
= 1.03 =
|
136 |
+
* Shortcode can now be displayed everywhere in the page (CSS is loaded via global var)
|
137 |
+
|
138 |
= 1.02 =
|
139 |
* Error on svn tag
|
140 |
|