install_theme_overwrite_comparison filter-hookWP 5.5.0

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

Usage

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(string)
The output table with Name, Version, Author, RequiresWP, and RequiresPHP info.
$current_theme_data(WP_Theme)
Active theme data.
$new_theme_data(array)
Array with uploaded theme data.

Changelog

Since 5.5.0 Introduced.

Where the hook is called

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 );

Where the hook is used in WordPress

Usage not found.