Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Talk:Plugin API

I've made some changes concerning parameter propagation in actions. You really don't need to return a value in an action because the return value is not used by WordPress. Don't believe me? Please check the source before you correct it.

Also, there were a few plugin hooks in the actions section (and I assume that there will be a few in the filters section) that just don't exist. As in, they never existed. I don't know who or what implied that these hooks existed, but rather than be a reference on what might be, I've simply removed the references to the non-existant hooks until such time as they are implemented. If someone can provide the reference for the missing hooks, that might be nice to include here. --Ringmaster 22:01, 3 Jan 2005 (GMT)


(skippy 16:05, 16 Feb 2005 (GMT))

I grepped the source for all instances of do_action and apply_filter:

grep -ri do_action *
grep -ri apply_filter *

and got a much longer list than is referenced on this page.

Yeah - if you edit this article you can see some notes commented out. Ringmaster was working on this, but I don't know where it stands now. If you can put them in and describe them (for the moment, it might also be best to mark 1.5 only filters/actions), I say go for it. --MDAWaffe 01:13, 17 Feb 2005 (GMT)

I've submitted a question to the hackers mailing list asking for clarification on the new plugin hooks for Adding submenus to the admin menu. I'll put in the results once I get word. --MDAWaffe 13:47, 19 Feb 2005 (GMT)

Don't know how to add submenus to new, plugin author defined menus. --MDAWaffe 08:57, 20 Feb 2005 (GMT)

Yeah, the plugin hooks have expanded quite a lot since I did my grep. I think it was only a couple of days later that the list grew substantially due to all the comment spam prevention hooks. Since it was too much work to keep grepping the source for changes as they were ocurring, I just let it go until 1.5 was finalized. So now would be a good time to finish it up. --Ringmaster 13:08, 21 Feb 2005 (GMT)

Ok, I added the admin UI info.

Does it belong here? It doesn't feel like it belongs here. New Page?

--Ringmaster 20:44, 25 Feb 2005 (GMT)

I think it should be on its own page. It's not part of the API, just something that can be done with a convenient action. "Adding Submenus to The Admin Menus"? --MDAWaffe - Talk 07:49, 8 Mar 2005 (UTC)

Nope: Adding Administration Menus --MDAWaffe - Talk 20:56, 8 Mar 2005 (UTC)

Merged

A couple hook bits moved from Carthik's Writing a Plugin.

Needed: Nix #Adding Administration Menus, #Avoiding Function Name Collisions, #Plugin Metadata from here and make sure all that content is at Writing a Plugin. --MDAWaffe - Talk 20:59, 11 Mar 2005 (UTC) --MDAWaffe - Talk 20:56, 12 Mar 2005 (UTC)

Template Filters

These really exist. They don't grep since many are defined through wp-includes/functions.php -> get_query_template(). --MDAWaffe - Talk 22:41, 16 Mar 2005 (UTC)


Filter Hooks

Has any thought been given to breaking up the Plugin API page? I'm thinking about working on the filter hooks. Many of the hooks have extra parameters, or are called in more than one context (look at list_cats for an example). Adding a description and example code for each hook might make that section very long. Davepar 23:31, 11 May 2005 (UTC)

I started documenting some of the filter hooks. I'm trying out a style similar to the Template Tags where each hook has it's own page. Seems overkill for many of them, but some of the hooks are rather complicated. I'm working in a scratch area: Filter Hooks Draft. I've only filled out a couple of the hooks so far, but let me know what you think. I'm very open to suggestions. Davepar 20:44, 12 May 2005 (UTC)

Big picture about filter hooks

It was said in the documentation that filters have no impact over your database content. Well, that's no true. The pre_comment_xxx filters do have an impact on what is stored in the database. I did a minor correction about that. --Vermorel 19:19, 13 Jun 2005 (UTC)

I have added the filters for the rich text editor. I would like to split the Plugin API page into separate pages for the action hooks and filter hooks. Is there any way to do that?

Apply a plugin to entire site

It should be mentioned how to apply a plugin to the entire site. See http://wordpress.org/support/topic/58626

Missing Section

The Avoiding Function Name Collisions section no longer seems to exist at Writing_Plugins. Not sure where it went, but thought to put a note here.


(kkaland 21:38, 4 Dec 2010 (PST))

recovered and repaired --MichaelH (talk) 14:40, 5 December 2010 (UTC)