Collections functions
General functions
Render functions
Theme permission functions
Resource functions

plugin_activate_for_setup()

Parameters

ColumnTypeDefaultDescription
$plugin_name

Location

include/plugin_functions.php lines 1316 to 1337

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
    
$active_plugin ps_query("SELECT `name`, enabled_groups, config, config_json FROM plugins WHERE `name` = ? AND inst_version >= 0 order by priority", array("s"$plugin_name));
    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 4th October 2022 12:05 Europe/London time based on the source file dated 2nd September 2022 14:25 Europe/London time.