• so i am trying to figure out how this magic works and i cannot seem to find any documentation on the subject, but how in the world does wordpress know which is the “main php file” in a plugin??!?!?

    i thought it would be the one named the same as the plugin dir, but i see plugins that work fine with an abbreviated name as the php file (ie another-wordpress-classifieds-plugin plugin uses a file called awpcp.php and it works fine).

    So i thought it may be that just any php file in the root dir of the plugin would work, as long as there is only one. But again the example i gave above has several php files in the root so thats not it.

    Could it be that it is the first php file alphabetically in the dir… no.
    Could it be defined in the readme.txt file… no.
    Maybe it’s just magic? please – it is driving me nuts!

    How in the world does WordPress know which is the main php file in the plugin root dir?

The topic ‘how does wordpress know which is the "main php file" in a plugin’ is closed to new replies.