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

config_register_core_fieldvars()

Description

Used to block deletion of 'core' fields. Any variable added to the $corefields array will be checked before a field is deleted and if the field is referenced by one of these core variables the deletion will be blocked

Parameters

ColumnTypeDefaultDescription
$source string "BASE" Optional origin of variables e.g. 'Transform plugin'
$varnames array array Array of variable names

Return

void

Location

include/config_functions.php lines 1391 to 1406

Definition

 
function config_register_core_fieldvars($source="BASE"$varnames=array())
    {
    global 
$corefields;
    if(!isset(
$corefields[$source]))
        {
        
$corefields[$source] = array();
        }    
    
    foreach(
$varnames as $varname)
        {
        if(
preg_match('/^[a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*$/',$varname))
            {
            
$corefields[$source][] = $varname;
            }
        }
    }

This article was last updated 17th November 2024 15:05 Europe/London time based on the source file dated 13th November 2024 15:50 Europe/London time.