PluginProbe
FeedWordPress / 2012.1212
FeedWordPress v2012.1212
trunk 0.8 0.9 0.91 0.95 0.96 0.97 0.98 0.981 0.99 0.991 0.992 0.993 2008.1030 2008.1101 2008.1105 2008.1214 2009.0612 2009.0613 2009.0618 2009.0707 2009.1111 2009.1112 2010.0127 2010.0528 All 65 releases
feedwordpress / feedwordpie.class.php

feedwordpie.class.php in FeedWordPress 2012.1212, at feedwordpie.class.php

74 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 define('FEEDWORDPIE_TYPE_CUSTOM_XML', ~SIMPLEPIE_TYPE_NONE & ~SIMPLEPIE_TYPE_ALL);
3
4 class FeedWordPie extends SimplePie {
5 var $subscription = NULL;
6
7 function set_feed_url ($url) {
8 global $fwp_oLinks;
9 if ($url InstanceOf SyndicatedLink) :
10
11 // Get URL with relevant parameters attached.
12 // Credentials will be handled further down.
13 $new_url = $url->uri(array('add_params' => true));
14
15 // Store for reference.
16 $this->subscription = $url->id();
17
18 // Pass it along down the line.
19 $url = $new_url;
20
21 else :
22 $this->subscription = NULL;
23 endif;
24
25 // OK, let's go.
26 return parent::set_feed_url($url);
27 } /* class SimplePie */
28
29 function get_type () {
30 // Allow filters to pre-empt a type determination from SimplePie
31 $ret = apply_filters(
32 'feedwordpie_get_type',
33 NULL,
34 $this
35 );
36
37 // If not preempted by a filter, fall back on SimplePie
38 if (is_null($ret)) :
39 $ret = parent::get_type();
40 endif;
41
42 return $ret;
43 }
44
45 function get_feed_tags ($namespace, $tag) {
46 // Allow filters to filter SimplePie handling
47 return apply_filters(
48 'feedwordpie_get_feed_tags',
49 parent::get_feed_tags($namespace, $tag),
50 $namespace,
51 $tag,
52 $this
53 );
54 }
55
56 function get_items ($start = 0, $end = 0) {
57 // Allow filters to set up for, or pre-empt, SimplePie handling
58 $ret = apply_filters(
59 'feedwordpie_get_items',
60 NULL,
61 $start,
62 $end,
63 $this
64 );
65
66 if (is_null($ret)) :
67 $ret = parent::get_items();
68 endif;
69 return $ret;
70 }
71
72 } /* class FeedWordPie */
73
74