Collections functions
Encryption functions
General functions
Theme permission functions
Resource functions

plugin_activate_for_setup()

Parameters

ColumnTypeDefaultDescription
$plugin_name

Location

include/plugin_functions.php lines 1343 to 1365

Definition

 
function plugin_activate_for_setup($plugin_name)
    {    
    
// Add language file
    
register_plugin_language($plugin_name);
    
    
// Include <plugin>/hooks/all.php case functions are included here
    
$pluginpath=get_plugin_path($plugin_name);
    
$hookpath=$pluginpath "/hooks/all.php";
    if (
file_exists($hookpath)) {include_once $hookpath;}    

    
// Include plugin configuration    for displaying on Options page
    
$plugin_name escape_check($plugin_name);
    
$active_plugin sql_query("SELECT name,enabled_groups,config,config_json FROM plugins WHERE `name` = '{$plugin_name}' AND inst_version>=0 order by priority");
    if (empty(
$active_plugin))
        {
        
include_plugin_config($plugin_name);
        }
        else
        {
        
include_plugin_config($plugin_name$active_plugin[0]['config'], $active_plugin[0]['config_json']);
        }       
    return 
true;
    }

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