One Reason Why WordPress Plugin Activation Causes Fatal Error ԭ��֮һwordpress��������ԭ���������
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.�����걨�Ĺ�������IJ������������ǰ��������WordPress����������еIJ���� To prevent this you should declare your functions like this:Ϊ�˷�ֹ���������Ӧ���걨���ְ��������ģ�
if(!function_exists('your_function_name')) { function your_function_name() { //....��� �� function_exists �� ' your_function_name ' �� �� ������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.�������ǵ������������еIJ�����ܣ�ǰ��TG ����ȷ�����ǵĹ�˾��
Filed under������ Headline Newsͷ������ , �� How To��� , �� Pro Blogging��Blogging , �� Web��ҳ , �� Web 2.0 Web 2.0�� , �� WordPress��WordPress , �� WordPress Plugin wordpress��� | |
| |
RSS 2.0 2.0 | |
Trackback Trackback���� this Article |������|
Email this Article�����ʼ�������
You may also like to read��Ҳ������� |



































