예제 #1
0
 /**
  * Save custom field settings to the options table
  *
  * @since 1.10
  * @uses $_REQUEST if passed a NULL parameter
  *
  * @param	array | NULL	specific custom_field_mapping values 
  *
  * @return	array	Message(s) reflecting the results of the operation
  */
 private static function _save_custom_field_settings($new_values = NULL)
 {
     $message_list = '';
     $option_messages = '';
     if (NULL == $new_values) {
         /*
          * Start with any page-level options
          */
         foreach (MLAOptions::$mla_option_definitions as $key => $value) {
             if ('custom_field' == $value['tab']) {
                 $option_messages .= self::mla_update_option_row($key, $value);
             }
         }
         /*
          * Add mapping options
          */
         $new_values = isset($_REQUEST['custom_field_mapping']) ? $_REQUEST['custom_field_mapping'] : array();
     }
     // NULL
     /*
      * Uncomment this for debugging.
      */
     // $message_list = $option_messages . '<br>';
     return array('message' => $message_list . MLAOptions::mla_custom_field_option_handler('update', 'custom_field_mapping', MLAOptions::$mla_option_definitions['custom_field_mapping'], $new_values), 'body' => '');
 }