[wp-hackers] function_exists - user woes

Mark Jaquith mark.wordpress at txfx.net
Fri Jul 30 13:49:30 UTC 2004


I have used function_exists on my own installs of plugins that I want to 
enabled/disable seamlessly.  As Carthik noted, newbie users just copy 
paste anyway, so the slight increase in complexity doesn't really 
matter.  Advanced users will see what is going on anyway, so there's no 
problem there.

Maybe in your plugin docs, you could provide two code snippets, telling 
them what extra functionality the more complicated version provides.

On Fri, 30 Jul 2004 9:25am, Carthik Sharma wrote:
> Usually the end user just copies the code that the plugin author gives
> them, so the plugin author could provide code, whether it be the
> function_exists thing, or something else, that the user can plug into
> his pages.
> Why not provide a better way of checking if Plugin X is activated?
> That could be a wordpress function that works like
> if (plugin_activated('plugin_name'') (then do this);
>
> Carthik.
>
> On Fri, 30 Jul 2004 10:39:43 +0200, Brian Meidell <brian at mindflow.dk> 
> wrote:
>>
>>  Alex King wrote:
>>
>>  > "One thing I don't get about the WP 1.2 plugins, they all generally 
>> give
>>  > you new functionality that you expose by adding tags, etc. into the
>>  > template. If someone then disables the plugin without removing those
>>  > tags, their blog will break. The plugin enabling/disabling 
>> mechanism is
>>  > nice and interactive (and it makes people feel good), but I think it
>>  > gives them the false impression that they can control more than they
>>  > actually can by simply clicking things on and off on the plugins 
>> page."
>>
>>  It must sound like I am on a plugging rampage with this easytags 
>> thing,
>>  but I really am not. I would probably use PHP myself in any case, and
>>  the plugin isn't something I feel strongly about. It took 5 minutes to
>>  write. It's just seems that I see a lot of problems mentioned that 
>> could
>>  be handled gracefully by this plugin, if only the preconditions are
>>  there (returning functions).
>>
>>  EasyTags fails gracefully if you were using a tag that relied on a
>>  plugin function. The result will be a HTML comment that saying that 
>> the
>>  field used was unknown.
>>
>>  If EasyTags itself was disabled, the litter left in the HTML code 
>> would
>>  be XML compliant tags whose biggest crime would be to break XHTML
>>  validation.
>>
>>  /Brian
>>
>>
>>
>>
>>  _______________________________________________
>>  hackers mailing list
>>  hackers at wordpress.org
>>  http://wordpress.org/mailman/listinfo/hackers_wordpress.org
>>
>
>
> --
> When nothing is done, nothing is left undone -- 老子 Lǎozi
>
> University of Central Florida
> Homepage: http://carthik.net
>
> _______________________________________________
> hackers mailing list
> hackers at wordpress.org
> http://wordpress.org/mailman/listinfo/hackers_wordpress.org



More information about the hackers mailing list