context['postId'] ) ? (int) $block->context['postId'] : (int) get_the_ID(); if ( ! $academy_course_id || 'academy_courses' !== get_post_type( $academy_course_id ) ) { return; } $academy_sections = []; foreach ( [ 'benefits' => [ 'academy_course_benefits', __( 'What You\'ll Learn', 'academy' ) ], 'requirements' => [ 'academy_course_requirements', __( 'Requirements', 'academy' ) ], 'audience' => [ 'academy_course_audience', __( 'Targeted Audience', 'academy' ) ], 'materials' => [ 'academy_course_materials_included', __( 'Materials Included', 'academy' ) ], ] as $academy_key => $academy_section ) { $academy_items = array_filter( array_map( 'trim', (array) \Academy\Helper::string_to_array( get_post_meta( $academy_course_id, $academy_section[0], true ) ) ) ); if ( $academy_items ) { $academy_sections[ $academy_key ] = [ 'title' => $academy_section[1], 'items' => $academy_items, ]; } } if ( ! $academy_sections ) { return; } \Academy\Blocks::use_course_assets(); $academy_uid = wp_unique_id( 'academy-info-' ); $academy_open = ! empty( $attributes['openFirst'] ); $academy_wrapper = get_block_wrapper_attributes( [ 'class' => 'is-layout-' . $academy_layout, 'style' => \Academy\Blocks::academy_colors_style( $attributes ), ] ); $academy_list = static function ( $items ) { echo '