From d28d5f45d5248a01bdd8359c7874b0b129feb7db Mon Sep 17 00:00:00 2001 From: peptiderepo Date: Tue, 14 Apr 2026 12:24:52 +0700 Subject: [PATCH] fix: PHPCS multi-line function call signature violations in customizer.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reformat add_setting() and add_control() calls to comply with PEAR.Functions.FunctionCallSignature — each argument on its own line, opening paren last on line, closing paren on its own line. Matches the pattern already used by add_section() calls in the same file. Co-Authored-By: Claude Opus 4.6 --- inc/customizer.php | 130 ++++++++++++++++++++++++++++----------------- 1 file changed, 80 insertions(+), 50 deletions(-) diff --git a/inc/customizer.php b/inc/customizer.php index 0b73c77..a66cea4 100644 --- a/inc/customizer.php +++ b/inc/customizer.php @@ -47,40 +47,58 @@ function peptide_starter_customize_register( $wp_customize ) { ); // Hero Title. - $wp_customize->add_setting( 'hero_title', array( - 'default' => get_bloginfo( 'name' ), - 'transport' => 'postMessage', - 'sanitize_callback' => 'sanitize_text_field', - ) ); - $wp_customize->add_control( 'hero_title', array( - 'label' => esc_html__( 'Hero Title', 'peptide-starter' ), - 'section' => 'peptide_starter_hero', - 'type' => 'text', - ) ); + $wp_customize->add_setting( + 'hero_title', + array( + 'default' => get_bloginfo( 'name' ), + 'transport' => 'postMessage', + 'sanitize_callback' => 'sanitize_text_field', + ) + ); + $wp_customize->add_control( + 'hero_title', + array( + 'label' => esc_html__( 'Hero Title', 'peptide-starter' ), + 'section' => 'peptide_starter_hero', + 'type' => 'text', + ) + ); // Hero Subtitle. - $wp_customize->add_setting( 'hero_subtitle', array( - 'default' => esc_html__( 'A scientific peptide reference database', 'peptide-starter' ), - 'transport' => 'postMessage', - 'sanitize_callback' => 'sanitize_text_field', - ) ); - $wp_customize->add_control( 'hero_subtitle', array( - 'label' => esc_html__( 'Hero Subtitle', 'peptide-starter' ), - 'section' => 'peptide_starter_hero', - 'type' => 'textarea', - ) ); + $wp_customize->add_setting( + 'hero_subtitle', + array( + 'default' => esc_html__( 'A scientific peptide reference database', 'peptide-starter' ), + 'transport' => 'postMessage', + 'sanitize_callback' => 'sanitize_text_field', + ) + ); + $wp_customize->add_control( + 'hero_subtitle', + array( + 'label' => esc_html__( 'Hero Subtitle', 'peptide-starter' ), + 'section' => 'peptide_starter_hero', + 'type' => 'textarea', + ) + ); // Hero Search Placeholder. - $wp_customize->add_setting( 'hero_search_placeholder', array( - 'default' => esc_html__( 'Search peptides, sequences, or research...', 'peptide-starter' ), - 'transport' => 'postMessage', - 'sanitize_callback' => 'sanitize_text_field', - ) ); - $wp_customize->add_control( 'hero_search_placeholder', array( - 'label' => esc_html__( 'Search Placeholder', 'peptide-starter' ), - 'section' => 'peptide_starter_hero', - 'type' => 'text', - ) ); + $wp_customize->add_setting( + 'hero_search_placeholder', + array( + 'default' => esc_html__( 'Search peptides, sequences, or research...', 'peptide-starter' ), + 'transport' => 'postMessage', + 'sanitize_callback' => 'sanitize_text_field', + ) + ); + $wp_customize->add_control( + 'hero_search_placeholder', + array( + 'label' => esc_html__( 'Search Placeholder', 'peptide-starter' ), + 'section' => 'peptide_starter_hero', + 'type' => 'text', + ) + ); // Footer section. $wp_customize->add_section( @@ -92,16 +110,22 @@ function peptide_starter_customize_register( $wp_customize ) { ); // Footer Copyright. - $wp_customize->add_setting( 'footer_copyright', array( - 'default' => esc_html__( 'Copyright © 2026 Peptide Repo. All rights reserved.', 'peptide-starter' ), - 'transport' => 'postMessage', - 'sanitize_callback' => 'wp_kses_post', - ) ); - $wp_customize->add_control( 'footer_copyright', array( - 'label' => esc_html__( 'Copyright Text', 'peptide-starter' ), - 'section' => 'peptide_starter_footer', - 'type' => 'textarea', - ) ); + $wp_customize->add_setting( + 'footer_copyright', + array( + 'default' => esc_html__( 'Copyright © 2026 Peptide Repo. All rights reserved.', 'peptide-starter' ), + 'transport' => 'postMessage', + 'sanitize_callback' => 'wp_kses_post', + ) + ); + $wp_customize->add_control( + 'footer_copyright', + array( + 'label' => esc_html__( 'Copyright Text', 'peptide-starter' ), + 'section' => 'peptide_starter_footer', + 'type' => 'textarea', + ) + ); // Dark mode section. $wp_customize->add_section( @@ -113,16 +137,22 @@ function peptide_starter_customize_register( $wp_customize ) { ); // Dark mode default. - $wp_customize->add_setting( 'dark_mode_default', array( - 'default' => false, - 'transport' => 'refresh', - 'sanitize_callback' => 'peptide_starter_sanitize_checkbox', - ) ); - $wp_customize->add_control( 'dark_mode_default', array( - 'label' => esc_html__( 'Enable Dark Mode by Default', 'peptide-starter' ), - 'section' => 'peptide_starter_theme_mode', - 'type' => 'checkbox', - ) ); + $wp_customize->add_setting( + 'dark_mode_default', + array( + 'default' => false, + 'transport' => 'refresh', + 'sanitize_callback' => 'peptide_starter_sanitize_checkbox', + ) + ); + $wp_customize->add_control( + 'dark_mode_default', + array( + 'label' => esc_html__( 'Enable Dark Mode by Default', 'peptide-starter' ), + 'section' => 'peptide_starter_theme_mode', + 'type' => 'checkbox', + ) + ); } add_action( 'customize_register', 'peptide_starter_customize_register' );