From f0ab8b5a06bb3bfc7ac70977f4666f500e26b941 Mon Sep 17 00:00:00 2001 From: SergeyBiryukov Date: Mon, 31 Aug 2015 21:44:02 +0000 Subject: [PATCH] Add `'update_right_now_text'` filter for the text displayed in the 'At a Glance' dashboard widget. props obenland. fixes #33355. git-svn-id: https://develop.svn.wordpress.org/trunk@33832 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/update.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/includes/update.php b/src/wp-admin/includes/update.php index 7e01a54d2c..e3f363c16e 100644 --- a/src/wp-admin/includes/update.php +++ b/src/wp-admin/includes/update.php @@ -254,7 +254,21 @@ function update_right_now_message() { $msg .= '' . sprintf( __( 'Update to %s' ), $cur->current ? $cur->current : __( 'Latest' ) ) . ' '; } - $msg .= sprintf( '' . __( 'WordPress %1$s running %2$s theme.' ) . '', get_bloginfo( 'version', 'display' ), $theme_name ); + /* translators: 1: version number, 2: theme name */ + $content = __( 'WordPress %1$s running %2$s theme.' ); + + /** + * Filter the text displayed in the 'At a Glance' dashboard widget. + * + * Prior to 3.8.0, the widget was named 'Right Now'. + * + * @since 4.4.0 + * + * @param string $content Default text. + */ + $content = apply_filters( 'update_right_now_text', $content ); + + $msg .= sprintf( '' . $content . '', get_bloginfo( 'version', 'display' ), $theme_name ); echo "

$msg

"; }