*/ public static function options(): array { return [ 'annual' => [ 'label' => __( 'Annual (1 period)', 'academiccrew' ), 'count' => 1 ], 'semester' => [ 'label' => __( 'Semester (2 periods)', 'academiccrew' ), 'count' => 2 ], 'trimester' => [ 'label' => __( 'Trimester (3 periods)', 'academiccrew' ), 'count' => 3 ], 'quarter' => [ 'label' => __( 'Quarter (4 periods)', 'academiccrew' ), 'count' => 4 ], ]; } public static function current(): string { $settings = get_option( 'academiccrew_settings', [] ); $cadence = (string) ( $settings['academic_period_cadence'] ?? self::DEFAULT ); return isset( self::options()[ $cadence ] ) ? $cadence : self::DEFAULT; } public static function period_count(): int { return self::options()[ self::current() ]['count']; } /** Human label for a period, e.g. "Period 2". Same wording across all cadences. */ public static function period_label( int $period ): string { return sprintf( /* translators: %d: period number */ __( 'Period %d', 'academiccrew' ), $period ); } }