Collections functions
General functions
Node functions
Render functions
Theme permission functions
User 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 1350 to 1365

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 27th April 2024 08:05 Europe/London time based on the source file dated 18th April 2024 17:15 Europe/London time.