| @@ -1,82 +1,82 @@ | ||
| 1 | -<?php | |
| 2 | -if ( ! defined( 'ABSPATH' ) ) { | |
| 3 | - exit; // Exit if accessed directly | |
| 4 | -} | |
| 5 | - | |
| 6 | -global $current_user,$wpdb,$wppmfunction; | |
| 7 | -$settings = get_option("wppm-ap-settings"); | |
| 8 | -$wppm_ap_settings = get_option("wppm-ap-settings"); | |
| 9 | -if (!($current_user->ID && $current_user->has_cap('wppm_admin') || $current_user->has_cap('manage_options'))) { | |
| 10 | - exit; | |
| 11 | -} | |
| 12 | -?> | |
| 13 | -<form action="#" onsubmit="return false;" class="wppm-frm-ap-settings"> | |
| 14 | - <div class="wppm-input-group"> | |
| 15 | - <div class="label-container"> | |
| 16 | - <label for=""><?php esc_attr_e( 'Tab', 'taskbuilder' ); ?></label> | |
| 17 | - </div> | |
| 18 | - <table class="wppm-ap-table"> | |
| 19 | - <tr> | |
| 20 | - <td><?php esc_attr_e( 'background color', 'taskbuilder' ); ?></td> | |
| 21 | - <td><?php esc_attr_e( 'text color', 'taskbuilder' ); ?></td> | |
| 22 | - </tr> | |
| 23 | - <tr> | |
| 24 | - <td><input class="wppm-color-picker" type="text" name="tab-background-color" value="<?php echo esc_attr( $settings['tab-background-color'] ); ?>"></td> | |
| 25 | - <td><input class="wppm-color-picker" type="text" name="tab-text-color" value="<?php echo esc_attr( $settings['tab-text-color'] ); ?>"></td> | |
| 26 | - </tr> | |
| 27 | - </table> | |
| 28 | - </div> | |
| 29 | - <div class="wppm-input-group"> | |
| 30 | - <div class="label-container"> | |
| 31 | - <label for=""><?php esc_attr_e( 'Add new button', 'taskbuilder' ); ?></label> | |
| 32 | - </div> | |
| 33 | - <table class="wppm-ap-table"> | |
| 34 | - <tr> | |
| 35 | - <td><?php esc_attr_e( 'background color', 'taskbuilder' ); ?></td> | |
| 36 | - <td><?php esc_attr_e( 'text color', 'taskbuilder' ); ?></td> | |
| 37 | - <td><?php esc_attr_e( 'hover color', 'taskbuilder' ); ?></td> | |
| 38 | - </tr> | |
| 39 | - <tr> | |
| 40 | - <td><input class="wppm-color-picker" type="text" name="add-new-button-bg-color" value="<?php echo esc_attr( $settings['add-new-button-bg-color'] ); ?>"></td> | |
| 41 | - <td><input class="wppm-color-picker" type="text" name="add-new-button-text-color" value="<?php echo esc_attr( $settings['add-new-button-text-color'] ); ?>"></td> | |
| 42 | - <td><input class="wppm-color-picker" type="text" name="add-new-button-hover-color" value="<?php echo esc_attr( $settings['add-new-button-hover-color'] ); ?>"></td> | |
| 43 | - </tr> | |
| 44 | - </table> | |
| 45 | - </div> | |
| 46 | - <div class="wppm-input-group"> | |
| 47 | - <div class="label-container"> | |
| 48 | - <label for=""><?php esc_attr_e( 'Save changes button', 'taskbuilder' ); ?></label> | |
| 49 | - </div> | |
| 50 | - <table class="wppm-ap-table"> | |
| 51 | - <tr> | |
| 52 | - <td><?php esc_attr_e( 'background color', 'taskbuilder' ); ?></td> | |
| 53 | - <td><?php esc_attr_e( 'text color', 'taskbuilder' ); ?></td> | |
| 54 | - </tr> | |
| 55 | - <tr> | |
| 56 | - <td><input class="wppm-color-picker" type="text" name="save-changes-button-bg-color" value="<?php echo esc_attr( $settings['save-changes-button-bg-color'] ); ?>"></td> | |
| 57 | - <td><input class="wppm-color-picker" type="text" name="save-changes-button-text-color" value="<?php echo esc_attr( $settings['save-changes-button-text-color'] ); ?>"></td> | |
| 58 | - </tr> | |
| 59 | - </table> | |
| 60 | - </div> | |
| 61 | - <input type="hidden" name="action" value="wppm_set_ap_settings"> | |
| 62 | - <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_ap_settings' ) ); ?>"> | |
| 63 | - <script>jQuery('.wppm-color-picker').wpColorPicker();</script> | |
| 64 | - <style> | |
| 65 | - .wppm-ap-table td {padding: 5px;} | |
| 66 | - .wppm-ap-table table, .wppm-ap-table td {border: 1px solid #c3c3c3;} | |
| 67 | - </style> | |
| 68 | -</form> | |
| 69 | -<div class="setting-footer-actions"> | |
| 70 | - <button | |
| 71 | - class="wppm-submit-btn" | |
| 72 | - onclick="wppm_set_ap_settings();" style="background-color:<?php echo esc_attr($wppm_ap_settings['save-changes-button-bg-color'])?>!important;color:<?php echo esc_attr($wppm_ap_settings['save-changes-button-text-color'])?>!important;"> | |
| 73 | - <?php esc_attr_e( 'Save Changes', 'taskbuilder' ); ?></button> | |
| 74 | - <button | |
| 75 | - class="wppm_reset_btn" id="wppm_reset_ap_settings_btn" | |
| 76 | - onclick="wppm_reset_ap_settings();"> | |
| 77 | - <?php esc_attr_e( 'Reset default', 'taskbuilder' ); ?></button> | |
| 78 | - <input type="hidden" name="wppm_reset_ap_settings_nonce" id="wppm_reset_ap_settings_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_reset_ap_settings' ) ); ?>"> | |
| 79 | - <span class="wppm_submit_wait" style="display:none;"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/loading_buffer.svg'); ?>" alt="edit"></span> | |
| 80 | -</div> | |
| 81 | -<?php | |
| 1 | +<?php | |
| 2 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 3 | + exit; // Exit if accessed directly | |
| 4 | +} | |
| 5 | + | |
| 6 | +global $current_user,$wpdb,$wppmfunction; | |
| 7 | +$settings = get_option("wppm-ap-settings"); | |
| 8 | +$wppm_ap_settings = get_option("wppm-ap-settings"); | |
| 9 | +if (!($current_user->ID && $current_user->has_cap('wppm_admin') || $current_user->has_cap('manage_options'))) { | |
| 10 | + exit; | |
| 11 | +} | |
| 12 | +?> | |
| 13 | +<form action="#" onsubmit="return false;" class="wppm-frm-ap-settings"> | |
| 14 | + <div class="wppm-input-group"> | |
| 15 | + <div class="label-container"> | |
| 16 | + <label for=""><?php esc_attr_e( 'Tab', 'taskbuilder' ); ?></label> | |
| 17 | + </div> | |
| 18 | + <table class="wppm-ap-table"> | |
| 19 | + <tr> | |
| 20 | + <td><?php esc_attr_e( 'background color', 'taskbuilder' ); ?></td> | |
| 21 | + <td><?php esc_attr_e( 'text color', 'taskbuilder' ); ?></td> | |
| 22 | + </tr> | |
| 23 | + <tr> | |
| 24 | + <td><input class="wppm-color-picker" type="text" name="tab-background-color" value="<?php echo esc_attr( $settings['tab-background-color'] ); ?>"></td> | |
| 25 | + <td><input class="wppm-color-picker" type="text" name="tab-text-color" value="<?php echo esc_attr( $settings['tab-text-color'] ); ?>"></td> | |
| 26 | + </tr> | |
| 27 | + </table> | |
| 28 | + </div> | |
| 29 | + <div class="wppm-input-group"> | |
| 30 | + <div class="label-container"> | |
| 31 | + <label for=""><?php esc_attr_e( 'Add new button', 'taskbuilder' ); ?></label> | |
| 32 | + </div> | |
| 33 | + <table class="wppm-ap-table"> | |
| 34 | + <tr> | |
| 35 | + <td><?php esc_attr_e( 'background color', 'taskbuilder' ); ?></td> | |
| 36 | + <td><?php esc_attr_e( 'text color', 'taskbuilder' ); ?></td> | |
| 37 | + <td><?php esc_attr_e( 'hover color', 'taskbuilder' ); ?></td> | |
| 38 | + </tr> | |
| 39 | + <tr> | |
| 40 | + <td><input class="wppm-color-picker" type="text" name="add-new-button-bg-color" value="<?php echo esc_attr( $settings['add-new-button-bg-color'] ); ?>"></td> | |
| 41 | + <td><input class="wppm-color-picker" type="text" name="add-new-button-text-color" value="<?php echo esc_attr( $settings['add-new-button-text-color'] ); ?>"></td> | |
| 42 | + <td><input class="wppm-color-picker" type="text" name="add-new-button-hover-color" value="<?php echo esc_attr( $settings['add-new-button-hover-color'] ); ?>"></td> | |
| 43 | + </tr> | |
| 44 | + </table> | |
| 45 | + </div> | |
| 46 | + <div class="wppm-input-group"> | |
| 47 | + <div class="label-container"> | |
| 48 | + <label for=""><?php esc_attr_e( 'Save changes button', 'taskbuilder' ); ?></label> | |
| 49 | + </div> | |
| 50 | + <table class="wppm-ap-table"> | |
| 51 | + <tr> | |
| 52 | + <td><?php esc_attr_e( 'background color', 'taskbuilder' ); ?></td> | |
| 53 | + <td><?php esc_attr_e( 'text color', 'taskbuilder' ); ?></td> | |
| 54 | + </tr> | |
| 55 | + <tr> | |
| 56 | + <td><input class="wppm-color-picker" type="text" name="save-changes-button-bg-color" value="<?php echo esc_attr( $settings['save-changes-button-bg-color'] ); ?>"></td> | |
| 57 | + <td><input class="wppm-color-picker" type="text" name="save-changes-button-text-color" value="<?php echo esc_attr( $settings['save-changes-button-text-color'] ); ?>"></td> | |
| 58 | + </tr> | |
| 59 | + </table> | |
| 60 | + </div> | |
| 61 | + <input type="hidden" name="action" value="wppm_set_ap_settings"> | |
| 62 | + <input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_ap_settings' ) ); ?>"> | |
| 63 | + <script>jQuery('.wppm-color-picker').wpColorPicker();</script> | |
| 64 | + <style> | |
| 65 | + .wppm-ap-table td {padding: 5px;} | |
| 66 | + .wppm-ap-table table, .wppm-ap-table td {border: 1px solid #c3c3c3;} | |
| 67 | + </style> | |
| 68 | +</form> | |
| 69 | +<div class="setting-footer-actions"> | |
| 70 | + <button | |
| 71 | + class="wppm-submit-btn" | |
| 72 | + onclick="wppm_set_ap_settings();" style="background-color:<?php echo esc_attr($wppm_ap_settings['save-changes-button-bg-color'])?>!important;color:<?php echo esc_attr($wppm_ap_settings['save-changes-button-text-color'])?>!important;"> | |
| 73 | + <?php esc_attr_e( 'Save Changes', 'taskbuilder' ); ?></button> | |
| 74 | + <button | |
| 75 | + class="wppm_reset_btn" id="wppm_reset_ap_settings_btn" | |
| 76 | + onclick="wppm_reset_ap_settings();"> | |
| 77 | + <?php esc_attr_e( 'Reset default', 'taskbuilder' ); ?></button> | |
| 78 | + <input type="hidden" name="wppm_reset_ap_settings_nonce" id="wppm_reset_ap_settings_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_reset_ap_settings' ) ); ?>"> | |
| 79 | + <span class="wppm_submit_wait" style="display:none;"><img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/loading_buffer.svg'); ?>" alt="edit"></span> | |
| 80 | +</div> | |
| 81 | +<?php | |
| 82 | 82 | wp_die(); |