Changeset 7111

Show
Ignore:
Timestamp:
12/19/06 23:26:22 (2 years ago)
Author:
alexkingorg
Message:

added note to read readme

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wordpress-mobile-edition/trunk/wp-mobile.php

    r6890 r7111  
    1919Plugin Name: WordPress Mobile Edition 
    2020Plugin URI: http://alexking.org/projects/wordpress 
    21 Description: Show a mobile view of the post/page if the visitor is on a known mobile device. 
     21Description: Show a mobile view of the post/page if the visitor is on a known mobile device. Questions on configuration, etc.? Make sure to read the README. 
    2222Author: Alex King 
    2323Author URI: http://alexking.org 
     
    2929function akm_check_mobile() { 
    3030      if (!isset($_SERVER["HTTP_USER_AGENT"]) || (isset($_COOKIE['akm_mobile']) && $_COOKIE['akm_mobile'] == 'false')) { 
     31            return false; 
     32      } 
     33      if (akm_mobile_exclude()) { 
    3134            return false; 
    3235      } 
     
    8285} 
    8386 
    84 function akm_mobile_redirect() { 
    85       $redirect = true; 
     87function akm_mobile_exclude() { 
     88      $exclude = false; 
    8689      $pages_to_exclude = array( 
    8790            'wp-admin' 
    88             ,'wp-mobile.php' 
    8991            ,'wp-comments-post.php' 
    9092            ,'wp-mail.php' 
     
    9395      foreach ($pages_to_exclude as $exclude) { 
    9496            if (strstr(strtolower($_SERVER['REQUEST_URI']), $exclude)) { 
    95                   $redirect = false; 
    96             } 
    97       } 
    98       return $redirect
     97                  $exclude = true; 
     98            } 
     99      } 
     100      return $exclude
    99101} 
    100102 
     
    194196} 
    195197 
    196 if (akm_mobile_redirect() && akm_check_mobile()) { 
     198if (akm_check_mobile()) { 
    197199      add_action('template', 'akm_template'); 
    198200      add_action('option_template', 'akm_template');