Last active
December 12, 2016 18:34
-
-
Save sbruner/989db1c466923d7ba8ce to your computer and use it in GitHub Desktop.
Piklist: field: select
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
piklist('field', array( | |
'type' => 'select', | |
'field' => 'my_select', | |
'label' => 'My select', | |
'choices' => array( | |
'first' => 'First Choice', | |
'second' => 'Second Choice', | |
'third' => 'Third Choice' | |
) | |
)); | |
piklist('field', array( | |
'type' => 'select' | |
,'field' => 'select_optgroup' | |
,'label' => __('Select with Option Groups', 'piklist-demo') | |
,'value' => 'third' | |
,'choices' => array( | |
'Group 1' => array( | |
'first' => __('First Choice', 'piklist-demo') | |
,'second' => __('Second Choice', 'piklist-demo') | |
,'third' => __('Third Choice', 'piklist-demo') | |
) | |
,'Group 2' => array( | |
'first' => __('First Choice', 'piklist-demo') | |
,'second' => __('Second Choice', 'piklist-demo') | |
,'third' => __('Third Choice', 'piklist-demo') | |
) | |
) | |
)); | |
?> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment