fix: PHPCS verdict-meta.php — fix all over-tabbed array keys + for-loop body indent
Four more 'single' keys had incorrect tab counts (same over-indentation pattern as line 37 fixed in prior commit): - Line 52 (verdict_text registration): 6 tabs → 3 - Line 66 (signal_row text, inside for loop): 8 tabs → 4 - Line 80 (signal_row glyph, inside for loop): 8 tabs → 4 - Line 97 (has_partner_link): 6 tabs → 3 For-loop body lines 173–175: were at 3 tabs (same level as the 'for' statement); PHPCS requires body to be indented one level deeper → 4 tabs. All pre-existing violations in verdict-meta.php are now cleared.
This commit is contained in:
@@ -49,7 +49,7 @@ function peptide_starter_register_verdict_meta() {
|
|||||||
'verdict_text',
|
'verdict_text',
|
||||||
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' => 'sanitize_textarea_field',
|
'sanitize_callback' => 'sanitize_textarea_field',
|
||||||
@@ -63,7 +63,7 @@ function peptide_starter_register_verdict_meta() {
|
|||||||
'signal_row_' . $i,
|
'signal_row_' . $i,
|
||||||
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' => 'sanitize_text_field',
|
'sanitize_callback' => 'sanitize_text_field',
|
||||||
@@ -77,7 +77,7 @@ function peptide_starter_register_verdict_meta() {
|
|||||||
'signal_row_' . $i . '_glyph',
|
'signal_row_' . $i . '_glyph',
|
||||||
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_glyphs ) {
|
'sanitize_callback' => function ( $value ) use ( $allowed_glyphs ) {
|
||||||
@@ -94,7 +94,7 @@ function peptide_starter_register_verdict_meta() {
|
|||||||
'has_partner_link',
|
'has_partner_link',
|
||||||
array(
|
array(
|
||||||
'type' => 'boolean',
|
'type' => 'boolean',
|
||||||
'single' => true,
|
'single' => true,
|
||||||
'show_in_rest' => true,
|
'show_in_rest' => true,
|
||||||
'auth_callback' => '__return_true',
|
'auth_callback' => '__return_true',
|
||||||
'default' => false,
|
'default' => false,
|
||||||
@@ -170,9 +170,9 @@ function peptide_starter_render_verdict_meta_box( $post ) {
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
for ( $i = 1; $i <= 3; $i++ ) :
|
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 );
|
||||||
?>
|
?>
|
||||||
<div style="display:flex;gap:8px;align-items:flex-start;margin-bottom:12px;">
|
<div style="display:flex;gap:8px;align-items:flex-start;margin-bottom:12px;">
|
||||||
<div style="flex:0 0 80px;">
|
<div style="flex:0 0 80px;">
|
||||||
<label for="signal_row_<?php echo esc_attr( $i ); ?>_glyph"
|
<label for="signal_row_<?php echo esc_attr( $i ); ?>_glyph"
|
||||||
|
|||||||
Reference in New Issue
Block a user