summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYury German <blueknight@gentoo.org>2022-01-23 18:37:36 -0500
committerYury German <blueknight@gentoo.org>2022-01-23 18:37:36 -0500
commitf18b23a3a9378fb0a98856d436aa9ebf94e47429 (patch)
treee418433e22854ebd2d77eaa869d5d0470a973317 /plugins/jetpack/modules/widgets/blog-stats.php
parentAdd classic-editor 1.5 (diff)
downloadblogs-gentoo-f18b23a3a9378fb0a98856d436aa9ebf94e47429.tar.gz
blogs-gentoo-f18b23a3a9378fb0a98856d436aa9ebf94e47429.tar.bz2
blogs-gentoo-f18b23a3a9378fb0a98856d436aa9ebf94e47429.zip
Updating Classic Editor, Google Authenticatior, Jetpack, Public Post Preview, Table of Contents, Wordpress Importer
Signed-off-by: Yury German <blueknight@gentoo.org>
Diffstat (limited to 'plugins/jetpack/modules/widgets/blog-stats.php')
-rw-r--r--plugins/jetpack/modules/widgets/blog-stats.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/jetpack/modules/widgets/blog-stats.php b/plugins/jetpack/modules/widgets/blog-stats.php
index e89db686..7265d114 100644
--- a/plugins/jetpack/modules/widgets/blog-stats.php
+++ b/plugins/jetpack/modules/widgets/blog-stats.php
@@ -4,7 +4,7 @@
*
* @since 4.5.0
*
- * @package Jetpack
+ * @package automattic/jetpack
*/
/**
@@ -94,7 +94,7 @@ class Jetpack_Blog_Stats_Widget extends WP_Widget {
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $instance['title'] ); ?>" />
</p>
<p>
- <label for="<?php echo esc_attr( $this->get_field_id( 'hits' ) ); ?>"><?php echo number_format_i18n( '12345' ); ?></label>
+ <label for="<?php echo esc_attr( $this->get_field_id( 'hits' ) ); ?>"><?php esc_html_e( 'Pageview Description:', 'jetpack' ); ?></label>
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'hits' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'hits' ) ); ?>" type="text" value="<?php echo esc_attr( $instance['hits'] ); ?>" />
</p>
<p><?php esc_html_e( 'Hit counter is delayed by up to 60 seconds.', 'jetpack' ); ?></p>
@@ -137,13 +137,15 @@ class Jetpack_Blog_Stats_Widget extends WP_Widget {
echo $args['before_widget'];
if ( ! empty( $title ) ) {
- echo $args['before_title'] . esc_html( $title ) . $args['after_title'];
+ echo $args['before_title'] . $title . $args['after_title']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
// Get the Site Stats.
$views = $this->get_stats();
- if ( ! empty( $views ) ) {
+ if ( 0 === $views ) {
+ esc_html_e( 'There is nothing to display yet', 'jetpack' );
+ } elseif ( $views ) {
printf(
'<ul><li>%1$s %2$s</li></ul>',
number_format_i18n( $views ),