WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 7 years ago

#8826 closed enhancement (fixed)

Support 'atom_ns' 'atom_head' & 'atom_entry' hooks in Atompub backend

Reported by: znarfor Owned by: josephscott
Milestone: 3.0 Priority: normal
Severity: normal Version: 2.7
Component: AtomPub Keywords: has-patch needs-review
Focuses: Cc:

Description

wp-app.php is not extensible at the moment and by simply adding this hooks, we may be able to expose more content in it through plugins.

Alternatively, we may use dedicated hooks like 'app_ns' 'app_head' and 'app_entry'.

Attachments (1)

wp-app-hooks.diff (1.5 KB) - added by znarfor 8 years ago.

Download all attachments as: .zip

Change History (22)

@znarfor
8 years ago

#1 @znarfor
8 years ago

  • Type changed from defect (bug) to enhancement

#2 @znarfor
8 years ago

  • Keywords has-patch added

#3 @ryan
7 years ago

  • Component changed from General to AtomPub
  • Owner changed from anonymous to josephscott

#4 follow-up: @Denis-de-Bernardy
7 years ago

  • Keywords tested commit added

commit, wontfix?

#5 in reply to: ↑ 4 @westi
7 years ago

Replying to Denis-de-Bernardy:

commit, wontfix?

Waiting for feedback from joseph.

#6 follow-up: @josephscott
7 years ago

I need to read up and make sure we're solid with the proper formatting/syntax of namespaces in XML/AtomPub (looks pretty simple, just want to make sure).

I'm also trying to think through the best way to do this. This might be better done as a filter to make it less likely that a mis-behaving plugin would mess up AtomPub responses.

#7 in reply to: ↑ 6 @westi
7 years ago

  • Keywords tested commit removed
  • Milestone changed from 2.8 to 2.9

Replying to josephscott:

I need to read up and make sure we're solid with the proper formatting/syntax of namespaces in XML/AtomPub (looks pretty simple, just want to make sure).

I'm also trying to think through the best way to do this. This might be better done as a filter to make it less likely that a mis-behaving plugin would mess up AtomPub responses.

A filter for namespaces sounds easier and safer for a plugin to use.

(Also if we add atom_head we should move the generator call into a filter on it.)

Moving to 2.9 for now as I don't want to change APP now while we don't have a concrete solution.

#8 @znarfor
7 years ago

  • Milestone changed from 2.9 to 2.8

It's a bit surprising to say using a filter is necessary when the exactly same hook is already existing in feed-atom.php, same for generator.

See yourself:
http://core.trac.wordpress.org/browser/trunk/wp-includes/feed-atom.php

I think the refactoring you propose have few chances to be a priority, and then will likely be delayed again and again. Let be pragmatic ?

Can you please review your decision and consider integrating this hooks in WP 2.8 ?

#9 @Denis-de-Bernardy
7 years ago

  • Keywords dev-feedback added

#10 @Denis-de-Bernardy
7 years ago

  • Milestone changed from 2.8 to 2.9

punting per IRC discussion

#11 @znarfor
7 years ago

Can you please excerpt the discussion or link to the relevant IRC logs ?

#12 @dd32
7 years ago

Can you please excerpt the discussion or link to the relevant IRC logs ?

A target date was set for 2.8, Remaining enhancements and non-critical bugs are being punted to 2.9 (or 2.8.1 if decided to bring it back to the 2.8 series, which is done after its applied to 2.9)

https://irclogs.wordpress.org/chanlog.php?channel=wordpress-dev&day=2009-06-03&sort=asc ~5pm onwards.

#14 @Denis-de-Bernardy
7 years ago

  • Cc josephscott added
  • Keywords needs-review added; dev-feedback removed

#15 @znarfor
7 years ago

Would be nice to integrate this simple and straightforward patch in 2.9.

#16 @josephscott
7 years ago

The patch still applies on -trunk and looks okay.

#17 @westi
7 years ago

Do we want these to be the same as the ones in the atom feed or different - my feeling is maybe different so as to give better control for plugins?

#18 @znarfor
7 years ago

As the submitter of this patch, i have nothing against different names for this hooks. Say 'atompub_head' or 'app_head' instead of 'atom_head'.

#19 @josephscott
7 years ago

I didn't catch that the action names were the same as the atom feed, I think they should definitely be different.

#20 @ryan
7 years ago

  • Milestone changed from 2.9 to 3.0

#21 @westi
7 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [12488]) Add some hooks to wp-app.php to allow a plugin to extend the data returned. Fixes #8826 props znarfor.

Note: See TracTickets for help on using tickets.