pre_uninstall_plugin

pre_uninstall_plugin

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

do_action('pre_uninstall_plugin') is found 1 times:

  • /wp-admin/includes/plugin.php line 1302
    1298
    1299
    1300
    1301
    1302
    1303
    1304
    1305
    1306
    1307
    1308
    *
     * @param string $plugin                Path to the plugin file relative to the plugins directory.
     * @param array  $uninstallable_plugins Uninstallable plugins.
     */
    do_action( 'pre_uninstall_plugin', $plugin, $uninstallable_plugins );
     
    if ( file_exists( WP_PLUGIN_DIR . '/' . dirname( $file ) . '/uninstall.php' ) ) {
        if ( isset( $uninstallable_plugins[ $file ] ) ) {
            unset( $uninstallable_plugins[ $file ] );
            update_option( 'uninstall_plugins', $uninstallable_plugins );
        }