Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video functions
Resource 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 1185 to 1200

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 24th November 2020 20:35 Europe/London time based on the source file dated 6th October 2020 10:25 Europe/London time.