fix: resolve PHPCS coding standard violations for CI
- Convert all PHP files from CRLF to LF line endings - Reformat multi-line function calls per WPCS standard (opening paren last on line, closing paren on own line) - Fix assignment-in-conditional in single-peptide.php - Change double quotes to single quotes in content-none.php - Exclude InvalidClassFileName sniff (standard WP functions.php pattern) - Fix archive-peptide.php opening PHP tag placement Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -26,4 +26,9 @@
|
|||||||
<rule ref="Generic.Arrays.DisallowShortArraySyntax">
|
<rule ref="Generic.Arrays.DisallowShortArraySyntax">
|
||||||
<exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
|
<exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
|
<!-- Standard WordPress practice: Walker class lives in functions.php -->
|
||||||
|
<rule ref="WordPress.Files.FileName">
|
||||||
|
<exclude name="WordPress.Files.FileName.InvalidClassFileName"/>
|
||||||
|
</rule>
|
||||||
</ruleset>
|
</ruleset>
|
||||||
|
|||||||
72
404.php
72
404.php
@@ -1,36 +1,36 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* The 404 template
|
* The 404 template
|
||||||
*
|
*
|
||||||
* @package peptide-starter
|
* @package peptide-starter
|
||||||
*/
|
*/
|
||||||
|
|
||||||
get_header();
|
get_header();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<main id="main" class="site-main">
|
<main id="main" class="site-main">
|
||||||
<div class="ps-container">
|
<div class="ps-container">
|
||||||
<div class="error-404 not-found">
|
<div class="error-404 not-found">
|
||||||
<h1><?php esc_html_e( '404 - Page Not Found', 'peptide-starter' ); ?></h1>
|
<h1><?php esc_html_e( '404 - Page Not Found', 'peptide-starter' ); ?></h1>
|
||||||
<p><?php esc_html_e( "Sorry, the page you're looking for doesn't exist. It might have been moved or deleted.", 'peptide-starter' ); ?></p>
|
<p><?php esc_html_e( "Sorry, the page you're looking for doesn't exist. It might have been moved or deleted.", 'peptide-starter' ); ?></p>
|
||||||
|
|
||||||
<form role="search" method="get" class="search-form ps-404-search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
|
<form role="search" method="get" class="search-form ps-404-search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
|
||||||
<label>
|
<label>
|
||||||
<span class="screen-reader-text"><?php esc_html_e( 'Search for:', 'peptide-starter' ); ?></span>
|
<span class="screen-reader-text"><?php esc_html_e( 'Search for:', 'peptide-starter' ); ?></span>
|
||||||
<input type="search" class="search-submit" placeholder="<?php esc_attr_e( 'Search peptides...', 'peptide-starter' ); ?>" value="<?php echo esc_attr( get_search_query() ); ?>" name="s" title="<?php esc_attr_e( 'Search for:', 'peptide-starter' ); ?>" />
|
<input type="search" class="search-submit" placeholder="<?php esc_attr_e( 'Search peptides...', 'peptide-starter' ); ?>" value="<?php echo esc_attr( get_search_query() ); ?>" name="s" title="<?php esc_attr_e( 'Search for:', 'peptide-starter' ); ?>" />
|
||||||
</label>
|
</label>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div class="ps-404-cta-group">
|
<div class="ps-404-cta-group">
|
||||||
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="ps-btn ps-btn-primary">
|
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="ps-btn ps-btn-primary">
|
||||||
<?php esc_html_e( 'Back to Home', 'peptide-starter' ); ?>
|
<?php esc_html_e( 'Back to Home', 'peptide-starter' ); ?>
|
||||||
</a>
|
</a>
|
||||||
<a href="<?php echo esc_url( home_url( '/peptides' ) ); ?>" class="ps-btn ps-btn-secondary">
|
<a href="<?php echo esc_url( home_url( '/peptides' ) ); ?>" class="ps-btn ps-btn-secondary">
|
||||||
<?php esc_html_e( 'Browse Peptides', 'peptide-starter' ); ?>
|
<?php esc_html_e( 'Browse Peptides', 'peptide-starter' ); ?>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<?php get_footer(); ?>
|
<?php get_footer(); ?>
|
||||||
|
|||||||
@@ -70,4 +70,5 @@ get_header();
|
|||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<?php get_footer();
|
<?php
|
||||||
|
get_footer();
|
||||||
|
|||||||
@@ -1,84 +1,84 @@
|
|||||||
/**
|
/**
|
||||||
* Navigation and Mobile Menu Toggle
|
* Navigation and Mobile Menu Toggle
|
||||||
* Peptide Starter Theme
|
* Peptide Starter Theme
|
||||||
*
|
*
|
||||||
* Handles:
|
* Handles:
|
||||||
* - Mobile hamburger menu toggle
|
* - Mobile hamburger menu toggle
|
||||||
* - Navigation overlay click handling
|
* - Navigation overlay click handling
|
||||||
* - Menu state persistence
|
* - Menu state persistence
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const menuToggle = document.querySelector('.menu-toggle');
|
const menuToggle = document.querySelector('.menu-toggle');
|
||||||
const primaryNav = document.querySelector('.primary-navigation');
|
const primaryNav = document.querySelector('.primary-navigation');
|
||||||
const navOverlay = document.querySelector('.nav-overlay');
|
const navOverlay = document.querySelector('.nav-overlay');
|
||||||
|
|
||||||
if (!menuToggle || !primaryNav || !navOverlay) {
|
if (!menuToggle || !primaryNav || !navOverlay) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Toggle mobile menu visibility
|
* Toggle mobile menu visibility
|
||||||
*/
|
*/
|
||||||
function toggleMenu() {
|
function toggleMenu() {
|
||||||
const isActive = primaryNav.classList.contains('active');
|
const isActive = primaryNav.classList.contains('active');
|
||||||
|
|
||||||
if (isActive) {
|
if (isActive) {
|
||||||
closeMenu();
|
closeMenu();
|
||||||
} else {
|
} else {
|
||||||
openMenu();
|
openMenu();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open mobile menu
|
* Open mobile menu
|
||||||
*/
|
*/
|
||||||
function openMenu() {
|
function openMenu() {
|
||||||
primaryNav.classList.add('active');
|
primaryNav.classList.add('active');
|
||||||
navOverlay.classList.add('active');
|
navOverlay.classList.add('active');
|
||||||
document.body.style.overflow = 'hidden';
|
document.body.style.overflow = 'hidden';
|
||||||
menuToggle.setAttribute('aria-expanded', 'true');
|
menuToggle.setAttribute('aria-expanded', 'true');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Close mobile menu
|
* Close mobile menu
|
||||||
*/
|
*/
|
||||||
function closeMenu() {
|
function closeMenu() {
|
||||||
primaryNav.classList.remove('active');
|
primaryNav.classList.remove('active');
|
||||||
navOverlay.classList.remove('active');
|
navOverlay.classList.remove('active');
|
||||||
document.body.style.overflow = '';
|
document.body.style.overflow = '';
|
||||||
menuToggle.setAttribute('aria-expanded', 'false');
|
menuToggle.setAttribute('aria-expanded', 'false');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Menu toggle button click
|
// Menu toggle button click
|
||||||
menuToggle.addEventListener('click', toggleMenu);
|
menuToggle.addEventListener('click', toggleMenu);
|
||||||
|
|
||||||
// Overlay click
|
// Overlay click
|
||||||
navOverlay.addEventListener('click', closeMenu);
|
navOverlay.addEventListener('click', closeMenu);
|
||||||
|
|
||||||
// Close menu when a nav link is clicked
|
// Close menu when a nav link is clicked
|
||||||
const navLinks = primaryNav.querySelectorAll('a');
|
const navLinks = primaryNav.querySelectorAll('a');
|
||||||
navLinks.forEach(link => {
|
navLinks.forEach(link => {
|
||||||
link.addEventListener('click', closeMenu);
|
link.addEventListener('click', closeMenu);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Close menu on Escape key
|
// Close menu on Escape key
|
||||||
document.addEventListener('keydown', (e) => {
|
document.addEventListener('keydown', (e) => {
|
||||||
if (e.key === 'Escape') {
|
if (e.key === 'Escape') {
|
||||||
closeMenu();
|
closeMenu();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Set initial aria-expanded state
|
// Set initial aria-expanded state
|
||||||
menuToggle.setAttribute('aria-expanded', 'false');
|
menuToggle.setAttribute('aria-expanded', 'false');
|
||||||
|
|
||||||
// Close menu when window is resized above mobile breakpoint
|
// Close menu when window is resized above mobile breakpoint
|
||||||
const mediaQuery = window.matchMedia('(min-width: 768px)');
|
const mediaQuery = window.matchMedia('(min-width: 768px)');
|
||||||
mediaQuery.addEventListener('change', (e) => {
|
mediaQuery.addEventListener('change', (e) => {
|
||||||
if (e.matches) {
|
if (e.matches) {
|
||||||
closeMenu();
|
closeMenu();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -1,210 +1,210 @@
|
|||||||
/**
|
/**
|
||||||
* Theme Utilities
|
* Theme Utilities
|
||||||
* Peptide Starter Theme
|
* Peptide Starter Theme
|
||||||
*
|
*
|
||||||
* Handles:
|
* Handles:
|
||||||
* - Dark mode toggle functionality
|
* - Dark mode toggle functionality
|
||||||
* - Dark mode preference persistence
|
* - Dark mode preference persistence
|
||||||
* - Plugin dark mode coordination
|
* - Plugin dark mode coordination
|
||||||
* - Smooth transitions
|
* - Smooth transitions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const html = document.documentElement;
|
const html = document.documentElement;
|
||||||
const darkModeToggle = document.querySelector('.dark-mode-toggle');
|
const darkModeToggle = document.querySelector('.dark-mode-toggle');
|
||||||
const sunIcon = document.querySelector('.sun-icon');
|
const sunIcon = document.querySelector('.sun-icon');
|
||||||
const moonIcon = document.querySelector('.moon-icon');
|
const moonIcon = document.querySelector('.moon-icon');
|
||||||
|
|
||||||
if (!darkModeToggle) {
|
if (!darkModeToggle) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get current theme preference
|
* Get current theme preference
|
||||||
* @returns {string} 'dark' or 'light'
|
* @returns {string} 'dark' or 'light'
|
||||||
*/
|
*/
|
||||||
function getCurrentTheme() {
|
function getCurrentTheme() {
|
||||||
const stored = localStorage.getItem('peptide-starter-theme');
|
const stored = localStorage.getItem('peptide-starter-theme');
|
||||||
if (stored) {
|
if (stored) {
|
||||||
return stored;
|
return stored;
|
||||||
}
|
}
|
||||||
|
|
||||||
const currentAttr = html.getAttribute('data-theme');
|
const currentAttr = html.getAttribute('data-theme');
|
||||||
if (currentAttr) {
|
if (currentAttr) {
|
||||||
return currentAttr;
|
return currentAttr;
|
||||||
}
|
}
|
||||||
|
|
||||||
const systemDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
const systemDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||||
return systemDark ? 'dark' : 'light';
|
return systemDark ? 'dark' : 'light';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set theme preference
|
* Set theme preference
|
||||||
* @param {string} theme - 'dark' or 'light'
|
* @param {string} theme - 'dark' or 'light'
|
||||||
*/
|
*/
|
||||||
function setTheme(theme) {
|
function setTheme(theme) {
|
||||||
html.setAttribute('data-theme', theme);
|
html.setAttribute('data-theme', theme);
|
||||||
localStorage.setItem('peptide-starter-theme', theme);
|
localStorage.setItem('peptide-starter-theme', theme);
|
||||||
|
|
||||||
// Update icon visibility
|
// Update icon visibility
|
||||||
updateIcons(theme);
|
updateIcons(theme);
|
||||||
|
|
||||||
// Notify plugins about theme change via custom event
|
// Notify plugins about theme change via custom event
|
||||||
const event = new CustomEvent('themechange', {
|
const event = new CustomEvent('themechange', {
|
||||||
detail: { theme: theme }
|
detail: { theme: theme }
|
||||||
});
|
});
|
||||||
document.dispatchEvent(event);
|
document.dispatchEvent(event);
|
||||||
|
|
||||||
// Also update body class for CSS hooks
|
// Also update body class for CSS hooks
|
||||||
document.body.classList.remove('dark-mode', 'light-mode');
|
document.body.classList.remove('dark-mode', 'light-mode');
|
||||||
document.body.classList.add(theme === 'dark' ? 'dark-mode' : 'light-mode');
|
document.body.classList.add(theme === 'dark' ? 'dark-mode' : 'light-mode');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update icon visibility based on theme
|
* Update icon visibility based on theme
|
||||||
* @param {string} theme - 'dark' or 'light'
|
* @param {string} theme - 'dark' or 'light'
|
||||||
*/
|
*/
|
||||||
function updateIcons(theme) {
|
function updateIcons(theme) {
|
||||||
if (theme === 'dark') {
|
if (theme === 'dark') {
|
||||||
sunIcon.style.display = 'block';
|
sunIcon.style.display = 'block';
|
||||||
moonIcon.style.display = 'none';
|
moonIcon.style.display = 'none';
|
||||||
} else {
|
} else {
|
||||||
sunIcon.style.display = 'none';
|
sunIcon.style.display = 'none';
|
||||||
moonIcon.style.display = 'block';
|
moonIcon.style.display = 'block';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Toggle between dark and light mode
|
* Toggle between dark and light mode
|
||||||
*/
|
*/
|
||||||
function toggleDarkMode() {
|
function toggleDarkMode() {
|
||||||
const currentTheme = getCurrentTheme();
|
const currentTheme = getCurrentTheme();
|
||||||
const newTheme = currentTheme === 'dark' ? 'light' : 'dark';
|
const newTheme = currentTheme === 'dark' ? 'light' : 'dark';
|
||||||
setTheme(newTheme);
|
setTheme(newTheme);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize theme on page load
|
// Initialize theme on page load
|
||||||
const initialTheme = getCurrentTheme();
|
const initialTheme = getCurrentTheme();
|
||||||
setTheme(initialTheme);
|
setTheme(initialTheme);
|
||||||
|
|
||||||
// Dark mode toggle button click
|
// Dark mode toggle button click
|
||||||
darkModeToggle.addEventListener('click', toggleDarkMode);
|
darkModeToggle.addEventListener('click', toggleDarkMode);
|
||||||
|
|
||||||
// Listen for system preference changes
|
// Listen for system preference changes
|
||||||
const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
|
const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
|
||||||
mediaQuery.addEventListener('change', (e) => {
|
mediaQuery.addEventListener('change', (e) => {
|
||||||
const stored = localStorage.getItem('peptide-starter-theme');
|
const stored = localStorage.getItem('peptide-starter-theme');
|
||||||
if (!stored) {
|
if (!stored) {
|
||||||
setTheme(e.matches ? 'dark' : 'light');
|
setTheme(e.matches ? 'dark' : 'light');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Expose API for plugins to read/listen to theme changes
|
// Expose API for plugins to read/listen to theme changes
|
||||||
window.peptideStarterTheme = {
|
window.peptideStarterTheme = {
|
||||||
getCurrentTheme: getCurrentTheme,
|
getCurrentTheme: getCurrentTheme,
|
||||||
setTheme: setTheme,
|
setTheme: setTheme,
|
||||||
toggleDarkMode: toggleDarkMode,
|
toggleDarkMode: toggleDarkMode,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Plugin Integration Example:
|
* Plugin Integration Example:
|
||||||
* Plugins can listen to theme changes via:
|
* Plugins can listen to theme changes via:
|
||||||
*
|
*
|
||||||
* 1. Custom event listener:
|
* 1. Custom event listener:
|
||||||
* document.addEventListener('themechange', function(e) {
|
* document.addEventListener('themechange', function(e) {
|
||||||
* console.log('Theme changed to:', e.detail.theme);
|
* console.log('Theme changed to:', e.detail.theme);
|
||||||
* });
|
* });
|
||||||
*
|
*
|
||||||
* 2. MutationObserver on data-theme:
|
* 2. MutationObserver on data-theme:
|
||||||
* const observer = new MutationObserver((mutations) => {
|
* const observer = new MutationObserver((mutations) => {
|
||||||
* const theme = html.getAttribute('data-theme');
|
* const theme = html.getAttribute('data-theme');
|
||||||
* console.log('Theme is now:', theme);
|
* console.log('Theme is now:', theme);
|
||||||
* });
|
* });
|
||||||
* observer.observe(html, { attributes: true });
|
* observer.observe(html, { attributes: true });
|
||||||
*
|
*
|
||||||
* 3. Direct access to CSS custom properties which theme controls
|
* 3. Direct access to CSS custom properties which theme controls
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Smooth scroll behavior
|
* Smooth scroll behavior
|
||||||
*/
|
*/
|
||||||
function initSmoothScroll() {
|
function initSmoothScroll() {
|
||||||
const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
||||||
if (!prefersReducedMotion) {
|
if (!prefersReducedMotion) {
|
||||||
document.documentElement.style.scrollBehavior = 'smooth';
|
document.documentElement.style.scrollBehavior = 'smooth';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
initSmoothScroll();
|
initSmoothScroll();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add focus-visible polyfill for older browsers
|
* Add focus-visible polyfill for older browsers
|
||||||
*/
|
*/
|
||||||
function initFocusVisible() {
|
function initFocusVisible() {
|
||||||
const isKeyboardEvent = (e) => {
|
const isKeyboardEvent = (e) => {
|
||||||
return e.mozInputSource === MOZ_SOURCE_KEYBOARD ||
|
return e.mozInputSource === MOZ_SOURCE_KEYBOARD ||
|
||||||
e.detail === 0 ||
|
e.detail === 0 ||
|
||||||
(e.sourceCapabilities && e.sourceCapabilities.firesTouchEvents === false);
|
(e.sourceCapabilities && e.sourceCapabilities.firesTouchEvents === false);
|
||||||
};
|
};
|
||||||
|
|
||||||
document.addEventListener('mousedown', (e) => {
|
document.addEventListener('mousedown', (e) => {
|
||||||
document.body.classList.remove('keyboard-focus');
|
document.body.classList.remove('keyboard-focus');
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
document.addEventListener('keydown', () => {
|
document.addEventListener('keydown', () => {
|
||||||
document.body.classList.add('keyboard-focus');
|
document.body.classList.add('keyboard-focus');
|
||||||
}, true);
|
}, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Search overlay functionality (Peptide Search AI integration)
|
// Search overlay functionality (Peptide Search AI integration)
|
||||||
const searchToggle = document.querySelector('.search-toggle');
|
const searchToggle = document.querySelector('.search-toggle');
|
||||||
const searchOverlay = document.getElementById('search-overlay');
|
const searchOverlay = document.getElementById('search-overlay');
|
||||||
const searchOverlayClose = document.querySelector('.search-overlay-close');
|
const searchOverlayClose = document.querySelector('.search-overlay-close');
|
||||||
|
|
||||||
function openSearchOverlay() {
|
function openSearchOverlay() {
|
||||||
if (!searchOverlay) return;
|
if (!searchOverlay) return;
|
||||||
searchOverlay.classList.add('active');
|
searchOverlay.classList.add('active');
|
||||||
searchOverlay.setAttribute('aria-hidden', 'false');
|
searchOverlay.setAttribute('aria-hidden', 'false');
|
||||||
document.body.style.overflow = 'hidden';
|
document.body.style.overflow = 'hidden';
|
||||||
// Focus the search input inside the overlay
|
// Focus the search input inside the overlay
|
||||||
const input = searchOverlay.querySelector('.psa-search-input, .ps-search-input, input[type="search"], input[type="text"]');
|
const input = searchOverlay.querySelector('.psa-search-input, .ps-search-input, input[type="search"], input[type="text"]');
|
||||||
if (input) {
|
if (input) {
|
||||||
setTimeout(() => input.focus(), 100);
|
setTimeout(() => input.focus(), 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeSearchOverlay() {
|
function closeSearchOverlay() {
|
||||||
if (!searchOverlay) return;
|
if (!searchOverlay) return;
|
||||||
searchOverlay.classList.remove('active');
|
searchOverlay.classList.remove('active');
|
||||||
searchOverlay.setAttribute('aria-hidden', 'true');
|
searchOverlay.setAttribute('aria-hidden', 'true');
|
||||||
document.body.style.overflow = '';
|
document.body.style.overflow = '';
|
||||||
// Return focus to search toggle
|
// Return focus to search toggle
|
||||||
if (searchToggle) searchToggle.focus();
|
if (searchToggle) searchToggle.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (searchToggle) {
|
if (searchToggle) {
|
||||||
searchToggle.addEventListener('click', openSearchOverlay);
|
searchToggle.addEventListener('click', openSearchOverlay);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (searchOverlayClose) {
|
if (searchOverlayClose) {
|
||||||
searchOverlayClose.addEventListener('click', closeSearchOverlay);
|
searchOverlayClose.addEventListener('click', closeSearchOverlay);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (searchOverlay) {
|
if (searchOverlay) {
|
||||||
// Close overlay when clicking the backdrop
|
// Close overlay when clicking the backdrop
|
||||||
searchOverlay.addEventListener('click', (e) => {
|
searchOverlay.addEventListener('click', (e) => {
|
||||||
if (e.target === searchOverlay) {
|
if (e.target === searchOverlay) {
|
||||||
closeSearchOverlay();
|
closeSearchOverlay();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Close on Escape key
|
// Close on Escape key
|
||||||
document.addEventListener('keydown', (e) => {
|
document.addEventListener('keydown', (e) => {
|
||||||
if (e.key === 'Escape' && searchOverlay.classList.contains('active')) {
|
if (e.key === 'Escape' && searchOverlay.classList.contains('active')) {
|
||||||
closeSearchOverlay();
|
closeSearchOverlay();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|||||||
164
footer.php
164
footer.php
@@ -1,82 +1,82 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* The footer for Peptide Starter theme
|
* The footer for Peptide Starter theme
|
||||||
*
|
*
|
||||||
* @package peptide-starter
|
* @package peptide-starter
|
||||||
*/
|
*/
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</main><!-- #main -->
|
</main><!-- #main -->
|
||||||
|
|
||||||
<footer class="site-footer">
|
<footer class="site-footer">
|
||||||
<div class="footer-wrapper">
|
<div class="footer-wrapper">
|
||||||
<!-- Newsletter Signup -->
|
<!-- Newsletter Signup -->
|
||||||
<?php if ( peptide_starter_show_newsletter_form() ) { ?>
|
<?php if ( peptide_starter_show_newsletter_form() ) { ?>
|
||||||
<div class="footer-newsletter">
|
<div class="footer-newsletter">
|
||||||
<h3><?php esc_html_e( 'Stay Updated', 'peptide-starter' ); ?></h3>
|
<h3><?php esc_html_e( 'Stay Updated', 'peptide-starter' ); ?></h3>
|
||||||
<p><?php esc_html_e( 'Subscribe to our newsletter for the latest peptide research and updates.', 'peptide-starter' ); ?></p>
|
<p><?php esc_html_e( 'Subscribe to our newsletter for the latest peptide research and updates.', 'peptide-starter' ); ?></p>
|
||||||
<form class="newsletter-form" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" method="post">
|
<form class="newsletter-form" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" method="post">
|
||||||
<?php wp_nonce_field( 'peptide_starter_newsletter', 'ps_newsletter_nonce' ); ?>
|
<?php wp_nonce_field( 'peptide_starter_newsletter', 'ps_newsletter_nonce' ); ?>
|
||||||
<input type="hidden" name="action" value="peptide_starter_newsletter_signup">
|
<input type="hidden" name="action" value="peptide_starter_newsletter_signup">
|
||||||
<input
|
<input
|
||||||
type="email"
|
type="email"
|
||||||
name="email"
|
name="email"
|
||||||
class="newsletter-input"
|
class="newsletter-input"
|
||||||
placeholder="<?php esc_attr_e( 'your@email.com', 'peptide-starter' ); ?>"
|
placeholder="<?php esc_attr_e( 'your@email.com', 'peptide-starter' ); ?>"
|
||||||
required
|
required
|
||||||
>
|
>
|
||||||
<button type="submit" class="ps-btn ps-btn-primary">
|
<button type="submit" class="ps-btn ps-btn-primary">
|
||||||
<?php esc_html_e( 'Subscribe', 'peptide-starter' ); ?>
|
<?php esc_html_e( 'Subscribe', 'peptide-starter' ); ?>
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<!-- Footer Grid -->
|
<!-- Footer Grid -->
|
||||||
<div class="footer-grid">
|
<div class="footer-grid">
|
||||||
<!-- Footer Widget Areas -->
|
<!-- Footer Widget Areas -->
|
||||||
<?php
|
<?php
|
||||||
for ( $i = 1; $i <= 4; $i++ ) {
|
for ( $i = 1; $i <= 4; $i++ ) {
|
||||||
echo '<div class="footer-section">';
|
echo '<div class="footer-section">';
|
||||||
if ( is_active_sidebar( 'footer-' . $i ) ) {
|
if ( is_active_sidebar( 'footer-' . $i ) ) {
|
||||||
dynamic_sidebar( 'footer-' . $i );
|
dynamic_sidebar( 'footer-' . $i );
|
||||||
} else {
|
} else {
|
||||||
// Default footer content if no widgets
|
// Default footer content if no widgets
|
||||||
if ( 1 === $i ) {
|
if ( 1 === $i ) {
|
||||||
echo '<h3>' . esc_html__( 'About', 'peptide-starter' ) . '</h3>';
|
echo '<h3>' . esc_html__( 'About', 'peptide-starter' ) . '</h3>';
|
||||||
echo '<p>' . esc_html__( 'Peptide Repo is a comprehensive scientific database for peptide research.', 'peptide-starter' ) . '</p>';
|
echo '<p>' . esc_html__( 'Peptide Repo is a comprehensive scientific database for peptide research.', 'peptide-starter' ) . '</p>';
|
||||||
} elseif ( 2 === $i ) {
|
} elseif ( 2 === $i ) {
|
||||||
echo '<h3>' . esc_html__( 'Quick Links', 'peptide-starter' ) . '</h3>';
|
echo '<h3>' . esc_html__( 'Quick Links', 'peptide-starter' ) . '</h3>';
|
||||||
echo '<ul>';
|
echo '<ul>';
|
||||||
echo '<li><a href="' . esc_url( home_url( '/' ) ) . '">' . esc_html__( 'Home', 'peptide-starter' ) . '</a></li>';
|
echo '<li><a href="' . esc_url( home_url( '/' ) ) . '">' . esc_html__( 'Home', 'peptide-starter' ) . '</a></li>';
|
||||||
echo '<li><a href="' . esc_url( home_url( '/peptides' ) ) . '">' . esc_html__( 'Peptides Database', 'peptide-starter' ) . '</a></li>';
|
echo '<li><a href="' . esc_url( home_url( '/peptides' ) ) . '">' . esc_html__( 'Peptides Database', 'peptide-starter' ) . '</a></li>';
|
||||||
echo '</ul>';
|
echo '</ul>';
|
||||||
} elseif ( 3 === $i ) {
|
} elseif ( 3 === $i ) {
|
||||||
echo '<h3>' . esc_html__( 'Resources', 'peptide-starter' ) . '</h3>';
|
echo '<h3>' . esc_html__( 'Resources', 'peptide-starter' ) . '</h3>';
|
||||||
echo '<ul>';
|
echo '<ul>';
|
||||||
echo '<li><a href="#">' . esc_html__( 'Research', 'peptide-starter' ) . '</a></li>';
|
echo '<li><a href="#">' . esc_html__( 'Research', 'peptide-starter' ) . '</a></li>';
|
||||||
echo '<li><a href="#">' . esc_html__( 'Documentation', 'peptide-starter' ) . '</a></li>';
|
echo '<li><a href="#">' . esc_html__( 'Documentation', 'peptide-starter' ) . '</a></li>';
|
||||||
echo '</ul>';
|
echo '</ul>';
|
||||||
} elseif ( 4 === $i ) {
|
} elseif ( 4 === $i ) {
|
||||||
echo '<h3>' . esc_html__( 'Connect', 'peptide-starter' ) . '</h3>';
|
echo '<h3>' . esc_html__( 'Connect', 'peptide-starter' ) . '</h3>';
|
||||||
echo '<ul>';
|
echo '<ul>';
|
||||||
echo '<li><a href="https://github.com/peptiderepo" target="_blank" rel="noopener">' . esc_html__( 'GitHub', 'peptide-starter' ) . '</a></li>';
|
echo '<li><a href="https://github.com/peptiderepo" target="_blank" rel="noopener">' . esc_html__( 'GitHub', 'peptide-starter' ) . '</a></li>';
|
||||||
echo '<li><a href="#">' . esc_html__( 'Twitter', 'peptide-starter' ) . '</a></li>';
|
echo '<li><a href="#">' . esc_html__( 'Twitter', 'peptide-starter' ) . '</a></li>';
|
||||||
echo '</ul>';
|
echo '</ul>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Footer Bottom -->
|
<!-- Footer Bottom -->
|
||||||
<div class="footer-bottom">
|
<div class="footer-bottom">
|
||||||
<p><?php echo wp_kses_post( peptide_starter_get_footer_copyright() ); ?></p>
|
<p><?php echo wp_kses_post( peptide_starter_get_footer_copyright() ); ?></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<?php wp_footer(); ?>
|
<?php wp_footer(); ?>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
170
front-page.php
170
front-page.php
@@ -1,85 +1,85 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* The front page template
|
* The front page template
|
||||||
*
|
*
|
||||||
* @package peptide-starter
|
* @package peptide-starter
|
||||||
*/
|
*/
|
||||||
|
|
||||||
get_header();
|
get_header();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<main id="main" class="site-main">
|
<main id="main" class="site-main">
|
||||||
<!-- Hero Section -->
|
<!-- Hero Section -->
|
||||||
<section class="hero-section">
|
<section class="hero-section">
|
||||||
<div class="hero-content">
|
<div class="hero-content">
|
||||||
<h1 class="hero-title"><?php echo esc_html( peptide_starter_get_hero_title() ); ?></h1>
|
<h1 class="hero-title"><?php echo esc_html( peptide_starter_get_hero_title() ); ?></h1>
|
||||||
<p class="hero-subtitle"><?php echo esc_html( peptide_starter_get_hero_subtitle() ); ?></p>
|
<p class="hero-subtitle"><?php echo esc_html( peptide_starter_get_hero_subtitle() ); ?></p>
|
||||||
|
|
||||||
<!-- Hero Search (Peptide Search AI) -->
|
<!-- Hero Search (Peptide Search AI) -->
|
||||||
<div class="hero-search">
|
<div class="hero-search">
|
||||||
<?php
|
<?php
|
||||||
if ( shortcode_exists( 'peptide_search' ) ) {
|
if ( shortcode_exists( 'peptide_search' ) ) {
|
||||||
echo do_shortcode( '[peptide_search placeholder="' . esc_attr( peptide_starter_get_search_placeholder() ) . '"]' );
|
echo do_shortcode( '[peptide_search placeholder="' . esc_attr( peptide_starter_get_search_placeholder() ) . '"]' );
|
||||||
} else {
|
} else {
|
||||||
?>
|
?>
|
||||||
<form class="ps-search-form" method="get" action="<?php echo esc_url( home_url( '/' ) ); ?>">
|
<form class="ps-search-form" method="get" action="<?php echo esc_url( home_url( '/' ) ); ?>">
|
||||||
<input
|
<input
|
||||||
type="search"
|
type="search"
|
||||||
name="s"
|
name="s"
|
||||||
class="ps-search-input"
|
class="ps-search-input"
|
||||||
placeholder="<?php echo esc_attr( peptide_starter_get_search_placeholder() ); ?>"
|
placeholder="<?php echo esc_attr( peptide_starter_get_search_placeholder() ); ?>"
|
||||||
value="<?php echo esc_attr( get_search_query() ); ?>"
|
value="<?php echo esc_attr( get_search_query() ); ?>"
|
||||||
>
|
>
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Hero CTAs -->
|
<!-- Hero CTAs -->
|
||||||
<div class="hero-ctas">
|
<div class="hero-ctas">
|
||||||
<a href="<?php echo esc_url( home_url( '/peptides' ) ); ?>" class="ps-btn ps-btn-primary">
|
<a href="<?php echo esc_url( home_url( '/peptides' ) ); ?>" class="ps-btn ps-btn-primary">
|
||||||
<?php esc_html_e( 'Browse Peptides', 'peptide-starter' ); ?>
|
<?php esc_html_e( 'Browse Peptides', 'peptide-starter' ); ?>
|
||||||
</a>
|
</a>
|
||||||
<a href="<?php echo esc_url( home_url( '/about' ) ); ?>" class="ps-btn ps-btn-secondary">
|
<a href="<?php echo esc_url( home_url( '/about' ) ); ?>" class="ps-btn ps-btn-secondary">
|
||||||
<?php esc_html_e( 'Learn More', 'peptide-starter' ); ?>
|
<?php esc_html_e( 'Learn More', 'peptide-starter' ); ?>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- PRAutoBlogger Posts Widget -->
|
<!-- PRAutoBlogger Posts Widget -->
|
||||||
<?php
|
<?php
|
||||||
if ( shortcode_exists( 'prautoblogger_posts' ) ) {
|
if ( shortcode_exists( 'prautoblogger_posts' ) ) {
|
||||||
echo do_shortcode( '[prautoblogger_posts count="6" title="' . esc_attr__( 'Latest Research & Insights', 'peptide-starter' ) . '" subtitle="' . esc_attr__( 'Evidence-based articles on peptides, protocols, and emerging research', 'peptide-starter' ) . '"]' );
|
echo do_shortcode( '[prautoblogger_posts count="6" title="' . esc_attr__( 'Latest Research & Insights', 'peptide-starter' ) . '" subtitle="' . esc_attr__( 'Evidence-based articles on peptides, protocols, and emerging research', 'peptide-starter' ) . '"]' );
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- News Feed Section -->
|
<!-- News Feed Section -->
|
||||||
<?php
|
<?php
|
||||||
// Display the Peptide News plugin shortcode if available
|
// Display the Peptide News plugin shortcode if available
|
||||||
if ( shortcode_exists( 'peptide_news' ) ) {
|
if ( shortcode_exists( 'peptide_news' ) ) {
|
||||||
?>
|
?>
|
||||||
<section class="news-feed-section">
|
<section class="news-feed-section">
|
||||||
<div class="ps-container">
|
<div class="ps-container">
|
||||||
<div class="news-feed-header">
|
<div class="news-feed-header">
|
||||||
<h2 class="news-feed-title"><?php esc_html_e( 'Latest Peptide Research', 'peptide-starter' ); ?></h2>
|
<h2 class="news-feed-title"><?php esc_html_e( 'Latest Peptide Research', 'peptide-starter' ); ?></h2>
|
||||||
<p class="news-feed-description">
|
<p class="news-feed-description">
|
||||||
<?php esc_html_e( 'Stay updated with the latest developments in peptide science and research.', 'peptide-starter' ); ?>
|
<?php esc_html_e( 'Stay updated with the latest developments in peptide science and research.', 'peptide-starter' ); ?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<?php echo do_shortcode( '[peptide_news]' ); ?>
|
<?php echo do_shortcode( '[peptide_news]' ); ?>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
// Note: The front page layout is handled entirely by this template.
|
// Note: The front page layout is handled entirely by this template.
|
||||||
// Old page content (e.g. from Elementor) is intentionally NOT rendered here
|
// Old page content (e.g. from Elementor) is intentionally NOT rendered here
|
||||||
// to avoid duplicate hero sections and empty space.
|
// to avoid duplicate hero sections and empty space.
|
||||||
?>
|
?>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<?php get_footer(); ?>
|
<?php get_footer(); ?>
|
||||||
|
|||||||
1042
functions.php
1042
functions.php
File diff suppressed because it is too large
Load Diff
18
header.php
18
header.php
@@ -29,14 +29,16 @@
|
|||||||
<!-- Primary Navigation -->
|
<!-- Primary Navigation -->
|
||||||
<nav class="primary-navigation">
|
<nav class="primary-navigation">
|
||||||
<?php
|
<?php
|
||||||
wp_nav_menu( array(
|
wp_nav_menu(
|
||||||
'theme_location' => 'primary',
|
array(
|
||||||
'fallback_cb' => 'peptide_starter_primary_menu_fallback',
|
'theme_location' => 'primary',
|
||||||
'walker' => new Peptide_Starter_Nav_Walker(),
|
'fallback_cb' => 'peptide_starter_primary_menu_fallback',
|
||||||
'depth' => 2,
|
'walker' => new Peptide_Starter_Nav_Walker(),
|
||||||
'container' => false,
|
'depth' => 2,
|
||||||
'items_wrap' => '<ul>%3$s</ul>',
|
'container' => false,
|
||||||
) );
|
'items_wrap' => '<ul>%3$s</ul>',
|
||||||
|
)
|
||||||
|
);
|
||||||
?>
|
?>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
|||||||
@@ -1,27 +1,27 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* The search form template
|
* The search form template
|
||||||
*
|
*
|
||||||
* @package peptide-starter
|
* @package peptide-starter
|
||||||
*/
|
*/
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<form role="search" method="get" class="ps-search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
|
<form role="search" method="get" class="ps-search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
|
||||||
<label for="search" class="sr-only"><?php esc_html_e( 'Search', 'peptide-starter' ); ?></label>
|
<label for="search" class="sr-only"><?php esc_html_e( 'Search', 'peptide-starter' ); ?></label>
|
||||||
<div style="position: relative;">
|
<div style="position: relative;">
|
||||||
<input
|
<input
|
||||||
type="search"
|
type="search"
|
||||||
id="search"
|
id="search"
|
||||||
name="s"
|
name="s"
|
||||||
class="ps-search-input"
|
class="ps-search-input"
|
||||||
placeholder="<?php esc_attr_e( 'Search...', 'peptide-starter' ); ?>"
|
placeholder="<?php esc_attr_e( 'Search...', 'peptide-starter' ); ?>"
|
||||||
value="<?php echo esc_attr( get_search_query() ); ?>"
|
value="<?php echo esc_attr( get_search_query() ); ?>"
|
||||||
>
|
>
|
||||||
<button type="submit" class="ps-btn ps-btn-primary" style="position: absolute; right: 0; top: 0; border-radius: 0 var(--radius-lg) var(--radius-lg) 0;">
|
<button type="submit" class="ps-btn ps-btn-primary" style="position: absolute; right: 0; top: 0; border-radius: 0 var(--radius-lg) var(--radius-lg) 0;">
|
||||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path d="M9 17C13.4183 17 17 13.4183 17 9C17 4.58172 13.4183 1 9 1C4.58172 1 1 4.58172 1 9C1 13.4183 4.58172 17 9 17Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
<path d="M9 17C13.4183 17 17 13.4183 17 9C17 4.58172 13.4183 1 9 1C4.58172 1 1 4.58172 1 9C1 13.4183 4.58172 17 9 17Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
<path d="M19 19L14.65 14.65" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
<path d="M19 19L14.65 14.65" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -39,25 +39,45 @@ get_header();
|
|||||||
<!-- Meta Information -->
|
<!-- Meta Information -->
|
||||||
<div class="peptide-meta" style="margin-top: var(--spacing-3xl); padding-top: var(--spacing-2xl); border-top: 1px solid var(--color-border-default);">
|
<div class="peptide-meta" style="margin-top: var(--spacing-3xl); padding-top: var(--spacing-2xl); border-top: 1px solid var(--color-border-default);">
|
||||||
<dl>
|
<dl>
|
||||||
<?php if ( $formula = get_post_meta( get_the_ID(), 'peptide_formula', true ) ) { ?>
|
<?php
|
||||||
|
$formula = get_post_meta( get_the_ID(), 'peptide_formula', true );
|
||||||
|
if ( $formula ) {
|
||||||
|
?>
|
||||||
<dt><strong><?php esc_html_e( 'Molecular Formula:', 'peptide-starter' ); ?></strong></dt>
|
<dt><strong><?php esc_html_e( 'Molecular Formula:', 'peptide-starter' ); ?></strong></dt>
|
||||||
<dd><code><?php echo esc_html( $formula ); ?></code></dd>
|
<dd><code><?php echo esc_html( $formula ); ?></code></dd>
|
||||||
<?php } ?>
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
<?php if ( $sequence = get_post_meta( get_the_ID(), 'peptide_sequence', true ) ) { ?>
|
<?php
|
||||||
|
$sequence = get_post_meta( get_the_ID(), 'peptide_sequence', true );
|
||||||
|
if ( $sequence ) {
|
||||||
|
?>
|
||||||
<dt><strong><?php esc_html_e( 'Sequence:', 'peptide-starter' ); ?></strong></dt>
|
<dt><strong><?php esc_html_e( 'Sequence:', 'peptide-starter' ); ?></strong></dt>
|
||||||
<dd><code><?php echo esc_html( $sequence ); ?></code></dd>
|
<dd><code><?php echo esc_html( $sequence ); ?></code></dd>
|
||||||
<?php } ?>
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
<?php if ( $molecular_weight = get_post_meta( get_the_ID(), 'peptide_molecular_weight', true ) ) { ?>
|
<?php
|
||||||
|
$molecular_weight = get_post_meta( get_the_ID(), 'peptide_molecular_weight', true );
|
||||||
|
if ( $molecular_weight ) {
|
||||||
|
?>
|
||||||
<dt><strong><?php esc_html_e( 'Molecular Weight:', 'peptide-starter' ); ?></strong></dt>
|
<dt><strong><?php esc_html_e( 'Molecular Weight:', 'peptide-starter' ); ?></strong></dt>
|
||||||
<dd><?php echo esc_html( $molecular_weight ); ?> Da</dd>
|
<dd><?php echo esc_html( $molecular_weight ); ?> Da</dd>
|
||||||
<?php } ?>
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
<?php if ( $therapeutic_use = get_post_meta( get_the_ID(), 'peptide_therapeutic_use', true ) ) { ?>
|
<?php
|
||||||
|
$therapeutic_use = get_post_meta( get_the_ID(), 'peptide_therapeutic_use', true );
|
||||||
|
if ( $therapeutic_use ) {
|
||||||
|
?>
|
||||||
<dt><strong><?php esc_html_e( 'Therapeutic Use:', 'peptide-starter' ); ?></strong></dt>
|
<dt><strong><?php esc_html_e( 'Therapeutic Use:', 'peptide-starter' ); ?></strong></dt>
|
||||||
<dd><?php echo esc_html( $therapeutic_use ); ?></dd>
|
<dd><?php echo esc_html( $therapeutic_use ); ?></dd>
|
||||||
<?php } ?>
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<?php
|
<?php
|
||||||
if ( is_search() ) {
|
if ( is_search() ) {
|
||||||
?>
|
?>
|
||||||
<p><?php esc_html_e( "Sorry, but nothing matched your search terms. Please try again with some different keywords.", 'peptide-starter' ); ?></p>
|
<p><?php esc_html_e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'peptide-starter' ); ?></p>
|
||||||
<?php
|
<?php
|
||||||
get_search_form();
|
get_search_form();
|
||||||
} elseif ( is_home() && current_user_can( 'publish_posts' ) ) {
|
} elseif ( is_home() && current_user_can( 'publish_posts' ) ) {
|
||||||
@@ -38,11 +38,11 @@
|
|||||||
<?php
|
<?php
|
||||||
} elseif ( is_archive() ) {
|
} elseif ( is_archive() ) {
|
||||||
?>
|
?>
|
||||||
<p><?php esc_html_e( "It looks like there are no posts for this archive. Try a different category or date.", 'peptide-starter' ); ?></p>
|
<p><?php esc_html_e( 'It looks like there are no posts for this archive. Try a different category or date.', 'peptide-starter' ); ?></p>
|
||||||
<?php
|
<?php
|
||||||
} else {
|
} else {
|
||||||
?>
|
?>
|
||||||
<p><?php esc_html_e( "It seems we can't find what you're looking for. Perhaps searching can help.", 'peptide-starter' ); ?></p>
|
<p><?php esc_html_e( 'It seems we can\'t find what you\'re looking for. Perhaps searching can help.', 'peptide-starter' ); ?></p>
|
||||||
<?php
|
<?php
|
||||||
get_search_form();
|
get_search_form();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user