Plugin Directory

Changeset 512431


Ignore:
Timestamp:
02/29/2012 04:57:22 PM (14 years ago)
Author:
russoedu
Message:

Redirection corrected

Location:
universo-widget-and-mobile-redirect/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • universo-widget-and-mobile-redirect/trunk/readme.txt

    r512328 r512431  
    44Requires at least: 2.5
    55Tested up to: 3.3.1
    6 Stable tag: 1.0
     6Stable tag: 1.0.1
    77
    88Displays Universo's (http://universo.mobi) App link in the sidebar and add a Mobile Recognition tool to redirect your reader using mobile devices to your Universo App URL.
     
    6161= 1.0 =
    6262* First working version
     63
     64= 1.0.1 =
     65* Mobile redirection correction
  • universo-widget-and-mobile-redirect/trunk/universo-widget-and-mobile-redirect.php

    r512341 r512431  
    33Plugin Name: Universo Mobile App Plugin
    44Description: Displays Universo's (http://universo.mobi) App link in the sidebar and add a Mobile Recognition tool to redirect your reader using mobile devices to your Universo App URL.
    5 Version: 1.0
     5Version: 1.0.1
    66Author: Eduardo Russo
    77Author URI: http://universo.mobi/
     
    3737
    3838function universo_redirect() {
    39     //Debug
    4039    include("Mobile_Detect.php");
    4140    $detect = new Mobile_Detect();
     41    global $universo_options;
    4242    $options = get_option('widget_universo');
    4343
    44     if ($options['mobile_redirect'] && $detect->isMobile())
    45         wp_redirect($options['target_url']);
     44    if ($options['mobile_redirect'] && $detect->isMobile()){
     45        wp_redirect($options['app_url']);
     46    }
    4647}
    4748
Note: See TracChangeset for help on using the changeset viewer.