Skip to content

Commit

Permalink
update readme and remove sanitization_cb
Browse files Browse the repository at this point in the history
  • Loading branch information
jtsternberg committed Feb 4, 2015
1 parent a834070 commit d846d67
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,35 +36,33 @@ require_once 'cmb-field-select2/cmb-field-select2.php';
`pw_select` - Select box with with typeahead-style search. Example:
```php
array(
'name' => 'Cooking time',
'id' => $prefix . 'cooking_time',
'desc' => 'Cooking time',
'name' => 'Cooking time',
'id' => $prefix . 'cooking_time',
'desc' => 'Cooking time',
'type' => 'pw_select',
'options' => array(
'5' => '5 minutes',
'5' => '5 minutes',
'10' => '10 minutes',
'30' => 'Half an hour',
'60' => '1 hour',
),
'type' => 'pw_select',
'sanitization_cb' => 'pw_select2_sanitise',
),
```

`pw_multiselect` - Multi-value select box with drag and drop reordering. Example:
```php
array(
'name' => 'Ingredients',
'id' => $prefix . 'ingredients',
'desc' => 'Select ingredients. Drag to reorder.',
'name' => 'Ingredients',
'id' => $prefix . 'ingredients',
'desc' => 'Select ingredients. Drag to reorder.',
'type' => 'pw_multiselect',
'options' => array(
'flour' => 'Flour',
'salt' => 'Salt',
'eggs' => 'Eggs',
'milk' => 'Milk',
'flour' => 'Flour',
'salt' => 'Salt',
'eggs' => 'Eggs',
'milk' => 'Milk',
'butter' => 'Butter',
),
'type' => 'pw_multiselect',
'sanitization_cb' => 'pw_select2_sanitise',
),
```

Expand Down

0 comments on commit d846d67

Please sign in to comment.