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_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 1415 to 1434

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 14th December 2024 13:35 Europe/London time based on the source file dated 11th December 2024 15:55 Europe/London time.