Если добавление пользовательских функций в файл functions.php в WordPress, означает ли это, что его нужно будет обновлять каждый раз, когда необходимо обновить тему, ЕСЛИ functions.php редактируется в новом обновлении темы?
Есть ли способ обойти это, чтобы добавить функциональный фильтр, такой как этот, но сохранить его через обновления темы?
function override_mce_options($initArray) {
$opts = '*[*]';
$initArray['valid_elements'] = $opts;
$initArray['extended_valid_elements'] = $opts;
return $initArray;
}
add_filter('tiny_mce_before_init', 'override_mce_options');






The functions.php file is where you add unique features to your WordPress theme. It can be used to hook into the core functions of WordPress to make your theme more modular, extensible, and functional. And applies only to that theme (if the theme is changed, the features can no longer be used)
A child theme can have its own functions.php file. Adding a function to the child functions file is a risk-free way to modify a parent theme. That way, when the parent theme is updated, you don’t have to worry about your newly added function disappearing.
Следуйте этому ссылка на сайт, чтобы узнать, как создать дочернюю тему, это довольно просто и понятно.