| 1 |
<?php |
| 2 |
/** |
| 3 |
* Element Controls |
| 4 |
* |
| 5 |
* @package wp-commerce7 |
| 6 |
* @author Michael Bourne |
| 7 |
* @license GPL3 |
| 8 |
* @link https://ursa6.com |
| 9 |
* @since 1.0.0 |
| 10 |
*/ |
| 11 |
|
| 12 |
$options = get_option( 'c7wp_settings' ); |
| 13 |
if ( isset( $options['c7wp_widget_version'] ) && 'v2' == $options['c7wp_widget_version'] ) { |
| 14 |
return array( |
| 15 |
|
| 16 |
'type' => array( |
| 17 |
'type' => 'select', |
| 18 |
'ui' => array( |
| 19 |
'title' => __( 'Element Type', 'wp-commerce7' ), |
| 20 |
), |
| 21 |
'options' => array( |
| 22 |
'choices' => array( |
| 23 |
array( 'value' => 'default', 'label' => __( 'Default Content', 'wp-commerce7' ) ), |
| 24 |
array( 'value' => 'personalization', 'label' => __( 'Personalization Block', 'wp-commerce7' ) ), |
| 25 |
array( 'value' => 'buyslug', 'label' => __( 'Buy Now (Slug)', 'wp-commerce7' ) ), |
| 26 |
array( 'value' => 'subscribe', 'label' => __( 'Subscribe Form', 'wp-commerce7' ) ), |
| 27 |
array( 'value' => 'collection', 'label' => __( 'Collection Grid', 'wp-commerce7' ) ), |
| 28 |
array( 'value' => 'login', 'label' => __( 'Magic login link', 'wp-commerce7' ) ), |
| 29 |
array( 'value' => 'cart', 'label' => __( 'Magic cart link', 'wp-commerce7' ) ), |
| 30 |
array( 'value' => 'reservation', 'label' => __( 'Reservation Widget', 'wp-commerce7' ) ), |
| 31 |
array( 'value' => 'form', 'label' => __( 'General Form', 'wp-commerce7' ) ), |
| 32 |
array( 'value' => 'joinnow', 'label' => __( 'Join/Edit Club Magic Button', 'wp-commerce7' ) ), |
| 33 |
array( 'value' => 'collectionlist', 'label' => __( 'Collection List', 'wp-commerce7' ) ), |
| 34 |
), |
| 35 |
), |
| 36 |
), |
| 37 |
'data' => array( |
| 38 |
'type' => 'text', |
| 39 |
'ui' => array( |
| 40 |
'title' => __( 'Data/Slug', 'wp-commerce7' ), |
| 41 |
), |
| 42 |
), |
| 43 |
|
| 44 |
'common' => array( '!style', '!id', '!class' ), |
| 45 |
); |
| 46 |
} else { |
| 47 |
return array( |
| 48 |
|
| 49 |
'type' => array( |
| 50 |
'type' => 'select', |
| 51 |
'ui' => array( |
| 52 |
'title' => __( 'Element Type', 'wp-commerce7' ), |
| 53 |
), |
| 54 |
'options' => array( |
| 55 |
'choices' => array( |
| 56 |
array( 'value' => 'default', 'label' => __( 'Default Content', 'wp-commerce7' ) ), |
| 57 |
array( 'value' => 'personalization', 'label' => __( 'Personalization Block', 'wp-commerce7' ) ), |
| 58 |
array( 'value' => 'buy', 'label' => __( 'Buy Now (SKU)', 'wp-commerce7' ) ), |
| 59 |
array( 'value' => 'buyslug', 'label' => __( 'Buy Now (Slug)', 'wp-commerce7' ) ), |
| 60 |
array( 'value' => 'subscribe', 'label' => __( 'Subscribe Form', 'wp-commerce7' ) ), |
| 61 |
array( 'value' => 'collection', 'label' => __( 'Collection Grid', 'wp-commerce7' ) ), |
| 62 |
array( 'value' => 'login', 'label' => __( 'Magic login link', 'wp-commerce7' ) ), |
| 63 |
array( 'value' => 'cart', 'label' => __( 'Magic cart link', 'wp-commerce7' ) ), |
| 64 |
array( 'value' => 'reservation', 'label' => __( 'Reservation Widget', 'wp-commerce7' ) ), |
| 65 |
array( 'value' => 'form', 'label' => __( 'General Form', 'wp-commerce7' ) ), |
| 66 |
array( 'value' => 'joinnow', 'label' => __( 'Join/Edit Club Magic Button', 'wp-commerce7' ) ), |
| 67 |
array( 'value' => 'quickshop', 'label' => __( 'Quick Shop Form', 'wp-commerce7' ) ), |
| 68 |
array( 'value' => 'loginform', 'label' => __( 'Login Form', 'wp-commerce7' ) ), |
| 69 |
array( 'value' => 'createaccount', 'label' => __( 'Create Account Form', 'wp-commerce7' ) ), |
| 70 |
), |
| 71 |
), |
| 72 |
), |
| 73 |
'data' => array( |
| 74 |
'type' => 'text', |
| 75 |
'ui' => array( |
| 76 |
'title' => __( 'Data', 'wp-commerce7' ), |
| 77 |
), |
| 78 |
), |
| 79 |
|
| 80 |
'common' => array( '!style', '!id', '!class' ), |
| 81 |
); |
| 82 |
} |
| 83 |
|