← All changes
|
admin/partials/settings/chart-builder-settings.php
+24
-22
3.1.4
→
3.8.1
View file →
| @@ -42,12 +42,12 @@ | ||
| 42 | 42 | </a> |
| 43 | 43 | </div> |
| 44 | 44 | </div> |
| 45 | 45 | <form method="post" id="ays-settings-form"> |
| 46 | - <input type="hidden" name="ays_tab" value="<?php echo $ays_tab; ?>"> | |
| 46 | + <input type="hidden" name="ays_tab" value="<?php echo esc_attr($ays_tab); ?>"> | |
| 47 | 47 | <h1 class="wp-heading-inline"> |
| 48 | 48 | <?php |
| 49 | - echo __('General Settings',$this->plugin_name); | |
| 49 | + echo esc_html__('General Settings','chart-builder'); | |
| 50 | 50 | ?> |
| 51 | 51 | </h1> |
| 52 | 52 | <hr /> |
| 53 | 53 | <div class="ays-settings-wrapper ays-chart-general-settings"> |
| @@ -53,23 +53,23 @@ | ||
| 53 | 53 | <div class="ays-settings-wrapper ays-chart-general-settings"> |
| 54 | 54 | <div> |
| 55 | 55 | <div class="nav-tab-wrapper" style="position:sticky; top:35px;"> |
| 56 | 56 | <a href="#tab1" data-tab="tab1" class="nav-tab <?php echo ($ays_tab == 'tab1') ? 'nav-tab-active' : ''; ?>"> |
| 57 | - <?php echo __("General", $this->plugin_name);?> | |
| 57 | + <?php echo esc_html__("General", 'chart-builder');?> | |
| 58 | 58 | </a> |
| 59 | 59 | <a href="#tab2" data-tab="tab2" class="nav-tab <?php echo ($ays_tab == 'tab2') ? 'nav-tab-active' : ''; ?>"> |
| 60 | - <?php echo __("Integrations", $this->plugin_name);?> | |
| 60 | + <?php echo esc_html__("Integrations", 'chart-builder');?> | |
| 61 | 61 | </a> |
| 62 | 62 | </div> |
| 63 | 63 | </div> |
| 64 | 64 | <div class="ays-chart-tabs-wrapper"> |
| 65 | 65 | <div id="tab1" class="ays-chart-tab-content ays-tab-content <?php echo ($ays_tab == 'tab1') ? 'ays-tab-content-active' : ''; ?>"> |
| 66 | - <p class="ays-subtitle"><?php echo __('General Settings',$this->plugin_name)?></p> | |
| 66 | + <p class="ays-subtitle"><?php echo esc_html__('General Settings','chart-builder')?></p> | |
| 67 | 67 | <hr /> |
| 68 | 68 | <fieldset> |
| 69 | 69 | <legend> |
| 70 | 70 | <strong style="font-size:30px;"><i class="ays_fa ays_fa_globe"></i></strong> |
| 71 | - <h5><?php echo __('Who will have permission to Chart Builder',$this->plugin_name)?></h5> | |
| 71 | + <h5><?php echo esc_html__('Who will have permission to Chart Builder','chart-builder')?></h5> | |
| 72 | 72 | </legend> |
| 73 | 73 | <div class="form-group row" style="margin:0px;"> |
| 74 | 74 | <div class="ays-pro-features-v2-main-box"> |
| 75 | 75 | <div class="ays-pro-features-v2-small-buttons-box"> |
| @@ -76,9 +76,9 @@ | ||
| 76 | 76 | <div class="ays-pro-features-v2-video-button"></div> |
| 77 | 77 | <a href="https://ays-pro.com/wordpress/chart-builder" target="_blank" class="ays-pro-features-v2-upgrade-button"> |
| 78 | 78 | <div class="ays-pro-features-v2-upgrade-icon" style="background-image: url('<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Locked_24x24.svg');" data-img-src="<?php echo esc_attr(CHART_BUILDER_ADMIN_URL); ?>/images/icons/pro-features-icons/Locked_24x24.svg"></div> |
| 79 | 79 | <div class="ays-pro-features-v2-upgrade-text"> |
| 80 | - <?php echo __("Upgrade" , "chart-builder"); ?> | |
| 80 | + <?php echo esc_html__("Upgrade" , "chart-builder"); ?> | |
| 81 | 81 | </div> |
| 82 | 82 | </a> |
| 83 | 83 | </div> |
| 84 | 84 | <div class="form-group row"> |
| @@ -84,10 +84,10 @@ | ||
| 84 | 84 | <div class="form-group row"> |
| 85 | 85 | <div class="form-group row"> |
| 86 | 86 | <div class="col-sm-4"> |
| 87 | 87 | <label for="ays_user_roles"> |
| 88 | - <?php echo __( "Select user role for giving access to Chart Builder menu", $this->plugin_name ); ?> | |
| 89 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo __("Give access to the Chart Builder plugin to only the selected user role(s) on your WP dashboard. Each selected user will see only his/her created charts.",$this->plugin_name)?>"> | |
| 88 | + <?php echo esc_html__( "Select user role for giving access to Chart Builder menu", 'chart-builder' ); ?> | |
| 89 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr(__("Give access to the Chart Builder plugin to only the selected user role(s) on your WP dashboard. Each selected user will see only his/her created charts.",'chart-builder'))?>"> | |
| 90 | 90 | <i class="ays_fa ays_fa_info_circle"></i> |
| 91 | 91 | </a> |
| 92 | 92 | </label> |
| 93 | 93 | </div> |
| @@ -95,9 +95,9 @@ | ||
| 95 | 95 | <select name="ays_user_roles[]" id="ays_user_roles" multiple> |
| 96 | 96 | <?php |
| 97 | 97 | foreach($ays_users_roles as $role => $role_name){ |
| 98 | 98 | $selected = in_array($role, $user_roles) ? 'selected' : ''; |
| 99 | - echo "<option ".$selected." value='".$role."'>".$role_name."</option>"; | |
| 99 | + echo "<option ". esc_html($selected) ." value='".esc_attr($role)."'>".esc_attr($role_name)."</option>"; | |
| 100 | 100 | } |
| 101 | 101 | ?> |
| 102 | 102 | </select> |
| 103 | 103 | </div> |
| @@ -105,10 +105,10 @@ | ||
| 105 | 105 | <hr style="opacity:.25;margin:1rem 0;"> |
| 106 | 106 | <div class="form-group row"> |
| 107 | 107 | <div class="col-sm-4"> |
| 108 | 108 | <label for="ays_user_roles_to_change_plugin"> |
| 109 | - <?php echo __( "Select user role for giving access to change all chart data", $this->plugin_name ); ?> | |
| 110 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo __('Give permissions to manage all charts and submissions to these user roles. Please add the given user roles to the above field as well.',$this->plugin_name)?>"> | |
| 109 | + <?php echo esc_html__( "Select user role for giving access to change all chart data", 'chart-builder' ); ?> | |
| 110 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr(__('Give permissions to manage all charts and submissions to these user roles. Please add the given user roles to the above field as well.','chart-builder'))?>"> | |
| 111 | 111 | <i class="ays_fa ays_fa_info_circle"></i> |
| 112 | 112 | </a> |
| 113 | 113 | </label> |
| 114 | 114 | </div> |
| @@ -116,9 +116,9 @@ | ||
| 116 | 116 | <select name="ays_user_roles_to_change_plugin[]" id="ays_user_roles_to_change_plugin" multiple> |
| 117 | 117 | <?php |
| 118 | 118 | foreach($ays_users_roles as $role => $role_name){ |
| 119 | 119 | $selected = in_array($role, $user_roles_to_change_plugin) ? 'selected' : ''; |
| 120 | - echo "<option ".$selected." value='".$role."'>".$role_name."</option>"; | |
| 120 | + echo "<option ". esc_html($selected) ." value='".esc_attr($role)."'>".esc_attr($role_name)."</option>"; | |
| 121 | 121 | } |
| 122 | 122 | ?> |
| 123 | 123 | </select> |
| 124 | 124 | </div> |
| @@ -125,11 +125,11 @@ | ||
| 125 | 125 | </div> |
| 126 | 126 | </div> |
| 127 | 127 | <br> |
| 128 | 128 | <blockquote> |
| 129 | - <?php echo __( "Control the access of the plugin from the dashboard and manage the capabilities of those user roles.", $this->plugin_name ); ?> | |
| 129 | + <?php echo esc_html__( "Control the access of the plugin from the dashboard and manage the capabilities of those user roles.", 'chart-builder' ); ?> | |
| 130 | 130 | <br> |
| 131 | - <?php echo __( "If you want to give a full control to the given user role, please add the role in both fields.", $this->plugin_name ); ?> | |
| 131 | + <?php echo esc_html__( "If you want to give a full control to the given user role, please add the role in both fields.", 'chart-builder'); ?> | |
| 132 | 132 | </blockquote> |
| 133 | 133 | </div> |
| 134 | 134 | </div> |
| 135 | 135 | </fieldset> |
| @@ -136,27 +136,27 @@ | ||
| 136 | 136 | <hr> |
| 137 | 137 | <fieldset> |
| 138 | 138 | <legend> |
| 139 | 139 | <strong style="font-size:30px;"><i class="ays_fa ays_fa_text"></i></strong> |
| 140 | - <h5><?php echo __('Except words count in list table',$this->plugin_name)?></h5> | |
| 140 | + <h5><?php echo esc_html__('Except words count in list table','chart-builder')?></h5> | |
| 141 | 141 | </legend> |
| 142 | 142 | <div class="form-group row"> |
| 143 | 143 | <div class="col-sm-4"> |
| 144 | 144 | <label for="ays_chart_title_length"> |
| 145 | - <?php echo __( "Charts list table", $this->plugin_name ); ?> | |
| 146 | - <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo __('Determine the length of the questions to be shown in the Charts List Table by putting your preferred count of words in the following field. (For example: if you put 10, you will see the first 10 words of each question in the Charts page of your dashboard.', $this->plugin_name); ?>"> | |
| 145 | + <?php echo esc_html__( "Charts list table", 'chart-builder' ); ?> | |
| 146 | + <a class="ays_help" data-bs-toggle="tooltip" title="<?php echo esc_attr(__('Determine the length of the questions to be shown in the Charts List Table by putting your preferred count of words in the following field. (For example: if you put 10, you will see the first 10 words of each question in the Charts page of your dashboard.', 'chart-builder')); ?>"> | |
| 147 | 147 | <i class="ays_fa ays_fa_info_circle"></i> |
| 148 | 148 | </a> |
| 149 | 149 | </label> |
| 150 | 150 | </div> |
| 151 | 151 | <div class="col-sm-8"> |
| 152 | - <input type="number" name="ays_chart_title_length" id="ays_chart_title_length" class="ays-text-input" value="<?php echo $chart_title_length; ?>"> | |
| 152 | + <input type="number" name="ays_chart_title_length" id="ays_chart_title_length" class="ays-text-input" value="<?php echo esc_attr($chart_title_length); ?>"> | |
| 153 | 153 | </div> |
| 154 | 154 | </div> |
| 155 | 155 | </fieldset> <!-- Excerpt words count in list table --> |
| 156 | 156 | </div> |
| 157 | 157 | <div id="tab2" class="ays-chart-tab-content ays-tab-content <?php echo ($ays_tab == 'tab2') ? 'ays-tab-content-active' : ''; ?>"> |
| 158 | - <p class="ays-subtitle"><?php echo __('Integrations',$this->plugin_name)?></p> | |
| 158 | + <p class="ays-subtitle"><?php echo esc_html__('Integrations','chart-builder')?></p> | |
| 159 | 159 | <hr /> |
| 160 | 160 | <?php |
| 161 | 161 | do_action( 'ays_cb_settings_page_integrations' ); |
| 162 | 162 | ?> |
| @@ -167,10 +167,12 @@ | ||
| 167 | 167 | <div style="position:sticky;padding:15px 0px;bottom:0;"> |
| 168 | 168 | <?php |
| 169 | 169 | wp_nonce_field('settings_action', 'settings_action'); |
| 170 | 170 | $other_attributes = array(); |
| 171 | - submit_button(__('Save changes', $this->plugin_name), 'primary ays-chart-loader-banner ays-chart-gen-settings-save', 'ays_submit', true, $other_attributes); | |
| 172 | - echo $loader_iamge; | |
| 171 | + submit_button(esc_html__('Save changes', 'chart-builder'), 'primary ays-chart-loader-banner ays-chart-gen-settings-save', 'ays_submit', true, $other_attributes); | |
| 172 | + $loader_sanitize_properties = Chart_Builder_Admin::get_allowed_tags_for_loader(); | |
| 173 | + $sanitized_loader_iamge = wp_kses($loader_iamge, $loader_sanitize_properties); | |
| 174 | + echo wp_kses_post($sanitized_loader_iamge); | |
| 173 | 175 | ?> |
| 174 | 176 | </div> |
| 175 | 177 | </form> |
| 176 | 178 | </div> |