]>
Commit | Line | Data |
---|---|---|
4412b877 AD |
1 | <?php |
2 | class Example_Feed extends Plugin { | |
3 | ||
4 | // Demonstrates how to query data from the parsed feed object (SimplePie) | |
5 | // don't enable unless debugging feed through f D hotkey or manually. | |
6 | ||
7 | private $link; | |
8 | private $host; | |
9 | ||
10 | function __construct($host) { | |
11 | $this->link = $host->get_link(); | |
12 | $this->host = $host; | |
13 | ||
14 | $host->add_hook($host::HOOK_FEED_PARSED, $this); | |
15 | } | |
16 | ||
17 | function hook_feed_parsed($feed) { | |
18 | _debug("I'm a little feed short and stout, here's my title: " . $feed->get_title()); | |
19 | _debug("... here's my link element: " . $feed->get_link()); | |
20 | } | |
21 | } | |
22 | ?> |