Show list of loaded php files from plugins

In setup, set the plugin folder root:

$this->plugin_root = wp_normalize_path( WP_PLUGIN_DIR );

Then modify filter to check if file is in theme root or plugin root:

return $this->switch && ( strpos($norm, $this->root) === 0 || strpos($norm, $this->plugin_root) === 0 );

or to show all included files, don’t filter any of the results in grab:

return get_included_files();

Leave a Comment