← All changes
|
WPDataAccess/Settings/WPDA_Settings_Legacy_Plugin.php
+27
-27
5.5.76
→
5.5.85
View file →
| @@ -15,9 +15,9 @@ | ||
| 15 | 15 | // Security check. |
| 16 | 16 | $wp_nonce = ( isset( $_REQUEST['_wpnonce'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['_wpnonce'] ) ) : '' ); |
| 17 | 17 | // input var okay. |
| 18 | 18 | if ( !wp_verify_nonce( $wp_nonce, 'wpda-plugin-settings-' . WPDA::get_current_user_login() ) ) { |
| 19 | - wp_die( __( 'ERROR: Not authorized', 'wp-data-access' ) ); | |
| 19 | + wp_die( esc_attr__( 'ERROR: Not authorized', 'wp-data-access' ) ); | |
| 20 | 20 | } |
| 21 | 21 | if ( 'save' === $action ) { |
| 22 | 22 | WPDA::set_option( WPDA::OPTION_PLUGIN_WPDATAACCESS_POST, ( isset( $_REQUEST['wpdataaccess_post'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['wpdataaccess_post'] ) ) : 'off' ) ); |
| 23 | 23 | WPDA::set_option( WPDA::OPTION_PLUGIN_WPDATAACCESS_PAGE, ( isset( $_REQUEST['wpdataaccess_page'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['wpdataaccess_page'] ) ) : 'off' ) ); |
| @@ -153,9 +153,9 @@ | ||
| 153 | 153 | ?>&tab=legacy&vtab=plugin"> |
| 154 | 154 | <table class="wpda-table-settings" id="wpda_table_plugin"> |
| 155 | 155 | <tr style="border-top: 1px solid #ccc"> |
| 156 | 156 | <th><?php |
| 157 | - echo __( 'Shortcode [wpdataaccess]' ); | |
| 157 | + esc_html_e( 'Shortcode [wpdataaccess]', 'wp-data-access' ); | |
| 158 | 158 | ?></th> |
| 159 | 159 | <td> |
| 160 | 160 | <label> |
| 161 | 161 | <input type="checkbox" name="wpdataaccess_post" <?php |
| @@ -173,9 +173,9 @@ | ||
| 173 | 173 | </td> |
| 174 | 174 | </tr> |
| 175 | 175 | <tr> |
| 176 | 176 | <th><?php |
| 177 | - echo __( 'Shortcode [wpdadiehard]' ); | |
| 177 | + esc_html_e( 'Shortcode [wpdadiehard]', 'wp-data-access' ); | |
| 178 | 178 | ?></th> |
| 179 | 179 | <td> |
| 180 | 180 | <label> |
| 181 | 181 | <input type="checkbox" name="wpdadiehard_post" <?php |
| @@ -195,13 +195,13 @@ | ||
| 195 | 195 | <?php |
| 196 | 196 | ?> |
| 197 | 197 | <tr> |
| 198 | 198 | <th><?php |
| 199 | - echo __( 'Date format' ); | |
| 199 | + esc_html_e( 'Date format', 'wp-data-access' ); | |
| 200 | 200 | ?></th> |
| 201 | 201 | <td> |
| 202 | 202 | <span class="settings_label"><?php |
| 203 | - echo __( 'Output', 'wp-data-access' ); | |
| 203 | + esc_html_e( 'Output', 'wp-data-access' ); | |
| 204 | 204 | ?></span> |
| 205 | 205 | <input type="text" value="<?php |
| 206 | 206 | echo esc_attr( get_option( 'date_format' ) ); |
| 207 | 207 | ?>" class="item_width" |
| @@ -206,14 +206,14 @@ | ||
| 206 | 206 | echo esc_attr( get_option( 'date_format' ) ); |
| 207 | 207 | ?>" class="item_width" |
| 208 | 208 | readonly/> |
| 209 | 209 | <?php |
| 210 | - echo __( '(WordPress format)', 'wp-data-access' ); | |
| 210 | + esc_html_e( '(WordPress format)', 'wp-data-access' ); | |
| 211 | 211 | ?> |
| 212 | 212 | <br/> |
| 213 | 213 | <span class="settings_line"> |
| 214 | 214 | <span class="settings_label"><?php |
| 215 | - echo __( 'Input', 'wp-data-access' ); | |
| 215 | + esc_html_e( 'Input', 'wp-data-access' ); | |
| 216 | 216 | ?></span> |
| 217 | 217 | <label class="item_label"> |
| 218 | 218 | <input type="radio" name="radio_date_format" class="radio_date_format" |
| 219 | 219 | value="Y-m-d" <?php |
| @@ -227,9 +227,9 @@ | ||
| 227 | 227 | </span> |
| 228 | 228 | </label> |
| 229 | 229 | </span> |
| 230 | 230 | <?php |
| 231 | - echo __( '(JavaScript format)', 'wp-data-access' ); | |
| 231 | + esc_html_e( '(JavaScript format)', 'wp-data-access' ); | |
| 232 | 232 | ?> |
| 233 | 233 | <br/> |
| 234 | 234 | <span class="settings_line"> |
| 235 | 235 | <span class="settings_label"></span> |
| @@ -270,9 +270,9 @@ | ||
| 270 | 270 | value="custom" <?php |
| 271 | 271 | echo ( 'Y-m-d' !== $date_format && 'd/m/Y' !== $date_format && 'm/d/Y' !== $date_format ? 'checked="checked"' : '' ); |
| 272 | 272 | ?>/> |
| 273 | 273 | <span class="item_label_text"><?php |
| 274 | - echo __( 'Custom:', 'wp-data-access' ); | |
| 274 | + esc_html_e( 'Custom:', 'wp-data-access' ); | |
| 275 | 275 | ?></span> |
| 276 | 276 | <span class="item_label_align"> |
| 277 | 277 | <input class="item_label_format" type="text" name="date_format" id="date_format" |
| 278 | 278 | value="<?php |
| @@ -282,9 +282,9 @@ | ||
| 282 | 282 | </label> |
| 283 | 283 | </span> |
| 284 | 284 | <br/> |
| 285 | 285 | <span class="settings_label"><?php |
| 286 | - echo __( 'Placeholder', 'wp-data-access' ); | |
| 286 | + esc_html_e( 'Placeholder', 'wp-data-access' ); | |
| 287 | 287 | ?></span> |
| 288 | 288 | <input type="text" name="date_placeholder" id="date_placeholder" |
| 289 | 289 | value="<?php |
| 290 | 290 | echo esc_attr( $date_placeholder ); |
| @@ -289,19 +289,19 @@ | ||
| 289 | 289 | value="<?php |
| 290 | 290 | echo esc_attr( $date_placeholder ); |
| 291 | 291 | ?>" class="item_width"/> |
| 292 | 292 | <?php |
| 293 | - echo __( '(user info)', 'wp-data-access' ); | |
| 293 | + esc_html_e( '(user info)', 'wp-data-access' ); | |
| 294 | 294 | ?> |
| 295 | 295 | </td> |
| 296 | 296 | </tr> |
| 297 | 297 | <tr> |
| 298 | 298 | <th><?php |
| 299 | - echo __( 'Time format' ); | |
| 299 | + esc_html_e( 'Time format', 'wp-data-access' ); | |
| 300 | 300 | ?></th> |
| 301 | 301 | <td> |
| 302 | 302 | <span class="settings_label"><?php |
| 303 | - echo __( 'Output', 'wp-data-access' ); | |
| 303 | + esc_html_e( 'Output', 'wp-data-access' ); | |
| 304 | 304 | ?></span> |
| 305 | 305 | <input type="text" value="<?php |
| 306 | 306 | echo esc_attr( get_option( 'time_format' ) ); |
| 307 | 307 | ?>" class="item_width" |
| @@ -306,14 +306,14 @@ | ||
| 306 | 306 | echo esc_attr( get_option( 'time_format' ) ); |
| 307 | 307 | ?>" class="item_width" |
| 308 | 308 | readonly/> |
| 309 | 309 | <?php |
| 310 | - echo __( '(WordPress format)', 'wp-data-access' ); | |
| 310 | + esc_html_e( '(WordPress format)', 'wp-data-access' ); | |
| 311 | 311 | ?> |
| 312 | 312 | <br/> |
| 313 | 313 | <span class="settings_line"> |
| 314 | 314 | <span class="settings_label"><?php |
| 315 | - echo __( 'Input', 'wp-data-access' ); | |
| 315 | + esc_html_e( 'Input', 'wp-data-access' ); | |
| 316 | 316 | ?></span> |
| 317 | 317 | <label class="item_label"> |
| 318 | 318 | <input type="radio" name="radio_time_format" class="radio_time_format" |
| 319 | 319 | value="H:i" <?php |
| @@ -327,9 +327,9 @@ | ||
| 327 | 327 | </span> |
| 328 | 328 | </label> |
| 329 | 329 | </span> |
| 330 | 330 | <?php |
| 331 | - echo __( '(JavaScript format)', 'wp-data-access' ); | |
| 331 | + esc_html_e( '(JavaScript format)', 'wp-data-access' ); | |
| 332 | 332 | ?> |
| 333 | 333 | <br/> |
| 334 | 334 | <span class="settings_line"> |
| 335 | 335 | <span class="settings_label"></span> |
| @@ -338,9 +338,9 @@ | ||
| 338 | 338 | value="custom" <?php |
| 339 | 339 | echo ( 'H:i' !== $time_format ? 'checked="checked"' : '' ); |
| 340 | 340 | ?>/> |
| 341 | 341 | <span class="item_label_text"><?php |
| 342 | - echo __( 'Custom:', 'wp-data-access' ); | |
| 342 | + esc_html_e( 'Custom:', 'wp-data-access' ); | |
| 343 | 343 | ?></span> |
| 344 | 344 | <span class="item_label_align"> |
| 345 | 345 | <input class="item_label_format" type="text" name="time_format" id="time_format" |
| 346 | 346 | value="<?php |
| @@ -350,9 +350,9 @@ | ||
| 350 | 350 | </label> |
| 351 | 351 | </span> |
| 352 | 352 | <br/> |
| 353 | 353 | <span class="settings_label"><?php |
| 354 | - echo __( 'Placeholder', 'wp-data-access' ); | |
| 354 | + esc_html_e( 'Placeholder', 'wp-data-access' ); | |
| 355 | 355 | ?></span> |
| 356 | 356 | <input type="text" name="time_placeholder" id="time_placeholder" |
| 357 | 357 | value="<?php |
| 358 | 358 | echo esc_attr( $time_placeholder ); |
| @@ -360,9 +360,9 @@ | ||
| 360 | 360 | </td> |
| 361 | 361 | </tr> |
| 362 | 362 | <tr> |
| 363 | 363 | <th><?php |
| 364 | - echo __( 'Date/time test' ); | |
| 364 | + esc_html_e( 'Date/time test', 'wp-data-access' ); | |
| 365 | 365 | ?></th> |
| 366 | 366 | <td> |
| 367 | 367 | <input type="button" id="init_datetime" value="Test DateTimePicker" class="button item_width"/> |
| 368 | 368 | <input type="text" class="item_width" id="test_datetime" style="display:none;" /> |
| @@ -369,13 +369,13 @@ | ||
| 369 | 369 | </td> |
| 370 | 370 | </tr> |
| 371 | 371 | <tr> |
| 372 | 372 | <th><?php |
| 373 | - echo __( 'Set format' ); | |
| 373 | + esc_html_e( 'Set format', 'wp-data-access' ); | |
| 374 | 374 | ?></th> |
| 375 | 375 | <td> |
| 376 | 376 | <span><?php |
| 377 | - echo __( 'Show columns of data type set in list table as' ); | |
| 377 | + esc_html_e( 'Show columns of data type set in list table as', 'wp-data-access' ); | |
| 378 | 378 | ?></span> |
| 379 | 379 | <select name="set_format"> |
| 380 | 380 | <option value="csv" <?php |
| 381 | 381 | echo ( 'csv' === $set_format ? 'selected' : '' ); |
| @@ -393,20 +393,20 @@ | ||
| 393 | 393 | <th><span class="dashicons dashicons-info" style="float:right;font-size:300%;"></span></th> |
| 394 | 394 | <td> |
| 395 | 395 | <span class="dashicons dashicons-yes"></span> |
| 396 | 396 | <?php |
| 397 | - echo __( 'The plugin uses your WordPress general settings to format your date and time output', 'wp-data-access' ); | |
| 397 | + esc_html_e( 'The plugin uses your WordPress general settings to format your date and time output', 'wp-data-access' ); | |
| 398 | 398 | ?> |
| 399 | 399 | <br/> |
| 400 | 400 | <span class="dashicons dashicons-yes"></span> |
| 401 | 401 | <?php |
| 402 | - echo __( 'The plugin uses the jQuery DateTimePicker plugin for data entry validation', 'wp-data-access' ); | |
| 402 | + esc_html_e( 'The plugin uses the jQuery DateTimePicker plugin for data entry validation', 'wp-data-access' ); | |
| 403 | 403 | ?> |
| 404 | 404 | <br/> |
| 405 | 405 | <span class="dashicons dashicons-yes"></span> |
| 406 | 406 | <a href="https://xdsoft.net/jqplugins/datetimepicker/" target="_blank"> |
| 407 | 407 | <?php |
| 408 | - echo __( 'Input formats can be found on the XDSoft DateTimePicker page', 'wp-data-access' ); | |
| 408 | + esc_html_e( 'Input formats can be found on the XDSoft DateTimePicker page', 'wp-data-access' ); | |
| 409 | 409 | ?> |
| 410 | 410 | </a> |
| 411 | 411 | </td> |
| 412 | 412 | </tr> |
| @@ -415,14 +415,14 @@ | ||
| 415 | 415 | <input type="hidden" name="action" value="save"/> |
| 416 | 416 | <button type="submit" class="button button-primary"> |
| 417 | 417 | <i class="fas fa-check wpda_icon_on_button"></i> |
| 418 | 418 | <?php |
| 419 | - echo __( 'Save Plugin Settings', 'wp-data-access' ); | |
| 419 | + esc_html_e( 'Save Plugin Settings', 'wp-data-access' ); | |
| 420 | 420 | ?> |
| 421 | 421 | </button> |
| 422 | 422 | <a href="javascript:void(0)" |
| 423 | 423 | onclick="if (confirm('<?php |
| 424 | - echo __( 'Reset to defaults?', 'wp-data-access' ); | |
| 424 | + esc_html_e( 'Reset to defaults?', 'wp-data-access' ); | |
| 425 | 425 | ?>')) { |
| 426 | 426 | jQuery('input[name="action"]').val('setdefaults'); |
| 427 | 427 | jQuery('#wpda_settings_plugin').trigger('submit') |
| 428 | 428 | }" |
| @@ -428,9 +428,9 @@ | ||
| 428 | 428 | }" |
| 429 | 429 | class="button"> |
| 430 | 430 | <i class="fas fa-times-circle wpda_icon_on_button"></i> |
| 431 | 431 | <?php |
| 432 | - echo __( 'Reset Plugin Settings To Defaults', 'wp-data-access' ); | |
| 432 | + esc_html_e( 'Reset Plugin Settings To Defaults', 'wp-data-access' ); | |
| 433 | 433 | ?> |
| 434 | 434 | </a> |
| 435 | 435 | </div> |
| 436 | 436 | <?php |