Basically I want to be able to see the names of files on the front-end - not just templates e.g. category/page templates, but the actual theme files like header.php/sidebar.php/footer.php and so on.
So I think the problem is what I've found so far doesn't have the depth I need and only goes as far as telling me what "template" is being used versus all the pieces that make up the "template".
I can't seem to find something that'll give me a PHP object for me
var_dump and see what's available or a hook that I can manipulate. Does this actually exist or am I grasping for straws?
What I looked into so far:
t31os' answer is helpful, but it only goes as deep as the container template, so if I call his function in header.php, it will tell me page.php instead of header.php. In other words, I want to know the exact file my function is calling out from.
This is a similar issue as the first question, and still using t310s' answer as reference.
Also looked into the wp_get_theme function, but that object only gives me info about the theme itself, rather than an array or list of files.
My goal is to write a function that would dynamically echo out all the file names or pieces on what's being viewed on the front-end . So a "Page" would echo page.php, sidebar.php, footer.php and header.php for example.
Please no plugins, I'd like to resolve this with PHP. I get that this might not be a simple answer, but I'd like a starting point at the very least - or at least know if it's possible.