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_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_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'), 'unknown_error' => esc_attr__('An unknown error occurred:', 'code-profiler'), 'preparing_report' => esc_attr__('Preparing 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') ); 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