19. Image Select

'image_select' => array(
    'type' => 'image_select',
    'label' => esc_html__( 'Image Select', 'my-domain' ),
    'width' => 100,
    'height' => 100,
    'value' => 2,
    'options' => array(
        1 => array(
            'alt'   => 'Mountains',
            'img'   => 'https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=100&q=100'
        ),
        2 => array(
            'alt'   => 'Sea',
            'img'   => 'https://images.unsplash.com/photo-1505118380757-91f5f5632de0?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=100&q=100&h=100'
        ),
    ),
    'submenu' => esc_html__('Image Select', 'my-domain'),
    'description' => esc_html__( 'Description', 'my-domain' ),
),

Last updated