[wp-hackers] Looking for quick input on creating new actionhooks...

Robert Deaton false.hopes at gmail.com
Sat May 28 06:12:41 GMT 2005


I and many others have tried this multiple times, check the archives. 
Nothing's happened yet, so I assume it probably never will in the near 
future.

On 5/28/05, David Chait <davebytes at comcast.net> wrote:
> 
> 1. I figured better to use a new action hook that others might start to 
> use and spread, rather than a custom function.
> 2. Applying filters to the_content doesn't work (needs to be able to 
> insert before the start of the post data, like before the title, and after 
> the body, like after the posted-in -- or 'between' posts, if that's clearer 
> ;) ). Also breaks if the person uses the_excerpt. ;)
> 3. I'm not assuming a hook is preexisting in the slightest -- but wouldn't 
> we rather people update their current theme to have the "right hooks" that 
> then support LOTS of plugins rather than adding a custom function call PER 
> plugin? Again, I thought this a better approach.
>  And maybe we need to start a different thread about 'verification'. Like 
> testing that THEMES have references to all 'core actions' they should! ;)
>  -d
> 
> ----- Original Message ----- 
> *From:* Robert Deaton <false.hopes at gmail.com> 
> *To:* wp-hackers at lists.automattic.com 
> *Sent:* Saturday, May 28, 2005 1:21 AM
> *Subject:* Re: [wp-hackers] Looking for quick input on creating new 
> actionhooks...
> 
> Or, another idea would be applying filters to the_content and adding your 
> content in (provided you don't mind it being inside the post div). I do have 
> to agree with Matt on adding more hooks, we still have the unresolved issue 
> with theme authors not putting the post hooks in, but that's a whole other 
> arguement.
> 
> On 5/27/05, Matt Mullenweg <m at mullenweg.com> wrote: 
> > 
> > David Chait wrote:
> > > ...Or something along those lines. The concept is actions that (in
> > > future templates, or added to current ones) would execute inside the
> > > post DIV, one right at the start, one right at the end. I'm working on 
> > 
> > > plugins that allow you to insert custom content into The Loop without
> > > editing the template, and figure why have people call a custom 
> > function,
> > > when they could just have do_action('wp_post_out_end'); Y'know what I 
> > > mean? Seems like sprinkling new action hook locations is more useful
> > > than adding another function call directly because:
> > 
> > Even with the simple hooks we have already in the templates, lots of
> > plugin authors have had to deal with the hooks not being there because a 
> > 
> > theme doesn't contain them. It's also a slippery slope to go down, in
> > theory we could have a hook between every HTML element on the page, but
> > that'd be pretty silly.
> > 
> > A better solution might be...
> > 
> > Scan the plugin file for function definitions, then scan the templates 
> > and warn the user before actually deactivating the plugin that there are
> > still function calls in their templates.
> > 
> > --
> > Matt Mullenweg
> > http://photomatt.net | http://wordpress.org
> > http://pingomatic.com | http://cnet.com
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> > 
> 
> 
> 
> -- 
> --Robert Deaton 
> http://somethingunpredictable.com 
> 
> ------------------------------
> 
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
> 
> 
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
> 
> 
> 


-- 
--Robert Deaton
http://somethingunpredictable.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://comox.textdrive.com/pipermail/wp-hackers/attachments/20050528/d2ef8f69/attachment-0001.html


More information about the wp-hackers mailing list