I'm building out a custom element which is just a single image. Here's how I've defined the parameters:
'params' => array(
array(
'type' => 'attach_image',
'heading' => esc_html__("Image"),
'param_name' => 'image',
'value' => esc_html__(''),
'admin_label' => false,
'weight' => 0,
)
}
According to the documentation, attach_image
is used for Single image selection
. However, in the admin side, I'm able to choose more than one image:
Above, I've added a yellow bg image, but get the option to add another - I only want one to be allowed (which is what I thought attach_image
does).
Am I missing something here?