remove_post_type_support

Remove support for a feature from a post type.

Description

remove_post_type_support( (string) $post_type, (string) $feature ); 

Parameters (2)

0. $post_type (string)
The post type for which to remove the feature.
1. $feature (string)
The feature being removed.

Usage

  1. if ( !function_exists( 'remove_post_type_support' ) ) { 
  2. require_once ABSPATH . WPINC . '/post.php'; 
  3.  
  4. // The post type for which to remove the feature. 
  5. $post_type = ''; 
  6.  
  7. // The feature being removed. 
  8. $feature = ''; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = remove_post_type_support($post_type, $feature); 
  12.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/post.php  
  1. function remove_post_type_support( $post_type, $feature ) { 
  2. global $_wp_post_type_features; 
  3.  
  4. unset( $_wp_post_type_features[ $post_type ][ $feature ] );