Created
April 10, 2015 18:58
-
-
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.
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
/** | |
* 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