From cc3d2ea495e38e63e54741353eeadaf04d8873b7 Mon Sep 17 00:00:00 2001 From: Ned Zimmerman Date: Wed, 30 Aug 2017 10:58:36 -0300 Subject: [PATCH] Add front page contact form controls. --- app/admin.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/app/admin.php b/app/admin.php index e57219b..90b237f 100644 --- a/app/admin.php +++ b/app/admin.php @@ -88,6 +88,28 @@ add_action('customize_register', function (\WP_Customize_Manager $wp_customize) 'section' => 'pb_front_page_catalog', 'settings' => 'pb_front_page_catalog_title', ]); + $wp_customize->add_section('pb_front_page_contact_form', [ + 'title' => __('Front Page Contact Form', 'aldine'), + 'priority' => 25, + ]); + $wp_customize->add_setting('pb_front_page_contact_form', [ + 'type' => 'option', + ]); + $wp_customize->add_control('pb_front_page_contact_form', [ + 'label' => __('Show Front Page Contact Form', 'aldine'), + 'section' => 'pb_front_page_contact_form', + 'settings' => 'pb_front_page_contact_form', + 'type' => 'checkbox' + ]); + $wp_customize->add_setting('pb_front_page_contact_form_title', [ + 'type' => 'option', + 'sanitize_callback' => 'sanitize_text_field' + ]); + $wp_customize->add_control('pb_front_page_contact_form_title', [ + 'label' => __('Front Page Contact Form Title', 'aldine'), + 'section' => 'pb_front_page_contact_form', + 'settings' => 'pb_front_page_contact_form_title', + ]); }); /**