ap_deactivate_addon( string $addon_name )
Description #
Deactivate addons.
Parameters #
- $addon_namestring (Required) Addons file name.
Source #
File: includes/functions.php
function ap_deactivate_addon( $addon_name ) { if ( ! ap_is_addon_active( $addon_name ) ) { return false; } $opt = get_option( 'anspress_addons', array() ); $all_addons = ap_get_addons(); $addon_name = wp_normalize_path( $addon_name ); if ( isset( $all_addons[ $addon_name ] ) ) { unset( $opt[ $addon_name ] ); update_option( 'anspress_addons', $opt ); do_action( 'ap_addon_deactivated', $addon_name ); // Delete cache. wp_cache_delete( 'addons', 'anspress' ); return true; } return false; }
Expand full source code Collapse full source code View on GitHub: includes/functions.php:1806
Add your comment