Viewing 1 replies (of 1 total)
  • Hi enderoe

    Use wpt_field_options:

    function my_wpt_field_options( $options, $title, $type )
    {
        switch( $title )
        {
        case 'a name of select field':
            $options[] = array(
                '#value' => 'xxx',
                '#title' => 'dynamic add some option',
            );
            break;
        case 'a name of radio option':
            $options[] = array (
                '#value' => 'xxx',
                '#title' => 'dynamic added radio',
                '#validate' => array (),
                '#after' => '',
    
            );
            break;
        }
        return $options;
    }
    add_filter('wpt_field_options', 'my_wpt_field_options', 10, 3);

    cheers,

    Marcin

Viewing 1 replies (of 1 total)
  • The topic ‘Hook for custom dropdown options’ is closed to new replies.