Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video 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 29th November 2020 04:35 Europe/London time based on the source file dated 9th October 2020 10:20 Europe/London time.