Collections functions
Encryption functions
General functions
Theme permission functions
Resource functions

deactivate_plugin()

Parameters

ColumnTypeDefaultDescription
$name

Location

include/plugin_functions.php lines 85 to 102

Definition

 
function deactivate_plugin($name)
    {
    
$name escape_check($name);

    
$inst_version sql_value("SELECT inst_version AS value FROM plugins WHERE name = '{$name}'"'');
  
    if(
$inst_version >= 0)
        {
        
# Remove the version field. Leaving the rest of the plugin information.  This allows for a config column to remain (future).
        
sql_query("UPDATE plugins SET inst_version = NULL WHERE name = '{$name}'");

        
log_activity(nullLOG_CODE_DISABLED'''plugins''inst_version'$name'name'$inst_versionnulltrue);
        }

    
// Clear query cache
    
clear_query_cache("plugins");

    }

This article was last updated 10th July 2020 00:35 Europe/London time based on the source file dated 2nd July 2020 09:08 Europe/London time.