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_view_profile.php +11 -15 1.4.21.9.6 View file →
@@ -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 selected profile.
18 18
@@ -44,9 +44,9 @@
44 44 esc_attr( $id ),
45 45 esc_attr( $orderby ),
46 46 esc_attr( $order )
47 47 ) .'"'.
48 - selected( $num, $section ) .'>'.
48 + selected( $num, $section, false ) .'>'.
49 49 sprintf(
50 50 esc_html__('Page %s: %s', 'code-profiler'),
51 51 (int) $num,
52 52 esc_html( $section_name )
@@ -113,16 +113,20 @@
113 113 }
114 114 ?>
115 115 </div>
116 116 <?php
117 +$suffix = '';
117 118 if ( $section == 1 ) {
118 119 require 'menu_view_plugins.php';
120 + $suffix = 'plugins';
119 121
120 122 } elseif ( $section == 2 ) {
121 123 require 'menu_view_iostats.php';
124 + $suffix = 'iostats';
122 125
123 126 } elseif ( $section == 3 ) {
124 127 require 'menu_view_diskio.php';
128 + $suffix = 'diskio';
125 129
126 130 } elseif ( $section == 4 ) {
127 131 require 'menu_pro.php';
128 132
@@ -128,9 +132,9 @@
128 132
129 133 }
130 134
131 135 if ( isset( $buffer['error'] ) ) {
132 - echo code_profiler_buffer_error( $buffer['error'] );
136 + echo $buffer['error'];
133 137 return;
134 138 }
135 139
136 140 if ( $section == 4 ) { return; }
@@ -171,9 +175,9 @@
171 175 ?>
172 176 </div>
173 177
174 178 <div class="alignleft actions bulkactions">
175 - <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);"/>
179 + <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);"/>
176 180 </div>
177 181
178 182 <div class="tablenav-pages">
179 183
@@ -179,14 +183,14 @@
179 183
180 184 <?php
181 185 if ( isset( $rotate_img ) ) {
182 186 ?>
183 - <button type="button" class="button-secondary" id="htov" title="<?php esc_attr_e('Click to rotate graph', 'code-profiler' )?>"><span class="dashicons dashicons-image-rotate" style="display: inline-block;vertical-align: middle;"></span></button>&nbsp;
187 + <button type="button" class="button button-secondary" id="htov" title="<?php esc_attr_e('Click to rotate graph', 'code-profiler' )?>"><span class="dashicons dashicons-image-rotate" style="vertical-align: sub;"></span></button>&nbsp;
184 188 <?php
185 189 }
186 190 if ( isset( $save_png ) ) {
187 191 ?>
188 - <a type="button" class="button-secondary" id="download-png-img" download="<?php echo esc_attr( $profile_name) ?>_plugins.png" title="<?php esc_attr_e('Click to download as an image', 'code-profiler' )?>" target="_blank" rel="noopener noreferrer"><span class="dashicons dashicons-download" style="display: inline-block;vertical-align: middle;"></span><?php esc_attr_e('Download as a PNG image', 'code-profiler' )?></a>&nbsp;
192 + <a type="button" class="button button-secondary" id="download-png-img" download="<?php echo esc_attr("{$profile_name}_{$suffix}") ?>.png" title="<?php esc_attr_e('Click to download as an image', 'code-profiler' )?>" target="_blank" rel="noopener noreferrer"><span class="dashicons dashicons-download" style="vertical-align: sub;"></span><?php esc_attr_e('Download as a PNG image', 'code-profiler' )?></a>&nbsp;
189 193 <?php
190 194 }
191 195 ?>
192 196 </div>
@@ -192,15 +196,7 @@
192 196 </div>
193 197 </div>
194 198
195 199 <?php
196 -
197 -// =====================================================================
198 -
199 -function code_profiler_buffer_error( $error ) {
200 -
201 - return $error;
202 -
203 -}
204 200
205 201 // =====================================================================
206 202 // EOF