Files
peptide-starter-theme/page-subject-log.php
peptiderepo 9da702e746 v1.5.0: extend theme with navigation dropdowns, 9 page templates, auth UI, newsletter, contact panel
Major theme extension adding full-featured navigation with dropdown submenus (Tools, My Data, Resources),
9 new page templates (Calculator, Protocol Builder, Tracker, Subject Log, Documentation, Directory,
Science Feed, Profile, Sign In/Register), documentation page with sidebar ToC and scroll spy,
branded AJAX authentication forms, newsletter signup with admin export, slide-out contact/support panel,
Research Modules 6-card grid on front page, and comprehensive footer update.

Split functions.php (554→206 lines) into 6 focused inc/ modules: helpers, customizer, auth-handlers,
contact-handler, page-setup, newsletter-admin. All new components include dark mode support, CSRF
protection, input sanitization, output escaping, and graceful plugin degradation via shortcode_exists().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-14 08:38:30 +07:00

49 lines
1.3 KiB
PHP

<?php
/**
* Template Name: Subject Log
*
* Page template for the longitudinal subject tracking log.
* Loads the Peptide Tracker plugin subject log via shortcode.
*
* @see page-tracker.php — related tracker template
* @see functions.php — enqueue and page auto-creation
*
* What: Renders the subject log page with plugin shortcode integration.
* Who calls it: WordPress template hierarchy when a page uses this template.
* Dependencies: Peptide Tracker plugin (optional — graceful fallback).
*
* @package peptide-starter
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
get_header();
?>
<main id="main" class="site-main">
<section class="ps-tool-page">
<div class="ps-container">
<?php
if ( shortcode_exists( 'peptide_tracker_subject_log' ) ) {
echo do_shortcode( '[peptide_tracker_subject_log]' );
} else {
?>
<div class="ps-tool-fallback">
<h1><?php esc_html_e( 'Subject Log', 'peptide-starter' ); ?></h1>
<p><?php esc_html_e( 'The subject log tool is currently being set up. Please check back soon.', 'peptide-starter' ); ?></p>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="ps-btn ps-btn-primary">
<?php esc_html_e( 'Return Home', 'peptide-starter' ); ?>
</a>
</div>
<?php
}
?>
</div>
</section>
</main>
<?php get_footer(); ?>