Make WordPress Core

Opened 16 years ago

Last modified 5 years ago

#9510 new enhancement

Multiple feed fixes and enhancements

Reported by: peaceablewhale's profile peaceablewhale Owned by:
Milestone: Priority: normal
Severity: major Version: 2.7.1
Component: Feeds Keywords: needs-refresh dev-feedback
Focuses: Cc:

Description

Currently, the feed always returns the same subtitle, self link, alternate link and replies link no matter what the page type is. I think they should be different for each page type.

Attachments (7)

feed-atom.php (3.7 KB) - added by peaceablewhale 16 years ago.
Initial attempt to add those features to feed-atom.php
link-template.php (52.2 KB) - added by peaceablewhale 16 years ago.
Initial attempt to add new functions to link-template.php
php.files.to.patch (6.7 KB) - added by simek 16 years ago.
Changes into attached PHP files in one patch file - diff preview
feed-atom.php.patch (4.3 KB) - added by peaceablewhale 16 years ago.
atom:id should be changed as well. This patch replaces the feed-atom.php part of the previous patch.
9510-v2.patch (20.2 KB) - added by peaceablewhale 16 years ago.
New patch, replaces all old patches.
9510-v3.patch (17.4 KB) - added by peaceablewhale 15 years ago.
Version 3 of the patch, changes from #9515 adopted, with minor corrections
9510-v4.patch (48.6 KB) - added by peaceablewhale 15 years ago.

Download all attachments as: .zip

Change History (38)

@peaceablewhale
16 years ago

Initial attempt to add those features to feed-atom.php

@peaceablewhale
16 years ago

Initial attempt to add new functions to link-template.php

#1 @peaceablewhale
16 years ago

get_day_feed_link and get_day_comments_feed_link functions are to be added...

@simek
16 years ago

Changes into attached PHP files in one patch file - diff preview

#2 @simek
16 years ago

  • Keywords has-patch added

@peaceablewhale
16 years ago

atom:id should be changed as well. This patch replaces the feed-atom.php part of the previous patch.

#3 @peaceablewhale
16 years ago

Thanks simek for the patch. I have uploaded a new patch replacing the feed-atom.php part.

This is the first time for me to generate a patch file. Please let me know if I have done anything wrong. Thanks.

@peaceablewhale
16 years ago

New patch, replaces all old patches.

#4 @peaceablewhale
16 years ago

  • Keywords dev-feedback added
  • Severity changed from normal to major

The v2 patch has included the changes proposed in #9515, the patch will have to be updated when #9515 is settled.

In addition, since I have made many modifications to the files, I would like to get some comments from the core developers.

#5 @peaceablewhale
16 years ago

  • Keywords needs-testing added
  • Milestone changed from Unassigned to 2.8

Could this be added in WordPress 2.8?

#6 @Denis-de-Bernardy
16 years ago

patch applies cleanly

#7 @peaceablewhale
16 years ago

This report will be updated after #9515 is fixed.

#8 @Denis-de-Bernardy
15 years ago

  • Milestone changed from 2.8 to Future Release

patch is b0rke

#9 @peaceablewhale
15 years ago

  • Milestone changed from Future Release to 2.8

Patch updated.

@peaceablewhale
15 years ago

Version 3 of the patch, changes from #9515 adopted, with minor corrections

#10 @ryan
15 years ago

  • Milestone changed from 2.8 to Future Release
  • Type changed from defect (bug) to enhancement

Postponing from 2.8.

#11 @Denis-de-Bernardy
15 years ago

  • Milestone changed from Future Release to 2.9

#12 @Denis-de-Bernardy
15 years ago

  • Keywords dev-feedback removed

patch still applies clean

#13 @peaceablewhale
15 years ago

Patch will be updated after #4967 is fixed.

#14 @peaceablewhale
15 years ago

  • Keywords needs-review added; needs-testing removed
  • Summary changed from Show different subtitle, self link, alternate link and replies link in Atom feed based on the page type to Show different subtitle, self link, alternate link and replies link in feeds based on the page type

A new patch has been uploaded, with the changes proposed in #4967 excluded. The patch also fixes #9992, #9831 and some formatting issues in feeds.

#15 @peaceablewhale
15 years ago

The updated version 4 patch fixes #4523 as well.

#16 @peaceablewhale
15 years ago

Correction: It's #4253, not #4523

#17 @peaceablewhale
15 years ago

Patch updated to fix a problem that the required <description> element is sometimes not displayed under RSS 2 channel.

#18 @peaceablewhale
15 years ago

  • Priority changed from normal to high

Attempt to fix #8828 as well.

#19 @peaceablewhale
15 years ago

Added the change proposed in #10016

#20 @peaceablewhale
15 years ago

  • Summary changed from Show different subtitle, self link, alternate link and replies link in feeds based on the page type to Multiple feed fixes and enhancements

#21 @peaceablewhale
15 years ago

Added the changes proposed in #10509, also made Atom support sy:updatePeriod and sy:updateFrequency.

#22 follow-up: @beaulebens
15 years ago

  • Cc beau@… added

Not to be too picky, but it'd be nice if this was closer to the WordPress Coding Standard. Specifically, reversing most comparisons, spacing things out a bit to make them easier to read and avoiding quote-escaping by going between single and double quotes where appropriate.

That being said, after a very quick visual skim over the code it looks like it adds a lot more flexibility and robustness to the feed system of WP, so I'm all for it (haven't tested to see if the patch applies cleanly or does as advertised). Looks very thorough.

feed_link() and feed_entry_link() looked identical (except for the filter they run), perhaps they can just be combined into a more generic feed_link() function, with a parameter indicating what filter to run over the resulting code, or just have it run at the point that calls them?

You're using get_lastpostmodified() to get a value for feed_updated(), but it seems like that value would not necessarily be accurate for anything except the full-site feed. If there's an easy way to get that date from the first matching item in the feed, that seems like that would consistently give you the correct value for that specific feed.

#23 in reply to: ↑ 22 @peaceablewhale
15 years ago

@beaulebens:

Thanks for your comment. I will upload a patch that conforms to the coding standard later.

The refreshed patch is expected to combine feed_link() and feed_entry_link() into generic_feed_link(), with a parameter indicating which filter to be used.

I know that get_lastpostmodified() is problem... but I am not able to fix that until #4575 is fixed...

#24 @peaceablewhale
15 years ago

After a second thought, I think that adding $is_entry to feed_link() is better. A refreshed patch has been uploaded, and it is now closer to the WordPress Coding Standard.

#25 @peaceablewhale
15 years ago

Updated the patch to resolve the conflict caused by [11864].

#26 @peaceablewhale
15 years ago

Updated the patch to resolve the conflict caused by [11980].

#27 @peaceablewhale
15 years ago

  • Keywords needs-testing added; needs-review removed

Marking this report "needs-testing" in order to gain attention in the upcoming bug hunt.

#28 @ryan
15 years ago

  • Milestone changed from 2.9 to Future Release

#29 @chriscct7
10 years ago

  • Keywords needs-refresh dev-feedback added; has-patch needs-testing removed

Someone from core want to re-review whether WordPress core should do the proposed idea? On the basis, the idea seems good, and provides alot of additional flexibility. Lastest patch (patch 4) would need to be refreshed)

Last edited 10 years ago by chriscct7 (previous) (diff)

#31 @stevenkword
9 years ago

  • Priority changed from high to normal
Note: See TracTickets for help on using tickets.