Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test functions

plugin_activate_for_setup()

Parameters

ColumnTypeDefaultDescription
$plugin_name

Location

include/plugin_functions.php lines 1455 to 1476

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 17th November 2024 15:05 Europe/London time based on the source file dated 8th November 2024 11:50 Europe/London time.