install_plugin_overwrite_comparison
Filter HookDescription
Filters the compare table output for overwriting a plugin package on upload.Hook Information
File Location |
wp-admin/includes/class-plugin-installer-skin.php
View on GitHub
|
Hook Type | Filter |
Line Number | 260 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$table
|
The output table with Name, Version, Author, RequiresWP, and RequiresPHP info. |
array
|
$current_plugin_data
|
Array with current plugin data. |
array
|
$new_plugin_data
|
Array with uploaded plugin data. |
Usage Examples
Basic Usage
<?php
// Hook into install_plugin_overwrite_comparison
add_filter('install_plugin_overwrite_comparison', 'my_custom_filter', 10, 3);
function my_custom_filter($table, $current_plugin_data, $new_plugin_data) {
// Your custom filtering logic here
return $table;
}
Source Code Context
wp-admin/includes/class-plugin-installer-skin.php:260
- How this hook is used in WordPress core
<?php
255 *
256 * @param string $table The output table with Name, Version, Author, RequiresWP, and RequiresPHP info.
257 * @param array $current_plugin_data Array with current plugin data.
258 * @param array $new_plugin_data Array with uploaded plugin data.
259 */
260 echo apply_filters( 'install_plugin_overwrite_comparison', $table, $current_plugin_data, $new_plugin_data );
261
262 $install_actions = array();
263 $can_update = true;
264
265 $blocked_message = '<p>' . esc_html__( 'The plugin cannot be updated due to the following:' ) . '</p>';
PHP Documentation
<?php
/**
* Filters the compare table output for overwriting a plugin package on upload.
*
* @since 5.5.0
*
* @param string $table The output table with Name, Version, Author, RequiresWP, and RequiresPHP info.
* @param array $current_plugin_data Array with current plugin data.
* @param array $new_plugin_data Array with uploaded plugin data.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-admin/includes/class-plugin-installer-skin.php
Related Hooks
Related hooks will be displayed here in future updates.