Skip to content

Type – Image Uploader

Henner R Setyono edited this page Apr 21, 2020 · 3 revisions

'custom_logo' => [
  'label' => false,
  'type' => 'ct-image-uploader',
  'inline_value' => false,
  'attr' => [ 'data-height' => 'small' ],
],

attr - Custom attribute. Available ones:

  • data-height - Change image preview's height. Either "small" or leave empty for normal height.

Value Format

If inline_value is true, it returns only Image ID:

'custom_logo' => 530

If inline_value isn't set or false, it returns an array:

'custom_logo' => [
  'attachment_id' => 530
  'url' => 'https://my-site.com/wp-content/uploads/2020/01/my-logo.jpg'
]

Clone this wiki locally