FYI for Plugin Standards

Inactive
  • 54 points
    Serious WPMU DEV-ster
    I'm helpful
    Brayne

    Member  —  4th November 2010 14:58         

    This is an FYI more than anything...

    I recently could not get a premium plugin to work, at all. I use multi-site in a multi-db environment, using all of the latest versions of said software and knowing there could be a number of things that could go wrong, I rolled up my sleeves to find the solution. It turns out that the premium.wpmu plugin was hard coding the table prefixes as in 'wp_'. Since wordpress allows us to change the table prefixes and it is a smart security move to do so, why not code the plugins to use the variable $table_prefix? This is found in the WP root config file.

    I now do a search for all 'wp_' in all of your plugins and upgrade the code to reflect the variable $table_prefix and this solves my issues.... note, you must declare global $table_prefix before you can use it inside a function.

    Hope this helps someone.

    Gregg