Determine Which Theme Files are Actually in Use

Is there a fancy (or mundane) function that will show which theme files are actually in use vs those that came along for the ride in previous upgrades?

I've got a number of Widget-{widget name} files that I think came along from v10 to v11 and are now not flagged as changed in v12 but are flagged as new in comparison to factory defaults. I think I can probably delete them, but looking for a gut check on if they're actually being called/relied upon by a widget.

  • Do you mean physical widget files named widget-* that are still remaining post-upgrade to where all widgets are named according to their IDs? Can you provide an example and path if so?

  • Yeah I probably didn't explain that well... In the Theme Studio, these files show as different from site defaults and are categorized in the theme structure as Style Sheet Includes:

    In the preview state from upgrading from v11 to v12, they didn't show as changed when viewing that comparison (probably because they were actually left over from v10 so the platform rightfully treated them as custom files not to be changed by defaults is my thinking).

    I'm hoping that I could see if there is a way to know if these files that are categorized as includes are indeed included without manually reviewing every file. I suspect I can delete them, but with so many left over, looking for a warm fuzzy on if that's real or if I'm about to have a very bad day.

    (Ignoring variables.less at the top of that screenshot. I know what's up with that one.)

  • As part of the introduction of Theme Studio in 10.2, out-of-the-box Social theme widgets now include their own style sheets. That is, widget-*.less files have been removed from living inside the theme in favor of being actual widget attachments usually named style.less with access to the same theme configuration APIs as the theme's own scripts. So, these could be safe to remove if your corresponding widgets are in a default state and didn't rely on any potential changes made to those widget-* files.