From 500c96aa41bdb63e38cb4949d835201a798f5333 Mon Sep 17 00:00:00 2001
From: Maxime Culea <culea.maxime@gmail.com>
Date: Tue, 11 Apr 2017 12:57:27 +0200
Subject: [PATCH] #40413 : Fix the call of add_post_type_support with the 3 arg
as features.
---
src/wp-includes/class-wp-post-type.php | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/wp-includes/class-wp-post-type.php b/src/wp-includes/class-wp-post-type.php
index 69b9834..fa885bb 100644
a
|
b
|
final class WP_Post_Type { |
546 | 546 | */ |
547 | 547 | public function add_supports() { |
548 | 548 | if ( ! empty( $this->supports ) ) { |
549 | | add_post_type_support( $this->name, $this->supports ); |
| 549 | foreach ( $this->supports as $support => $features ) { |
| 550 | if ( is_array( $features ) ) { |
| 551 | add_post_type_support( $this->name, $support, $features ); |
| 552 | } else { |
| 553 | add_post_type_support( $this->name, $features ); |
| 554 | } |
| 555 | } |
550 | 556 | unset( $this->supports ); |
551 | 557 | } elseif ( false !== $this->supports ) { |
552 | 558 | // Add default features. |