install_plugin_overwrite_comparison
Filters the compare table output for overwriting a plugin package on upload.
Usage
add_filter( 'install_plugin_overwrite_comparison', 'wp_kama_install_plugin_overwrite_comparison_filter', 10, 3 ); /** * Function for `install_plugin_overwrite_comparison` filter-hook. * * @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. * * @return string */ function wp_kama_install_plugin_overwrite_comparison_filter( $table, $current_plugin_data, $new_plugin_data ){ // filter... return $table; }
- $table(string)
- The output table with Name, Version, Author, RequiresWP, and RequiresPHP info.
- $current_plugin_data(array)
- Array with current plugin data.
- $new_plugin_data(array)
- Array with uploaded plugin data.
Changelog
Since 5.5.0 | Introduced. |
Where the hook is called
install_plugin_overwrite_comparison
wp-admin/includes/class-plugin-installer-skin.php 260
echo apply_filters( 'install_plugin_overwrite_comparison', $table, $current_plugin_data, $new_plugin_data );