wordpress most usesfull action and hooks

Solutions on MaxInterview for wordpress most usesfull action and hooks by the best coders in the world

showing results for - "wordpress most usesfull action and hooks"
Deon
05 Jun 2016
1<?php
2add_filter('body_class','browser_body_class');
3function browser_body_class($classes) {
4  global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone;
5
6  if($is_lynx) $classes[] = 'lynx';
7  elseif($is_gecko) $classes[] = 'gecko';
8  elseif($is_opera) $classes[] = 'opera';
9  elseif($is_NS4) $classes[] = 'ns4';
10  elseif($is_safari) $classes[] = 'safari';
11  elseif($is_chrome) $classes[] = 'chrome';
12  elseif($is_IE) $classes[] = 'ie';
13  else $classes[] = 'unknown';
14
15  if($is_iphone) $classes[] = 'iphone';
16  return $classes;
17}
18?>