Login and Registration: Improve HTML for errors and notices.

Improve markup on Login and Registration errors. Use list markup for multiple issues, paragraph when only one to reduce semantic burden in the most common case. Normalize classes and markup for wrapper using `wp_admin_notice()` and `wp_get_admin_notice()` functions. Move definition of those functions from `wp-admin\includes\misc.php` to `wp-includes\functions.php`. Move tests to functions group. 

Props extendwings, sabernhardt, afercia, lukecavanagh, rianrietveld, oglekler, sergeybiryukov, costdev, joedolson.
Fixes #30685.

git-svn-id: https://develop.svn.wordpress.org/trunk@56654 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Joe Dolson
2023-09-21 18:22:10 +00:00
parent fa0969d06a
commit b9adbb33da
6 changed files with 249 additions and 168 deletions

View File

@@ -3,11 +3,11 @@
/**
* Tests for `wp_admin_notice()`.
*
* @group admin
* @group functions.php
*
* @covers ::wp_admin_notice
*/
class Tests_Admin_WpAdminNotice extends WP_UnitTestCase {
class Tests_Functions_WpAdminNotice extends WP_UnitTestCase {
/**
* Tests that `wp_admin_notice()` outputs the expected admin notice markup.

View File

@@ -3,11 +3,11 @@
/**
* Tests for `wp_get_admin_notice()`.
*
* @group admin
* @group functions.php
*
* @covers ::wp_get_admin_notice
*/
class Tests_Admin_WpGetAdminNotice extends WP_UnitTestCase {
class Tests_Functions_WpGetAdminNotice extends WP_UnitTestCase {
/**
* Tests that `wp_get_admin_notice()` returns the expected admin notice markup.