add_action('product_designer_image_types', 'product_designer_image_types_20200808', 0);

function product_designer_image_types_20200808($img_types){

    $img_types['custom'] = __('Custom image', 'product-designer');

    return $img_types;

}
add_action('product_designer_image_type_content_custom', 'product_designer_image_type_content_custom', 0);

function product_designer_image_type_content_custom($atts){


    $settings = isset($atts['settings']) ? $atts['settings'] : array();
    $menu_position = isset($settings['menu_position']) ? $settings['menu_position'] : 'left';

    $icons = isset($atts['icons']) ? $atts['icons'] : '';
    $cube = isset($icons['cube']) ? $icons['cube'] : '';

    ?>
    <p>Custom html</p>
    <?php

}

 

View post on imgur.com