install_theme_overwrite_comparison хук-фильтрWP 5.5.0

Filters the compare table output for overwriting a theme package on upload.

Использование

add_filter( 'install_theme_overwrite_comparison', 'wp_kama_install_theme_overwrite_comparison_filter', 10, 3 );

/**
 * Function for `install_theme_overwrite_comparison` filter-hook.
 * 
 * @param string   $table              The output table with Name, Version, Author, RequiresWP, and RequiresPHP info.
 * @param WP_Theme $current_theme_data Active theme data.
 * @param array    $new_theme_data     Array with uploaded theme data.
 *
 * @return string
 */
function wp_kama_install_theme_overwrite_comparison_filter( $table, $current_theme_data, $new_theme_data ){

	// filter...
	return $table;
}
$table(строка)
The output table with Name, Version, Author, RequiresWP, and RequiresPHP info.
$current_theme_data(WP_Theme)
Active theme data.
$new_theme_data(массив)
Array with uploaded theme data.

Список изменений

С версии 5.5.0 Введена.

Где вызывается хук

Theme_Installer_Skin::do_overwrite()
install_theme_overwrite_comparison
wp-admin/includes/class-theme-installer-skin.php 289
echo apply_filters( 'install_theme_overwrite_comparison', $table, $current_theme_data, $new_theme_data );

Где используется хук в WordPress

Использование не найдено.