-
-
Save BeardedGinger/a33588aa9037c1674b0d59a368fecc81 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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