Skip to content

fix: use SVG data URI for menu icon so it renders on all admin pages#773

Merged
superdav42 merged 1 commit intomainfrom
bugfix/fix-menu-icon
Apr 10, 2026
Merged

fix: use SVG data URI for menu icon so it renders on all admin pages#773
superdav42 merged 1 commit intomainfrom
bugfix/fix-menu-icon

Conversation

@superdav42
Copy link
Copy Markdown
Collaborator

Summary

  • The Ultimate Multisite menu icon was missing on non-WU admin pages because it relied on the dashicons-wu-wp-ultimo CSS class from admin.css, which is only enqueued on WP Ultimo pages
  • Replaced with an inline SVG data URI (extracted from the existing dashicons-wu font glyph) that WordPress renders natively via add_menu_page(), requiring no external CSS
  • Added a MENU_ICON_SVG constant on Base_Admin_Page so all top-level menu pages share the same icon source

Files changed

  • inc/admin-pages/class-base-admin-page.php — added MENU_ICON_SVG constant
  • inc/admin-pages/class-dashboard-admin-page.php — use constant in init()
  • inc/admin-pages/class-multisite-setup-admin-page.php — use constant in constructor
  • inc/admin-pages/class-setup-wizard-admin-page.php — use constant in constructor
  • inc/admin-pages/class-settings-admin-page.php — cleared unused property (submenu)
  • tests/Admin_Pages/Dashboard_Admin_Page_Test.php — updated assertion

Testing

  • PHP syntax check passes on all modified files
  • Self-assessed: low risk (icon-only change, no logic changes)

The menu icon used the CSS class dashicons-wu-wp-ultimo, defined in
admin.css which is only enqueued on WP Ultimo pages. On all other admin
pages the sidebar menu item had no icon.

Replace with an inline SVG data URI (extracted from the dashicons-wu
font glyph) which WordPress renders natively via add_menu_page(),
removing the dependency on admin.css being loaded.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 10, 2026

Warning

Rate limit exceeded

@superdav42 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 2 minutes and 26 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 2 minutes and 26 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 83c20170-8c64-4539-bbcc-ffb4385dddfb

📥 Commits

Reviewing files that changed from the base of the PR and between f16659e and e83bf27.

📒 Files selected for processing (6)
  • inc/admin-pages/class-base-admin-page.php
  • inc/admin-pages/class-dashboard-admin-page.php
  • inc/admin-pages/class-multisite-setup-admin-page.php
  • inc/admin-pages/class-settings-admin-page.php
  • inc/admin-pages/class-setup-wizard-admin-page.php
  • tests/Admin_Pages/Dashboard_Admin_Page_Test.php
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bugfix/fix-menu-icon

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@superdav42 superdav42 merged commit bab51c6 into main Apr 10, 2026
7 checks passed
@superdav42
Copy link
Copy Markdown
Collaborator Author

Summary

  • The Ultimate Multisite menu icon was missing on non-WU admin pages because it relied on the dashicons-wu-wp-ultimo CSS class from admin.css, which is only enqueued on WP Ultimo pages
  • Replaced with an inline SVG data URI (extracted from the existing dashicons-wu font glyph) that WordPress renders natively via add_menu_page(), requiring no external CSS
  • Added a MENU_ICON_SVG constant on Base_Admin_Page so all top-level menu pages share the same icon source

Files changed

  • inc/admin-pages/class-base-admin-page.php — added MENU_ICON_SVG constant
  • inc/admin-pages/class-dashboard-admin-page.php — use constant in init()
  • inc/admin-pages/class-multisite-setup-admin-page.php — use constant in constructor
  • inc/admin-pages/class-setup-wizard-admin-page.php — use constant in constructor
  • inc/admin-pages/class-settings-admin-page.php — cleared unused property (submenu)
  • tests/Admin_Pages/Dashboard_Admin_Page_Test.php — updated assertion

Testing

  • PHP syntax check passes on all modified files
  • Self-assessed: low risk (icon-only change, no logic changes)

Merged via PR #773 to main.
Merged by deterministic merge pass (pulse-wrapper.sh).


aidevops.sh v3.6.224 spent 6m on this as a headless bash routine.

@github-actions
Copy link
Copy Markdown

🔨 Build Complete - Ready for Testing!

📦 Download Build Artifact (Recommended)

Download the zip build, upload to WordPress and test:

🌐 Test in WordPress Playground (Very Experimental)

Click the link below to instantly test this PR in your browser - no installation needed!
Playground support for multisite is very limitied, hopefully it will get better in the future.

🚀 Launch in Playground

Login credentials: admin / password

@github-actions
Copy link
Copy Markdown

Performance Test Results

Performance test results for 460d5f7 are in 🛎️!

Note: the numbers in parentheses show the difference to the previous (baseline) test run. Differences below 2% or 0.5 in absolute values are not shown.

URL: /

Run DB Queries Memory Before Template Template WP Total LCP TTFB LCP - TTFB
0 41 37.78 MB 844.00 ms (-55.50 ms / -7% ) 146.00 ms (-7.00 ms / -5% ) 1052.00 ms (-55.00 ms / -5% ) 1978.00 ms (-100.00 ms / -5% ) 1884.45 ms (-96.70 ms / -5% ) 88.70 ms (-2.55 ms / -3% )
1 56 49.02 MB 958.00 ms 143.50 ms 1102.50 ms 2098.00 ms 2008.95 ms 82.10 ms (+1.90 ms / +2% )

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.

1 participant