diff --git a/wp-includes/post.php b/wp-includes/post.php
index e09e1de..a430dba 100644
|
a
|
b
|
function _add_post_type_submenus() {
|
| 1751 | 1751 | * @global array $_wp_post_type_features |
| 1752 | 1752 | * |
| 1753 | 1753 | * @param string $post_type The post type for which to add the feature. |
| 1754 | | * @param string|array $feature The feature being added, accepts an array of |
| | 1754 | * @param string|array $features The feature being added, accepts an array of |
| 1755 | 1755 | * feature strings or a single string. |
| 1756 | 1756 | */ |
| 1757 | | function add_post_type_support( $post_type, $feature ) { |
| | 1757 | function add_post_type_support( $post_type, $features ) { |
| 1758 | 1758 | global $_wp_post_type_features; |
| 1759 | 1759 | |
| 1760 | | $features = (array) $feature; |
| 1761 | | foreach ($features as $feature) { |
| 1762 | | if ( func_num_args() == 2 ) |
| 1763 | | $_wp_post_type_features[$post_type][$feature] = true; |
| 1764 | | else |
| 1765 | | $_wp_post_type_features[$post_type][$feature] = array_slice( func_get_args(), 2 ); |
| | 1760 | foreach ( (array) $features as $feature ) { |
| | 1761 | if ( func_num_args() == 2 ) { |
| | 1762 | $_wp_post_type_features[ $post_type ][ $feature ] = true; |
| | 1763 | } else { |
| | 1764 | $_wp_post_type_features[ $post_type ][ $feature ] = array_slice( func_get_args(), 2 ); |
| | 1765 | } |
| 1766 | 1766 | } |
| 1767 | 1767 | } |
| 1768 | 1768 | |
| … |
… |
function add_post_type_support( $post_type, $feature ) {
|
| 1773 | 1773 | * |
| 1774 | 1774 | * @global array $_wp_post_type_features |
| 1775 | 1775 | * |
| 1776 | | * @param string $post_type The post type for which to remove the feature. |
| 1777 | | * @param string $feature The feature being removed. |
| | 1776 | * @param string $post_type The post type for which to remove the feature. |
| | 1777 | * @param string|array $features The feature being removed, accepts an array of |
| | 1778 | * feature strings or a single string. |
| 1778 | 1779 | */ |
| 1779 | | function remove_post_type_support( $post_type, $feature ) { |
| | 1780 | function remove_post_type_support( $post_type, $features ) { |
| 1780 | 1781 | global $_wp_post_type_features; |
| 1781 | 1782 | |
| 1782 | | unset( $_wp_post_type_features[ $post_type ][ $feature ] ); |
| | 1783 | foreach ( (array) $features as $feature ) { |
| | 1784 | if ( isset( $_wp_post_type_features[ $post_type ][ $feature ] ) ) { |
| | 1785 | unset( $_wp_post_type_features[ $post_type ][ $feature ] ); |
| | 1786 | } |
| | 1787 | } |
| 1783 | 1788 | } |
| 1784 | 1789 | |
| 1785 | 1790 | /** |