alignment.php
2 years ago
days-dates.php
4 years ago
devices.php
2 years ago
settings.php
2 years ago
state.php
2 years ago
styling.php
4 years ago
upsell.php
2 years ago
visibility.php
2 years ago
days-dates.php
111 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Days and Dates 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 Days & Dates 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_days( $args ){ ?> |
| 24 | <li class="extended-widget-opts-tab-days"> |
| 25 | <a href="#extended-widget-opts-tab-<?php echo $args['id'];?>-days" title="<?php _e( 'Days & Dates', 'widget-options' );?>" ><span class="dashicons dashicons-calendar-alt"></span> <span class="tabtitle"><?php _e( 'Days', 'widget-options' );?></span></a> |
| 26 | </li> |
| 27 | <?php |
| 28 | } |
| 29 | add_action( 'extended_widget_opts_tabs', 'widgetopts_tab_days' ); |
| 30 | |
| 31 | /** |
| 32 | * Called on 'extended_widget_opts_tabcontent' |
| 33 | * create new tab content options for alignment options |
| 34 | */ |
| 35 | function widgetopts_tabcontent_days( $args ){ |
| 36 | global $widget_options; |
| 37 | $days = array( |
| 38 | 'monday' => __( 'Monday', 'widget-options' ), |
| 39 | 'tuesday' => __( 'Tuesday', 'widget-options' ), |
| 40 | 'wednesday' => __( 'Wednesday', 'widget-options' ), |
| 41 | 'thursday' => __( 'Thursday', 'widget-options' ), |
| 42 | 'friday' => __( 'Friday', 'widget-options' ), |
| 43 | 'saturday' => __( 'Saturday', 'widget-options' ), |
| 44 | 'sunday' => __( 'Sunday', 'widget-options' ), |
| 45 | ); |
| 46 | $options_role = ''; |
| 47 | $options_dates = ''; |
| 48 | $from = ''; |
| 49 | $to = ''; |
| 50 | ?> |
| 51 | <div id="extended-widget-opts-tab-<?php echo $args['id'];?>-days" class="extended-widget-opts-tabcontent extended-widget-opts-tabcontent-days"> |
| 52 | <div class="extended-widget-opts-demo-feature"> |
| 53 | <div class="extended-widget-opts-demo-warning"> |
| 54 | <p class="widgetopts-unlock-features"> |
| 55 | <span class="dashicons dashicons-lock"></span><br> |
| 56 | Unlock all Features<br> |
| 57 | <a href="https://widget-options.com/?utm_source=wordpressadmin&utm_medium=widgettabs&utm_campaign=widgetoptsprotab" class="button-primary" target="_blank">Learn More</a> |
| 58 | </p> |
| 59 | </div> |
| 60 | <p> |
| 61 | <strong><?php _e( 'Hide/Show', 'widget-options' );?></strong> |
| 62 | <select class="widefat" readonly> |
| 63 | <option value="hide"><?php _e( 'Hide on checked days', 'widget-options' );?></option> |
| 64 | <option value="show"><?php _e( 'Show on checked days', 'widget-options' );?></option> |
| 65 | </select> |
| 66 | </p> |
| 67 | <table class="form-table"> |
| 68 | <tbody> |
| 69 | <tr valign="top"> |
| 70 | <td scope="row"><strong><?php _e( 'Days', 'widget-options' );?></strong></td> |
| 71 | <td> </td> |
| 72 | </tr> |
| 73 | <?php foreach ( $days as $key => $day ) { |
| 74 | $checked = ''; |
| 75 | ?> |
| 76 | <tr valign="top"> |
| 77 | <td scope="row"><label><?php echo $day;?></label></td> |
| 78 | <td> |
| 79 | <input type="checkbox" value="1" readonly /> |
| 80 | </td> |
| 81 | </tr> |
| 82 | <?php } ?> |
| 83 | </tbody> |
| 84 | </table> |
| 85 | <br /> |
| 86 | |
| 87 | <p> |
| 88 | <strong><?php _e( 'Hide/Show', 'widget-options' );?></strong> |
| 89 | <select class="widefat" readonly> |
| 90 | <option value="hide"><?php _e( 'Hide on date range', 'widget-options' );?></option> |
| 91 | <option value="show"><?php _e( 'Show on date range', 'widget-options' );?></option> |
| 92 | </select> |
| 93 | </p> |
| 94 | <table class="form-table"> |
| 95 | <tbody> |
| 96 | <tr valign="top"> |
| 97 | <td scope="row"><strong><?php _e( 'From: ', 'widget-options' );?></strong></td> |
| 98 | <td><input type="text" class="widefat extended-widget-opts-date" readonly /></td> |
| 99 | </tr> |
| 100 | <tr valign="top"> |
| 101 | <td scope="row"><strong><?php _e( 'To: ', 'widget-options' );?></strong></td> |
| 102 | <td><input type="text" class="widefat extended-widget-opts-date" readonly /></td> |
| 103 | </tr> |
| 104 | </tbody> |
| 105 | </table> |
| 106 | </div> |
| 107 | </div> |
| 108 | <?php |
| 109 | } |
| 110 | add_action( 'extended_widget_opts_tabcontent', 'widgetopts_tabcontent_days'); ?> |
| 111 |