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

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;
            }
        }
    }

This article was last updated 19th March 2024 06:35 Europe/London time based on the source file dated 15th March 2024 17:00 Europe/London time.