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 5480 to 5492

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);
        }
    }

    return 
$branch_path;
}

This article was last updated 12th June 2025 16:35 Europe/London time based on the source file dated 3rd June 2025 16:40 Europe/London time.