iPhoneまたはiPadが検出されたときにワードプレスのテーマをアクティブ化/切り替えたい..すでに動作しているモバイルテーマを持っていますがTablet (galaxy nexus)、Apple iPod失敗するのでiPhone、iPadテーマを切り替える必要があります.
私はこのコードを使用しています。しかし、iPhone/iPadを検出した後、何を書くべきかわかりません
add_filter('browser_detect_function','browser_detect');
function browser_detect(){
//setting the variables
$ipod = stripos($_SERVER['HTTP_USER_AGENT'],"iPod");
$iphone = stripos($_SERVER['HTTP_USER_AGENT'],"iPhone");
//detecting device
if ($ipod == true || $iphone == true){
//does'nt know what to write here. means which funciton
}
}