WP ULike - Version 3.4

Version Description

  • Added: A new style for likers box with pophover effect.
  • Added: New stylesheet for all buttons.
  • Added: a new option for custom button_type.
  • Fixed: All of the reported bugs.
  • Fixed: The issue of IP6 convertion.
  • Upgraded: The database structure.
  • Optimized: The stylesheet issues.
  • Optimized: Some issues with data process.
Download this release

Release Info

Developer alimir
Plugin Icon 128x128 WP ULike
Version 3.4
Comparing to
See all releases

Code changes from version 3.3.1 to 3.4

admin/admin-ajax.php CHANGED
@@ -20,7 +20,12 @@
20
  */
21
  function wp_ulike_ajax_notice_handler() {
22
  // Store it in the options table
23
- update_option( 'wp-ulike-notice-dismissed', TRUE );
 
 
 
 
 
24
  }
25
  add_action( 'wp_ajax_wp_ulike_dismissed_notice', 'wp_ulike_ajax_notice_handler' );
26
 
20
  */
21
  function wp_ulike_ajax_notice_handler() {
22
  // Store it in the options table
23
+ if ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( $_POST['nonce'], 'wp-ulike-notice-dismissed' ) ) {
24
+ wp_send_json_error( $_POST['nonce'] );
25
+ } else {
26
+ update_option( 'wp-ulike-notice-dismissed', TRUE );
27
+ wp_send_json_success( __( 'It\'s OK.', WP_ULIKE_SLUG ) );
28
+ }
29
  }
30
  add_action( 'wp_ajax_wp_ulike_dismissed_notice', 'wp_ulike_ajax_notice_handler' );
31
 
admin/admin-hooks.php CHANGED
@@ -189,22 +189,31 @@ function wp_ulike_admin_notice() {
189
  if( get_option( 'wp-ulike-notice-dismissed', FALSE ) ) return;
190
  ?>
191
  <script>
192
- jQuery(document).on( 'click', '.wp-ulike-notice .notice-dismiss', function() {
 
193
  jQuery.ajax({
194
- url: ajaxurl,
195
- data: {
196
- action: 'wp_ulike_dismissed_notice'
 
 
197
  }
198
- })
 
 
199
  });
200
  </script>
201
- <div class="notice wp-ulike-notice is-dismissible">
202
- <img src="<?php echo WP_ULIKE_ASSETS_URL; ?>/img/wp-ulike-badge.png" alt="WP ULike Plugin">
 
 
203
  <div class="wp-ulike-notice-text">
204
  <p><?php echo _e( "It's great to see that you've been using the WP ULike plugin for a while now. Hopefully you're happy with it!&nbsp; If so, would you consider leaving a positive review? It really helps to support the plugin and helps others to discover it too!" , WP_ULIKE_SLUG ); ?> </p>
205
- <p class="links">
206
  <a href="https://wordpress.org/support/plugin/wp-ulike/reviews/?filter=5" target="_blank"><?php echo _e( "Sure, I'd love to!", WP_ULIKE_SLUG ); ?></a>
207
- </p>
 
 
208
  </div>
209
  </div>
210
  <?php
189
  if( get_option( 'wp-ulike-notice-dismissed', FALSE ) ) return;
190
  ?>
191
  <script>
192
+ jQuery(document).on( 'click', '.wp-ulike-dismiss', function(e) {
193
+ e.preventDefault();
194
  jQuery.ajax({
195
+ url : ajaxurl,
196
+ type: 'post',
197
+ data: {
198
+ action: 'wp_ulike_dismissed_notice',
199
+ nonce : jQuery(this).data('nonce')
200
  }
201
+ }).done(function( response ) {
202
+ jQuery(this).closest('.wp-ulike-notice').fadeOut();
203
+ }.bind(this));
204
  });
205
  </script>
206
+ <div class="wp-ulike-notice">
207
+ <div class="wp-ulike-notice-image">
208
+ <img src="<?php echo WP_ULIKE_ASSETS_URL; ?>/img/wp-ulike-badge.png" alt="WP ULike Plugin">
209
+ </div>
210
  <div class="wp-ulike-notice-text">
211
  <p><?php echo _e( "It's great to see that you've been using the WP ULike plugin for a while now. Hopefully you're happy with it!&nbsp; If so, would you consider leaving a positive review? It really helps to support the plugin and helps others to discover it too!" , WP_ULIKE_SLUG ); ?> </p>
212
+ <div class="links">
213
  <a href="https://wordpress.org/support/plugin/wp-ulike/reviews/?filter=5" target="_blank"><?php echo _e( "Sure, I'd love to!", WP_ULIKE_SLUG ); ?></a>
214
+ <a href="https://m.do.co/c/13ad5bc24738" target="_blank"><?php echo _e( "I also want to donate!", WP_ULIKE_SLUG ); ?></a>
215
+ <a href="#" data-nonce="<?php echo wp_create_nonce( 'wp-ulike-notice-dismissed' ); ?>" class="wp-ulike-dismiss"><?php echo _e( "Maybe Later & Clear this message!", WP_ULIKE_SLUG ); ?></a>
216
+ </div>
217
  </div>
218
  </div>
219
  <?php
admin/assets/css/admin.css CHANGED
@@ -125,17 +125,13 @@ tr.hide-label td { padding-left: 0; }
125
 
126
  #wp_ulike_customize_custom_css { font-family: Consolas,Monaco,monospace; direction: ltr; font-size: 13px; width: 97%; background: none repeat scroll 0% 0% #F9F9F9; outline: 0px none; width: 60%; min-height: 300px; }
127
 
128
- .wp-ulike-notice { position: relative; overflow: hidden; max-width: 870px; margin-top: 10px; padding: 10px 10px 7px 10px; background: #F26439; border: 1px solid #F2653A; color: #FFFCD6; }
129
- .wp-ulike-notice img { width: 84px; margin: 0 0 0 -100% !important; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; }
130
- .wp-ulike-notice .wp-ulike-notice-text { float: left; clear: none; width: 100%; padding: 4px 0; }
131
- .wp-ulike-notice p { float: left; clear: both; width: auto; margin: 0 0 0 100px !important; padding: 4px 40px 4px 0; }
132
- .wp-ulike-notice a { display: inline-block; padding: 0 8px; color: #FFFCD6; }
133
- .wp-ulike-notice a:hover { color: #212121; }
134
- .wp-ulike-notice a:focus { color: #212121; }
135
- .wp-ulike-notice .links { margin: 0 0 0 92px !important; padding: 4px 0 0 0; }
136
- .wp-ulike-notice .notice-dismiss { opacity: 0.6; }
137
- .wp-ulike-notice .notice-dismiss:before { color: #ffffff !important; }
138
- .wp-ulike-notice .notice-dismiss:hover { opacity: 1; }
139
 
140
  /** Visual Select */
141
  .wp-ulike-visual-select { height: auto; display: inline-block; width: 100%; max-width: 900px; }
125
 
126
  #wp_ulike_customize_custom_css { font-family: Consolas,Monaco,monospace; direction: ltr; font-size: 13px; width: 97%; background: none repeat scroll 0% 0% #F9F9F9; outline: 0px none; width: 60%; min-height: 300px; }
127
 
128
+ .wp-ulike-notice { position: relative; max-width: 870px; overflow: hidden; padding: 20px; background: #f83600; background: linear-gradient(to right, #f83600, #fe8c00); color: #FFFCD6; display: table; box-shadow: 0 3px 25px rgba(248, 54, 0, 0.2); margin: 20px 0px; }
129
+ .wp-ulike-notice .wp-ulike-notice-image { display: table-cell; vertical-align: middle; }
130
+ .wp-ulike-notice .wp-ulike-notice-image img { width: 100px; }
131
+ .wp-ulike-notice .wp-ulike-notice-text { display: table-cell; vertical-align: middle; padding: 10px 20px; }
132
+ .wp-ulike-notice .wp-ulike-notice-text p { font-size: 15px; margin-top: 0; }
133
+ .wp-ulike-notice .links a { display: inline-block; color: #FFFCD6; text-transform: uppercase; text-decoration: none; padding: 5px 10px; border: 1px solid #FFFCD6; margin-top: 8px; margin-right: 8px; box-shadow: none; }
134
+ .wp-ulike-notice .links a:hover, .wp-ulike-notice .links a:focus { background: #FFFCD6; color: #212121; }
 
 
 
 
135
 
136
  /** Visual Select */
137
  .wp-ulike-visual-select { height: auto; display: inline-block; width: 100%; max-width: 900px; }
admin/assets/js/settings.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! WP ULike - v3.3.1
2
  * https://wpulike.com
3
  * Alimir 2018;
4
  */
1
+ /*! WP ULike - v3.4
2
  * https://wpulike.com
3
  * Alimir 2018;
4
  */
admin/assets/js/statistics.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! WP ULike - v3.3.1
2
  * https://wpulike.com
3
  * Alimir 2018;
4
  */
1
+ /*! WP ULike - v3.4
2
  * https://wpulike.com
3
  * Alimir 2018;
4
  */
assets/css/wp-ulike.css CHANGED
@@ -1,297 +1,227 @@
1
  /*!
2
  ===============================================================
3
- * WP ULike 2.9
4
  * @author Alimir [https://wordpress.org/plugins/wp-ulike/]
5
  ===============================================================
6
  */
7
  .wpulike {
8
- display: inline-block;
9
  position: relative;
10
- vertical-align: middle;
11
- overflow: hidden;
12
  line-height: normal;
13
  margin: 0;
 
14
  }
15
  .wpulike .wp_ulike_btn {
16
  margin: 0;
 
17
  display: inline-block;
18
  border-radius: .25em;
19
- border: 1px solid #d3d3d3;
20
- vertical-align: middle;
21
- line-height: normal;
22
- padding: 10px 20px;
23
- font-size: .75em;
24
  cursor: pointer;
25
- color: #777;
26
- background: #dfdfdf;
27
- box-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5) inset;
28
- text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
29
- text-decoration: none;
30
- -webkit-transition: .25s;
31
- -moz-transition: .25s;
32
- -ms-transition: .25s;
33
- -o-transition: .25s;
34
- transition: .25s;
35
  }
36
- .wpulike .wp_ulike_btn.wp_ulike_put_text {
37
- padding: 2px 10px;
 
 
38
  }
39
  .wpulike .wp_ulike_is_loading .wp_ulike_btn {
40
- background-image: url(../img/icons/loading.gif) !important;
41
  background-repeat: no-repeat;
42
  background-position: center center;
43
  }
44
  .wpulike .wp_ulike_is_loading .wp_ulike_btn span {
45
  visibility: hidden;
46
  }
 
 
 
47
 
48
  .wp_ulike_click_is_disabled {
49
  pointer-events: none;
50
  cursor: default;
51
  }
52
 
 
 
 
 
53
  /**
54
  * Default template
55
  */
56
- .wpulike-default .wp_ulike_btn:focus {
57
- outline: none;
58
- border-color: #999;
59
- }
60
- .wpulike-default .wp_ulike_btn:hover {
61
- text-decoration: none;
62
- color: #EAEAEA;
63
- text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
64
- background-color: #bdc3c7;
65
- border-color: #95a5a6;
66
  }
67
- .wpulike-default .wp_ulike_btn:active {
68
- text-decoration: none;
69
- color: #EAEAEA;
70
- text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
71
- background-color: #bdc3c7;
72
- border-color: #95a5a6;
73
  }
74
- .wpulike-default .wp_ulike_btn.wp_ulike_put_image {
75
- background-image: url(../img/icons/add.png);
76
- background-repeat: no-repeat;
77
- background-position: center center;
 
 
 
 
 
 
 
78
  }
79
- .wpulike-default .wp_ulike_btn.wp_ulike_put_image.image-unlike {
80
- background-image: url(../img/icons/remove.png);
81
  }
82
  .wpulike-default .count-box {
83
  position: relative;
84
- display: inline-block;
85
- border: 1px solid #898F9C;
86
  border-radius: .25em;
87
- vertical-align: middle;
88
- color: #333;
89
- font-size: .75em;
90
- text-align: center;
91
  text-decoration: none;
92
  background-color: #FFFFFF;
93
- -webkit-box-sizing: border-box;
94
- -moz-box-sizing: border-box;
95
- box-sizing: border-box;
96
- padding: .25em .5em;
97
- margin-left: .5em;
98
- line-height: 1em;
99
- min-width: 2.25em;
 
 
100
  }
101
  .wpulike-default .count-box:before {
102
  content: '';
103
- width: .25em;
104
- height: .25em;
105
  position: absolute;
106
  border: 1px solid transparent;
107
  background: #FFFFFF;
108
- border-bottom-color: #898F9C;
109
- left: -.2125em;
110
  top: 50%;
111
- margin-top: -.2em;
112
- border-left-color: #898F9C;
113
- -webkit-transform: rotate(45deg);
114
- -moz-transform: rotate(45deg);
115
- -ms-transform: rotate(45deg);
116
- -o-transform: rotate(45deg);
117
- transform: rotate(45deg);
118
- }
119
- .wpulike-default .wp_ulike_hide_me {
120
- visibility: hidden;
121
  }
122
 
123
- #buddypress .activity-content .wpulike .wp_ulike_is_loading .wp_ulike_btn {
124
- background-image: url(../img/icons/loading.gif) !important;
125
- background-repeat: no-repeat;
126
- background-position: center center;
127
  }
128
- #buddypress .activity-content .wpulike-default .count-box {
129
- font-size: small;
130
- padding: .3em .5em;
 
 
 
131
  }
132
- #buddypress .activity ul.item-list li {
133
- position: initial;
 
 
 
 
 
134
  }
135
- #buddypress div.activity-meta .tiles li a {
 
136
  padding: 0;
137
  }
138
- #buddypress div.activity-meta .wpulike-default .wp_ulike_btn {
139
- padding: 12px 10px !important;
140
- }
141
- #buddypress div.activity-meta .wpulike-default .wp_ulike_btn.wp_ulike_put_text {
142
- padding: 7px 10px !important;
143
  }
144
 
145
  #bbpress-forums .bbp-reply-content .wpulike .wp_ulike_is_loading .wp_ulike_btn {
146
- background-image: url(../img/icons/loading.gif) !important;
147
  background-repeat: no-repeat;
148
  background-position: center center;
149
  }
150
- #bbpress-forums .bbp-reply-content .wpulike-default .count-box {
151
- font-size: small;
152
- padding: .3em .5em;
153
- }
154
  #bbpress-forums .wpulike-default .wp_ulike_btn {
155
  margin: 0;
 
156
  display: inline-block;
157
  border-radius: .25em;
158
- border: 1px solid #d3d3d3;
159
- line-height: 1em;
160
- padding: .5em 1em;
161
- font-size: 1em;
162
  cursor: pointer;
 
163
  vertical-align: middle;
164
- color: #505050;
165
- background: #dfdfdf;
166
- box-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5) inset;
167
- text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
168
- text-decoration: none;
169
- }
170
- #bbpress-forums .wpulike-default .wp_ulike_btn.wp_ulike_put_image {
171
- background-image: url(../img/icons/add.png);
172
- background-repeat: no-repeat;
173
- background-position: center center;
174
- padding: 1em 1.8em;
175
  }
176
- #bbpress-forums .wpulike-default .wp_ulike_btn.wp_ulike_put_image.image-unlike {
177
- background-image: url(../img/icons/remove.png);
178
  }
179
 
180
  /**
181
  * Heart template
182
  */
183
  .wpulike-heart .wp_ulike_general_class {
184
- display: block;
185
- border: 1px solid #E0E0E0;
186
- background: url(../img/bg/button-love.png) no-repeat center right;
187
- border-radius: 5px;
188
- padding: 3px;
189
  }
190
  .wpulike-heart .wp_ulike_btn {
191
- border: none;
192
- padding: 0 10px;
193
  font-weight: 600;
194
- box-shadow: none;
195
- background: transparent;
196
- border-right: 1px solid #d3d3d3;
197
- border-radius: 0;
198
  }
199
- .wpulike-heart .wp_ulike_btn:hover {
200
- background-color: transparent;
201
- box-shadow: none;
202
- color: #ef0000;
203
- }
204
- .wpulike-heart .wp_ulike_btn:active {
205
- background-color: transparent;
206
- box-shadow: none;
207
- color: #ef0000;
208
  }
209
- .wpulike-heart .wp_ulike_btn.wp_ulike_put_image {
210
- border: none;
211
- box-shadow: none;
212
- background-image: url(../img/icons/add-heart-16.png);
213
- background-repeat: no-repeat !important;
214
- background-position: center center !important;
215
- padding: 11px 16px !important;
216
- border-right: 1px solid #E0E0E0;
217
- }
218
- .wpulike-heart .wp_ulike_btn.wp_ulike_put_image:hover {
219
- background-image: url(../img/icons/add-heart-hover.png);
220
- }
221
- .wpulike-heart .wp_ulike_btn.wp_ulike_put_image.image-unlike {
222
- background-image: url(../img/icons/remove-heart-16.png);
223
  }
224
- .wpulike-heart .wp_ulike_btn.wp_ulike_put_image.image-unlike:hover {
225
- background-image: url(../img/icons/remove-heart-hover.png);
226
  }
227
  .wpulike-heart .count-box {
228
- border: none;
 
 
 
 
 
 
 
229
  vertical-align: middle;
230
- background-color: transparent;
231
- padding: .25em .5em;
232
- margin-left: 0;
233
- color: #505050;
234
- font-size: .8em;
235
- }
236
- .wpulike-heart .count-box:before {
237
- border: none;
238
- background: transparent;
239
  }
240
 
241
- #buddypress .activity-content .wpulike-heart .wp_ulike_btn {
242
- border: none;
243
- padding: 0 10px;
244
- font-weight: 600;
245
- box-shadow: none;
246
- background: transparent;
247
- border-right: 1px solid #d3d3d3;
248
  border-radius: 0;
 
 
249
  }
250
- #buddypress .activity-content .wpulike-heart .wp_ulike_btn.wp_ulike_put_image {
251
- border: none;
252
- box-shadow: none;
253
- background-image: url(../img/icons/add-heart-16.png);
254
- background-repeat: no-repeat !important;
255
- background-position: center center !important;
256
- padding: 11px 16px !important;
257
- border-right: 1px solid #E0E0E0;
258
- }
259
- #buddypress .activity-content .wpulike-heart .wp_ulike_btn.wp_ulike_put_image:hover {
260
- background-image: url(../img/icons/add-heart-hover.png);
261
- }
262
- #buddypress .activity-content .wpulike-heart .wp_ulike_btn.wp_ulike_put_image.image-unlike {
263
- background-image: url(../img/icons/remove-heart-16.png);
264
- }
265
- #buddypress .activity-content .wpulike-heart .wp_ulike_btn.wp_ulike_put_image.image-unlike:hover {
266
- background-image: url(../img/icons/remove-heart-hover.png);
267
  }
268
 
269
  #bbpress-forums .bbp-reply-content .wpulike-heart .wp_ulike_btn {
270
- border: none;
271
- padding: 0 10px;
272
- font-weight: 600;
273
- box-shadow: none;
274
- background: transparent;
275
- border-right: 1px solid #d3d3d3;
276
- border-radius: 0;
277
- }
278
- #bbpress-forums .bbp-reply-content .wpulike-heart .wp_ulike_btn.wp_ulike_put_image {
279
- border: none;
280
- box-shadow: none;
281
- background-image: url(../img/icons/add-heart-16.png);
282
- background-repeat: no-repeat !important;
283
- background-position: center center !important;
284
- padding: 11px 16px !important;
285
- border-right: 1px solid #E0E0E0;
286
- }
287
- #bbpress-forums .bbp-reply-content .wpulike-heart .wp_ulike_btn.wp_ulike_put_image:hover {
288
- background-image: url(../img/icons/add-heart-hover.png);
289
- }
290
- #bbpress-forums .bbp-reply-content .wpulike-heart .wp_ulike_btn.wp_ulike_put_image.image-unlike {
291
- background-image: url(../img/icons/remove-heart-16.png);
292
- }
293
- #bbpress-forums .bbp-reply-content .wpulike-heart .wp_ulike_btn.wp_ulike_put_image.image-unlike:hover {
294
- background-image: url(../img/icons/remove-heart-hover.png);
295
  }
296
 
297
  /**
@@ -361,19 +291,24 @@
361
  transform: scale(1);
362
  }
363
  }
 
 
 
364
  .wpulike-robeen .count-box {
365
- position: relative;
366
- bottom: 18px;
367
- right: 8px;
368
  font-weight: 600;
369
  }
370
  .wpulike-robeen label {
 
371
  margin: 0;
372
  }
373
  .wpulike-robeen svg {
374
  cursor: pointer;
375
- overflow: visible;
376
  width: 50px;
 
 
377
  }
378
  .wpulike-robeen svg .heart {
379
  transform-origin: center;
@@ -509,23 +444,59 @@
509
  /**
510
  * Widgets & Likers Box
511
  */
512
- .tiles {
513
- list-style-type: none !important;
514
- position: relative !important;
515
- margin: 10px 0 !important;
516
- padding: 0 !important;
 
 
 
 
 
 
 
 
517
  }
