Plugin Directory

Changeset 2590582


Ignore:
Timestamp:
08/29/2021 10:49:07 PM (5 years ago)
Author:
mdedev
Message:
  • Fixed a problem with imported contest codes having extra serialized data in them and it only showing up during the selection of generic prizes
  • Changed the contest code admin page to order by the contest code by default
Location:
contest-code-checker
Files:
592 added
6 edited

Legend:

Unmodified
Added
Removed
  • contest-code-checker/trunk/README.txt

    r2568591 r2590582  
    44Requires at least: 4.0
    55Tested up to: 5.8.0
    6 Stable tag: 1.6.1
     6Stable tag: 1.7.8
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6565
    6666== Changelog ==
     67
     68= 1.7.8 =
     69* Fixed a problem with imported contest codes having extra serialized data in them and it only showing up during the selection of generic prizes
     70* Changed the contest code admin page to order by the contest code by default
    6771
    6872= 1.6.1 =
  • contest-code-checker/trunk/contestswp.php

    r2484915 r2590582  
    44 * Plugin Name: ContestsWP
    55 * Plugin URI:  https://www.contestswp.com
    6  * Version: 1.6.1
     6 * Version: 1.7.8
    77 * Description: ContestsWP makes it easy to create and run contests and giveaways on your WordPress site.
    88 *
    99 * @wordpress-plugin
    1010 * Description:       Maintain a list of contest codes and have users check to see if they have won anything
    11  * Version:           1.6.1
     11 * Version:           1.7.8
    1212 * Author:            Swim or Die Software
    1313 * Author URI:        http://www.swimordiesoftware.com
  • contest-code-checker/trunk/free/admin/class-contest-code-checker-admin-contest-codes.php

    r2415568 r2590582  
    201201
    202202                            if(!empty($tmp_array[1])) {
    203                                 $data['prize'] = $tmp_array[1];
     203                                $data['prize'] = (string)$tmp_array[1];
    204204                            }
    205205
    206206                            if(!empty($tmp_array[2])) {
    207                                 $data['prizeInformation'] = $tmp_array[2];
     207                                $data['prizeInformation'] = (string)$tmp_array[2];
    208208                            }
    209209
  • contest-code-checker/trunk/free/admin/contest_codes/class-contest-codes-table.php

    r2415568 r2590582  
    247247        $search  = $this->get_search();
    248248        $order   = isset( $_GET['order'] )   ? sanitize_text_field( $_GET['order'] )   : 'DESC';
    249         $orderby = isset( $_GET['orderby'] ) ? sanitize_text_field( $_GET['orderby'] ) : 'id';
     249        $orderby = isset( $_GET['orderby'] ) ? sanitize_text_field( $_GET['orderby'] ) : 'title';
    250250
    251251        $args    = array(
  • contest-code-checker/trunk/free/admin/partials/contest-code-checker-admin-display-prizes.php

    r2415568 r2590582  
    6464                    $meta_table = $wpdb->prefix . "postmeta";
    6565                    $posts_table = $wpdb->prefix . "posts";
    66                     $sql = "SELECT DISTINCT meta_value FROM $meta_table m
     66                    $sql = "SELECT DISTINCT meta_value, m.post_id FROM $meta_table m
    6767                        JOIN $posts_table p ON p.ID = m.post_id
    6868                    WHERE meta_key = 'ccc_prize' AND p.post_type = 'ccc_codes' AND meta_value != ''
     
    7373                 <?php
    7474                    foreach($prizes as $p) {
     75            $meta_value = $p->meta_value;
    7576                    ?>
    76                         <option value="<?php esc_html_e($p->meta_value); ?>"
    77                             <?php echo ( in_array($p->meta_value, $prize->get_prizes() ) ) ? "selected=\"selected\"" : ""; ?> ><?php esc_html_e($p->meta_value); ?></option>
     77                        <option value="<?php esc_html_e($meta_value); ?>"
     78                            <?php echo ( in_array($meta_value, $prize->get_prizes() ) ) ? "selected=\"selected\"" : ""; ?> ><?php esc_html_e($meta_value); ?></option>
    7879                    <?php
    7980                    }
  • contest-code-checker/trunk/free/includes/class-contest-code-checker.php

    r2415568 r2590582  
    171171     */
    172172    private function define_admin_hooks() {
    173 
    174173        $plugin_admin = new CCC_Contest_Code_Checker_Admin( $this->get_plugin_name(), $this->get_version() );
    175174
     
    178177        $this->loader->add_action( 'admin_menu', $plugin_admin, 'register_menus');
    179178        $this->loader->add_action( 'admin_init', $plugin_admin, 'wireup_settings');
    180 
    181179    }
    182180
Note: See TracChangeset for help on using the changeset viewer.