dwindown
7e87e18a43
fix: Correct asset paths for WP-Admin and standalone media styles
🐛 CRITICAL FIX - Asset Path Issue:
1. WP-Admin Assets Not Loading:
❌ Old path: includes/Admin/../admin-spa/dist/
✅ New path: /plugin-root/admin-spa/dist/
Problem: Relative path from includes/Admin/ was wrong
Solution: Use dirname(__DIR__) to get plugin root, then build absolute path
Before:
- CSS exists: no
- JS exists: no
After:
- CSS exists: yes (2.4MB)
- JS exists: yes (70KB)
2. Standalone Media Library Styling:
❌ Missing WordPress core styles (buttons, dashicons)
✅ Added wp_print_styles for buttons and dashicons
Problem: Media modal had unstyled text/buttons
Solution: Enqueue all required WordPress media styles
Styles now loaded:
- media-views (modal structure)
- imgareaselect (image selection)
- buttons (WordPress buttons)
- dashicons (icons)
📝 Debug logs now show:
[WooNooW Assets] Dist dir: /home/.../woonoow/admin-spa/dist/
[WooNooW Assets] CSS exists: yes
[WooNooW Assets] JS exists: yes
🎯 Result:
- WP-Admin SPA now loads correctly
- Standalone media library properly styled
- Both modes fully functional
2025-11-16 13:17:47 +07:00
..
2025-11-16 13:17:47 +07:00
2025-11-16 10:29:36 +07:00
2025-11-11 09:49:31 +07:00
2025-11-15 21:59:46 +07:00
2025-11-15 20:05:50 +07:00
2025-11-10 23:18:56 +07:00