Opened 16 years ago
Closed 16 years ago
#7085 closed enhancement (fixed)
MagpieRSS user-agent filter
Reported by: | JohnLamansky | Owned by: | westi |
---|---|---|---|
Milestone: | 2.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | has-patch RSS Magpie |
Focuses: | Cc: |
Description
Being able to customize the MagpieRSS user-agent would be useful for large WordPress sites (e.g. BuddyPress-powered social networks) who would want to identify themselves by their own site name instead of as "WordPress".
Attachments (3)
Change History (12)
@
16 years ago
An alternate method, passing the user-agent through a filter instead of requiring a constant definition
#1
@
16 years ago
- Keywords has-patch added
I've attached two different ways of doing this; I'll leave it up to the head developers to decide which one's better.
#2
@
16 years ago
Would be better to just consolidate all the external access functions so that the user agent for all requests can be managed.. (#4779)
#3
follow-up:
↓ 4
@
16 years ago
Even if Magpie used a remote_http() function like you mention, one would have to manually change the rss.php code to add the desired user-agent as a parameter for all remote_http() calls. Therefore, a magpie_user_agent filter would be appropriate regardless of whether or not ticket 4479 is implemented.
#4
in reply to:
↑ 3
@
16 years ago
Replying to JohnLamansky:
Even if Magpie used a remote_http() function like you mention, one would have to manually change the rss.php code to add the desired user-agent as a parameter for all remote_http() calls.
At the time, I was thinking of the Plugin adding itself to the User agent via a filter in the function for all requests. Not too sure how that'd work in retrospect though.
#5
@
16 years ago
- Summary changed from Allow customization of RSS user-agent to MagpieRSS user-agent filter
Ignore the first two attachments; I think rss.php-3.diff offers the most flexibility.
This patch would define the MAGPIE_USER_AGENT constant only if it hasn't already been defined. The constant could be defined through a manually-added constant definition in index.php, for example, or (preferably) via a plugin by hooking into the load_feed_engine action.