install_theme_overwrite_comparison
Filter HookDescription
Filters the compare table output for overwriting a theme package on upload.Hook Information
File Location |
wp-admin/includes/class-theme-installer-skin.php
View on GitHub
|
Hook Type | Filter |
Line Number | 295 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$table
|
The output table with Name, Version, Author, RequiresWP, and RequiresPHP info. |
WP_Theme
|
$current_theme_data
|
Active theme data. |
array
|
$new_theme_data
|
Array with uploaded theme data. |
Usage Examples
Basic Usage
<?php
// Hook into install_theme_overwrite_comparison
add_filter('install_theme_overwrite_comparison', 'my_custom_filter', 10, 3);
function my_custom_filter($table, $current_theme_data, $new_theme_data) {
// Your custom filtering logic here
return $table;
}
Source Code Context
wp-admin/includes/class-theme-installer-skin.php:295
- How this hook is used in WordPress core
<?php
290 *
291 * @param string $table The output table with Name, Version, Author, RequiresWP, and RequiresPHP info.
292 * @param WP_Theme $current_theme_data Active theme data.
293 * @param array $new_theme_data Array with uploaded theme data.
294 */
295 echo apply_filters( 'install_theme_overwrite_comparison', $table, $current_theme_data, $new_theme_data );
296
297 $install_actions = array();
298 $can_update = true;
299
300 $blocked_message = '<p>' . esc_html__( 'The theme cannot be updated due to the following:' ) . '</p>';
PHP Documentation
<?php
/**
* Filters the compare table output for overwriting a theme package on upload.
*
* @since 5.5.0
*
* @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.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-admin/includes/class-theme-installer-skin.php
Related Hooks
Related hooks will be displayed here in future updates.