518
- .tiles li {
519
- display: inline-table !important;
520
- cursor: pointer !important;
521
  }
522
- .tiles li img {
523
- display: block !important;
524
- float: none !important;
 
 
525
  }
526
- .tiles li.inactive {
527
- visibility: hidden !important;
528
- opacity: 0 !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
529
  }
530
 
531
  .most_liked_users {
@@ -606,15 +577,12 @@
606
  overflow: hidden;
607
  margin: 0 0 6px;
608
  padding: 15px 15px 15px 55px;
609
- width: 300px;
610
  border-radius: 3px;
611
- background-color: #1e88e5;
612
- background-position: 15px center;
613
- background-repeat: no-repeat;
614
- background-image: url(../img/svg/info.svg);
615
  color: #FFFFFF;
616
  animation: wpUlikeNotifitcationsAnimation 200ms backwards;
617
- opacity: .8;
618
  font-size: 14px;
619
  font-weight: 500;
620
  }
@@ -622,16 +590,34 @@
622
  opacity: 0.9;
623
  cursor: pointer;
624
  }
 
 
 
 
 
 
 
 
 
 
 
 
625
  .wpulike-notification .wpulike-message.wpulike-success {
626
- background-color: #43a047;
 
 
627
  background-image: url(../img/svg/success.svg);
628
  }
629
  .wpulike-notification .wpulike-message.wpulike-error {
630
- background-color: #e53935;
 
 
631
  background-image: url(../img/svg/error.svg);
632
  }
633
  .wpulike-notification .wpulike-message.wpulike-warning {
634
- background-color: #fb8c00;
 
 
635
  background-image: url(../img/svg/warning.svg);
636
  }
637
 
@@ -665,61 +651,23 @@
665
  }
666
  /*!>>>>>>>>>>>>>>>>>>>>>>> #RTL <<<<<<<<<<<<<<<<<<<<<<<<<<< */
667
  .rtl .wpulike-default .count-box {
668
- margin-right: .5em;
669
  margin-left: inherit;
670
  }
671
  .rtl .wpulike-default .count-box:before {
672
- right: -.2125em;
673
- left: inherit;
674
- border-color: #898F9C #898F9C transparent transparent;
675
  }
676
 
677
- .rtl .wpulike-heart .wp_ulike_btn {
678
- border-left: 1px solid #d3d3d3;
679
- border-right: 0;
680
- }
681
- .rtl .wpulike-heart .wp_ulike_btn.wp_ulike_put_image {
682
- border-left: 1px solid #E0E0E0;
683
- border-right: 0;
684
- }
685
- .rtl .wpulike-heart .wp_ulike_is_loading .wp_ulike_btn {
686
- border-left: 1px solid #E0E0E0;
687
- border-right: 0;
688
- }
689
- .rtl .wpulike-heart .count-box {
690
- margin-right: 0;
691
- margin-left: inherit;
692
  }
693
- .rtl #buddypress .activity-content .wpulike-heart .wp_ulike_btn {
694
- border-left: 1px solid #d3d3d3;
695
- border-right: 0;
696
  }
697
- .rtl #buddypress .activity-content .wpulike-heart .wp_ulike_btn.wp_ulike_put_image {
698
- border-left: 1px solid #E0E0E0;
699
- border-right: 0;
700
- }
701
- .rtl #buddypress .activity-content .wpulike-heart wp_ulike_is_loading .wp_ulike_btn {
702
- border-left: 1px solid #E0E0E0;
703
- border-right: 0;
704
- }
705
- .rtl #bbpress-forums .wpulike-heart .wp_ulike_btn {
706
- border-left: 1px solid #d3d3d3;
707
- border-right: 0;
708
- }
709
- .rtl #bbpress-forums .wpulike-heart .wp_ulike_btn.wp_ulike_put_image {
710
- border-left: 1px solid #E0E0E0;
711
- border-right: 0;
712
- }
713
- .rtl #bbpress-forums .wpulike-heart wp_ulike_is_loading .wp_ulike_btn {
714
- border-left: 1px solid #E0E0E0;
715
- border-right: 0;
716
- }
717
-
718
- .rtl .wpulike-robeen .count-box {
719
- right: inherit;
720
- left: 8px;
721
- }
722
-
723
  .rtl .commentlist .tiles .avatar {
724
  left: inherit !important;
725
  right: 0 !important;
@@ -743,7 +691,10 @@
743
  }
744
  .rtl .wpulike-notification .wpulike-message {
745
  padding: 15px 55px 15px 15px;
746
- background-position: right 15px center;
 
 
 
747
  }
748
  @media all and (max-width: 240px) {
749
  .rtl .wpulike-notification .wpulike-message {
1
  /*!
2
  ===============================================================
3
+ * WP ULike
4
  * @author Alimir [https://wordpress.org/plugins/wp-ulike/]
5
  ===============================================================
6
  */
7
  .wpulike {
8
+ display: block;
9
  position: relative;
 
 
10
  line-height: normal;
11
  margin: 0;
12
+ padding: 10px 0;
13
  }
14
  .wpulike .wp_ulike_btn {
15
  margin: 0;
16
+ position: relative;
17
  display: inline-block;
18
  border-radius: .25em;
19
+ font-size: 14px;
20
+ line-height: 28px;
21
+ box-shadow: none;
 
 
22
  cursor: pointer;
23
+ padding: 0 15px;
24
+ vertical-align: middle;
25
+ height: 28px;
26
+ min-width: 50px;
27
+ font-weight: 600;
 
 
 
 
 
28
  }
29
+ .wpulike .wp_ulike_btn:hover {
30
+ text-decoration: none;
31
+ border-color: #95a5a6;
32
+ box-shadow: none;
33
  }
34
  .wpulike .wp_ulike_is_loading .wp_ulike_btn {
35
+ background-image: url(../img/svg/loader.svg);
36
  background-repeat: no-repeat;
37
  background-position: center center;
38
  }
39
  .wpulike .wp_ulike_is_loading .wp_ulike_btn span {
40
  visibility: hidden;
41
  }
42
+ .wpulike .wp_ulike_is_loading .wp_ulike_btn.wp_ulike_put_image:after {
43
+ content: none;
44
+ }
45
 
46
  .wp_ulike_click_is_disabled {
47
  pointer-events: none;
48
  cursor: default;
49
  }
50
 
51
+ .wp_ulike_hide_me {
52
+ visibility: hidden;
53
+ }
54
+
55
  /**
56
  * Default template
57
  */
58
+ .wpulike-default .wp_ulike_btn {
59
+ color: #616161;
60
+ background: #e0e0e0;
 
 
 
 
 
 
 
61
  }
62
+ .wpulike-default .wp_ulike_is_liked .wp_ulike_btn {
63
+ color: #757575;
 
 
 
 
64
  }
65
+ .wpulike-default .wp_ulike_put_image:after {
66
+ content: '';
67
+ display: block;
68
+ background: url(../img/svg/like.svg) no-repeat;
69
+ background-size: contain;
70
+ width: 16px;
71
+ height: 16px;
72
+ position: absolute;
73
+ left: 50%;
74
+ top: 50%;
75
+ transform: translateX(-50%) translateY(-50%);
76
  }
77
+ .wpulike-default .wp_ulike_put_image.image-unlike:after {
78
+ filter: invert(44%) sepia(40%) saturate(3852%) hue-rotate(329deg) brightness(100%) contrast(111%);
79
  }
80
  .wpulike-default .count-box {
81
  position: relative;
 
 
82
  border-radius: .25em;
83
+ font-size: 12px;
 
 
 
84
  text-decoration: none;
85
  background-color: #FFFFFF;
86
+ margin-left: 8px;
87
+ line-height: 28px;
88
+ display: inline-block;
89
+ padding: 0 8px;
90
+ box-shadow: 0 0 0 1px #bdbdbd inset;
91
+ color: #616161;
92
+ min-width: 30px;
93
+ vertical-align: middle;
94
+ text-align: center;
95
  }
96
  .wpulike-default .count-box:before {
97
  content: '';
 
 
98
  position: absolute;
99
  border: 1px solid transparent;
100
  background: #FFFFFF;
101
+ border-bottom-color: #bdbdbd;
102
+ left: -5px;
103
  top: 50%;
104
+ border-left-color: #bdbdbd;
105
+ transform: rotate(45deg) translatey(-50%);
106
+ width: 5px;
107
+ height: 5px;
108
+ margin: 0;
 
 
 
 
 
109
  }
110
 
111
+ #buddypress #activity-stream .activity-meta .wpulike, #buddypress #activity-stream .activity-comments .wpulike {
112
+ display: inline-block;
113
+ vertical-align: middle;
114
+ padding: 0;
115
  }
116
+ #buddypress #activity-stream .activity-meta .wpulike .wp_ulike_btn span, #buddypress #activity-stream .activity-comments .wpulike .wp_ulike_btn span {
117
+ position: relative;
118
+ top: 50%;
119
+ left: 50%;
120
+ transform: translateX(-50%) translateY(-50%);
121
+ display: block;
122
  }
123
+ #buddypress #activity-stream .activity-meta .wpulike-default .wp_ulike_btn, #buddypress #activity-stream .activity-comments .wpulike-default .wp_ulike_btn {
124
+ border-radius: 0;
125
+ background-color: #ffffff;
126
+ box-shadow: 0 0 0 1px #bdbdbd inset;
127
+ height: 29.5px;
128
+ min-width: 50px;
129
+ margin-bottom: 2px;
130
  }
131
+ #buddypress #activity-stream .wp_ulike_likers_wrapper li {
132
+ border: none;
133
  padding: 0;
134
  }
135
+ #buddypress #activity-stream .wp_ulike_likers_wrapper li a, #buddypress #activity-stream .wp_ulike_likers_wrapper li img {
136
+ float: none;
137
+ padding: 0;
138
+ margin: 0;
 
139
  }
140
 
141
  #bbpress-forums .bbp-reply-content .wpulike .wp_ulike_is_loading .wp_ulike_btn {
142
+ background-image: url(../img/svg/loader.svg);
143
  background-repeat: no-repeat;
144
  background-position: center center;
145
  }
 
 
 
 
146
  #bbpress-forums .wpulike-default .wp_ulike_btn {
147
  margin: 0;
148
+ position: relative;
149
  display: inline-block;
150
  border-radius: .25em;
151
+ font-size: 14px;
152
+ line-height: 28px;
153
+ box-shadow: none;
 
154
  cursor: pointer;
155
+ padding: 0 15px;
156
  vertical-align: middle;
157
+ height: 28px;
158
+ min-width: 50px;
159
+ font-weight: 600;
160
+ color: #616161;
161
+ background: #e0e0e0;
 
 
 
 
 
 
162
  }
163
+ #bbpress-forums .wp_ulike_likers_wrapper ul {
164
+ margin: 0 !important;
165
  }
166
 
167
  /**
168
  * Heart template
169
  */
170
  .wpulike-heart .wp_ulike_general_class {
171
+ display: inline-block;
172
+ box-shadow: 0 0 0 1px #bdbdbd inset;
173
+ border-radius: .25em;
174
+ padding: 5px;
 
175
  }
176
  .wpulike-heart .wp_ulike_btn {
177
+ padding: 0 5px;
178
+ text-transform: uppercase;
179
  font-weight: 600;
180
+ color: #757575;
181
+ min-width: 30px;
 
 
182
  }
183
+ .wpulike-heart .wp_ulike_likers_wrapper {
184
+ bottom: 10px;
 
 
 
 
 
 
 
185
  }
186
+ .wpulike-heart .wp_ulike_put_image:after {
187
+ content: '';
188
+ display: block;
189
+ background: url(../img/svg/love.svg) no-repeat;
190
+ background-size: contain;
191
+ width: 20px;
192
+ height: 20px;
193
+ position: absolute;
194
+ left: 50%;
195
+ top: 50%;
196
+ transform: translateX(-50%) translateY(-50%);
 
 
 
197
  }
198
+ .wpulike-heart .wp_ulike_put_image.image-unlike:after {
199
+ filter: invert(44%) sepia(40%) saturate(3852%) hue-rotate(329deg) brightness(100%) contrast(111%);
200
  }
201
  .wpulike-heart .count-box {
202
+ font-size: 14px;
203
+ text-decoration: none;
204
+ line-height: 28px;
205
+ display: inline-block;
206
+ color: #616161;
207
+ min-width: 30px;
208
+ text-align: center;
209
+ font-weight: 600;
210
  vertical-align: middle;
211
+ padding: 0 5px;
 
 
 
 
 
 
 
 
212
  }
213
 
214
+ #buddypress #activity-stream .activity-meta .wpulike-heart .wp_ulike_general_class {
 
 
 
 
 
 
215
  border-radius: 0;
216
+ padding: 1px 5px;
217
+ margin-bottom: 2px;
218
  }
219
+ #buddypress #activity-stream .activity-meta .wpulike-heart .count-box {
220
+ min-width: 20px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
221
  }
222
 
223
  #bbpress-forums .bbp-reply-content .wpulike-heart .wp_ulike_btn {
224
+ padding: 5px 15px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
225
  }
226
 
227
  /**
291
  transform: scale(1);
292
  }
293
  }
294
+ .wpulike-robeen .wp_ulike_likers_wrapper {
295
+ bottom: 15px;
296
+ }
297
  .wpulike-robeen .count-box {
298
+ display: inline-block;
299
+ vertical-align: middle;
 
300
  font-weight: 600;
301
  }
302
  .wpulike-robeen label {
303
+ display: inline-block;
304
  margin: 0;
305
  }
306
  .wpulike-robeen svg {
307
  cursor: pointer;
308
+ overflow: visible !important;
309
  width: 50px;
310
+ display: inline-block;
311
+ vertical-align: middle;
312
  }
313
  .wpulike-robeen svg .heart {
314
  transform-origin: center;
444
  /**
445
  * Widgets & Likers Box
446
  */
447
+ .wp_ulike_likers_wrapper {
448
+ transition: all 500ms cubic-bezier(0.19, 1, 0.22, 1);
449
+ display: block;
450
+ position: absolute;
451
+ left: 0;
452
+ transform: translateY(-30px);
453
+ bottom: 0;
454
+ background: #eeeeee;
455
+ padding: 5px;
456
+ opacity: 0;
457
+ box-shadow: 2px 2px 1px rgba(0, 0, 0, 0.1);
458
+ border-radius: 5px;
459
+ z-index: 9;
460
  }
461
+ .wp_ulike_likers_wrapper:empty {
462
+ display: none;
 
463
  }
464
+ .wp_ulike_likers_wrapper .tiles {
465
+ display: table;
466
+ border-spacing: 8px;
467
+ margin: 0;
468
+ padding: 0;
469
  }
470
+ .wp_ulike_likers_wrapper .tiles li {
471
+ display: table-cell;
472
+ padding: 0;
473
+ }
474
+ .wp_ulike_likers_wrapper .tiles li a > img {
475
+ border-radius: 5px;
476
+ transition: opacity 1500ms cubic-bezier(0.19, 1, 0.22, 1);
477
+ display: block;
478
+ border: 0;
479
+ opacity: 0;
480
+ box-shadow: none;
481
+ }
482
+ .wp_ulike_likers_wrapper:after {
483
+ content: '';
484
+ position: absolute;
485
+ top: 100%;
486
+ left: 15px;
487
+ width: 0;
488
+ height: 0;
489
+ border-top: 8px solid #eeeeee;
490
+ border-right: 8px solid transparent;
491
+ border-left: 8px solid transparent;
492
+ }
493
+
494
+ .wpulike:hover .wp_ulike_likers_wrapper {
495
+ transform: translateY(-50px);
496
+ opacity: 1;
497
+ }
498
+ .wpulike:hover .wp_ulike_likers_wrapper .tiles a > img {
499
+ opacity: 1;
500
  }
501
 
502
  .most_liked_users {
577
  overflow: hidden;
578
  margin: 0 0 6px;
579
  padding: 15px 15px 15px 55px;
580
+ width: 280px;
581
  border-radius: 3px;
582
+ background-color: #00BCD4;
 
 
 
583
  color: #FFFFFF;
584
  animation: wpUlikeNotifitcationsAnimation 200ms backwards;
585
+ box-shadow: 0 3px 5px rgba(0, 0, 0, 0.08);
586
  font-size: 14px;
587
  font-weight: 500;
588
  }
590
  opacity: 0.9;
591
  cursor: pointer;
592
  }
593
+ .wpulike-notification .wpulike-message:before {
594
+ content: "";
595
+ background-position: center center;
596
+ background-repeat: no-repeat;
597
+ background-image: url(../img/svg/info.svg);
598
+ position: absolute;
599
+ left: 0;
600
+ width: 45px;
601
+ top: 0;
602
+ height: 100%;
603
+ background-color: rgba(0, 0, 0, 0.08);
604
+ }
605
  .wpulike-notification .wpulike-message.wpulike-success {
606
+ background-color: #8bc34a;
607
+ }
608
+ .wpulike-notification .wpulike-message.wpulike-success:before {
609
  background-image: url(../img/svg/success.svg);
610
  }
611
  .wpulike-notification .wpulike-message.wpulike-error {
612
+ background-color: #EF5350;
613
+ }
614
+ .wpulike-notification .wpulike-message.wpulike-error:before {
615
  background-image: url(../img/svg/error.svg);
616
  }
617
  .wpulike-notification .wpulike-message.wpulike-warning {
618
+ background-color: #FFAB00;
619
+ }
620
+ .wpulike-notification .wpulike-message.wpulike-warning:before {
621
  background-image: url(../img/svg/warning.svg);
622
  }
623
 
651
  }
652
  /*!>>>>>>>>>>>>>>>>>>>>>>> #RTL <<<<<<<<<<<<<<<<<<<<<<<<<<< */
653
  .rtl .wpulike-default .count-box {
654
+ margin-right: 8px;
655
  margin-left: inherit;
656
  }
657
  .rtl .wpulike-default .count-box:before {
658
+ right: -1px;
659
+ left: auto;
660
+ border-color: #bdbdbd #bdbdbd transparent transparent;
661
  }
662
 
663
+ .rtl .wp_ulike_likers_wrapper {
664
+ left: auto;
665
+ right: 0;
 
 
 
 
 
 
 
 
 
 
 
 
666
  }
