Это просто, вы просто измените свой код, чтобы применить какой-то фильтр, подобный этому
$thumb_width = apply_filter( 'thumb_width', 800 ); // here 'thumb_width' is the filter name, which can be hooked on. and 800 is the default value.
$thumb_height = apply_filter( 'thumb_height', 600 );
$video_height = apply_filter( 'video_height', 600 );
Теперь вы можете использовать фильтры в functions.php для изменения значений.
Вы можетескопируйте и вставьте приведенный ниже код в ваши functions.php
add_filter('thumb_width', 'my_custom_thumb_width', 10, 1); //'10' is the priority of the filter if hooked multiple time. lower numbered one will be executed first. '1' is the number of argument passed.
function my_custom_thumb_width($thumb_width){
$thumb_width = 1280; //modify the value as your requirement
return $thumb_width;
}
add_filter('thumb_height', 'my_custom_thumb_height', 10, 1);
function my_custom_thumb_width($thumb_width){
$thumb_height = '1024'; //modify the value as your requirement
return $thumb_height;
}
add_filter('video_height', 'my_custom_video_height', 10, 1);
function my_custom_thumb_width($thumb_width){
$video_height = '600'; //modify the value as your requirement
return $video_height;
}