In WordPress, comment lines are used to find theme summary, plugin summary, template name and so on.
for example:-
<?php
/*
Template Name: Snarfer
*/
?>
How WordPress doing this? What code is used to read comment lines.
In WordPress, comment lines are used to find theme summary, plugin summary, template name and so on.
for example:-
<?php
/*
Template Name: Snarfer
*/
?>
How WordPress doing this? What code is used to read comment lines.
This is done in the function
get_file_data
inwp-includes/functions.php
with the key code section being this:For example for a plugin it is referenced in
wp-admin/includes/plugin.php
in the functionget_plugin_data
: