<?php | |
function shortcode_ui() { | |
if( ! function_exists( 'shortcode_ui_register_for_shortcode' ) ) | |
return; | |
$fields = array( | |
array( | |
'label' => 'Background Color', | |
'attr' => 'background_color', | |
'type' => 'select', | |
'options' => array( | |
'' => 'White', | |
'green' => 'Green', | |
'blue' => 'Blue', | |
'orange' => 'Orange', | |
'black' => 'Black' | |
) | |
), | |
array( | |
'label' => 'Image', | |
'attr' => 'image', | |
'type' => 'attachment', | |
'libraryType' => array( 'image' ), | |
'addButton' => 'Banner Image', | |
'frameTitle' => 'Banner Image' | |
), | |
array( | |
'label' => 'Image Position', | |
'attr' => 'image-position', | |
'type' => 'select', | |
'options' => array( | |
'left' => 'Left', | |
'right' => 'Right' | |
) | |
) | |
); | |
$shortcode_ui_args = array( | |
'label' => 'Banner', | |
'listItemImage' => 'dashicons-align-center', | |
'inner_content' => array( | |
'label' => 'Content' | |
), | |
'attrs' => $fields | |
); | |
shortcode_ui_register_for_shortcode( 'limecuda_banner', $shortcode_ui_args ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment