WP_Post_Type::remove_supports() WordPress Method
The WP_Post_Type::remove_supports() method is used to remove support for a given feature from a post type. This is useful if you want to de-register support for something like post thumbnails, which can be resource intensive, or if you want to change the way that your content is displayed and don't want certain features to be available. You can use the remove_supports() method like this: $post_type_object = get_post_type_object( 'my_post_type' ); $post_type_object->remove_supports( 'thumbnail' );
WP_Post_Type::remove_supports() #
Removes the features support for the post type.
Source
File: wp-includes/class-wp-post-type.php
public function remove_supports() { global $_wp_post_type_features; unset( $_wp_post_type_features[ $this->name ] ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.6.0 | Introduced. |