function _quotes_feed_last in Quotes 7
Same name and namespace in other branches
- 5 quotes.module \_quotes_feed_last()
- 6 quotes.module \_quotes_feed_last()
Displays an RSS feed containing recent quotes of all users.
1 string reference to '_quotes_feed_last'
- quotes_menu in ./
quotes.module - Implements hook_menu().
File
- ./
quotes.module, line 2207 - The quotes module allows users to maintain a list of quotes that can be displayed in any number of administrator-defined quote blocks.
Code
function _quotes_feed_last() {
$sql = db_select('node', 'n')
->fields('n', array(
'nid',
'title',
'created',
'uid',
))
->condition('status', 1)
->condition('type', 'quotes')
->orderBy('created', 'DESC')
->range(0, variable_get('feed_default_items', 15))
->addTag('node_access')
->execute()
->fetchCol();
$channel['title'] = t('!site_name quotes', array(
'!site_name' => variable_get('site_name', 'Authentic Empowerment'),
));
$channel['link'] = url('quotes/' . arg(1), array(
'absolute' => TRUE,
));
node_feed($sql, $channel);
}