Plugin Directory

Changeset 2936586


Ignore:
Timestamp:
07/10/2023 02:30:08 PM (3 years ago)
Author:
liquidpoll
Message:

Reviews approval added

Location:
wp-poll
Files:
298 added
6 edited

Legend:

Unmodified
Added
Removed
  • wp-poll/trunk/includes/classes/class-meta-boxes.php

    r2928081 r2936586  
    5353        $poll_setting_fields   = array(
    5454            array(
    55                 'id'      => 'settings_hide_for_logged_out_users',
    56                 'title'   => esc_html__( 'Settings', 'wp-poll' ),
    57                 'label'   => esc_html__( 'Hide for logged out users.', 'wp-poll' ),
    58                 'type'    => 'switcher',
    59                 'default' => false,
     55                'id'         => 'settings_hide_for_logged_out_users',
     56                'title'      => esc_html__( 'Settings', 'wp-poll' ),
     57                'label'      => esc_html__( 'Hide for logged out users.', 'wp-poll' ),
     58                'type'       => 'switcher',
     59                'default'    => false,
     60                'dependency' => array( '_type', '!=', 'reviews', 'all' ),
    6061            ),
    6162            array(
     
    101102                'class'      => 'padding-top-none',
    102103                'dependency' => array( '_type', '==', 'reaction', 'all' ),
     104            ),
     105            array(
     106                'id'         => 'settings_allow_guest_review_mode',
     107                'title'      => esc_html__( 'Settings', 'wp-poll' ),
     108                'label'      => esc_html__( 'Guest Review mode.', 'wp-poll' ),
     109                'desc'       => esc_html__( 'Allow anyone to leave a review without having to create an account.', 'wp-poll' ),
     110                'type'       => 'switcher',
     111                'default'    => false,
     112                'dependency' => array( '_type', '==', 'reviews', 'all' ),
    103113            ),
    104114        );
     
    321331        );
    322332
     333        $field_sections['reviews_list'] = array(
     334            'id'       => 'reviews_approval_page',
     335            'title'    => __( 'Reviews', 'wp-poll' ),
     336            'icon'     => 'fas fa-star',
     337            'external' => true,
     338        );
     339
    323340        $field_sections['poll_options'] = array(
    324341            'title'  => __( 'Options', 'wp-poll' ),
  • wp-poll/trunk/includes/classes/class-plugin-settings.php

    r2927562 r2936586  
    191191                            'availability' => ! liquidpoll()->is_pro() ? 'pro' : '',
    192192                        ),
     193                        array(
     194                            'id'           => '_reviews_approval_settings',
     195                            'title'        => esc_html__( 'Reviews Approval', 'wp-poll' ),
     196                            'label'        => esc_html__( 'Settings to turn ON Reviews Approval.', 'wp-poll' ),
     197                            'type'         => 'switcher',
     198                            'default'      => true,
     199                            'availability' => ! liquidpoll()->is_pro() ? 'pro' : '',
     200                        ),
    193201                    ),
    194202                ),
  • wp-poll/trunk/includes/classes/class-poll.php

    r2923514 r2936586  
    224224                $filter_date       = Utils::get_args_option( 'filter_date', $args );
    225225                $filter_by_ratings = Utils::get_args_option( 'filter_rating', $args );
     226                $status            = Utils::get_args_option( 'status', $args );
    226227
    227228                if ( ! empty( $rating ) && $rating > 1 && $rating <= 5 ) {
    228229                    $where_clause .= " AND polled_value=$rating";
     230                }
     231
     232                if ( ! empty( $status ) ) {
     233                    $where_clause .= " AND status = '{$status}'";
    229234                }
    230235
  • wp-poll/trunk/includes/functions.php

    r2923514 r2936586  
    604604
    605605        $sql_add_column = "ALTER TABLE " . LIQUIDPOLL_EMAILS_TABLE . " ADD consent VARCHAR(255) AFTER email_address";
     606        $sql_add_status_column = "ALTER TABLE " . LIQUIDPOLL_RESULTS_TABLE . " ADD status VARCHAR(255) DEFAULT 'approved' AFTER polled_comments";
    606607
    607608        maybe_add_column( LIQUIDPOLL_EMAILS_TABLE, 'consent', $sql_add_column );
     609        maybe_add_column( LIQUIDPOLL_RESULTS_TABLE, 'status', $sql_add_status_column );
    608610    }
    609611}
     
    629631            'polled_value'    => '',
    630632            'polled_comments' => '',
     633            'status' => '',
    631634            'datetime'        => current_time( 'mysql' ),
    632635        );
  • wp-poll/trunk/readme.txt

    r2931032 r2936586  
    55    Requires at least: 4.6
    66    Tested up to: 6.2.2
    7     Stable tag: 3.3.69
     7    Stable tag: 3.3.70
    88    License: GPLv2 or later
    99    License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    377377* 26/06/2023 - FIX - Fix issues.
    378378
     379= 3.3.70 =
     380* 10/07/2023 - NEW - Reviews approval added.
  • wp-poll/trunk/wp-poll.php

    r2931032 r2936586  
    44 * Plugin URI: https://liquidpoll.com
    55 * Description: It allows user to poll in your website with many awesome features.
    6  * Version: 3.3.69
     6 * Version: 3.3.70
    77 * Author: LiquidPoll
    88 * Text Domain: wp-poll
     
    2828defined( 'LIQUIDPOLL_TICKET_URL' ) || define( 'LIQUIDPOLL_TICKET_URL', 'https://www.liquidpoll.com/my-account/' );
    2929defined( 'LIQUIDPOLL_COMMUNITY_URL' ) || define( 'LIQUIDPOLL_COMMUNITY_URL', 'https://www.facebook.com/groups/liquidpoll/' );
    30 defined( 'LIQUIDPOLL_VERSION' ) || define( 'LIQUIDPOLL_VERSION', '3.3.69' );
     30defined( 'LIQUIDPOLL_VERSION' ) || define( 'LIQUIDPOLL_VERSION', '3.3.70' );
    3131
    3232if ( ! class_exists( 'LIQUIDPOLL_Main' ) ) {
     
    112112                'voteText'           => esc_html__( 'votes', 'wp-poll' ),
    113113                'tempProDownload'    => esc_url( 'https://liquidpoll.com/my-account/downloads/' ),
    114                 'tempProDownloadTxt' => esc_html__( 'Download Version 2.0.48', 'wp-poll' ),
     114                'tempProDownloadTxt' => esc_html__( 'Download Version 2.0.50', 'wp-poll' ),
    115115            );
    116116        }
Note: See TracChangeset for help on using the changeset viewer.