Пример #1
0
 /**
  * This method has been redefined for compatibility with the old options naming. It would
  * be better to change them instead. The subscription options should be named
  * "newsletter_subscription" while the form field options, actually named
  * "newsletter_profile", should be renamed "newsletter_subscription_profile" (since
  * they are retrived with get_options('profile')) or "newsletter_subscription_fields" or
  * "newsletter_subscription_form".
  *
  * @param array $options
  * @param string $sub
  */
 function save_options($options, $sub = '')
 {
     if ($sub == '') {
         // For compatibility the options are wrongly named
         return update_option('newsletter', $options);
     }
     if ($sub == 'profile') {
         return update_option('newsletter_profile', $options);
     }
     return parent::save_options($sub);
 }