Open Ramoonus opened 10 years ago
This is already possible. @ipstenu does this, last I checked. Are you asking for this to be the default, or to work without using a filter?
@ipstenu do you have a link for me?
Never bothered to post it online, but :
// I Make Plugins Filters
add_filter ('i-make-plugins__post_type', 'halfelf_imp_posttype');
function halfelf_imp_posttype() {
return 'plugins';
}
add_filter ('i-make-plugins__get_plugins', 'halfelf_imp_getplugins');
function halfelf_imp_getplugins($options) {
unset($options[post_parent]);
return $options;
}
add_filter ('i-make-plugins__is_plugin', 'halfelf_imp_isplugin', 10, 2);
function halfelf_imp_isplugin($is_plugin, $post) {
$post = get_post($post);
return $post->post_type === 'plugins';
}
@markjaquith is it an idea to change the core from post_type page to post_type plugin?
@Ipstenu thanks! this is what I was looking for I have made over 25 small plugins but its ruining the pages management
by changing a single line from page to a different CPT, its possible to reduce the amount of pages on a site, while moving all WordPress plugins into an extra CPT this cleans up the pages for users with a lot of plugins (like myself)