Changeset 1043035
- Timestamp:
- 12/11/2014 10:19:18 PM (11 years ago)
- Location:
- addfunc-mobile-detect/trunk
- Files:
-
- 3 edited
-
addfunc-mobile-detect.php (modified) (3 diffs)
-
options.php (modified) (1 diff)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
addfunc-mobile-detect/trunk/addfunc-mobile-detect.php
r1042388 r1043035 4 4 Plugin URI: 5 5 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. 16 Version: 1.2 7 7 Author: AddFunc 8 8 Author URI: http://profiles.wordpress.org/addfunc … … 114 114 115 115 # 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; 116 if(!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 } 128 130 } 129 131 } … … 141 143 { 142 144 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'); 144 146 register_setting(aFmobdtct_ID.'_options', 'non_mobile_site_uri'); 145 147 } -
addfunc-mobile-detect/trunk/options.php
r1042388 r1043035 6 6 <div id="post-body" class="metabox-holder columns-2"> 7 7 <div id="post-body-content"> 8 <form action="options.php" method="post" id="<?php echo $a ddfmobdtctID; ?>_options_form" name="<?php echo $addfmobdtctID; ?>_options_form">9 <?php settings_fields($a ddfmobdtctID.'_options'); ?>10 <label for="a ddfmobdtct_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> 11 11 <div style="display: inline;" class="offonswitch"> 12 <input type="checkbox" name="a ddfmobdtct_redirect" class="offonswitch-checkbox" id="addfmobdtct_redirect" value="1" <?php checked( '1', get_option('addfmobdtct_redirect') ); ?> />13 <label class="offonswitch-label" for="a ddfmobdtct_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"> 14 14 <div class="offonswitch-inner"></div> 15 15 <div class="offonswitch-switch"></div> -
addfunc-mobile-detect/trunk/readme.txt
r1042390 r1043035 7 7 Requires at least: 3.0.1 8 8 Tested up to: 4.0 9 Stable tag: 1. 19 Stable tag: 1.2 10 10 License: GPLv2 or later 11 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 90 90 == Changelog == 91 91 92 = 1.2 = 93 11-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 92 97 = 1.1 = 93 98 04-Dec-2014 94 99 95 * Fixe dmeta box nounce100 * Fixes meta box nounce 96 101 97 102 = 1.0 = … … 100 105 * Adds shortcode [mobilesite]. Produces the exact same results as [mobilesitebutton] 101 106 * 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. 0107 * Prepared for release as AddFunc Mobile Detect 1.1 103 108 104 109 27-Aug-2014
Note: See TracChangeset
for help on using the changeset viewer.