Plugin Directory

Changeset 1043035


Ignore:
Timestamp:
12/11/2014 10:19:18 PM (11 years ago)
Author:
AddFunc
Message:

Uploading 1.2, which includes fix for fatal bug

Location:
addfunc-mobile-detect/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • addfunc-mobile-detect/trunk/addfunc-mobile-detect.php

    r1042388 r1043035  
    44    Plugin URI:
    55    Description: Redirects mobile traffic to your mobile website on a page-by-page basis (posts and custom post types included). This can be overridden on any page individually with a convenient meta box adjacent to the WYSIWYG. Sets a cookie to remember which version of your website (desktop or mobile, usually) your visitors opted for. Includes a widget for inserting a link back to your mobile site, which is only generated for mobile devices. Includes two shortcodes for generating links to your mobile site--one is generated only for mobile devices and the other is generated regardless. No CSS rules are used. CSS classes are provided, yielding coders full reign to style the generated links to fit the website theme. Adds a class to the body ("mobile-detected") to help coders write styles specifically for mobile devices. Leaves 404 errors untouched, allowing you to maintain 404 statuses. Basically, it gives you loads of control of your mobile redirects.
    6     Version: 1.1
     6    Version: 1.2
    77    Author: AddFunc
    88    Author URI: http://profiles.wordpress.org/addfunc
     
    114114
    115115# Remove default value before saving to the database
    116 function xdefaultvalue($input)
    117 {
    118   if(isset($input))
    119   {
    120     if ($input=='http://')
    121     {
    122       $input = NULL;
    123       return $input;
    124     }
    125     else
    126     {
    127       return $input;
     116if(!function_exists('aFxmobdefault')){
     117  function aFxmobdefault($input)
     118  {
     119    if(isset($input))
     120    {
     121      if ($input=='http://')
     122      {
     123        $input = NULL;
     124        return $input;
     125      }
     126      else
     127      {
     128        return $input;
     129      }
    128130    }
    129131  }
     
    141143    {
    142144      register_setting(aFmobdtct_ID.'_options', 'aFmobdtct_redirect');
    143       register_setting(aFmobdtct_ID.'_options', 'the_mobile_site_uri','xdefaultvalue');
     145      register_setting(aFmobdtct_ID.'_options', 'the_mobile_site_uri','aFxmobdefault');
    144146      register_setting(aFmobdtct_ID.'_options', 'non_mobile_site_uri');
    145147    }
  • addfunc-mobile-detect/trunk/options.php

    r1042388 r1043035  
    66    <div id="post-body" class="metabox-holder columns-2">
    77      <div id="post-body-content">
    8   <form action="options.php" method="post" id="<?php echo $addfmobdtctID; ?>_options_form" name="<?php echo $addfmobdtctID; ?>_options_form">
    9 <?php settings_fields($addfmobdtctID.'_options'); ?>
    10         <label for="addfmobdtct_redirect" ><strong>Mobile Redirect<span class="hideswitch"> Active</span>:</strong></label>
     8  <form action="options.php" method="post" id="<?php echo $aFmobdtctID; ?>_options_form" name="<?php echo $aFmobdtctID; ?>_options_form">
     9<?php settings_fields($aFmobdtctID.'_options'); ?>
     10        <label for="aFmobdtct_redirect" ><strong>Mobile Redirect<span class="hideswitch"> Active</span>:</strong></label>
    1111        <div style="display: inline;" class="offonswitch">
    12           <input type="checkbox" name="addfmobdtct_redirect" class="offonswitch-checkbox" id="addfmobdtct_redirect" value="1" <?php checked( '1', get_option('addfmobdtct_redirect') ); ?> />
    13           <label class="offonswitch-label" for="addfmobdtct_redirect">
     12          <input type="checkbox" name="aFmobdtct_redirect" class="offonswitch-checkbox" id="aFmobdtct_redirect" value="1" <?php checked( '1', get_option('aFmobdtct_redirect') ); ?> />
     13          <label class="offonswitch-label" for="aFmobdtct_redirect">
    1414            <div class="offonswitch-inner"></div>
    1515            <div class="offonswitch-switch"></div>
  • addfunc-mobile-detect/trunk/readme.txt

    r1042390 r1043035  
    77Requires at least: 3.0.1
    88Tested up to: 4.0
    9 Stable tag: 1.1
     9Stable tag: 1.2
    1010License: GPLv2 or later
    1111License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    9090== Changelog ==
    9191
     92= 1.2 =
     9311-Dec-2014
     94
     95*   Fixes fatal bug, where settings page wouldn't save anything (caused when changing the namespaces to match the name AddFunc and mismatching some of them in options.php)
     96
    9297= 1.1 =
    939804-Dec-2014
    9499
    95 *   Fixed meta box nounce
     100*   Fixes meta box nounce
    96101
    97102= 1.0 =
     
    100105*   Adds shortcode [mobilesite]. Produces the exact same results as [mobilesitebutton]
    101106*   Change CSS class of widget output to "mobile-site-opt" instead of "mobile-site-link" (to avoid confusion between the widget and the shortcode when styling)
    102 *   Prepared for release as AddFunc Mobile Detect 1.0
     107*   Prepared for release as AddFunc Mobile Detect 1.1
    103108
    10410927-Aug-2014
Note: See TracChangeset for help on using the changeset viewer.