- #42234: Use standardized feed icon for RSS
parent
511089865d
commit
79a193a2d2
|
@ -867,6 +867,15 @@ function theme_xml_icon($url) {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return code that emits an feed icon.
|
||||
*/
|
||||
function theme_feed_icon($url) {
|
||||
if ($image = theme('image', 'misc/feed.png', t('Syndicate content'), t('Syndicate content'))) {
|
||||
return '<span class="feed-icon"><a href="'. check_url($url) .'">'. $image. '</a></span>';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute hook_footer() which is run at the end of the page right before the
|
||||
* close of the body tag.
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 764 B |
|
@ -967,12 +967,12 @@ function _aggregator_page_list($sql, $op, $header = '') {
|
|||
// arg(1) is undefined if we are at the top aggregator URL
|
||||
// is there a better way to do this?
|
||||
if (!arg(1)) {
|
||||
$form['xml_icon'] = array('#value' => theme('xml_icon', url('aggregator/rss')));
|
||||
$form['feed_icon'] = array('#value' => theme('feed_icon', url('aggregator/rss')));
|
||||
}
|
||||
elseif (arg(1) == 'categories' && arg(2) && !arg(3)) {
|
||||
$form['xml_icon'] = array('#value' => theme('xml_icon', url('aggregator/rss/' . arg(2))));
|
||||
$form['feed_icon'] = array('#value' => theme('feed_icon', url('aggregator/rss/' . arg(2))));
|
||||
}
|
||||
$output .= $form['xml_icon']['#value'];
|
||||
$output .= $form['feed_icon']['#value'];
|
||||
|
||||
return ($categorize) ? drupal_get_form('aggregator_page_list', $form) : $output;
|
||||
}
|
||||
|
|
|
@ -967,12 +967,12 @@ function _aggregator_page_list($sql, $op, $header = '') {
|
|||
// arg(1) is undefined if we are at the top aggregator URL
|
||||
// is there a better way to do this?
|
||||
if (!arg(1)) {
|
||||
$form['xml_icon'] = array('#value' => theme('xml_icon', url('aggregator/rss')));
|
||||
$form['feed_icon'] = array('#value' => theme('feed_icon', url('aggregator/rss')));
|
||||
}
|
||||
elseif (arg(1) == 'categories' && arg(2) && !arg(3)) {
|
||||
$form['xml_icon'] = array('#value' => theme('xml_icon', url('aggregator/rss/' . arg(2))));
|
||||
$form['feed_icon'] = array('#value' => theme('feed_icon', url('aggregator/rss/' . arg(2))));
|
||||
}
|
||||
$output .= $form['xml_icon']['#value'];
|
||||
$output .= $form['feed_icon']['#value'];
|
||||
|
||||
return ($categorize) ? drupal_get_form('aggregator_page_list', $form) : $output;
|
||||
}
|
||||
|
|
|
@ -159,7 +159,7 @@ function blog_page_user($uid) {
|
|||
$output .= node_view(node_load($node->nid), 1);
|
||||
}
|
||||
$output .= theme('pager', NULL, variable_get('default_nodes_main', 10));
|
||||
$output .= theme('xml_icon', url("blog/$account->uid/feed"));
|
||||
$output .= theme('feed_icon', url("blog/$account->uid/feed"));
|
||||
|
||||
drupal_add_link(array('rel' => 'alternate',
|
||||
'type' => 'application/rss+xml',
|
||||
|
@ -186,7 +186,7 @@ function blog_page_last() {
|
|||
$output .= node_view(node_load($node->nid), 1);
|
||||
}
|
||||
$output .= theme('pager', NULL, variable_get('default_nodes_main', 10));
|
||||
$output .= theme('xml_icon', url('blog/feed'));
|
||||
$output .= theme('feed_icon', url('blog/feed'));
|
||||
|
||||
drupal_add_link(array('rel' => 'alternate',
|
||||
'type' => 'application/rss+xml',
|
||||
|
|
|
@ -159,7 +159,7 @@ function blog_page_user($uid) {
|
|||
$output .= node_view(node_load($node->nid), 1);
|
||||
}
|
||||
$output .= theme('pager', NULL, variable_get('default_nodes_main', 10));
|
||||
$output .= theme('xml_icon', url("blog/$account->uid/feed"));
|
||||
$output .= theme('feed_icon', url("blog/$account->uid/feed"));
|
||||
|
||||
drupal_add_link(array('rel' => 'alternate',
|
||||
'type' => 'application/rss+xml',
|
||||
|
@ -186,7 +186,7 @@ function blog_page_last() {
|
|||
$output .= node_view(node_load($node->nid), 1);
|
||||
}
|
||||
$output .= theme('pager', NULL, variable_get('default_nodes_main', 10));
|
||||
$output .= theme('xml_icon', url('blog/feed'));
|
||||
$output .= theme('feed_icon', url('blog/feed'));
|
||||
|
||||
drupal_add_link(array('rel' => 'alternate',
|
||||
'type' => 'application/rss+xml',
|
||||
|
|
|
@ -882,7 +882,7 @@ function theme_forum_display($forums, $topics, $parents, $tid, $sortby, $forum_p
|
|||
'href' => url('taxonomy/term/'. $tid .'/0/feed')));
|
||||
|
||||
$output .= theme('forum_topic_list', $tid, $topics, $sortby, $forum_per_page);
|
||||
$output .= theme('xml_icon', url("taxonomy/term/$tid/0/feed"));
|
||||
$output .= theme('feed_icon', url("taxonomy/term/$tid/0/feed"));
|
||||
}
|
||||
$output .= '</div>';
|
||||
}
|
||||
|
|
|
@ -882,7 +882,7 @@ function theme_forum_display($forums, $topics, $parents, $tid, $sortby, $forum_p
|
|||
'href' => url('taxonomy/term/'. $tid .'/0/feed')));
|
||||
|
||||
$output .= theme('forum_topic_list', $tid, $topics, $sortby, $forum_per_page);
|
||||
$output .= theme('xml_icon', url("taxonomy/term/$tid/0/feed"));
|
||||
$output .= theme('feed_icon', url("taxonomy/term/$tid/0/feed"));
|
||||
}
|
||||
$output .= '</div>';
|
||||
}
|
||||
|
|
|
@ -1396,7 +1396,7 @@ function node_block($op = 'list', $delta = 0) {
|
|||
}
|
||||
else if ($op == 'view') {
|
||||
$block['subject'] = t('Syndicate');
|
||||
$block['content'] = theme('xml_icon', url('rss.xml'));
|
||||
$block['content'] = theme('feed_icon', url('rss.xml'));
|
||||
|
||||
return $block;
|
||||
}
|
||||
|
|
|
@ -1396,7 +1396,7 @@ function node_block($op = 'list', $delta = 0) {
|
|||
}
|
||||
else if ($op == 'view') {
|
||||
$block['subject'] = t('Syndicate');
|
||||
$block['content'] = theme('xml_icon', url('rss.xml'));
|
||||
$block['content'] = theme('feed_icon', url('rss.xml'));
|
||||
|
||||
return $block;
|
||||
}
|
||||
|
|
|
@ -1074,7 +1074,7 @@ function taxonomy_term_page($str_tids = '', $depth = 0, $op = 'page') {
|
|||
'href' => url('taxonomy/term/'. $str_tids .'/'. $depth .'/feed')));
|
||||
|
||||
$output = taxonomy_render_nodes(taxonomy_select_nodes($tids, $operator, $depth, TRUE));
|
||||
$output .= theme('xml_icon', url('taxonomy/term/'. $str_tids .'/'. $depth .'/feed'));
|
||||
$output .= theme('feed_icon', url('taxonomy/term/'. $str_tids .'/'. $depth .'/feed'));
|
||||
return $output;
|
||||
break;
|
||||
|
||||
|
|
|
@ -1074,7 +1074,7 @@ function taxonomy_term_page($str_tids = '', $depth = 0, $op = 'page') {
|
|||
'href' => url('taxonomy/term/'. $str_tids .'/'. $depth .'/feed')));
|
||||
|
||||
$output = taxonomy_render_nodes(taxonomy_select_nodes($tids, $operator, $depth, TRUE));
|
||||
$output .= theme('xml_icon', url('taxonomy/term/'. $str_tids .'/'. $depth .'/feed'));
|
||||
$output .= theme('feed_icon', url('taxonomy/term/'. $str_tids .'/'. $depth .'/feed'));
|
||||
return $output;
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in New Issue