| @@ -1,132 +1,104 @@ | ||
| 1 | -<?php | |
| 2 | -if ( ! defined( 'ABSPATH' ) ) { | |
| 3 | - exit; // Exit if accessed directly | |
| 4 | -} | |
| 5 | -global $wpdb, $wppmfunction,$current_user; | |
| 6 | -$popup_settings = get_option("wppm-ap-modal"); | |
| 7 | -$wppm_ap_settings = get_option("wppm-ap-settings"); | |
| 8 | -if (!($current_user->ID && $current_user->has_cap('wppm_admin') || $current_user->has_cap('manage_options'))) { | |
| 9 | - exit; | |
| 10 | -} | |
| 11 | -?> | |
| 12 | -<div class="wppm_bootstrap"> | |
| 13 | - <span class="wppm-heading-inline wppm_email_notification_header"> | |
| 14 | - <?php echo esc_html_e('Settings','taskbuilder');?> | |
| 15 | - </span> | |
| 16 | - <div class="wppm_padding_space"></div> | |
| 17 | - <div class="row"> | |
| 18 | - <div class="col-sm-4 wppm_setting_col1"> | |
| 19 | - <ul class="nav nav-pills nav-stacked wppm_setting_pills"> | |
| 20 | - <li id="wppm_settings_general" role="presentation" class="active"><a href="javascript:wppm_get_general_settings();"><?php echo esc_html_e('General','taskbuilder');?></a></li> | |
| 21 | - <li id="wppm_settings_page" role="presentation" class="active"><a href="javascript:wppm_get_page_settings();"><?php echo esc_html_e('Page Setting','taskbuilder');?></a></li> | |
| 22 | - <li id="wppm_settings_category" role="presentation"><a href="javascript:wppm_get_category_settings();"><?php echo esc_html_e('Project Categories','taskbuilder');?></a></li> | |
| 23 | - <li id="wppm_settings_proj_status" role="presentation"><a href="javascript:wppm_get_proj_status_settings();"><?php echo esc_html_e('Project Statuses','taskbuilder');?></a></li> | |
| 24 | - <li id="wppm_settings_task_priorities" role="presentation"><a href="javascript:wppm_get_task_prioriy_settings();"><?php echo esc_html_e('Tasks Priorities','taskbuilder');?></a></li> | |
| 25 | - <li id="wppm_settings_task_status" role="presentation"><a href="javascript:wppm_get_task_status_settings();"><?php echo esc_html_e('Task Statuses','taskbuilder');?></a></li> | |
| 26 | - <li id="wppm_settings_miscellaneous" role="presentation"><a href="javascript:wppm_get_miscellaneous_settings();"><?php echo esc_html_e('Miscellaneous','taskbuilder');?></a></li> | |
| 27 | - <li id="wppm_settings_appearance" role="presentation"><a href="javascript:wppm_get_appearance_settings();"><?php echo esc_html_e('Appearance','taskbuilder');?></a></li> | |
| 28 | - <li id="wppm_settings_coworker" role="presentation"><a href="javascript:wppm_get_coworker_permission_settings();"><?php echo esc_html_e('Co-workers Permission','taskbuilder');?></a></li> | |
| 29 | - <li id="wppm_settings_rich_text_editor" role="presentation"><a href="javascript:wppm_get_rich_text_editor_settings();"><?php echo esc_html_e('Rich Text Editor','taskbuilder');?></a></li> | |
| 30 | - <li id="wppm_settings_print_task" role="presentation"><a href="javascript:wppm_get_print_task_settings();"><?php echo esc_html_e('Print Task','taskbuilder');?></a></li> | |
| 31 | - <?php $overdue_notifier_active = class_exists('WPPM_OVERDUE_NOTIFIER'); | |
| 32 | - if(!$overdue_notifier_active){ ?> | |
| 33 | - <li id="wppm_settings_overdue_notifier" role="presentation"><a href="javascript:wppm_get_overdue_notifier_settings();"><?php echo esc_html_e('Overdue Notifier','taskbuilder');?></a></li> | |
| 34 | - <?php } ?> | |
| 35 | - <?php $recurring_notifier_active = class_exists('WPPM_Recurrent_Task'); | |
| 36 | - if(!$recurring_notifier_active){ ?> | |
| 37 | - <li id="wppm_settings_recurring_notifier" role="presentation"><a href="javascript:wppm_get_recurring_notifier_settings();"><?php echo esc_html_e('Recurring Notifier','taskbuilder');?></a></li> | |
| 38 | - <?php } ?> | |
| 39 | - <?php $due_date_reminder_active = class_exists('WPPM_DUE_DATE_REMINDER'); | |
| 40 | - if(!$due_date_reminder_active){ ?> | |
| 41 | - <li id="wppm_settings_due_date_reminder" role="presentation"><a href="javascript:wppm_get_due_date_reminder_settings();"><?php echo esc_html_e('Due Date Reminder','taskbuilder');?></a></li> | |
| 42 | - <?php } ?> | |
| 43 | - <?php $email_piping_active = class_exists('WPPM_EMAIL_PIPING'); | |
| 44 | - if(!$email_piping_active){ ?> | |
| 45 | - <li id="wppm_settings_email_piping" role="presentation"><a href="javascript:wppm_get_email_piping_settings();"><?php echo esc_html_e('Email Piping','taskbuilder');?></a></li> | |
| 46 | - <?php } ?> | |
| 47 | - <?php $buddypress_active = class_exists('WPPM_Buddypress_Integration'); | |
| 48 | - include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); | |
| 49 | - if ( ! is_plugin_active( 'taskbuilder-buddypress-integration/taskbuilder-buddypress-integration.php' ) ) { | |
| 50 | - ?> | |
| 51 | - <li id="wppm_settings_buddypress" role="presentation"><a href="javascript:wppm_get_buddypress_integration_settings();"><?php echo esc_html_e('Buddypress Integration','taskbuilder');?></a></li> | |
| 52 | - <?php } ?> | |
| 53 | - <?php | |
| 54 | - if ( ! is_plugin_active( 'taskbuilder-woocommerce-integration/taskbuilder-woocommerce-integration.php' ) ) { | |
| 55 | - ?> | |
| 56 | - <li id="wppm_settings_woocommerce" role="presentation"><a href="javascript:wppm_get_woocommerce_integration_settings();"><?php echo esc_html_e('WooCommerce Integration','taskbuilder');?></a></li> | |
| 57 | - <?php } ?> | |
| 58 | - <?php do_action('wppm_after_setting_pills');?> | |
| 59 | - </ul> | |
| 60 | - </div> | |
| 61 | - <div class="col-sm-8 wppm_setting_col2"></div> | |
| 62 | - <div id="wppm_alert_success" class="alert alert-success wppm_alert" style="display:none;" role="alert"> | |
| 63 | - <img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/success.svg'); ?>" alt="success"> | |
| 64 | - <span class="wppm_alert_text"></span> | |
| 65 | - </div> | |
| 66 | - <div id="wppm_alert_error" class="alert alert-danger wppm_alert" style="display:none;" role="alert"> | |
| 67 | - <img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/warning-triangle.svg'); ?>" alt="warning-triangle"><span class="wppm_alert_text"></span> | |
| 68 | - </div> | |
| 69 | - </div> | |
| 70 | - | |
| 71 | -</div> | |
| 72 | -<!-- Pop-up snippet start --> | |
| 73 | -<div id="wppm_popup_background" style="display:none;"></div> | |
| 74 | -<div id="wppm_popup_container" style="display:none;"> | |
| 75 | - <div class="wppm_bootstrap"> | |
| 76 | - <div class="row"> | |
| 77 | - <div id="wppm_popup" class="col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3"> | |
| 78 | - <div id="wppm_popup_title" class="row"><h3><?php echo esc_html_e('Modal Title','taskbuilder');?></h3></div> | |
| 79 | - <div id="wppm_popup_body" class="row"><?php echo esc_html_e('I am body!','taskbuilder');?></div> | |
| 80 | - <div id="wppm_popup_footer" class="row"> | |
| 81 | - <button type="button" class="btn wppm_popup_close"><?php echo esc_html_e('Close','taskbuilder');?></button> | |
| 82 | - <button type="button" class="btn wppm_popup_action"><?php echo esc_html_e('Save Changes','taskbuilder');?></button> | |
| 83 | - </div> | |
| 84 | - </div> | |
| 85 | - </div> | |
| 86 | - </div> | |
| 87 | -</div> | |
| 88 | -<style> | |
| 89 | - #wppm_popup_title{ | |
| 90 | - background-color: <?php echo esc_attr($popup_settings['header-bg-color'])?>; | |
| 91 | - } | |
| 92 | - #wppm_popup_title h3{ | |
| 93 | - color:<?php echo esc_attr( $popup_settings['header-text-color'])?>; | |
| 94 | - } | |
| 95 | - #wppm_popup_body{ | |
| 96 | - background-color: <?php echo esc_attr($popup_settings['body-bg-color'])?>!important; | |
| 97 | - } | |
| 98 | - #wppm_popup_body label{ | |
| 99 | - color:<?php echo esc_attr( $popup_settings['body-label-color'])?>; | |
| 100 | - } | |
| 101 | - #wppm_popup_body input{ | |
| 102 | - color:<?php echo esc_attr( $popup_settings['body-text-color'])?>; | |
| 103 | - } | |
| 104 | - #wppm_popup_body select{ | |
| 105 | - color:<?php echo esc_attr( $popup_settings['body-text-color'])?>; | |
| 106 | - } | |
| 107 | - #wppm_popup_body span { | |
| 108 | - color:<?php echo esc_attr( $popup_settings['body-text-color'])?>; | |
| 109 | - } | |
| 110 | - #wppm_popup_body .select2-results__options { | |
| 111 | - color:<?php echo esc_attr( $popup_settings['body-text-color'])?>; | |
| 112 | - } | |
| 113 | - #wppm_popup_footer{ | |
| 114 | - background-color: <?php echo esc_attr($popup_settings['footer-bg-color'])?>!important; | |
| 115 | - } | |
| 116 | - .wppm_popup_action{ | |
| 117 | - background-color: <?php echo esc_attr($popup_settings['action-btn-bg-color'])?>!important; | |
| 118 | - color:<?php echo esc_attr( $popup_settings['action-btn-text-color'])?>!important; | |
| 119 | - } | |
| 120 | - .wppm_bootstrap .nav-pills > li.active > a, | |
| 121 | - .wppm_bootstrap .nav-pills > li.active > a:hover, | |
| 122 | - .wppm_bootstrap .nav-pills > li.active > a:focus { | |
| 123 | - color: <?php echo esc_attr( $wppm_ap_settings['tab-text-color'])?>!important; | |
| 124 | - background-color:<?php echo esc_attr($wppm_ap_settings['tab-background-color'])?>!important; | |
| 125 | - } | |
| 126 | -</style> | |
| 127 | -<!-- Pop-up snippet end --> | |
| 128 | -<script> | |
| 129 | - jQuery(document).ready(function(){ | |
| 130 | - wppm_get_general_settings(); | |
| 131 | - }); | |
| 1 | +<?php | |
| 2 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 3 | + exit; // Exit if accessed directly | |
| 4 | +} | |
| 5 | +global $wpdb, $wppmfunction,$current_user; | |
| 6 | +$popup_settings = get_option("wppm-ap-modal"); | |
| 7 | +$wppm_ap_settings = get_option("wppm-ap-settings"); | |
| 8 | +if (!($current_user->ID && $current_user->has_cap('wppm_admin') || $current_user->has_cap('manage_options'))) { | |
| 9 | + exit; | |
| 10 | +} | |
| 11 | +?> | |
| 12 | +<div class="wppm_bootstrap"> | |
| 13 | + <span class="wppm-heading-inline wppm_email_notification_header"> | |
| 14 | + <?php echo esc_html_e('Settings','taskbuilder');?> | |
| 15 | + </span> | |
| 16 | + <div class="wppm_padding_space"></div> | |
| 17 | + <div class="row"> | |
| 18 | + <div class="col-sm-4 wppm_setting_col1"> | |
| 19 | + <ul class="nav nav-pills nav-stacked wppm_setting_pills"> | |
| 20 | + <li id="wppm_settings_general" role="presentation" class="active"><a href="javascript:wppm_get_general_settings();"><?php echo esc_html_e('General','taskbuilder');?></a></li> | |
| 21 | + <li id="wppm_settings_page" role="presentation" class="active"><a href="javascript:wppm_get_page_settings();"><?php echo esc_html_e('Page Setting','taskbuilder');?></a></li> | |
| 22 | + <li id="wppm_settings_category" role="presentation"><a href="javascript:wppm_get_category_settings();"><?php echo esc_html_e('Project Categories','taskbuilder');?></a></li> | |
| 23 | + <li id="wppm_settings_proj_status" role="presentation"><a href="javascript:wppm_get_proj_status_settings();"><?php echo esc_html_e('Project Statuses','taskbuilder');?></a></li> | |
| 24 | + <li id="wppm_settings_task_priorities" role="presentation"><a href="javascript:wppm_get_task_prioriy_settings();"><?php echo esc_html_e('Tasks Priorities','taskbuilder');?></a></li> | |
| 25 | + <li id="wppm_settings_task_status" role="presentation"><a href="javascript:wppm_get_task_status_settings();"><?php echo esc_html_e('Task Statuses','taskbuilder');?></a></li> | |
| 26 | + <li id="wppm_settings_miscellaneous" role="presentation"><a href="javascript:wppm_get_miscellaneous_settings();"><?php echo esc_html_e('Miscellaneous','taskbuilder');?></a></li> | |
| 27 | + <li id="wppm_settings_appearance" role="presentation"><a href="javascript:wppm_get_appearance_settings();"><?php echo esc_html_e('Appearance','taskbuilder');?></a></li> | |
| 28 | + <li id="wppm_settings_coworker" role="presentation"><a href="javascript:wppm_get_coworker_permission_settings();"><?php echo esc_html_e('Co-workers Permission','taskbuilder');?></a></li> | |
| 29 | + <li id="wppm_settings_rich_text_editor" role="presentation"><a href="javascript:wppm_get_rich_text_editor_settings();"><?php echo esc_html_e('Rich Text Editor','taskbuilder');?></a></li> | |
| 30 | + <?php do_action('wppm_after_setting_pills');?> | |
| 31 | + </ul> | |
| 32 | + </div> | |
| 33 | + <div class="col-sm-8 wppm_setting_col2"></div> | |
| 34 | + <div id="wppm_alert_success" class="alert alert-success wppm_alert" style="display:none;" role="alert"> | |
| 35 | + <img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/success.svg'); ?>" alt="success"> | |
| 36 | + <span class="wppm_alert_text"></span> | |
| 37 | + </div> | |
| 38 | + <div id="wppm_alert_error" class="alert alert-danger wppm_alert" style="display:none;" role="alert"> | |
| 39 | + <img src="<?php echo esc_url( WPPM_PLUGIN_URL . 'asset/images/warning-triangle.svg'); ?>" alt="warning-triangle"><span class="wppm_alert_text"></span> | |
| 40 | + </div> | |
| 41 | + </div> | |
| 42 | + | |
| 43 | +</div> | |
| 44 | +<!-- Pop-up snippet start --> | |
| 45 | +<div id="wppm_popup_background" style="display:none;"></div> | |
| 46 | +<div id="wppm_popup_container" style="display:none;"> | |
| 47 | + <div class="wppm_bootstrap"> | |
| 48 | + <div class="row"> | |
| 49 | + <div id="wppm_popup" class="col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3"> | |
| 50 | + <div id="wppm_popup_title" class="row"><h3><?php echo esc_html_e('Modal Title','taskbuilder');?></h3></div> | |
| 51 | + <div id="wppm_popup_body" class="row"><?php echo esc_html_e('I am body!','taskbuilder');?></div> | |
| 52 | + <div id="wppm_popup_footer" class="row"> | |
| 53 | + <button type="button" class="btn wppm_popup_close"><?php echo esc_html_e('Close','taskbuilder');?></button> | |
| 54 | + <button type="button" class="btn wppm_popup_action"><?php echo esc_html_e('Save Changes','taskbuilder');?></button> | |
| 55 | + </div> | |
| 56 | + </div> | |
| 57 | + </div> | |
| 58 | + </div> | |
| 59 | +</div> | |
| 60 | +<style> | |
| 61 | + #wppm_popup_title{ | |
| 62 | + background-color: <?php echo esc_attr($popup_settings['header-bg-color'])?>; | |
| 63 | + } | |
| 64 | + #wppm_popup_title h3{ | |
| 65 | + color:<?php echo esc_attr( $popup_settings['header-text-color'])?>; | |
| 66 | + } | |
| 67 | + #wppm_popup_body{ | |
| 68 | + background-color: <?php echo esc_attr($popup_settings['body-bg-color'])?>!important; | |
| 69 | + } | |
| 70 | + #wppm_popup_body label{ | |
| 71 | + color:<?php echo esc_attr( $popup_settings['body-label-color'])?>; | |
| 72 | + } | |
| 73 | + #wppm_popup_body input{ | |
| 74 | + color:<?php echo esc_attr( $popup_settings['body-text-color'])?>; | |
| 75 | + } | |
| 76 | + #wppm_popup_body select{ | |
| 77 | + color:<?php echo esc_attr( $popup_settings['body-text-color'])?>; | |
| 78 | + } | |
| 79 | + #wppm_popup_body span { | |
| 80 | + color:<?php echo esc_attr( $popup_settings['body-text-color'])?>; | |
| 81 | + } | |
| 82 | + #wppm_popup_body .select2-results__options { | |
| 83 | + color:<?php echo esc_attr( $popup_settings['body-text-color'])?>; | |
| 84 | + } | |
| 85 | + #wppm_popup_footer{ | |
| 86 | + background-color: <?php echo esc_attr($popup_settings['footer-bg-color'])?>!important; | |
| 87 | + } | |
| 88 | + .wppm_popup_action{ | |
| 89 | + background-color: <?php echo esc_attr($popup_settings['action-btn-bg-color'])?>!important; | |
| 90 | + color:<?php echo esc_attr( $popup_settings['action-btn-text-color'])?>!important; | |
| 91 | + } | |
| 92 | + .wppm_bootstrap .nav-pills > li.active > a, | |
| 93 | + .wppm_bootstrap .nav-pills > li.active > a:hover, | |
| 94 | + .wppm_bootstrap .nav-pills > li.active > a:focus { | |
| 95 | + color: <?php echo esc_attr( $wppm_ap_settings['tab-text-color'])?>!important; | |
| 96 | + background-color:<?php echo esc_attr($wppm_ap_settings['tab-background-color'])?>!important; | |
| 97 | + } | |
| 98 | +</style> | |
| 99 | +<!-- Pop-up snippet end --> | |
| 100 | +<script> | |
| 101 | + jQuery(document).ready(function(){ | |
| 102 | + wppm_get_general_settings(); | |
| 103 | + }); | |
| 132 | 104 | </script> |