theme_xml_icon looks like a legacy function that was since surpassed by the more flexible theme_feed_icon; the code for each is identical except that theme_feed_icon takes a title, and theme_xml_icon displays the old-school "XML" icons rather than the new "feed" icon used everywhere else in core. The only module that currently calls theme_xml_icon is Aggregator module, and this will get fixed in 6.x.

This is an API change, so too late for 6.x, so bumping to 7.x.

Comments

fgm’s picture

Version: 7.x-dev » 6.0-rc1
Status: Active » Needs review
StatusFileSize
new628 bytes

Maybe it's still time to at least fix it in the documentation http://api.drupal.org/api/function/theme_xml_icon/6, so that users tempted to use it on their all-new shiny D6 site would know that they should use theme_feed_icon instead ?

(this is why I'm resetting it to D6, not to request a code change: I agree with you on the fact that it is too late for this.) Once D6 documentation is fixed, we can bump to D7 again.

scoutbaker’s picture

+1 for documenting this for D6.

The current patch says, "For most use cases, this function has been superseded by theme_feed_icon." As someone new, I would wonder in what case I would use this function over theme_feed_icon. Since this is really a depracated function, wouldn't it be better to just say, "This function has been superseded by theme_feed_icon," and not leave the use question open at all?

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

xml != feed so i think the proposed text is the right balance.

gábor hojtsy’s picture

Version: 6.0-rc1 » 7.x-dev
Status: Reviewed & tested by the community » Active
StatusFileSize
new691 bytes

Well, I modified the patch for coding style.

- We have one line distinct function descriptions, so one empty line after that.
- Function names should have () after them (both in text and @see).
- Dot at end of sentence.

Committed this one.

I am not sure we need this function in Drupal 7 though, not because generic XML buttons might not be needed, but because this does not look like a good core idea. So reopening for Drupal 7.

lilou’s picture

Status: Active » Needs review
StatusFileSize
new1.41 KB

I am not sure we need this function in Drupal 7 though, not because generic XML buttons might not be needed, but because this does not look like a good core idea.

+1

theme_xml_icon() and misc/xml.png are not call in drupal core ...

lilou’s picture

Anonymous’s picture

Status: Needs review » Needs work

The last submitted patch failed testing.

mgifford’s picture

Just touched these functions - http://drupal.org/node/81794#comment-1544260

Thought this might be a way of at least cutting down the extra code.

function theme_xml_icon($url, $title = 'XML feed', $alt = 'XML feed', $img = 'misc/xml.png') {
  return theme_feed_icon($url, $title = 'XML feed', $alt = 'XML feed', $img = 'misc/xml.png');
}

Although grepping and removing all instances of theme_xml_icon() might be the best approach.

Mike

mgifford’s picture

Status: Needs work » Needs review
StatusFileSize
new2.17 KB

Or since it's really not really used from what I can tell and it's very redundant, why not remove it. Not sure why last patch didn't stick, but hopefully this one will.

It's got the enhancements I brought in here - http://drupal.org/node/81794#comment-1544260

But I've just eliminated the references to the xml_icon

dries’s picture

Status: Needs review » Fixed

Committed to CVS HEAD. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

deekayen’s picture

Status: Closed (fixed) » Reviewed & tested by the community

misc/xml.png remains - should be removed.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Thanks. :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.