This repository has been archived by the owner on May 15, 2021. It is now read-only.
forked from gambitph/Titan-Framework
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Checkbox
Patrick Kollitsch edited this page Aug 23, 2020
·
1 revision
Type | Version | Admin Panels | Admin Tabs | Meta Boxes | Theme Customizer |
---|---|---|---|---|---|
checkbox | 1.8 | ✔️ | ✔️ | ✔️ | ✔️ |
Display a checkbox field.
Returns: boolean (If the checkbox is checked it will return true otherwise false.)
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 | (Optional) The description to display together with this option. |
default | boolean | The default value for this option. |
livepreview | string | (Optional) jQuery code that updates something in your site in the live preview. Only used when the option is placed in a theme customizer section. Refer to Livepreview for more information on this parameter. |
css | string | (Optional) CSS rules to be used with this option. Only used when the option is placed in an admin page / panel or a theme customizer section. Refer to Generate CSS Automatically for your options for more information on this parameter. |
Creating a checkbox option:
$panel->createOption( array(
'name' => 'My Checkbox Option',
'id' => 'my_checkbox_option',
'type' => 'checkbox',
'desc' => 'This is our option',
'default' => false,
) );
Ajax Button Checkbox Code Color Custom Date EDD License Editor Enable File Upload Font Gallery Heading Iframe Multicheck Multicheck Categories Multicheck Pages Multicheck Post-Types Multicheck Posts Note Number Radio Radio Image Radio Palette Save Select Select Categories Select Pages Select Post-Types Select Posts Select Users Sortable Text Textarea Upload