Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource 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.