Skip to content

Instantly share code, notes, and snippets.

View microneer's full-sized avatar

Michael Fielding microneer

  • Auckland, New Zealand
View GitHub Profile
@microneer
microneer / gist:abe764ae031e88c5b0919b661a0c8ff9
Last active November 16, 2017 14:52 — forked from swalkinshaw/gist:2695510
WordPress: Mandatory Excerpt
// put this in functions.php or in your custom plugin or theme code.
$m = new Mandatory_Excerpt()
$m->add('post', 20 ); // will require all 'post' post types to have an excerpt at least 20 characters long
/**
* Helper class which removes specified metaboxes from specified pages. It manages setting up the hooks
* and calling them.
*
* @author: Michael Fielding
*