Created
December 30, 2013 08:12
-
-
Save mrtwebdesign/8179235 to your computer and use it in GitHub Desktop.
function to display all of the files used in creating the page for WordPress theme
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function filetracker(){ | |
| $included_files = get_included_files(); | |
| $stylesheet_dir = str_replace( '\\', '/', get_stylesheet_directory() ); | |
| $template_dir = str_replace( '\\', '/', get_template_directory() ); | |
| foreach ( $included_files as $key => $path ) { | |
| $path = '<br>'.str_replace( '\\', '/', $path ); | |
| if ( false === strpos( $path, $stylesheet_dir ) && false === strpos( $path, $template_dir ) ) | |
| unset( $included_files[$key] ); | |
| } | |
| echo '<pre>'; print_r($included_files); echo '</pre>'; | |
| return; | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment