WP_Theme_JSON_Data::update_with()
Updates the theme.json with the the given data.
Метод класса: WP_Theme_JSON_Data{}
Хуков нет.
Возвращает
WP_Theme_JSON_Data
. The own instance with access to the modified data.
Использование
$WP_Theme_JSON_Data = new WP_Theme_JSON_Data(); $WP_Theme_JSON_Data->update_with( $new_data );
- $new_data(массив) (обязательный)
- Array following the theme.json specification.
Список изменений
С версии 6.1.0 | Введена. |
Код WP_Theme_JSON_Data::update_with() WP Theme JSON Data::update with WP 6.5.2
public function update_with( $new_data ) { $this->theme_json->merge( new WP_Theme_JSON( $new_data, $this->origin ) ); return $this; }