One Reason Why WordPress Plugin Activation Causes Fatal Error ��]���@wordpress����E������]�P�R��~
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.��z�ӳ�\��b�z������N�X�w�ť��H�e�A�L�צbWordPress�N�X�Φb�䤤������C To prevent this you should declare your functions like this:���F����o�ر��p�A���ӥӳ�z��¾��O�o�˪��G
if(!function_exists('your_function_name')) { function your_function_name() { //....�p�G�] �I function_exists �] ' your_function_name ' �^ �^ �]�\��your_function_name �] �^ �] //.... Function code } }�\��N�X�^ �^
It is a good idea to always define and consistently use a namespace.�o�O�@�Ӧn�D�N�A�n�l�ש�T�M�@�e�ϥΪ��W�r�Ŷ��C For example we name all our plugin functions prefixed with tg, to identify our company.�Ҧp�ڭ̪��W�r�ڭ̩Ҧ�������\��A�e��PTG �A�H�T�w�ڭ̪����q�C
Filed under���_�U Headline News�Y��s�D , �A How To�p�� , �A Pro Blogging�٦�Blogging , �A Web���� , �A Web 2.0 Web 2.0�� , �A WordPress�bWordPress , �A WordPress Plugin wordpress���� | |
| |
RSS 2.0 2.0 | |
Trackback Trackback��踪 this Article |���峹|
Email this Article�q�l�l�峹
You may also like to read�z�]�i�H�QŪ |



































