Version Description
Download this release
Release Info
Developer | Marios Alexandrou |
Plugin | RSS Includes Pages |
Version | 1.1 |
Comparing to | |
See all releases |
Code changes from version 1.0.2 to 1.1
- readme.txt +27 -3
- rss-includes-pages.php +39 -1
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: marios-alexandrou
|
3 |
Tags: rss, feed, feeds, pages
|
4 |
Requires at least: 2.5
|
5 |
-
Tested up to: 2.
|
6 |
-
Stable tag: 1.
|
7 |
|
8 |
Modifies RSS feeds so that they include pages and not just posts.
|
9 |
|
@@ -22,4 +22,28 @@ Including pages in your feed is particularly useful if you're using WordPress as
|
|
22 |
|
23 |
= Will this plugin work with other RSS feed related plugins? =
|
24 |
|
25 |
-
Yes. The modifications to the feed are done at a low level and other plugins should remain compatible.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
Contributors: marios-alexandrou
|
3 |
Tags: rss, feed, feeds, pages
|
4 |
Requires at least: 2.5
|
5 |
+
Tested up to: 2.9.1
|
6 |
+
Stable tag: 1.1
|
7 |
|
8 |
Modifies RSS feeds so that they include pages and not just posts.
|
9 |
|
22 |
|
23 |
= Will this plugin work with other RSS feed related plugins? =
|
24 |
|
25 |
+
Yes. The modifications to the feed are done at a low level and other plugins should remain compatible.
|
26 |
+
|
27 |
+
= I just activated the plugin, why don't I see pages in my feed? =
|
28 |
+
|
29 |
+
If you're using Feedburner you'll have to wait until your updated feed is picked up by Feedburner. This isn't immediate so give it a few hours.
|
30 |
+
|
31 |
+
= I just posted a page, why don't I see it in my feed? =
|
32 |
+
|
33 |
+
If you're using Feedburner you'll have to wait until your updated feed is picked up by Feedburner. This isn't immediate so give it a few hours.
|
34 |
+
|
35 |
+
= Where are the settings? =
|
36 |
+
|
37 |
+
There are no settings. Once the plugin is activated, pages with a recent create date will be included in the WordPress RSS feed.
|
38 |
+
|
39 |
+
= I like this plugin, do you have others? =
|
40 |
+
|
41 |
+
I sure do!
|
42 |
+
|
43 |
+
Social Media E-Mail Alerts
|
44 |
+
Receive e-mail alerts when your site gets traffic from social media sites of your choosing. You can also set up alerts for when certain parameters app
|
45 |
+
http://wordpress.org/extend/plugins/social-media-email-alerts/
|
46 |
+
|
47 |
+
Real-Time Find and Replace
|
48 |
+
Set up find and replace rules that are executed AFTER a page is generated by WordPress, but BEFORE it is sent to a user's browser.
|
49 |
+
http://wordpress.org/extend/plugins/real-time-find-and-replace/
|
rss-includes-pages.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: RSS Includes Pages
|
4 |
-
Version: 1.
|
5 |
Plugin URI: http://www.mariosalexandrou.com/rss-includes-pages.asp
|
6 |
Description: Include pages (not just posts) in RSS feeds. Particularly useful to those that use WordPress as a CMS.
|
7 |
Author: Marios Alexandrou
|
@@ -20,4 +20,42 @@ function ma_posts_where($var){
|
|
20 |
}
|
21 |
return $var; // return the variable
|
22 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
?>
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: RSS Includes Pages
|
4 |
+
Version: 1.1
|
5 |
Plugin URI: http://www.mariosalexandrou.com/rss-includes-pages.asp
|
6 |
Description: Include pages (not just posts) in RSS feeds. Particularly useful to those that use WordPress as a CMS.
|
7 |
Author: Marios Alexandrou
|
20 |
}
|
21 |
return $var; // return the variable
|
22 |
}
|
23 |
+
|
24 |
+
/*
|
25 |
+
* Deal with Last Post Modified so feeds will validate. WP default just checks for posts, not pages.
|
26 |
+
*/
|
27 |
+
|
28 |
+
add_filter('get_lastpostmodified', 'ma_get_lastpostmodified',10,2);
|
29 |
+
|
30 |
+
// We do this because is_feed is not set when calling get_lastpostmodified.
|
31 |
+
add_action('rss2_ns', 'ma_feed_true');
|
32 |
+
add_action('atom_ns', 'ma_feed_true');
|
33 |
+
add_action('rdf_ns', 'ma_feed_true');
|
34 |
+
// We won't mess with comment feeds.
|
35 |
+
add_action ('rss2_comments_ns', 'ma_feed_false');
|
36 |
+
add_action ('atom_comments_ns', 'ma_feed_false');
|
37 |
+
|
38 |
+
function ma_get_lastpostmodified($lastpostmodified, $timezone){
|
39 |
+
global $ma_feed, $wpdb;;
|
40 |
+
if (!($ma_feed)){
|
41 |
+
return $lastpostmodified;
|
42 |
+
}
|
43 |
+
|
44 |
+
//queires taken from wp-includes/post.php modified to include pages
|
45 |
+
$lastpostmodified = $wpdb->get_var("SELECT post_modified_gmt FROM $wpdb->posts WHERE post_status = 'publish' AND (post_type = 'post' OR post_type = 'page') ORDER BY post_modified_gmt DESC LIMIT 1");
|
46 |
+
$lastpostdate = $wpdb->get_var("SELECT post_date_gmt FROM $wpdb->posts WHERE post_status = 'publish' AND (post_type = 'post' OR 'page') ORDER BY post_date_gmt DESC LIMIT 1");
|
47 |
+
if ( $lastpostdate > $lastpostmodified ) {
|
48 |
+
$lastpostmodified = $lastpostdate;
|
49 |
+
}
|
50 |
+
return $lastpostmodified;
|
51 |
+
}
|
52 |
+
|
53 |
+
function ma_feed_true(){
|
54 |
+
global $ma_feed;
|
55 |
+
$ma_feed = true;
|
56 |
+
}
|
57 |
+
function ma_feed_false(){
|
58 |
+
global $ma_feed;
|
59 |
+
$ma_feed = false;
|
60 |
+
}
|
61 |
?>
|