Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video functions
Resource functions

config_register_core_field_refs()

Description

Used to block deletion of 'core' fields.

Parameters

ColumnTypeDefaultDescription
$source string What part (e.g plugin) relies on this list of metadata fields
$refs array List of metadata field IDs to prevent being deleted

Location

include/config_functions.php lines 1224 to 1245

Definition

 
function config_register_core_field_refs(string $source, array $refs)
    {
    global 
$core_field_refs;

    
$source trim($source);
    
$source = ($source !== '' $source 'BASE');

    if(!isset(
$core_field_refs[$source]))
        {
        
$core_field_refs[$source] = [];
        }

    foreach(
$refs as $ref)
        {
        if(
is_int_loose($ref) && $ref 0)
            {
            
$core_field_refs[$source][] = $ref;
            }
        }

    return;
    }

This article was last updated 14th May 2021 23:35 Europe/London time based on the source file dated 10th May 2021 17:30 Europe/London time.