Display a set of check boxes. Multiple boxes can be checked.

Option Details & Parameters

Type: multicheck

Returns: array

Can be placed in: Admin Panels , Admin Tabs , Meta Boxes , Theme Customizer

Parameter Type Description
name string The name of the option, for display purposes only.
id string A unique ID for this option. This ID will be used to get the value for this option.
desc string The description to display together with this option.
default array (Optional) An array containing the values of the checked options.
options array (Optional) An associative array containing value – label pair options which will be displayed as a list of checkboxes.
select_all string/boolean (Optional) Allows the ability to select or deselect all checkboxes from a single checkbox. To define custom caption for selectall checkbox specify a string instead of boolean value true. To disable the selectall checkbox specify the boolean value of false.


$titan = TitanFramework::getInstance( 'my-theme' );
$value = $titan->getOption( 'my_multicheck_option' );
var_dump( $value );

// returns
array(2) {
  string(1) "2"
  string(1) "3"


Creating an option:

$panel->createOption( array(
    'name' => 'My Multicheck Option',
    'id' => 'my_multicheck_option',
    'type' => 'multicheck',
    'desc' => 'Check whichever applies',
    'options' => array(
        '1' => 'Option one',
        '2' => 'Option two',
        '3' => 'Option three',
    'default' => array( '2', '3' ),
) );