Complete the code to activate a plugin in WordPress.
activate_plugin('[1]');
The activate_plugin function requires the plugin's main file path relative to the plugins folder.
Complete the code to check if a plugin is active.
if (is_plugin_active('[1]')) { // Plugin is active }
The is_plugin_active function expects the plugin path relative to the plugins directory.
Fix the error in the code to properly install a plugin from a ZIP file.
$result = install_plugin('[1]');
The install_plugin function requires a URL to the ZIP file for remote installation.
Fill both blanks to activate a plugin only if it is not already active.
if () { activate_plugin('[2]'); }
Use is_plugin_active to check if the plugin is active before activating it.
Fill all three blanks to safely deactivate a plugin.
if ([1]('[2]')) { [3]('[2]'); }
First check if the plugin is active, then deactivate it using deactivate_plugins.
