Skip to content

Instantly share code, notes, and snippets.

@arjenblokzijl
Created August 19, 2016 09:17
Show Gist options
  • Save arjenblokzijl/324729a83539ccd998120782856a8f06 to your computer and use it in GitHub Desktop.
Save arjenblokzijl/324729a83539ccd998120782856a8f06 to your computer and use it in GitHub Desktop.
ProcessWire delete unused Fields
<?php namespace ProcessWire;
include("../index.php");
foreach (wire('fields') as $f) {
if (count($f->getFieldgroups())) continue;
echo $f->name . "<hr>";
wire('fields')->delete($f);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment