WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Mobile Client Detection Plugin] Fix for Add query_vars form not saving correctly

[Resolved] [Plugin: Mobile Client Detection Plugin] Fix for Add query_vars form not saving correctly

  • We discovered that the “Add query_vars” form field was saving/displaying the opposite of what it should. Here’s a fix:

    Before (starting at line 327 in mobile_client_detection.php)

    <h3>Add query_vars 'platform' & 'browser':</h3>
    <select id="add_vars" name="add_vars">
        <option value="0"<?php echo(($mcd_options[3]==1)?' selected="selected"':'');?>>Yes</option>
        <option value="1"<?php echo(($mcd_options[3]==0)?' selected="selected"':'');?>>No</option>
    </select>

    Fix (starting at line 327 in mobile_client_detection.php)

    <h3>Add query_vars 'platform' & 'browser':</h3>
    <select id="add_vars" name="add_vars">
    	<option value="0"<?php echo(($mcd_options[3]==0)?' selected="selected"':'');?>>No</option>
    	<option value="1"<?php echo(($mcd_options[3]==1)?' selected="selected"':'');?>>Yes</option>
    </select>

    http://wordpress.org/extend/plugins/mobile-client-detection-plugin/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] [Plugin: Mobile Client Detection Plugin] Fix for Add query_vars form not saving correctly’ is closed to new replies.