Collections functions
General functions
Render functions
Theme permission functions
Resource functions

move_featured_collection_branch_path_root()

Description

Move a featured collection branch paths' root to the node determined by the global configuration option $featured_collections_root_collection.

This temporarily moves the root of the featured collection branch, removing any nodes on the branch from the real root
up to the new root.

@see $featured_collections_root_collection configuration option

Parameters

ColumnTypeDefaultDescription
$branch_path array List of branch path nodes as returned by {@see compute_node_branch_path()}

Return

array

Location

include/collections_functions.php lines 5820 to 5838

Definition

 
function move_featured_collection_branch_path_root(array $branch_path)
    {
    global 
$featured_collections_root_collection;

    if(
$featured_collections_root_collection 0)
        {
        
$fc_root_col_position array_search($featured_collections_root_collectionarray_column($branch_path'ref'));
        if(
$fc_root_col_position !== false)
            {
            
$branch_path array_slice($branch_path, ++$fc_root_col_position);
            if(empty(
$branch_path))
                {
                
$links_trail = [];
                }
            }
        }

    return 
$branch_path;
    }

This article was last updated 26th September 2022 13:05 Europe/London time based on the source file dated 22nd September 2022 11:00 Europe/London time.