Administration: Add a reusable ".delete-link" CSS class for destructive links#12580
Open
itzmekhokan wants to merge 12 commits into
Open
Administration: Add a reusable ".delete-link" CSS class for destructive links#12580itzmekhokan wants to merge 12 commits into
itzmekhokan wants to merge 12 commits into
Conversation
Derive the `Disallow` and `Allow` directives in `do_robots()` from `admin_url()` and `admin_url( 'admin-ajax.php' )` rather than from a hardcoded `/wp-admin/` path built off `site_url()`. Only the URL path portion is emitted, as before, so installs that relocate or filter their admin URL now produce a correct default `robots.txt`. Also guard the `Content-Type` header with a `headers_sent()` check to avoid a warning when the headers have already been sent. Developed in WordPress#11998. Follow-up to r34985. Props masteradhoc, yogeshbhutkar, hrohh, westonruter, mukeshpanchal27, 1ucay. Fixes #63467. git-svn-id: https://develop.svn.wordpress.org/trunk@62633 602fd350-edb4-49c9-b593-d223f7449a82
The `ini_get()` function is called unconditionally early in the bootstrap process, so there is no need for subsequent `function_exists( 'ini_get' )` checks. Follow-up to [44986], [45104]. Props siliconforks, shreyasikhar26, ankitkumarshah, westonruter, SergeyBiryukov. Fixes #65423. git-svn-id: https://develop.svn.wordpress.org/trunk@62634 602fd350-edb4-49c9-b593-d223f7449a82
This brings the `WP_Error` class to full PHPStan rule level 10 compliance. Also make use of null coalescing operator where appropriate, and simplify `has_errors()` method. Developed in WordPress#12405. Follow-up to r42761, r49115, r49116. See #64898, #64897. git-svn-id: https://develop.svn.wordpress.org/trunk@62635 602fd350-edb4-49c9-b593-d223f7449a82
…p()` and `::chown()`. This applies the equivalent fix which had previously been done to `::chmod()`. Tests are added for all three methods. Developed in subset of WordPress#11593. Follow-up to r12997. Fixes #65584. See #65409, WordPress#11261. git-svn-id: https://develop.svn.wordpress.org/trunk@62636 602fd350-edb4-49c9-b593-d223f7449a82
Change the optional constructor argument of `WP_Filesystem_FTPext`, `WP_Filesystem_ftpsockets`, and `WP_Filesystem_SSH2` from an empty string default to an empty `array`, matching how the argument is actually consumed, and improve the associated DocBlocks. These classes were also brought to adherence with PHPStan rule level 10: * Add `FileListing` and `Options` array shapes, and initialize each transport's `$options` to a complete default array before any early return. * Correct several inaccurate `@return` descriptions, including the `group()` methods that had been describing the owner. * Allow `WP_Filesystem_SSH2::connect()` to be retried after a failed connection attempt. * Stop `WP_Filesystem_FTPext::parselisting()` from leaking its intermediate date-parsing keys into the returned listing. * Add `ext-ftp` and `ext-ssh2` to the suggested extensions in `composer.json`. Developed in WordPress#11593. Follow-up to r62635, r62636. Props soean, westonruter, mukesh27. See #65584, #64898. Fixes #65409. git-svn-id: https://develop.svn.wordpress.org/trunk@62637 602fd350-edb4-49c9-b593-d223f7449a82
…ve links. WordPress admin standardizes destructive `<button>` styling with the `.button-link-delete` class, but there is no equivalent for destructive `<a>` links. Plugin and theme authors wanting that style had to reuse core selectors that do not fit their use case or recreate the color rules by hand. Add `.delete-link` alongside `.button-link-delete` in the admin color scheme so destructive action links render in the scheme's alert red, with the same lightened hover and focus color. Because the admin `<body>` carries the `wp-core-ui` class and every admin page loads a color scheme, the class is available on any admin page, including custom plugin and theme screens. See #36882.
|
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 Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @SergeyBiryukov602fd350-edb4-49c9-b593-d223f7449a82. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a reusable
.delete-linkadmin CSS class so plugin and theme authors have a standard class for destructive action links, mirroring the existing.button-link-deleteclass used for destructive<button>elements.What the problem was:
<button>styling via.button-link-delete(added in [40052] / #35126), but there is no equivalent class for destructive<a>links.What the fix does:
.delete-linkalongside.button-link-deletein the admin color scheme (_admin.scss), for both the base color and the hover/focus color.Approach and why:
<body>carries thewp-core-uiclass and every admin page loads a compiled color scheme, so.wp-core-ui .delete-linkis available on any admin page, including custom plugin/theme screens — no separatecommon.cssrule is needed..button-link-delete, which needs.button-linkto make a<button>look like a link, an<a>already looks like a link, so only the destructive color is required.$alert-redtoken and lightened hover/focus, so it stays consistent across all color schemes.Trac ticket: https://core.trac.wordpress.org/ticket/36882
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 4.8
Used for: Ticket analysis and verification. All changes were reviewed, validated against the codebase, and are taken responsibility for by me.
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.