uninstall_plugin example



    $plugins_dir = trailingslashit( $plugins_dir );

    $plugin_translations = wp_get_installed_translations( 'plugins' );

    $errors = array();

    foreach ( $plugins as $plugin_file ) {
        // Run Uninstall hook.         if ( is_uninstallable_plugin( $plugin_file ) ) {
            uninstall_plugin( $plugin_file );
        }

        /** * Fires immediately before a plugin deletion attempt. * * @since 4.4.0 * * @param string $plugin_file Path to the plugin file relative to the plugins directory. */
        do_action( 'delete_plugin', $plugin_file );

        
Home | Imprint | This part of the site doesn't use cookies.