Vote
0
One Reason Why WordPress Plugin Activation Causes Fatal Error
Angsuman Chakraborty
January 29th, 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.
Filed under Headline News, How To, Pro Blogging, Web, Web 2.0, WordPress, WordPress Plugin |
|
RSS 2.0 |
Trackback this Article
|
Email this Article
You may also like to read |



































