Created
July 21, 2014 04:33
-
-
Save dtbaker/66c4d3deefdf733eb800 to your computer and use it in GitHub Desktop.
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
$possibleTemplates = array( | |
plugin_dir_path( __FILE__ ).'/template_file_name.php', // default template | |
TEMPLATEPATH.'/my_plugin_name/template_file_name.php', // user can override default with this template | |
STYLESHEETPATH.'/my_plugin_name/template_file_name.php', // or user can override default with this template | |
); | |
$tempalteToUse = false; | |
foreach($possibleTemplates as $possibleTemplate){ | |
if(is_readable($possibleTemplate)){ | |
$tempalteToUse = $possibleTemplate; | |
} | |
} | |
if($tempalteToUse){ | |
require($tempalteToUse); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment