-
Notifications
You must be signed in to change notification settings - Fork 0
Type – Image Picker
Henner R Setyono edited this page Mar 5, 2020
·
3 revisions
'header_button_type' => [
'label' => false,
'type' => 'ct-image-picker',
'attr' => [
'data-type' => 'background',
'data-columns' => 2,
],
'choices' => [
'type-1' => [
'src' => '<svg viewBox="0 0 100 70">...</svg>',
'title' => __( 'Default' ),
],
'type-2' => [
'src' => '<svg viewBox="0 0 100 70">...</svg>',
'title' => __( 'Outline' ),
],
],
],src
- Accepts raw SVG code or a JPG/PNG Image URL.
'data-type' => 'background'
- Make the active selection has blue background. Any SVG inside will become white.
- Without this param, the active selection only has black border.
'data-columns' => '2'
- Make the picker 2 items per row
'header_button_type' => 'type-1'
Where to apply the code above?
- The option snippet is for New Section Filter
- The value format is for Default Value Filter
Learn more:
