Coding standards
Security in ResourceSpace
Developer reference
Database
Mcp browse functions
Mcp report functions
Mcp management functions
Core feature functions
Embed functions

resource_embed_enabled()

Description

Check the enablement and resource type setting for a resource embed.

Parameters

ColumnTypeDefaultDescription
$feature string Document or media embedding feature name.
$resource: array
representation downloadable
and extension
null or
$ffmpeg_preview_extension
$ffmpeg_audio_extensions
$mp3_player;
$resource array Resource metadata.

Return

bool Whether this feature applies to the resource.

Location

include/embed_functions.php lines 10 to 14

Definition

 
function resource_embed_enabled(string $feature, array $resource): bool
{
    
$type = (int) ($GLOBALS[$feature . '_resourcetype'] ?? 0);
    return 
core_feature_enabled($feature) && ($type === 0 || $type === (int) $resource['resource_type']);
}

This article was last updated 4th December 2026 17:35 Europe/London time based on the source file dated 4th December 2026 14:10 Europe/London time.