Plugin Directory

Changeset 3436471


Ignore:
Timestamp:
01/10/2026 08:54:57 AM (3 months ago)
Author:
pickplugins
Message:

version update

Location:
question-answer/trunk
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • question-answer/trunk/includes/classes/class-admin-notices.php

    r3429738 r3436471  
    3939                    <?php
    4040/* translators: URL */
    41                     echo sprintf(esc_html__('Data migration required for <b>Question Answer</b> plugin, please <a class="button button-primary" href="%s">click to start</a> migration.', 'question-answer'), esc_url_raw($actionurl));
     41                    echo sprintf(esc_html__('Data migration required for <b>Question Answer</b> plugin, please <a class="button button-primary" href="%s">click to start</a> migration.', 'question-answer'), esc_url($actionurl));
    4242                    ?>
    4343                </p>
  • question-answer/trunk/includes/classes/class-widget-categories.php

    r3429738 r3436471  
    11<?php
    22
    3 /*
    4 * @Author       pickplugins
    5 * Copyright:    2015 pickplugins
    6 */
    7 
    8 if ( ! defined('ABSPATH')) exit;  // if direct access
     3if (!defined('ABSPATH')) exit;  // if direct access
    94
    105
     
    3025        echo '<div class="qa_widget_categories">';
    3126       
    32         $question_cat = get_terms('question_cat', array('hide_empty' => false,) );
     27        $question_cat = get_terms(array(    'taxonomy'   => 'question_cat',
     28'hide_empty' => false,) );
    3329       
    3430        //echo '<pre>'.var_export($question_cat, true).'</pre>';
  • question-answer/trunk/includes/functions-ajax.php

    r3429738 r3436471  
    184184    //echo 'gggggggggggggg';
    185185
    186     echo json_encode($response);
     186    echo wp_json_encode($response, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
    187187    die();
    188188}
  • question-answer/trunk/includes/functions-counter.php

    r2776698 r3436471  
    11<?php
    2 /*
    3 * @Author       pickplugins
    4 * Copyright:    pickplugins.com
    5 */
     2if (!defined('ABSPATH')) exit;  // if direct access
    63
    74
  • question-answer/trunk/includes/functions-notification.php

    r3429738 r3436471  
    11<?php
    2 /*
    3 * @Author       pickplugins
    4 * Copyright:    pickplugins.com
    5 */
    6 
     2
     3if (!defined('ABSPATH')) exit;  // if direct access
    74
    85/*
  • question-answer/trunk/includes/functions-user-profile.php

    r1868660 r3436471  
    11<?php
    2 /*
    3 * @Author       pickplugins
    4 * Copyright:    pickplugins.com
    5 */
     2if (!defined('ABSPATH')) exit;  // if direct access
    63
    74class class_qa_user_profile{
  • question-answer/trunk/includes/functions.php

    r3429738 r3436471  
    11<?php
    2 /*
    3 * @Author       pickplugins
    4 * Copyright:    pickplugins.com
    5 */
    6 
    72if (!defined('ABSPATH')) exit;  // if direct access
    83
     
    166161        if ($qa_account_required_post_answer == 'yes') {
    167162            $response['html'] .= sprintf("<p class='qa_notice qa_notice_error'>%s</p>", __('Please login to post answer.', 'question-answer'));
    168             echo json_encode($response);
     163            echo wp_json_encode($response, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
    169164            die();
    170165        }
     
    174169
    175170        $response['html'] .= sprintf("<p class='qa_notice qa_notice_error'>%s</p>", __('Empty content can"t be a valid answer!', 'question-answer'));
    176         echo json_encode($response);
     171        echo wp_json_encode($response, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
    177172        die();
    178173    }
     
    209204
    210205        $response['html'] .= sprintf("<p class='qa_notice qa_notice_error'>%s</p>", __('Something went wrong!', 'question-answer'));
    211         echo json_encode($response);
     206        echo wp_json_encode($response, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
    212207        die();
    213208    }
     
    262257    do_action('qa_answer_submitted', $answer_id, $form_data_arr);
    263258
    264     echo json_encode($response);
     259    echo wp_json_encode($response, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
    265260    die();
    266261}
     
    337332
    338333        $response['html'] .= sprintf("<p class='qa_notice qa_notice_error'>%s</p>", __('Empty content can"t be a valid answer!', 'question-answer'));
    339         echo json_encode($response);
     334        echo wp_json_encode($response, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
    340335        die();
    341336    }
     
    364359
    365360        $response['html'] .= sprintf("<p class='qa_notice qa_notice_error'>%s</p>", __('Something went wrong! 2', 'question-answer'));
    366         echo json_encode($response);
     361        echo wp_json_encode($response, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
    367362        die();
    368363    }
     
    399394    //do_action( 'qa_email_action_question_submit', $answer_id );
    400395
    401     echo json_encode($response);
     396    echo wp_json_encode($response, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
    402397    die();
    403398}
     
    615610
    616611
    617     echo json_encode($response);
     612    echo wp_json_encode($response, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
    618613    die();
    619614}
     
    645640
    646641
    647     echo json_encode($response);
     642    echo wp_json_encode($response, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
    648643    die();
    649644}
     
    754749    endif;
    755750
    756     echo json_encode($response);
     751    echo wp_json_encode($response, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
    757752    die();
    758753}
     
    12111206    ob_end_clean();
    12121207
    1213     echo json_encode($response);
     1208    echo wp_json_encode($response, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
    12141209    die();
    12151210}
     
    12581253
    12591254
    1260     echo json_encode($response);
     1255    echo wp_json_encode($response, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
    12611256    die();
    12621257}
     
    16721667    //echo 'gggggggggggggg';
    16731668
    1674     echo json_encode($response);
     1669    echo wp_json_encode($response, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
    16751670    die();
    16761671}
     
    17081703
    17091704        $response['toast'] .= '<i class="fas fa-check"></i> ' . __('Please login first.', 'question-answer');
    1710         echo json_encode($response);
     1705        echo wp_json_encode($response, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
    17111706        die();
    17121707    }
     
    17151710
    17161711        $response['toast'] .= '<i class="fas fa-check"></i> ' . __('Sorry you can\'t choose best answer.', 'question-answer');
    1717         echo json_encode($response);
     1712        echo wp_json_encode($response, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
    17181713        die();
    17191714    }
     
    17611756    }
    17621757
    1763     echo json_encode($response);
     1758    echo wp_json_encode($response, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
    17641759    die();
    17651760}
     
    18141809    }
    18151810
    1816     echo json_encode($response);
     1811    echo wp_json_encode($response, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
    18171812    die();
    18181813}
     
    18591854
    18601855
    1861     echo json_encode($response);
     1856    echo wp_json_encode($response, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
    18621857    die();
    18631858}
     
    20452040    endif;
    20462041
    2047     echo json_encode($response);
     2042    echo wp_json_encode($response, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
    20482043    //echo $qa_flag_value;
    20492044    die();
     
    21982193
    21992194
    2200     echo json_encode($response);
     2195    echo wp_json_encode($response, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
    22012196    //echo $qa_flag_value;
    22022197    die();
     
    23122307    endif;
    23132308
    2314     echo json_encode($response);
     2309    echo wp_json_encode($response, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
    23152310    //echo $qa_flag_value;
    23162311    die();
     
    24752470
    24762471
    2477     echo json_encode($response);
     2472    echo wp_json_encode($response, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
    24782473    die();
    24792474}
     
    25392534    $response['status'] = $status;
    25402535
    2541     echo json_encode($response);
     2536    echo wp_json_encode($response, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
    25422537    die();
    25432538}
     
    25942589    $response['status'] = $status;
    25952590
    2596     echo json_encode($response);
     2591    echo wp_json_encode($response, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
    25972592    die();
    25982593}
     
    26482643    }
    26492644
    2650     echo json_encode($html);
     2645    echo json_encode($html, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
    26512646    die();
    26522647}
     
    27252720    }
    27262721
    2727     echo json_encode($html);
     2722    echo json_encode($html, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
    27282723    die();
    27292724}
     
    28142809
    28152810
    2816     echo json_encode($response);
     2811    echo wp_json_encode($response, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
    28172812
    28182813    die();
  • question-answer/trunk/includes/menus/settings-new.php

    r3429738 r3436471  
    100100    <div id="icon-tools" class="icon32"><br></div>
    101101    <h2><?php echo esc_html(__('Question Answer Settings', 'question-answer')) ?></h2>
    102     <form method="post" action="<?php echo esc_url(str_replace('%7E', '~', wp_unslash($_SERVER['REQUEST_URI']))); ?>">
     102    <form method="post" action="<?php echo esc_url(str_replace('%7E', '~', sanitize_text_field(wp_unslash($_SERVER['REQUEST_URI'])))); ?>">
    103103        <input type="hidden" name="qa_settings_hidden" value="Y">
    104104        <?php
  • question-answer/trunk/includes/menus/welcome.php

    r3429738 r3436471  
    6868    <div id="icon-tools" class="icon32"><br></div>
    6969    <h2></h2>
    70         <form  method="post" action="<?php echo esc_url(str_replace( '%7E', '~', wp_unslash($_SERVER['REQUEST_URI']))); ?>">
     70        <form  method="post" action="<?php echo esc_url(str_replace( '%7E', '~', sanitize_text_field(wp_unslash($_SERVER['REQUEST_URI'])))); ?>">
    7171            <input type="hidden" name="qa_hidden" value="Y">
    7272            <?php
    7373            if(!empty($_POST['qa_hidden'])){
    7474
    75                 $nonce = sanitize_text_field(wp_unslash($_POST['_wpnonce']));
     75                $nonce = isset($_POST['_wpnonce']) ? sanitize_text_field(wp_unslash($_POST['_wpnonce'])) : '';
    7676
    7777
  • question-answer/trunk/includes/shortcodes/class-shortcode-qa-edit-account.php

    r3429738 r3436471  
    2828        }
    2929
    30         if(isset($_POST['_wpnonce']) && wp_verify_nonce( $_POST['_wpnonce'], 'qa_edit_account_nonce' ) && $_POST['qa_edit_account_hidden'] == 'Y') {
     30        if(isset($_POST['_wpnonce']) && wp_verify_nonce( sanitize_text_field(wp_unslash($_POST['_wpnonce'])), 'qa_edit_account_nonce' ) && wp_unslash($_POST['qa_edit_account_hidden']) == 'Y') {
    3131
    3232
    33             $display_name = sanitize_text_field(wp_unslash($_POST['display_name']));
    34             $user_url = esc_url_raw(wp_unslash($_POST['user_url']));
    35             $user_description = sanitize_text_field(wp_unslash($_POST['description']));
     33            $display_name = isset($_POST['display_name']) ? sanitize_text_field(wp_unslash($_POST['display_name'])) : '';
     34            $user_url = isset($_POST['user_url']) ? esc_url_raw(wp_unslash($_POST['user_url'])) : '';
     35            $user_description = isset($_POST['description']) ? sanitize_text_field(wp_unslash($_POST['description'])) : '';
    3636
    37             $profile_photo = esc_url(wp_unslash($_POST['profile_photo']));
    38             $cover_photo = esc_url(wp_unslash($_POST['cover_photo']));
     37            $profile_photo = isset($_POST['profile_photo']) ? esc_url_raw(wp_unslash($_POST['profile_photo'])) : '';
     38            $cover_photo = isset($_POST['cover_photo']) ? esc_url_raw(wp_unslash($_POST['cover_photo'])) : '';
    3939
    4040            wp_update_user( array( 'ID' => $current_user_id, 'display_name' => $display_name ) );
     
    5454        else{
    5555
    56             $display_name = $current_user->display_name;
    57             $user_url = $current_user->user_url;
    58             $user_description = $current_user->description;
     56            $display_name =  isset($current_user->display_name ) ? $current_user->display_name : '';
     57            $user_url = isset($current_user->user_url ) ? $current_user->user_url : '';
     58            $user_description = isset($current_user->description ) ? $current_user->description : '';
    5959
    6060
     
    8282            ?>
    8383
    84             <form action="<?php echo esc_url(str_replace( '%7E', '~', wp_unslash($_SERVER['REQUEST_URI']))); ?>" method="post">
     84            <form action="<?php echo esc_url(str_replace( '%7E', '~', sanitize_text_field(wp_unslash($_SERVER['REQUEST_URI']))) ); ?>" method="post">
    8585                <input type="hidden" name="qa_edit_account_hidden" value="Y">
    8686
  • question-answer/trunk/question-answer.php

    r3429738 r3436471  
    11<?php
    22/*
    3 Plugin Name: Question Answer
     3Plugin Name: PickPlugins Question Answer
    44Plugin URI: https://www.pickplugins.com/item/question-answer/?ref=dashboard
    55Description: Create Awesome Question and Answer Website in a Minute
    6 Version: 1.2.71
     6Version: 1.2.73
    77Text Domain: question-answer
    88Domain Path: /languages
  • question-answer/trunk/readme.txt

    r3429738 r3436471  
    1 === Question Answer ===
     1=== PickPlugins Question Answer ===
    22    Contributors: PickPlugins
    33    Donate link: https://www.pickplugins.com/item/question-answer/?ref=wordpress.org
    44    Tags:  Question Answer, Question, Answer
    55    Requires at least: 4.1
    6     Tested up to: 6.6
    7     Stable tag: 1.2.71
     6    Tested up to: 6.9
     7    Stable tag: 1.2.73
    88    License: GPLv2 or later
    99    License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    110110Plugin is translation ready , please find the 'en.po' for default translation file under 'languages' folder and add your own translation. you can also contribute in translation, please contact us https://pickplugins.com/forum/
    111111
     112== External services ==
     113
     114* [Google reCAPTCHA](https://www.google.com/recaptcha/about/)
     115
    112116== Frequently Asked Questions ==
    113117
  • question-answer/trunk/templates/add-question/add-question-hook.php

    r3429738 r3436471  
    254254
    255255    $login_page_id             = get_option('qa_question_login_page_id');
    256     $login_page_url                     = !empty($login_page_id) ? get_permalink($login_page_id) : wp_login_url($_SERVER['REQUEST_URI']);
     256    $login_page_url                     = !empty($login_page_id) ? get_permalink($login_page_id) : wp_login_url(sanitize_text_field(wp_unslash($_SERVER['REQUEST_URI'])));
    257257
    258258?>
     
    405405    $qa_enable_poll                     = get_option('qa_enable_poll', 'no');
    406406
    407     $qa_page_myaccount_url = !empty($qa_page_myaccount) ? get_permalink($qa_page_myaccount) : wp_login_url($_SERVER['REQUEST_URI']);
     407    $qa_page_myaccount_url = !empty($qa_page_myaccount) ? get_permalink($qa_page_myaccount) : wp_login_url(sanitize_text_field(wp_unslash($_SERVER['REQUEST_URI'])));
    408408
    409409    $user_id = (is_user_logged_in()) ? get_current_user_id() : 0;
     
    483483            $secretkey = get_option('qa_reCAPTCHA_secret_key');
    484484
    485             $response = wp_remote_get("https://www.google.com/recaptcha/api/siteverify?secret=" . $secretkey . "&response=" . wp_unslash($_POST['g-recaptcha-response']));
     485            $response = wp_remote_get("https://www.google.com/recaptcha/api/siteverify?secret=" . $secretkey . "&response=" . sanitize_text_field(wp_unslash($_POST['g-recaptcha-response'])));
    486486            $response = json_decode($response["body"], true);
    487487
     
    505505    //    }
    506506
    507     if (!isset($_POST['qa_q_submit_nonce']) || !wp_verify_nonce(wp_unslash($_POST['qa_q_submit_nonce']), 'qa_q_submit_nonce')) {
     507    if (!isset($_POST['qa_q_submit_nonce']) || !wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['qa_q_submit_nonce'])), 'qa_q_submit_nonce')) {
    508508
    509509        $qa_error->add('_wpnonce', __('<strong>ERROR</strong>: security test failed.', 'question-answer'));
  • question-answer/trunk/templates/add-question/add-question-new.php

    r3429738 r3436471  
    1919    $qa_submitted_post_status           = get_option('qa_submitted_question_status', 'pending' );
    2020    $qa_page_myaccount                  = get_option('qa_page_myaccount', '' );
    21     $qa_page_myaccount_url              = !empty($qa_page_myaccount) ? get_permalink($qa_page_myaccount) : wp_login_url(wp_unslash($_SERVER['REQUEST_URI']));
     21    $qa_page_myaccount_url              = !empty($qa_page_myaccount) ? get_permalink($qa_page_myaccount) : wp_login_url(sanitize_text_field(wp_unslash($_SERVER['REQUEST_URI'])));
    2222
    2323
     
    3636    <?php do_action('question_answer_submit_question_before'); ?>
    3737
    38     <form enctype="multipart/form-data" method="post" action="<?php echo esc_url(str_replace( '%7E', '~', wp_unslash($_SERVER['REQUEST_URI']))); ?>">
     38    <form enctype="multipart/form-data" method="post" action="<?php echo esc_url(str_replace( '%7E', '~', sanitize_text_field(wp_unslash($_SERVER['REQUEST_URI']))) ); ?>">
    3939        <?php
    4040        do_action('question_answer_submit_question');
  • question-answer/trunk/templates/dashboard/dashboard-hook.php

    r3429738 r3436471  
    203203
    204204        $login_redirect_page_url = !empty($login_redirect_page) ? get_permalink($login_redirect_page) : '';
    205         $qa_page_myaccount_url = !empty($qa_page_myaccount) ? get_permalink($qa_page_myaccount) : wp_login_url(wp_unslash($_SERVER['REQUEST_URI']));
     205        $qa_page_myaccount_url = !empty($qa_page_myaccount) ? get_permalink($qa_page_myaccount) : wp_login_url(sanitize_text_field(wp_unslash($_SERVER['REQUEST_URI'])));
    206206
    207207
  • question-answer/trunk/templates/my-account/my-account.php

    r3429738 r3436471  
    4747                }
    4848            else{
    49                 $qa_page_myaccount_url = wp_login_url(wp_unslash($_SERVER['REQUEST_URI']));
     49                $qa_page_myaccount_url = wp_login_url(sanitize_text_field(wp_unslash($_SERVER['REQUEST_URI'])));
    5050                }           
    5151           
  • question-answer/trunk/templates/my-account/profile.php

    r3429738 r3436471  
    6161        </ul>
    6262       
    63         <form enctype="multipart/form-data"   method="POST" action="<?php echo  esc_url_raw(str_replace( '%7E', '~', wp_unslash($_SERVER['REQUEST_URI']))); ?>">
     63        <form enctype="multipart/form-data"   method="POST" action="<?php echo  esc_url(str_replace( '%7E', '~',sanitize_text_field(wp_unslash($_SERVER['REQUEST_URI']))) ); ?>">
    6464        <ul class="box">
    6565            <li style="display: block;" class="box1 tab-box active">
     
    8686
    8787                    <p class="option-info"><?php echo esc_html__('Website', 'question-answer' ); ?></p>
    88                     <input type="text" placeholder="www.yourwebsite.com" name="qa_website" value="<?php echo esc_url_raw($qa_website); ?>" />
     88                    <input type="text" placeholder="www.yourwebsite.com" name="qa_website" value="<?php echo esc_url($qa_website); ?>" />
    8989                </div>
    9090            </li>
  • question-answer/trunk/templates/single-question/answer-section.php

    r3429738 r3436471  
    7171        <?php if( $qa_show_answer_filter == 'yes' ) { ?>
    7272        <div class="float_right answer_header_status">
    73             <form enctype="multipart/form-data" id="qa_sort_answer_form" action="<?php echo esc_url(str_replace( '%7E', '~', wp_unslash($_SERVER['REQUEST_URI']))); ?>" method="GET">
     73            <form enctype="multipart/form-data" id="qa_sort_answer_form" action="<?php echo esc_url(str_replace( '%7E', '~', sanitize_text_field(wp_unslash($_SERVER['REQUEST_URI']))) ); ?>" method="GET">
    7474                <span><?php echo esc_html__('Sort By:', 'question-answer'); ?></span>
    7575                <select name="qa_sort_answer" class="qa_sort_answer">
  • question-answer/trunk/templates/single-question/single-question-hook.php

    r3429738 r3436471  
    13201320                <?php if ($qa_show_answer_filter == 'yes') { ?>
    13211321                    <div class="float_right answer_header_status">
    1322                         <form enctype="multipart/form-data" id="qa_sort_answer_form" action="<?php echo esc_url(str_replace('%7E', '~', wp_unslash($_SERVER['REQUEST_URI']))); ?>" method="GET">
     1322                        <form enctype="multipart/form-data" id="qa_sort_answer_form" action="<?php echo esc_url(str_replace('%7E', '~', sanitize_text_field(wp_unslash($_SERVER['REQUEST_URI'])))); ?>" method="GET">
    13231323                            <span><?php echo esc_html__('Sort By:', 'question-answer'); ?></span>
    13241324                            <select name="qa_sort_answer" class="qa_sort_answer">
  • question-answer/trunk/templates/template-registration-form.php

    r3429738 r3436471  
    4242   
    4343 
    44     <form action="<?php echo esc_url_raw(wp_unslash($_SERVER['REQUEST_URI'])); ?> " method="post">
     44    <form action="<?php echo esc_url(sanitize_text_field(wp_unslash($_SERVER['REQUEST_URI']))); ?> " method="post">
    4545    <p>
    4646    <label for="username"><?php echo esc_html__('Username', 'question-answer'); ?><strong>*</strong><br>
Note: See TracChangeset for help on using the changeset viewer.