Checkboxes

In this documentation area of the new WPStudio Framework codebase, you will find detailed examples and resources for creating admin pages along with metaboxes inside WordPress.

To create a checkbox field you add the following code:

$wpstudio->add_field(array(
  'id' => 'create-a-checkbox',
  'name' => __( 'Checkbox', 'wpstudio'),
  'type' => 'checkbox',
  'default' => array('choice3'),
  'items' => array(
    'choice1' => 'Choice 1',
    'choice2' => 'Choice 2',
    'choice3' => 'Choice 3',
  )
));

The look on your settings field should appear like:

 

Advanced Options