diff --git a/wp-includes/post-functions.php b/wp-includes/post-functions.php
index fdd01ee..f0ce991 100644
|
a
|
b
|
function _add_post_type_submenus() {
|
| 1424 | 1424 | * count will show on the edit screen. |
| 1425 | 1425 | * |
| 1426 | 1426 | * @since 3.0.0 |
| | 1427 | * @since 4.4.0 The `$feature` parameter was renamed to `$features`. |
| 1427 | 1428 | * |
| 1428 | 1429 | * @global array $_wp_post_type_features |
| 1429 | 1430 | * |
| 1430 | 1431 | * @param string $post_type The post type for which to add the feature. |
| 1431 | | * @param string|array $feature The feature being added, accepts an array of |
| | 1432 | * @param string|array $features The feature being added, accepts an array of |
| 1432 | 1433 | * feature strings or a single string. |
| 1433 | 1434 | */ |
| 1434 | | function add_post_type_support( $post_type, $feature ) { |
| | 1435 | function add_post_type_support( $post_type, $features ) { |
| 1435 | 1436 | global $_wp_post_type_features; |
| 1436 | 1437 | |
| 1437 | | $features = (array) $feature; |
| 1438 | | foreach ($features as $feature) { |
| 1439 | | if ( func_num_args() == 2 ) |
| 1440 | | $_wp_post_type_features[$post_type][$feature] = true; |
| 1441 | | else |
| 1442 | | $_wp_post_type_features[$post_type][$feature] = array_slice( func_get_args(), 2 ); |
| | 1438 | foreach ( (array) $features as $feature ) { |
| | 1439 | if ( func_num_args() == 2 ) { |
| | 1440 | $_wp_post_type_features[ $post_type ][ $feature ] = true; |
| | 1441 | } else { |
| | 1442 | $_wp_post_type_features[ $post_type ][ $feature ] = array_slice( func_get_args(), 2 ); |
| | 1443 | } |
| 1443 | 1444 | } |
| 1444 | 1445 | } |
| 1445 | 1446 | |
| … |
… |
function add_post_type_support( $post_type, $feature ) {
|
| 1447 | 1448 | * Remove support for a feature from a post type. |
| 1448 | 1449 | * |
| 1449 | 1450 | * @since 3.0.0 |
| | 1451 | * @since 4.4.0 The `$feature` parameter was renamed to `$features` and changed to |
| | 1452 | * also accept an array of feature strings. |
| 1450 | 1453 | * |
| 1451 | 1454 | * @global array $_wp_post_type_features |
| 1452 | 1455 | * |
| 1453 | | * @param string $post_type The post type for which to remove the feature. |
| 1454 | | * @param string $feature The feature being removed. |
| | 1456 | * @param string $post_type The post type for which to remove the feature. |
| | 1457 | * @param string|array $features The feature being removed, accepts an array of |
| | 1458 | * feature strings or a single string. |
| 1455 | 1459 | */ |
| 1456 | | function remove_post_type_support( $post_type, $feature ) { |
| | 1460 | function remove_post_type_support( $post_type, $features ) { |
| 1457 | 1461 | global $_wp_post_type_features; |
| 1458 | 1462 | |
| 1459 | | unset( $_wp_post_type_features[ $post_type ][ $feature ] ); |
| | 1463 | foreach ( (array) $features as $feature ) { |
| | 1464 | if ( isset( $_wp_post_type_features[ $post_type ][ $feature ] ) ) { |
| | 1465 | unset( $_wp_post_type_features[ $post_type ][ $feature ] ); |
| | 1466 | } |
| | 1467 | } |
| 1460 | 1468 | } |
| 1461 | 1469 | |
| 1462 | 1470 | /** |