How it works...
Plugin files can either be located directly in the wp-content/plugins directory or in a subdirectory under this location. When you access the installed plugins list in the administration interface, WordPress scans all potential plugin locations, looking for PHP files that contain comments following the format specified in this recipe. There can actually be one or more PHP files containing plugin header data in any of these directories, and each of them will show up as an entry in the plugin list.
Taking a closer look at the code that we entered in the file, the first line of the plugin file is a tag that identifies the beginning of the PHP code that will be analyzed and executed by the PHP interpreter. Optionally, we could ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access