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>
49 lines
1.4 KiB
PHP
49 lines
1.4 KiB
PHP
<?php
|
|
/**
|
|
* Template Name: Peptide Directory
|
|
*
|
|
* Page template for the peptide directory / browsable database.
|
|
* Loads the Peptide Community plugin directory via shortcode.
|
|
*
|
|
* @see archive-peptide.php — CPT archive (different from this directory)
|
|
* @see functions.php — enqueue and page auto-creation
|
|
*
|
|
* What: Renders the peptide directory page with plugin shortcode integration.
|
|
* Who calls it: WordPress template hierarchy when a page uses this template.
|
|
* Dependencies: Peptide Community 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_directory' ) ) {
|
|
echo do_shortcode( '[peptide_directory]' );
|
|
} else {
|
|
?>
|
|
<div class="ps-tool-fallback">
|
|
<h1><?php esc_html_e( 'Peptide Directory', 'peptide-starter' ); ?></h1>
|
|
<p><?php esc_html_e( 'The peptide directory 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(); ?>
|