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