Ticket #2868: options.php.diff

File options.php.diff, 1.1 kB (added by filosofo, 2 years ago)
  • wp-admin/options.php

    old new  
    3333 
    3434        if (!$_POST['page_options']) { 
    3535                foreach ($_POST as $key => $value) { 
    36                         $options[] = $key; 
     36                        if ($_POST['checkbox_' . $key]) $options[] = $key; 
    3737                } 
    3838        } else { 
    3939                $options = explode(',', stripslashes($_POST['page_options'])); 
     
    100100        echo " 
    101101<tr> 
    102102        <th scope='row'><label for='$option->option_name'>$option->option_name</label></th> 
     103        <td><input type='checkbox' name='checkbox_$option->option_name' id='checkbox_$option->option_name' value='true' /></td> 
    103104        <td><input type='text' name='$option->option_name' id='$option->option_name' size='30' value='" . $value . "' /></td> 
    104105        <td>$option->option_description</td> 
    105106</tr>"; 
    106107endforeach; 
    107108?> 
    108109  </table> 
    109 <p class="submit"><input type="submit" name="Update" value="<?php _e('Update Settings &raquo;') ?>" /></p> 
     110<p class="submit"><input type="submit" name="Update" value="<?php _e('Update Checked Settings &raquo;') ?>" /></p> 
    110111  </form> 
    111112</div> 
    112113