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

skip_scr_size_preview()

Description

Determine if the scr size should be used for previews. When $resource_view_use_pre is true the scr size shouldn't be used.
Where access is restricted and restricted access users can't access the scr size, the scr size shouldn't be used.

Parameters

ColumnTypeDefaultDescription
$access int Resource access level, typically from get_resource_access()

Return

bool True if scr size shouldn't be used else false.

Location

include/resource_functions.php lines 9314 to 9328

Definition

 
function skip_scr_size_preview(int $access) : bool
    
{
    global 
$resource_view_use_pre;
    if (
$resource_view_use_pre)
        {
        return 
true;
        }

    if (
$access === && !image_size_restricted_access('scr'))
        {
        return 
true;
        }

    return 
false;
    }

This article was last updated 26th February 2024 09:05 Europe/London time based on the source file dated 23rd February 2024 17:30 Europe/London time.