Custom select options values callback
-
I want to create custom select options which is usually done by a callback function, but I can’t seem to find any documentation on how it’s done in your plugin.
For example, I want to build a select list of posts that were published in 2017 by user XXX.
I know how to query what I want, but how do I dynamically add the query as the options value:
These options are static:
‘type’ => ‘select’,
‘options’ => array(
‘java’ => ‘Java’,
‘javascript’ => ‘JavaScript’,
),… but I need to create them dynamically … for example
‘type’ => ‘select’,
‘options’ => ‘name_of_callback_function,
),… or …
‘type’ => ‘select’,
‘callback’ => ‘name_of_callback_function,
),
The topic ‘Custom select options values callback’ is closed to new replies.