• Resolved tylerborchert

    (@tylerborchert)


    Really like this plugin, works great but the documentation is basically non existent. I know how to add basic text attributes:

    attrs => array( array( 'label' => 'Label', 'attr' => 'text', 'type' => 'text' ) )

    Simple. But how do I register a ‘select’ type and give it values in the dropdown? I know its probably pretty straightforward but I can’t find any examples anywhere.

    Much appreciated.

    Thanks

    https://wordpress.org/plugins/shortcode-ui/

Viewing 1 replies (of 1 total)
  • Thread Starter tylerborchert

    (@tylerborchert)

    nevermind, found out how to do this, for anyone else struggling:

    attrs = array(
          array(
              'label' => 'Label',
              'type'  => 'select',
              'options' => array( 'left' => 'Left', 'right' => 'Right' )
          )
    )

    the keyword is ‘options’

Viewing 1 replies (of 1 total)
  • The topic ‘How to register select or radio attributes in the UI’ is closed to new replies.