[wp-hackers] function_exists - user woes

Chris Coggburn Chris at Coggburn.us
Fri Jul 30 21:46:14 UTC 2004


Garett Harnish wrote:

> That sounds like a very easy to implement and functional solution.  
> How about something like this:
>
> function wp_call_plugin_function ($function, $params)
> {
>   if (function_exists($function))
>   {
>          call_user_func($function, $params);
>   }
> }
>
> and called like so:
>
> <?php wp_call_plugin_function('xyz_phots', array('foo' => 'bar', 'x' 
> => '3')); ?>


That looks good to us, but remember people that know nothing about php 
will be completely confused about that. Sure they could just copy and 
paste things...but it makes the user feel a little happier when they 
actually understand what is going on in what they slap in their template.

>
> Using a parameter array would definitely make it a lot easier as well.

This would, but would confuse the user as said before.

>
> ---
> Garett
>
>------------------------------------------------------------------------
>
>_______________________________________________
>hackers mailing list
>hackers at wordpress.org
>http://wordpress.org/mailman/listinfo/hackers_wordpress.org
>  
>


-- 
Chris Coggburn
http://noderat.com
http://chris.coggburn.us
http://beyonddigital.net




More information about the hackers mailing list