esc_attr__('Security nonce is missing, try to reload the page.', 'code-profiler'), 'missing_frontbackend' => esc_attr__('Please select either the fontend or backend option.', 'code-profiler'), 'missing_profileid' => esc_attr__('Missing profile identifier.', 'code-profiler'), 'missing_profilename' => esc_attr__('Please enter a name for this profile.', 'code-profiler'), 'missing_userauth' => esc_attr__('Please select whether the profiler should run as '. 'an authenticated user or not.', 'code-profiler'), 'missing_username' => esc_attr__('Please enter the name of the user.', 'code-profiler'), 'missing_post' => esc_attr__('Please select a page to profile.', 'code-profiler'), 'unknown_error' => esc_attr__('Unknown error returned by AJAX', 'code-profiler'), 'http_error' => esc_attr__('The HTTP server returned the following error:', 'code-profiler'), 'timeout_error' => esc_attr__('You can try to select a lower Accuracy and Precision'. ' level in the Settings page', 'code-profiler'), 'notfound_error' => esc_attr__('The requested page does not seem to exist. Please '. 'check the syntax of the URL you want to profile', 'code-profiler'), 'forbidden_error' => esc_attr__('The server rejected and blocked the requested page. '. 'Make sure you are allowed to access that page or that there is '. 'no security plugin or application blocking it', 'code-profiler'), 'internal_error' => esc_attr__('This is an internal server error. Please check your '. 'server, PHP and Code Profiler logs as they may contain more '. 'details about the error', 'code-profiler'), 'unknown_error' => esc_attr__('An unknown error occurred:', 'code-profiler'), 'preparing_report' => esc_attr__('Preparing the report', 'code-profiler') .'...', 'empty_log' => esc_attr__('No records were found that match the specified '. 'search criteria.', 'code-profiler'), 'delete_log' => esc_attr__('Delete log?', 'code-profiler'), 'delete_profile' => esc_attr__('Delete this profile?', 'code-profiler'), // Charts 'exec_sec_plugins' => esc_attr__('Execution time in seconds', 'code-profiler'), 'pc_plugins' => /* Translators: xx% of all plugins and the theme */ esc_attr__('% of all plugins and the theme', 'code-profiler'), 'exec_tot_plugins_1' => esc_attr__('Plugins and theme execution time, in seconds', 'code-profiler'), 'chart_total' => esc_attr__('total:', 'code-profiler'), 'iolist_total_calls' => esc_attr__('Total calls', 'code-profiler'), 'io_calls' => esc_attr__('File I/O operations', 'code-profiler'), 'disk_io_bytes' => esc_attr__('Total bytes', 'code-profiler'), 'disk_io_title' => esc_attr__('Total Disk I/O read and write, in bytes', 'code-profiler'), 'text_copied' => esc_attr__('The text was successfully copied to the clipboard.', 'code-profiler') ]; wp_localize_script( 'code_profiler_javascript', 'cpi18n', $code_profiler_i18n ); } add_action('admin_enqueue_scripts', 'code_profiler_enqueue'); // ===================================================================== // Display the settings link in the "Plugins" page. function code_profiler_settings_link( $links ) { $links[] = ''. esc_html__('Start Profiling', 'code-profiler'). ''; $links[] = ''. esc_html__('Go Pro', 'code-profiler'). ''; return $links; } add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'code_profiler_settings_link'); // ===================================================================== // WP CLI commands. if ( defined('WP_CLI') && WP_CLI ) { require_once __DIR__ . '/lib/class-cli.php'; } // ===================================================================== // EOF