Skip to content

Instantly share code, notes, and snippets.

@curtismchale
Created April 10, 2015 18:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save curtismchale/914b1453b9e6f761912b to your computer and use it in GitHub Desktop.
Save curtismchale/914b1453b9e6f761912b to your computer and use it in GitHub Desktop.
Lets you change the allowed CPT's that show the 'Remove from Menu' or 'Remove from My Account' checkboxes.
/**
* Changes the post types that show the 'remove from menu' and 'remove from my account' checkboxes in the WordPress admin
*
* @param array $types required The existing allowed CPTs
* @return array $types Our modified array of CPTs
*/
function change_allowed( $types ){
$types[] = 'forum'; // change this to your registered custom post type name
return $types;
}
add_filter( 'wecr_allowed_meta_post_types', 'change_allowed' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment