Account_Settings::register_settings_section()
Summary
No summary available.Return
(void)
Source
File: src/BigCommerce/Settings/Sections/Account_Settings.php
public function register_settings_section() { add_settings_section( self::NAME, __( 'Accounts and Registration', 'bigcommerce' ), function ( $section ) { do_action( 'bigcommerce/settings/render/accounts', $section ); }, Settings_Screen::NAME ); foreach ( $this->pages as $page ) { register_setting( Settings_Screen::NAME, $page->get_option_name() ); add_settings_field( $page->get_option_name(), $page->get_post_state_label(), [ $this, 'render_page_field' ], Settings_Screen::NAME, self::NAME, [ 'page' => $page, 'label_for' => 'field-' . $page->get_option_name(), ] ); } register_setting( Settings_Screen::NAME, self::SUPPORT_EMAIL, [ 'sanitize_callback' => 'is_email', ] ); add_settings_field( self::SUPPORT_EMAIL, esc_html( __( 'Support Email', 'bigcommerce' ) ), [ $this, 'render_field', ], Settings_Screen::NAME, self::NAME, [ 'option' => self::SUPPORT_EMAIL, 'label' => __( 'Support Email', 'bigcommerce' ), 'label_for' => 'field-' . self::SUPPORT_EMAIL, 'type' => 'text', ] ); register_setting( Settings_Screen::NAME, self::REGISTRATION_SPAM_CHECK ); add_settings_field( self::REGISTRATION_SPAM_CHECK, esc_html( __( 'Registration Spam Check', 'bigcommerce' ) ), [ $this, 'render_registration_spam_check_field' ], Settings_Screen::NAME, self::NAME, [ 'type' => 'checkbox', 'option' => self::REGISTRATION_SPAM_CHECK, 'label' => __( 'Registration Spam Check', 'bigcommerce' ), 'description' => __( 'Enable user registration spam check with Akismet.', 'bigcommerce' ), ] ); register_setting( Settings_Screen::NAME, self::ALLOW_GLOBAL_LOGINS ); add_settings_field( self::ALLOW_GLOBAL_LOGINS, esc_html( __( 'Allow global logins', 'bigcommerce' ) ), [ $this, 'render_allow_global_logins_field' ], Settings_Screen::NAME, self::NAME, [ 'type' => 'checkbox', 'option' => self::ALLOW_GLOBAL_LOGINS, 'label' => __( 'Allow global logins', 'bigcommerce' ), 'description' => __( 'Allow all future customers global login access across all your storefronts.', 'bigcommerce' ), ] ); }