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' => 'text', | |
'field' => 'my_text', | |
'label' => 'Text', | |
'attributes' => array( | |
'class' => 'regular-text' // WordPress css class | |
) |
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' => 'radio', | |
'field' => 'my_radio', | |
'label' => 'Radio', | |
'choices' => array( | |
'first' => 'First Choice', | |
,'second' => 'Second Choice', |
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' => 'editor', | |
'field' => 'my_editor_field', | |
'label' => 'Post Content' | |
)); | |
?> |
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' => 'editor', | |
'field' => 'post_content', // This is the field name of the WordPress default editor | |
'scope' => 'post', // Save to the wp_post table | |
'label' => 'Post Content', | |
'template' => 'field', // Only display the field not the label | |
'options' => array( // Pass any option that is accepted by wp_editor() |
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' => 'datepicker', | |
'field' => 'my_date_field', | |
'label' => 'Date', | |
'options' => array( | |
'closeText'=>'Fermer', | |
'prevText'=>'Précédent', |
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' => 'datepicker', | |
'field' => 'my_date_field', | |
'label' => 'Date', | |
'value' => date('M d, Y', time() + 604800), // set default value | |
'options' => array( | |
'dateFormat' => 'M d, yy' |
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' => 'colorpicker', | |
'field' => 'my_color', | |
'label' => 'Color Picker' | |
)); | |
?> |
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' => 'checkbox', | |
'field' => 'checkbox', | |
'label' => 'Checkbox', | |
'value' => 'third', // set default value | |
'choices' => array( | |
'first' => 'First Choice', |
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', |