Version Description
- Added: New animated heart template.
- Fixed: An issue with home page display.
- Fixed: An issue with user avatar default size.
- Fixed: Some issues with aggregaterating.
Download this release
Release Info
Developer | alimir |
Plugin | WP ULike |
Version | 3.6.2 |
Comparing to | |
See all releases |
Code changes from version 3.6.1 to 3.6.2
- README.md +209 -0
- SUMMARY.md +4 -0
- admin/assets/js/plugins.js +1 -1
- admin/assets/js/scripts.js +1 -1
- assets/css/wp-ulike.css +141 -8
- assets/css/wp-ulike.min.css +1 -1
- assets/img/svg/animated-heart.svg +26 -0
- assets/js/wp-ulike.js +37 -15
- assets/js/wp-ulike.min.js +1 -1
- inc/general-functions.php +75 -29
- readme.txt +7 -1
- wp-ulike.php +2 -2
README.md
ADDED
@@ -0,0 +1,209 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# [WP ULike](https://wordpress.org/plugins/wp-ulike/) #
|
2 |
+
|
3 |
+
### WP ULike GitHub Repository
|
4 |
+
|
5 |
+
WP ULike is a WordPress plugin that also supports BuddyPress, bbPress and a number of other plugins. It aims to be a comprehensive “Like” system for your site and enables site users to like a wide range of content types, including posts, forum topics and replies, comments and activity updates. It’s very simple to use and supports many options and full Statistics tools. Also, All are free :)
|
6 |
+
|
7 |
+
More information can be found at [WP ULike](https://wpulike.com/).
|
8 |
+
|
9 |
+
<a href="https://wordpress.org/plugins/wp-ulike/"><img src="http://preview.alimir.ir/wp-content/uploads/wp-ulike-created-banner.png"></a>
|
10 |
+
|
11 |
+
## Features
|
12 |
+
* Clean Design.
|
13 |
+
* Full myCRED Points Support.
|
14 |
+
* Full Statistics tools.
|
15 |
+
* Supporting UltimateMember & BuddyPress Profiles.
|
16 |
+
* Likers World Map & Top Likers Widget.
|
17 |
+
* Ajax feature to update the data without reloading.
|
18 |
+
* Visitors do not have to register or log in to use the Like Button.
|
19 |
+
* Compatible with WP version 3.5 & above.
|
20 |
+
* Added automatically with filtering options (no Code required).
|
21 |
+
* Different logging method options.
|
22 |
+
* Notifications System. (Custom toast messages after each activity)
|
23 |
+
* Shortcode support.
|
24 |
+
* Support custom templates with separate variables.
|
25 |
+
* Comment likes support.
|
26 |
+
* Supporting the date in localized format. (date_i18n)
|
27 |
+
* Full likes logs support.
|
28 |
+
* BuddyPress add activity & notifications support.
|
29 |
+
* Simple user like box with avatar support.
|
30 |
+
* Custom Like-UnLike Texts fields.
|
31 |
+
* Simple custom style with color picker settings.
|
32 |
+
* Advanced Widgets With Custom Tools. (Most Liked Posts,Comments,Users,Topics,…)
|
33 |
+
* Powerful configuration panel.
|
34 |
+
* Support RTL & language file.
|
35 |
+
* And so on…
|
36 |
+
|
37 |
+
|
38 |
+
## Translations
|
39 |
+
WP ULike has been translated into the following languages:
|
40 |
+
|
41 |
+
* English (United States)
|
42 |
+
* Persian (Iran)
|
43 |
+
* French (France)
|
44 |
+
* Chinese (China)
|
45 |
+
* Chinese (Taiwan)
|
46 |
+
* Dutch (Netherlands)
|
47 |
+
* Arabic
|
48 |
+
* Portuguese (Brazil)
|
49 |
+
* Turkish (Turkey)
|
50 |
+
* Greek
|
51 |
+
* Russian (Russia)
|
52 |
+
* Spanish (Spain)
|
53 |
+
* German (Germany)
|
54 |
+
* Japanese
|
55 |
+
* Romanian (Romania)
|
56 |
+
* Slovak (Slovakia)
|
57 |
+
* Czech (Czech Republic)
|
58 |
+
* Hebrew (Israel)
|
59 |
+
* Italian (Italy)
|
60 |
+
* Polish (Poland)
|
61 |
+
* Finnish
|
62 |
+
* Hungarian (Hungary)
|
63 |
+
* Lithuanian (Lithuania)
|
64 |
+
* Indonesian (Indonesia)
|
65 |
+
* Khmer
|
66 |
+
* Norwegian Bokmal (Norway)
|
67 |
+
* Portuguese (Portugal)
|
68 |
+
* Swedish (Sweden)
|
69 |
+
* Danish (Denmark)
|
70 |
+
* Estonian
|
71 |
+
* Korean (Korea)
|
72 |
+
* Vietnamese
|
73 |
+
* Basque
|
74 |
+
* Bosnian (Bosnia and Herzegovina)
|
75 |
+
* English (United Kingdom)
|
76 |
+
|
77 |
+
Would you like to help translate the plugin into more languages? [Join our WP-Translations Community](https://www.transifex.com/projects/p/wp-ulike/).
|
78 |
+
|
79 |
+
## Installation ##
|
80 |
+
|
81 |
+
For detailed setup instructions, visit the official [Documentation](https://wordpress.org/plugins/wp-ulike/installation/) page.
|
82 |
+
|
83 |
+
1. You can clone the GitHub repository: `https://github.com/Alimir/wp-ulike.git`
|
84 |
+
2. Or download it directly as a ZIP file: `https://github.com/Alimir/wp-ulike/archive/master.zip`
|
85 |
+
|
86 |
+
This will download the latest developer copy of WP ULike.
|
87 |
+
|
88 |
+
|
89 |
+
## How To Use this plugin? ##
|
90 |
+
Just install the plugin and activate "automatic display" in plugin configuration panel. (WP ULike has four auto options for posts, comments, buddypress activities & bbPress Topics.)
|
91 |
+
Also you can use of the following function and shortcode for your posts:
|
92 |
+
* Function:
|
93 |
+
```php
|
94 |
+
if(function_exists('wp_ulike')) wp_ulike('get');
|
95 |
+
```
|
96 |
+
* Shortcode:
|
97 |
+
```
|
98 |
+
[wp_ulike]
|
99 |
+
```
|
100 |
+
|
101 |
+
## How To Change The Counter Format? ##
|
102 |
+
Just add a filter on `wp_ulike_format_number`. e.g. If you want to remove `+` character, you need to make use of the sample code below:
|
103 |
+
```php
|
104 |
+
add_filter('wp_ulike_format_number','wp_ulike_new_format_number',10,3);
|
105 |
+
function wp_ulike_new_format_number($value, $num, $plus){
|
106 |
+
if ($num >= 1000 && get_option('wp_ulike_format_number') == '1'):
|
107 |
+
$value = round($num/1000, 2) . 'K';
|
108 |
+
else:
|
109 |
+
$value = $num;
|
110 |
+
endif;
|
111 |
+
return $value;
|
112 |
+
}
|
113 |
+
```
|
114 |
+
|
115 |
+
## How To Change Schema Type? ##
|
116 |
+
The default schema type is `CreativeWork`, if you want to change it to `Article`, you need to make use of the `wp_ulike_posts_add_attr` filter as shown in the sample code below:
|
117 |
+
```php
|
118 |
+
add_filter('wp_ulike_posts_add_attr', 'wp_ulike_change_posts_microdata_itemtype', 10);
|
119 |
+
function wp_ulike_change_posts_microdata_itemtype() {
|
120 |
+
return 'itemscope itemtype="http://schema.org/Article"';
|
121 |
+
}
|
122 |
+
```
|
123 |
+
|
124 |
+
## How To Add Extra Microdata? ##
|
125 |
+
Make use of the `wp_ulike_extra_structured_data` filter as shown in the sample code below:
|
126 |
+
```php
|
127 |
+
add_filter('wp_ulike_extra_structured_data', 'wp_ulike_add_extra_structured_data', 10);
|
128 |
+
function wp_ulike_add_extra_structured_data(){
|
129 |
+
$post_meta = '<div style="display: none;" itemprop="publisher" itemscope itemtype="https://schema.org/Organization">';
|
130 |
+
$post_meta .= '<meta itemprop="name" content="WordPress" />';
|
131 |
+
$post_meta .= '<div itemprop="logo" itemscope itemtype="https://schema.org/ImageObject">';
|
132 |
+
$post_meta .= '<meta itemprop="url" content="https://s.w.org/about/images/logos/wordpress-logo-hoz-rgb.png" />';
|
133 |
+
$post_meta .= '</div>';
|
134 |
+
$post_meta .= '</div>';
|
135 |
+
return $post_meta;
|
136 |
+
}
|
137 |
+
```
|
138 |
+
|
139 |
+
## How To Remove All Schema Data Except Of aggregateRating? ##
|
140 |
+
Make use of the `wp_ulike_remove_microdata_post_meta` & `wp_ulike_posts_add_attr` filters as shown in the sample code below:
|
141 |
+
```php
|
142 |
+
add_filter('wp_ulike_remove_microdata_post_meta', '__return_true', 10);
|
143 |
+
add_filter('wp_ulike_posts_add_attr', '__return_null', 10);
|
144 |
+
```
|
145 |
+
|
146 |
+
## How To Remove "0" Count If There Are No Likes? ##
|
147 |
+
Make use of the `wp_ulike_count_box_template` filter as shown in the sample code below:
|
148 |
+
```php
|
149 |
+
add_filter('wp_ulike_count_box_template', 'wp_ulike_change_my_count_box_template', 10, 2);
|
150 |
+
function wp_ulike_change_my_count_box_template($string, $counter) {
|
151 |
+
$num = preg_replace("/[^0-9,.]/", "", $counter);
|
152 |
+
if($num == 0) return;
|
153 |
+
else return $string;
|
154 |
+
}
|
155 |
+
```
|
156 |
+
|
157 |
+
## How To Change The Login Alert Template? ##
|
158 |
+
Make use of the `wp_ulike_login_alert_template` filter as shown in the sample code below:
|
159 |
+
```php
|
160 |
+
add_filter('wp_ulike_login_alert_template', 'wp_ulike_change_login_alert_template', 10);
|
161 |
+
function wp_ulike_change_login_alert_template(){
|
162 |
+
return '<p class="alert alert-info fade in" role="alert"><button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>Please login to your account! :)</p>';
|
163 |
+
}
|
164 |
+
```
|
165 |
+
|
166 |
+
## How To Get Post Likes Number? ##
|
167 |
+
Make use of the following function in WP Loop:
|
168 |
+
```php
|
169 |
+
if (function_exists('wp_ulike_get_post_likes')):
|
170 |
+
echo wp_ulike_get_post_likes(get_the_ID());
|
171 |
+
endif;
|
172 |
+
```
|
173 |
+
|
174 |
+
## How To Get Comment Likes Number? ##
|
175 |
+
Make use of the following function in your comments loop:
|
176 |
+
```php
|
177 |
+
if (function_exists('wp_ulike_get_comment_likes')):
|
178 |
+
echo wp_ulike_get_comment_likes(get_comment_ID());
|
179 |
+
endif;
|
180 |
+
```
|
181 |
+
|
182 |
+
## How To Sort Most Liked Posts? ##
|
183 |
+
Make use of the following query on a loop:
|
184 |
+
```php
|
185 |
+
$the_query = new WP_Query(array(
|
186 |
+
'post_status' => 'published',
|
187 |
+
'post_type' => 'post',
|
188 |
+
'orderby' => 'meta_value_num',
|
189 |
+
'meta_key' => '_liked',
|
190 |
+
'paged' => (get_query_var('paged')) ? get_query_var('paged') : 1
|
191 |
+
));
|
192 |
+
```
|
193 |
+
|
194 |
+
## How Can I Create Custom Template In Users Liked Box? ##
|
195 |
+
We have provided some variables in setting panel. You can use them in textarea and then save the new options.
|
196 |
+
Attention: `%START_WHILE%` And `%END_WHILE%` variables are very important and you should use them out of the frequent string. (Such as `<li></li>` tags sample in default template)
|
197 |
+
|
198 |
+
## Receive HTTP ERROR 500 on WP ULike > Statistics ##
|
199 |
+
Increasing Your WordPress Memory Limit in wp-config.php to fix this error. It is located in your WordPress site's root folder, and you will need to use an FTP client or file manager in your web hosting control panel.
|
200 |
+
Next, you need to paste this code in wp-config.php file just before the line that says `That's all, stop editing! Happy blogging.`
|
201 |
+
```php
|
202 |
+
define( 'WP_MEMORY_LIMIT', '256M' );
|
203 |
+
```
|
204 |
+
|
205 |
+
## Bugs ##
|
206 |
+
If you find an issue, let us know [here](https://github.com/Alimir/wp-ulike/issues?state=open)!
|
207 |
+
|
208 |
+
## Support ##
|
209 |
+
Please visit the [support forums](https://wordpress.org/support/plugin/wp-ulike).
|
SUMMARY.md
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
# Table of contents
|
2 |
+
|
3 |
+
* [Initial page](README.md)
|
4 |
+
|
admin/assets/js/plugins.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
/*! WP ULike - v3.6.
|
2 |
* https://wpulike.com
|
3 |
* Alimir 2019;
|
4 |
*/
|
1 |
+
/*! WP ULike - v3.6.2
|
2 |
* https://wpulike.com
|
3 |
* Alimir 2019;
|
4 |
*/
|
admin/assets/js/scripts.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
/*! WP ULike - v3.6.
|
2 |
* https://wpulike.com
|
3 |
* Alimir 2019;
|
4 |
*/
|
1 |
+
/*! WP ULike - v3.6.2
|
2 |
* https://wpulike.com
|
3 |
* Alimir 2019;
|
4 |
*/
|
assets/css/wp-ulike.css
CHANGED
@@ -60,6 +60,8 @@
|
|
60 |
.wpulike-default .wp_ulike_btn {
|
61 |
color: #616161;
|
62 |
background: #e0e0e0;
|
|
|
|
|
63 |
}
|
64 |
.wpulike-default .wp_ulike_is_liked .wp_ulike_btn {
|
65 |
color: #757575;
|
@@ -118,6 +120,8 @@
|
|
118 |
border-radius: 0;
|
119 |
background-color: #ffffff;
|
120 |
box-shadow: 0 0 0 1px #bdbdbd inset;
|
|
|
|
|
121 |
}
|
122 |
#buddypress #activity-stream .wp_ulike_likers_wrapper li, #buddypress #activity-stream .wp_ulike_likers_wrapper .wp-ulike-liker {
|
123 |
border: none;
|
@@ -188,23 +192,29 @@
|
|
188 |
padding: 0 5px;
|
189 |
}
|
190 |
|
191 |
-
#buddypress #activity-stream .
|
192 |
-
|
193 |
-
|
|
|
|
|
194 |
}
|
195 |
-
#buddypress #activity-stream .
|
196 |
padding: 10px 15px;
|
197 |
}
|
198 |
-
#buddypress #activity-stream .
|
199 |
border-radius: 0;
|
200 |
padding: 0.2em 0.5em;
|
201 |
margin-bottom: 0;
|
202 |
}
|
|
|
|
|
|
|
|
|
203 |
|
204 |
/**
|
205 |
* Robeen template
|
206 |
*/
|
207 |
-
@keyframes
|
208 |
40% {
|
209 |
transform: scale(10);
|
210 |
opacity: 1;
|
@@ -249,7 +259,7 @@
|
|
249 |
stroke-width: 0;
|
250 |
}
|
251 |
}
|
252 |
-
@keyframes
|
253 |
0% {
|
254 |
transform: scale(0.2);
|
255 |
}
|
@@ -260,7 +270,7 @@
|
|
260 |
transform: scale(1);
|
261 |
}
|
262 |
}
|
263 |
-
@keyframes
|
264 |
0% {
|
265 |
transform: scale(1.4);
|
266 |
}
|
@@ -418,6 +428,129 @@
|
|
418 |
transition: 1.5s transform .3s;
|
419 |
}
|
420 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
421 |
/**
|
422 |
* Widgets & Likers Box
|
423 |
*/
|
60 |
.wpulike-default .wp_ulike_btn {
|
61 |
color: #616161;
|
62 |
background: #e0e0e0;
|
63 |
+
min-height: 30px;
|
64 |
+
min-width: 50px;
|
65 |
}
|
66 |
.wpulike-default .wp_ulike_is_liked .wp_ulike_btn {
|
67 |
color: #757575;
|
120 |
border-radius: 0;
|
121 |
background-color: #ffffff;
|
122 |
box-shadow: 0 0 0 1px #bdbdbd inset;
|
123 |
+
font-size: initial;
|
124 |
+
padding: initial;
|
125 |
}
|
126 |
#buddypress #activity-stream .wp_ulike_likers_wrapper li, #buddypress #activity-stream .wp_ulike_likers_wrapper .wp-ulike-liker {
|
127 |
border: none;
|
192 |
padding: 0 5px;
|
193 |
}
|
194 |
|
195 |
+
#buddypress #activity-stream .wpulike-heart .wp_ulike_btn {
|
196 |
+
background: transparent;
|
197 |
+
border: 0;
|
198 |
+
font-size: initial;
|
199 |
+
padding: initial;
|
200 |
}
|
201 |
+
#buddypress #activity-stream .wpulike-heart .wp_ulike_put_image {
|
202 |
padding: 10px 15px;
|
203 |
}
|
204 |
+
#buddypress #activity-stream .wpulike-heart .wp_ulike_general_class {
|
205 |
border-radius: 0;
|
206 |
padding: 0.2em 0.5em;
|
207 |
margin-bottom: 0;
|
208 |
}
|
209 |
+
#buddypress #activity-stream .activity-meta, #buddypress #activity-stream .acomment-options {
|
210 |
+
display: flex;
|
211 |
+
align-items: center;
|
212 |
+
}
|
213 |
|
214 |
/**
|
215 |
* Robeen template
|
216 |
*/
|
217 |
+
@keyframes animateCircle {
|
218 |
40% {
|
219 |
transform: scale(10);
|
220 |
opacity: 1;
|
259 |
stroke-width: 0;
|
260 |
}
|
261 |
}
|
262 |
+
@keyframes animateHeart {
|
263 |
0% {
|
264 |
transform: scale(0.2);
|
265 |
}
|
270 |
transform: scale(1);
|
271 |
}
|
272 |
}
|
273 |
+
@keyframes animateHeartOut {
|
274 |
0% {
|
275 |
transform: scale(1.4);
|
276 |
}
|
428 |
transition: 1.5s transform .3s;
|
429 |
}
|
430 |
|
431 |
+
/**
|
432 |
+
* Animated heart template
|
433 |
+
*/
|
434 |
+
.wpulike-animated-heart .wp_ulike_btn {
|
435 |
+
position: relative;
|
436 |
+
border-radius: 50em;
|
437 |
+
background-color: #ffffff;
|
438 |
+
padding: 0;
|
439 |
+
box-shadow: 0px 5px 30px rgba(255, 111, 99, 0.4);
|
440 |
+
border: 0;
|
441 |
+
width: 50px;
|
442 |
+
height: 50px;
|
443 |
+
}
|
444 |
+
.wpulike-animated-heart .wp_ulike_btn.image-unlike {
|
445 |
+
background-color: #ff6f63;
|
446 |
+
}
|
447 |
+
.wpulike-animated-heart .wp_ulike_btn.image-unlike .wpulike-svg-heart {
|
448 |
+
fill: #ffffff;
|
449 |
+
}
|
450 |
+
.wpulike-animated-heart .wp_ulike_btn.image-unlike .wpulike-svg-heart-pop {
|
451 |
+
animation-direction: normal;
|
452 |
+
}
|
453 |
+
.wpulike-animated-heart .wp_ulike_btn:active {
|
454 |
+
box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.25);
|
455 |
+
}
|
456 |
+
.wpulike-animated-heart .wpulike-svg-heart {
|
457 |
+
width: 20px;
|
458 |
+
fill: #ff6f63;
|
459 |
+
transition: fill .5s, transform .5s;
|
460 |
+
pointer-events: none;
|
461 |
+
position: absolute;
|
462 |
+
left: 50%;
|
463 |
+
top: 50%;
|
464 |
+
transform: translateX(-50%) translateY(-50%);
|
465 |
+
}
|
466 |
+
.wpulike-animated-heart .wpulike-svg-heart-pop {
|
467 |
+
position: absolute;
|
468 |
+
width: 30%;
|
469 |
+
fill: #ff6f63;
|
470 |
+
opacity: 0;
|
471 |
+
left: 0;
|
472 |
+
animation: popHearts 1s ease forwards reverse;
|
473 |
+
}
|
474 |
+
.wpulike-animated-heart .wpulike-svg-heart-pop.one {
|
475 |
+
left: 1%;
|
476 |
+
transform: rotate(-10deg);
|
477 |
+
animation-delay: .45;
|
478 |
+
}
|
479 |
+
.wpulike-animated-heart .wpulike-svg-heart-pop.two {
|
480 |
+
left: 15%;
|
481 |
+
transform: rotate(8deg);
|
482 |
+
animation-delay: .25s;
|
483 |
+
}
|
484 |
+
.wpulike-animated-heart .wpulike-svg-heart-pop.three {
|
485 |
+
left: 30%;
|
486 |
+
transform: rotate(-5deg);
|
487 |
+
animation-delay: 0;
|
488 |
+
}
|
489 |
+
.wpulike-animated-heart .wpulike-svg-heart-pop.four {
|
490 |
+
left: 50%;
|
491 |
+
transform: rotate(-8deg);
|
492 |
+
animation-delay: .3s;
|
493 |
+
}
|
494 |
+
.wpulike-animated-heart .wpulike-svg-heart-pop.five {
|
495 |
+
left: 60%;
|
496 |
+
transform: rotate(-10deg);
|
497 |
+
animation-delay: .9s;
|
498 |
+
}
|
499 |
+
.wpulike-animated-heart .wpulike-svg-heart-pop.six {
|
500 |
+
left: 70%;
|
501 |
+
transform: rotate(-8deg);
|
502 |
+
animation-delay: .2;
|
503 |
+
}
|
504 |
+
.wpulike-animated-heart .wpulike-svg-heart-pop.seven {
|
505 |
+
left: 85%;
|
506 |
+
transform: rotate(6deg);
|
507 |
+
animation-delay: .35s;
|
508 |
+
}
|
509 |
+
.wpulike-animated-heart .wpulike-svg-heart-pop.eight {
|
510 |
+
left: 90%;
|
511 |
+
transform: rotate(-4deg);
|
512 |
+
animation-delay: .5s;
|
513 |
+
}
|
514 |
+
.wpulike-animated-heart .wpulike-svg-heart-pop.nine {
|
515 |
+
left: 95%;
|
516 |
+
transform: rotate(8deg);
|
517 |
+
animation-delay: .2s;
|
518 |
+
}
|
519 |
+
.wpulike-animated-heart .wp_ulike_likers_wrapper:not(.wp_ulike_display_inline) {
|
520 |
+
bottom: 30px;
|
521 |
+
}
|
522 |
+
.wpulike-animated-heart .count-box {
|
523 |
+
margin: 0 15px;
|
524 |
+
color: #ff6f63;
|
525 |
+
display: inline-block;
|
526 |
+
vertical-align: middle;
|
527 |
+
}
|
528 |
+
|
529 |
+
#buddypress #activity-stream .wpulike-animated-heart .wp_ulike_btn {
|
530 |
+
background: inherit;
|
531 |
+
border: 0;
|
532 |
+
width: 40px;
|
533 |
+
height: 40px;
|
534 |
+
}
|
535 |
+
#buddypress #activity-stream .wpulike-animated-heart .wp_ulike_btn.image-unlike {
|
536 |
+
background-color: #ff6f63;
|
537 |
+
}
|
538 |
+
|
539 |
+
@keyframes popHearts {
|
540 |
+
0% {
|
541 |
+
left: calc(50% - 7px);
|
542 |
+
top: 10px;
|
543 |
+
}
|
544 |
+
20% {
|
545 |
+
opacity: 1;
|
546 |
+
}
|
547 |
+
80% {
|
548 |
+
top: -20px;
|
549 |
+
}
|
550 |
+
100% {
|
551 |
+
opacity: 0;
|
552 |
+
}
|
553 |
+
}
|
554 |
/**
|
555 |
* Widgets & Likers Box
|
556 |
*/
|
assets/css/wp-ulike.min.css
CHANGED
@@ -3,4 +3,4 @@
|
|
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;vertical-align:middle;border-radius:.25em;box-shadow:none;padding:15px 25px;border:none;text-align:center;transition-property:none}.wpulike .wp_ulike_btn:active,.wpulike .wp_ulike_btn:focus,.wpulike .wp_ulike_btn:hover{outline:0}.wpulike .wp_ulike_put_text{font-size:14px;font-weight:600;line-height:28px;padding:0 10px;min-width:50px}.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 10px;box-shadow:0 0 0 1px #bdbdbd inset;color:#616161;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-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}#buddypress #activity-stream .wp_ulike_likers_wrapper .wp-ulike-liker,#buddypress #activity-stream .wp_ulike_likers_wrapper li{border:none;padding:0}#buddypress #activity-stream .wp_ulike_likers_wrapper .wp-ulike-liker a,#buddypress #activity-stream .wp_ulike_likers_wrapper .wp-ulike-liker img,#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 .wp_ulike_likers_wrapper:not(.wp_ulike_display_inline) .wp-ulike-likers-list,#bbpress-forums .wp_ulike_likers_wrapper:not(.wp_ulike_display_inline) ul{margin:0!important}#bbpress-forums .wp_ulike_likers_wrapper:not(.wp_ulike_display_inline) .wp-ulike-likers-list li,#bbpress-forums .wp_ulike_likers_wrapper:not(.wp_ulike_display_inline) ul li{list-style-type:none}.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_put_text{padding:0 5px;text-transform:uppercase;font-weight:600;color:#757575}.wpulike-heart .wp_ulike_btn{background:0 0}.wpulike-heart .wp_ulike_likers_wrapper:not(.wp_ulike_display_inline){bottom:10px}.wpulike-heart .wp_ulike_put_image{background:0 0;padding:15px}.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;text-align:center;font-weight:600;vertical-align:middle;padding:0 5px}#buddypress #activity-stream .acomment-options,#buddypress #activity-stream .activity-meta{display:flex;align-items:center}#buddypress #activity-stream .acomment-options .wpulike-heart .wp_ulike_put_image,#buddypress #activity-stream .activity-meta .wpulike-heart .wp_ulike_put_image{padding:10px 15px}#buddypress #activity-stream .acomment-options .wpulike-heart .wp_ulike_general_class,#buddypress #activity-stream .activity-meta .wpulike-heart .wp_ulike_general_class{border-radius:0;padding:.2em .5em;margin-bottom:0}@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:not(.wp_ulike_display_inline){bottom:5px}.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{margin:10px 0}.wp_ulike_likers_wrapper:empty{display:none}.wp_ulike_likers_wrapper:not(.wp_ulike_display_inline){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:not(.wp_ulike_display_inline):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}.wp_ulike_likers_wrapper .tiles,.wp_ulike_likers_wrapper .wp-ulike-likers-list{display:flex;align-items:center;flex-wrap:wrap;margin:0;padding:0}.wp_ulike_likers_wrapper .tiles .wp-ulike-liker,.wp_ulike_likers_wrapper .tiles li,.wp_ulike_likers_wrapper .wp-ulike-likers-list .wp-ulike-liker,.wp_ulike_likers_wrapper .wp-ulike-likers-list li{padding:3px;margin:0;list-style:none}.wp_ulike_likers_wrapper .tiles .wp-ulike-liker a>img,.wp_ulike_likers_wrapper .tiles li a>img,.wp_ulike_likers_wrapper .wp-ulike-likers-list .wp-ulike-liker a>img,.wp_ulike_likers_wrapper .wp-ulike-likers-list li a>img{border-radius:5px;display:block;border:0;box-shadow:none}.wpulike:hover .wp_ulike_likers_wrapper:not(.wp_ulike_display_inline){transform:translateY(-40px);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,.commentlist .wp-ulike-liker .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:not(.wp_ulike_display_inline){left:auto;right:0}.rtl .wp_ulike_likers_wrapper:not(.wp_ulike_display_inline):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}}
|
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;vertical-align:middle;border-radius:.25em;box-shadow:none;padding:15px 25px;border:none;text-align:center;transition-property:none}.wpulike .wp_ulike_btn:active,.wpulike .wp_ulike_btn:focus,.wpulike .wp_ulike_btn:hover{outline:0}.wpulike .wp_ulike_put_text{font-size:14px;font-weight:600;line-height:28px;padding:0 10px;min-width:50px}.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;min-height:30px;min-width:50px}.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 10px;box-shadow:0 0 0 1px #bdbdbd inset;color:#616161;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-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;font-size:initial;padding:initial}#buddypress #activity-stream .wp_ulike_likers_wrapper .wp-ulike-liker,#buddypress #activity-stream .wp_ulike_likers_wrapper li{border:none;padding:0}#buddypress #activity-stream .wp_ulike_likers_wrapper .wp-ulike-liker a,#buddypress #activity-stream .wp_ulike_likers_wrapper .wp-ulike-liker img,#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 .wp_ulike_likers_wrapper:not(.wp_ulike_display_inline) .wp-ulike-likers-list,#bbpress-forums .wp_ulike_likers_wrapper:not(.wp_ulike_display_inline) ul{margin:0!important}#bbpress-forums .wp_ulike_likers_wrapper:not(.wp_ulike_display_inline) .wp-ulike-likers-list li,#bbpress-forums .wp_ulike_likers_wrapper:not(.wp_ulike_display_inline) ul li{list-style-type:none}.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_put_text{padding:0 5px;text-transform:uppercase;font-weight:600;color:#757575}.wpulike-heart .wp_ulike_btn{background:0 0}.wpulike-heart .wp_ulike_likers_wrapper:not(.wp_ulike_display_inline){bottom:10px}.wpulike-heart .wp_ulike_put_image{background:0 0;padding:15px}.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;text-align:center;font-weight:600;vertical-align:middle;padding:0 5px}#buddypress #activity-stream .wpulike-heart .wp_ulike_btn{background:0 0;border:0;font-size:initial;padding:initial}#buddypress #activity-stream .wpulike-heart .wp_ulike_put_image{padding:10px 15px}#buddypress #activity-stream .wpulike-heart .wp_ulike_general_class{border-radius:0;padding:.2em .5em;margin-bottom:0}#buddypress #activity-stream .acomment-options,#buddypress #activity-stream .activity-meta{display:flex;align-items:center}@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:not(.wp_ulike_display_inline){bottom:5px}.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}.wpulike-animated-heart .wp_ulike_btn{position:relative;border-radius:50em;background-color:#fff;padding:0;box-shadow:0 5px 30px rgba(255,111,99,.4);border:0;width:50px;height:50px}.wpulike-animated-heart .wp_ulike_btn.image-unlike{background-color:#ff6f63}.wpulike-animated-heart .wp_ulike_btn.image-unlike .wpulike-svg-heart{fill:#fff}.wpulike-animated-heart .wp_ulike_btn.image-unlike .wpulike-svg-heart-pop{animation-direction:normal}.wpulike-animated-heart .wp_ulike_btn:active{box-shadow:0 0 4px 0 rgba(0,0,0,.25)}.wpulike-animated-heart .wpulike-svg-heart{width:20px;fill:#ff6f63;transition:fill .5s,transform .5s;pointer-events:none;position:absolute;left:50%;top:50%;transform:translateX(-50%) translateY(-50%)}.wpulike-animated-heart .wpulike-svg-heart-pop{position:absolute;width:30%;fill:#ff6f63;opacity:0;left:0;animation:popHearts 1s ease forwards reverse}.wpulike-animated-heart .wpulike-svg-heart-pop.one{left:1%;transform:rotate(-10deg);animation-delay:.45}.wpulike-animated-heart .wpulike-svg-heart-pop.two{left:15%;transform:rotate(8deg);animation-delay:.25s}.wpulike-animated-heart .wpulike-svg-heart-pop.three{left:30%;transform:rotate(-5deg);animation-delay:0}.wpulike-animated-heart .wpulike-svg-heart-pop.four{left:50%;transform:rotate(-8deg);animation-delay:.3s}.wpulike-animated-heart .wpulike-svg-heart-pop.five{left:60%;transform:rotate(-10deg);animation-delay:.9s}.wpulike-animated-heart .wpulike-svg-heart-pop.six{left:70%;transform:rotate(-8deg);animation-delay:.2}.wpulike-animated-heart .wpulike-svg-heart-pop.seven{left:85%;transform:rotate(6deg);animation-delay:.35s}.wpulike-animated-heart .wpulike-svg-heart-pop.eight{left:90%;transform:rotate(-4deg);animation-delay:.5s}.wpulike-animated-heart .wpulike-svg-heart-pop.nine{left:95%;transform:rotate(8deg);animation-delay:.2s}.wpulike-animated-heart .wp_ulike_likers_wrapper:not(.wp_ulike_display_inline){bottom:30px}.wpulike-animated-heart .count-box{margin:0 15px;color:#ff6f63;display:inline-block;vertical-align:middle}#buddypress #activity-stream .wpulike-animated-heart .wp_ulike_btn{background:inherit;border:0;width:40px;height:40px}#buddypress #activity-stream .wpulike-animated-heart .wp_ulike_btn.image-unlike{background-color:#ff6f63}@keyframes popHearts{0%{left:calc(50% - 7px);top:10px}20%{opacity:1}80%{top:-20px}100%{opacity:0}}.wp_ulike_likers_wrapper{margin:10px 0}.wp_ulike_likers_wrapper:empty{display:none}.wp_ulike_likers_wrapper:not(.wp_ulike_display_inline){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:not(.wp_ulike_display_inline):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}.wp_ulike_likers_wrapper .tiles,.wp_ulike_likers_wrapper .wp-ulike-likers-list{display:flex;align-items:center;flex-wrap:wrap;margin:0;padding:0}.wp_ulike_likers_wrapper .tiles .wp-ulike-liker,.wp_ulike_likers_wrapper .tiles li,.wp_ulike_likers_wrapper .wp-ulike-likers-list .wp-ulike-liker,.wp_ulike_likers_wrapper .wp-ulike-likers-list li{padding:3px;margin:0;list-style:none}.wp_ulike_likers_wrapper .tiles .wp-ulike-liker a>img,.wp_ulike_likers_wrapper .tiles li a>img,.wp_ulike_likers_wrapper .wp-ulike-likers-list .wp-ulike-liker a>img,.wp_ulike_likers_wrapper .wp-ulike-likers-list li a>img{border-radius:5px;display:block;border:0;box-shadow:none}.wpulike:hover .wp_ulike_likers_wrapper:not(.wp_ulike_display_inline){transform:translateY(-40px);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,.commentlist .wp-ulike-liker .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:not(.wp_ulike_display_inline){left:auto;right:0}.rtl .wp_ulike_likers_wrapper:not(.wp_ulike_display_inline):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/animated-heart.svg
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" standalone="no"?>
|
2 |
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
3 |
+
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
4 |
+
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
5 |
+
width="126.000000pt" height="67.000000pt" viewBox="0 0 126.000000 67.000000"
|
6 |
+
preserveAspectRatio="xMidYMid meet">
|
7 |
+
|
8 |
+
<g transform="translate(0.000000,67.000000) scale(0.100000,-0.100000)"
|
9 |
+
fill="#cdcdcd" stroke="none">
|
10 |
+
<path d="M295 571 c-116 -30 -188 -122 -189 -241 0 -119 74 -211 194 -240 101
|
11 |
+
-24 214 27 265 121 85 157 -14 345 -191 363 -27 3 -62 1 -79 -3z m43 -163 c9
|
12 |
+
-9 15 -9 24 0 31 31 88 -1 88 -51 0 -23 -11 -41 -46 -74 -26 -24 -50 -43 -54
|
13 |
+
-43 -4 0 -28 19 -54 43 -34 32 -46 51 -46 72 0 51 56 85 88 53z"/>
|
14 |
+
<path d="M820 423 c0 -10 -3 -28 -6 -41 -6 -22 -5 -23 28 -17 28 5 37 3 42
|
15 |
+
-11 9 -24 -19 -53 -36 -36 -7 7 -18 12 -25 12 -22 0 -14 -20 12 -32 37 -17 75
|
16 |
+
3 75 40 0 34 -16 52 -47 52 -14 0 -23 6 -23 15 0 10 10 15 30 15 17 0 30 5 30
|
17 |
+
10 0 6 -18 10 -40 10 -31 0 -40 -4 -40 -17z"/>
|
18 |
+
<path d="M940 423 c0 -10 -3 -28 -6 -41 -6 -22 -5 -23 28 -17 28 5 37 3 42
|
19 |
+
-11 9 -24 -19 -53 -36 -36 -7 7 -18 12 -25 12 -22 0 -14 -20 12 -32 37 -17 75
|
20 |
+
3 75 40 0 34 -16 52 -47 52 -14 0 -23 6 -23 15 0 10 10 15 30 15 17 0 30 5 30
|
21 |
+
10 0 6 -18 10 -40 10 -31 0 -40 -4 -40 -17z"/>
|
22 |
+
<path d="M1090 400 c0 -13 -7 -20 -20 -20 -11 0 -20 -4 -20 -10 0 -5 9 -10 20
|
23 |
+
-10 15 0 20 -7 20 -25 0 -31 17 -33 22 -2 2 14 11 23 26 25 30 5 28 22 -3 22
|
24 |
+
-18 0 -25 5 -25 20 0 11 -4 20 -10 20 -5 0 -10 -9 -10 -20z"/>
|
25 |
+
</g>
|
26 |
+
</svg>
|
assets/js/wp-ulike.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
/*! WP ULike - v3.6.
|
2 |
* https://wpulike.com
|
3 |
* Alimir 2019;
|
4 |
*/
|
@@ -122,7 +122,7 @@
|
|
122 |
|
123 |
|
124 |
/* 'WordpressUlike' plugin : https://github.com/alimir/wp-ulike */
|
125 |
-
(function($, window, document, undefined) {
|
126 |
"use strict";
|
127 |
|
128 |
// Create the defaults once
|
@@ -135,6 +135,8 @@
|
|
135 |
type:
|
136 |
"" /* Values : likeThis (Posts),likeThisComment, likeThisActivity, likeThisTopic */,
|
137 |
likeStatus: 0 /* Values : 0 (Is not logged-in), 1 (Is not liked), 2 (Is liked), 3 (Is unliked), 4 (Already liked) */,
|
|
|
|
|
138 |
counterSelector: ".count-box",
|
139 |
generalSelector: ".wp_ulike_general_class",
|
140 |
buttonSelector: ".wp_ulike_btn",
|
@@ -144,6 +146,8 @@
|
|
144 |
"ulike-id": "ID",
|
145 |
"ulike-nonce": "nonce",
|
146 |
"ulike-type": "type",
|
|
|
|
|
147 |
"ulike-status": "likeStatus"
|
148 |
};
|
149 |
|
@@ -176,7 +180,7 @@
|
|
176 |
|
177 |
// Avoid Plugin.prototype conflicts
|
178 |
$.extend(Plugin.prototype, {
|
179 |
-
init: function() {
|
180 |
//Call _ajaxify function on click button
|
181 |
this.buttonElement.click(this._initLike.bind(this));
|
182 |
//Call _ajaxify function on click button
|
@@ -186,7 +190,7 @@
|
|
186 |
/**
|
187 |
* global AJAX callback
|
188 |
*/
|
189 |
-
_ajax: function(args, callback) {
|
190 |
// Do Ajax & update default value
|
191 |
$.ajax({
|
192 |
url: wp_ulike_params.ajax_url,
|
@@ -200,7 +204,7 @@
|
|
200 |
/**
|
201 |
* init ulike core process
|
202 |
*/
|
203 |
-
_initLike: function(event) {
|
204 |
// Prevents further propagation of the current event in the capturing and bubbling phases
|
205 |
event.stopPropagation();
|
206 |
// check for same buttons
|
@@ -220,12 +224,14 @@
|
|
220 |
status: this.settings.likeStatus,
|
221 |
type: this.settings.type
|
222 |
},
|
223 |
-
function(response) {
|
224 |
//remove progress class
|
225 |
this.generalElement.removeClass("wp_ulike_is_loading");
|
226 |
// Make changes
|
227 |
if (response.success) {
|
228 |
this._updateMarkup(response);
|
|
|
|
|
229 |
} else {
|
230 |
this._sendNotification("error", response.data);
|
231 |
}
|
@@ -237,10 +243,26 @@
|
|
237 |
);
|
238 |
},
|
239 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
240 |
/**
|
241 |
* update button markup and calling some actions
|
242 |
*/
|
243 |
-
_updateMarkup: function(response) {
|
244 |
//check likeStatus
|
245 |
switch (this.settings.likeStatus) {
|
246 |
case 1 /* Change the status of 'is not liked' to 'liked' */:
|
@@ -323,7 +345,7 @@
|
|
323 |
/**
|
324 |
* init & update likers box
|
325 |
*/
|
326 |
-
_updateLikers: function() {
|
327 |
// Get likers box container element
|
328 |
this.likersElement = this._getLikersElement();
|
329 |
// Make a request to generate or refresh the likers box
|
@@ -339,7 +361,7 @@
|
|
339 |
type: this.settings.type,
|
340 |
refresh: this._refreshTheLikers ? 1 : 0
|
341 |
},
|
342 |
-
function(response) {
|
343 |
// Remove progress status class
|
344 |
this.generalElement.removeClass("wp_ulike_is_getting_likers_list");
|
345 |
// Change markup
|
@@ -366,7 +388,7 @@
|
|
366 |
/**
|
367 |
* Update the elements of same buttons at the same time
|
368 |
*/
|
369 |
-
_updateSameButtons: function() {
|
370 |
// Get buttons with same unique class names
|
371 |
this.sameButtons = $document.find(
|
372 |
".wp_" + this.settings.type.toLowerCase() + "_" + this.settings.ID
|
@@ -386,7 +408,7 @@
|
|
386 |
/**
|
387 |
* Get likers wrapper element
|
388 |
*/
|
389 |
-
_getLikersElement: function() {
|
390 |
if (this.generalElement.length > 1) {
|
391 |
return this.generalElement.next(this.settings.likersSelector);
|
392 |
} else {
|
@@ -397,7 +419,7 @@
|
|
397 |
/**
|
398 |
* Control actions
|
399 |
*/
|
400 |
-
_controlActions: function(messageType, messageText, btnText, likeStatus) {
|
401 |
//check the button types
|
402 |
if (this.buttonElement.hasClass("wp_ulike_put_image")) {
|
403 |
if (likeStatus === 3 || likeStatus === 2) {
|
@@ -414,7 +436,7 @@
|
|
414 |
/**
|
415 |
* Send notification by 'WordpressUlikeNotifications' plugin
|
416 |
*/
|
417 |
-
_sendNotification: function(messageType, messageText) {
|
418 |
//Check notifications active mode
|
419 |
if (wp_ulike_params.notifications !== "1") {
|
420 |
return;
|
@@ -429,8 +451,8 @@
|
|
429 |
|
430 |
// A really lightweight plugin wrapper around the constructor,
|
431 |
// preventing against multiple instantiations
|
432 |
-
$.fn[pluginName] = function(options) {
|
433 |
-
return this.each(function() {
|
434 |
if (!$.data(this, "plugin_" + pluginName)) {
|
435 |
$.data(this, "plugin_" + pluginName, new Plugin(this, options));
|
436 |
}
|
1 |
+
/*! WP ULike - v3.6.2
|
2 |
* https://wpulike.com
|
3 |
* Alimir 2019;
|
4 |
*/
|
122 |
|
123 |
|
124 |
/* 'WordpressUlike' plugin : https://github.com/alimir/wp-ulike */
|
125 |
+
(function ($, window, document, undefined) {
|
126 |
"use strict";
|
127 |
|
128 |
// Create the defaults once
|
135 |
type:
|
136 |
"" /* Values : likeThis (Posts),likeThisComment, likeThisActivity, likeThisTopic */,
|
137 |
likeStatus: 0 /* Values : 0 (Is not logged-in), 1 (Is not liked), 2 (Is liked), 3 (Is unliked), 4 (Already liked) */,
|
138 |
+
append: '',
|
139 |
+
appendTimeout: 2000,
|
140 |
counterSelector: ".count-box",
|
141 |
generalSelector: ".wp_ulike_general_class",
|
142 |
buttonSelector: ".wp_ulike_btn",
|
146 |
"ulike-id": "ID",
|
147 |
"ulike-nonce": "nonce",
|
148 |
"ulike-type": "type",
|
149 |
+
"ulike-append": "append",
|
150 |
+
"ulike-append-timeout": "appendTimeout",
|
151 |
"ulike-status": "likeStatus"
|
152 |
};
|
153 |
|
180 |
|
181 |
// Avoid Plugin.prototype conflicts
|
182 |
$.extend(Plugin.prototype, {
|
183 |
+
init: function () {
|
184 |
//Call _ajaxify function on click button
|
185 |
this.buttonElement.click(this._initLike.bind(this));
|
186 |
//Call _ajaxify function on click button
|
190 |
/**
|
191 |
* global AJAX callback
|
192 |
*/
|
193 |
+
_ajax: function (args, callback) {
|
194 |
// Do Ajax & update default value
|
195 |
$.ajax({
|
196 |
url: wp_ulike_params.ajax_url,
|
204 |
/**
|
205 |
* init ulike core process
|
206 |
*/
|
207 |
+
_initLike: function (event) {
|
208 |
// Prevents further propagation of the current event in the capturing and bubbling phases
|
209 |
event.stopPropagation();
|
210 |
// check for same buttons
|
224 |
status: this.settings.likeStatus,
|
225 |
type: this.settings.type
|
226 |
},
|
227 |
+
function (response) {
|
228 |
//remove progress class
|
229 |
this.generalElement.removeClass("wp_ulike_is_loading");
|
230 |
// Make changes
|
231 |
if (response.success) {
|
232 |
this._updateMarkup(response);
|
233 |
+
// Append html data
|
234 |
+
this._appendChild();
|
235 |
} else {
|
236 |
this._sendNotification("error", response.data);
|
237 |
}
|
243 |
);
|
244 |
},
|
245 |
|
246 |
+
|
247 |
+
/**
|
248 |
+
* append child
|
249 |
+
*/
|
250 |
+
_appendChild: function () {
|
251 |
+
if (this.settings.append !== '') {
|
252 |
+
var $appendedElement = $(this.settings.append);
|
253 |
+
this.buttonElement.append($appendedElement);
|
254 |
+
if (this.settings.appendTimeout) {
|
255 |
+
setTimeout(function () {
|
256 |
+
$appendedElement.detach();
|
257 |
+
}, this.settings.appendTimeout);
|
258 |
+
}
|
259 |
+
}
|
260 |
+
},
|
261 |
+
|
262 |
/**
|
263 |
* update button markup and calling some actions
|
264 |
*/
|
265 |
+
_updateMarkup: function (response) {
|
266 |
//check likeStatus
|
267 |
switch (this.settings.likeStatus) {
|
268 |
case 1 /* Change the status of 'is not liked' to 'liked' */:
|
345 |
/**
|
346 |
* init & update likers box
|
347 |
*/
|
348 |
+
_updateLikers: function () {
|
349 |
// Get likers box container element
|
350 |
this.likersElement = this._getLikersElement();
|
351 |
// Make a request to generate or refresh the likers box
|
361 |
type: this.settings.type,
|
362 |
refresh: this._refreshTheLikers ? 1 : 0
|
363 |
},
|
364 |
+
function (response) {
|
365 |
// Remove progress status class
|
366 |
this.generalElement.removeClass("wp_ulike_is_getting_likers_list");
|
367 |
// Change markup
|
388 |
/**
|
389 |
* Update the elements of same buttons at the same time
|
390 |
*/
|
391 |
+
_updateSameButtons: function () {
|
392 |
// Get buttons with same unique class names
|
393 |
this.sameButtons = $document.find(
|
394 |
".wp_" + this.settings.type.toLowerCase() + "_" + this.settings.ID
|
408 |
/**
|
409 |
* Get likers wrapper element
|
410 |
*/
|
411 |
+
_getLikersElement: function () {
|
412 |
if (this.generalElement.length > 1) {
|
413 |
return this.generalElement.next(this.settings.likersSelector);
|
414 |
} else {
|
419 |
/**
|
420 |
* Control actions
|
421 |
*/
|
422 |
+
_controlActions: function (messageType, messageText, btnText, likeStatus) {
|
423 |
//check the button types
|
424 |
if (this.buttonElement.hasClass("wp_ulike_put_image")) {
|
425 |
if (likeStatus === 3 || likeStatus === 2) {
|
436 |
/**
|
437 |
* Send notification by 'WordpressUlikeNotifications' plugin
|
438 |
*/
|
439 |
+
_sendNotification: function (messageType, messageText) {
|
440 |
//Check notifications active mode
|
441 |
if (wp_ulike_params.notifications !== "1") {
|
442 |
return;
|
451 |
|
452 |
// A really lightweight plugin wrapper around the constructor,
|
453 |
// preventing against multiple instantiations
|
454 |
+
$.fn[pluginName] = function (options) {
|
455 |
+
return this.each(function () {
|
456 |
if (!$.data(this, "plugin_" + pluginName)) {
|
457 |
$.data(this, "plugin_" + pluginName, new Plugin(this, options));
|
458 |
}
|
assets/js/wp-ulike.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(s,e,t,i){"use strict";var n="WordpressUlikeNotifications",a={messageType:"success",messageText:"Hello World!",messageElement:"wpulike-message",notifContainer:"wpulike-notification"};function l(e,t){this.element=e,this.$element=s(e),this.settings=s.extend({},a,t),this._defaults=a,this._name=n,this.init()}s.extend(l.prototype,{init:function(){this._message(),this._container(),this._append(),this._remove()},_message:function(){this.$messageElement=s("<div/>").addClass(this.settings.messageElement+" wpulike-"+this.settings.messageType).text(this.settings.messageText)},_container:function(){s("."+this.settings.notifContainer).length||this.$element.append(s("<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(){s(this).fadeOut(300,function(){s(this).remove(),s("."+e.settings.messageElement).length||e.$notifContainer.remove()}).trigger("WordpressUlikeRemoveNotification")}),setTimeout(function(){e.$messageElement.fadeOut(300,function(){s(this).remove(),s("."+e.settings.messageElement).length||e.$notifContainer.remove()}).trigger("WordpressUlikeRemoveNotification")},8e3)}}),s.fn[n]=function(e){return this.each(function(){new l(this,e)})}}(jQuery,window,document),function(n,e,s,t){"use strict";var a="WordpressUlike",i=(n(e),n(s)),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,t){for(var s in this.element=e,this.$element=n(e),this.settings=n.extend({},l,t),this._defaults=l,this._name=a,this._refreshTheLikers=!1,this.buttonElement=this.$element.find(this.settings.buttonSelector),this.generalElement=this.$element.find(this.settings.generalSelector),this.counterElement=this.generalElement.find(this.settings.counterSelector),o){var i=this.buttonElement.data(s);void 0!==i&&(this.settings[o[s]]=i)}this.init()}n.extend(r.prototype,{init:function(){this.buttonElement.click(this._initLike.bind(this)),this.buttonElement.hover(this._updateLikers.bind(this))},_ajax:function(e,t){n.ajax({url:wp_ulike_params.ajax_url,type:"POST",cache:!1,dataType:"json",data:e}).done(t)},_initLike:function(e){e.stopPropagation(),this._updateSameButtons(),this.buttonElement.prop("disabled",!0),i.trigger("WordpressUlikeLoading",this.element),this.generalElement.addClass("wp_ulike_is_loading"),this._ajax({action:"wp_ulike_process",id:this.settings.ID,nonce:this.settings.nonce,status:this.settings.likeStatus,type:this.settings.type},function(e){this.generalElement.removeClass("wp_ulike_is_loading"),e.success?this._updateMarkup(e):this._sendNotification("error",e.data),this.buttonElement.prop("disabled",!1),i.trigger("WordpressUlikeUpdated",this.element)}.bind(this))},_updateMarkup: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._controlActions("success",e.data.message,e.data.btnText,4),this._refreshTheLikers=!0;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._controlActions("error",e.data.message,e.data.btnText,3),this._refreshTheLikers=!0;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._controlActions("success",e.data.message,e.data.btnText,2),this._refreshTheLikers=!0;break;case 4:this._controlActions("info",e.data.message,e.data.btnText,4),this.generalElement.children().first().addClass("wp_ulike_click_is_disabled");break;default:this._controlActions("warning",e.data.message,e.data.btnText,0)}this._refreshTheLikers&&this._updateLikers()},_updateLikers:function(){this.likersElement=this._getLikersElement(),this.likersElement.length&&!this._refreshTheLikers||(this.generalElement.addClass("wp_ulike_is_getting_likers_list"),this._ajax({action:"wp_ulike_get_likers",id:this.settings.ID,nonce:this.settings.nonce,type:this.settings.type,refresh:this._refreshTheLikers?1:0},function(e){this.generalElement.removeClass("wp_ulike_is_getting_likers_list"),e.success&&(this.likersElement.length||(this.likersElement=n("<div>",{class:e.data.class}).appendTo(this.$element)),e.data.template?this.likersElement.show().html(e.data.template):this.likersElement.hide()),this._refreshTheLikers=!1}.bind(this)))},_updateSameButtons:function(){this.sameButtons=i.find(".wp_"+this.settings.type.toLowerCase()+"_"+this.settings.ID),1<this.sameButtons.length&&(this.buttonElement=this.sameButtons,this.generalElement=this.buttonElement.closest(this.settings.generalSelector),this.counterElement=this.generalElement.find(this.settings.counterSelector))},_getLikersElement:function(){return 1<this.generalElement.length?this.generalElement.next(this.settings.likersSelector):this.$element.find(this.settings.likersSelector)},_controlActions:function(e,t,s,i){this.buttonElement.hasClass("wp_ulike_put_image")?3!==i&&2!==i||this.buttonElement.toggleClass("image-unlike"):this.buttonElement.hasClass("wp_ulike_put_text")&&this.buttonElement.find("span").html(s),this._sendNotification(e,t)},_sendNotification:function(e,t){"1"===wp_ulike_params.notifications&&n(s.body).WordpressUlikeNotifications({messageType:e,messageText:t})}}),n.fn[a]=function(e){return this.each(function(){n.data(this,"plugin_"+a)||n.data(this,"plugin_"+a,new r(this,e))})}}(jQuery,window,document),function(t){t(function(){t(this).bind("DOMNodeInserted",function(e){t(".wpulike").WordpressUlike()})}),t(".wpulike").WordpressUlike()}(jQuery);
|
1 |
+
!function(s,e,t,i){"use strict";var n="WordpressUlikeNotifications",a={messageType:"success",messageText:"Hello World!",messageElement:"wpulike-message",notifContainer:"wpulike-notification"};function l(e,t){this.element=e,this.$element=s(e),this.settings=s.extend({},a,t),this._defaults=a,this._name=n,this.init()}s.extend(l.prototype,{init:function(){this._message(),this._container(),this._append(),this._remove()},_message:function(){this.$messageElement=s("<div/>").addClass(this.settings.messageElement+" wpulike-"+this.settings.messageType).text(this.settings.messageText)},_container:function(){s("."+this.settings.notifContainer).length||this.$element.append(s("<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(){s(this).fadeOut(300,function(){s(this).remove(),s("."+e.settings.messageElement).length||e.$notifContainer.remove()}).trigger("WordpressUlikeRemoveNotification")}),setTimeout(function(){e.$messageElement.fadeOut(300,function(){s(this).remove(),s("."+e.settings.messageElement).length||e.$notifContainer.remove()}).trigger("WordpressUlikeRemoveNotification")},8e3)}}),s.fn[n]=function(e){return this.each(function(){new l(this,e)})}}(jQuery,window,document),function(n,e,s,t){"use strict";var a="WordpressUlike",i=(n(e),n(s)),l={ID:0,nonce:0,type:"",likeStatus:0,append:"",appendTimeout:2e3,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-append":"append","ulike-append-timeout":"appendTimeout","ulike-status":"likeStatus"};function r(e,t){for(var s in this.element=e,this.$element=n(e),this.settings=n.extend({},l,t),this._defaults=l,this._name=a,this._refreshTheLikers=!1,this.buttonElement=this.$element.find(this.settings.buttonSelector),this.generalElement=this.$element.find(this.settings.generalSelector),this.counterElement=this.generalElement.find(this.settings.counterSelector),o){var i=this.buttonElement.data(s);void 0!==i&&(this.settings[o[s]]=i)}this.init()}n.extend(r.prototype,{init:function(){this.buttonElement.click(this._initLike.bind(this)),this.buttonElement.hover(this._updateLikers.bind(this))},_ajax:function(e,t){n.ajax({url:wp_ulike_params.ajax_url,type:"POST",cache:!1,dataType:"json",data:e}).done(t)},_initLike:function(e){e.stopPropagation(),this._updateSameButtons(),this.buttonElement.prop("disabled",!0),i.trigger("WordpressUlikeLoading",this.element),this.generalElement.addClass("wp_ulike_is_loading"),this._ajax({action:"wp_ulike_process",id:this.settings.ID,nonce:this.settings.nonce,status:this.settings.likeStatus,type:this.settings.type},function(e){this.generalElement.removeClass("wp_ulike_is_loading"),e.success?(this._updateMarkup(e),this._appendChild()):this._sendNotification("error",e.data),this.buttonElement.prop("disabled",!1),i.trigger("WordpressUlikeUpdated",this.element)}.bind(this))},_appendChild:function(){if(""!==this.settings.append){var e=n(this.settings.append);this.buttonElement.append(e),this.settings.appendTimeout&&setTimeout(function(){e.detach()},this.settings.appendTimeout)}},_updateMarkup: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._controlActions("success",e.data.message,e.data.btnText,4),this._refreshTheLikers=!0;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._controlActions("error",e.data.message,e.data.btnText,3),this._refreshTheLikers=!0;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._controlActions("success",e.data.message,e.data.btnText,2),this._refreshTheLikers=!0;break;case 4:this._controlActions("info",e.data.message,e.data.btnText,4),this.generalElement.children().first().addClass("wp_ulike_click_is_disabled");break;default:this._controlActions("warning",e.data.message,e.data.btnText,0)}this._refreshTheLikers&&this._updateLikers()},_updateLikers:function(){this.likersElement=this._getLikersElement(),this.likersElement.length&&!this._refreshTheLikers||(this.generalElement.addClass("wp_ulike_is_getting_likers_list"),this._ajax({action:"wp_ulike_get_likers",id:this.settings.ID,nonce:this.settings.nonce,type:this.settings.type,refresh:this._refreshTheLikers?1:0},function(e){this.generalElement.removeClass("wp_ulike_is_getting_likers_list"),e.success&&(this.likersElement.length||(this.likersElement=n("<div>",{class:e.data.class}).appendTo(this.$element)),e.data.template?this.likersElement.show().html(e.data.template):this.likersElement.hide()),this._refreshTheLikers=!1}.bind(this)))},_updateSameButtons:function(){this.sameButtons=i.find(".wp_"+this.settings.type.toLowerCase()+"_"+this.settings.ID),1<this.sameButtons.length&&(this.buttonElement=this.sameButtons,this.generalElement=this.buttonElement.closest(this.settings.generalSelector),this.counterElement=this.generalElement.find(this.settings.counterSelector))},_getLikersElement:function(){return 1<this.generalElement.length?this.generalElement.next(this.settings.likersSelector):this.$element.find(this.settings.likersSelector)},_controlActions:function(e,t,s,i){this.buttonElement.hasClass("wp_ulike_put_image")?3!==i&&2!==i||this.buttonElement.toggleClass("image-unlike"):this.buttonElement.hasClass("wp_ulike_put_text")&&this.buttonElement.find("span").html(s),this._sendNotification(e,t)},_sendNotification:function(e,t){"1"===wp_ulike_params.notifications&&n(s.body).WordpressUlikeNotifications({messageType:e,messageText:t})}}),n.fn[a]=function(e){return this.each(function(){n.data(this,"plugin_"+a)||n.data(this,"plugin_"+a,new r(this,e))})}}(jQuery,window,document),function(t){t(function(){t(this).bind("DOMNodeInserted",function(e){t(".wpulike").WordpressUlike()})}),t(".wpulike").WordpressUlike()}(jQuery);
|
inc/general-functions.php
CHANGED
@@ -128,6 +128,11 @@ if( ! function_exists( 'wp_ulike_generate_templates_list' ) ){
|
|
128 |
'name' => __('Robeen', WP_ULIKE_SLUG),
|
129 |
'callback' => 'wp_ulike_set_robeen_template',
|
130 |
'symbol' => WP_ULIKE_ASSETS_URL . '/img/svg/twitter.svg'
|
|
|
|
|
|
|
|
|
|
|
131 |
)
|
132 |
);
|
133 |
|
@@ -332,7 +337,7 @@ if( ! function_exists( 'wp_ulike_get_options_info' ) ){
|
|
332 |
),
|
333 |
'users_liked_box_avatar_size' => array(
|
334 |
'type' => 'number',
|
335 |
-
'default' =>
|
336 |
'label' => __( 'Size of Gravatars', WP_ULIKE_SLUG),
|
337 |
'description' => __('Size of Gravatars to return (max is 512)', WP_ULIKE_SLUG)
|
338 |
),
|
@@ -423,7 +428,7 @@ if( ! function_exists( 'wp_ulike_get_options_info' ) ){
|
|
423 |
),
|
424 |
'users_liked_box_avatar_size' => array(
|
425 |
'type' => 'number',
|
426 |
-
'default' =>
|
427 |
'label' => __( 'Size of Gravatars', WP_ULIKE_SLUG),
|
428 |
'description' => __('Size of Gravatars to return (max is 512)', WP_ULIKE_SLUG)
|
429 |
),
|
@@ -520,7 +525,7 @@ if( ! function_exists( 'wp_ulike_get_options_info' ) ){
|
|
520 |
),
|
521 |
'users_liked_box_avatar_size' => array(
|
522 |
'type' => 'number',
|
523 |
-
'default' =>
|
524 |
'label' => __( 'Size of Gravatars', WP_ULIKE_SLUG),
|
525 |
'description' => __('Size of Gravatars to return (max is 512)', WP_ULIKE_SLUG)
|
526 |
),
|
@@ -636,7 +641,7 @@ if( ! function_exists( 'wp_ulike_get_options_info' ) ){
|
|
636 |
),
|
637 |
'users_liked_box_avatar_size' => array(
|
638 |
'type' => 'number',
|
639 |
-
'default' =>
|
640 |
'label' => __( 'Size of Gravatars', WP_ULIKE_SLUG),
|
641 |
'description' => __('Size of Gravatars to return (max is 512)', WP_ULIKE_SLUG)
|
642 |
),
|
@@ -796,10 +801,9 @@ if( ! function_exists( 'is_wp_ulike' ) ){
|
|
796 |
function is_wp_ulike( $options, $args = array() ){
|
797 |
|
798 |
$defaults = array(
|
799 |
-
'is_home' => is_home() && $options['home'] == '1',
|
800 |
'is_single' => is_single() && $options['single'] == '1',
|
801 |
'is_page' => is_page() && $options['page'] == '1',
|
802 |
-
'is_front' => is_front_page() || is_front_page() && is_home(), // Disable on homepage
|
803 |
'is_archive' => is_archive() && $options['archive'] == '1',
|
804 |
'is_category' => is_category() && $options['category'] == '1',
|
805 |
'is_search' => is_search() && $options['search'] == '1',
|
@@ -882,34 +886,36 @@ if( ! function_exists( 'wp_ulike_get_rating_value' ) ){
|
|
882 |
$avg = $likes->average;
|
883 |
$count = $likes->counter;
|
884 |
$date = strtotime($likes->post_date);
|
885 |
-
|
886 |
-
if
|
887 |
-
|
888 |
-
|
889 |
-
}
|
890 |
-
$decimal = 0;
|
891 |
-
if($is_decimal){
|
892 |
-
list($whole, $decimal) = explode('.', number_format(($count*100/($avg*2)), 1));
|
893 |
-
$decimal = (int)$decimal;
|
894 |
-
}
|
895 |
-
if( $date > strtotime('-1 month')) {
|
896 |
-
if($count < $avg) $rating_value = 4 + ".$decimal";
|
897 |
-
else $rating_value = 5;
|
898 |
-
} else if(($date <= strtotime('-1 month')) && ($date > strtotime('-6 month'))) {
|
899 |
-
if($count < $avg) $rating_value = 3 + ".$decimal";
|
900 |
-
else if(($count >= $avg) && ($count < ($avg*3/2))) $rating_value = 4 + ".$decimal";
|
901 |
-
else $rating_value = 5;
|
902 |
} else {
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
908 |
}
|
|
|
909 |
wp_cache_add($cache_key, $rating_value, $cache_group, HOUR_IN_SECONDS);
|
910 |
}
|
911 |
|
912 |
-
return $rating_value;
|
913 |
}
|
914 |
}
|
915 |
|
@@ -1750,4 +1756,44 @@ if( ! function_exists( 'wp_ulike_set_robeen_template' ) ){
|
|
1750 |
do_action( 'wp_ulike_after_template' );
|
1751 |
return ob_get_clean(); // data is now in here
|
1752 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1753 |
}
|
128 |
'name' => __('Robeen', WP_ULIKE_SLUG),
|
129 |
'callback' => 'wp_ulike_set_robeen_template',
|
130 |
'symbol' => WP_ULIKE_ASSETS_URL . '/img/svg/twitter.svg'
|
131 |
+
),
|
132 |
+
'wpulike-animated-heart' => array(
|
133 |
+
'name' => __('Animated Heart', WP_ULIKE_SLUG),
|
134 |
+
'callback' => 'wp_ulike_set_animated_heart_template',
|
135 |
+
'symbol' => WP_ULIKE_ASSETS_URL . '/img/svg/animated-heart.svg'
|
136 |
)
|
137 |
);
|
138 |
|
337 |
),
|
338 |
'users_liked_box_avatar_size' => array(
|
339 |
'type' => 'number',
|
340 |
+
'default' => 64,
|
341 |
'label' => __( 'Size of Gravatars', WP_ULIKE_SLUG),
|
342 |
'description' => __('Size of Gravatars to return (max is 512)', WP_ULIKE_SLUG)
|
343 |
),
|
428 |
),
|
429 |
'users_liked_box_avatar_size' => array(
|
430 |
'type' => 'number',
|
431 |
+
'default' => 64,
|
432 |
'label' => __( 'Size of Gravatars', WP_ULIKE_SLUG),
|
433 |
'description' => __('Size of Gravatars to return (max is 512)', WP_ULIKE_SLUG)
|
434 |
),
|
525 |
),
|
526 |
'users_liked_box_avatar_size' => array(
|
527 |
'type' => 'number',
|
528 |
+
'default' => 64,
|
529 |
'label' => __( 'Size of Gravatars', WP_ULIKE_SLUG),
|
530 |
'description' => __('Size of Gravatars to return (max is 512)', WP_ULIKE_SLUG)
|
531 |
),
|
641 |
),
|
642 |
'users_liked_box_avatar_size' => array(
|
643 |
'type' => 'number',
|
644 |
+
'default' => 64,
|
645 |
'label' => __( 'Size of Gravatars', WP_ULIKE_SLUG),
|
646 |
'description' => __('Size of Gravatars to return (max is 512)', WP_ULIKE_SLUG)
|
647 |
),
|
801 |
function is_wp_ulike( $options, $args = array() ){
|
802 |
|
803 |
$defaults = array(
|
804 |
+
'is_home' => is_front_page() && is_home() && $options['home'] == '1',
|
805 |
'is_single' => is_single() && $options['single'] == '1',
|
806 |
'is_page' => is_page() && $options['page'] == '1',
|
|
|
807 |
'is_archive' => is_archive() && $options['archive'] == '1',
|
808 |
'is_category' => is_category() && $options['category'] == '1',
|
809 |
'is_search' => is_search() && $options['search'] == '1',
|
886 |
$avg = $likes->average;
|
887 |
$count = $likes->counter;
|
888 |
$date = strtotime($likes->post_date);
|
889 |
+
|
890 |
+
// if there is no log data, set $rating_value = 5
|
891 |
+
if( $count == 0 || $avg == 0 ){
|
892 |
+
$rating_value = 5;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
893 |
} else {
|
894 |
+
$decimal = 0;
|
895 |
+
if( $is_decimal ){
|
896 |
+
list( $whole, $decimal ) = explode( '.', number_format( ( $count*100 / ( $avg * 2 ) ), 1 ) );
|
897 |
+
$decimal = (int)$decimal;
|
898 |
+
}
|
899 |
+
if( $date > strtotime('-1 month')) {
|
900 |
+
if($count < $avg) $rating_value = 4 + ".$decimal";
|
901 |
+
else $rating_value = 5;
|
902 |
+
} else if(($date <= strtotime('-1 month')) && ($date > strtotime('-6 month'))) {
|
903 |
+
if($count < $avg) $rating_value = 3 + ".$decimal";
|
904 |
+
else if(($count >= $avg) && ($count < ($avg*3/2))) $rating_value = 4 + ".$decimal";
|
905 |
+
else $rating_value = 5;
|
906 |
+
} else {
|
907 |
+
if($count < ($avg/2)) $rating_value = 1 + ".$decimal";
|
908 |
+
else if(($count >= ($avg/2)) && ($count < $avg)) $rating_value = 2 + ".$decimal";
|
909 |
+
else if(($count >= $avg) && ($count < ($avg*3/2))) $rating_value = 3 + ".$decimal";
|
910 |
+
else if(($count >= ($avg*3/2)) && ($count < ($avg*2))) $rating_value = 4 + ".$decimal";
|
911 |
+
else $rating_value = 5;
|
912 |
+
}
|
913 |
}
|
914 |
+
|
915 |
wp_cache_add($cache_key, $rating_value, $cache_group, HOUR_IN_SECONDS);
|
916 |
}
|
917 |
|
918 |
+
return apply_filters( 'wp_ulike_rating_value', $rating_value, $post_ID );
|
919 |
}
|
920 |
}
|
921 |
|
1756 |
do_action( 'wp_ulike_after_template' );
|
1757 |
return ob_get_clean(); // data is now in here
|
1758 |
}
|
1759 |
+
}
|
1760 |
+
|
1761 |
+
/**
|
1762 |
+
* Create Animated Heart template
|
1763 |
+
*
|
1764 |
+
* @author Alimir
|
1765 |
+
* @since 3.6.2
|
1766 |
+
* @return Void
|
1767 |
+
*/
|
1768 |
+
if( ! function_exists( 'wp_ulike_set_animated_heart_template' ) ){
|
1769 |
+
function wp_ulike_set_animated_heart_template( array $wp_ulike_template ){
|
1770 |
+
//This function will turn output buffering on
|
1771 |
+
ob_start();
|
1772 |
+
do_action( 'wp_ulike_before_template' );
|
1773 |
+
// Extract input array
|
1774 |
+
extract( $wp_ulike_template );
|
1775 |
+
?>
|
1776 |
+
<div class="wpulike wpulike-animated-heart <?php echo $wrapper_class; ?>" <?php echo $attributes; ?>>
|
1777 |
+
<div class="<?php echo $general_class; ?>">
|
1778 |
+
<button type="button"
|
1779 |
+
data-ulike-id="<?php echo $ID; ?>"
|
1780 |
+
data-ulike-nonce="<?php echo wp_create_nonce( $type . $ID ); ?>"
|
1781 |
+
data-ulike-type="<?php echo $type; ?>"
|
1782 |
+
data-ulike-append="<?php echo htmlspecialchars( '<svg class="wpulike-svg-heart wpulike-svg-heart-pop one" viewBox="0 0 32 29.6"><path d="M23.6,0c-3.4,0-6.3,2.7-7.6,5.6C14.7,2.7,11.8,0,8.4,0C3.8,0,0,3.8,0,8.4c0,9.4,9.5,11.9,16,21.2c6.1-9.3,16-12.1,16-21.2C32,3.8,28.2,0,23.6,0z"/></svg><svg class="wpulike-svg-heart wpulike-svg-heart-pop two" viewBox="0 0 32 29.6"><path d="M23.6,0c-3.4,0-6.3,2.7-7.6,5.6C14.7,2.7,11.8,0,8.4,0C3.8,0,0,3.8,0,8.4c0,9.4,9.5,11.9,16,21.2c6.1-9.3,16-12.1,16-21.2C32,3.8,28.2,0,23.6,0z"/></svg><svg class="wpulike-svg-heart wpulike-svg-heart-pop three" viewBox="0 0 32 29.6"><path d="M23.6,0c-3.4,0-6.3,2.7-7.6,5.6C14.7,2.7,11.8,0,8.4,0C3.8,0,0,3.8,0,8.4c0,9.4,9.5,11.9,16,21.2c6.1-9.3,16-12.1,16-21.2C32,3.8,28.2,0,23.6,0z"/></svg><svg class="wpulike-svg-heart wpulike-svg-heart-pop four" viewBox="0 0 32 29.6"><path d="M23.6,0c-3.4,0-6.3,2.7-7.6,5.6C14.7,2.7,11.8,0,8.4,0C3.8,0,0,3.8,0,8.4c0,9.4,9.5,11.9,16,21.2c6.1-9.3,16-12.1,16-21.2C32,3.8,28.2,0,23.6,0z"/></svg><svg class="wpulike-svg-heart wpulike-svg-heart-pop five" viewBox="0 0 32 29.6"><path d="M23.6,0c-3.4,0-6.3,2.7-7.6,5.6C14.7,2.7,11.8,0,8.4,0C3.8,0,0,3.8,0,8.4c0,9.4,9.5,11.9,16,21.2c6.1-9.3,16-12.1,16-21.2C32,3.8,28.2,0,23.6,0z"/></svg><svg class="wpulike-svg-heart wpulike-svg-heart-pop six" viewBox="0 0 32 29.6"><path d="M23.6,0c-3.4,0-6.3,2.7-7.6,5.6C14.7,2.7,11.8,0,8.4,0C3.8,0,0,3.8,0,8.4c0,9.4,9.5,11.9,16,21.2c6.1-9.3,16-12.1,16-21.2C32,3.8,28.2,0,23.6,0z"/></svg><svg class="wpulike-svg-heart wpulike-svg-heart-pop seven" viewBox="0 0 32 29.6"><path d="M23.6,0c-3.4,0-6.3,2.7-7.6,5.6C14.7,2.7,11.8,0,8.4,0C3.8,0,0,3.8,0,8.4c0,9.4,9.5,11.9,16,21.2c6.1-9.3,16-12.1,16-21.2C32,3.8,28.2,0,23.6,0z"/></svg><svg class="wpulike-svg-heart wpulike-svg-heart-pop eight" viewBox="0 0 32 29.6"><path d="M23.6,0c-3.4,0-6.3,2.7-7.6,5.6C14.7,2.7,11.8,0,8.4,0C3.8,0,0,3.8,0,8.4c0,9.4,9.5,11.9,16,21.2c6.1-9.3,16-12.1,16-21.2C32,3.8,28.2,0,23.6,0z"/></svg><svg class="wpulike-svg-heart wpulike-svg-heart-pop nine" viewBox="0 0 32 29.6"><path d="M23.6,0c-3.4,0-6.3,2.7-7.6,5.6C14.7,2.7,11.8,0,8.4,0C3.8,0,0,3.8,0,8.4c0,9.4,9.5,11.9,16,21.2c6.1-9.3,16-12.1,16-21.2C32,3.8,28.2,0,23.6,0z"/></svg>' ); ?>"
|
1783 |
+
data-ulike-status="<?php echo $status; ?>" class="<?php echo $button_class; ?>">
|
1784 |
+
<svg class="wpulike-svg-heart wpulike-svg-heart-icon" viewBox="0 -28 512.00002 512" xmlns="http://www.w3.org/2000/svg">
|
1785 |
+
<path
|
1786 |
+
d="m471.382812 44.578125c-26.503906-28.746094-62.871093-44.578125-102.410156-44.578125-29.554687 0-56.621094 9.34375-80.449218 27.769531-12.023438 9.300781-22.917969 20.679688-32.523438 33.960938-9.601562-13.277344-20.5-24.660157-32.527344-33.960938-23.824218-18.425781-50.890625-27.769531-80.445312-27.769531-39.539063 0-75.910156 15.832031-102.414063 44.578125-26.1875 28.410156-40.613281 67.222656-40.613281 109.292969 0 43.300781 16.136719 82.9375 50.78125 124.742187 30.992188 37.394531 75.535156 75.355469 127.117188 119.3125 17.613281 15.011719 37.578124 32.027344 58.308593 50.152344 5.476563 4.796875 12.503907 7.4375 19.792969 7.4375 7.285156 0 14.316406-2.640625 19.785156-7.429687 20.730469-18.128907 40.707032-35.152344 58.328125-50.171876 51.574219-43.949218 96.117188-81.90625 127.109375-119.304687 34.644532-41.800781 50.777344-81.4375 50.777344-124.742187 0-42.066407-14.425781-80.878907-40.617188-109.289063zm0 0" />
|
1787 |
+
</svg>
|
1788 |
+
</button>
|
1789 |
+
<?php echo $counter; ?>
|
1790 |
+
</div>
|
1791 |
+
<?php
|
1792 |
+
do_action( 'wp_ulike_inside_template', $wp_ulike_template );
|
1793 |
+
?>
|
1794 |
+
</div>
|
1795 |
+
<?php
|
1796 |
+
do_action( 'wp_ulike_after_template' );
|
1797 |
+
return ob_get_clean(); // data is now in here
|
1798 |
+
}
|
1799 |
}
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Tags: wp ulike, wordpress youlike plugin, like button, rating, vote, voting, mos
|
|
6 |
Requires PHP: 5.4
|
7 |
Requires at least: 3.5.0
|
8 |
Tested up to: 5.2.2
|
9 |
-
Stable tag: 3.6.
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
@@ -175,6 +175,12 @@ define( 'WP_MEMORY_LIMIT', '256M' );
|
|
175 |
|
176 |
== Changelog ==
|
177 |
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
= 3.6.1 =
|
179 |
* Added: Purge functionality for litespeed & w3 total cache.
|
180 |
* Added: Better process for database table creation.
|
6 |
Requires PHP: 5.4
|
7 |
Requires at least: 3.5.0
|
8 |
Tested up to: 5.2.2
|
9 |
+
Stable tag: 3.6.2
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
175 |
|
176 |
== Changelog ==
|
177 |
|
178 |
+
= 3.6.2 =
|
179 |
+
* Added: New animated heart template.
|
180 |
+
* Fixed: An issue with home page display.
|
181 |
+
* Fixed: An issue with user avatar default size.
|
182 |
+
* Fixed: Some issues with aggregaterating.
|
183 |
+
|
184 |
= 3.6.1 =
|
185 |
* Added: Purge functionality for litespeed & w3 total cache.
|
186 |
* Added: Better process for database table creation.
|
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.6.
|
14 |
* Author: Ali Mirzaei
|
15 |
* Author URI: http://alimir.ir
|
16 |
* Text Domain: wp-ulike
|
@@ -46,7 +46,7 @@ if ( defined( 'WP_INSTALLING' ) && WP_INSTALLING ) {
|
|
46 |
|
47 |
// Do not change these values
|
48 |
define( 'WP_ULIKE_PLUGIN_URI' , 'https://wpulike.com/' );
|
49 |
-
define( 'WP_ULIKE_VERSION' , '3.6.
|
50 |
define( 'WP_ULIKE_SLUG' , 'wp-ulike' );
|
51 |
|
52 |
define( 'WP_ULIKE_DIR' , plugin_dir_path( __FILE__ ) );
|
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.6.2
|
14 |
* Author: Ali Mirzaei
|
15 |
* Author URI: http://alimir.ir
|
16 |
* Text Domain: wp-ulike
|
46 |
|
47 |
// Do not change these values
|
48 |
define( 'WP_ULIKE_PLUGIN_URI' , 'https://wpulike.com/' );
|
49 |
+
define( 'WP_ULIKE_VERSION' , '3.6.2' );
|
50 |
define( 'WP_ULIKE_SLUG' , 'wp-ulike' );
|
51 |
|
52 |
define( 'WP_ULIKE_DIR' , plugin_dir_path( __FILE__ ) );
|