Parent Directory
|
Revision Log
|
Revision Graph
#169095 patch by RobRoy add token support
| 1 | <?php |
| 2 | // $Id$ |
| 3 | |
| 4 | /** |
| 5 | * Implementation of hook_token_values(). |
| 6 | */ |
| 7 | function simplefeed_token_values($type, $object = NULL) { |
| 8 | if ($type == 'node') { |
| 9 | $node = $object; |
| 10 | |
| 11 | $tokens = array(); |
| 12 | $tokens['feed-url'] = $node->url; |
| 13 | return $tokens; |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | /** |
| 18 | * Implementation of hook_token_list(). |
| 19 | */ |
| 20 | function simplefeed_token_list($type) { |
| 21 | if ($type == 'node' || $type == 'all') { |
| 22 | $list = array( |
| 23 | 'simplefeed' => array( |
| 24 | 'feed-url' => t('The URL for the feed.'), |
| 25 | ), |
| 26 | ); |
| 27 | return $list; |
| 28 | } |
| 29 | } |
| ViewVC Help | |
| Powered by ViewVC 1.1.2 |