| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
exit; // Exit if accessed directly |
| 4 |
} |
| 5 |
|
| 6 |
global $current_user, $wpdb,$wppmfunction; |
| 7 |
if (!($current_user->ID && $current_user->has_cap('manage_options') || ($current_user->ID && $current_user->has_cap('wppm_admin')))) { |
| 8 |
exit; |
| 9 |
} |
| 10 |
$wppm_rich_text_editor = get_option('wppm_rich_text_editor'); |
| 11 |
$wppm_toolbar_actions = get_option('wppm_toolbar_actions'); |
| 12 |
$wppm_ap_settings = get_option("wppm-ap-settings"); |
| 13 |
?> |
| 14 |
<form id="wppm_frm_rich_text_editor_settings" method="post" action="javascript:wppm_set_rich_text_editor_settings();"> |
| 15 |
<div class="wppm-help-container"> |
| 16 |
<a href="https://taskbuilder.net/docs-category/settings/" target="_blank"><?php echo esc_attr__( 'Click here', 'taskbuilder' )?></a> <?php echo esc_attr__( 'to see the documentation!', 'taskbuilder' )?> |
| 17 |
</div> |
| 18 |
<span> |
| 19 |
<label><?php echo esc_html_e('Enable','taskbuilder');?></label> |
| 20 |
</span><br> |
| 21 |
<p class="help-block"><?php echo esc_html_e('Default enable/disable rich text editor .','taskbuilder');?></p> |
| 22 |
<select class="form-control" name="wppm_rich_text_editor_setting" id="wppm_rich_text_editor_setting"> |
| 23 |
<option value="1" <?php selected( $wppm_rich_text_editor, '1' ); ?>> |
| 24 |
<?php esc_html_e( 'Enable', 'taskbuilder' ); ?> |
| 25 |
</option> |
| 26 |
<option value="0" <?php selected( $wppm_rich_text_editor, '0' ); ?>> |
| 27 |
<?php esc_html_e( 'Disable', 'taskbuilder' ); ?> |
| 28 |
</option> |
| 29 |
</select> |
| 30 |
<hr> |
| 31 |
<span> |
| 32 |
<label><?php echo esc_html_e('Toolbar actions','taskbuilder');?></label> |
| 33 |
</span><br> |
| 34 |
<div class="checkboxes-group"> |
| 35 |
<?php |
| 36 |
$toolbar = $wppmfunction->wppm_toolbar_options_setting(); |
| 37 |
foreach ( $toolbar as $action ) : |
| 38 |
?> |
| 39 |
<div class="inner-group"> |
| 40 |
<?php |
| 41 |
$checked = $wppm_toolbar_actions[$action['value']] == 1 ? 'checked' : ''; |
| 42 |
?> |
| 43 |
<input name="wppm_toolbar[]" type="checkbox" <?php echo esc_attr( $checked ); ?> value="<?php echo esc_attr( $action['value'] ); ?>"> |
| 44 |
<?php echo esc_attr( $action['name'] ); ?> |
| 45 |
</div> |
| 46 |
<?php |
| 47 |
endforeach; |
| 48 |
?> |
| 49 |
</div> |
| 50 |
<hr> |
| 51 |
<button type="submit" class="wppm-submit-btn" 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;"><?php echo esc_html_e('Save Changes','taskbuilder');?></button> |
| 52 |
<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> |
| 53 |
<input type="hidden" name="action" value="wppm_set_rich_text_editor_settings" /> |
| 54 |
<input type="hidden" name="_ajax_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wppm_set_rich_text_editor_settings' ) ); ?>"> |
| 55 |
</form> |