Я только что обновил свой Wordpress, и у меня появляется сообщение об ошибке ниже.
Я абсолютно ничего не знаю о PHP, но ошибка, по-видимому, находится в этой строке:
foreach ( $this->supports as $feature => $args ) {
Вот весь код вокруг этой строки:
// Sets the features support for the post type
public function add_supports() {
if ( ! empty( $this->supports ) ) {
foreach ( $this->supports as $feature => $args ) {
if ( is_array( $args ) ) {
add_post_type_support( $this->name, $feature, $args );
} else {
add_post_type_support( $this->name, $args );
}
}
unset( $this->supports );
} elseif ( false !== $this->supports ) {
// Add default features.
add_post_type_support( $this->name, array( 'title', 'editor' ) );
}
}
Не могли бы вы помочь мне решить эту проблему?
Заранее большое спасибо.