667
+ .rtl .wp_ulike_likers_wrapper:after {
668
+ left: auto;
669
+ right: 15px;
670
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
671
  .rtl .commentlist .tiles .avatar {
672
  left: inherit !important;
673
  right: 0 !important;
691
  }
692
  .rtl .wpulike-notification .wpulike-message {
693
  padding: 15px 55px 15px 15px;
694
+ }
695
+ .rtl .wpulike-notification .wpulike-message:before {
696
+ left: auto;
697
+ right: 0;
698
  }
699
  @media all and (max-width: 240px) {
700
  .rtl .wpulike-notification .wpulike-message {
assets/css/wp-ulike.min.css CHANGED
@@ -1,6 +1,6 @@
1
  /*!
2
  ===============================================================
3
- * WP ULike 2.9
4
  * @author Alimir [https://wordpress.org/plugins/wp-ulike/]
5
  ===============================================================
6
- */.wpulike{display:inline-block;position:relative;vertical-align:middle;overflow:hidden;line-height:normal;margin:0}.wpulike .wp_ulike_btn{margin:0;display:inline-block;border-radius:.25em;border:1px solid #d3d3d3;vertical-align:middle;line-height:normal;padding:10px 20px;font-size:.75em;cursor:pointer;color:#777;background:#dfdfdf;box-shadow:1px 1px 0 rgba(255,255,255,.5) inset;text-shadow:0 1px 0 rgba(255,255,255,.5);text-decoration:none;-webkit-transition:.25s;-moz-transition:.25s;-ms-transition:.25s;-o-transition:.25s;transition:.25s}.wpulike .wp_ulike_btn.wp_ulike_put_text{padding:2px 10px}.wpulike .wp_ulike_is_loading .wp_ulike_btn{background-image:url(../img/icons/loading.gif)!important;background-repeat:no-repeat;background-position:center center}.wpulike .wp_ulike_is_loading .wp_ulike_btn span{visibility:hidden}.wp_ulike_click_is_disabled{pointer-events:none;cursor:default}.wpulike-default .wp_ulike_btn:focus{outline:0;border-color:#999}.wpulike-default .wp_ulike_btn:hover{text-decoration:none;color:#eaeaea;text-shadow:0 1px 0 rgba(0,0,0,.3);background-color:#bdc3c7;border-color:#95a5a6}.wpulike-default .wp_ulike_btn:active{text-decoration:none;color:#eaeaea;text-shadow:0 1px 0 rgba(0,0,0,.3);background-color:#bdc3c7;border-color:#95a5a6}.wpulike-default .wp_ulike_btn.wp_ulike_put_image{background-image:url(../img/icons/add.png);background-repeat:no-repeat;background-position:center center}.wpulike-default .wp_ulike_btn.wp_ulike_put_image.image-unlike{background-image:url(../img/icons/remove.png)}.wpulike-default .count-box{position:relative;display:inline-block;border:1px solid #898f9c;border-radius:.25em;vertical-align:middle;color:#333;font-size:.75em;text-align:center;text-decoration:none;background-color:#fff;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:.25em .5em;margin-left:.5em;line-height:1em;min-width:2.25em}.wpulike-default .count-box:before{content:'';width:.25em;height:.25em;position:absolute;border:1px solid transparent;background:#fff;border-bottom-color:#898f9c;left:-.2125em;top:50%;margin-top:-.2em;border-left-color:#898f9c;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.wpulike-default .wp_ulike_hide_me{visibility:hidden}#buddypress .activity-content .wpulike .wp_ulike_is_loading .wp_ulike_btn{background-image:url(../img/icons/loading.gif)!important;background-repeat:no-repeat;background-position:center center}#buddypress .activity-content .wpulike-default .count-box{font-size:small;padding:.3em .5em}#buddypress .activity ul.item-list li{position:initial}#buddypress div.activity-meta .tiles li a{padding:0}#buddypress div.activity-meta .wpulike-default .wp_ulike_btn{padding:12px 10px!important}#buddypress div.activity-meta .wpulike-default .wp_ulike_btn.wp_ulike_put_text{padding:7px 10px!important}#bbpress-forums .bbp-reply-content .wpulike .wp_ulike_is_loading .wp_ulike_btn{background-image:url(../img/icons/loading.gif)!important;background-repeat:no-repeat;background-position:center center}#bbpress-forums .bbp-reply-content .wpulike-default .count-box{font-size:small;padding:.3em .5em}#bbpress-forums .wpulike-default .wp_ulike_btn{margin:0;display:inline-block;border-radius:.25em;border:1px solid #d3d3d3;line-height:1em;padding:.5em 1em;font-size:1em;cursor:pointer;vertical-align:middle;color:#505050;background:#dfdfdf;box-shadow:1px 1px 0 rgba(255,255,255,.5) inset;text-shadow:0 1px 0 rgba(255,255,255,.5);text-decoration:none}#bbpress-forums .wpulike-default .wp_ulike_btn.wp_ulike_put_image{background-image:url(../img/icons/add.png);background-repeat:no-repeat;background-position:center center;padding:1em 1.8em}#bbpress-forums .wpulike-default .wp_ulike_btn.wp_ulike_put_image.image-unlike{background-image:url(../img/icons/remove.png)}.wpulike-heart .wp_ulike_general_class{display:block;border:1px solid #e0e0e0;background:url(../img/bg/button-love.png) no-repeat center right;border-radius:5px;padding:3px}.wpulike-heart .wp_ulike_btn{border:none;padding:0 10px;font-weight:600;box-shadow:none;background:0 0;border-right:1px solid #d3d3d3;border-radius:0}.wpulike-heart .wp_ulike_btn:hover{background-color:transparent;box-shadow:none;color:#ef0000}.wpulike-heart .wp_ulike_btn:active{background-color:transparent;box-shadow:none;color:#ef0000}.wpulike-heart .wp_ulike_btn.wp_ulike_put_image{border:none;box-shadow:none;background-image:url(../img/icons/add-heart-16.png);background-repeat:no-repeat!important;background-position:center center!important;padding:11px 16px!important;border-right:1px solid #e0e0e0}.wpulike-heart .wp_ulike_btn.wp_ulike_put_image:hover{background-image:url(../img/icons/add-heart-hover.png)}.wpulike-heart .wp_ulike_btn.wp_ulike_put_image.image-unlike{background-image:url(../img/icons/remove-heart-16.png)}.wpulike-heart .wp_ulike_btn.wp_ulike_put_image.image-unlike:hover{background-image:url(../img/icons/remove-heart-hover.png)}.wpulike-heart .count-box{border:none;vertical-align:middle;background-color:transparent;padding:.25em .5em;margin-left:0;color:#505050;font-size:.8em}.wpulike-heart .count-box:before{border:none;background:0 0}#buddypress .activity-content .wpulike-heart .wp_ulike_btn{border:none;padding:0 10px;font-weight:600;box-shadow:none;background:0 0;border-right:1px solid #d3d3d3;border-radius:0}#buddypress .activity-content .wpulike-heart .wp_ulike_btn.wp_ulike_put_image{border:none;box-shadow:none;background-image:url(../img/icons/add-heart-16.png);background-repeat:no-repeat!important;background-position:center center!important;padding:11px 16px!important;border-right:1px solid #e0e0e0}#buddypress .activity-content .wpulike-heart .wp_ulike_btn.wp_ulike_put_image:hover{background-image:url(../img/icons/add-heart-hover.png)}#buddypress .activity-content .wpulike-heart .wp_ulike_btn.wp_ulike_put_image.image-unlike{background-image:url(../img/icons/remove-heart-16.png)}#buddypress .activity-content .wpulike-heart .wp_ulike_btn.wp_ulike_put_image.image-unlike:hover{background-image:url(../img/icons/remove-heart-hover.png)}#bbpress-forums .bbp-reply-content .wpulike-heart .wp_ulike_btn{border:none;padding:0 10px;font-weight:600;box-shadow:none;background:0 0;border-right:1px solid #d3d3d3;border-radius:0}#bbpress-forums .bbp-reply-content .wpulike-heart .wp_ulike_btn.wp_ulike_put_image{border:none;box-shadow:none;background-image:url(../img/icons/add-heart-16.png);background-repeat:no-repeat!important;background-position:center center!important;padding:11px 16px!important;border-right:1px solid #e0e0e0}#bbpress-forums .bbp-reply-content .wpulike-heart .wp_ulike_btn.wp_ulike_put_image:hover{background-image:url(../img/icons/add-heart-hover.png)}#bbpress-forums .bbp-reply-content .wpulike-heart .wp_ulike_btn.wp_ulike_put_image.image-unlike{background-image:url(../img/icons/remove-heart-16.png)}#bbpress-forums .bbp-reply-content .wpulike-heart .wp_ulike_btn.wp_ulike_put_image.image-unlike:hover{background-image:url(../img/icons/remove-heart-hover.png)}@keyframes animateCircle{40%{transform:scale(10);opacity:1;fill:#dd4688}55%{transform:scale(11);opacity:1;fill:#d46abf}65%{transform:scale(12);opacity:1;fill:#cc8ef5}75%{transform:scale(13);opacity:1;fill:transparent;stroke:#cc8ef5;stroke-width:.5}85%{transform:scale(17);opacity:1;fill:transparent;stroke:#cc8ef5;stroke-width:.2}95%{transform:scale(18);opacity:1;fill:transparent;stroke:#cc8ef5;stroke-width:.1}100%{transform:scale(19);opacity:1;fill:transparent;stroke:#cc8ef5;stroke-width:0}}@keyframes animateHeart{0%{transform:scale(.2)}40%{transform:scale(1.2)}100%{transform:scale(1)}}@keyframes animateHeartOut{0%{transform:scale(1.4)}100%{transform:scale(1)}}.wpulike-robeen .count-box{position:relative;bottom:18px;right:8px;font-weight:600}.wpulike-robeen label{margin:0}.wpulike-robeen svg{cursor:pointer;overflow:visible;width:50px}.wpulike-robeen svg .heart{transform-origin:center;animation:animateHeartOut .3s linear forwards}.wpulike-robeen svg .main-circ{transform-origin:29.5px 29.5px}.wpulike-robeen .wp_ulike_btn{display:none!important}.wpulike-robeen .wp_ulike_btn:checked+svg .heart{transform:scale(.2);fill:#e2264d;animation:animateHeart .3s linear forwards .25s}.wpulike-robeen .wp_ulike_btn:checked+svg .main-circ{transition:all 2s;animation:animateCircle .3s linear forwards;opacity:1}.wpulike-robeen .wp_ulike_btn:checked+svg .grp1{opacity:1;transition:.1s all .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp1 .oval1{transform:scale(0) translate(0,-30px);transform-origin:0 0 0;transition:.5s transform .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp1 .oval2{transform:scale(0) translate(10px,-50px);transform-origin:0 0 0;transition:1.5s transform .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp2{opacity:1;transition:.1s all .3s;opacity:1;transition:.1s opacity .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp2 .oval1{transform:scale(0) translate(30px,-15px);transform-origin:0 0 0;transition:.5s transform .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp2 .oval2{transform:scale(0) translate(60px,-15px);transform-origin:0 0 0;transition:1.5s transform .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp3{opacity:1;transition:.1s all .3s;opacity:1;transition:.1s opacity .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp3 .oval1{transform:scale(0) translate(30px,0);transform-origin:0 0 0;transition:.5s transform .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp3 .oval2{transform:scale(0) translate(60px,10px);transform-origin:0 0 0;transition:1.5s transform .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp4{opacity:1;transition:.1s all .3s;opacity:1;transition:.1s opacity .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp4 .oval1{transform:scale(0) translate(30px,15px);transform-origin:0 0 0;transition:.5s transform .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp4 .oval2{transform:scale(0) translate(40px,50px);transform-origin:0 0 0;transition:1.5s transform .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp5{opacity:1;transition:.1s all .3s;opacity:1;transition:.1s opacity .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp5 .oval1{transform:scale(0) translate(-10px,20px);transform-origin:0 0 0;transition:.5s transform .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp5 .oval2{transform:scale(0) translate(-60px,30px);transform-origin:0 0 0;transition:1.5s transform .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp6{opacity:1;transition:.1s all .3s;opacity:1;transition:.1s opacity .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp6 .oval1{transform:scale(0) translate(-30px,0);transform-origin:0 0 0;transition:.5s transform .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp6 .oval2{transform:scale(0) translate(-60px,-5px);transform-origin:0 0 0;transition:1.5s transform .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp7{opacity:1;transition:.1s all .3s;opacity:1;transition:.1s opacity .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp7 .oval1{transform:scale(0) translate(-30px,-15px);transform-origin:0 0 0;transition:.5s transform .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp7 .oval2{transform:scale(0) translate(-55px,-30px);transform-origin:0 0 0;transition:1.5s transform .3s}.tiles{list-style-type:none!important;position:relative!important;margin:10px 0!important;padding:0!important}.tiles li{display:inline-table!important;cursor:pointer!important}.tiles li img{display:block!important;float:none!important}.tiles li.inactive{visibility:hidden!important;opacity:0!important}.most_liked_users{list-style-type:none!important;position:relative!important;margin:10px 0!important;padding:0!important}.most_liked_users li{display:inline-table!important;cursor:pointer!important;margin:0 2px!important}.most_liked_users li img{display:block!important;float:none!important}.most_liked_users li.inactive{visibility:hidden!important;opacity:0!important}.commentlist .tiles .avatar{left:0!important}.wp_ulike_thumbnail{vertical-align:middle;margin:0 10px 0 0}.most_liked_comment .avatar{vertical-align:middle;margin:0 10px 0 0}.wp_ulike_style_simple .wp_counter_span:before{content:"("}.wp_ulike_style_simple .wp_counter_span:after{content:")"}.wp_ulike_style_love .wp_counter_span{float:right;display:inline-block;background:#f1f1f1 url(../img/icons/heart.png) 5px center no-repeat;color:#333;font-size:9px;line-height:17px;font-weight:400;margin:2px 0 0 2px;vertical-align:middle;border-radius:10px;padding:0 5px 0 23px;z-index:26}.wpulike-notification{position:fixed;z-index:999999;pointer-events:none;right:20px;bottom:20px}.wpulike-notification *{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.wpulike-notification .wpulike-message{position:relative;pointer-events:auto;word-wrap:break-word;overflow:hidden;margin:0 0 6px;padding:15px 15px 15px 55px;width:300px;border-radius:3px;background-color:#1e88e5;background-position:15px center;background-repeat:no-repeat;background-image:url(../img/svg/info.svg);color:#fff;animation:wpUlikeNotifitcationsAnimation .2s backwards;opacity:.8;font-size:14px;font-weight:500}.wpulike-notification .wpulike-message:hover{opacity:.9;cursor:pointer}.wpulike-notification .wpulike-message.wpulike-success{background-color:#43a047;background-image:url(../img/svg/success.svg)}.wpulike-notification .wpulike-message.wpulike-error{background-color:#e53935;background-image:url(../img/svg/error.svg)}.wpulike-notification .wpulike-message.wpulike-warning{background-color:#fb8c00;background-image:url(../img/svg/warning.svg)}@keyframes wpUlikeNotifitcationsAnimation{from{opacity:0;transform:translateY(100%)}to{opacity:.8;transform:translateY(0)}}@media all and (max-width:240px){.wpulike-notification .wpulike-message{padding:8px 8px 8px 55px;width:11em}}@media all and (min-width:241px) and (max-width:480px){.wpulike-notification .wpulike-message{padding:8px 8px 8px 55px;width:18em}}@media all and (min-width:481px) and (max-width:768px){.wpulike-notification .wpulike-message{padding:15px 15px 15px 55px;width:25em}}/*!>>>>>>>>>>>>>>>>>>>>>>> #RTL <<<<<<<<<<<<<<<<<<<<<<<<<<< */.rtl .wpulike-default .count-box{margin-right:.5em;margin-left:inherit}.rtl .wpulike-default .count-box:before{right:-.2125em;left:inherit;border-color:#898f9c #898f9c transparent transparent}.rtl .wpulike-heart .wp_ulike_btn{border-left:1px solid #d3d3d3;border-right:0}.rtl .wpulike-heart .wp_ulike_btn.wp_ulike_put_image{border-left:1px solid #e0e0e0;border-right:0}.rtl .wpulike-heart .wp_ulike_is_loading .wp_ulike_btn{border-left:1px solid #e0e0e0;border-right:0}.rtl .wpulike-heart .count-box{margin-right:0;margin-left:inherit}.rtl #buddypress .activity-content .wpulike-heart .wp_ulike_btn{border-left:1px solid #d3d3d3;border-right:0}.rtl #buddypress .activity-content .wpulike-heart .wp_ulike_btn.wp_ulike_put_image{border-left:1px solid #e0e0e0;border-right:0}.rtl #buddypress .activity-content .wpulike-heart wp_ulike_is_loading .wp_ulike_btn{border-left:1px solid #e0e0e0;border-right:0}.rtl #bbpress-forums .wpulike-heart .wp_ulike_btn{border-left:1px solid #d3d3d3;border-right:0}.rtl #bbpress-forums .wpulike-heart .wp_ulike_btn.wp_ulike_put_image{border-left:1px solid #e0e0e0;border-right:0}.rtl #bbpress-forums .wpulike-heart wp_ulike_is_loading .wp_ulike_btn{border-left:1px solid #e0e0e0;border-right:0}.rtl .wpulike-robeen .count-box{right:inherit;left:8px}.rtl .commentlist .tiles .avatar{left:inherit!important;right:0!important}.rtl .wp_ulike_thumbnail{margin:0 0 0 10px}.rtl .most_liked_comment .avatar{margin:0 0 0 10px}.rtl .wp_ulike_style_love .wp_counter_span{float:left;background:#f1f1f1 url(../img/icons/heart.png) no-repeat scroll 85% center;margin:2px 2px 0 0;padding:0 23px 0 5px}.rtl .wpulike-notification{left:20px;right:inherit}.rtl .wpulike-notification .wpulike-message{padding:15px 55px 15px 15px;background-position:right 15px center}@media all and (max-width:240px){.rtl .wpulike-notification .wpulike-message{padding:8px 55px 8px 8px}}@media all and (min-width:241px) and (max-width:480px){.rtl .wpulike-notification .wpulike-message{padding:8px 55px 8px 8px}}@media all and (min-width:481px) and (max-width:768px){.rtl .wpulike-notification .wpulike-message{padding:15px 55px 15px 15px}}
1
  /*!
2
  ===============================================================
3
+ * WP ULike
4
  * @author Alimir [https://wordpress.org/plugins/wp-ulike/]
5
  ===============================================================
6
+ */.wpulike{display:block;position:relative;line-height:normal;margin:0;padding:10px 0}.wpulike .wp_ulike_btn{margin:0;position:relative;display:inline-block;border-radius:.25em;font-size:14px;line-height:28px;box-shadow:none;cursor:pointer;padding:0 15px;vertical-align:middle;height:28px;min-width:50px;font-weight:600}.wpulike .wp_ulike_btn:hover{text-decoration:none;border-color:#95a5a6;box-shadow:none}.wpulike .wp_ulike_is_loading .wp_ulike_btn{background-image:url(../img/svg/loader.svg);background-repeat:no-repeat;background-position:center center}.wpulike .wp_ulike_is_loading .wp_ulike_btn span{visibility:hidden}.wpulike .wp_ulike_is_loading .wp_ulike_btn.wp_ulike_put_image:after{content:none}.wp_ulike_click_is_disabled{pointer-events:none;cursor:default}.wp_ulike_hide_me{visibility:hidden}.wpulike-default .wp_ulike_btn{color:#616161;background:#e0e0e0}.wpulike-default .wp_ulike_is_liked .wp_ulike_btn{color:#757575}.wpulike-default .wp_ulike_put_image:after{content:'';display:block;background:url(../img/svg/like.svg) no-repeat;background-size:contain;width:16px;height:16px;position:absolute;left:50%;top:50%;transform:translateX(-50%) translateY(-50%)}.wpulike-default .wp_ulike_put_image.image-unlike:after{filter:invert(44%) sepia(40%) saturate(3852%) hue-rotate(329deg) brightness(100%) contrast(111%)}.wpulike-default .count-box{position:relative;border-radius:.25em;font-size:12px;text-decoration:none;background-color:#fff;margin-left:8px;line-height:28px;display:inline-block;padding:0 8px;box-shadow:0 0 0 1px #bdbdbd inset;color:#616161;min-width:30px;vertical-align:middle;text-align:center}.wpulike-default .count-box:before{content:'';position:absolute;border:1px solid transparent;background:#fff;border-bottom-color:#bdbdbd;left:-5px;top:50%;border-left-color:#bdbdbd;transform:rotate(45deg) translatey(-50%);width:5px;height:5px;margin:0}#buddypress #activity-stream .activity-comments .wpulike,#buddypress #activity-stream .activity-meta .wpulike{display:inline-block;vertical-align:middle;padding:0}#buddypress #activity-stream .activity-comments .wpulike .wp_ulike_btn span,#buddypress #activity-stream .activity-meta .wpulike .wp_ulike_btn span{position:relative;top:50%;left:50%;transform:translateX(-50%) translateY(-50%);display:block}#buddypress #activity-stream .activity-comments .wpulike-default .wp_ulike_btn,#buddypress #activity-stream .activity-meta .wpulike-default .wp_ulike_btn{border-radius:0;background-color:#fff;box-shadow:0 0 0 1px #bdbdbd inset;height:29.5px;min-width:50px;margin-bottom:2px}#buddypress #activity-stream .wp_ulike_likers_wrapper li{border:none;padding:0}#buddypress #activity-stream .wp_ulike_likers_wrapper li a,#buddypress #activity-stream .wp_ulike_likers_wrapper li img{float:none;padding:0;margin:0}#bbpress-forums .bbp-reply-content .wpulike .wp_ulike_is_loading .wp_ulike_btn{background-image:url(../img/svg/loader.svg);background-repeat:no-repeat;background-position:center center}#bbpress-forums .wpulike-default .wp_ulike_btn{margin:0;position:relative;display:inline-block;border-radius:.25em;font-size:14px;line-height:28px;box-shadow:none;cursor:pointer;padding:0 15px;vertical-align:middle;height:28px;min-width:50px;font-weight:600;color:#616161;background:#e0e0e0}#bbpress-forums .wp_ulike_likers_wrapper ul{margin:0!important}.wpulike-heart .wp_ulike_general_class{display:inline-block;box-shadow:0 0 0 1px #bdbdbd inset;border-radius:.25em;padding:5px}.wpulike-heart .wp_ulike_btn{padding:0 5px;text-transform:uppercase;font-weight:600;color:#757575;min-width:30px}.wpulike-heart .wp_ulike_likers_wrapper{bottom:10px}.wpulike-heart .wp_ulike_put_image:after{content:'';display:block;background:url(../img/svg/love.svg) no-repeat;background-size:contain;width:20px;height:20px;position:absolute;left:50%;top:50%;transform:translateX(-50%) translateY(-50%)}.wpulike-heart .wp_ulike_put_image.image-unlike:after{filter:invert(44%) sepia(40%) saturate(3852%) hue-rotate(329deg) brightness(100%) contrast(111%)}.wpulike-heart .count-box{font-size:14px;text-decoration:none;line-height:28px;display:inline-block;color:#616161;min-width:30px;text-align:center;font-weight:600;vertical-align:middle;padding:0 5px}#buddypress #activity-stream .activity-meta .wpulike-heart .wp_ulike_general_class{border-radius:0;padding:1px 5px;margin-bottom:2px}#buddypress #activity-stream .activity-meta .wpulike-heart .count-box{min-width:20px}#bbpress-forums .bbp-reply-content .wpulike-heart .wp_ulike_btn{padding:5px 15px}@keyframes animateCircle{40%{transform:scale(10);opacity:1;fill:#dd4688}55%{transform:scale(11);opacity:1;fill:#d46abf}65%{transform:scale(12);opacity:1;fill:#cc8ef5}75%{transform:scale(13);opacity:1;fill:transparent;stroke:#cc8ef5;stroke-width:.5}85%{transform:scale(17);opacity:1;fill:transparent;stroke:#cc8ef5;stroke-width:.2}95%{transform:scale(18);opacity:1;fill:transparent;stroke:#cc8ef5;stroke-width:.1}100%{transform:scale(19);opacity:1;fill:transparent;stroke:#cc8ef5;stroke-width:0}}@keyframes animateHeart{0%{transform:scale(.2)}40%{transform:scale(1.2)}100%{transform:scale(1)}}@keyframes animateHeartOut{0%{transform:scale(1.4)}100%{transform:scale(1)}}.wpulike-robeen .wp_ulike_likers_wrapper{bottom:15px}.wpulike-robeen .count-box{display:inline-block;vertical-align:middle;font-weight:600}.wpulike-robeen label{display:inline-block;margin:0}.wpulike-robeen svg{cursor:pointer;overflow:visible!important;width:50px;display:inline-block;vertical-align:middle}.wpulike-robeen svg .heart{transform-origin:center;animation:animateHeartOut .3s linear forwards}.wpulike-robeen svg .main-circ{transform-origin:29.5px 29.5px}.wpulike-robeen .wp_ulike_btn{display:none!important}.wpulike-robeen .wp_ulike_btn:checked+svg .heart{transform:scale(.2);fill:#e2264d;animation:animateHeart .3s linear forwards .25s}.wpulike-robeen .wp_ulike_btn:checked+svg .main-circ{transition:all 2s;animation:animateCircle .3s linear forwards;opacity:1}.wpulike-robeen .wp_ulike_btn:checked+svg .grp1{opacity:1;transition:.1s all .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp1 .oval1{transform:scale(0) translate(0,-30px);transform-origin:0 0 0;transition:.5s transform .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp1 .oval2{transform:scale(0) translate(10px,-50px);transform-origin:0 0 0;transition:1.5s transform .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp2{opacity:1;transition:.1s all .3s;opacity:1;transition:.1s opacity .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp2 .oval1{transform:scale(0) translate(30px,-15px);transform-origin:0 0 0;transition:.5s transform .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp2 .oval2{transform:scale(0) translate(60px,-15px);transform-origin:0 0 0;transition:1.5s transform .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp3{opacity:1;transition:.1s all .3s;opacity:1;transition:.1s opacity .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp3 .oval1{transform:scale(0) translate(30px,0);transform-origin:0 0 0;transition:.5s transform .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp3 .oval2{transform:scale(0) translate(60px,10px);transform-origin:0 0 0;transition:1.5s transform .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp4{opacity:1;transition:.1s all .3s;opacity:1;transition:.1s opacity .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp4 .oval1{transform:scale(0) translate(30px,15px);transform-origin:0 0 0;transition:.5s transform .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp4 .oval2{transform:scale(0) translate(40px,50px);transform-origin:0 0 0;transition:1.5s transform .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp5{opacity:1;transition:.1s all .3s;opacity:1;transition:.1s opacity .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp5 .oval1{transform:scale(0) translate(-10px,20px);transform-origin:0 0 0;transition:.5s transform .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp5 .oval2{transform:scale(0) translate(-60px,30px);transform-origin:0 0 0;transition:1.5s transform .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp6{opacity:1;transition:.1s all .3s;opacity:1;transition:.1s opacity .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp6 .oval1{transform:scale(0) translate(-30px,0);transform-origin:0 0 0;transition:.5s transform .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp6 .oval2{transform:scale(0) translate(-60px,-5px);transform-origin:0 0 0;transition:1.5s transform .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp7{opacity:1;transition:.1s all .3s;opacity:1;transition:.1s opacity .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp7 .oval1{transform:scale(0) translate(-30px,-15px);transform-origin:0 0 0;transition:.5s transform .3s}.wpulike-robeen .wp_ulike_btn:checked+svg .grp7 .oval2{transform:scale(0) translate(-55px,-30px);transform-origin:0 0 0;transition:1.5s transform .3s}.wp_ulike_likers_wrapper{transition:all .5s cubic-bezier(.19,1,.22,1);display:block;position:absolute;left:0;transform:translateY(-30px);bottom:0;background:#eee;padding:5px;opacity:0;box-shadow:2px 2px 1px rgba(0,0,0,.1);border-radius:5px;z-index:9}.wp_ulike_likers_wrapper:empty{display:none}.wp_ulike_likers_wrapper .tiles{display:table;border-spacing:8px;margin:0;padding:0}.wp_ulike_likers_wrapper .tiles li{display:table-cell;padding:0}.wp_ulike_likers_wrapper .tiles li a>img{border-radius:5px;transition:opacity 1.5s cubic-bezier(.19,1,.22,1);display:block;border:0;opacity:0;box-shadow:none}.wp_ulike_likers_wrapper:after{content:'';position:absolute;top:100%;left:15px;width:0;height:0;border-top:8px solid #eee;border-right:8px solid transparent;border-left:8px solid transparent}.wpulike:hover .wp_ulike_likers_wrapper{transform:translateY(-50px);opacity:1}.wpulike:hover .wp_ulike_likers_wrapper .tiles a>img{opacity:1}.most_liked_users{list-style-type:none!important;position:relative!important;margin:10px 0!important;padding:0!important}.most_liked_users li{display:inline-table!important;cursor:pointer!important;margin:0 2px!important}.most_liked_users li img{display:block!important;float:none!important}.most_liked_users li.inactive{visibility:hidden!important;opacity:0!important}.commentlist .tiles .avatar{left:0!important}.wp_ulike_thumbnail{vertical-align:middle;margin:0 10px 0 0}.most_liked_comment .avatar{vertical-align:middle;margin:0 10px 0 0}.wp_ulike_style_simple .wp_counter_span:before{content:"("}.wp_ulike_style_simple .wp_counter_span:after{content:")"}.wp_ulike_style_love .wp_counter_span{float:right;display:inline-block;background:#f1f1f1 url(../img/icons/heart.png) 5px center no-repeat;color:#333;font-size:9px;line-height:17px;font-weight:400;margin:2px 0 0 2px;vertical-align:middle;border-radius:10px;padding:0 5px 0 23px;z-index:26}.wpulike-notification{position:fixed;z-index:999999;pointer-events:none;right:20px;bottom:20px}.wpulike-notification *{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.wpulike-notification .wpulike-message{position:relative;pointer-events:auto;word-wrap:break-word;overflow:hidden;margin:0 0 6px;padding:15px 15px 15px 55px;width:280px;border-radius:3px;background-color:#00bcd4;color:#fff;animation:wpUlikeNotifitcationsAnimation .2s backwards;box-shadow:0 3px 5px rgba(0,0,0,.08);font-size:14px;font-weight:500}.wpulike-notification .wpulike-message:hover{opacity:.9;cursor:pointer}.wpulike-notification .wpulike-message:before{content:"";background-position:center center;background-repeat:no-repeat;background-image:url(../img/svg/info.svg);position:absolute;left:0;width:45px;top:0;height:100%;background-color:rgba(0,0,0,.08)}.wpulike-notification .wpulike-message.wpulike-success{background-color:#8bc34a}.wpulike-notification .wpulike-message.wpulike-success:before{background-image:url(../img/svg/success.svg)}.wpulike-notification .wpulike-message.wpulike-error{background-color:#ef5350}.wpulike-notification .wpulike-message.wpulike-error:before{background-image:url(../img/svg/error.svg)}.wpulike-notification .wpulike-message.wpulike-warning{background-color:#ffab00}.wpulike-notification .wpulike-message.wpulike-warning:before{background-image:url(../img/svg/warning.svg)}@keyframes wpUlikeNotifitcationsAnimation{from{opacity:0;transform:translateY(100%)}to{opacity:.8;transform:translateY(0)}}@media all and (max-width:240px){.wpulike-notification .wpulike-message{padding:8px 8px 8px 55px;width:11em}}@media all and (min-width:241px) and (max-width:480px){.wpulike-notification .wpulike-message{padding:8px 8px 8px 55px;width:18em}}@media all and (min-width:481px) and (max-width:768px){.wpulike-notification .wpulike-message{padding:15px 15px 15px 55px;width:25em}}/*!>>>>>>>>>>>>>>>>>>>>>>> #RTL <<<<<<<<<<<<<<<<<<<<<<<<<<< */.rtl .wpulike-default .count-box{margin-right:8px;margin-left:inherit}.rtl .wpulike-default .count-box:before{right:-1px;left:auto;border-color:#bdbdbd #bdbdbd transparent transparent}.rtl .wp_ulike_likers_wrapper{left:auto;right:0}.rtl .wp_ulike_likers_wrapper:after{left:auto;right:15px}.rtl .commentlist .tiles .avatar{left:inherit!important;right:0!important}.rtl .wp_ulike_thumbnail{margin:0 0 0 10px}.rtl .most_liked_comment .avatar{margin:0 0 0 10px}.rtl .wp_ulike_style_love .wp_counter_span{float:left;background:#f1f1f1 url(../img/icons/heart.png) no-repeat scroll 85% center;margin:2px 2px 0 0;padding:0 23px 0 5px}.rtl .wpulike-notification{left:20px;right:inherit}.rtl .wpulike-notification .wpulike-message{padding:15px 55px 15px 15px}.rtl .wpulike-notification .wpulike-message:before{left:auto;right:0}@media all and (max-width:240px){.rtl .wpulike-notification .wpulike-message{padding:8px 55px 8px 8px}}@media all and (min-width:241px) and (max-width:480px){.rtl .wpulike-notification .wpulike-message{padding:8px 55px 8px 8px}}@media all and (min-width:481px) and (max-width:768px){.rtl .wpulike-notification .wpulike-message{padding:15px 55px 15px 15px}}
assets/img/svg/like.svg ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="14px" height="14px" fill="#757575" x="0px" y="0px"
5
+ viewBox="0 0 215.34 215.34" style="enable-background:new 0 0 215.34 215.34;" xml:space="preserve">
6
+ <path d="M7.67,93.896h52.077V215.34H7.67V93.896z M207.67,106.682c-7.189-7.189-14.382-14.379-21.572-21.57h-41.451l9.877-25.102
7
+ l2.801-7.119l-0.258-2.049L151,2.33L121.115,0L110.15,37.822L80.954,85.176V215.34h107.89L207.67,106.682z"/>
8
+ <g>
9
+ </g>
10
+ <g>
11
+ </g>
12
+ <g>
13
+ </g>
14
+ <g>
15
+ </g>
16
+ <g>
17
+ </g>
18
+ <g>
19
+ </g>
20
+ <g>
21
+ </g>
22
+ <g>
23
+ </g>
24
+ <g>
25
+ </g>
26
+ <g>
27
+ </g>
28
+ <g>
29
+ </g>
30
+ <g>
31
+ </g>
32
+ <g>
33
+ </g>
34
+ <g>
35
+ </g>
36
+ <g>
37
+ </g>
38
+ </svg>
assets/img/svg/loader.svg ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="loader-1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ width="20px" height="20px" viewBox="0 0 40 40" enable-background="new 0 0 40 40" xml:space="preserve">
5
+ <path opacity="0.2" fill="#000" d="M20.201,5.169c-8.254,0-14.946,6.692-14.946,14.946c0,8.255,6.692,14.946,14.946,14.946
6
+ s14.946-6.691,14.946-14.946C35.146,11.861,28.455,5.169,20.201,5.169z M20.201,31.749c-6.425,0-11.634-5.208-11.634-11.634
7
+ c0-6.425,5.209-11.634,11.634-11.634c6.425,0,11.633,5.209,11.633,11.634C31.834,26.541,26.626,31.749,20.201,31.749z"/>
8
+ <path fill="#000" d="M26.013,10.047l1.654-2.866c-2.198-1.272-4.743-2.012-7.466-2.012h0v3.312h0
9
+ C22.32,8.481,24.301,9.057,26.013,10.047z">
10
+ <animateTransform attributeType="xml"
11
+ attributeName="transform"
12
+ type="rotate"
13
+ from="0 20 20"
14
+ to="360 20 20"
15
+ dur="0.5s"
16
+ repeatCount="indefinite"/>
17
+ </path>
18
+ </svg>
assets/img/svg/love.svg ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 32 32" width="20px" height="20px" fill="#757575" xml:space="preserve" aria-hidden="false">
5
+ <path d="M17.4 29c-.8.8-2 .8-2.8 0l-12.3-12.8c-3.1-3.1-3.1-8.2 0-11.4 3.1-3.1 8.2-3.1 11.3 0l2.4 2.8 2.3-2.8c3.1-3.1 8.2-3.1 11.3 0 3.1 3.1 3.1 8.2 0 11.4l-12.2 12.8z"></path>
6
+ </svg>
assets/js/wp-ulike.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! WP ULike - v3.3.1
2
  * https://wpulike.com
3
  * Alimir 2018;
4
  */
@@ -227,11 +227,11 @@
227
 
228
  _actions: function( messageType, messageText, btnText, likeStatus ){
229
  //check the button types
230
- if( wp_ulike_params.button_type === 'image' ) {
231
  if( likeStatus === 3 || likeStatus === 2){
232
  this.buttonElement.toggleClass('image-unlike');
233
  }
234
- } else if( wp_ulike_params.button_type === 'text' ) {
235
  this.buttonElement.find('span').html(btnText);
236
  }
237
 
1
+ /*! WP ULike - v3.4
2
  * https://wpulike.com
3
  * Alimir 2018;
4
  */
227
 
228
  _actions: function( messageType, messageText, btnText, likeStatus ){
229
  //check the button types
230
+ if( this.buttonElement.hasClass('wp_ulike_put_image') ) {
231
  if( likeStatus === 3 || likeStatus === 2){
232
  this.buttonElement.toggleClass('image-unlike');
233
  }
234
+ } else if( this.buttonElement.hasClass('wp_ulike_put_text') ) {
235
  this.buttonElement.find('span').html(btnText);
236
  }
237
 
assets/js/wp-ulike.min.js CHANGED
@@ -1 +1 @@
1
- !function(e,t,i,s){"use strict";var n="WordpressUlikeNotifications",a={messageType:"success",messageText:"Hello World!",messageElement:"wpulike-message",notifContainer:"wpulike-notification"};function l(t,i){this.element=t,this.$element=e(t),this.settings=e.extend({},a,i),this._defaults=a,this._name=n,this.init()}e.extend(l.prototype,{init:function(){this._message(),this._container(),this._append(),this._remove()},_message:function(){this.$messageElement=e("<div/>").addClass(this.settings.messageElement+" wpulike-"+this.settings.messageType).text(this.settings.messageText)},_container:function(){e("."+this.settings.notifContainer).length||this.$element.append(e("<div/>").addClass(this.settings.notifContainer)),this.$notifContainer=this.$element.find("."+this.settings.notifContainer)},_append:function(){this.$notifContainer.append(this.$messageElement).trigger("WordpressUlikeNotificationAppend")},_remove:function(){var t=this;this.$messageElement.click(function(){e(this).fadeOut(300,function(){e(this).remove(),e("."+t.settings.messageElement).length||t.$notifContainer.remove()}).trigger("WordpressUlikeRemoveNotification")}),setTimeout(function(){t.$messageElement.fadeOut(300,function(){e(this).remove(),e("."+t.settings.messageElement).length||t.$notifContainer.remove()}).trigger("WordpressUlikeRemoveNotification")},8e3)}}),e.fn[n]=function(e){return this.each(function(){new l(this,e)})}}(jQuery,window,document),function(e,t,i,s){"use strict";var n="WordpressUlike",a=(e(t),e(i)),l={ID:0,nonce:0,type:"",likeStatus:0,counterSelector:".count-box",generalSelector:".wp_ulike_general_class",buttonSelector:".wp_ulike_btn",likersSelector:".wp_ulike_likers_wrapper"},o={"ulike-id":"ID","ulike-nonce":"nonce","ulike-type":"type","ulike-status":"likeStatus"};function r(t,i){for(var a in this.element=t,this.$element=e(t),this.settings=e.extend({},l,i),this._defaults=l,this._name=n,this.buttonElement=this.$element.find(this.settings.buttonSelector),this.likersElement=this.$element.find(this.settings.likersSelector),this.generalElement=this.$element.find(this.settings.generalSelector),this.counterElement=this.generalElement.find(this.settings.counterSelector),o){var r=this.buttonElement.data(a);r!==s&&(this.settings[o[a]]=r)}this.init()}e.extend(r.prototype,{init:function(){this.buttonElement.click(this._ajaxify.bind(this))},_ajaxify:function(){e.ajax({type:"POST",cache:!1,dataType:"json",url:wp_ulike_params.ajax_url,data:{action:"wp_ulike_process",id:this.settings.ID,nonce:this.settings.nonce,status:this.settings.likeStatus,type:this.settings.type},beforeSend:function(){a.trigger("WordpressUlikeLoading"),this.generalElement.addClass("wp_ulike_is_loading")}.bind(this),success:function(e){this.generalElement.removeClass("wp_ulike_is_loading"),e.success?this._update(e):this._notif("error",e.data),a.trigger("WordpressUlikeUpdated")}.bind(this)})},_update:function(e){switch(this.settings.likeStatus){case 1:this.buttonElement.attr("data-ulike-status",4),this.settings.likeStatus=4,this.generalElement.addClass("wp_ulike_is_liked").removeClass("wp_ulike_is_not_liked"),this.generalElement.children().first().addClass("wp_ulike_click_is_disabled"),this.counterElement.text(e.data.data),this._actions("success",e.data.message,e.data.btnText,4);break;case 2:this.buttonElement.attr("data-ulike-status",3),this.settings.likeStatus=3,this.generalElement.addClass("wp_ulike_is_unliked").removeClass("wp_ulike_is_liked"),this.counterElement.text(e.data.data),this._actions("error",e.data.message,e.data.btnText,3);break;case 3:this.buttonElement.attr("data-ulike-status",2),this.settings.likeStatus=2,this.generalElement.addClass("wp_ulike_is_liked").removeClass("wp_ulike_is_unliked"),this.counterElement.text(e.data.data),this._actions("success",e.data.message,e.data.btnText,2);break;case 4:this._actions("info",e.data.message,e.data.btnText,4),this.generalElement.children().first().addClass("wp_ulike_click_is_disabled");break;default:this._actions("warning",e.data.message,e.data.btnText,0)}!1!==e.data.likers&&this._likers(e.data.likers)},_actions:function(e,t,i,s){"image"===wp_ulike_params.button_type?3!==s&&2!==s||this.buttonElement.toggleClass("image-unlike"):"text"===wp_ulike_params.button_type&&this.buttonElement.find("span").html(i),this._notif(e,t)},_likers:function(e){""!==e?this.likersElement.html(e):this.likersElement.empty()},_notif:function(t,s){"1"===wp_ulike_params.notifications&&e(i.body).WordpressUlikeNotifications({messageType:t,messageText:s})}}),e.fn[n]=function(t){return this.each(function(){e.data(this,"plugin_"+n)||e.data(this,"plugin_"+n,new r(this,t))})}}(jQuery,window,document),function(e){e(function(){e(this).bind("DOMNodeInserted",function(t){e(".wpulike").WordpressUlike()})}),e(".wpulike").WordpressUlike(),e("p").filter(function(){return""==this.innerHTML}).remove()}(jQuery);
1
+ !function(t,e,i,s){"use strict";var n="WordpressUlikeNotifications",a={messageType:"success",messageText:"Hello World!",messageElement:"wpulike-message",notifContainer:"wpulike-notification"};function l(e,i){this.element=e,this.$element=t(e),this.settings=t.extend({},a,i),this._defaults=a,this._name=n,this.init()}t.extend(l.prototype,{init:function(){this._message(),this._container(),this._append(),this._remove()},_message:function(){this.$messageElement=t("<div/>").addClass(this.settings.messageElement+" wpulike-"+this.settings.messageType).text(this.settings.messageText)},_container:function(){t("."+this.settings.notifContainer).length||this.$element.append(t("<div/>").addClass(this.settings.notifContainer)),this.$notifContainer=this.$element.find("."+this.settings.notifContainer)},_append:function(){this.$notifContainer.append(this.$messageElement).trigger("WordpressUlikeNotificationAppend")},_remove:function(){var e=this;this.$messageElement.click(function(){t(this).fadeOut(300,function(){t(this).remove(),t("."+e.settings.messageElement).length||e.$notifContainer.remove()}).trigger("WordpressUlikeRemoveNotification")}),setTimeout(function(){e.$messageElement.fadeOut(300,function(){t(this).remove(),t("."+e.settings.messageElement).length||e.$notifContainer.remove()}).trigger("WordpressUlikeRemoveNotification")},8e3)}}),t.fn[n]=function(t){return this.each(function(){new l(this,t)})}}(jQuery,window,document),function(t,e,i,s){"use strict";var n="WordpressUlike",a=(t(e),t(i)),l={ID:0,nonce:0,type:"",likeStatus:0,counterSelector:".count-box",generalSelector:".wp_ulike_general_class",buttonSelector:".wp_ulike_btn",likersSelector:".wp_ulike_likers_wrapper"},o={"ulike-id":"ID","ulike-nonce":"nonce","ulike-type":"type","ulike-status":"likeStatus"};function r(e,i){for(var a in this.element=e,this.$element=t(e),this.settings=t.extend({},l,i),this._defaults=l,this._name=n,this.buttonElement=this.$element.find(this.settings.buttonSelector),this.likersElement=this.$element.find(this.settings.likersSelector),this.generalElement=this.$element.find(this.settings.generalSelector),this.counterElement=this.generalElement.find(this.settings.counterSelector),o){var r=this.buttonElement.data(a);r!==s&&(this.settings[o[a]]=r)}this.init()}t.extend(r.prototype,{init:function(){this.buttonElement.click(this._ajaxify.bind(this))},_ajaxify:function(){t.ajax({type:"POST",cache:!1,dataType:"json",url:wp_ulike_params.ajax_url,data:{action:"wp_ulike_process",id:this.settings.ID,nonce:this.settings.nonce,status:this.settings.likeStatus,type:this.settings.type},beforeSend:function(){a.trigger("WordpressUlikeLoading"),this.generalElement.addClass("wp_ulike_is_loading")}.bind(this),success:function(t){this.generalElement.removeClass("wp_ulike_is_loading"),t.success?this._update(t):this._notif("error",t.data),a.trigger("WordpressUlikeUpdated")}.bind(this)})},_update:function(t){switch(this.settings.likeStatus){case 1:this.buttonElement.attr("data-ulike-status",4),this.settings.likeStatus=4,this.generalElement.addClass("wp_ulike_is_liked").removeClass("wp_ulike_is_not_liked"),this.generalElement.children().first().addClass("wp_ulike_click_is_disabled"),this.counterElement.text(t.data.data),this._actions("success",t.data.message,t.data.btnText,4);break;case 2:this.buttonElement.attr("data-ulike-status",3),this.settings.likeStatus=3,this.generalElement.addClass("wp_ulike_is_unliked").removeClass("wp_ulike_is_liked"),this.counterElement.text(t.data.data),this._actions("error",t.data.message,t.data.btnText,3);break;case 3:this.buttonElement.attr("data-ulike-status",2),this.settings.likeStatus=2,this.generalElement.addClass("wp_ulike_is_liked").removeClass("wp_ulike_is_unliked"),this.counterElement.text(t.data.data),this._actions("success",t.data.message,t.data.btnText,2);break;case 4:this._actions("info",t.data.message,t.data.btnText,4),this.generalElement.children().first().addClass("wp_ulike_click_is_disabled");break;default:this._actions("warning",t.data.message,t.data.btnText,0)}!1!==t.data.likers&&this._likers(t.data.likers)},_actions:function(t,e,i,s){this.buttonElement.hasClass("wp_ulike_put_image")?3!==s&&2!==s||this.buttonElement.toggleClass("image-unlike"):this.buttonElement.hasClass("wp_ulike_put_text")&&this.buttonElement.find("span").html(i),this._notif(t,e)},_likers:function(t){""!==t?this.likersElement.html(t):this.likersElement.empty()},_notif:function(e,s){"1"===wp_ulike_params.notifications&&t(i.body).WordpressUlikeNotifications({messageType:e,messageText:s})}}),t.fn[n]=function(e){return this.each(function(){t.data(this,"plugin_"+n)||t.data(this,"plugin_"+n,new r(this,e))})}}(jQuery,window,document),function(t){t(function(){t(this).bind("DOMNodeInserted",function(e){t(".wpulike").WordpressUlike()})}),t(".wpulike").WordpressUlike(),t("p").filter(function(){return""==this.innerHTML}).remove()}(jQuery);
inc/classes/class-wp-ulike.php CHANGED
@@ -11,7 +11,7 @@ if ( ! class_exists( 'wp_ulike' ) ) {
11
 
12
  class wp_ulike{
13
 
14
- private $wpdb, $status;
15
 
16
  /**
17
  * Instance of this class.
@@ -25,12 +25,26 @@ if ( ! class_exists( 'wp_ulike' ) ) {
25
  */
26
  public function __construct()
27
  {
28
- global $wpdb;
29
- $this->wpdb = $wpdb;
30
- $this->status = 'like';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
 
32
  // Enqueue Scripts
33
- add_action( 'wp_enqueue_scripts', array( $this, 'load_assets' ) );
34
  }
35
 
36
  /**
@@ -46,15 +60,14 @@ if ( ! class_exists( 'wp_ulike' ) ) {
46
  return;
47
  }
48
  //Add wp_ulike script file with special functions.
49
- wp_enqueue_script( 'wp_ulike', WP_ULIKE_ASSETS_URL . '/js/wp-ulike.min.js', array( 'jquery' ), '3.3.1', true);
50
 
51
  //localize script
52
  wp_localize_script( 'wp_ulike', 'wp_ulike_params', array(
53
  'ajax_url' => admin_url( 'admin-ajax.php' ),
54
- 'button_type' => wp_ulike_get_setting( 'wp_ulike_general', 'button_type'),
55
  'notifications' => wp_ulike_get_setting( 'wp_ulike_general', 'notifications')
56
  ));
57
- wp_enqueue_style( 'wp-ulike', WP_ULIKE_ASSETS_URL . '/css/wp-ulike.min.css' );
58
 
59
  //add your custom style from setting panel.
60
  wp_add_inline_style( 'wp-ulike', wp_ulike_get_custom_style() );
@@ -71,6 +84,7 @@ if ( ! class_exists( 'wp_ulike' ) ) {
71
  public function wp_get_ulike( array $data ){
72
  //get loggin method option
73
  $loggin_method = wp_ulike_get_setting( $data['setting'], 'logging_method');
 
74
  //Select the logging functionality
75
  switch( $loggin_method ){
76
  case 'do_not_log':
@@ -114,10 +128,11 @@ if ( ! class_exists( 'wp_ulike' ) ) {
114
  array(
115
  $column => $id,
116
  'date_time' => current_time( 'mysql' ),
117
- 'ip' => $user_ip,
118
- 'user_id' => $user_id,
119
  'status' => $this->status
120
- )
 
121
  );
122
  // Formatting the output
123
  $output = wp_ulike_format_number( $this->update_meta_data( $id, $key, $get_like ) );
@@ -126,7 +141,7 @@ if ( ! class_exists( 'wp_ulike' ) ) {
126
  array(
127
  'id' => $id,
128
  'key' => $key,
129
- 'user_id' => $user_id,
130
  'status' => $this->status,
131
  'has_log' => $this->has_log( $data )
132
  )
@@ -174,10 +189,11 @@ if ( ! class_exists( 'wp_ulike' ) ) {
174
  array(
175
  $column => $id,
176
  'date_time' => current_time( 'mysql' ),
177
- 'ip' => $user_ip,
178
- 'user_id' => $user_id,
179
  'status' => $this->status
180
- )
 
181
  );
182
 
183
  }
@@ -188,7 +204,7 @@ if ( ! class_exists( 'wp_ulike' ) ) {
188
  array(
189
  'id' => $id,
190
  'key' => $key,
191
- 'user_id' => $user_id,
192
  'status' => $this->status,
193
  'has_log' => $this->has_log( $data )
194
  )
@@ -214,7 +230,7 @@ if ( ! class_exists( 'wp_ulike' ) ) {
214
  // Check the user's likes history
215
  $output = '';
216
  // method column value
217
- $method_val = $method_col === 'ip' ? $user_ip : $user_id;
218
  // Check user log history
219
  $has_log = $this->get_user_status( $table, $column, $method_col, $id, $method_val );
220
 
@@ -245,10 +261,11 @@ if ( ! class_exists( 'wp_ulike' ) ) {
245
  array(
246
  $column => $id,
247
  'date_time' => current_time( 'mysql' ),
248
- 'ip' => $user_ip,
249
- 'user_id' => $user_id,
250
  'status' => $this->status
251
- )
 
252
  );
253
 
254
  } else {
@@ -278,7 +295,7 @@ if ( ! class_exists( 'wp_ulike' ) ) {
278
  array(
279
  'id' => $id,
280
  'key' => $key,
281
- 'user_id' => $user_id,
282
  'status' => $this->status,
283
  'has_log' => empty( $has_log ) ? 0 : 1
284
  )
@@ -338,13 +355,12 @@ if ( ! class_exists( 'wp_ulike' ) ) {
338
  */
339
  public function get_template( array $args, $status ){
340
 
341
- $button_type = wp_ulike_get_setting( 'wp_ulike_general', 'button_type' );
342
  //Primary button class name
343
  $button_class_name = str_replace( ".", "", apply_filters( 'wp_ulike_button_selector', 'wp_ulike_btn' ) );
344
  //Button text value
345
  $button_text = '';
346
 
347
- if( $button_type == 'image' ){
348
  $button_class_name .= ' wp_ulike_put_image';
349
  if($status == 2){
350
  $button_class_name .= ' image-unlike';
@@ -389,7 +405,7 @@ if ( ! class_exists( 'wp_ulike' ) ) {
389
  "attributes" => $args['attributes'],
390
  "microdata" => $args['microdata'],
391
  "style" => $args['style'],
392
- "button_type" => $button_type,
393
  "button_text" => $button_text,
394
  "general_class" => $general_class_name,
395
  "button_class" => $button_class_name,
@@ -409,7 +425,7 @@ if ( ! class_exists( 'wp_ulike' ) ) {
409
  }
410
  }
411
 
412
- return apply_filters( 'wp_ulike_return_final_templates', trim( preg_replace( '/\s+/',' ', $output ) ), $wp_ulike_template );
413
 
414
  }
415
 
@@ -522,7 +538,7 @@ if ( ! class_exists( 'wp_ulike' ) ) {
522
  SELECT COUNT(*)
523
  FROM ".$this->wpdb->prefix.$table."
524
  WHERE $column = '$id'
525
- AND ( user_id = '$user_id' OR ip = '$user_ip' )
526
  " );
527
  }
528
 
@@ -540,7 +556,7 @@ if ( ! class_exists( 'wp_ulike' ) ) {
540
  return $this->wpdb->get_results( "
541
  SELECT $col, date_time
542
  FROM ".$this->wpdb->prefix.$table."
543
- WHERE user_id = '$user_id'
544
  AND status = 'like'
545
  ORDER BY date_time
546
  DESC
@@ -606,11 +622,10 @@ if ( ! class_exists( 'wp_ulike' ) ) {
606
  * @since 2.0
607
  * @return String
608
  */
609
- function get_reutrn_id(){
610
- global $user_ID,$wp_user_IP;
611
 
612
- if( ! is_user_logged_in() ){
613
- return ip2long($wp_user_IP);
614
  } else {
615
  return $user_ID;
616
  }
11
 
12
  class wp_ulike{
13
 
14
+ private $wpdb, $status, $user_id, $user_ip;
15
 
16
  /**
17
  * Instance of this class.
25
  */
26
  public function __construct()
27
  {
28
+ // Init core
29
+ add_action( 'wp_ulike_loaded', array( $this, 'init' ) );
30
+ }
31
+
32
+ /**
33
+ * Init function when plugin loaded
34
+ *
35
+ * @author Alimir
36
+ * @since 3.0
37
+ * @return Void
38
+ */
39
+ public function init(){
40
+ global $wpdb, $wp_user_IP;
41
+ $this->wpdb = $wpdb;
42
+ $this->status = 'like';
43
+ $this->user_ip = $wp_user_IP;
44
+ $this->user_id = $this->get_reutrn_id();
45
 
46
  // Enqueue Scripts
47
+ add_action( 'wp_enqueue_scripts', array( $this, 'load_assets' ) );
48
  }
49
 
50
  /**
60
  return;
61
  }
62
  //Add wp_ulike script file with special functions.
63
+ wp_enqueue_script( 'wp_ulike', WP_ULIKE_ASSETS_URL . '/js/wp-ulike.min.js', array( 'jquery' ), '3.4', true);
64
 
65
  //localize script
66
  wp_localize_script( 'wp_ulike', 'wp_ulike_params', array(
67
  'ajax_url' => admin_url( 'admin-ajax.php' ),
 
68
  'notifications' => wp_ulike_get_setting( 'wp_ulike_general', 'notifications')
69
  ));
70
+ wp_enqueue_style( 'wp-ulike', WP_ULIKE_ASSETS_URL . '/css/wp-ulike.min.css', array(), '3.4' );
71
 
72
  //add your custom style from setting panel.
73
  wp_add_inline_style( 'wp-ulike', wp_ulike_get_custom_style() );
84
  public function wp_get_ulike( array $data ){
85
  //get loggin method option
86
  $loggin_method = wp_ulike_get_setting( $data['setting'], 'logging_method');
87
+
88
  //Select the logging functionality
89
  switch( $loggin_method ){
90
  case 'do_not_log':
128
  array(
129
  $column => $id,
130
  'date_time' => current_time( 'mysql' ),
131
+ 'ip' => $this->user_ip,
132
+ 'user_id' => $this->user_id,
133
  'status' => $this->status
134
+ ),
135
+ array( '%d', '%s', '%s', '%s', '%s' )
136
  );
137
  // Formatting the output
138
  $output = wp_ulike_format_number( $this->update_meta_data( $id, $key, $get_like ) );
141
  array(
142
  'id' => $id,
143
  'key' => $key,
144
+ 'user_id' => $this->user_id,
145
  'status' => $this->status,
146
  'has_log' => $this->has_log( $data )
147
  )
189
  array(
190
  $column => $id,
191
  'date_time' => current_time( 'mysql' ),
192
+ 'ip' => $this->user_ip,
193
+ 'user_id' => $this->user_id,
194
  'status' => $this->status
195
+ ),
196
+ array( '%d', '%s', '%s', '%s', '%s' )
197
  );
198
 
199
  }
204
  array(
205
  'id' => $id,
206
  'key' => $key,
207
+ 'user_id' => $this->user_id,
208
  'status' => $this->status,
209
  'has_log' => $this->has_log( $data )
210
  )
230
  // Check the user's likes history
231
  $output = '';
232
  // method column value
233
+ $method_val = $method_col === 'ip' ? $this->user_ip : $this->user_id;
234
  // Check user log history
235
  $has_log = $this->get_user_status( $table, $column, $method_col, $id, $method_val );
236
 
261
  array(
262
  $column => $id,
263
  'date_time' => current_time( 'mysql' ),
264
+ 'ip' => $this->user_ip,
265
+ 'user_id' => $this->user_id,
266
  'status' => $this->status
267
+ ),
268
+ array( '%d', '%s', '%s', '%s', '%s' )
269
  );
270
 
271
  } else {
295
  array(
296
  'id' => $id,
297
  'key' => $key,
298
+ 'user_id' => $this->user_id,
299
  'status' => $this->status,
300
  'has_log' => empty( $has_log ) ? 0 : 1
301
  )
355
  */
356
  public function get_template( array $args, $status ){
357
 
 
358
  //Primary button class name
359
  $button_class_name = str_replace( ".", "", apply_filters( 'wp_ulike_button_selector', 'wp_ulike_btn' ) );
360
  //Button text value
361
  $button_text = '';
362
 
363
+ if( $args['button_type'] == 'image' ){
364
  $button_class_name .= ' wp_ulike_put_image';
365
  if($status == 2){
366
  $button_class_name .= ' image-unlike';
405
  "attributes" => $args['attributes'],
406
  "microdata" => $args['microdata'],
407
  "style" => $args['style'],
408
+ "button_type" => $args['button_type'],
409
  "button_text" => $button_text,
410
  "general_class" => $general_class_name,
411
  "button_class" => $button_class_name,
425
  }
426
  }
427
 
428
+ return apply_filters( 'wp_ulike_return_final_templates', preg_replace( '~>\s*\n\s*<~', '><', $output ), $wp_ulike_template );
429
 
430
  }
431
 
538
  SELECT COUNT(*)
539
  FROM ".$this->wpdb->prefix.$table."
540
  WHERE $column = '$id'
541
+ AND ( user_id = ".$this->user_id." OR ip = ".$this->user_ip." )
542
  " );
543
  }
544
 
556
  return $this->wpdb->get_results( "
557
  SELECT $col, date_time
558
  FROM ".$this->wpdb->prefix.$table."
559
+ WHERE user_id = ".$this->user_id."
560
  AND status = 'like'
561
  ORDER BY date_time
562
  DESC
622
  * @since 2.0
623
  * @return String
624
  */
625
+ public function get_reutrn_id(){
 
626
 
627
+ if( ! ( $user_ID = get_current_user_id() ) ){
628
+ return wp_ulike_generate_user_id( $this->user_ip );
629
  } else {
630
  return $user_ID;
631
  }
inc/frontend-ajax.php CHANGED
@@ -20,7 +20,7 @@
20
  */
21
  function wp_ulike_process(){
22
  // Global variables
23
- global $wp_ulike_class,$wp_user_IP;
24
 
25
  $post_ID = $_POST['id'];
26
  $post_type = $_POST['type'];
@@ -74,12 +74,9 @@ function wp_ulike_process(){
74
  }
75
 
76
  $get_like = $get_meta_data != '' ? $get_meta_data : 0;
77
- $return_userID = $wp_ulike_class->get_reutrn_id();
78
 
79
  $args = apply_filters( 'wp_ulike_ajax_process_atts', array(
80
  "id" => $post_ID, //Post ID
81
- "user_id" => $return_userID, //User ID (if the user is guest, we save ip as user_id with "ip2long" function)
82
- "user_ip" => $wp_user_IP, //User IP
83
  "get_like" => $get_like, //Number Of Likes
84
  "method" => $post_type, //JavaScript method
85
  "setting" => $setting_key, //Setting Key
@@ -94,36 +91,36 @@ function wp_ulike_process(){
94
  switch ( $like_status ){
95
  case 0:
96
  $response = array(
97
- 'message' => wp_ulike_get_setting( 'wp_ulike_general', 'login_text' ),
98
- 'btnText' => html_entity_decode( wp_ulike_get_setting( 'wp_ulike_general', 'button_text' ) ),
99
  'data' => NULL
100
  );
101
  break;
102
  case 1:
103
  $response = array(
104
- 'message' => wp_ulike_get_setting( 'wp_ulike_general', 'like_notice' ),
105
- 'btnText' => html_entity_decode(wp_ulike_get_setting( 'wp_ulike_general', 'button_text' ) ),
106
  'data' => apply_filters( 'wp_ulike_respond_for_not_liked_data', $wp_ulike_class->wp_get_ulike( $args ), $post_ID )
107
  );
108
  break;
109
  case 2:
110
  $response = array(
111
- 'message' => wp_ulike_get_setting( 'wp_ulike_general', 'unlike_notice' ),
112
- 'btnText' => html_entity_decode( wp_ulike_get_setting( 'wp_ulike_general', 'button_text' ) ),
113
  'data' => apply_filters( 'wp_ulike_respond_for_unliked_data', $wp_ulike_class->wp_get_ulike( $args ), $post_ID )
114
  );
115
  break;
116
  case 3:
117
  $response = array(
118
- 'message' => wp_ulike_get_setting( 'wp_ulike_general', 'like_notice'),
119
- 'btnText' => html_entity_decode(wp_ulike_get_setting( 'wp_ulike_general', 'button_text_u' ) ),
120
  'data' => apply_filters( 'wp_ulike_respond_for_liked_data', $wp_ulike_class->wp_get_ulike( $args ), $post_ID )
121
  );
122
  break;
123
  default:
124
  $response = array(
125
- 'message' => wp_ulike_get_setting( 'wp_ulike_general', 'permission_text' ),
126
- 'btnText' => html_entity_decode( wp_ulike_get_setting( 'wp_ulike_general', 'button_text' ) ),
127
  'data' => NULL
128
  );
129
  }
20
  */
21
  function wp_ulike_process(){
22
  // Global variables
23
+ global $wp_ulike_class;
24
 
25
  $post_ID = $_POST['id'];
26
  $post_type = $_POST['type'];
74
  }
75
 
76
  $get_like = $get_meta_data != '' ? $get_meta_data : 0;
 
77
 
78
  $args = apply_filters( 'wp_ulike_ajax_process_atts', array(
79
  "id" => $post_ID, //Post ID
 
 
80
  "get_like" => $get_like, //Number Of Likes
81
  "method" => $post_type, //JavaScript method
82
  "setting" => $setting_key, //Setting Key
91
  switch ( $like_status ){
92
  case 0:
93
  $response = array(
94
+ 'message' => wp_ulike_get_setting( 'wp_ulike_general', 'login_text', __( 'You Should Login To Submit Your Like', WP_ULIKE_SLUG ) ),
95
+ 'btnText' => html_entity_decode( wp_ulike_get_setting( 'wp_ulike_general', 'button_text', __( 'Like', WP_ULIKE_SLUG ) ) ),
96
  'data' => NULL
97
  );
98
  break;
99
  case 1:
100
  $response = array(
101
+ 'message' => wp_ulike_get_setting( 'wp_ulike_general', 'like_notice', __( 'Thanks! You Liked This.', WP_ULIKE_SLUG ) ),
102
+ 'btnText' => html_entity_decode( wp_ulike_get_setting( 'wp_ulike_general', 'button_text', __( 'Like', WP_ULIKE_SLUG ) ) ),
103
  'data' => apply_filters( 'wp_ulike_respond_for_not_liked_data', $wp_ulike_class->wp_get_ulike( $args ), $post_ID )
104
  );
105
  break;
106
  case 2:
107
  $response = array(
108
+ 'message' => wp_ulike_get_setting( 'wp_ulike_general', 'unlike_notice', __( 'Sorry! You unliked this.', WP_ULIKE_SLUG ) ),
109
+ 'btnText' => html_entity_decode( wp_ulike_get_setting( 'wp_ulike_general', 'button_text', __( 'Like', WP_ULIKE_SLUG ) ) ),
110
  'data' => apply_filters( 'wp_ulike_respond_for_unliked_data', $wp_ulike_class->wp_get_ulike( $args ), $post_ID )
111
  );
112
  break;
113
  case 3:
114
  $response = array(
115
+ 'message' => wp_ulike_get_setting( 'wp_ulike_general', 'like_notice', __( 'Thanks! You Liked This.', WP_ULIKE_SLUG ) ),
116
+ 'btnText' => html_entity_decode(wp_ulike_get_setting( 'wp_ulike_general', 'button_text_u', __( 'Liked', WP_ULIKE_SLUG ) ) ),
117
  'data' => apply_filters( 'wp_ulike_respond_for_liked_data', $wp_ulike_class->wp_get_ulike( $args ), $post_ID )
118
  );
119
  break;
120
  default:
121
  $response = array(
122
+ 'message' => wp_ulike_get_setting( 'wp_ulike_general', 'permission_text', __( 'You have not permission to unlike', WP_ULIKE_SLUG ) ),
123
+ 'btnText' => html_entity_decode( wp_ulike_get_setting( 'wp_ulike_general', 'button_text', __( 'Liked', WP_ULIKE_SLUG ) ) ),
124
  'data' => NULL
125
  );
126
  }
inc/general-functions.php CHANGED
@@ -152,7 +152,7 @@ if( ! function_exists( 'wp_ulike_get_options_info' ) ){
152
  'button_type' => array(
153
  'type' => 'visual-select',
154
  'label' => __( 'Button Type', WP_ULIKE_SLUG),
155
- 'default' => 'text',
156
  'options' => array(
157
  'image' => array(
158
  'name' => __('Icon', WP_ULIKE_SLUG),
@@ -169,7 +169,7 @@ if( ! function_exists( 'wp_ulike_get_options_info' ) ){
169
  'label' => __( 'Button Text', WP_ULIKE_SLUG) . ' (' . __('Like', WP_ULIKE_SLUG) .')',
170
  ),
171
  'button_text_u' => array(
172
- 'default' => __('Unlike',WP_ULIKE_SLUG),
173
  'label' => __( 'Button Text', WP_ULIKE_SLUG) . ' (' . __('Unlike', WP_ULIKE_SLUG) .')',
174
  ),
175
  'button_url' => array(
@@ -233,7 +233,7 @@ if( ! function_exists( 'wp_ulike_get_options_info' ) ){
233
  ),
234
  'anonymise' => array(
235
  'type' => 'checkbox',
236
- 'default' => 1,
237
  'label' => __('Anonymize IP', WP_ULIKE_SLUG),
238
  'checkboxlabel' => __('Activate', WP_ULIKE_SLUG),
239
  'description' => __('Anonymize the IP address for GDPR Compliance', WP_ULIKE_SLUG)
@@ -718,21 +718,19 @@ if( ! function_exists( 'wp_ulike_get_options_info' ) ){
718
  if( ! function_exists( 'wp_ulike' ) ){
719
  function wp_ulike( $type = 'get', $args = array() ) {
720
  //global variables
721
- global $post, $wp_ulike_class, $wp_user_IP;
722
 
723
  $post_ID = isset( $args['id'] ) ? $args['id'] : $post->ID;
724
  $get_post_meta = get_post_meta( $post_ID, '_liked', true );
725
  $get_like = empty( $get_post_meta ) ? 0 : $get_post_meta;
726
- $return_userID = $wp_ulike_class->get_reutrn_id();
727
  $attributes = apply_filters( 'wp_ulike_posts_add_attr', null );
728
  $microdata = apply_filters( 'wp_ulike_posts_microdata', null );
729
- $style = wp_ulike_get_setting( 'wp_ulike_posts', 'theme' );
 
730
 
731
  //Main data
732
  $defaults = array(
733
  "id" => $post_ID, //Post ID
734
- "user_id" => $return_userID, //User ID (if the user is guest, we save ip as user_id with "ip2long" function)
735
- "user_ip" => $wp_user_IP, //User IP
736
  "get_like" => $get_like, //Number Of Likes
737
  "method" => 'likeThis', //JavaScript method
738
  "setting" => 'wp_ulike_posts', //Setting Key
@@ -745,28 +743,20 @@ if( ! function_exists( 'wp_ulike' ) ){
745
  "style" => $style, //Get Default Theme
746
  "microdata" => $microdata, //Get Microdata Filter
747
  "attributes" => $attributes, //Get Attributes Filter
748
- "wrapper_class" => '' //Extra Wrapper class
 
749
  );
750
 
751
- $parsed_args = wp_parse_args( $args, $defaults );
752
-
753
- if( ( wp_ulike_get_setting( 'wp_ulike_posts', 'only_registered_users') != '1' ) or ( wp_ulike_get_setting( 'wp_ulike_posts', 'only_registered_users' ) == '1' && is_user_logged_in() ) ) {
754
-
755
- if ($type == 'put') {
756
- return $wp_ulike_class->wp_get_ulike( $parsed_args );
757
- }
758
- else {
759
- echo $wp_ulike_class->wp_get_ulike( $parsed_args );
760
- }
761
 
762
- }//end !only_registered_users condition
763
- elseif ( wp_ulike_get_setting( 'wp_ulike_posts', 'only_registered_users') == '1' && ! is_user_logged_in() ) {
764
- if(wp_ulike_get_setting( 'wp_ulike_general', 'login_type') == "button") {
765
- return $wp_ulike_class->get_template( $parsed_args, 0 );
766
- } else {
767
- return apply_filters('wp_ulike_login_alert_template', '<p class="alert alert-info fade in" role="alert">'.__('You need to login in order to like this post: ',WP_ULIKE_SLUG).'<a href="'.wp_login_url( get_permalink() ).'"> '.__('click here',WP_ULIKE_SLUG).' </a></p>');
768
- }
769
- }//end only_registered_users condition
770
  }
771
  }
772
 
@@ -914,22 +904,18 @@ if( ! function_exists( 'wp_ulike_get_rating_value' ) ){
914
  */
915
  if( ! function_exists( 'wp_ulike_comments' ) ){
916
  function wp_ulike_comments( $type = 'get', $args = array() ) {
917
- //global variables
918
- global $wp_ulike_class, $wp_user_IP;
919
 
920
  $comment_ID = isset( $args['id'] ) ? $args['id'] : get_comment_ID();
921
  $comment_meta = get_comment_meta( $comment_ID, '_commentliked', true );
922
  $get_like = empty( $comment_meta ) ? 0 : $comment_meta;
923
- $return_userID = $wp_ulike_class->get_reutrn_id();
924
  $attributes = apply_filters( 'wp_ulike_comments_add_attr', null );
925
  $microdata = apply_filters( 'wp_ulike_comments_microdata', null );
926
- $style = wp_ulike_get_setting( 'wp_ulike_comments', 'theme' );
 
927
 
928
  //Main Data
929
  $defaults = array(
930
  "id" => $comment_ID, //Comment ID
931
- "user_id" => $return_userID, //User ID (if the user is guest, we save ip as user_id with "ip2long" function)
932
- "user_ip" => $wp_user_IP, //User IP
933
  "get_like" => $get_like, //Number Of Likes
934
  "method" => 'likeThisComment', //JavaScript method
935
  "setting" => 'wp_ulike_comments', //Setting Key
@@ -942,28 +928,20 @@ if( ! function_exists( 'wp_ulike_comments' ) ){
942
  "style" => $style, //Get Default Theme
943
  "microdata" => $microdata, //Get Microdata Filter
944
  "attributes" => $attributes, //Get Attributes Filter
945
- "wrapper_class" => '' //Extra Wrapper class
 
946
  );
947
 
948
  $parsed_args = wp_parse_args( $args, $defaults );
 
 
 
 
 
 
 
 
949
 
950
- if( ( wp_ulike_get_setting( 'wp_ulike_comments', 'only_registered_users' ) != '1' ) or ( wp_ulike_get_setting( 'wp_ulike_comments', 'only_registered_users' ) == '1' && is_user_logged_in() ) ) {
951
-
952
- if ($type == 'put') {
953
- return $wp_ulike_class->wp_get_ulike( $parsed_args );
954
- }
955
- else {
956
- echo $wp_ulike_class->wp_get_ulike( $parsed_args );
957
- }
958
-
959
- }//end !only_registered_users condition
960
- elseif (wp_ulike_get_setting( 'wp_ulike_comments', 'only_registered_users') == '1' && ! is_user_logged_in()){
961
- if( wp_ulike_get_setting( 'wp_ulike_general', 'login_type' ) == "button" ){
962
- return $wp_ulike_class->get_template( $parsed_args, 0 );
963
- } else {
964
- return apply_filters( 'wp_ulike_login_alert_template', '<p class="alert alert-info fade in" role="alert">'.__('You need to login in order to like this comment: ',WP_ULIKE_SLUG).'<a href="'.wp_login_url( get_permalink() ).'"> '.__('click here',WP_ULIKE_SLUG).' </a></p>' );
965
- }
966
- }//end only_registered_users condition
967
  }
968
  }
969
 
@@ -997,8 +975,6 @@ if( ! function_exists( 'wp_ulike_get_comment_likes' ) ){
997
  */
998
  if( ! function_exists( 'wp_ulike_buddypress' ) ){
999
  function wp_ulike_buddypress( $type = 'get', $args = array() ) {
1000
- //global variables
1001
- global $wp_ulike_class, $wp_user_IP;
1002
 
1003
  if ( bp_get_activity_comment_id() != null ){
1004
  $activityID = isset( $args['id'] ) ? $args['id'] : bp_get_activity_comment_id();
@@ -1008,16 +984,14 @@ if( ! function_exists( 'wp_ulike_buddypress' ) ){
1008
 
1009
  $bp_get_meta = bp_activity_get_meta($activityID, '_activityliked');
1010
  $get_like = empty( $bp_get_meta ) ? 0 : $bp_get_meta;
1011
- $return_userID = $wp_ulike_class->get_reutrn_id();
1012
  $attributes = apply_filters( 'wp_ulike_activities_add_attr', null );
1013
  $microdata = apply_filters( 'wp_ulike_activities_microdata', null );
1014
- $style = wp_ulike_get_setting( 'wp_ulike_buddypress', 'theme' );
 
1015
 
1016
  //Main Data
1017
  $defaults = array(
1018
  "id" => $activityID, //Activity ID
1019
- "user_id" => $return_userID, //User ID (if the user is guest, we save ip as user_id with "ip2long" function)
1020
- "user_ip" => $wp_user_IP, //User IP
1021
  "get_like" => $get_like, //Number Of Likes
1022
  "method" => 'likeThisActivity', //JavaScript method
1023
  "setting" => 'wp_ulike_buddypress', //Setting Key
@@ -1030,29 +1004,19 @@ if( ! function_exists( 'wp_ulike_buddypress' ) ){
1030
  "style" => $style, //Get Default Theme
1031
  "microdata" => $microdata, //Get Microdata Filter
1032
  "attributes" => $attributes, //Get Attributes Filter
1033
- "wrapper_class" => '' //Extra Wrapper class
 
1034
  );
1035
 
1036
  $parsed_args = wp_parse_args( $args, $defaults );
1037
-
1038
- if( ( wp_ulike_get_setting( 'wp_ulike_buddypress', 'only_registered_users') != '1' ) or ( wp_ulike_get_setting( 'wp_ulike_buddypress', 'only_registered_users' ) == '1' && is_user_logged_in() ) ) {
1039
-
1040
- if ($type == 'put') {
1041
- return $wp_ulike_class->wp_get_ulike( $parsed_args );
1042
- }
1043
- else {
1044
- echo $wp_ulike_class->wp_get_ulike( $parsed_args );
1045
- }
1046
-
1047
- }//end !only_registered_users condition
1048
- elseif ( wp_ulike_get_setting( 'wp_ulike_buddypress', 'only_registered_users') == '1' && ! is_user_logged_in() ) {
1049
- if( wp_ulike_get_setting( 'wp_ulike_general', 'login_type') == "button" ){
1050
- return $wp_ulike_class->get_template( $parsed_args, 0 );
1051
- }
1052
- else{
1053
- return apply_filters('wp_ulike_login_alert_template', '<p class="alert alert-info fade in" role="alert">'.__('You need to login in order to like this activity: ',WP_ULIKE_SLUG).'<a href="'.wp_login_url( get_permalink() ).'"> '.__('click here',WP_ULIKE_SLUG).' </a></p>');
1054
- }
1055
- }//end only_registered_users condition
1056
 
1057
  }
1058
  }
@@ -1129,7 +1093,7 @@ if( ! function_exists( 'wp_ulike_bbp_format_buddypress_notifications' ) ) {
1129
  if( ! function_exists( 'wp_ulike_bbpress' ) ){
1130
  function wp_ulike_bbpress( $type = 'get', $args = array() ) {
1131
  //global variables
1132
- global $post,$wp_ulike_class,$wp_user_IP;
1133
 
1134
  //Thanks to @Yehonal for this commit
1135
  $replyID = bbp_get_reply_id();
@@ -1138,60 +1102,79 @@ if( ! function_exists( 'wp_ulike_bbpress' ) ){
1138
 
1139
  $get_post_meta = get_post_meta( $post_ID, '_topicliked', true );
1140
  $get_like = empty( $get_post_meta ) ? 0 : $get_post_meta;
1141
- $return_userID = $wp_ulike_class->get_reutrn_id();
1142
  $attributes = apply_filters( 'wp_ulike_topics_add_attr', null );
1143
  $microdata = apply_filters( 'wp_ulike_topics_microdata', null );
1144
- $style = wp_ulike_get_setting( 'wp_ulike_bbpress', 'theme' );
 
1145
 
1146
  //Main Data
1147
  $defaults = array(
1148
  "id" => $post_ID, //Post ID
1149
- "user_id" => $return_userID, //User ID (if the user is guest, we save ip as user_id with "ip2long" function)
1150
- "user_ip" => $wp_user_IP, //User IP
1151
  "get_like" => $get_like, //Number Of Likes
1152
- "method" => 'likeThisTopic', //JavaScript method
1153
  "setting" => 'wp_ulike_bbpress', //Setting Key
1154
  "type" => 'post', //Function type (post/process)
1155
  "table" => 'ulike_forums', //posts table
1156
  "column" => 'topic_id', //ulike table column name
1157
  "key" => '_topicliked', //meta key
1158
  "cookie" => 'topic-liked-', //Cookie Name
1159
- "slug" => 'topic', //Slug Name
1160
  "style" => $style, //Get Default Theme
1161
  "microdata" => $microdata, //Get Microdata Filter
1162
  "attributes" => $attributes, //Get Attributes Filter
1163
- "wrapper_class" => '' //Extra Wrapper class
 
1164
  );
1165
 
1166
  $parsed_args = wp_parse_args( $args, $defaults );
 
 
 
 
 
 
 
 
1167
 
1168
- if( ( wp_ulike_get_setting( 'wp_ulike_bbpress', 'only_registered_users' ) != '1' ) or ( wp_ulike_get_setting( 'wp_ulike_bbpress', 'only_registered_users' ) == '1' && is_user_logged_in() ) ) {
 
1169
 
1170
- if ($type == 'put') {
1171
- return $wp_ulike_class->wp_get_ulike( $parsed_args );
1172
- }
1173
- else {
1174
- echo $wp_ulike_class->wp_get_ulike( $parsed_args );
1175
- }
1176
 
1177
- }//end !only_registered_users condition
 
 
 
 
 
 
 
 
 
 
 
1178
 
1179
- else if ( wp_ulike_get_setting( 'wp_ulike_bbpress', 'only_registered_users' ) == '1' && !is_user_logged_in()) {
1180
- if( wp_ulike_get_setting( 'wp_ulike_general', 'login_type') ){
 
 
 
1181
  return $wp_ulike_class->get_template( $parsed_args, 0 );
 
 
 
 
 
 
 
 
1182
  }
1183
- else {
1184
- return apply_filters('wp_ulike_login_alert_template', '<p class="alert alert-info fade in" role="alert">'.__('You need to login in order to like this post: ',WP_ULIKE_SLUG).'<a href="'.wp_login_url( get_permalink() ).'"> '.__('click here',WP_ULIKE_SLUG).' </a></p>');
1185
- }
1186
- }//end only_registered_users condition
1187
-
1188
  }
1189
  }
1190
 
1191
- /*******************************************************
1192
- General
1193
- *******************************************************/
1194
-
1195
  /**
1196
  * Get custom style setting from customize options
1197
  *
@@ -1204,12 +1187,12 @@ if( ! function_exists( 'wp_ulike_get_custom_style' ) ){
1204
 
1205
  // Like Icon
1206
  if( $get_like_icon = wp_get_attachment_url( wp_ulike_get_setting( 'wp_ulike_general', 'button_url' ) ) ) {
1207
- $return_style .= '.wp_ulike_btn.wp_ulike_put_image { background-image: url('.$get_like_icon.') !important; }';
1208
  }
1209
 
1210
  // Unlike Icon
1211
  if( $get_like_icon = wp_get_attachment_url( wp_ulike_get_setting( 'wp_ulike_general', 'button_url_u' ) ) ) {
1212
- $return_style .= '.wp_ulike_btn.wp_ulike_put_image.image-unlike { background-image: url('.$get_like_icon.') !important; }';
1213
  }
1214
 
1215
  if( wp_ulike_get_setting( 'wp_ulike_customize', 'custom_style' ) ) {
@@ -1225,10 +1208,10 @@ if( ! function_exists( 'wp_ulike_get_custom_style' ) ){
1225
  $btn_style .= "background-color:".$customstyle['btn_bg'].";";
1226
  }
1227
  if( isset( $customstyle['btn_border'] ) && ! empty( $customstyle['btn_border'] ) ) {
1228
- $btn_style .= "border-color:".$customstyle['btn_border']."; ";
1229
  }
1230
  if( isset( $customstyle['btn_color'] ) && ! empty( $customstyle['btn_color'] ) ) {
1231
- $btn_style .= "color:".$customstyle['btn_color'].";text-shadow: 0px 1px 0px rgba(0, 0, 0, 0.3);";
1232
  }
1233
 
1234
  if( $btn_style != '' ){
@@ -1240,15 +1223,15 @@ if( ! function_exists( 'wp_ulike_get_custom_style' ) ){
1240
  $counter_style .= "background-color:".$customstyle['counter_bg'].";";
1241
  }
1242
  if( isset( $customstyle['counter_border'] ) && ! empty( $customstyle['counter_border'] ) ) {
1243
- $counter_style .= "border-color:".$customstyle['counter_border']."; ";
1244
- $before_style = "border-color:transparent; border-bottom-color:".$customstyle['counter_border']."; border-left-color:".$customstyle['counter_border'].";";
1245
  }
1246
  if( isset( $customstyle['counter_color'] ) && ! empty( $customstyle['counter_color'] ) ) {
1247
  $counter_style .= "color:".$customstyle['counter_color'].";";
1248
  }
1249
 
1250
  if( $counter_style != '' ){
1251
- $return_style .= '.wpulike-default .count-box,.wpulike-default .count-box:before{'.$counter_style.'}.wpulike-default .count-box:before{'.$before_style.'}';
1252
  }
1253
 
1254
  // Loading Spinner
@@ -1306,6 +1289,27 @@ if( ! function_exists( 'wp_ulike_date_i18n' ) ){
1306
  }
1307
  }
1308
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1309
 
1310
  /*******************************************************
1311
  Templates
@@ -1326,10 +1330,12 @@ if( ! function_exists( 'wp_ulike_set_default_template' ) ){
1326
  // Extract input array
1327
  extract( $wp_ulike_template );
1328
  ?>
1329
- <div id="wp-ulike-<?php echo $slug . '-' . $ID; ?>" class="wpulike wpulike-default <?php echo $wrapper_class; ?>" <?php echo $attributes; ?>>
1330
  <div class="<?php echo $general_class; ?>">
1331
- <a data-ulike-id="<?php echo $ID; ?>" data-ulike-nonce="<?php echo wp_create_nonce( $type . $ID ); ?>" data-ulike-type="<?php echo $type; ?>"
1332
- data-ulike-status="<?php echo $status; ?>" class="<?php echo $button_class; ?>">
 
 
1333
  <?php
1334
  if($button_type == 'text'){
1335
  echo '<span>' . $button_text . '</span>';
@@ -1365,10 +1371,12 @@ if( ! function_exists( 'wp_ulike_set_simple_heart_template' ) ){
1365
  // Extract input array
1366
  extract( $wp_ulike_template );
1367
  ?>
1368
- <div id="wp-ulike-<?php echo $slug . '-' . $ID; ?>" class="wpulike wpulike-heart <?php echo $wrapper_class; ?>" <?php echo $attributes; ?>>
1369
  <div class="<?php echo $general_class; ?>">
1370
- <a data-ulike-id="<?php echo $ID; ?>" data-ulike-nonce="<?php echo wp_create_nonce( $type . $ID ); ?>" data-ulike-type="<?php echo $type; ?>"
1371
- data-ulike-status="<?php echo $status; ?>" class="<?php echo $button_class; ?>">
 
 
1372
  <?php
1373
  if($button_type == 'text'){
1374
  echo '<span>' . $button_text . '</span>';
@@ -1404,12 +1412,51 @@ if( ! function_exists( 'wp_ulike_set_robeen_template' ) ){
1404
  // Extract input array
1405
  extract( $wp_ulike_template );
1406
  ?>
1407
- <div id="wp-ulike-<?php echo $slug . '-' . $ID; ?>" class="wpulike wpulike-robeen <?php echo $wrapper_class; ?>" <?php echo $attributes; ?>>
1408
  <div class="<?php echo $general_class; ?>">
1409
  <label>
1410
- <input type="checkbox" data-ulike-id="<?php echo $ID; ?>" data-ulike-nonce="<?php echo wp_create_nonce( $type . $ID ); ?>" data-ulike-type="<?php echo $type; ?>"
1411
- data-ulike-status="<?php echo $status; ?>" class="<?php echo $button_class; ?>" <?php echo $status == 2 ? 'checked="checked"' : ''; ?> />
1412
- <svg class="heart-svg" viewBox="467 392 58 57" xmlns="http://www.w3.org/2000/svg"><g class="Group" fill="none" fill-rule="evenodd" transform="translate(467 392)"><path d="M29.144 20.773c-.063-.13-4.227-8.67-11.44-2.59C7.63 28.795 28.94 43.256 29.143 43.394c.204-.138 21.513-14.6 11.44-25.213-7.214-6.08-11.377 2.46-11.44 2.59z" class="heart" fill="#AAB8C2"/><circle class="main-circ" fill="#E2264D" opacity="0" cx="29.5" cy="29.5" r="1.5"/><g class="grp7" opacity="0" transform="translate(7 6)"><circle class="oval1" fill="#9CD8C3" cx="2" cy="6" r="2"/><circle class="oval2" fill="#8CE8C3" cx="5" cy="2" r="2"/></g><g class="grp6" opacity="0" transform="translate(0 28)"><circle class="oval1" fill="#CC8EF5" cx="2" cy="7" r="2"/><circle class="oval2" fill="#91D2FA" cx="3" cy="2" r="2"/></g><g class="grp3" opacity="0" transform="translate(52 28)"><circle class="oval2" fill="#9CD8C3" cx="2" cy="7" r="2"/><circle class="oval1" fill="#8CE8C3" cx="4" cy="2" r="2"/></g><g class="grp2" opacity="0" transform="translate(44 6)" fill="#CC8EF5"><circle class="oval2" transform="matrix(-1 0 0 1 10 0)" cx="5" cy="6" r="2"/><circle class="oval1" transform="matrix(-1 0 0 1 4 0)" cx="2" cy="2" r="2"/></g><g class="grp5" opacity="0" transform="translate(14 50)" fill="#91D2FA"><circle class="oval1" transform="matrix(-1 0 0 1 12 0)" cx="6" cy="5" r="2"/><circle class="oval2" transform="matrix(-1 0 0 1 4 0)" cx="2" cy="2" r="2"/></g><g class="grp4" opacity="0" transform="translate(35 50)" fill="#F48EA7"><circle class="oval1" transform="matrix(-1 0 0 1 12 0)" cx="6" cy="5" r="2"/><circle class="oval2" transform="matrix(-1 0 0 1 4 0)" cx="2" cy="2" r="2"/></g><g class="grp1" opacity="0" transform="translate(24)" fill="#9FC7FA"><circle class="oval1" cx="2.5" cy="3" r="2"/><circle class="oval2" cx="7.5" cy="2" r="2"/></g></g></svg>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1413
  <?php echo $counter; ?>
1414
  </label>
1415
  </div>
152
  'button_type' => array(
153
  'type' => 'visual-select',
154
  'label' => __( 'Button Type', WP_ULIKE_SLUG),
155
+ 'default' => 'image',
156
  'options' => array(
157
  'image' => array(
158
  'name' => __('Icon', WP_ULIKE_SLUG),
169
  'label' => __( 'Button Text', WP_ULIKE_SLUG) . ' (' . __('Like', WP_ULIKE_SLUG) .')',
170
  ),
171
  'button_text_u' => array(
172
+ 'default' => __('Liked',WP_ULIKE_SLUG),
173
  'label' => __( 'Button Text', WP_ULIKE_SLUG) . ' (' . __('Unlike', WP_ULIKE_SLUG) .')',
174
  ),
175
  'button_url' => array(
233
  ),
234
  'anonymise' => array(
235
  'type' => 'checkbox',
236
+ 'default' => 0,
237
  'label' => __('Anonymize IP', WP_ULIKE_SLUG),
238
  'checkboxlabel' => __('Activate', WP_ULIKE_SLUG),
239
  'description' => __('Anonymize the IP address for GDPR Compliance', WP_ULIKE_SLUG)
718
  if( ! function_exists( 'wp_ulike' ) ){
719
  function wp_ulike( $type = 'get', $args = array() ) {
720
  //global variables
721
+ global $post;
722
 
723
  $post_ID = isset( $args['id'] ) ? $args['id'] : $post->ID;
724
  $get_post_meta = get_post_meta( $post_ID, '_liked', true );
725
  $get_like = empty( $get_post_meta ) ? 0 : $get_post_meta;
 
726
  $attributes = apply_filters( 'wp_ulike_posts_add_attr', null );
727
  $microdata = apply_filters( 'wp_ulike_posts_microdata', null );
728
+ $style = wp_ulike_get_setting( 'wp_ulike_posts', 'theme', 'wpulike-default' );
729
+ $button_type = wp_ulike_get_setting( 'wp_ulike_general', 'button_type', 'image' );
730
 
731
  //Main data
732
  $defaults = array(
733
  "id" => $post_ID, //Post ID
 
 
734
  "get_like" => $get_like, //Number Of Likes
735
  "method" => 'likeThis', //JavaScript method
736
  "setting" => 'wp_ulike_posts', //Setting Key
743
  "style" => $style, //Get Default Theme
744
  "microdata" => $microdata, //Get Microdata Filter
745
  "attributes" => $attributes, //Get Attributes Filter
746
+ "wrapper_class" => '', //Extra Wrapper class
747
+ "button_type" => $button_type //Button Type
748
  );
749
 
750
+ $parsed_args = wp_parse_args( $args, $defaults );
751
+ // Output templayte
752
+ $output = wp_ulike_display_button( $parsed_args, wp_ulike_get_setting( 'wp_ulike_posts', 'only_registered_users' ) );
753
+ // Select retrun or print
754
+ if( $type === 'put' ) {
755
+ return $output;
756
+ } else {
757
+ echo $output;
758
+ }
 
759
 
 
 
 
 
 
 
 
 
760
  }
761
  }
762
 
904
  */
905
  if( ! function_exists( 'wp_ulike_comments' ) ){
906
  function wp_ulike_comments( $type = 'get', $args = array() ) {
 
 
907
 
908
  $comment_ID = isset( $args['id'] ) ? $args['id'] : get_comment_ID();
909
  $comment_meta = get_comment_meta( $comment_ID, '_commentliked', true );
910
  $get_like = empty( $comment_meta ) ? 0 : $comment_meta;
 
911
  $attributes = apply_filters( 'wp_ulike_comments_add_attr', null );
912
  $microdata = apply_filters( 'wp_ulike_comments_microdata', null );
913
+ $style = wp_ulike_get_setting( 'wp_ulike_comments', 'theme', 'wpulike-default' );
914
+ $button_type = wp_ulike_get_setting( 'wp_ulike_general', 'button_type', 'image' );
915
 
916
  //Main Data
917
  $defaults = array(
918
  "id" => $comment_ID, //Comment ID
 
 
919
  "get_like" => $get_like, //Number Of Likes
920
  "method" => 'likeThisComment', //JavaScript method
921
  "setting" => 'wp_ulike_comments', //Setting Key
928
  "style" => $style, //Get Default Theme
929
  "microdata" => $microdata, //Get Microdata Filter
930
  "attributes" => $attributes, //Get Attributes Filter
931
+ "wrapper_class" => '', //Extra Wrapper class
932
+ "button_type" => $button_type //Button Type
933
  );
934
 
935
  $parsed_args = wp_parse_args( $args, $defaults );
936
+ // Output templayte
937
+ $output = wp_ulike_display_button( $parsed_args, wp_ulike_get_setting( 'wp_ulike_comments', 'only_registered_users' ) );
938
+ // Select retrun or print
939
+ if( $type === 'put' ) {
940
+ return $output;
941
+ } else {
942
+ echo $output;
943
+ }
944
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
945
  }
946
  }
947
 
975
  */
976
  if( ! function_exists( 'wp_ulike_buddypress' ) ){
977
  function wp_ulike_buddypress( $type = 'get', $args = array() ) {
 
 
978
 
979
  if ( bp_get_activity_comment_id() != null ){
980
  $activityID = isset( $args['id'] ) ? $args['id'] : bp_get_activity_comment_id();
984
 
985
  $bp_get_meta = bp_activity_get_meta($activityID, '_activityliked');
986
  $get_like = empty( $bp_get_meta ) ? 0 : $bp_get_meta;
 
987
  $attributes = apply_filters( 'wp_ulike_activities_add_attr', null );
988
  $microdata = apply_filters( 'wp_ulike_activities_microdata', null );
989
+ $style = wp_ulike_get_setting( 'wp_ulike_buddypress', 'theme', 'wpulike-default' );
990
+ $button_type = wp_ulike_get_setting( 'wp_ulike_general', 'button_type', 'image' );
991
 
992
  //Main Data
993
  $defaults = array(
994
  "id" => $activityID, //Activity ID
 
 
995
  "get_like" => $get_like, //Number Of Likes
996
  "method" => 'likeThisActivity', //JavaScript method
997
  "setting" => 'wp_ulike_buddypress', //Setting Key
1004
  "style" => $style, //Get Default Theme
1005
  "microdata" => $microdata, //Get Microdata Filter
1006
  "attributes" => $attributes, //Get Attributes Filter
1007
+ "wrapper_class" => '', //Extra Wrapper class
1008
+ "button_type" => $button_type //Button Type
1009
  );
1010
 
1011
  $parsed_args = wp_parse_args( $args, $defaults );
1012
+ // Output templayte
1013
+ $output = wp_ulike_display_button( $parsed_args, wp_ulike_get_setting( 'wp_ulike_buddypress', 'only_registered_users' ) );
1014
+ // Select retrun or print
1015
+ if( $type === 'put' ) {
1016
+ return $output;
1017
+ } else {
1018
+ echo $output;
1019
+ }
 
 
 
 
 
 
 
 
 
 
 
1020
 
1021
  }
1022
  }
1093
  if( ! function_exists( 'wp_ulike_bbpress' ) ){
1094
  function wp_ulike_bbpress( $type = 'get', $args = array() ) {
1095
  //global variables
1096
+ global $post;
1097
 
1098
  //Thanks to @Yehonal for this commit
1099
  $replyID = bbp_get_reply_id();
1102
 
1103
  $get_post_meta = get_post_meta( $post_ID, '_topicliked', true );
1104
  $get_like = empty( $get_post_meta ) ? 0 : $get_post_meta;
 
1105
  $attributes = apply_filters( 'wp_ulike_topics_add_attr', null );
1106
  $microdata = apply_filters( 'wp_ulike_topics_microdata', null );
1107
+ $style = wp_ulike_get_setting( 'wp_ulike_bbpress', 'theme', 'wpulike-default' );
1108
+ $button_type = wp_ulike_get_setting( 'wp_ulike_general', 'button_type', 'image' );
1109
 
1110
  //Main Data
1111
  $defaults = array(
1112
  "id" => $post_ID, //Post ID
 
 
1113
  "get_like" => $get_like, //Number Of Likes
1114
+ "method" => 'likeThisTopic', //JavaScript method
1115
  "setting" => 'wp_ulike_bbpress', //Setting Key
1116
  "type" => 'post', //Function type (post/process)
1117
  "table" => 'ulike_forums', //posts table
1118
  "column" => 'topic_id', //ulike table column name
1119
  "key" => '_topicliked', //meta key
1120
  "cookie" => 'topic-liked-', //Cookie Name
1121
+ "slug" => 'topic', //Slug Name
1122
  "style" => $style, //Get Default Theme
1123
  "microdata" => $microdata, //Get Microdata Filter
1124
  "attributes" => $attributes, //Get Attributes Filter
1125
+ "wrapper_class" => '', //Extra Wrapper class
1126
+ "button_type" => $button_type, //Button Type
1127
  );
1128
 
1129
  $parsed_args = wp_parse_args( $args, $defaults );
1130
+ // Output templayte
1131
+ $output = wp_ulike_display_button( $parsed_args, wp_ulike_get_setting( 'wp_ulike_bbpress', 'only_registered_users' ) );
1132
+ // Select retrun or print
1133
+ if( $type === 'put' ) {
1134
+ return $output;
1135
+ } else {
1136
+ echo $output;
1137
+ }
1138
 
1139
+ }
1140
+ }
1141
 
1142
+ /*******************************************************
1143
+ General
1144
+ *******************************************************/
 
 
 
1145
 
1146
+ /**
1147
+ * Convert numbers of Likes with string (kilobyte) format
1148
+ *
1149
+ * @author Alimir
1150
+ * @param Array $parsed_args
1151
+ * @param Integer $only_registered_users
1152
+ * @since 3.4
1153
+ * @return String
1154
+ */
1155
+ if( ! function_exists( 'wp_ulike_display_button' ) ){
1156
+ function wp_ulike_display_button( array $parsed_args, $only_registered_users ){
1157
+ global $wp_ulike_class;
1158
 
1159
+ if( $only_registered_users != '1' || ( $only_registered_users == '1' && is_user_logged_in() ) ) {
1160
+ // Return ulike template
1161
+ return $wp_ulike_class->wp_get_ulike( $parsed_args );
1162
+ } else {
1163
+ if( wp_ulike_get_setting( 'wp_ulike_general', 'login_type') === 'button' ){
1164
  return $wp_ulike_class->get_template( $parsed_args, 0 );
1165
+ } else {
1166
+ return apply_filters( 'wp_ulike_login_alert_template',
1167
+ sprintf( '<p class="alert alert-info fade in" role="alert">%s<a href="%s">%s</a></p>',
1168
+ __('You need to login in order to like this post: ',WP_ULIKE_SLUG),
1169
+ wp_login_url( get_permalink() ),
1170
+ __('click here',WP_ULIKE_SLUG)
1171
+ )
1172
+ );
1173
  }
1174
+ }
 
 
 
 
1175
  }
1176
  }
1177
 
 
 
 
 
1178
  /**
1179
  * Get custom style setting from customize options
1180
  *
1187
 
1188
  // Like Icon
1189
  if( $get_like_icon = wp_get_attachment_url( wp_ulike_get_setting( 'wp_ulike_general', 'button_url' ) ) ) {
1190
+ $return_style .= '.wp_ulike_btn.wp_ulike_put_image:after { background-image: url('.$get_like_icon.') !important; }';
1191
  }
1192
 
1193
  // Unlike Icon
1194
  if( $get_like_icon = wp_get_attachment_url( wp_ulike_get_setting( 'wp_ulike_general', 'button_url_u' ) ) ) {
1195
+ $return_style .= '.wp_ulike_btn.wp_ulike_put_image.image-unlike:after { background-image: url('.$get_like_icon.') !important; filter: none; }';
1196
  }
1197
 
1198
  if( wp_ulike_get_setting( 'wp_ulike_customize', 'custom_style' ) ) {
1208
  $btn_style .= "background-color:".$customstyle['btn_bg'].";";
1209
  }
1210
  if( isset( $customstyle['btn_border'] ) && ! empty( $customstyle['btn_border'] ) ) {
1211
+ $btn_style .= "box-shadow: 0 0 0 1px ".$customstyle['btn_border']." inset; ";
1212
  }
1213
  if( isset( $customstyle['btn_color'] ) && ! empty( $customstyle['btn_color'] ) ) {
1214
+ $btn_style .= "color:".$customstyle['btn_color'].";";
1215
  }
1216
 
1217
  if( $btn_style != '' ){
1223
  $counter_style .= "background-color:".$customstyle['counter_bg'].";";
1224
  }
1225
  if( isset( $customstyle['counter_border'] ) && ! empty( $customstyle['counter_border'] ) ) {
1226
+ $counter_style .= "box-shadow: 0 0 0 1px ".$customstyle['counter_border']." inset; ";
1227
+ $before_style = "background-color:".$customstyle['counter_bg']."; border-color:transparent; border-bottom-color:".$customstyle['counter_border']."; border-left-color:".$customstyle['counter_border'].";";
1228
  }
1229
  if( isset( $customstyle['counter_color'] ) && ! empty( $customstyle['counter_color'] ) ) {
1230
  $counter_style .= "color:".$customstyle['counter_color'].";";
1231
  }
1232
 
1233
  if( $counter_style != '' ){
1234
+ $return_style .= '.wpulike-default .count-box,.wpulike-default .count-box{'.$counter_style.'}.wpulike-default .count-box:before{'.$before_style.'}';
1235
  }
1236
 
1237
  // Loading Spinner
1289
  }
1290
  }
1291
 
1292
+ /**
1293
+ * Convert IP to a integer value
1294
+ *
1295
+ * @author Alimir
1296
+ * @param String $user_ip
1297
+ * @since 3.4
1298
+ * @return String
1299
+ */
1300
+ function wp_ulike_generate_user_id( $user_ip ) {
1301
+
1302
+ if( filter_var( $user_ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ) ) {
1303
+ return ip2long( $user_ip );
1304
+ } else {
1305
+ $binary_val = '';
1306
+ foreach ( unpack( 'C*', inet_pton( $user_ip ) ) as $byte ) {
1307
+ $binary_val .= decbin( $byte );
1308
+ }
1309
+ return base_convert( ltrim( $binary_val, '0' ), 2, 10 );
1310
+ }
1311
+
1312
+ }
1313
 
1314
  /*******************************************************
1315
  Templates
1330
  // Extract input array
1331
  extract( $wp_ulike_template );
1332
  ?>
1333
+ <div class="wpulike wpulike-default <?php echo $wrapper_class; ?>" <?php echo $attributes; ?>>
1334
  <div class="<?php echo $general_class; ?>">
1335
+ <a data-ulike-id="<?php echo $ID; ?>"
1336
+ data-ulike-nonce="<?php echo wp_create_nonce( $type . $ID ); ?>"
1337
+ data-ulike-type="<?php echo $type; ?>"
1338
+ data-ulike-status="<?php echo $status; ?>" class="<?php echo $button_class; ?>">
1339
  <?php
1340
  if($button_type == 'text'){
1341
  echo '<span>' . $button_text . '</span>';
1371
  // Extract input array
1372
  extract( $wp_ulike_template );
1373
  ?>
1374
+ <div class="wpulike wpulike-heart <?php echo $wrapper_class; ?>" <?php echo $attributes; ?>>
1375
  <div class="<?php echo $general_class; ?>">
1376
+ <a data-ulike-id="<?php echo $ID; ?>"
1377
+ data-ulike-nonce="<?php echo wp_create_nonce( $type . $ID ); ?>"
1378
+ data-ulike-type="<?php echo $type; ?>"
1379
+ data-ulike-status="<?php echo $status; ?>" class="<?php echo $button_class; ?>">
1380
  <?php
1381
  if($button_type == 'text'){
1382
  echo '<span>' . $button_text . '</span>';
1412
  // Extract input array
1413
  extract( $wp_ulike_template );
1414
  ?>
1415
+ <div class="wpulike wpulike-robeen <?php echo $wrapper_class; ?>" <?php echo $attributes; ?>>
1416
  <div class="<?php echo $general_class; ?>">
1417
  <label>
1418
+ <input type="checkbox"
1419
+ data-ulike-id="<?php echo $ID; ?>"
1420
+ data-ulike-nonce="<?php echo wp_create_nonce( $type . $ID ); ?>"
1421
+ data-ulike-type="<?php echo $type; ?>"
1422
+ data-ulike-status="<?php echo $status; ?>"
1423
+ class="<?php echo $button_class; ?>"
1424
+ <?php echo $status == 2 ? 'checked="checked"' : ''; ?> />
1425
+
1426
+ <svg class="heart-svg" viewBox="467 392 58 57" xmlns="http://www.w3.org/2000/svg">
1427
+ <g class="Group" fill="none" fill-rule="evenodd" transform="translate(467 392)">
1428
+ <path d="M29.144 20.773c-.063-.13-4.227-8.67-11.44-2.59C7.63 28.795 28.94 43.256 29.143 43.394c.204-.138 21.513-14.6 11.44-25.213-7.214-6.08-11.377 2.46-11.44 2.59z" class="heart" fill="#AAB8C2" />
1429
+ <circle class="main-circ" fill="#E2264D" opacity="0" cx="29.5" cy="29.5" r="1.5" />
1430
+ <g class="grp7" opacity="0" transform="translate(7 6)">
1431
+ <circle class="oval1" fill="#9CD8C3" cx="2" cy="6" r="2" />
1432
+ <circle class="oval2" fill="#8CE8C3" cx="5" cy="2" r="2" />
1433
+ </g>
1434
+ <g class="grp6" opacity="0" transform="translate(0 28)">
1435
+ <circle class="oval1" fill="#CC8EF5" cx="2" cy="7" r="2" />
1436
+ <circle class="oval2" fill="#91D2FA" cx="3" cy="2" r="2" />
1437
+ </g>
1438
+ <g class="grp3" opacity="0" transform="translate(52 28)">
1439
+ <circle class="oval2" fill="#9CD8C3" cx="2" cy="7" r="2" />
1440
+ <circle class="oval1" fill="#8CE8C3" cx="4" cy="2" r="2" />
1441
+ </g>
1442
+ <g class="grp2" opacity="0" transform="translate(44 6)" fill="#CC8EF5">
1443
+ <circle class="oval2" transform="matrix(-1 0 0 1 10 0)" cx="5" cy="6" r="2" />
1444
+ <circle class="oval1" transform="matrix(-1 0 0 1 4 0)" cx="2" cy="2" r="2" />
1445
+ </g>
1446
+ <g class="grp5" opacity="0" transform="translate(14 50)" fill="#91D2FA">
1447
+ <circle class="oval1" transform="matrix(-1 0 0 1 12 0)" cx="6" cy="5" r="2" />
1448
+ <circle class="oval2" transform="matrix(-1 0 0 1 4 0)" cx="2" cy="2" r="2" />
1449
+ </g>
1450
+ <g class="grp4" opacity="0" transform="translate(35 50)" fill="#F48EA7">
1451
+ <circle class="oval1" transform="matrix(-1 0 0 1 12 0)" cx="6" cy="5" r="2" />
1452
+ <circle class="oval2" transform="matrix(-1 0 0 1 4 0)" cx="2" cy="2" r="2" />
1453
+ </g>
1454
+ <g class="grp1" opacity="0" transform="translate(24)" fill="#9FC7FA">
1455
+ <circle class="oval1" cx="2.5" cy="3" r="2" />
1456
+ <circle class="oval2" cx="7.5" cy="2" r="2" />
1457
+ </g>
1458
+ </g>
1459
+ </svg>
1460
  <?php echo $counter; ?>
1461
  </label>
1462
  </div>
inc/general-hooks.php CHANGED
@@ -38,12 +38,13 @@ if( ! function_exists( 'wp_ulike_shortcode' ) ){
38
  $result = '';
39
  // Default Args
40
  $args = shortcode_atts( array(
41
- "for" => 'post', //shortcode Type (post, comment, activity, topic)
42
- "id" => '', //Post ID
43
- "slug" => 'post', //Slug Name
44
- "style" => '', //Get Default Theme
45
- "attributes" => '', //Get Attributes Filter
46
- "wrapper_class" => '' //Extra Wrapper class
 
47
  ), $atts );
48
 
49
  switch ( $args['for'] ) {
@@ -374,7 +375,7 @@ if( defined( 'BP_VERSION' ) ) {
374
  bp_notifications_add_notification( array(
375
  'user_id' => $author_ID,
376
  'item_id' => $cp_ID,
377
- 'secondary_item_id' => $author_ID,
378
  'component_name' => 'wp_ulike',
379
  'component_action' => 'wp_ulike' . $type . '_action_' . $user_ID,
380
  'date_notified' => bp_core_current_time(),
38
  $result = '';
39
  // Default Args
40
  $args = shortcode_atts( array(
41
+ "for" => 'post', // shortcode Type (post, comment, activity, topic)
42
+ "id" => '', // Post ID
43
+ "slug" => 'post', // Slug Name
44
+ "style" => '', // Get Default Theme
45
+ "button_type" => '', // Set Button Type ('image' || 'text')
46
+ "attributes" => '', // Get Attributes Filter
47
+ "wrapper_class" => '' // Extra Wrapper class
48
  ), $atts );
49
 
50
  switch ( $args['for'] ) {
375
  bp_notifications_add_notification( array(
376
  'user_id' => $author_ID,
377
  'item_id' => $cp_ID,
378
+ 'secondary_item_id' => '',
379
  'component_name' => 'wp_ulike',
380
  'component_action' => 'wp_ulike' . $type . '_action_' . $user_ID,
381
  'date_notified' => bp_core_current_time(),
readme.txt CHANGED
@@ -5,7 +5,7 @@ Author: Ali Mirzaei
5
  Tags: wp ulike, wordpress youlike plugin, like button, rating, vote, voting, most liked posts, wordpress like page, wordpress like post, wordpress vote page, wordpress vote post, wp like page, wp like post, wp like plugin, buddypress like system, buddypress votes, comment like system, voting button, wordpress, buddypress, statistics, stats likes, bbpress, bbPress like, WP-Translations, forums, community, credit, points, mycred, users, ultimate member
6
  Requires at least: 3.5
7
  Tested up to: 4.9.6
8
- Stable tag: 3.3.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -174,6 +174,16 @@ define( 'WP_MEMORY_LIMIT', '256M' );
174
 
175
  == Changelog ==
176
 
 
 
 
 
 
 
 
 
 
 
177
  = 3.3.1 =
178
  * Fixed: An old issue with database structure.
179
  * Fixed: An important bug with logging methods.
@@ -465,6 +475,9 @@ define( 'WP_MEMORY_LIMIT', '256M' );
465
 
466
  == Upgrade Notice ==
467
 
 
 
 
468
  = 3.3 =
469
  Attention Please! In this version, we have made some changes on plugin scripts! So, please clear your server cache after the plugin update.
470
 
5
  Tags: wp ulike, wordpress youlike plugin, like button, rating, vote, voting, most liked posts, wordpress like page, wordpress like post, wordpress vote page, wordpress vote post, wp like page, wp like post, wp like plugin, buddypress like system, buddypress votes, comment like system, voting button, wordpress, buddypress, statistics, stats likes, bbpress, bbPress like, WP-Translations, forums, community, credit, points, mycred, users, ultimate member
6
  Requires at least: 3.5
7
  Tested up to: 4.9.6
8
+ Stable tag: 3.4
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
174
 
175
  == Changelog ==
176
 
177
+ = 3.4 =
178
+ * Added: A new style for likers box with pophover effect.
179
+ * Added: New stylesheet for all buttons.
180
+ * Added: a new option for custom button_type.
181
+ * Fixed: All of the reported bugs.
182
+ * Fixed: The issue of IP6 convertion.
183
+ * Upgraded: The database structure.
184
+ * Optimized: The stylesheet issues.
185
+ * Optimized: Some issues with data process.
186
+
187
  = 3.3.1 =
188
  * Fixed: An old issue with database structure.
189
  * Fixed: An important bug with logging methods.
475
 
476
  == Upgrade Notice ==
477
 
478
+ = 3.4 =
479
+ Attention Please! In this release, many changes have been made to the structure of the styles, and may result in the loss of your past custom styles. These changes are surely designed to improve the performance of the plugin, so it's best to update your system with these changes and then clear your server cache.
480
+
481
  = 3.3 =
482
  Attention Please! In this version, we have made some changes on plugin scripts! So, please clear your server cache after the plugin update.
483
 
wp-ulike.php CHANGED
@@ -10,7 +10,7 @@
10
  * Plugin Name: WP ULike
11
  * Plugin URI: https://wpulike.com/
12
  * Description: WP ULike plugin allows to integrate a beautiful Ajax Like Button into your wordPress website to allow your visitors to like and unlike pages, posts, comments AND buddypress activities. Its very simple to use and supports many options.
13
- * Version: 3.3.1
14
  * Author: Ali Mirzaei
15
  * Author URI: http://alimir.ir
16
  * Text Domain: wp-ulike
@@ -36,9 +36,9 @@
36
 
37
  // Do not change these values
38
  define( 'WP_ULIKE_PLUGIN_URI' , 'https://wpulike.com/' );
39
- define( 'WP_ULIKE_VERSION' , '3.3.1' );
40
  define( 'WP_ULIKE_SLUG' , 'wp-ulike' );
41
- define( 'WP_ULIKE_DB_VERSION' , '1.4' );
42
 
43
  define( 'WP_ULIKE_DIR' , plugin_dir_path( __FILE__ ) );
44
  define( 'WP_ULIKE_URL' , plugins_url( '', __FILE__ ) );
@@ -78,7 +78,7 @@ if ( ! class_exists( 'WPULIKE' ) ) :
78
  */
79
  private function __construct() {
80
 
81
- add_action( 'init', array( $this, 'init' ) );
82
  // Include Files
83
  $this->includes();
84
 
@@ -89,6 +89,21 @@ if ( ! class_exists( 'WPULIKE' ) ) :
89
 
90
  $prefix = is_network_admin() ? 'network_admin_' : '';
91
  add_filter( "{$prefix}plugin_action_links", array( $this, 'add_links' ), 10, 5 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
 
93
  // Loaded action
94
  do_action( 'wp_ulike_loaded' );
@@ -281,27 +296,12 @@ if ( ! class_exists( 'WPULIKE' ) ) :
281
  */
282
  public function anonymise_ip( $ip_address ) {
283
  if ( strpos( $ip_address, "." ) == true ) {
284
- return preg_replace('~[0-9]+$~', '000', $ip_address);
285
  } else {
286
  return preg_replace('~[0-9]*:[0-9]+$~', '0000:0000', $ip_address);
287
  }
288
  }
289
 
290
- /**
291
- * Init the plugin when WordPress Initialises.
292
- *
293
- * @return void
294
- */
295
- public function init(){
296
-
297
- // @deprecate version 5.0
298
- global $wp_version;
299
- if ( version_compare( $wp_version, '4.6', '<' ) ) {
300
- // Load plugin text domain
301
- $this->load_plugin_textdomain();
302
- }
303
- }
304
-
305
  /**
306
  * Return an instance of this class.
307
  *
@@ -419,11 +419,11 @@ if ( ! class_exists( 'WPULIKE' ) ) :
419
  $posts_table = $wpdb->prefix . "ulike";
420
  if ( $wpdb->get_var( "show tables like '$posts_table'" ) != $posts_table ) {
421
  $sql = "CREATE TABLE " . $posts_table . " (
422
- `id` bigint(11) NOT NULL AUTO_INCREMENT,
423
- `post_id` int(11) NOT NULL,
424
  `date_time` datetime NOT NULL,
425
  `ip` varchar(30) NOT NULL,
426
- `user_id` bigint(20) UNSIGNED NOT NULL,
427
  `status` varchar(15) NOT NULL,
428
  PRIMARY KEY (`id`)
429
  );";
@@ -432,17 +432,17 @@ if ( ! class_exists( 'WPULIKE' ) ) :
432
  dbDelta( $sql );
433
  } else {
434
  // Fix an old issue with user_id column
435
- $wpdb->query( "ALTER TABLE $posts_table CHANGE `user_id` `user_id` BIGINT(20) UNSIGNED NOT NULL" );
436
  }
437
 
438
  $comments_table = $wpdb->prefix . "ulike_comments";
439
  if ( $wpdb->get_var( "show tables like '$comments_table'" ) != $comments_table ) {
440
  $sql = "CREATE TABLE " . $comments_table . " (
441
- `id` bigint(11) NOT NULL AUTO_INCREMENT,
442
- `comment_id` int(11) NOT NULL,
443
  `date_time` datetime NOT NULL,
444
  `ip` varchar(30) NOT NULL,
445
- `user_id` bigint(20) UNSIGNED NOT NULL,
446
  `status` varchar(15) NOT NULL,
447
  PRIMARY KEY (`id`)
448
  );";
@@ -451,17 +451,17 @@ if ( ! class_exists( 'WPULIKE' ) ) :
451
  dbDelta( $sql );
452
  } else {
453
  // Fix an old issue with user_id column
454
- $wpdb->query( "ALTER TABLE $comments_table CHANGE `user_id` `user_id` BIGINT(20) UNSIGNED NOT NULL" );
455
  }
456
 
457
  $activities_table = $wpdb->prefix . "ulike_activities";
458
  if ( $wpdb->get_var( "show tables like '$activities_table'" ) != $activities_table ) {
459
  $sql = "CREATE TABLE " . $activities_table . " (
460
- `id` bigint(11) NOT NULL AUTO_INCREMENT,
461
- `activity_id` int(11) NOT NULL,
462
  `date_time` datetime NOT NULL,
463
  `ip` varchar(30) NOT NULL,
464
- `user_id` bigint(20) UNSIGNED NOT NULL,
465
  `status` varchar(15) NOT NULL,
466
  PRIMARY KEY (`id`)
467
  );";
@@ -470,17 +470,17 @@ if ( ! class_exists( 'WPULIKE' ) ) :
470
  dbDelta( $sql );
471
  } else {
472
  // Fix an old issue with user_id column
473
- $wpdb->query( "ALTER TABLE $activities_table CHANGE `user_id` `user_id` BIGINT(20) UNSIGNED NOT NULL" );
474
  }
475
 
476
  $forums_table = $wpdb->prefix . "ulike_forums";
477
  if ( $wpdb->get_var( "show tables like '$forums_table'" ) != $forums_table ) {
478
  $sql = "CREATE TABLE " . $forums_table . " (
479
- `id` bigint(11) NOT NULL AUTO_INCREMENT,
480
- `topic_id` int(11) NOT NULL,
481
  `date_time` datetime NOT NULL,
482
  `ip` varchar(30) NOT NULL,
483
- `user_id` bigint(20) UNSIGNED NOT NULL,
484
  `status` varchar(15) NOT NULL,
485
  PRIMARY KEY (`id`)
486
  );";
@@ -489,7 +489,7 @@ if ( ! class_exists( 'WPULIKE' ) ) :
489
  dbDelta( $sql );
490
  } else {
491
  // Fix an old issue with user_id column
492
- $wpdb->query( "ALTER TABLE $forums_table CHANGE `user_id` `user_id` BIGINT(20) UNSIGNED NOT NULL" );
493
  }
494
 
495
  update_option( 'wp_ulike_dbVersion', WP_ULIKE_DB_VERSION );
10
  * Plugin Name: WP ULike
11
  * Plugin URI: https://wpulike.com/
12
  * Description: WP ULike plugin allows to integrate a beautiful Ajax Like Button into your wordPress website to allow your visitors to like and unlike pages, posts, comments AND buddypress activities. Its very simple to use and supports many options.
13
+ * Version: 3.4
14
  * Author: Ali Mirzaei
15
  * Author URI: http://alimir.ir
16
  * Text Domain: wp-ulike
36
 
37
  // Do not change these values
38
  define( 'WP_ULIKE_PLUGIN_URI' , 'https://wpulike.com/' );
39
+ define( 'WP_ULIKE_VERSION' , '3.4' );
40
  define( 'WP_ULIKE_SLUG' , 'wp-ulike' );
41
+ define( 'WP_ULIKE_DB_VERSION' , '1.5' );
42
 
43
  define( 'WP_ULIKE_DIR' , plugin_dir_path( __FILE__ ) );
44
  define( 'WP_ULIKE_URL' , plugins_url( '', __FILE__ ) );
78
  */
79
  private function __construct() {
80
 
81
+ add_action( 'plugins_loaded', array( $this, 'init' ) );
82
  // Include Files
83
  $this->includes();
84
 
89
 
90
  $prefix = is_network_admin() ? 'network_admin_' : '';
91
  add_filter( "{$prefix}plugin_action_links", array( $this, 'add_links' ), 10, 5 );
92
+ }
93
+
94
+ /**
95
+ * Init the plugin when WordPress Initialises.
96
+ *
97
+ * @return void
98
+ */
99
+ public function init(){
100
+
101
+ // @deprecate version 5.0
102
+ global $wp_version;
103
+ if ( version_compare( $wp_version, '4.6', '<' ) ) {
104
+ // Load plugin text domain
105
+ $this->load_plugin_textdomain();
106
+ }
107
 
108
  // Loaded action
109
  do_action( 'wp_ulike_loaded' );
296
  */
297
  public function anonymise_ip( $ip_address ) {
298
  if ( strpos( $ip_address, "." ) == true ) {
299
+ return preg_replace('~[0-9]+$~', '0', $ip_address);
300
  } else {
301
  return preg_replace('~[0-9]*:[0-9]+$~', '0000:0000', $ip_address);
302
  }
303
  }
304
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
305
  /**
306
  * Return an instance of this class.
307
  *
419
  $posts_table = $wpdb->prefix . "ulike";
420
  if ( $wpdb->get_var( "show tables like '$posts_table'" ) != $posts_table ) {
421
  $sql = "CREATE TABLE " . $posts_table . " (
422
+ `id` bigint(20) NOT NULL AUTO_INCREMENT,
423
+ `post_id` bigint(20) NOT NULL,
424
  `date_time` datetime NOT NULL,
425
  `ip` varchar(30) NOT NULL,
426
+ `user_id` varchar(30) NOT NULL,
427
  `status` varchar(15) NOT NULL,
428
  PRIMARY KEY (`id`)
429
  );";
432
  dbDelta( $sql );
433
  } else {
434
  // Fix an old issue with user_id column
435
+ $wpdb->query( "ALTER TABLE $posts_table CHANGE `user_id` `user_id` VARCHAR(30) NOT NULL" );
436
  }
437
 
438
  $comments_table = $wpdb->prefix . "ulike_comments";
439
  if ( $wpdb->get_var( "show tables like '$comments_table'" ) != $comments_table ) {
440
  $sql = "CREATE TABLE " . $comments_table . " (
441
+ `id` bigint(20) NOT NULL AUTO_INCREMENT,
442
+ `comment_id` bigint(20) NOT NULL,
443
  `date_time` datetime NOT NULL,
444
  `ip` varchar(30) NOT NULL,
445
+ `user_id` varchar(30) NOT NULL,
446
  `status` varchar(15) NOT NULL,
447
  PRIMARY KEY (`id`)
448
  );";
451
  dbDelta( $sql );
452
  } else {
453
  // Fix an old issue with user_id column
454
+ $wpdb->query( "ALTER TABLE $comments_table CHANGE `user_id` `user_id` VARCHAR(30) NOT NULL" );
455
  }
456
 
457
  $activities_table = $wpdb->prefix . "ulike_activities";
458
  if ( $wpdb->get_var( "show tables like '$activities_table'" ) != $activities_table ) {
459
  $sql = "CREATE TABLE " . $activities_table . " (
460
+ `id` bigint(20) NOT NULL AUTO_INCREMENT,
461
+ `activity_id` bigint(20) NOT NULL,
462
  `date_time` datetime NOT NULL,
463
  `ip` varchar(30) NOT NULL,
464
+ `user_id` varchar(30) NOT NULL,
465
  `status` varchar(15) NOT NULL,
466
  PRIMARY KEY (`id`)
467
  );";
470
  dbDelta( $sql );
471
  } else {
472
  // Fix an old issue with user_id column
473
+ $wpdb->query( "ALTER TABLE $activities_table CHANGE `user_id` `user_id` VARCHAR(30) NOT NULL" );
474
  }
475
 
476
  $forums_table = $wpdb->prefix . "ulike_forums";
477
  if ( $wpdb->get_var( "show tables like '$forums_table'" ) != $forums_table ) {
478
  $sql = "CREATE TABLE " . $forums_table . " (
479
+ `id` bigint(20) NOT NULL AUTO_INCREMENT,
480
+ `topic_id` bigint(20) NOT NULL,
481
  `date_time` datetime NOT NULL,
482
  `ip` varchar(30) NOT NULL,
483
+ `user_id` varchar(30) NOT NULL,
484
  `status` varchar(15) NOT NULL,
485
  PRIMARY KEY (`id`)
486
  );";
489
  dbDelta( $sql );
490
  } else {
491
  // Fix an old issue with user_id column
492
+ $wpdb->query( "ALTER TABLE $forums_table CHANGE `user_id` `user_id` VARCHAR(30) NOT NULL" );
493
  }
494
 
495
  update_option( 'wp_ulike_dbVersion', WP_ULIKE_DB_VERSION );