WordPress.org

Make WordPress Core

Changeset 10010


Ignore:
Timestamp:
12/02/2008 12:32:54 PM (12 years ago)
Author:
azaozz
Message:

Simple iPhone detection, disable hiding of action links for iPhone

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-header.php

    r9958 r10010  
    7272do_action('admin_head');
    7373
    74 ?>
     74if ( $is_iphone ) { ?>
     75<style type="text/css">.row-actions{visibility:visible;}</style>
     76<?php } ?>
    7577</head>
    7678<body class="wp-admin <?php echo apply_filters( 'admin_body_class', '' ); ?>">
     79
    7780<div id="wpwrap">
    7881<div id="wpcontent">
  • trunk/wp-includes/vars.php

    r8826 r10010  
    3535
    3636// Simple browser detection
    37 $is_lynx = $is_gecko = $is_winIE = $is_macIE = $is_opera = $is_NS4 = $is_safari = $is_chrome = false;
     37$is_lynx = $is_gecko = $is_winIE = $is_macIE = $is_opera = $is_NS4 = $is_safari = $is_chrome = $is_iphone = false;
    3838
    3939if (strpos($_SERVER['HTTP_USER_AGENT'], 'Lynx') !== false) {
     
    4141} elseif ( strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'chrome') !== false ) {
    4242    $is_chrome = true;
    43 } elseif ( strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'webkit') !== false ) {
     43} elseif ( strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'safari') !== false ) {
    4444    $is_safari = true;
    4545} elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'Gecko') !== false) {
     
    5454    $is_NS4 = true;
    5555}
     56
     57if ( $is_safari && strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'mobile') !== false )
     58    $is_iphone = true;
    5659
    5760$is_IE = ( $is_macIE || $is_winIE );
Note: See TracChangeset for help on using the changeset viewer.