* @param string $hook the name of the hook
* @param string $file the name of the file that hooks into
* @param string $function the name of the function that the hook called
* @param string $hook the name of the hook
* @param string $file the name of the file that hooks into
* @param string $function the name of the function that the hook called
if(! array_key_exists($rr['hook'],$a->hooks))
$a->hooks[$rr['hook']] = array();
$a->hooks[$rr['hook']][] = array($rr['file'],$rr['function']);
if(! array_key_exists($rr['hook'],$a->hooks))
$a->hooks[$rr['hook']] = array();
$a->hooks[$rr['hook']][] = array($rr['file'],$rr['function']);
function get_theme_screenshot($theme) {
$exts = array('.png','.jpg');
foreach($exts as $ext) {
function get_theme_screenshot($theme) {
$exts = array('.png','.jpg');
foreach($exts as $ext) {
* This function search in the theme directory (and if not present in global theme directory)
* if there is a directory with the file extension and for a file with the given
* This function search in the theme directory (and if not present in global theme directory)
* if there is a directory with the file extension and for a file with the given
* @param string $file Filename
* @param string $root Full root path
* @return string Path to the file or empty string if the file isn't found
* @param string $file Filename
* @param string $root Full root path
* @return string Path to the file or empty string if the file isn't found