Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource functions

deactivate_plugin()

Parameters

ColumnTypeDefaultDescription
void $name:
array"s"
$name
''; 0

Location

include/plugin_functions.php lines 72 to 87

Definition

 
function deactivate_plugin($name): void
    
{
    
$inst_version ps_value("SELECT inst_version AS value FROM plugins WHERE name = ?", array("s"$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).
        
ps_query("UPDATE plugins SET inst_version = NULL WHERE name = ?", array("s"$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 22nd May 2024 15:35 Europe/London time based on the source file dated 7th May 2024 18:45 Europe/London time.