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_Admin_AddOns::handle_manage_addons()
Handle activation, deactivation, and cloud installation of addons
Description Description
Return Return
(void)
Source Source
File: includes/admin/class.llms.admin.addons.php
private function handle_manage_addons() { $actions = apply_filters( 'llms_admin_add_ons_manage_actions', array( 'activate', 'deactivate', ) ); $errors = array(); $success = array(); foreach ( $actions as $action ) { if ( empty( $_POST[ 'llms_' . $action ] ) ) { continue; } foreach ( $_POST[ 'llms_' . $action ] as $id ) { $addon = llms_get_add_on( $id ); if ( ! method_exists( $addon, $action ) ) { continue; } $ret = call_user_func( array( $addon, $action ) ); if ( is_wp_error( $ret ) ) { LLMS_Admin_Notices::flash_notice( $ret->get_error_message(), 'error' ); } else { LLMS_Admin_Notices::flash_notice( $ret ); } } } }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.22.0 | Introduced. |
User Contributed Notes User Contributed Notes
Permalink: