Opened 17 years ago
Closed 17 years ago
#11143 closed defect (bug) (fixed)
do_settings_fields() is not calling on additional arguments from add_settings_field()
| Reported by: | hanilovesme | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.9 |
| Component: | Administration | Version: | 2.8.5 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
According to the codex, the function add_settings_field() accepts a callback function, and additional arguments, as two of its parameters. It then passes this date to do_settings_field().
However, do_settings_field() calls the callback function, but ignores the additional arguments:
call_user_func($field[ 'callback' ]); <--- wouldn't $field[ 'args' ] be called as the second argument here?
Attachments (2)
Change History (7)
#1
@
17 years ago
- Summary additional arguments from add_settings_field do not get called on do_settings_fields → do_settings_fields() is not calling on additional arguments from add_settings_field()
#2
@
17 years ago
- Component General → Administration
- Keywords has-patch added
- Milestone Unassigned → 2.9
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
call_user_func_array() will result in all of the array keys being lost. We should probably use call_user_func() and pass the whole args array in tact as one argument.