PluginProbe
Code Profiler – WordPress Performance Profiling and Debugging Made Easy / 1.9.6
Code Profiler – WordPress Performance Profiling and Debugging Made Easy v1.9.6
1.9.6 1.9.5 1.9.4 1.9.3 trunk 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.5 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.6 1.6.1 1.6.10 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 All 41 releases
← All changes | lib/menu_profiles_list.php +10 -18 1.4.31.9.6 View file →
@@ -6,20 +6,17 @@
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
19 -// Clean-up temp files left in the profiles folder
20 -code_profiler_cleantmpfiles();
21 -
22 19 echo code_profiler_display_tabs( 2 );
23 20
24 21 // Look for actions
25 22 $section = 0;
@@ -38,13 +35,8 @@
38 35 $id = sanitize_text_field( $_REQUEST['id'] );
39 36 }
40 37 }
41 38
42 -// Search query: get rid of slashes added by WordPress
43 -if (! empty( $_REQUEST['s'] ) ) {
44 - $_REQUEST['s'] = sanitize_text_field ( stripslashes( $_REQUEST['s'] ) );
45 -}
46 -
47 39 if (! empty( $section ) ) {
48 40 // View selected profile
49 41 require 'menu_view_profile.php';
50 42
@@ -51,10 +43,10 @@
51 43 } else {
52 44 // Show profiles list table
53 45
54 46 // Load WP_List_Table class
55 - if (! class_exists( 'WP_List_Table' ) ) {
56 - 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');
57 49 }
58 50 require 'class-table-profiles.php';
59 51 $CPTableProfiles = new CodeProfiler_Table_Profiles();
60 52
@@ -62,9 +54,9 @@
62 54 if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'delete_profiles' &&
63 55 ! empty( $_REQUEST['profiles'] ) ) {
64 56 // Verify security nonce
65 57 if ( wp_verify_nonce( $_REQUEST['_wpnonce'], 'bulk-'. $CPTableProfiles->_args['plural'] ) === false ) {
66 - wp_nonce_ays( 'bulk-' . $CPTableProfiles->_args['plural'] );
58 + wp_nonce_ays('bulk-' . $CPTableProfiles->_args['plural'] );
67 59 }
68 60
69 61 $error = $CPTableProfiles->delete_profiles( $_REQUEST['profiles'] );
70 62 if ( $error === true ) {
@@ -69,14 +61,14 @@
69 61 $error = $CPTableProfiles->delete_profiles( $_REQUEST['profiles'] );
70 62 if ( $error === true ) {
71 63 printf(
72 64 CODE_PROFILER_ERROR_NOTICE,
73 - 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')
74 66 );
75 67 } else {
76 68 printf(
77 69 CODE_PROFILER_UPDATE_NOTICE,
78 - esc_html__('The selected profiles were deleted.', 'code-profiler' )
70 + esc_html__('The selected profiles were deleted.', 'code-profiler')
79 71 );
80 72 }
81 73 }
82 74
@@ -91,13 +83,13 @@
91 83 <?php
92 84 // Search query
93 85 if (! empty( $_REQUEST['s'] ) ) {
94 86 echo '<span class="subtitle">';
95 - printf( esc_html__( 'Filter: %s' ), '<code>' . esc_html( $_REQUEST['s'] ) . '</code>' );
87 + printf( esc_html__('Filter: %s'), '<code>' . esc_html( stripslashes( $_REQUEST['s'] ) ) . '</code>');
96 88 echo '</span>';
97 89 }
98 90 $CPTableProfiles->prepare_items();
99 - $CPTableProfiles->search_box( esc_attr__('Filter', 'code-profiler'), 'search_id' );
91 + $CPTableProfiles->search_box( esc_attr__('Filter', 'code-profiler'), 'search_id');
100 92 $CPTableProfiles->display();
101 93 ?>
102 94 </form>
103 95 <!-- Help -->
@@ -109,9 +101,9 @@
109 101 ?>
110 102 <br />
111 103 </div>
112 104 <div class="alignleft actions bulkactions">
113 - <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);"/>
114 106 </div>
115 107 </div>
116 108 <?php
117 109 }