| @@ -168,11 +168,11 @@ | ||
| 168 | 168 | ?> |
| 169 | 169 | <tr> |
| 170 | 170 | <th scope="row"><?php esc_html_e('General Options', 'code-profiler') ?></th> |
| 171 | 171 | <td> |
| 172 | - <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-pro') ?></label></p> | |
| 172 | + <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> | |
| 173 | 173 | |
| 174 | - <p class="description"><?php esc_html_e('Consult the FAQ tab for more details about this option.', 'code-profiler-pro') ?></p> | |
| 174 | + <p class="description"><?php esc_html_e('Consult the FAQ tab for more details about this option.', 'code-profiler') ?></p> | |
| 175 | 175 | |
| 176 | 176 | <br /> |
| 177 | 177 | |
| 178 | 178 | <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> |
| @@ -193,14 +193,21 @@ | ||
| 193 | 193 | </td> |
| 194 | 194 | </tr> |
| 195 | 195 | <?php |
| 196 | 196 | // Accuracy |
| 197 | - if ( empty( $cp_options['accuracy'] ) || ! preg_match('/^(?:1|5|10|15|20)$/', $cp_options['accuracy'] ) ) { | |
| 197 | + if ( empty( $cp_options['accuracy'] ) || ! preg_match('/^(?:1|5|10|15|20)$/D', $cp_options['accuracy'] ) ) { | |
| 198 | 198 | $cp_options['accuracy'] = 1; |
| 199 | 199 | } |
| 200 | 200 | ?> |
| 201 | 201 | <tr> |
| 202 | - <th scope="row"><?php esc_html_e('Accuracy & Precision', 'code-profiler') ?> <span class="code-profiler-tip" data-tip="<?php esc_attr_e('Selecting a high accuracy level is preferred and will work on most sites, but the profiling process will take longer to execute as opposed to choosing a lower accuracy level. If you have a slow WordPress site with a lot of plugins installed and your server or reverse proxy is timing out when Code Profiler is running (e.g., "503 Service Unavailable" or "504 Gateway Timeout" error), try to lower the accuracy level in order to speed up the profiling process and avoid the server timeout.', 'code-profiler') ?>"></span></th> | |
| 202 | + <th scope="row"><?php esc_html_e('Accuracy & Precision', 'code-profiler') ?> <span class="code-profiler-tip" data-tip="<?php | |
| 203 | + printf( | |
| 204 | + esc_attr__('When accuracy is set to the highest level, Code Profiler runs as a %s Tracing profiler %s, and when accuracy is set to a lower level, it runs as a %s Sampling profiler %s.', 'code-profiler'), | |
| 205 | + '<em>', '</em>','<em>', '</em>' | |
| 206 | + ); | |
| 207 | + echo '<br />'; | |
| 208 | + esc_attr_e('Selecting a high accuracy level is preferred and will work on most sites, but the profiling process will take longer to execute as opposed to choosing a lower accuracy level. If you have a slow WordPress site with a lot of plugins installed and your server or reverse proxy is timing out when Code Profiler is running (e.g., "503 Service Unavailable" or "504 Gateway Timeout" error), try to lower the accuracy level in order to speed up the profiling process and avoid the server timeout.', 'code-profiler'); | |
| 209 | + ?>"></span></th> | |
| 203 | 210 | <td> |
| 204 | 211 | <p><label><?php esc_html_e('Select the accuracy and precision level of the profiler:', 'code-profiler') ?> <select name="cp_options[accuracy]"> |
| 205 | 212 | <?php |
| 206 | 213 | foreach( CODE_PROFILER_ACCURACY as $key => $value ) { |
| @@ -303,9 +310,9 @@ | ||
| 303 | 310 | $cp_options['http_response'] = "^(?:$code)\d{2}$"; |
| 304 | 311 | } |
| 305 | 312 | |
| 306 | 313 | // Accuracy |
| 307 | - if ( empty( $_POST['cp_options']['accuracy'] ) || ! preg_match('/^(?:1|5|10|15|20)$/', $_POST['cp_options']['accuracy'] ) ) { | |
| 314 | + if ( empty( $_POST['cp_options']['accuracy'] ) || ! preg_match('/^(?:1|5|10|15|20)$/D', $_POST['cp_options']['accuracy'] ) ) { | |
| 308 | 315 | $cp_options['accuracy'] = 1; |
| 309 | 316 | } else { |
| 310 | 317 | $cp_options['accuracy'] = (int) $_POST['cp_options']['accuracy']; |
| 311 | 318 | } |