alignment.php
3 months ago
animation.php
3 months ago
behavior.php
3 months ago
days-dates.php
3 months ago
devices.php
3 months ago
settings.php
3 months ago
state.php
3 months ago
styling.php
3 months ago
upsell.php
3 months ago
visibility.php
3 months ago
styling.php
171 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Styling Widget Options |
| 5 | * |
| 6 | * @copyright Copyright (c) 2015, Jeffrey Carandang |
| 7 | * @since 1.0 |
| 8 | */ |
| 9 | |
| 10 | // Exit if accessed directly |
| 11 | if (!defined('ABSPATH')) exit; |
| 12 | |
| 13 | /** |
| 14 | * Add Styling Widget Options Tab |
| 15 | * |
| 16 | * @since 1.0 |
| 17 | * @return void |
| 18 | */ |
| 19 | |
| 20 | /** |
| 21 | * Called on 'extended_widget_opts_tabs' |
| 22 | * create new tab navigation for alignment options |
| 23 | */ |
| 24 | function widgetopts_tab_styling($args) |
| 25 | { ?> |
| 26 | <li class="extended-widget-opts-tab-styling"> |
| 27 | <a href="#extended-widget-opts-tab-<?php echo $args['id']; ?>-styling" title="<?php _e('Styling', 'widget-options'); ?>"><span class="dashicons dashicons-art"></span> <span class="tabtitle"><?php _e('Styling', 'widget-options'); ?></span></a> |
| 28 | </li> |
| 29 | <?php |
| 30 | } |
| 31 | add_action('extended_widget_opts_tabs', 'widgetopts_tab_styling', 6); |
| 32 | |
| 33 | /** |
| 34 | * Called on 'extended_widget_opts_tabcontent' |
| 35 | * create new tab content options for alignment options |
| 36 | */ |
| 37 | function widgetopts_tabcontent_styling($args) |
| 38 | { |
| 39 | global $widget_options; |
| 40 | |
| 41 | $selected = 0; |
| 42 | $bg_image = ''; |
| 43 | $background = ''; |
| 44 | $background_hover = ''; |
| 45 | $heading = ''; |
| 46 | $text = ''; |
| 47 | $links = ''; |
| 48 | $links_hover = ''; |
| 49 | $border_color = ''; |
| 50 | $border_width = ''; |
| 51 | $border_type = ''; |
| 52 | |
| 53 | $background_input = ''; |
| 54 | $text_input = ''; |
| 55 | $border_color_input = ''; |
| 56 | $border_width_input = ''; |
| 57 | $border_type_input = ''; |
| 58 | |
| 59 | $background_submit = ''; |
| 60 | $background_submit_hover = ''; |
| 61 | $text_submit = ''; |
| 62 | $border_color_submit = ''; |
| 63 | $border_width_submit = ''; |
| 64 | $border_type_submit = ''; |
| 65 | |
| 66 | $list_border_color = ''; |
| 67 | $table_border_color = ''; |
| 68 | ?> |
| 69 | <div id="extended-widget-opts-tab-<?php echo $args['id']; ?>-styling" class="extended-widget-opts-tabcontent extended-widget-opts-tabcontent-styling"> |
| 70 | <div class="extended-widget-opts-demo-feature"> |
| 71 | <div class="extended-widget-opts-demo-warning"> |
| 72 | <p class="widgetopts-unlock-features"> |
| 73 | <span class="dashicons dashicons-lock"></span><br> |
| 74 | Unlock all Features<br> |
| 75 | <a href="https://widget-options.com/?utm_source=wordpressadmin&utm_medium=widgettabs&utm_campaign=widgetoptsprotab" class="button-primary" target="_blank">Learn More</a> |
| 76 | </p> |
| 77 | </div> |
| 78 | |
| 79 | <div class="extended-widget-opts-styling-tabs extended-widget-opts-inside-tabs"> |
| 80 | |
| 81 | <ul class="extended-widget-opts-styling-tabnav-ul"> |
| 82 | <li class="extended-widget-opts-styling-tab-styling"> |
| 83 | <a href="#extended-widget-opts-styling-tab-<?php echo $args['id']; ?>-widget"><?php _e('Widget', 'widget-options'); ?></a> |
| 84 | </li> |
| 85 | <li class="extended-widget-opts-styling-tab-form"> |
| 86 | <a href="#extended-widget-opts-styling-tab-<?php echo $args['id']; ?>-form"><?php _e('Forms', 'widget-options'); ?></a> |
| 87 | </li> |
| 88 | <li class="extended-widget-opts-styling-tab-form"> |
| 89 | <a href="#extended-widget-opts-styling-tab-<?php echo $args['id']; ?>-others"><?php _e('Others', 'widget-options'); ?></a> |
| 90 | </li> |
| 91 | <div class="extended-widget-opts-clearfix"></div> |
| 92 | </ul> |
| 93 | |
| 94 | <div id="extended-widget-opts-styling-tab-<?php echo $args['id']; ?>-widget" class="extended-widget-opts-styling-tabcontent extended-widget-opts-inner-tabcontent"> |
| 95 | <p class="widgetopts-subtitle"><?php _e('Background Image', 'widget-options'); ?></p> |
| 96 | |
| 97 | <table class="form-table"> |
| 98 | <tbody> |
| 99 | <tr valign="top"> |
| 100 | <td colspan="2"><input type="text" class="widefat extended_widget_opts-bg-image" name="<?php echo $args['namespace']; ?>[extended_widget_opts][styling][bg_image]" value="<?php echo $bg_image; ?>" placeholder="<?php _e('Image Url', 'widget-options'); ?>" /> |
| 101 | </td> |
| 102 | </tr> |
| 103 | <tr valign="top"> |
| 104 | <td colspan="2" class="alright"> |
| 105 | <input type="button" class="button-primary extended_widget_opts-bg_uploader" value="<?php _e('Upload', 'widget-options'); ?>"> |
| 106 | <input type="button" class="button-secondary extended_widget_opts-remove_image" value="<?php _e('Remove', 'widget-options'); ?>"> |
| 107 | </td> |
| 108 | </tr> |
| 109 | </tbody> |
| 110 | </table><br /> |
| 111 | |
| 112 | <p class="widgetopts-subtitle"><?php _e('Widget Styling Options', 'widget-options'); ?></p> |
| 113 | |
| 114 | <table class="form-table"> |
| 115 | <tbody> |
| 116 | <tr valign="top"> |
| 117 | <td scope="row"><?php _e('Background Color', 'widget-options'); ?></td> |
| 118 | <td><input type="text" class="widget-opts-color" readonly /></td> |
| 119 | </tr> |
| 120 | <tr valign="top"> |
| 121 | <td scope="row"><?php _e('Hover Background Color', 'widget-options'); ?></td> |
| 122 | <td><input type="text" class="widget-opts-color" readonly /></td> |
| 123 | </tr> |
| 124 | <tr valign="top"> |
| 125 | <td scope="row"><?php _e('Headings', 'widget-options'); ?></td> |
| 126 | <td><input type="text" class="widget-opts-color" readonly /></td> |
| 127 | </tr> |
| 128 | <tr valign="top"> |
| 129 | <td scope="row"><?php _e('Text', 'widget-options'); ?></td> |
| 130 | <td><input type="text" class="widget-opts-color" readonly /></td> |
| 131 | </tr> |
| 132 | <tr valign="top"> |
| 133 | <td scope="row"><?php _e('Links', 'widget-options'); ?></td> |
| 134 | <td><input type="text" class="widget-opts-color" readonly /></td> |
| 135 | </tr> |
| 136 | <tr valign="top"> |
| 137 | <td scope="row"><?php _e('Links Hover', 'widget-options'); ?></td> |
| 138 | <td><input type="text" class="widget-opts-color" readonly /></td> |
| 139 | </tr> |
| 140 | <tr valign="top"> |
| 141 | <td scope="row"><?php _e('Border Color', 'widget-options'); ?></td> |
| 142 | <td><input type="text" class="widget-opts-color" readonly /></td> |
| 143 | </tr> |
| 144 | <tr valign="top"> |
| 145 | <td scope="row"><?php _e('Border Style', 'widget-options'); ?></td> |
| 146 | <td> |
| 147 | <select class="widefat" readonly> |
| 148 | <option value=""><?php _e('Default', 'widget-options'); ?></option> |
| 149 | </select> |
| 150 | </td> |
| 151 | </tr> |
| 152 | <tr valign="top"> |
| 153 | <td scope="row"><?php _e('Border Width', 'widget-options'); ?></td> |
| 154 | <td><input type="text" size="5" class="inputsize5" readonly />px</td> |
| 155 | </tr> |
| 156 | </tbody> |
| 157 | </table> |
| 158 | </div> |
| 159 | |
| 160 | <div id="extended-widget-opts-styling-tab-<?php echo $args['id']; ?>-form" class="extended-widget-opts-styling-tabcontent extended-widget-opts-inner-tabcontent"></div> |
| 161 | |
| 162 | <div id="extended-widget-opts-styling-tab-<?php echo $args['id']; ?>-others" class="extended-widget-opts-styling-tabcontent extended-widget-opts-inner-tabcontent"></div> |
| 163 | |
| 164 | <div class="extended-widget-opts-clearfix"></div> |
| 165 | </div><!-- end .extended-widget-opts-tabs --> |
| 166 | </div> |
| 167 | |
| 168 | </div> |
| 169 | <?php |
| 170 | } |
| 171 | add_action('extended_widget_opts_tabcontent', 'widgetopts_tabcontent_styling'); ?> |