context['postId'] ) ? $block->context['postId'] : get_the_ID() ); if ( ! $academy_course ) { return; } $academy_items = []; if ( ! empty( $attributes['showLessons'] ) && $academy_course['lessons'] > 0 ) { /* translators: %s: number of lessons. */ $academy_items['lessons'] = sprintf( _n( '%s lesson', '%s lessons', $academy_course['lessons'], 'academy' ), number_format_i18n( $academy_course['lessons'] ) ); } if ( ! empty( $attributes['showDuration'] ) && '' !== $academy_course['duration'] ) { $academy_items['duration'] = $academy_course['duration']; } if ( ! empty( $attributes['showLevel'] ) && '' !== $academy_course['level'] ) { $academy_items['level'] = $academy_course['level']; } if ( ! empty( $attributes['showEnrolled'] ) ) { /* translators: %s: number of students. */ $academy_items['enrolled'] = sprintf( _n( '%s student', '%s students', $academy_course['enrolled'], 'academy' ), number_format_i18n( $academy_course['enrolled'] ) ); } if ( ! $academy_items ) { return; } ?>