Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
LLMS_Add_On::uninstall_real()
Actually performs the uninstall
Return Return
(string|WP_Error) Success message or an error object.
Source Source
File: includes/models/model.llms.add-on.php
private function uninstall_real() { $type = $this->get_type(); if ( ! in_array( $type, array( 'plugin', 'theme' ), true ) ) { // Translators: %s = add-on type. return new WP_Error( 'uninstall-invalid-type', sprintf( __( 'Cannot uninstall "%s" type add-ons.', 'lifterlms' ), $type ) ); } $file = $this->get( 'update_file' ); if ( 'plugin' === $type ) { uninstall_plugin( $file ); $del = delete_plugins( array( $file ) ); } else { $del = delete_theme( $file ); } if ( is_wp_error( $del ) ) { return $del; } // Translators: %s = Add-on title. return sprintf( __( '%s was successfully uninstalled.', 'lifterlms' ), $this->get( 'title' ) ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
5.1.1 | Introduced. |