[wp-hackers] Admin notices
John 3:16 Media
wp at john316media.com
Sun Apr 10 10:06:27 UTC 2011
Give me some credit, I understand the concept of a hook.
What I am saying is simply in the case of the admin_notices hook I'd imagine
most the time each function hooked in to it is 99% the same, just different
text. What I have done about this is to create a function I include with
all my plugins that simple takes a parameter for the text and handles the
rest. No I'm not saying the admin_notices hook should go away in favor for
a function. Hooks are really useful for executing arbitrary code at
specific points, and I've seen plugins that use it to display notices with
customize designs (like a blue box instead of yellow or red). I simple
think a function to cover the more common usage would be simpler and more
straight forward though than always using the hook directly.
1) I want to make sure I'm not reinventing the wheel here so to speak if the
core already has such a function
2) If core does not have such a function, would this be something that could
be added, i mean if if open a trac ticket and include a patch file to add my
function I already use in my plugins to core would it actually be likely to
be included in core or would I just be wasting my time to go thought he
process of a svn checkout and building a patch file.
On Sun, Apr 10, 2011 at 12:38 AM, Barry Carlyon <barry at barrycarlyon.co.uk>wrote:
> The point of Wordpress is you add a function to a hook.... (quite a pain
> In theory you could add messages to an array.
> Then call admin_notices and your function iterates thru the array and echos
> them all.....
> Barry Carlyon
> Freelance Web Developer
> Freelance Lighting/AV Engineer
> mobile: 07729 048 443
> skype: barrycarlyon
> email: barry at barrycarlyon.co.uk
> msn: barry at barrycarlyon.co.uk
> On 10 Apr 2011, at 07:08, John 3:16 Media wrote:
> > I was wondering if there is a better way to add a message to the admin
> > like a functionother than the admin notices hook, which requires a
> > for each message.
> > _______________________________________________
> > 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
I'm working on a support ticket plugin and I'm looking for users to test and
provide feedback on it. Will bribe anyone who helps with a generous
discount on the final product. Email me off-list if interested.
More information about the wp-hackers