Collections functions
General functions
Node functions
Render functions
Theme permission functions
User 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 5939 to 5953

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 19th March 2024 11:05 Europe/London time based on the source file dated 15th March 2024 17:00 Europe/London time.