Ticket #8826 (closed enhancement: fixed)

Opened 3 years ago

Last modified 2 years ago

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

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

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

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

Change History

znarfor3 years ago

  • Type changed from defect (bug) to enhancement
  • Keywords has-patch added

comment:3   ryan3 years ago

  • Owner changed from anonymous to josephscott
  • Component changed from General to AtomPub
  • Keywords tested commit added

commit, wontfix?

comment:5 in reply to: ↑ 4   westi3 years ago

Replying to Denis-de-Bernardy:

commit, wontfix?

Waiting for feedback from joseph.

comment:6 follow-up: ↓ 7   josephscott3 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   westi3 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.

  • 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 ?

  • Keywords dev-feedback added
  • Milestone changed from 2.8 to 2.9

punting per IRC discussion

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

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.

closed #5195 as dup

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

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

The patch still applies on -trunk and looks okay.

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?

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'.

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

  • Milestone changed from 2.9 to 3.0
  • Status changed from new to closed
  • Resolution set to fixed

(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.