Collections functions
General 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 9386 to 9400

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 10th December 2023 06:35 Europe/London time based on the source file dated 8th December 2023 13:55 Europe/London time.