| @@ -6,13 +6,13 @@ | ||
| 6 | 6 | | | | / _ \ / _` |/ _ \ | |_) | '__/ _ \| |_| | |/ _ \ '__| | |
| 7 | 7 | | | |__| (_) | (_| | __/ | __/| | | (_) | _| | | __/ | | |
| 8 | 8 | | \____\___/ \__,_|\___| |_| |_| \___/|_| |_|_|\___|_| | |
| 9 | 9 | | | |
| 10 | - | (c) Jerome Bruandet ~ https://code-profiler.com/ | | |
| 10 | + | (c) Jerome Bruandet ~ https://nintechnet.com/codeprofiler/ | | |
| 11 | 11 | +=====================================================================+ |
| 12 | 12 | */ |
| 13 | 13 | |
| 14 | -if (! defined( 'ABSPATH' ) ) { die( 'Forbidden' ); } | |
| 14 | +if (! defined('ABSPATH') ) { die('Forbidden'); } | |
| 15 | 15 | |
| 16 | 16 | // ===================================================================== |
| 17 | 17 | // Display Profiles List tab. |
| 18 | 18 | |
| @@ -35,13 +35,8 @@ | ||
| 35 | 35 | $id = sanitize_text_field( $_REQUEST['id'] ); |
| 36 | 36 | } |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | -// Search query: get rid of slashes added by WordPress | |
| 40 | -if (! empty( $_REQUEST['s'] ) ) { | |
| 41 | - $_REQUEST['s'] = sanitize_text_field ( stripslashes( $_REQUEST['s'] ) ); | |
| 42 | -} | |
| 43 | - | |
| 44 | 39 | if (! empty( $section ) ) { |
| 45 | 40 | // View selected profile |
| 46 | 41 | require 'menu_view_profile.php'; |
| 47 | 42 | |
| @@ -48,10 +43,10 @@ | ||
| 48 | 43 | } else { |
| 49 | 44 | // Show profiles list table |
| 50 | 45 | |
| 51 | 46 | // Load WP_List_Table class |
| 52 | - if (! class_exists( 'WP_List_Table' ) ) { | |
| 53 | - require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' ); | |
| 47 | + if (! class_exists('WP_List_Table') ) { | |
| 48 | + require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php'); | |
| 54 | 49 | } |
| 55 | 50 | require 'class-table-profiles.php'; |
| 56 | 51 | $CPTableProfiles = new CodeProfiler_Table_Profiles(); |
| 57 | 52 | |
| @@ -59,9 +54,9 @@ | ||
| 59 | 54 | if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'delete_profiles' && |
| 60 | 55 | ! empty( $_REQUEST['profiles'] ) ) { |
| 61 | 56 | // Verify security nonce |
| 62 | 57 | if ( wp_verify_nonce( $_REQUEST['_wpnonce'], 'bulk-'. $CPTableProfiles->_args['plural'] ) === false ) { |
| 63 | - wp_nonce_ays( 'bulk-' . $CPTableProfiles->_args['plural'] ); | |
| 58 | + wp_nonce_ays('bulk-' . $CPTableProfiles->_args['plural'] ); | |
| 64 | 59 | } |
| 65 | 60 | |
| 66 | 61 | $error = $CPTableProfiles->delete_profiles( $_REQUEST['profiles'] ); |
| 67 | 62 | if ( $error === true ) { |
| @@ -66,14 +61,14 @@ | ||
| 66 | 61 | $error = $CPTableProfiles->delete_profiles( $_REQUEST['profiles'] ); |
| 67 | 62 | if ( $error === true ) { |
| 68 | 63 | printf( |
| 69 | 64 | CODE_PROFILER_ERROR_NOTICE, |
| 70 | - esc_html__('Some errors occured when trying to delete the selected profiles.', 'code-profiler' ) | |
| 65 | + esc_html__('Some errors occured when trying to delete the selected profiles.', 'code-profiler') | |
| 71 | 66 | ); |
| 72 | 67 | } else { |
| 73 | 68 | printf( |
| 74 | 69 | CODE_PROFILER_UPDATE_NOTICE, |
| 75 | - esc_html__('The selected profiles were deleted.', 'code-profiler' ) | |
| 70 | + esc_html__('The selected profiles were deleted.', 'code-profiler') | |
| 76 | 71 | ); |
| 77 | 72 | } |
| 78 | 73 | } |
| 79 | 74 | |
| @@ -88,13 +83,13 @@ | ||
| 88 | 83 | <?php |
| 89 | 84 | // Search query |
| 90 | 85 | if (! empty( $_REQUEST['s'] ) ) { |
| 91 | 86 | echo '<span class="subtitle">'; |
| 92 | - printf( esc_html__( 'Filter: %s' ), '<code>' . esc_html( $_REQUEST['s'] ) . '</code>' ); | |
| 87 | + printf( esc_html__('Filter: %s'), '<code>' . esc_html( stripslashes( $_REQUEST['s'] ) ) . '</code>'); | |
| 93 | 88 | echo '</span>'; |
| 94 | 89 | } |
| 95 | 90 | $CPTableProfiles->prepare_items(); |
| 96 | - $CPTableProfiles->search_box( esc_attr__('Filter', 'code-profiler'), 'search_id' ); | |
| 91 | + $CPTableProfiles->search_box( esc_attr__('Filter', 'code-profiler'), 'search_id'); | |
| 97 | 92 | $CPTableProfiles->display(); |
| 98 | 93 | ?> |
| 99 | 94 | </form> |
| 100 | 95 | <!-- Help --> |
| @@ -106,9 +101,9 @@ | ||
| 106 | 101 | ?> |
| 107 | 102 | <br /> |
| 108 | 103 | </div> |
| 109 | 104 | <div class="alignleft actions bulkactions"> |
| 110 | - <input type="button" class="button-primary" style="min-width:100px" value="<?php esc_attr_e('Help', 'code-profiler' )?>" onclick="jQuery('#cp-footer-help').slideToggle(500);"/> | |
| 105 | + <input type="button" class="button button-primary" style="min-width:100px" value="<?php esc_attr_e('Help', 'code-profiler')?>" onclick="jQuery('#cp-footer-help').slideToggle(500);"/> | |
| 111 | 106 | </div> |
| 112 | 107 | </div> |
| 113 | 108 | <?php |
| 114 | 109 | } |