lifterlms_template_certificates_loop( $student = null, $limit = false )
Description Description
Source Source
File: includes/functions/llms.functions.templates.certificates.php
function lifterlms_template_certificates_loop( $student = null, $limit = false ) { // get the current student if none supplied if ( ! $student ) { $student = llms_get_student(); } // don't proceed without a student if ( ! $student ) { return; } $cols = llms_get_certificates_loop_columns(); // get certificates $certificates = $student->get_certificates( 'updated_date', 'DESC', 'certificates' ); if ( $limit && $certificates ) { $certificates = array_slice( $certificates, 0, $limit ); if ( $limit < $cols ) { $cols = $limit; } } llms_get_template( 'certificates/loop.php', array( 'cols' => $cols, 'certificates' => $certificates, ) ); }
Expand full source code Collapse full source code View on GitHub
User Contributed Notes User Contributed Notes
Permalink: