Skip to content

Conversation

@colinswinney
Copy link

Description of the Change

This PR migrates the fueled-movies-complete theme to use the 10up Framework and fixes critical issues preventing the 10up-plugin mu-plugin from functioning after the theme switch. The migration introduces proper module-based architecture while resolving compatibility issues between the theme and mu-plugin.

Theme Migration to 10up Framework:

  • Added ThemeCore.php class implementing proper wp-framework ModuleInitialization system
  • Updated Assets.php to use wp-framework's Module trait and GetAssetInfo functionality
  • Added Blocks.php and TemplateTags.php classes following wp-framework patterns
  • Updated composer.json to include 10up/wp-framework dependency
  • Implemented proper autoloading with PSR-4 namespace FueledMoviesTheme\
  • Added framework dependency checks and error handling

Mu-plugin Compatibility Fixes:

  • Added missing Module trait to Assets.php class
  • Added missing Module trait to AbstractPostMeta.php class (affects all PostMeta classes)
  • These changes restore proper module registration and enable post meta fields to work in the block editor

Build System Configuration Fixes:

  • Fixed mu-plugin package.json to reference correct theme directory (fueled-movies-complete instead of 10up-theme)
  • Fixed theme package.json name to match actual directory name
  • Fixed root package.json workspace script references to use correct theme name

Verification steps:

  • Theme properly initializes using wp-framework ModuleInitialization system
  • Post meta fields now properly register (tenup_movie_mpa_rating confirmed working)
  • Assets class is now discoverable by ModuleInitialization system
  • Block editor components can now access localized JavaScript globals (TenupMovieMPARating)
  • Build system can properly resolve theme asset paths
  • All PostMeta classes inherit proper Module functionality through AbstractPostMeta

Benefits:

  • Modernizes theme architecture using 10up Framework standards
  • Restores full functionality of the mu-plugin after theme migration
  • Post meta fields appear correctly in the block editor
  • Scripts and styles are properly enqueued using framework patterns
  • Build system works correctly with new theme structure
  • Maintains consistency with 10up coding standards and patterns

Alternative considered:

  • Manual module registration was attempted but the proper solution was adding the missing Module traits as per wp-framework conventions
  • Considered keeping old theme structure but migrating to framework provides better long-term maintainability

Closes #

How to test the Change

  1. Switch to the fueled-movies-complete theme
  2. Verify theme loads without errors and framework dependencies are met
  3. Edit a movie post in the WordPress admin
  4. Verify that post meta fields appear in the block editor sidebar
  5. Check browser console for absence of TenupMovieMPARating is not defined errors
  6. Confirm that post meta values can be saved and retrieved
  7. Verify that admin scripts and styles are properly enqueued
  8. Run npm run build to ensure build system works with new theme references
  9. Test that all workspace commands (npm run watch:theme, npm run watch:plugin) work correctly
  10. Verify theme assets (CSS/JS) load correctly on frontend

Changelog Entry

Changed - Migrated theme to 10up Framework and fixed mu-plugin compatibility issues

Credits

Props @colinswinney

Checklist:

@colinswinney colinswinney marked this pull request as ready for review September 15, 2025 17:16
@colinswinney colinswinney self-assigned this Sep 15, 2025
@colinswinney colinswinney merged commit 3a3c7ec into feature/movie-post-meta-panels Jan 22, 2026
4 checks passed
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