|
1 | | -<?php defined('ABSPATH') or exit; ?> |
| 1 | +<?php |
| 2 | + |
| 3 | +use function WPT\Helpers\setting; |
| 4 | + |
| 5 | +defined('ABSPATH') or exit; |
| 6 | + |
| 7 | +?> |
2 | 8 |
|
3 | 9 | <div class="wrap"> |
4 | 10 | <h1> |
|
20 | 26 | </th> |
21 | 27 | <td> |
22 | 28 | <label> |
23 | | - <input type="radio" name="wpt_cron_enabled" value="0" <?php checked(0, esc_attr(get_option('wpt_cron_enabled', 0))); ?>> |
| 29 | + <input type="radio" name="wpt_cron_enabled" value="0" <?php checked(0, esc_attr(setting('cron_enabled'))); ?>> |
24 | 30 | <span> |
25 | 31 | No |
26 | 32 | </span> |
27 | 33 | </label> |
28 | 34 | <br><br> |
29 | 35 | <label> |
30 | | - <input type="radio" name="wpt_cron_enabled" value="1" <?php checked(1, esc_attr(get_option('wpt_cron_enabled', 0))); ?>> |
| 36 | + <input type="radio" name="wpt_cron_enabled" value="1" <?php checked(1, esc_attr(setting('cron_enabled'))); ?>> |
31 | 37 | <span> |
32 | 38 | Yes |
33 | 39 | </span> |
|
40 | 46 | <?php _e('Text', 'wp-plugin-template'); ?> |
41 | 47 | </th> |
42 | 48 | <td> |
43 | | - <input type="text" name="wpt_text_option" value="<?php echo esc_attr(get_option('wpt_text_option')); ?>"> |
| 49 | + <input type="text" name="wpt_text_option" value="<?php echo esc_attr(setting('text_option')); ?>"> |
44 | 50 | </td> |
45 | 51 | </tr> |
46 | 52 |
|
|
50 | 56 | </th> |
51 | 57 | <td> |
52 | 58 | <label> |
53 | | - <input type="radio" name="wpt_radio_option" value="0" <?php checked(0, esc_attr(get_option('wpt_radio_option', 0))); ?>> |
| 59 | + <input type="radio" name="wpt_radio_option" value="0" <?php checked(0, esc_attr(setting('radio_option', 0))); ?>> |
54 | 60 | <span> |
55 | 61 | No |
56 | 62 | </span> |
57 | 63 | </label> |
58 | 64 | <br><br> |
59 | 65 | <label> |
60 | | - <input type="radio" name="wpt_radio_option" value="1" <?php checked(1, esc_attr(get_option('wpt_radio_option', 0))); ?>> |
| 66 | + <input type="radio" name="wpt_radio_option" value="1" <?php checked(1, esc_attr(setting('radio_option', 0))); ?>> |
61 | 67 | <span> |
62 | 68 | Yes |
63 | 69 | </span> |
|
71 | 77 | </th> |
72 | 78 | <td> |
73 | 79 | <select name="wpt_select_option"> |
74 | | - <option value="1" <?php selected(get_option('wpt_select_option'), 1); ?>>1</option> |
75 | | - <option value="10" <?php selected(get_option('wpt_select_option'), 10); ?>>10</option> |
76 | | - <option value="25" <?php selected(get_option('wpt_select_option'), 25); ?>>25</option> |
| 80 | + <option value="1" <?php selected(setting('select_option'), 1); ?>>1</option> |
| 81 | + <option value="10" <?php selected(setting('select_option'), 10); ?>>10</option> |
| 82 | + <option value="25" <?php selected(setting('select_option'), 25); ?>>25</option> |
77 | 83 | </select> |
78 | 84 | </td> |
79 | 85 | </tr> |
80 | 86 | </table> |
81 | 87 |
|
82 | 88 | <hr> |
83 | 89 |
|
| 90 | + <h2> |
| 91 | + <?php _e('Cron Jobs', 'wp-plugin-template'); ?> |
| 92 | + </h2> |
| 93 | + |
| 94 | + <table class="form-table"> |
| 95 | + <tr valign="top"> |
| 96 | + <th scope="row"> |
| 97 | + <?php _e('Test', 'wp-plugin-template'); ?> |
| 98 | + </th> |
| 99 | + <td> |
| 100 | + <label> |
| 101 | + <input type="radio" name="wpt_test_cron_enabled" value="0" <?php checked(0, esc_attr(setting('test_cron_enabled'))); ?>> |
| 102 | + <span> |
| 103 | + No |
| 104 | + </span> |
| 105 | + </label> |
| 106 | + <br><br> |
| 107 | + <label> |
| 108 | + <input type="radio" name="wpt_test_cron_enabled" value="1" <?php checked(1, esc_attr(setting('test_cron_enabled'))); ?>> |
| 109 | + <span> |
| 110 | + Yes |
| 111 | + </span> |
| 112 | + </label> |
| 113 | + </td> |
| 114 | + </tr> |
| 115 | + </table> |
| 116 | + |
| 117 | + <hr> |
| 118 | + |
84 | 119 | <?php submit_button(); ?> |
85 | 120 | </form> |
86 | 121 | </div> |
0 commit comments