Media Query Based Input

Example:


$attributes = array_merge( 
    $attributes,
    upb_media_query_based_input_group( 
        array( 
            'id' => 'margin',
            'title' => esc_html__( 'Margin', 'ultimate-page-builder' ),
            'desc' => esc_html__( 'Space between two section', 'ultimate-page-builder' ),
            'type' => 'range',
            'options' => array(
                'min'    => 0,
                'max'    => 200,
                'step'   => 1,
                'suffix' => 'px',
            ),
            'value' => 0,
        ),

         array( 
            'id' => 'padding',
            'title' => esc_html__( 'Padding', 'ultimate-page-builder' ),
            'desc' => esc_html__( 'Padding between two section', 'ultimate-page-builder' ),
            'type' => 'text',
            'value' => '',
        ), 
     )
 );

OR

$attributes = array_merge( $attributes,
    upb_media_query_based_input_group( array(
        'id'           => 'example-margin',
        'title'        => esc_html__( 'Margin', 'ultimate-page-builder' ),
        'desc'         => esc_html__( 'Margin between two section', 'ultimate-page-builder' ),
        'type'         => 'spacing',
        'value'        => array( '10px', 'auto', '10px', 'auto' ),
        'device-value' => array(
            'lg' => array( '30px', 'auto', '20px', 'auto' ),
            'md' => array( '21px', 'auto', '22px', 'auto' ),
            'sm' => array( '25px', 'auto', '25px', 'auto' ),
            'xs' => array( '10px', 'auto', '10px', 'auto' ),
            ),
        'unit'         => 'px',
        'options'      => array(
            'top'    => TRUE,
            'right'  => FALSE,
            'bottom' => TRUE,
            'left'   => FALSE,
            )
        ) ) );

Exclude some devices like: global, large, medium

$attributes = array_merge( $attributes,
    upb_media_query_based_input_group( array(
        'id'           => 'example-margin2',
        'title'        => esc_html__( 'Margin', 'ultimate-page-builder' ),
        'desc'         => esc_html__( 'Margin between two section', 'ultimate-page-builder' ),
        'type'         => 'spacing',
        'value'        => array( '10px', 'auto', '10px', 'auto' ),
        'device-value' => array(
            'lg' => array( '30px', 'auto', '20px', 'auto' ),
            'md' => array( '21px', 'auto', '22px', 'auto' ),
            'sm' => array( '25px', 'auto', '25px', 'auto' ),
            'xs' => array( '10px', 'auto', '10px', 'auto' ),
            ),
        'unit'         => 'px',
        'options'      => array(
            'top'    => TRUE,
            'right'  => FALSE,
            'bottom' => TRUE,
            'left'   => FALSE,
            )
        ), array('global', 'lg', 'md') ) );

results matching ""

    No results matching ""