WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 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 6 years ago.

Download all attachments as: .zip

Change History (22)

@znarfor6 years ago

comment:1 @znarfor6 years ago

  • Type changed from defect (bug) to enhancement

comment:2 @znarfor6 years ago

  • Keywords has-patch added

comment:3 @ryan6 years ago

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

comment:4 follow-up: @Denis-de-Bernardy6 years ago

  • Keywords tested commit added

commit, wontfix?

comment:5 in reply to: ↑ 4 @westi6 years ago

Replying to Denis-de-Bernardy:

commit, wontfix?

Waiting for feedback from joseph.

comment:6 follow-up: @josephscott6 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.

comment:7 in reply to: ↑ 6 @westi6 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.

comment:8 @znarfor6 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 ?

comment:9 @Denis-de-Bernardy6 years ago

  • Keywords dev-feedback added

comment:10 @Denis-de-Bernardy6 years ago

  • Milestone changed from 2.8 to 2.9

punting per IRC discussion

comment:11 @znarfor6 years ago

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

comment:12 @dd326 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.

comment:14 @Denis-de-Bernardy6 years ago

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

comment:15 @znarfor6 years ago

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

comment:16 @josephscott6 years ago

The patch still applies on -trunk and looks okay.

comment:17 @westi6 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?

comment:18 @znarfor6 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'.

comment:19 @josephscott6 years ago

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

comment:20 @ryan6 years ago

  • Milestone changed from 2.9 to 3.0

comment:21 @westi6 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.