Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion inc/admin-pages/class-base-admin-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ abstract class Base_Admin_Page {
* @since 2.5.2
* @var string
*/
const MENU_ICON_SVG = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGZpbGw9ImJsYWNrIiB0cmFuc2Zvcm09InNjYWxlKDEsLTEpIHRyYW5zbGF0ZSgwLC0xMDI0KSIgZD0iTTQ0OS41OTYgNTIwLjU0bDI5OC4xNjQgNDUyLjI1OS0yMDUuMDAzLTQ4Ni4wODR6TTU3Ni4wNTggNDAxLjA2MGwtMjk4LjE2NC00NTIuMjU5IDIwNS4wMDMgNDg2LjA3OHpNNDQ5LjU5NiA1MTguMDYybDMzLjI2NC04MS40MDUgOTMuNTYyLTM0LjA2NC0zMy43ODIgODEuOTE2ek02NzUuNTk2IDcwNy4zMTljODEuODM5LTUzLjQ1OSAxMzUuOTE4LTE0NS44NzYgMTM1LjkxOC0yNTAuOTI0IDAtMTY1LjQxOS0xMzQuMDk1LTI5OS41MDUtMjk5LjUxNS0yOTkuNTA1LTE3LjAxNSAwLTMzLjY4IDEuNDE4LTQ5LjkxOSA0LjE0Mmw0Ni4zNDEgNzMuNzk5YzIuMzE2LTAuMDc1IDQuNjQ0LTAuMTE1IDYuOTc2LTAuMTE1IDEyMC42OTkgMCAyMTguNTQyIDk3Ljg0NCAyMTguNTQyIDIxOC41NDIgMCA3Mi41OTgtMzUuNCAxMzYuOTM3LTg5Ljg3OCAxNzYuNjc5ek01MTIgNzU1LjkwMWMxNy43MjUgMCAzNS4wOTYtMS41MzkgNTEuOTgtNC40OTVsLTUxLjEzNi03OS42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copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Decode the base64 SVG and verify it matches dashicons-networking from WordPress core

# Decode the new base64 SVG constant
echo "Decoding the new SVG from MENU_ICON_SVG constant:"
echo "PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMCI+PHBhdGggZmlsbD0iYmxhY2siIGQ9Ik0xOCAxM2gxYy41NSAwIDEgLjQ1IDEgMS4wMXYyLjk4YzAgLjU2LS40NSAxLjAxLTEgMS4wMWgtNGMtLjU1IDAtMS0uNDUtMS0xLjAxdi0yLjk4YzAtLjU2LjQ1LTEuMDEgMS0xLjAxaDF2LTJoLTV2MmgxYy41NSAwIDEgLjQ1IDEgMS4wMXYyLjk4YzAgLjU2LS40NSAxLjAxLTEgMS4wMUg4Yy0uNTUgMC0xLS40NS0xLTEuMDF2LTIuOThjMC0uNTYuNDUtMS4wMSAxLTEuMDFoMXYtMkg0djJoMWMuNTUgMCAxIC40NSAxIDEuMDF2Mi45OEM2IDE3LjU1IDUuNTUgMTggNSAxOEgxYy0uNTUgMC0xLS40NS0xLTEuMDF2LTIuOThDMCAxMy40NS40NSAxMyAxIDEzaDF2LTJjMC0xLjEuOS0yIDItMmg1VjdIOGMtLjU1IDAtMS0uNDUtMS0xLjAxVjMuMDFDNyAyLjQ1IDcuNDUgMiA4IDJoNGMuNTUgMCAxIC40NSAxIDEuMDF2Mi45OEMxMyA2LjU1IDEyLjU1IDcgMTIgN2gtMXYyaDVjMS4xIDAgMiAuOSAyIDJ2MnoiLz48L3N2Zz4=" | base64 -d
echo ""
echo ""

# Try to find the WordPress core dashicons.svg file
echo "Searching for WordPress core dashicons.svg file:"
fd -t f "dashicons.svg" /usr /var 2>/dev/null | head -5 || echo "dashicons.svg not found in common WordPress locations"
echo ""

# If WordPress is installed locally, extract the dashicons-networking path
if command -v wp &> /dev/null; then
    echo "WordPress CLI detected. Checking WordPress version:"
    wp --version 2>/dev/null || echo "WP-CLI not available in this environment"
fi

Repository: Ultimate-Multisite/ultimate-multisite

Length of output: 727


🌐 Web query:

WordPress dashicons-networking icon SVG path glyph f325

💡 Result:

The dashicons-networking icon (CSS class: dashicons-networking) is the official WordPress Dashicons icon for networking/social sharing, located in the Social category per official documentation. It corresponds to the Unicode glyph U+f325 in the Dashicons font. The raw SVG path data (glyph) is available in the official WordPress Dashicons GitHub repository at sources/svg/networking.svg. Download/view the raw SVG from https://github.com/WordPress/dashicons/blob/master/sources/svg/networking.svg?raw=true for the complete definition. Iconify also hosts it as dashicons:networking with SVG export available.

Citations:


🏁 Script executed:

#!/bin/bash
# Fetch the official WordPress dashicons-networking SVG and compare

echo "Fetching official WordPress dashicons-networking SVG..."
official_svg=$(curl -s "https://raw.githubusercontent.com/WordPress/dashicons/master/sources/svg/networking.svg")

if [ -z "$official_svg" ]; then
    echo "Failed to fetch official SVG. Trying alternative source..."
    # Try the icon-sets/iconify API
    official_svg=$(curl -s "https://api.iconify.design/dashicons:networking.svg")
fi

echo "Official SVG from WordPress Dashicons repository:"
echo "$official_svg"
echo ""
echo ""

# Extract just the path d attribute from official
echo "Path from official SVG:"
echo "$official_svg" | grep -oP 'd="[^"]*"' || echo "Could not extract path"

# The decoded SVG path from the PR
pr_path='d="M18 13h1c.55 0 1 .45 1 1.01v2.98c0 .56-.45 1.01-1 1.01h-4c-.55 0-1-.45-1-1.01v-2.98c0-.56.45-1.01 1-1.01h1v-2h-5v2h1c.55 0 1 .45 1 1.01v2.98c0 .56-.45 1.01-1 1.01H8c-.55 0-1-.45-1-1.01v-2.98c0-.56.45-1.01 1-1.01h1v-2H4v2h1c.55 0 1 .45 1 1.01v2.98C6 17.55 5.55 18 5 18H1c-.55 0-1-.45-1-1.01v-2.98C0 13.45.45 13 1 13h1v-2c0-1.1.9-2 2-2h5V7H8c-.55 0-1-.45-1-1.01V3.01C7 2.45 7.45 2 8 2h4c.55 0 1 .45 1 1.01v2.98C13 6.55 12.55 7 12 7h-1v2h5c1.1 0 2 .9 2 2v2z"'

echo ""
echo "Path from PR SVG:"
echo "$pr_path"

Repository: Ultimate-Multisite/ultimate-multisite

Length of output: 2093


🏁 Script executed:

#!/bin/bash

# Normalize and compare the two SVG paths
python3 << 'PYTHON_EOF'
import re

official = "M18 13h1c0.55 0 1 0.45 1 1.010v2.98c0 0.56-0.45 1.010-1 1.010h-4c-0.55 0-1-0.45-1-1.010v-2.98c0-0.56 0.45-1.010 1-1.010h1v-2h-5v2h1c0.55 0 1 0.45 1 1.010v2.98c0 0.56-0.45 1.010-1 1.010h-4c-0.55 0-1-0.45-1-1.010v-2.98c0-0.56 0.45-1.010 1-1.010h1v-2h-5v2h1c0.55 0 1 0.45 1 1.010v2.98c0 0.56-0.45 1.010-1 1.010h-4c-0.55 0-1-0.45-1-1.010v-2.98c0-0.56 0.45-1.010 1-1.010h1v-2c0-1.1 0.9-2 2-2h5v-2h-1c-0.55 0-1-0.45-1-1.010v-2.98c0-0.56 0.45-1.010 1-1.010h4c0.55 0 1 0.45 1 1.010v2.98c0 0.56-0.45 1.010-1 1.010h-1v2h5c1.1 0 2 0.9 2 2v2z"

pr_path = "M18 13h1c.55 0 1 .45 1 1.01v2.98c0 .56-.45 1.01-1 1.01h-4c-.55 0-1-.45-1-1.01v-2.98c0-.56.45-1.01 1-1.01h1v-2h-5v2h1c.55 0 1 .45 1 1.01v2.98c0 .56-.45 1.01-1 1.01H8c-.55 0-1-.45-1-1.01v-2.98c0-.56.45-1.01 1-1.01h1v-2H4v2h1c.55 0 1 .45 1 1.01v2.98C6 17.55 5.55 18 5 18H1c-.55 0-1-.45-1-1.01v-2.98C0 13.45.45 13 1 13h1v-2c0-1.1.9-2 2-2h5V7H8c-.55 0-1-.45-1-1.01V3.01C7 2.45 7.45 2 8 2h4c.55 0 1 .45 1 1.01v2.98C13 6.55 12.55 7 12 7h-1v2h5c1.1 0 2 .9 2 2v2z"

print("=== PATH COMPARISON ===\n")
print(f"Official length: {len(official)}")
print(f"PR path length: {len(pr_path)}")
print()

# Check for absolute coordinate commands in PR
pr_uppercase = [m.group() for m in re.finditer(r'[A-Z]', pr_path)]
official_uppercase = [m.group() for m in re.finditer(r'[A-Z]', official)]

print("Uppercase commands (absolute coordinates) in Official:", official_uppercase)
print("Uppercase commands (absolute coordinates) in PR:", pr_uppercase)
print()

# Find sections with uppercase in PR
pr_sections = re.findall(r'[A-Z][^A-Z]*', pr_path)
print("Sections with absolute commands in PR:")
for i, section in enumerate(pr_sections):
    if section[0].isupper():
        print(f"  {i}: {section[:50]}...")
print()

# Check for presence of specific markers
if "V7" in pr_path:
    print("⚠️  PR contains 'V7' (vertical absolute movement) - NOT in official")
if "V3.01" in pr_path:
    print("⚠️  PR contains 'V3.01' (vertical absolute movement) - NOT in official")
if "H8" in pr_path or "H4" in pr_path or "H1" in pr_path:
    print("⚠️  PR contains absolute horizontal movements (H8, H4, H1, etc.) - NOT in official")
if "C6" in pr_path or "C13" in pr_path:
    print("⚠️  PR contains absolute curve commands (C6, C13, etc.) - NOT in official")

print()
print("CONCLUSION: The SVG paths are DIFFERENT and will NOT render the same icon!")

PYTHON_EOF

Repository: Ultimate-Multisite/ultimate-multisite

Length of output: 1164


The SVG path does not match the official WordPress dashicons-networking icon and will not render correctly.

The path in the PR contains absolute coordinate commands (H8, H4, H1, V7, V3.01, C6, C13, etc.) that are not in the official WordPress core dashicons-networking SVG. The official icon uses only relative coordinates. This mismatch will cause the icon to render incorrectly.

Use the correct path from WordPress core dashicons:

Correct SVG constant
const MENU_ICON_SVG = 'data:image/svg+xml;base64,' . base64_encode('<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M18 13h1c0.55 0 1 0.45 1 1.010v2.98c0 0.56-0.45 1.010-1 1.010h-4c-0.55 0-1-0.45-1-1.010v-2.98c0-0.56 0.45-1.010 1-1.010h1v-2h-5v2h1c0.55 0 1 0.45 1 1.010v2.98c0 0.56-0.45 1.010-1 1.010h-4c-0.55 0-1-0.45-1-1.010v-2.98c0-0.56 0.45-1.010 1-1.010h1v-2h-5v2h1c0.55 0 1 0.45 1 1.010v2.98c0 0.56-0.45 1.010-1 1.010h-4c-0.55 0-1-0.45-1-1.010v-2.98c0-0.56 0.45-1.010 1-1.010h1v-2c0-1.1 0.9-2 2-2h5v-2h-1c-0.55 0-1-0.45-1-1.010v-2.98c0-0.56 0.45-1.010 1-1.010h4c0.55 0 1 0.45 1 1.010v2.98c0 0.56-0.45 1.010-1 1.010h-1v2h5c1.1 0 2 0.9 2 2v2z"></path></svg>');
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@inc/admin-pages/class-base-admin-page.php` at line 34, The MENU_ICON_SVG
constant in class-base-admin-page.php contains an incorrect SVG path (absolute
commands) that doesn't match WordPress core dashicons-networking; replace the
current base64 SVG string in the const MENU_ICON_SVG with the correct
dashicons-networking SVG (use the official path from WordPress core, encoded as
data:image/svg+xml;base64,...), ensuring the path uses the correct relative
coordinates and matches the core markup exactly so the icon renders properly in
the admin menu.


/**
* In Edit mode
Expand Down
Loading