One Reason Why WordPress Plugin Activation Causes Fatal Error

By Angsuman Chakraborty, Gaea News Network
Tuesday, January 29, 2008

When you declare a function in your plugin code which has already been declared previously in either WordPress code or in one of the plugins. To prevent this you should declare your functions like this:

if(!function_exists('your_function_name')) {
    function your_function_name() {
        //.... Function code
    }
}

It is a good idea to always define and consistently use a namespace. For example we name all our plugin functions prefixed with tg, to identify our company.

Discussion
June 10, 2009: 12:53 am

Can this be fixed?

Fatal error: require_once() [function.require]: Failed opening required ‘/home/shae128/public_html/wp-includes/widgets.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/shae128/public_html/wp-includes/functions.php on line 2496

YOUR VIEW POINT
NAME : (REQUIRED)
MAIL : (REQUIRED)
will not be displayed
WEBSITE : (OPTIONAL)
YOUR
COMMENT :