Fix avatar and social icons with bulletproof rendering
Release / Build & publish plugin zip (push) Successful in 7s
Release / Build & publish plugin zip (push) Successful in 7s
Root cause of social icons rendering as alt text: wp_kses() stripped the 'data:' prefix from data: URIs in img.src, leaving a relative URL that 404s. Switched to real .svg files under assets/icons/ referenced via plugins_url() — kses passes img tags with relative URLs cleanly, and the icons load as standard images. Root cause of avatar still being cropped: layout-side issues with inline-styled <img> in a flex layout. Switched to a <span> with inline background-image, background-size: cover, background-position: center — no <img> element, no object-fit reliance, no way to crop wrong. Also removed the outer <a> wrapper around the .project-owner div (block-level element inside inline <a> is invalid HTML and was likely contributing to layout weirdness). The owner name is now an explicit <a> inside its own span. Reverted kses to the default wp_kses_post() since we're back to standard HTML elements only — no SVG, no data URIs, no inline styles that need a custom allowed list.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="#0073aa" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/><path d="M8 17c1 -2 1.5 -4 .5 -6s-.5 -4 .5 -6"/><path d="M15 11c.667 -1 1.667 -2.333 3 -4"/></svg>
|
||||
|
After Width: | Height: | Size: 282 B |
Reference in New Issue
Block a user