Collections functions
General functions
Render functions
Theme permission functions
Resource functions

deactivate_plugin()

Parameters

ColumnTypeDefaultDescription
$name

Location

include/plugin_functions.php lines 73 to 88

Definition

 
function deactivate_plugin($name)
    {
    
$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 29th May 2022 06:35 Europe/London time based on the source file dated 6th May 2022 16:50 Europe/London time.