From d51ee6ce097fb288aca9da1f95899fc3d77c0fa4 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 24 May 2023 10:13:49 +0000 Subject: [PATCH] Help/About: Reverse the order of conditionals for displaying the "Go to Updates" link. `isset()` is faster than `current_user_can()`, so should be checked first. Includes updating code layout for better readability. Follow-up to [19442], [19524], [28477], [33466], [55848]. See #57839. git-svn-id: https://develop.svn.wordpress.org/trunk@55853 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/about.php | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/wp-admin/about.php b/src/wp-admin/about.php index 709670f9f0..2da21ab02f 100644 --- a/src/wp-admin/about.php +++ b/src/wp-admin/about.php @@ -279,10 +279,21 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
- - | - - + %2$s | ', + esc_url( self_admin_url( 'update-core.php' ) ), + is_multisite() ? __( 'Go to Updates' ) : __( 'Go to Dashboard → Updates' ) + ); + } + + printf( + '%2$s', + esc_url( self_admin_url() ), + is_blog_admin() ? __( 'Go to Dashboard → Home' ) : __( 'Go to Dashboard' ) + ); + ?>