Adaptive-Images icon indicating copy to clipboard operation
Adaptive-Images copied to clipboard

Updates $is_mobile()

Open Billy- opened this issue 11 years ago • 2 comments

I have changed the is_mobile() function so that it returns a boolean.

function is_mobile() {
  $userAgent = strtolower($_SERVER['HTTP_USER_AGENT']);
  return !!strpos($userAgent, 'mobile');
}

This renders this if/else block unnecessary:

if(!is_mobile()){
  $is_mobile = "FALSE";
} else {
  $is_mobile = "TRUE";
}

I have removed all occurrences of this and replaced it with $is_mobile = is_mobile();.

Billy- avatar Jul 02 '14 10:07 Billy-

is this repo dead? @MattWilcox

Billy- avatar Oct 27 '14 02:10 Billy-

It's pretty inactive but there are signs of life every once in awhile.

Maybe it's time to fork it, or check out some of the other forks.

Or maybe Matt will add some maintainers to help out?

On Mon, Oct 27, 2014 at 9:09 AM, Billy Mathews [email protected] wrote:

is this repo dead? @MattWilcox

Reply to this email directly or view it on GitHub: https://github.com/MattWilcox/Adaptive-Images/pull/156#issuecomment-60543152

joeguilmette avatar Oct 27 '14 02:10 joeguilmette