Programmatically disable extensions
Is there a way to disable bundled extensions programmatically. I know it is possible by hiding with CSS (as referenced https://github.com/ThemeFuse/Unyson/issues/92)
But it doesn't really feel like the right way to proceed. Ideally i would like to have a filter to unset certain extension-handles.
Is there a way that I'm not aware of?
$result = fw()->extensions->manager->deactivate_extensions(array(
'extension_name' => array(),
));
Sorry for the stupid question:
Where should this code go?
Just came across. Here's a sample. Place this in your hooks.php or functions.php.
// This will force deactivate Styling extension because I don't need it. add_action('admin_footer', '_action_theme_disable_fw_styling'); function _action_theme_disable_fw_styling() { if (fw()->extensions->manager->can_activate() && fw_ext('styling')) { fw()->extensions->manager->deactivate_extensions(array('styling' => array())); } }