fix: PHPCS — replace multi-line HTML comments, fix verdict-meta array indent + PHP tag
front-page.php: - Replace 3 decorative multi-line HTML comment blocks (tab+space mixed indentation) with single-line <!-- SECTION --> comments; eliminates 16 'Tabs must be used' PHPCS errors at lines 37-41, 93-97, 127-132 inc/verdict-meta.php: - Line 37: correct over-indented 'single' key (6 tabs → 3 tabs to match array alignment of sibling keys) - Line 171: split '<?php for (...)' onto two lines so opening PHP tag is on a line by itself (WordPress PHPCS requirement) Both are pre-existing violations now exposed because CI runs PHPCS on all PHP files (not just changed ones). No functional change.
This commit is contained in:
@@ -33,12 +33,7 @@ $featured_monograph_ids = array( 211, 36, 177 );
|
|||||||
|
|
||||||
<main id="main" class="site-main">
|
<main id="main" class="site-main">
|
||||||
|
|
||||||
<!-- ═══════════════════════════════════════════════════════════════
|
<!-- HERO SECTION -->
|
||||||
HERO SECTION
|
|
||||||
H1: customizer hero_title (default: "Is this peptide right for you?")
|
|
||||||
Sub-head: customizer hero_subtitle (default: "What the research really says")
|
|
||||||
Search: PSA plugin shortcode or fallback form; lime submit button via brand.css
|
|
||||||
═══════════════════════════════════════════════════════════════ -->
|
|
||||||
<section class="hero-section">
|
<section class="hero-section">
|
||||||
<div class="hero-content">
|
<div class="hero-content">
|
||||||
<h1 class="hero-title">
|
<h1 class="hero-title">
|
||||||
@@ -89,12 +84,7 @@ $featured_monograph_ids = array( 211, 36, 177 );
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- ═══════════════════════════════════════════════════════════════
|
<!-- VERDICT TAXONOMY EXPLAINER -->
|
||||||
VERDICT TAXONOMY EXPLAINER
|
|
||||||
Five verdict states shown as badge + one-line description.
|
|
||||||
Educates first-time visitors on the brand's evaluation system.
|
|
||||||
Rule: color + glyph + label always rendered together (§5.1 CMO brief).
|
|
||||||
═══════════════════════════════════════════════════════════════ -->
|
|
||||||
<section class="hero-verdict-explainer" aria-label="<?php esc_attr_e( 'Our verdict system', 'peptide-starter' ); ?>">
|
<section class="hero-verdict-explainer" aria-label="<?php esc_attr_e( 'Our verdict system', 'peptide-starter' ); ?>">
|
||||||
<div class="ps-container">
|
<div class="ps-container">
|
||||||
<p class="hero-verdict-explainer__heading">
|
<p class="hero-verdict-explainer__heading">
|
||||||
@@ -123,13 +113,7 @@ $featured_monograph_ids = array( 211, 36, 177 );
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- ═══════════════════════════════════════════════════════════════
|
<!-- FEATURED VERDICT CARDS: semaglutide=211 (Established), BPC-157=36 (Investigational), Melanotan-II=177 (Cautionary) -->
|
||||||
FEATURED VERDICT CARDS
|
|
||||||
Three exemplar monographs showing the verdict card in context.
|
|
||||||
Pulls from post meta set by verdict-meta.php (verdict_state,
|
|
||||||
verdict_text, signal_row_N_label, signal_row_N_glyph).
|
|
||||||
Post IDs: semaglutide=211, BPC-157=36, Melanotan-II=177.
|
|
||||||
═══════════════════════════════════════════════════════════════ -->
|
|
||||||
<?php
|
<?php
|
||||||
$featured_posts = get_posts(
|
$featured_posts = get_posts(
|
||||||
array(
|
array(
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ function peptide_starter_register_verdict_meta() {
|
|||||||
'verdict_state',
|
'verdict_state',
|
||||||
array(
|
array(
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'single' => true,
|
'single' => true,
|
||||||
'show_in_rest' => true,
|
'show_in_rest' => true,
|
||||||
'auth_callback' => '__return_true',
|
'auth_callback' => '__return_true',
|
||||||
'sanitize_callback' => function ( $value ) use ( $allowed_states ) {
|
'sanitize_callback' => function ( $value ) use ( $allowed_states ) {
|
||||||
@@ -168,7 +168,8 @@ function peptide_starter_render_verdict_meta_box( $post ) {
|
|||||||
<hr style="border:none;border-top:1px solid #ddd;margin:8px 0 16px;">
|
<hr style="border:none;border-top:1px solid #ddd;margin:8px 0 16px;">
|
||||||
<p style="font-weight:bold;margin-bottom:8px;"><?php esc_html_e( 'Evidence Signal Rows', 'peptide-starter' ); ?></p>
|
<p style="font-weight:bold;margin-bottom:8px;"><?php esc_html_e( 'Evidence Signal Rows', 'peptide-starter' ); ?></p>
|
||||||
|
|
||||||
<?php for ( $i = 1; $i <= 3; $i++ ) :
|
<?php
|
||||||
|
for ( $i = 1; $i <= 3; $i++ ) :
|
||||||
$row_text = get_post_meta( $post->ID, 'signal_row_' . $i, true );
|
$row_text = get_post_meta( $post->ID, 'signal_row_' . $i, true );
|
||||||
$row_glyph = get_post_meta( $post->ID, 'signal_row_' . $i . '_glyph', true );
|
$row_glyph = get_post_meta( $post->ID, 'signal_row_' . $i . '_glyph', true );
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user