Skip to content

Commit

Permalink
Merge pull request #2599 from QuizandSurveyMaster/dev-zubair
Browse files Browse the repository at this point in the history
Update changelog 9.1.0
  • Loading branch information
zubairraeen authored Jul 11, 2024
2 parents 7b238b6 + c5e1a32 commit 5638ead
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 98 deletions.
8 changes: 4 additions & 4 deletions mlw_quizmaster2.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Plugin Name: Quiz And Survey Master
* Description: Easily and quickly add quizzes and surveys to your website.
* Version: 9.0.5
* Version: 9.1.0
* Author: ExpressTech
* Author URI: https://quizandsurveymaster.com/
* Plugin URI: https://expresstech.io/
Expand Down Expand Up @@ -43,7 +43,7 @@ class MLWQuizMasterNext {
* @var string
* @since 4.0.0
*/
public $version = '9.0.5';
public $version = '9.1.0';

/**
* QSM Alert Manager Object
Expand Down Expand Up @@ -790,7 +790,7 @@ public function admin_failed_submission_page() {
/**
* Check database structure
*
* @since 9.0.6
* @since 9.1.0
* @return void
*/
public function qsm_check_database_structure() {
Expand Down Expand Up @@ -980,7 +980,7 @@ public function qsm_check_database_structure() {
/**
* Check if table and columns exist
*
* @since 9.0.6
* @since 9.1.0
* @param string $table_name
* @param array $expected_columns
* @return string|null
Expand Down
8 changes: 4 additions & 4 deletions php/template-variables.php
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ function qsm_all_contact_fields_variable( $content, $results ) {
if ( isset( $results['contact'] ) && ( is_array( $results['contact'] ) || is_object( $results['contact'] ) ) ) {
foreach ( $results['contact'] as $results_contact ) {
$options = qsm_get_options_of_contact_fields($contact_form, $results_contact['label'], $results_contact['type'] );
$isRadioOrSelect = in_array($results_contact['type'], [ 'radio', 'select' ]);
$isRadioOrSelect = in_array($results_contact['type'], [ 'radio', 'select' ], true);
$hasOptions = ! empty(trim($options));

if ( ($isRadioOrSelect && $hasOptions) || ! $isRadioOrSelect ) {
Expand All @@ -528,9 +528,9 @@ function qsm_all_contact_fields_variable( $content, $results ) {
}
function qsm_get_options_of_contact_fields( $data, $label, $type ) {
foreach ( $data as $item ) {
if ( $item['label'] === $label && $item['type'] === $type ) {
return $item['options'];
}
if ( $item['label'] === $label && $item['type'] === $type ) {
return $item['options'];
}
}
return null; // Option not found
}
Expand Down
Loading

0 comments on commit 5638ead

Please sign in to comment.