Created
August 19, 2016 09:17
-
-
Save arjenblokzijl/324729a83539ccd998120782856a8f06 to your computer and use it in GitHub Desktop.
ProcessWire delete unused Fields
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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