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



































