53 lines
1.7 KiB
PHP
53 lines
1.7 KiB
PHP
<?php
|
|
/**
|
|
* Redux Framework select image config.
|
|
* For full documentation, please visit: http://devs.redux.io/
|
|
*
|
|
* @package Redux Framework
|
|
*/
|
|
|
|
defined( 'ABSPATH' ) || exit;
|
|
|
|
Redux::set_section(
|
|
$opt_name,
|
|
array(
|
|
'title' => esc_html__( 'Select Image', 'your-textdomain-here' ),
|
|
'id' => 'select-select_image',
|
|
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/select-image.html" target="_blank">https://devs.redux.io/core-fields/select-image.html</a>',
|
|
'subsection' => true,
|
|
'fields' => array(
|
|
array(
|
|
'id' => 'opt-select_image',
|
|
'type' => 'select_image',
|
|
'presets' => true,
|
|
'title' => esc_html__( 'Select Image', 'your-textdomain-here' ),
|
|
'options' => array(
|
|
array(
|
|
'alt' => 'Preset 1',
|
|
'img' => Redux_Core::$url . '../sample/presets/preset1.png',
|
|
'presets' => array(
|
|
'switch-on' => 1,
|
|
'switch-off' => 1,
|
|
'switch-parent' => 1,
|
|
),
|
|
),
|
|
array(
|
|
'alt' => 'Preset 2',
|
|
'img' => Redux_Core::$url . '../sample/presets/preset2.png',
|
|
'presets' => '{"opt-slider-label":"1", "opt-slider-text":"10"}',
|
|
),
|
|
),
|
|
'default' => Redux_Core::$url . '../sample/presets/preset2.png',
|
|
),
|
|
array(
|
|
'id' => 'opt-select-image',
|
|
'type' => 'select_image',
|
|
'title' => esc_html__( 'Select Image', 'your-textdomain-here' ),
|
|
'subtitle' => esc_html__( 'A preview of the selected image will appear underneath the select box.', 'your-textdomain-here' ),
|
|
'options' => $sample_patterns,
|
|
'default' => Redux_Core::$url . '../sample/patterns/triangular.png',
|
|
),
|
|
),
|
|
)
|
|
);
|