• If you have plugin functions in your theme, there is the risk that when you upgrade and something goes wrong, that plugin code will throw you an error.

    So if the plugin says to use this:
    <?php wp_grins(); ?>

    Then you need to alter that to be like this:
    <?php if (function_exists('wp_grins')) wp_grins(); ?>

    That way, if no plugin, no error from the theme.

Viewing 12 replies - 16 through 27 (of 27 total)
  • No, you wrap not with code tag but backticks.

    no you dont need the one with ! ,

    the one with ! is for plugin programmer , its just in case the programmer gave a function name that allready exist .

    Ah. Okay…. that makes more sense. Couldn’t see what it could be needed for.

    Thanks to both of you….

    Just says this: If my plugin is deactivated and this function is not available, use this other one that comes with WP. But if it is activated use it instead of the WP function.

    Edit: Oops, I misunderstood what you were asking. Thought you were referring to my post.

    is the post disorted or i’m the only one who see the posts disorted now ?

    You are using IE. Fix your post with li’s so they look like this:

    backtick<backtickli>
    backtick<backtick/li>

    is this a bug issue ? because i was testing on some wordpress blog to post long words (just tests issues), it messed all there blog apparence and it became disorted .

    here is what i mean : see this blog :

    blog.meebo.com/?p=65 (see how the page look and my last post)

    how can we prevent such thing to happen ?

    Thread Starter Mark (podz)

    (@podz)

    chaaban, doyouknowanyreallylongwordsthatwouldbesolongtobreakthecommentsbox ?
    Orwouldmostpeople use spaces ?

    Not a bug ??

    i mean just if someone would like to act in a bad way ?? and mess your blog (o’.’o) like i did for the poor guy but it was just tests issues :p

    Automatic wraping like in your post ??

    Thread Starter Mark (podz)

    (@podz)

    Put spaces in ??

    It would be nifty if someone could write some kind of generator app which could take input in the form of a plugin function call and output it as wrapped code automatically. Just a thought… ??

    Sorry for resurrecting old threads, but I have a question about this. I’ve got the function_exists PHP command working nicely for the Gravatar plugin in my comments.php file.

    But when trying to use it with Viper’s Plugins Used plugin, it seems to kill the plugin output:

    <?php if (function_exists('viperspluginsused')) { ?>
    <?php $viperspluginsused = new viperspluginsused(); ?>
    <?php $viperspluginsused->output_table('id="pluginstable"', TRUE, TRUE); ?>
    <?php } ?>

    What am I doing wrong?

Viewing 12 replies - 16 through 27 (of 27 total)
  • The topic ‘Before upgrading, wrap your plugins’ is closed to new replies.