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>
This commit is contained in:
48
page-protocol-builder.php
Normal file
48
page-protocol-builder.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/**
|
||||
* Template Name: Protocol Builder
|
||||
*
|
||||
* Page template for the interactive protocol builder wizard.
|
||||
* Loads the Peptide Tools plugin protocol builder via shortcode.
|
||||
*
|
||||
* @see page-calculator.php — sibling tool template
|
||||
* @see functions.php — enqueue and page auto-creation
|
||||
*
|
||||
* What: Renders the protocol builder page with plugin shortcode integration.
|
||||
* Who calls it: WordPress template hierarchy when a page uses this template.
|
||||
* Dependencies: Peptide Tools 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_tools_protocol_builder' ) ) {
|
||||
echo do_shortcode( '[peptide_tools_protocol_builder]' );
|
||||
} else {
|
||||
?>
|
||||
<div class="ps-tool-fallback">
|
||||
<h1><?php esc_html_e( 'Protocol Builder', 'peptide-starter' ); ?></h1>
|
||||
<p><?php esc_html_e( 'The protocol builder 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(); ?>
|
||||
Reference in New Issue
Block a user