Created
May 5, 2012 20:30
-
-
Save fidelix/2605438 to your computer and use it in GitHub Desktop.
This file contains 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
<?php | |
//Recebe um array contendo os links e retorna um array contendo os codigos | |
function check_links ($links){ | |
foreach ($links as &$url){ | |
$host = parse_url($url); | |
$tld = $host['host']; | |
switch ($tld){ | |
case ($tld == "peeje.com" || "www.peeje.com" || "peejeshare.com" || "www.peejeshare.com"): | |
$plugin = 'peeje'; | |
break; | |
case ($tld == "glumbouploads.com" || $tld == "www.glumbouploads.com"): | |
$plugin = 'glumbo'; | |
break; | |
default: | |
avisar_admin('Plugin incompatível! Debug:' . var_dump($host)); | |
break; | |
} | |
if(!empty($plugin)) call_user_func_array("link_$plugin", $url); | |
} | |
return $links; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment