Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video functions
Resource functions

get_all_featured_collections()

Description

Get all featured collections

Parameters

This function accepts no parameters.

Return

array

Location

include/collections_functions.php lines 4626 to 4647

Definition

 
function get_all_featured_collections()
    {
    return 
sql_query(
        
sprintf(
              
"SELECT DISTINCT c.ref,
                      c.`name`,
                      c.`type`,
                      c.parent,
                      c.thumbnail_selection_method,
                      c.bg_img_resource_ref,
                      c.created,
                      count(DISTINCT cr.resource) > 0 AS has_resources,
                      count(DISTINCT cc.ref) > 0 AS has_children
                 FROM collection AS c
            LEFT JOIN collection_resource AS cr ON c.ref = cr.collection
            LEFT JOIN collection AS cc ON c.ref = cc.parent
                WHERE c.`type` = %s
             GROUP BY c.ref"
,
            
COLLECTION_TYPE_FEATURED
        
),
        
"featured_collections");
    }

This article was last updated 21st April 2021 17:35 Europe/London time based on the source file dated 19th April 2021 16:50 Europe/London time.