pluginHelper->update_quiz_setting( $section, $settings_array ); if ( false !== $results ) { $mlwQuizMasterNext->alertManager->newAlert( __( 'The settings has been updated successfully.', 'quiz-master-next' ), 'success' ); $mlwQuizMasterNext->audit_manager->new_audit( 'Settings Have Been Edited' ); } else { $mlwQuizMasterNext->alertManager->newAlert( __( 'There was an error when updating the settings. Please try again.', 'quiz-master-next' ), 'error'); } } // Retrieve the settings for this section $settings = $mlwQuizMasterNext->pluginHelper->get_quiz_setting( $section ); ?>
null, 'label' => '', 'type' => '', 'options' => array(), 'variables' => array() ); $field = wp_parse_args( $field, $defaults ); // If id is not valid, return false if ( is_null( $field["id"] ) || empty( $field["id"] ) ) { return false; } // If type is empty, assume text if ( empty( $field["type"] ) ) { $field["type"] = "text"; } // Prepare function to call for field type $method = "generate_{$field["type"]}_field"; QSM_Fields::$method( $field, $value ); return true; } /** * Generates a text field * * @since 5.0.0 * @param array $field The array that contains the data for the input field * @param mixed $value The current value of the setting */ public static function generate_text_field( $field, $value ) { ?>