Repository navigation
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
JJJ
left a comment
There was a problem hiding this comment.
This is a good consistency improvement. I found one remaining notice-state mismatch in the confirmation failure path that I think should be corrected before commit.
| @@ -137,20 +143,51 @@ | |||
|
|
|||
There was a problem hiding this comment.
The failed confirmation path above redirects with updated=false, but this condition checks only whether the argument is present. As a result, an invalid or expired confirmation link displays the success notice “Settings saved.” even though no setting changed. The analogous single-site flow also redirects with updated=false, but General Settings does not interpret its presence as success. Could this require the successful value before rendering the notice, or otherwise show an accurate failure notice? Since this PR is aligning notice behavior for this flow, I think it would be good to resolve the mismatch here.
| delete_site_option( 'network_admin_hash' ); | ||
| delete_site_option( 'new_admin_email' ); | ||
| wp_redirect( network_admin_url( 'settings.php?updated=true' ) ); | ||
| wp_redirect( network_admin_url( add_query_arg( array( 'updated' => 'true' ), 'settings.php' ) ) ); |
There was a problem hiding this comment.
Question
Does this mean that "Cancel request" redirects with updated=true, so it shows "Settings saved"?
|
|
||
| if ( $pending_new_network_admin_email ) { | ||
| $message = sprintf( | ||
| /* translators: %s: New network admin email address. */ |
There was a problem hiding this comment.
Nit
Translator comment is indented one tab too little
| $pending_network_admin_email_cancel_request_link = sprintf( | ||
| ' <a href="%1$s">%2$s</a>', | ||
| esc_url( wp_nonce_url( network_admin_url( 'settings.php?dismiss=new_network_admin_email' ), 'dismiss_new_network_admin_email' ) ), | ||
| _x( 'Cancel request', 'network admin email change' ) |
There was a problem hiding this comment.
Question
New string context for "Cancel request" - can we reuse the existing 'admin email change'?
|
I have investigated the review feedback from @JJJ and @lloc and prepared the fixes and dedicated unit tests:
Branch with the patch: |
Trac ticket: https://core.trac.wordpress.org/ticket/66300
Use of AI Tools
NONE
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.