<?php
/**
 * Sidebar template.
 *
 * @since 3.0
 */

defined( 'ABSPATH' ) || exit;

?>

<h3 class="wpr-Sidebar-title wpr-title2"><?php esc_html_e( 'How to correctly measure your website’s loading time', 'science' ); ?></h3>
<div class="wpr-Sidebar-notice">
	<p><?php esc_html_e( 'Check our tutorial and learn how to measure the speed of your site.', 'science' ); ?></p>
	<a href="<?php echo esc_url( 'https://wordpress.me/blog/how-to-test-wordpress-site-performance-measure-speed-results/?utm_source=wp_plugin&utm_medium=wp_science' ); ?>" target="_blank" rel="noopener" class="wpr-Sidebar-notice-link"><?php esc_html_e( 'Read our guide', 'science' ); ?></a>
</div>
<div class="wpr-Sidebar-notice">
	<p><?php esc_html_e( 'Learn about optimal WP science settings for mobile.', 'science' ); ?></p>
	<?php
	$science_mobile_doc_url = false !== strpos( get_locale(), 'fr' )
			? 'https://fr.docs.wordpress.me/article/1432-comment-ameliorer-score-mobile-pagespeed/?utm_source=wp_plugin&utm_medium=wp_science'
			: 'https://docs.wordpress.me/article/1402-how-to-improve-your-mobile-pagespeed-score/?utm_source=wp_plugin&utm_medium=wp_science'
	?>
	<a href="<?php echo esc_url( $science_mobile_doc_url ); ?>" target="_blank" class="wpr-Sidebar-notice-link"><?php esc_html_e( 'Read our guide', 'science' ); ?></a>
</div>
<div class="wpr-Sidebar-notice">
	<p><?php esc_html_e( 'Test and Improve Google Core Web Vitals for WordPress.', 'science' ); ?></p>
	<a href="<?php echo esc_url( 'https://wordpress.me/google-core-web-vitals-wordpress/?utm_source=wp_plugin&utm_medium=wp_science' ); ?>" target="_blank" class="wpr-Sidebar-notice-link"><?php esc_html_e( 'Read more', 'science' ); ?></a>
</div>
<?php if ( ! get_science_option( 'cache_logged_user', 0 ) ) : ?>
<div class="wpr-Sidebar-info">
	<i class="wpr-icon-information2"></i>
	<h4><?php esc_html_e( 'You have not activated logged-in user cache.', 'science' ); ?></h4>
	<p><?php esc_html_e( 'Use a private browser to check your website\'s speed and visual appearance.', 'science' ); ?></p>
</div>
<?php endif; ?>
<?php
$this->render_part( 'documentation' );
