Using call_user_func() within add_settings_section() within a Class

Hi @Loni Huff:

Your Code, Reformatted:

It appear you are trying to call your callback with call_user_func() instead of just passing it. Reformatting your code, this is what you have:

add_settings_section(
  'expansion_' . $row->expansion_id, 
  '', 
  call_user_func(array(&$this, 'display_expansion'), $row->expansion),
  'warpress_progression'
); // PROBLEM SEEMS TO BE HERE

Equivalent to Your Code:

Which is basically the same thing as this:

add_settings_section(
  'expansion_' . $row->expansion_id, 
  '', 
  $this->display_expansion($row->expansion),
  'warpress_progression'
); 

Clearly not what add_settings_section() is expecting.

What I think you Want:

What I think you want (without having tested it) is simply this (and I edited the first parameter to use a coding style I prefer):

add_settings_section(
  "expansion_{$row->expansion_id}", 
  '', 
  array(&$this, 'display_expansion'),
  'warpress_progression'
); 

Let me know if that works for you.