Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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