Version Description
- Fixed: Meta table issues.
Download this release
Release Info
Developer | alimir |
Plugin | WP ULike |
Version | 4.5.7.1 |
Comparing to | |
See all releases |
Code changes from version 4.5.7 to 4.5.7.1
- includes/classes/class-wp-ulike-activator.php +27 -6
- includes/functions/meta.php +3 -3
- includes/plugin.php +3 -0
- readme.txt +5 -2
- wp-ulike.php +3 -3
includes/classes/class-wp-ulike-activator.php
CHANGED
@@ -65,7 +65,7 @@ class wp_ulike_activator {
|
|
65 |
extract( $this->tables );
|
66 |
|
67 |
// Posts table
|
68 |
-
maybe_create_table( $posts, "CREATE TABLE
|
69 |
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
70 |
`post_id` bigint(20) NOT NULL,
|
71 |
`date_time` datetime NOT NULL,
|
@@ -80,7 +80,7 @@ class wp_ulike_activator {
|
|
80 |
) $charset_collate AUTO_INCREMENT=1;" );
|
81 |
|
82 |
// Comments table
|
83 |
-
maybe_create_table( $comments, "CREATE TABLE
|
84 |
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
85 |
`comment_id` bigint(20) NOT NULL,
|
86 |
`date_time` datetime NOT NULL,
|
@@ -95,7 +95,7 @@ class wp_ulike_activator {
|
|
95 |
) $charset_collate AUTO_INCREMENT=1;" );
|
96 |
|
97 |
// Activities table
|
98 |
-
maybe_create_table( $activities, "CREATE TABLE
|
99 |
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
100 |
`activity_id` bigint(20) NOT NULL,
|
101 |
`date_time` datetime NOT NULL,
|
@@ -110,7 +110,7 @@ class wp_ulike_activator {
|
|
110 |
) $charset_collate AUTO_INCREMENT=1;" );
|
111 |
|
112 |
// Forums table
|
113 |
-
maybe_create_table( $forums, "CREATE TABLE
|
114 |
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
115 |
`topic_id` bigint(20) NOT NULL,
|
116 |
`date_time` datetime NOT NULL,
|
@@ -124,10 +124,11 @@ class wp_ulike_activator {
|
|
124 |
KEY `status` (`status`)
|
125 |
) $charset_collate AUTO_INCREMENT=1;" );
|
126 |
|
|
|
127 |
// Meta values table
|
128 |
-
maybe_create_table( $meta, "CREATE TABLE
|
129 |
`meta_id` bigint(20) unsigned NOT NULL auto_increment,
|
130 |
-
`item_id`
|
131 |
`meta_group` varchar(100) default NULL,
|
132 |
`meta_key` varchar(255) default NULL,
|
133 |
`meta_value` longtext,
|
@@ -137,6 +138,10 @@ class wp_ulike_activator {
|
|
137 |
KEY `meta_key` (`meta_key`($max_index_length))
|
138 |
) $charset_collate AUTO_INCREMENT=1;" );
|
139 |
|
|
|
|
|
|
|
|
|
140 |
}
|
141 |
|
142 |
public function upgrade_0(){
|
@@ -189,6 +194,22 @@ class wp_ulike_activator {
|
|
189 |
update_option( 'wp_ulike_dbVersion', '2.2' );
|
190 |
}
|
191 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
|
193 |
/**
|
194 |
* Return an instance of this class.
|
65 |
extract( $this->tables );
|
66 |
|
67 |
// Posts table
|
68 |
+
maybe_create_table( $posts, "CREATE TABLE `{$posts}` (
|
69 |
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
70 |
`post_id` bigint(20) NOT NULL,
|
71 |
`date_time` datetime NOT NULL,
|
80 |
) $charset_collate AUTO_INCREMENT=1;" );
|
81 |
|
82 |
// Comments table
|
83 |
+
maybe_create_table( $comments, "CREATE TABLE `{$comments}` (
|
84 |
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
85 |
`comment_id` bigint(20) NOT NULL,
|
86 |
`date_time` datetime NOT NULL,
|
95 |
) $charset_collate AUTO_INCREMENT=1;" );
|
96 |
|
97 |
// Activities table
|
98 |
+
maybe_create_table( $activities, "CREATE TABLE `{$activities}` (
|
99 |
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
100 |
`activity_id` bigint(20) NOT NULL,
|
101 |
`date_time` datetime NOT NULL,
|
110 |
) $charset_collate AUTO_INCREMENT=1;" );
|
111 |
|
112 |
// Forums table
|
113 |
+
maybe_create_table( $forums, "CREATE TABLE `{$forums}` (
|
114 |
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
115 |
`topic_id` bigint(20) NOT NULL,
|
116 |
`date_time` datetime NOT NULL,
|
124 |
KEY `status` (`status`)
|
125 |
) $charset_collate AUTO_INCREMENT=1;" );
|
126 |
|
127 |
+
|
128 |
// Meta values table
|
129 |
+
maybe_create_table( $meta, "CREATE TABLE `{$meta}` (
|
130 |
`meta_id` bigint(20) unsigned NOT NULL auto_increment,
|
131 |
+
`item_id` bigint(20) unsigned NOT NULL default '0',
|
132 |
`meta_group` varchar(100) default NULL,
|
133 |
`meta_key` varchar(255) default NULL,
|
134 |
`meta_value` longtext,
|
138 |
KEY `meta_key` (`meta_key`($max_index_length))
|
139 |
) $charset_collate AUTO_INCREMENT=1;" );
|
140 |
|
141 |
+
// Update db version
|
142 |
+
if( get_option( 'wp_ulike_dbVersion' ) === false ){
|
143 |
+
update_option( 'wp_ulike_dbVersion', WP_ULIKE_DB_VERSION );
|
144 |
+
}
|
145 |
}
|
146 |
|
147 |
public function upgrade_0(){
|
194 |
update_option( 'wp_ulike_dbVersion', '2.2' );
|
195 |
}
|
196 |
|
197 |
+
public function upgrade_2(){
|
198 |
+
// Extract array to variables
|
199 |
+
extract( $this->tables );
|
200 |
+
|
201 |
+
// Maybe not installed meta table
|
202 |
+
$this->install_tables();
|
203 |
+
|
204 |
+
// Posts ugrades
|
205 |
+
$this->database->query( "
|
206 |
+
ALTER TABLE $meta
|
207 |
+
CHANGE `item_id` `item_id` bigint(20) unsigned NOT NULL;
|
208 |
+
" );
|
209 |
+
|
210 |
+
// Update db version
|
211 |
+
update_option( 'wp_ulike_dbVersion', '2.3' );
|
212 |
+
}
|
213 |
|
214 |
/**
|
215 |
* Return an instance of this class.
|
includes/functions/meta.php
CHANGED
@@ -55,7 +55,7 @@ if( ! function_exists( 'wp_ulike_add_meta_data' ) ){
|
|
55 |
|
56 |
if ( $unique && $wpdb->get_var(
|
57 |
$wpdb->prepare(
|
58 |
-
"SELECT COUNT(*) FROM $table WHERE meta_group = %s AND meta_key = %s AND $column = %
|
59 |
$meta_group,
|
60 |
$meta_key,
|
61 |
$object_id
|
@@ -148,7 +148,7 @@ if( ! function_exists( 'wp_ulike_update_meta_data' ) ){
|
|
148 |
}
|
149 |
}
|
150 |
|
151 |
-
$meta_ids = $wpdb->get_col( $wpdb->prepare( "SELECT $id_column FROM $table WHERE meta_group = %s AND meta_key = %s AND $column = %
|
152 |
if ( empty( $meta_ids ) ) {
|
153 |
return wp_ulike_add_meta_data( $object_id, $raw_meta_group, $raw_meta_key, $passed_value );
|
154 |
}
|
@@ -455,7 +455,7 @@ if( ! function_exists( 'wp_ulike_delete_meta_data' ) ){
|
|
455 |
$query = $wpdb->prepare( "SELECT $id_column FROM $table WHERE meta_group = %s AND meta_key = %s", $meta_group, $meta_key );
|
456 |
|
457 |
if ( ! $delete_all ) {
|
458 |
-
$query .= $wpdb->prepare( " AND $type_column = %
|
459 |
}
|
460 |
|
461 |
if ( '' !== $meta_value && null !== $meta_value && false !== $meta_value ) {
|
55 |
|
56 |
if ( $unique && $wpdb->get_var(
|
57 |
$wpdb->prepare(
|
58 |
+
"SELECT COUNT(*) FROM $table WHERE meta_group = %s AND meta_key = %s AND $column = %d",
|
59 |
$meta_group,
|
60 |
$meta_key,
|
61 |
$object_id
|
148 |
}
|
149 |
}
|
150 |
|
151 |
+
$meta_ids = $wpdb->get_col( $wpdb->prepare( "SELECT $id_column FROM $table WHERE meta_group = %s AND meta_key = %s AND $column = %d", $meta_group, $meta_key, $object_id ) );
|
152 |
if ( empty( $meta_ids ) ) {
|
153 |
return wp_ulike_add_meta_data( $object_id, $raw_meta_group, $raw_meta_key, $passed_value );
|
154 |
}
|
455 |
$query = $wpdb->prepare( "SELECT $id_column FROM $table WHERE meta_group = %s AND meta_key = %s", $meta_group, $meta_key );
|
456 |
|
457 |
if ( ! $delete_all ) {
|
458 |
+
$query .= $wpdb->prepare( " AND $type_column = %d", $object_id );
|
459 |
}
|
460 |
|
461 |
if ( '' !== $meta_value && null !== $meta_value && false !== $meta_value ) {
|
includes/plugin.php
CHANGED
@@ -66,6 +66,9 @@ class WpUlikeInit {
|
|
66 |
if ( version_compare( $current_version, '2.2', '<' ) ) {
|
67 |
wp_ulike_activator::get_instance()->upgrade_1();
|
68 |
}
|
|
|
|
|
|
|
69 |
}
|
70 |
|
71 |
/**
|
66 |
if ( version_compare( $current_version, '2.2', '<' ) ) {
|
67 |
wp_ulike_activator::get_instance()->upgrade_1();
|
68 |
}
|
69 |
+
if ( version_compare( $current_version, '2.3', '<' ) ) {
|
70 |
+
wp_ulike_activator::get_instance()->upgrade_2();
|
71 |
+
}
|
72 |
}
|
73 |
|
74 |
/**
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Tags: like, marketing, elementor, user profile, rating, favorite, statistics, bu
|
|
6 |
Requires PHP: 5.6
|
7 |
Requires at least: 5.0
|
8 |
Tested up to: 5.8
|
9 |
-
Stable tag: 4.5.7
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
@@ -140,7 +140,10 @@ Yes, WP ULike is compatible with Apache, Nginx, Microsoft IIS et LiteSpeed web s
|
|
140 |
|
141 |
== Changelog ==
|
142 |
|
143 |
-
= 4.5.7 =
|
|
|
|
|
|
|
144 |
* Added: Animated Clapping Template. [PRO]
|
145 |
* Added: New option to limit the number of votes that can be submitted by a user. (only for no-limit logging method)
|
146 |
* Added: An option to change the permalink structure of user profiles. [PRO]
|
6 |
Requires PHP: 5.6
|
7 |
Requires at least: 5.0
|
8 |
Tested up to: 5.8
|
9 |
+
Stable tag: 4.5.7.1
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
140 |
|
141 |
== Changelog ==
|
142 |
|
143 |
+
= 4.5.7.1 =
|
144 |
+
* Fixed: Meta table issues.
|
145 |
+
|
146 |
+
= 4.5.7.1 =
|
147 |
* Added: Animated Clapping Template. [PRO]
|
148 |
* Added: New option to limit the number of votes that can be submitted by a user. (only for no-limit logging method)
|
149 |
* Added: An option to change the permalink structure of user profiles. [PRO]
|
wp-ulike.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: WP ULike
|
4 |
* Plugin URI: https://wpulike.com/?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash
|
5 |
* Description: Receiving feedback is crucial as a content creator, but unfortunately, the pieces of content you can collect it on are limited by default. However, with the help of the WP ULike plugin, it is possible to cast voting to any type of content you may have on your website. With outstanding and eye-catching widgets, you can have Like and Dislike Button on all of your content would it be a post, comment, BuddyPress activity, bbPress topics, WooCommerce products, you name it. Now you can feel your users Love for each part of your work.
|
6 |
-
* Version: 4.5.7
|
7 |
* Author: TechnoWich
|
8 |
* Author URI: https://technowich.com/?utm_source=wp-plugins&utm_campaign=author-uri&utm_medium=wp-dash
|
9 |
* Text Domain: wp-ulike
|
@@ -27,8 +27,8 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
27 |
|
28 |
// Do not change these values
|
29 |
define( 'WP_ULIKE_PLUGIN_URI' , 'https://wpulike.com/' );
|
30 |
-
define( 'WP_ULIKE_VERSION' , '4.5.7'
|
31 |
-
define( 'WP_ULIKE_DB_VERSION' , '2.
|
32 |
define( 'WP_ULIKE_SLUG' , 'wp-ulike' );
|
33 |
define( 'WP_ULIKE_NAME' , __( 'WP ULike', WP_ULIKE_SLUG ) );
|
34 |
|
3 |
* Plugin Name: WP ULike
|
4 |
* Plugin URI: https://wpulike.com/?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash
|
5 |
* Description: Receiving feedback is crucial as a content creator, but unfortunately, the pieces of content you can collect it on are limited by default. However, with the help of the WP ULike plugin, it is possible to cast voting to any type of content you may have on your website. With outstanding and eye-catching widgets, you can have Like and Dislike Button on all of your content would it be a post, comment, BuddyPress activity, bbPress topics, WooCommerce products, you name it. Now you can feel your users Love for each part of your work.
|
6 |
+
* Version: 4.5.7.1
|
7 |
* Author: TechnoWich
|
8 |
* Author URI: https://technowich.com/?utm_source=wp-plugins&utm_campaign=author-uri&utm_medium=wp-dash
|
9 |
* Text Domain: wp-ulike
|
27 |
|
28 |
// Do not change these values
|
29 |
define( 'WP_ULIKE_PLUGIN_URI' , 'https://wpulike.com/' );
|
30 |
+
define( 'WP_ULIKE_VERSION' , '4.5.7.1' );
|
31 |
+
define( 'WP_ULIKE_DB_VERSION' , '2.3' );
|
32 |
define( 'WP_ULIKE_SLUG' , 'wp-ulike' );
|
33 |
define( 'WP_ULIKE_NAME' , __( 'WP ULike', WP_ULIKE_SLUG ) );
|
34 |
|