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 | lib/menu_settings.php +19 -25 1.9.31.7.4 View file →
@@ -143,8 +143,14 @@
143 143 </td>
144 144 </tr>
145 145
146 146 <?php
147 + // Composer warning
148 + if (! empty( $cp_options['warn_composer'] ) ) {
149 + $cp_options['warn_composer'] = 1;
150 + } else {
151 + $cp_options['warn_composer'] = 0;
152 + }
147 153 // WP-CLI integration
148 154 if (! empty( $cp_options['enable_wpcli'] ) ) {
149 155 $cp_options['enable_wpcli'] = 1;
150 156 } else {
@@ -182,8 +188,14 @@
182 188 ?>
183 189 <tr>
184 190 <th scope="row"><?php esc_html_e('General Options', 'code-profiler') ?></th>
185 191 <td>
192 + <p><label><input type="checkbox" name="cp_options[warn_composer]"<?php checked( $cp_options['warn_composer'], '1') ?> /><?php esc_html_e('Show a notice when several plugins are using Composer dependency manager.','code-profiler') ?></label></p>
193 +
194 + <p class="description"><?php esc_html_e('Consult the FAQ tab for more details about this option.', 'code-profiler') ?></p>
195 +
196 + <br />
197 +
186 198 <p><label><input type="checkbox" name="cp_options[enable_wpcli]"<?php checked( $cp_options['enable_wpcli'], '1') ?> /><?php esc_html_e('Enable WP-CLI integration.','code-profiler') ?></label></p>
187 199 <p class="description"><?php printf( esc_html__('Enter %s to display the available command line options.', 'code-profiler'), '<code>wp code-profiler help</code>') ?></p>
188 200
189 201 <br />
@@ -267,24 +279,8 @@
267 279 );
268 280 ?></p>
269 281 </td>
270 282 </tr>
271 - <?php
272 - if ( empty( $cp_options['php_error'] ) ) {
273 - $cp_options['php_error'] = 0;
274 - } else {
275 - $cp_options['php_error'] = 1;
276 - }
277 - ?>
278 - <tr>
279 - <th scope="row"><?php esc_html_e('PHP Error Logging', 'code-profiler') ?> <span class="code-profiler-tip" data-tip="<?php
280 - esc_attr_e('This option will enable PHP error logging when the profiler is running. The log will be saved by default to "/wp-content/debug.log", unless you configured PHP or WordPress to use a different path.', 'code-profiler');
281 - ?>"></span>
282 - </th>
283 - <td>
284 - <p><label><input type="checkbox" name="cp_options[php_error]"<?php checked( $cp_options['php_error'], '1') ?> /><?php esc_html_e('Enable PHP error logging.','code-profiler') ?></label></p>
285 - </td>
286 - </tr>
287 283 </table>
288 284
289 285 <p><input type="submit" name="save-settings" class="button button-primary" value="<?php esc_attr_e('Save Settings', 'code-profiler') ?>" /></p>
290 286
@@ -349,8 +345,15 @@
349 345 } else {
350 346 $cp_options['hide_empty_value'] = 0;
351 347 }
352 348
349 + // Composer warning
350 + if (! empty( $_POST['cp_options']['warn_composer'] ) ) {
351 + $cp_options['warn_composer'] = 1;
352 + } else {
353 + $cp_options['warn_composer'] = 0;
354 + }
355 +
353 356 // WP-CLI integration
354 357 if (! empty( $_POST['cp_options']['enable_wpcli'] ) ) {
355 358 $cp_options['enable_wpcli'] = 1;
356 359 } else {
@@ -396,17 +399,8 @@
396 399 } elseif (! preg_match('/^(?:[1-9]|10)$/D', $_POST['cp_options']['buffer'] ) ) {
397 400 $cp_options['buffer'] = 10;
398 401 } else {
399 402 $cp_options['buffer'] = (int) $_POST['cp_options']['buffer'];
400 - }
401 -
402 - /**
403 - * PHP error logging.
404 - */
405 - if (! empty( $_POST['cp_options']['php_error'] ) ) {
406 - $cp_options['php_error'] = 1;
407 - } else {
408 - $cp_options['php_error'] = 0;
409 403 }
410 404
411 405 return update_option('code-profiler', $cp_options );
412 406