The question is not only for WP, but PHP in General.
I have a file .php in a certain folder (let's call it P
), regardless vordpressovskih structure with pages, posts, etc., However in this file I need a wordpress function, namely wpdb.
So I write this:
And everything seems fine.
However, one of the plugins has a file index.php which is done like so:
Well, this init.php when you download the plugin on this page, starts first searched in the folder P
, and then in the plugin folder.
And if he can find - will not find it... will conflict, and most likely the 500 error - page cease to work.
The question of what to do?
There are some clever options to load wp-load disabled plugins etc.
But, you know, and then you have to disable the theme, etc. Then the whole function should write. And copy-paste it in each page. Ready but there is no such function. And reluctance to write.