PluginProbe
Code Profiler – WordPress Performance Profiling and Debugging Made Easy / 1.7.4
Code Profiler – WordPress Performance Profiling and Debugging Made Easy v1.7.4
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 1.6.8 All 40 releases
← All changes | index.php +8 -27 1.9.51.7.4 View file →
@@ -4,9 +4,9 @@
4 4 Plugin URI: https://nintechnet.com/codeprofiler/
5 5 Description: A profiler to measure the performance of your WordPress plugins and themes.
6 6 Author: Jerome Bruandet ~ NinTechNet Ltd.
7 7 Author URI: https://nintechnet.com/
8 -Version: 1.9.5
8 +Version: 1.7.4
9 9 Network: true
10 10 License: GPLv3 or later
11 11 Text Domain: code-profiler
12 12 Domain Path: /languages
@@ -11,9 +11,9 @@
11 11 Text Domain: code-profiler
12 12 Domain Path: /languages
13 13 */
14 14
15 -define('CODE_PROFILER_VERSION', '1.9.5');
15 +define('CODE_PROFILER_VERSION', '1.7.4');
16 16 /**
17 17 +=====================================================================+
18 18 | ____ _ ____ __ _ _ |
19 19 | / ___|___ __| | ___ | _ \ _ __ ___ / _(_) | ___ _ __ |
@@ -28,18 +28,16 @@
28 28 if (! defined('ABSPATH') ) {
29 29 die('Forbidden');
30 30 }
31 31
32 -// =====================================================================
32 +// ===================================================================== 2023-08-20
33 33 // Menu functions
34 34 require __DIR__ .'/lib/menu.php';
35 35 // Helper (can be already loaded by the MU plugin)
36 36 require_once __DIR__ .'/lib/helper.php';
37 37 // AJAX calls
38 -require __DIR__ .'/lib/class-ajax.php';
39 -// Scheduled tasks
40 -require_once __DIR__ .'/lib/class-wp-cron.php';
41 -// =====================================================================
38 +require __DIR__ .'/lib/ajax.php';
39 +// ===================================================================== 2023-06-17
42 40 // Activation: make sure the blog meets the requirements.
43 41
44 42 function code_profiler_activate() {
45 43
@@ -79,20 +77,13 @@
79 77 $cp_options = get_option('code-profiler');
80 78 if ( $cp_options === false ) {
81 79 code_profiler_default_options();
82 80 }
83 -
84 - /**
85 - * Install scheduled tasks on the main site only.
86 - */
87 - if ( is_main_site() ) {
88 - CodeProfiler_WPCron::install();
89 - }
90 81 }
91 82
92 83 register_activation_hook( __FILE__, 'code_profiler_activate');
93 84
94 -// =====================================================================
85 +// ===================================================================== 2023-06-17
95 86 // Deactivation.
96 87
97 88 function code_profiler_deactivate() {
98 89
@@ -103,18 +94,13 @@
103 94 // Remove the MU plugin
104 95 if ( file_exists( WPMU_PLUGIN_DIR .'/'. CODE_PROFILER_MUPLUGIN ) ) {
105 96 unlink( WPMU_PLUGIN_DIR .'/'. CODE_PROFILER_MUPLUGIN );
106 97 }
107 -
108 - /**
109 - * Uninstall scheduled tasks.
110 - */
111 - CodeProfiler_WPCron::uninstall();
112 98 }
113 99
114 100 register_deactivation_hook( __FILE__, 'code_profiler_deactivate');
115 101
116 -// =====================================================================
102 +// ===================================================================== 2023-06-14
117 103 // Create Profiler's menu.
118 104
119 105 function code_profiler_admin_menu() {
120 106
@@ -209,15 +195,10 @@
209 195 'code-profiler'),
210 196 'missing_username' =>
211 197 esc_attr__('Please enter the name of the user.', 'code-profiler'),
212 198 'missing_ajax' =>
213 - esc_attr__('Please enter a valid JSON-encoded payload, or change the content-type option. '.
199 + esc_attr__('Please enter a valid AJAX payload, or change the content-type option. '.
214 200 'If you want to send an empty value, enter: {}', 'code-profiler'),
215 - 'missing_wpcron' =>
216 - esc_attr__('There are no cron events available, please select another page to profile.',
217 - 'code-profiler'),
218 - 'multiline_raw' =>
219 - esc_attr__('The raw POST payload should be on one single line only.', 'code-profiler'),
220 201 'missing_post' =>
221 202 esc_attr__('Please select a page to profile.', 'code-profiler'),
222 203 'unknown_error' =>
223 204 esc_attr__('Unknown error returned by AJAX', 'code-profiler'),