Skip to content

Follow up fixes to r62282#11735

Open
desrosj wants to merge 7 commits intoWordPress:trunkfrom
desrosj:trac/65121
Open

Follow up fixes to r62282#11735
desrosj wants to merge 7 commits intoWordPress:trunkfrom
desrosj:trac/65121

Conversation

@desrosj
Copy link
Copy Markdown
Member

@desrosj desrosj commented May 6, 2026

Follow up to r62282.

  • Adds the case-insensitive flag to the matching JavaScript Regex.
  • Guards against a TypeError if the admin bar element has been moved or manipulated in some way.

Trac ticket: Core-65121.

Use of AI Tools

AI assistance: Yes
Tool(s): Claude
Model(s): Opus 4.7
Used for: Used Claude to analyze the previous changeset to try and find potential issues. Validated them before fixing here in the PR.


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.

@desrosj desrosj self-assigned this May 6, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

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 props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props desrosj.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Test using WordPress Playground

The 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

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

Comment thread .github/dependabot.yml

updates:
# Check for updates to GitHub Actions.
- package-ecosystem: "github-actions"
Comment thread .github/dependabot.yml
- "*"

# Check for updates to Composer packages.
- package-ecosystem: "composer"
Comment thread .github/dependabot.yml
- "composer/ca-bundle"

# Monitor some npm dependencies for updates in groups.
- package-ecosystem: "npm"
Comment thread .github/dependabot.yml
- "underscore"

# Monitor npm dependencies within default themes.
- package-ecosystem: "npm"
Comment thread .github/dependabot.yml
- "**browserslist*"
- "*css*"

- package-ecosystem: "npm"
Comment thread .github/dependabot.yml
- "**browserslist*"
- "*css*"

- package-ecosystem: "npm"
Comment thread .github/dependabot.yml
- "minimist"
- "npm-run-all"

- package-ecosystem: "npm"
Comment thread .github/dependabot.yml
- "concurrently"
- "@wordpress/scripts"

- package-ecosystem: "npm"
( applePattern, appleOSLabel ) => {
if ( ( new RegExp( applePattern ) ).test( navigator.userAgent ) ) {
document.querySelector( '#wp-admin-bar-command-palette .ab-label kbd' ).textContent = appleOSLabel;
if ( ! ( new RegExp( applePattern, 'i' ) ).test( navigator.userAgent ) ) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. This matches the case insensitivity in PHP:

preg_match( "/{$apple_pattern}/i", $_SERVER['HTTP_USER_AGENT'] ?? '' );

Copy link
Copy Markdown
Member

@westonruter westonruter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes to src/wp-includes/admin-bar.php look good to me.

The changes in .github I will defer to your expertise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants