Skip to content

Instantly share code, notes, and snippets.

@DannyOutlaw
Last active August 17, 2016 18:16
Show Gist options
  • Save DannyOutlaw/1f3e4a2a0dc7d2ed10ada78166694325 to your computer and use it in GitHub Desktop.
Save DannyOutlaw/1f3e4a2a0dc7d2ed10ada78166694325 to your computer and use it in GitHub Desktop.
<?php
/**
* Element Controls
*/
return array(
'features' => array(
'type' => 'select',
'ui' => array(
'title' => __( 'Extra Features', 'my-extension' )
),
'options' => array(
'choices' => array(
array( 'value' => 'option1', 'label' => __( 'Large Images', 'cornerstone' ) ),
array( 'value' => 'option2', 'label' => __( 'Thumbs Left of Title', 'cornerstone' ) ),
array( 'value' => 'option3', 'label' => __( 'Thumbs Under Title', 'cornerstone' ) ),
array( 'value' => 'option4', 'label' => __( 'Global Setting', 'cornerstone' ) ),
)
),
),
'heading' => array(
'type' => 'text',
'ui' => array(
'title' => __( 'Heading &amp; Content', 'my-extension' ),
'tooltip' => __( 'Tooltip to describe your controls.', 'my-extension' ),
),
'context' => 'content',
'suggest' => __( 'Heading', 'my-extension' ),
),
'content' => array(
'type' => 'textarea',
'context' => 'content',
'suggest' => __( 'Click to inspect, then edit as needed.', 'my-extension' ),
),
'orientation' => array(
'type' => 'choose',
'ui' => array(
'title' => __( 'Orientation', 'my-extension' ),
'tooltip' => __( 'Choose to display the heading vertically or horizonatally', 'my-extension' ),
'divider' => true
),
'options' => array(
'divider' => true,
'columns' => '2',
'choices' => array(
array( 'value' => 'vertical', 'tooltip' => __( 'Vertical', 'my-extension' ), 'icon' => fa_entity( 'arrows-v' ) ),
array( 'value' => 'horizontal', 'tooltip' => __( 'Horizontal', 'my-extension' ), 'icon' => fa_entity( 'arrows-h' ) ),
)
)
),
'heading_color' => array(
'type' => 'color',
'ui' => array(
'title' => __( 'Heading Color', 'my-extension' )
)
),
'background_color' => array(
'type' => 'color',
'ui' => array(
'title' => __( 'Background Color', 'my-extension' )
)
),
'border' => array(
'mixin' => 'border',
),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment