Plugin Directory

Changeset 3242752


Ignore:
Timestamp:
02/18/2025 03:44:34 PM (13 months ago)
Author:
softcialdeveloper
Message:

Version 1.2

Location:
smart-answer
Files:
49 added
2 edited

Legend:

Unmodified
Added
Removed
  • smart-answer/trunk/readme.txt

    r3242110 r3242752  
    66Requires at least: 4.0
    77Tested up to: 6.4.2
    8 Stable tag: 1.1
     8Stable tag: 1.2
    99Requires PHP: 7.4.33
    1010License: GPLv2 or later
     
    5656== Changelog ==
    5757
     58= 1.2 =
     59Resolve the error associated with the allow_update shortcode property.
     60
    5861= 1.1 =
    5962Fix the error that pertains to the display of the user's response.
  • smart-answer/trunk/smart-answers.php

    r3242112 r3242752  
    33 * Plugin Name: Smart Answer
    44 * Description: Create custom questions, deploy via shortcodes, manage responses, mark favorites or ban.
    5  * Version: 1.1
     5 * Version: 1.2
    66 * Author: @softcialdeveloper
    77 * License: GPL-2.0+
     
    118118    $current_user = wp_get_current_user();
    119119    $user_id = $current_user->ID;
    120     $response = sman_get_user_response($question_id, $user_id);
    121  
     120    $response = sman_get_user_response($question_id, $user_id);
    122121
    123122    if (!is_null($response)) {
     
    129128        $placeholderText = sprintf(esc_html__("Minimum %d characters", "smart-answer"), $a["minchars"]);
    130129        $response_text = "";
    131        
     130        $readonly = "";
     131
    132132        if (isset($response->response_text)) {
    133133            $response_text = $response->response_text;
    134         }
    135 
    136         $readonly = !$allow_update ? "readonly" : "";
     134            $readonly = !$allow_update ? "readonly" : "";
     135        }
    137136
    138137        $output = "
     
    154153            </div>";
    155154
    156         if (!$allow_update && $response) {
     155        if (!$allow_update && $response_text) {
    157156            $yourAnswerText = esc_html__("Your asnswer", "smart-answer");
    158157            $output = "<p>{$yourAnswerText}:</p><textarea class='textarea-read' readonly>{$response_text}</textarea>";
Note: See TracChangeset for help on using the changeset viewer.