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

plugin_activate_for_setup()

Parameters

ColumnTypeDefaultDescription
$plugin_name

Location

include/plugin_functions.php lines 1331 to 1352

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 19th March 2024 09:35 Europe/London time based on the source file dated 15th March 2024 17:00 Europe/London time.