/** * echos Provider Field * * Echo's the settings field that allows a provider to be enabled * * @return void */ public function settings_field_provider( $provider ) { foreach ( $this->_helper->get_all_provider_instances() as $class => $provider ) { $enabled = in_array( $class, $this->_settings['enabled-providers'] ); echo '<input type="checkbox" id="itsec_two_factor_enabled-' . esc_attr( $class ) . '" name="itsec_two_factor[enabled-providers][]" value="' . esc_attr( get_class( $provider ) ) . '" ' . checked( $enabled, true, false ) . '/>'; echo '<label for="itsec_two_factor_enabled-' . esc_attr( $class ) . '"> '; $provider->print_label(); echo '</label>'; do_action( 'two-factor-admin-options-' . $class, $enabled ); echo '<br />'; } }