/**
 * Filter the definitions of the Banner slide configuration inputs.
 *
 * @since 1.4.0.
 *
 * @param array    $inputs    The input definition array.
 */
$inputs = apply_filters('make_banner_slide_configuration', array(100 => array('type' => 'select', 'name' => 'alignment', 'label' => __('Content position', 'make'), 'default' => 'none', 'options' => array('none' => __('None', 'make'), 'left' => __('Left', 'make'), 'right' => __('Right', 'make'))), 200 => array('type' => 'checkbox', 'label' => __('Darken background to improve readability', 'make'), 'name' => 'darken', 'default' => 0), 300 => array('type' => 'color', 'label' => __('Background color', 'make'), 'name' => 'background-color', 'class' => 'ttfmake-gallery-background-color ttfmake-configuration-color-picker', 'default' => '')));
// Sort the config in case 3rd party code added another input
ksort($inputs, SORT_NUMERIC);
// Print the inputs
$output = '';
foreach ($inputs as $input) {
    if (isset($input['type']) && isset($input['name'])) {
        $section_data = isset($ttfmake_section_data['data']['banner-slides'][$ttfmake_slide_id]) ? $ttfmake_section_data['data']['banner-slides'][$ttfmake_slide_id] : array();
        $output .= ttfmake_create_input($section_name, $input, $section_data);
    }
}
echo $output;
get_template_part('/inc/builder/core/templates/overlay', 'footer');
?>

	<input type="hidden" class="ttfmake-banner-slide-state" name="<?php 
echo $section_name;
?>
[state]" value="<?php 
echo esc_attr($state);
?>
" />

	<?php 
Esempio n. 2
0
<?php

global $ttfmake_overlay_class, $ttfmake_section_data, $ttfmake_is_js_template, $ttfmake_overlay_title;
$ttfmake_overlay_class = 'ttfmake-configuration-overlay';
$ttfmake_overlay_title = __('Configure section', 'make');
$section_name = ttfmake_get_section_name($ttfmake_section_data, $ttfmake_is_js_template);
// Include the header
get_template_part('/inc/builder/core/templates/overlay', 'header');
// Sort the config in case 3rd party code added another input
ksort($ttfmake_section_data['section']['config'], SORT_NUMERIC);
// Print the inputs
$output = '';
foreach ($ttfmake_section_data['section']['config'] as $input) {
    if (isset($input['type']) && isset($input['name'])) {
        $output .= ttfmake_create_input($section_name, $input, $ttfmake_section_data['data']);
    }
}
echo $output;
get_template_part('/inc/builder/core/templates/overlay', 'footer');