WordPress.org

Plugin Directory

Changeset 618821


Ignore:
Timestamp:
10/29/12 21:12:54 (18 months ago)
Author:
MattyRob
Message:

Fix saving following unchecking in Appearance tab

File:
1 edited

Legend:

Unmodified
Added
Removed
  • subscribe2/trunk/admin/settings.php

    r615344 r618821  
    4141                ( isset($_POST[$key]) && $_POST[$key] == '1' ) ? $newvalue = '1' : $newvalue = '0'; 
    4242                $this->subscribe2_options[$key] = $newvalue; 
     43            } elseif ( $key === 'appearance_users_tab' ) { 
     44                $options = array('show_meta', 'show_button', 'ajax', 'widget', 'counterwidget', 's2meta_default'); 
     45                foreach ( $options as $option ) { 
     46                    if ( !isset($_POST[$option]) ) { 
     47                        $this->subscribe2_options[$option] = ''; 
     48                    } 
     49                } 
    4350            } elseif ( in_array($key, array('notification_subject', 'mailtext', 'confirm_subject', 'confirm_email', 'remind_subject', 'remind_email')) && !empty($_POST[$key]) ) { 
    4451                            // email subject and body templates 
     
    278285    case 'registered': 
    279286        // compulsory categories 
     287        echo "<div class=\"s2_admin\" id=\"s2_compulsory_categories\">\r\n"; 
    280288        echo "<input type=\"hidden\" name=\"registered_users_tab\" value=\"options\" />\r\n"; 
    281         echo "<div class=\"s2_admin\" id=\"s2_compulsory_categories\">\r\n"; 
    282289        echo "<h3>" . __('Compulsory Categories', 'subscribe2') . "</h3>\r\n"; 
    283290        echo "<p>\r\n"; 
     
    376383        // Appearance options 
    377384        echo "<div class=\"s2_admin\" id=\"s2_appearance_settings\">\r\n"; 
     385        echo "<input type=\"hidden\" name=\"appearance_users_tab\" value=\"options\" />\r\n"; 
    378386        echo "<p>\r\n"; 
    379387 
Note: See TracChangeset for help on using the changeset viewer.