';
@@ -725,6 +832,9 @@ function wp_dashboard_recent_posts( $args ) {
$relative = __( 'Today' );
} elseif ( date( 'Y-m-d', $time ) == $tomorrow ) {
$relative = __( 'Tomorrow' );
+ } elseif ( date( 'Y', $time ) !== date( 'Y', current_time( 'timestamp' ) ) ) {
+ /* translators: date and time format for recent posts on the dashboard, from a different calendar year, see http://php.net/date */
+ $relative = date_i18n( __( 'M jS Y' ), $time );
} else {
/* translators: date and time format for recent posts on the dashboard, see http://php.net/date */
$relative = date_i18n( __( 'M jS' ), $time );
@@ -733,9 +843,16 @@ function wp_dashboard_recent_posts( $args ) {
// Use the post edit link for those who can edit, the permalink otherwise.
$recent_post_link = current_user_can( 'edit_post', get_the_ID() ) ? get_edit_post_link() : get_permalink();
- /* translators: 1: relative date, 2: time, 3: post edit link or permalink, 4: post title */
- $format = __( '%1$s, %2$s%4$s' );
- printf( "
%s. Using an outdated browser makes your computer unsafe. For the best WordPress experience, please update your browser." ), esc_attr( $response['update_url'] ), esc_html( $response['name'] ) );
+ /* translators: %s: browser name and link */
+ $msg = sprintf( __( "It looks like you're using an insecure version of %s. Using an outdated browser makes your computer unsafe. For the best WordPress experience, please update your browser." ),
+ sprintf( '%s', esc_url( $response['update_url'] ), esc_html( $response['name'] ) )
+ );
} else {
- $msg = sprintf( __( "It looks like you're using an old version of %s. For the best WordPress experience, please update your browser." ), esc_attr( $response['update_url'] ), esc_html( $response['name'] ) );
+ /* translators: %s: browser name and link */
+ $msg = sprintf( __( "It looks like you're using an old version of %s. For the best WordPress experience, please update your browser." ),
+ sprintf( '%s', esc_url( $response['update_url'] ), esc_html( $response['name'] ) )
+ );
}
$browser_nag_class = '';
@@ -1203,7 +1348,7 @@ function wp_dashboard_browser_nag() {
$browsehappy = add_query_arg( 'locale', $locale, $browsehappy );
$notice .= '
' . sprintf( __( 'Update %2$s or learn how to browse happy' ), esc_attr( $response['update_url'] ), esc_html( $response['name'] ), esc_url( $browsehappy ) ) . '
';
$notice .= '';
}
@@ -1218,6 +1363,12 @@ function wp_dashboard_browser_nag() {
echo apply_filters( 'browse-happy-notice', $notice, $response );
}
+/**
+ * @since 3.2.0
+ *
+ * @param array $classes
+ * @return array
+ */
function dashboard_browser_nag_class( $classes ) {
$response = wp_check_browser_version();
@@ -1232,6 +1383,8 @@ function dashboard_browser_nag_class( $classes ) {
*
* @since 3.2.0
*
+ * @global string $wp_version
+ *
* @return array|bool False on failure, array of browser data on success.
*/
function wp_check_browser_version() {
@@ -1256,8 +1409,8 @@ function wp_check_browser_version() {
/**
* Response should be an array with:
* 'name' - string - A user friendly browser name
- * 'version' - string - The most recent version of the browser
- * 'current_version' - string - The version of the browser the user is using
+ * 'version' - string - The version of the browser the user is using
+ * 'current_version' - string - The most recent version of the browser
* 'upgrade' - boolean - Whether the browser needs an upgrade
* 'insecure' - boolean - Whether the browser is deemed insecure
* 'upgrade_url' - string - The url to visit to upgrade
@@ -1288,12 +1441,12 @@ function wp_dashboard_empty() {}
function wp_welcome_panel() {
?>
-
+
-
+
@@ -1302,7 +1455,7 @@ function wp_welcome_panel() {
-
+
' . __( 'Edit your front page' ) . '', get_edit_post_link( get_option( 'page_on_front' ) ) ); ?>
@@ -1319,7 +1472,7 @@ function wp_welcome_panel() {
'; foreach ( $comments as $comment ) _wp_dashboard_recent_comments_row( $comment ); - echo '