Advertisement
ikamal7

field types

Jan 15th, 2021
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.13 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. array(
  5. 'id' => 'phase_2',
  6. 'label' => __( 'Phase 2', 'dom767'),
  7. 'type' => 'text',
  8. 'default' => '',
  9. 'placeholder' => __('Placeholder')
  10. ),
  11. array(
  12. 'id' => 'text_block',
  13. 'label' => __( 'A Text Block' , 'plugin_textdomain' ),
  14. 'description' => __( 'This is a standard text area.', 'plugin_textdomain' ),
  15. 'type' => 'textarea',
  16. 'default' => '',
  17. 'placeholder' => __( 'Placeholder text for this textarea', 'plugin_textdomain' )
  18. ),
  19. array(
  20. 'id' => 'single_checkbox',
  21. 'label' => __( 'An Option', 'plugin_textdomain' ),
  22. 'description' => __( 'A standard checkbox – if you save this option as checked then it will store the option as \'on\', otherwise it will be an empty string.', 'plugin_textdomain' ),
  23. 'type' => 'checkbox',
  24. 'default' => ''
  25. ),
  26. array(
  27. 'id' => 'select_box',
  28. 'label' => __( 'A Select Box', 'plugin_textdomain' ),
  29. 'description' => __( 'A standard select box.', 'plugin_textdomain' ),
  30. 'type' => 'select',
  31. 'options' => array( 'drupal' => 'Drupal', 'joomla' => 'Joomla', 'wordpress' => 'WordPress' ),
  32. 'default' => 'wordpress'
  33. ),
  34. array(
  35. 'id' => 'radio_buttons',
  36. 'label' => __( 'Some Options', 'plugin_textdomain' ),
  37. 'description' => __( 'A standard set of radio buttons.', 'plugin_textdomain' ),
  38. 'type' => 'radio',
  39. 'options' => array( 'superman' => 'Superman', 'batman' => 'Batman', 'ironman' => 'Iron Man' ),
  40. 'default' => 'batman'
  41. ),
  42. array(
  43. 'id' => 'multiple_checkboxes',
  44. 'label' => __( 'Some Items', 'plugin_textdomain' ),
  45. 'description' => __( 'You can select multiple items and they will be stored as an array.', 'plugin_textdomain' ),
  46. 'type' => 'checkbox_multi',
  47. 'options' => array( 'square' => 'Square', 'circle' => 'Circle', 'rectangle' => 'Rectangle', 'triangle' => 'Triangle' ),
  48. 'default' => array( 'circle', 'triangle' )
  49. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement