Hook descriptions?

Development-related discussion, including bundled plugins
User avatar
mbirth
Bear Rating Trainee
Bear Rating Trainee
Posts: 1
Joined: 05 Apr 2013, 12:42
Location: Berlin, Germany
Contact:

Hook descriptions?

Postby mbirth » 05 Apr 2013, 12:50

Is there any overview of when which hook is run?

I'm about to write a plugin to replace the snippet in the RSS by content from the linked page. So far I've seen other plugins doing a similar thing by using HOOK_ARTICLE_FILTER, HOOK_SANITIZE or HOOK_RENDER_ARTICLE_CDM. From what I've seen in the code, SANITIZE and RENDER_ARTICLE_CDM are run too late and won't modify the database contents. HOOK_FEED_FETCHED seems a little too early.

Should I use HOOK_FEED_PARSED or HOOK_ARTICLE_FILTER to modify an item's contents before it is sent to the database?

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Hook descriptions?

Postby fox » 05 Apr 2013, 13:13

See af_ plugins for an example (it's HOOK_ARTICLE_FILTER).

macfly
Bear Rating Disaster
Bear Rating Disaster
Posts: 82
Joined: 27 Mar 2013, 23:07

Re: Hook descriptions?

Postby macfly » 09 Apr 2013, 18:15

use the existing plugin embed_original


Return to “Development”

Who is online

Users browsing this forum: No registered users and 2 guests