Account_Settings::render_registration_spam_check_field()
Summary
No summary available.Source
File: src/BigCommerce/Settings/Sections/Account_Settings.php
public function render_registration_spam_check_field() { if ( ! is_plugin_active( 'akismet/akismet.php' ) ) { printf( '<p class="description">%s</p>', sprintf( esc_html( __( '%sAkismet plugin%s needs to be active and configured to enable this feature.', 'bigcommerce' ) ), sprintf( '<a target="__blank" href="%s">', esc_url( 'https://docs.akismet.com/getting-started/api-key/' ) ), '</a>' ) ); return; } $value = (bool) get_option( self::REGISTRATION_SPAM_CHECK, true ); $checkbox = sprintf( '<input id="field-%s" type="checkbox" value="1" class="regular-text code" name="%s" %s />', esc_attr( self::REGISTRATION_SPAM_CHECK ), esc_attr( self::REGISTRATION_SPAM_CHECK ), checked( true, $value, false ) ); printf( '<p class="description">%s %s</p>', $checkbox, esc_html( __( 'If enabled, customer registration form will check for spam by using Akismet before creating new customers.', 'bigcommerce' ) ) ); }