WP ULike - Version 3.6.1

Version Description

  • Added: Purge functionality for litespeed & w3 total cache.
  • Added: Better process for database table creation.
  • Added: Better menu labels.
  • Fixed: Some issues in likers box and some other functionalities.
  • Fixed: An issue with myCred points.
  • Fixed: Fix an issue in microdata structure.
  • Fixed: Some reported issues.
Download this release

Release Info

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

Code changes from version 3.6.0 to 3.6.1

Files changed (111) hide show
  1. admin/admin-ajax.php +0 -0
  2. admin/admin-functions.php +31 -4
  3. admin/admin-hooks.php +0 -0
  4. admin/assets/fonts/wp-ulike.eot +0 -0
  5. admin/assets/fonts/wp-ulike.svg +0 -0
  6. admin/assets/fonts/wp-ulike.ttf +0 -0
  7. admin/assets/fonts/wp-ulike.woff +0 -0
  8. admin/assets/js/plugins.js +1 -1
  9. admin/assets/js/scripts.js +1 -1
  10. admin/classes/class-wp-ulike-admin-pages.php +8 -8
  11. admin/classes/class-wp-ulike-pagination.php +0 -0
  12. admin/classes/class-wp-ulike-settings.php +0 -0
  13. admin/classes/class-wp-ulike-stats.php +3 -5
  14. admin/classes/class-wp-ulike-widget.php +0 -0
  15. admin/includes/templates/about.php +82 -145
  16. admin/index.php +0 -0
  17. assets/css/index.php +0 -0
  18. assets/css/wp-ulike.css +0 -0
  19. assets/css/wp-ulike.min.css +0 -0
  20. assets/img/ajax-bootmodal-login.jpg +0 -0
  21. assets/img/bg/button-love.png +0 -0
  22. assets/img/blue-login-themes.jpg +0 -0
  23. assets/img/custom-fileds-notifications.png +0 -0
  24. assets/img/icons/add-heart-16.png +0 -0
  25. assets/img/icons/add-heart-hover.png +0 -0
  26. assets/img/icons/add-heart.png +0 -0
  27. assets/img/icons/add-rtl.png +0 -0
  28. assets/img/icons/add.png +0 -0
  29. assets/img/icons/heart.png +0 -0
  30. assets/img/icons/loading.gif +0 -0
  31. assets/img/icons/remove-heart-16.png +0 -0
  32. assets/img/icons/remove-heart-hover.png +0 -0
  33. assets/img/icons/remove-heart.png +0 -0
  34. assets/img/icons/remove-rtl.png +0 -0
  35. assets/img/icons/remove.png +0 -0
  36. assets/img/icons/spinner.gif +0 -0
  37. assets/img/no-thumbnail.png +0 -0
  38. assets/img/stats-plan.png +0 -0
  39. assets/img/wp-ulike-badge.png +0 -0
  40. assets/img/wp-ulike-banner.png +0 -0
  41. assets/img/wp-ulike-intro.png +0 -0
  42. assets/img/wp-ulike-thumb.png +0 -0
  43. assets/index.php +0 -0
  44. assets/js/index.php +0 -0
  45. assets/js/wp-ulike.js +2 -2
  46. assets/js/wp-ulike.min.js +1 -1
  47. inc/classes/class-wp-ulike-mycred.php +2 -3
  48. inc/classes/class-wp-ulike.php +4 -0
  49. inc/general-functions.php +37 -4
  50. inc/general-hooks.php +76 -31
  51. index.php +0 -0
  52. lang/index.php +0 -0
  53. lang/readme.txt +0 -0
  54. lang/wp-ulike-NO.mo +0 -0
  55. lang/wp-ulike-NO.po +0 -0
  56. lang/wp-ulike-ar.mo +0 -0
  57. lang/wp-ulike-ar.po +0 -0
  58. lang/wp-ulike-cs_CZ.mo +0 -0
  59. lang/wp-ulike-cs_CZ.po +0 -0
  60. lang/wp-ulike-de_DE.mo +0 -0
  61. lang/wp-ulike-de_DE.po +0 -0
  62. lang/wp-ulike-el.mo +0 -0
  63. lang/wp-ulike-el.po +0 -0
  64. lang/wp-ulike-en_US.mo +0 -0
  65. lang/wp-ulike-en_US.po +0 -0
  66. lang/wp-ulike-es_ES.mo +0 -0
  67. lang/wp-ulike-es_ES.po +0 -0
  68. lang/wp-ulike-fa_IR.mo +0 -0
  69. lang/wp-ulike-fa_IR.po +0 -0
  70. lang/wp-ulike-fi.mo +0 -0
  71. lang/wp-ulike-fi.po +0 -0
  72. lang/wp-ulike-fr_FR.mo +0 -0
  73. lang/wp-ulike-fr_FR.po +0 -0
  74. lang/wp-ulike-he_IL.mo +0 -0
  75. lang/wp-ulike-he_IL.po +0 -0
  76. lang/wp-ulike-hu_HU.mo +0 -0
  77. lang/wp-ulike-hu_HU.po +0 -0
  78. lang/wp-ulike-id_ID.mo +0 -0
  79. lang/wp-ulike-id_ID.po +0 -0
  80. lang/wp-ulike-it_IT.mo +0 -0
  81. lang/wp-ulike-it_IT.po +0 -0
  82. lang/wp-ulike-ja.mo +0 -0
  83. lang/wp-ulike-ja.po +0 -0
  84. lang/wp-ulike-km.mo +0 -0
  85. lang/wp-ulike-km.po +0 -0
  86. lang/wp-ulike-lt_LT.mo +0 -0
  87. lang/wp-ulike-lt_LT.po +0 -0
  88. lang/wp-ulike-nl_NL.mo +0 -0
  89. lang/wp-ulike-nl_NL.po +0 -0
  90. lang/wp-ulike-pl_PL.mo +0 -0
  91. lang/wp-ulike-pl_PL.po +0 -0
  92. lang/wp-ulike-pt_BR.mo +0 -0
  93. lang/wp-ulike-pt_BR.po +0 -0
  94. lang/wp-ulike-pt_PT.mo +0 -0
  95. lang/wp-ulike-pt_PT.po +0 -0
  96. lang/wp-ulike-ro_RO.mo +0 -0
  97. lang/wp-ulike-ro_RO.po +0 -0
  98. lang/wp-ulike-ru_RU.mo +0 -0
  99. lang/wp-ulike-ru_RU.po +0 -0
  100. lang/wp-ulike-sk_SK.mo +0 -0
  101. lang/wp-ulike-sk_SK.po +0 -0
  102. lang/wp-ulike-sv_SE.mo +0 -0
  103. lang/wp-ulike-sv_SE.po +0 -0
  104. lang/wp-ulike-tr_TR.mo +0 -0
  105. lang/wp-ulike-tr_TR.po +0 -0
  106. lang/wp-ulike-zh_CN.mo +0 -0
  107. lang/wp-ulike-zh_CN.po +0 -0
  108. lang/wp-ulike-zh_TW.mo +0 -0
  109. lang/wp-ulike-zh_TW.po +0 -0
  110. readme.txt +12 -2
  111. wp-ulike.php +78 -91
admin/admin-ajax.php CHANGED
File without changes
admin/admin-functions.php CHANGED
@@ -107,9 +107,9 @@ function wp_ulike_get_number_of_new_likes() {
107
  ( SELECT COUNT(*) FROM `%1$sulike_activities` WHERE ( date_time <= NOW() AND date_time >= "%2$s" ) ) +
108
  ( SELECT COUNT(*) FROM `%1$sulike_comments` WHERE ( date_time <= NOW() AND date_time >= "%2$s" ) ) +
109
  ( SELECT COUNT(*) FROM `%1$sulike_forums` WHERE ( date_time <= NOW() AND date_time >= "%2$s" ) )
110
- ',
111
  $wpdb->prefix,
112
- get_option( 'wpulike_lastvisit')
113
  );
114
 
115
  $result = $wpdb->get_var( $query );
@@ -125,8 +125,8 @@ function wp_ulike_get_number_of_new_likes() {
125
  * @return string
126
  */
127
  function wp_ulike_badge_count_format( $number ){
128
- return sprintf( ' <span class="update-plugins count-%1$s"><span class="update-count">%1$s</span></span>',
129
- number_format_i18n( $number )
130
  );
131
  }
132
 
@@ -199,4 +199,31 @@ function wp_ulike_delete_transient( $transient ) {
199
  $_wp_using_ext_object_cache = $current_using_cache;
200
 
201
  return $result;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
202
  }
107
  ( SELECT COUNT(*) FROM `%1$sulike_activities` WHERE ( date_time <= NOW() AND date_time >= "%2$s" ) ) +
108
  ( SELECT COUNT(*) FROM `%1$sulike_comments` WHERE ( date_time <= NOW() AND date_time >= "%2$s" ) ) +
109
  ( SELECT COUNT(*) FROM `%1$sulike_forums` WHERE ( date_time <= NOW() AND date_time >= "%2$s" ) )
110
+ ',
111
  $wpdb->prefix,
112
+ get_option( 'wpulike_lastvisit')
113
  );
114
 
115
  $result = $wpdb->get_var( $query );
125
  * @return string
126
  */
127
  function wp_ulike_badge_count_format( $number ){
128
+ return sprintf( ' <span class="update-plugins count-%1$s"><span class="update-count">%1$s</span></span>',
129
+ number_format_i18n( $number )
130
  );
131
  }
132
 
199
  $_wp_using_ext_object_cache = $current_using_cache;
200
 
201
  return $result;
202
+ }
203
+
204
+ /**
205
+ * Get plugin downloads info from wordpress.org
206
+ *
207
+ * @return void
208
+ */
209
+ function wp_ulike_get_repository_downloads_info(){
210
+
211
+ $key = sanitize_key( 'wp_ulike_repository_downloads_info' );
212
+
213
+ if ( false === ( $info = wp_ulike_get_transient( $key ) ) ) {
214
+ $request = wp_remote_get( 'https://api.wordpress.org/stats/plugin/1.0/downloads.php?slug=wp-ulike&limit=30' );
215
+ if( is_wp_error( $request ) ) {
216
+ return NULL;
217
+ }
218
+ // get body info
219
+ $body = wp_remote_retrieve_body( $request );
220
+ $data = json_decode( $body, true );
221
+ $info = is_array( $data ) ? array(
222
+ 'labels' => array_keys( $data ),
223
+ 'data' => array_values( $data ),
224
+ ) : NULL;
225
+ wp_ulike_set_transient( $key, $info, 3 * HOUR_IN_SECONDS );
226
+ }
227
+
228
+ return $info;
229
  }
admin/admin-hooks.php CHANGED
File without changes
admin/assets/fonts/wp-ulike.eot CHANGED
File without changes
admin/assets/fonts/wp-ulike.svg CHANGED
File without changes
admin/assets/fonts/wp-ulike.ttf CHANGED
File without changes
admin/assets/fonts/wp-ulike.woff CHANGED
File without changes
admin/assets/js/plugins.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! WP ULike - v3.6.0
2
  * https://wpulike.com
3
  * Alimir 2019;
4
  */
1
+ /*! WP ULike - v3.6.1
2
  * https://wpulike.com
3
  * Alimir 2019;
4
  */
admin/assets/js/scripts.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! WP ULike - v3.6.0
2
  * https://wpulike.com
3
  * Alimir 2019;
4
  */
1
+ /*! WP ULike - v3.6.1
2
  * https://wpulike.com
3
  * Alimir 2019;
4
  */
admin/classes/class-wp-ulike-admin-pages.php CHANGED
@@ -59,7 +59,7 @@ if ( ! class_exists( 'wp_ulike_admin_pages' ) ) {
59
  'load_screen' => true
60
  ),
61
  'statistics' => array(
62
- 'title' => __( 'WP ULike Statistics', WP_ULIKE_SLUG ),
63
  'parent_slug' => 'wp-ulike-settings',
64
  'capability' => 'manage_options',
65
  'path' => '/includes/templates/statistics.php',
@@ -67,7 +67,7 @@ if ( ! class_exists( 'wp_ulike_admin_pages' ) ) {
67
  'load_screen' => false
68
  ),
69
  'about' => array(
70
- 'title' => __( 'About WP ULike', WP_ULIKE_SLUG ),
71
  'parent_slug' => 'wp-ulike-settings',
72
  'capability' => 'manage_options',
73
  'path' => '/includes/templates/about.php',
@@ -78,7 +78,7 @@ if ( ! class_exists( 'wp_ulike_admin_pages' ) ) {
78
 
79
  add_action( 'admin_menu', array( $this, 'menus' ) );
80
  }
81
-
82
  /**
83
  * register admin menus
84
  *
@@ -91,10 +91,10 @@ if ( ! class_exists( 'wp_ulike_admin_pages' ) ) {
91
  // extract variables
92
  extract( $args );
93
 
94
- $hook_suffix = add_submenu_page(
95
  $parent_slug,
96
  $title,
97
- apply_filters( 'wp_ulike_admin_sub_menu_title', $title, $menu_slug ),
98
  $capability,
99
  $menu_slug,
100
  array( &$this, 'load_template' )
@@ -122,7 +122,7 @@ if ( ! class_exists( 'wp_ulike_admin_pages' ) ) {
122
  $menu[313][0] .= wp_ulike_badge_count_format( $badge_count );
123
  }
124
  }
125
-
126
  /**
127
  * Add screen options
128
  *
@@ -133,8 +133,8 @@ if ( ! class_exists( 'wp_ulike_admin_pages' ) ) {
133
  'label' => __('Logs',WP_ULIKE_SLUG),
134
  'default' => 30,
135
  'option' => 'wp_ulike_logs_per_page'
136
- )
137
- );
138
  }
139
 
140
  /**
59
  'load_screen' => true
60
  ),
61
  'statistics' => array(
62
+ 'title' => __( 'Statistics', WP_ULIKE_SLUG ),
63
  'parent_slug' => 'wp-ulike-settings',
64
  'capability' => 'manage_options',
65
  'path' => '/includes/templates/statistics.php',
67
  'load_screen' => false
68
  ),
69
  'about' => array(
70
+ 'title' => __( 'About', WP_ULIKE_SLUG ),
71
  'parent_slug' => 'wp-ulike-settings',
72
  'capability' => 'manage_options',
73
  'path' => '/includes/templates/about.php',
78
 
79
  add_action( 'admin_menu', array( $this, 'menus' ) );
80
  }
81
+
82
  /**
83
  * register admin menus
84
  *
91
  // extract variables
92
  extract( $args );
93
 
94
+ $hook_suffix = add_submenu_page(
95
  $parent_slug,
96
  $title,
97
+ apply_filters( 'wp_ulike_admin_sub_menu_title', $title, $menu_slug ),
98
  $capability,
99
  $menu_slug,
100
  array( &$this, 'load_template' )
122
  $menu[313][0] .= wp_ulike_badge_count_format( $badge_count );
123
  }
124
  }
125
+
126
  /**
127
  * Add screen options
128
  *
133
  'label' => __('Logs',WP_ULIKE_SLUG),
134
  'default' => 30,
135
  'option' => 'wp_ulike_logs_per_page'
136
+ )
137
+ );
138
  }
139
 
140
  /**
admin/classes/class-wp-ulike-pagination.php CHANGED
File without changes
admin/classes/class-wp-ulike-settings.php CHANGED
File without changes
admin/classes/class-wp-ulike-stats.php CHANGED
@@ -187,7 +187,7 @@ if ( ! class_exists( 'wp_ulike_stats' ) ) {
187
  count(date_time) AS counts
188
  FROM %s
189
  GROUP BY labels
190
- DESC LIMIT %d",
191
  $this->wpdb->prefix . $table,
192
  30
193
  );
@@ -195,11 +195,9 @@ if ( ! class_exists( 'wp_ulike_stats' ) ) {
195
  $result = $this->wpdb->get_results( $query );
196
 
197
  if( empty( $result ) ) {
198
- $result->labels = $result->counts = array();
199
- } else {
200
- krsort( $result );
201
  }
202
-
203
  return $result;
204
  }
205
 
187
  count(date_time) AS counts
188
  FROM %s
189
  GROUP BY labels
190
+ ASC LIMIT %d",
191
  $this->wpdb->prefix . $table,
192
  30
193
  );
195
  $result = $this->wpdb->get_results( $query );
196
 
197
  if( empty( $result ) ) {
198
+ $result->labels = $result->counts = NULL;
 
 
199
  }
200
+
201
  return $result;
202
  }
203
 
admin/classes/class-wp-ulike-widget.php CHANGED
File without changes
admin/includes/templates/about.php CHANGED
@@ -13,7 +13,7 @@
13
  }
14
  ?>
15
 
16
- <div class="wrap about-wrap wp-ulike-about-page">
17
 
18
  <h1><?php echo _e( 'Welcome to WP ULike', WP_ULIKE_SLUG ) . ' ' . WP_ULIKE_VERSION; ?></h1>
19
  <div class="about-text"><?php echo _e('Thank you for choosing WP ULike! This version is our leanest and most powerful version yet.', WP_ULIKE_SLUG) ; ?><br />
@@ -22,7 +22,7 @@
22
  <a target="_blank" href="<?php echo WP_ULIKE_PLUGIN_URI . '?TB_iframe=true&amp;width=800&amp;height=600'; ?>" class="thickbox"> <?php _e('Visit our homepage',WP_ULIKE_SLUG); ?></a>
23
  </div>
24
  <div class="ulike-badge"><?php echo _e('Version',WP_ULIKE_SLUG) . ' ' . WP_ULIKE_VERSION; ?></div>
25
- <h2 class="nav-tab-wrapper">
26
  <a class="nav-tab <?php if(!isset($_GET["credit"])) echo 'nav-tab-active'; ?>" href="admin.php?page=wp-ulike-about"><?php echo _e('Getting Started',WP_ULIKE_SLUG); ?></a>
27
  <a class="nav-tab <?php if(isset($_GET["credit"])) echo 'nav-tab-active'; ?>" href="admin.php?page=wp-ulike-about&credit=true"><?php echo _e('Credits',WP_ULIKE_SLUG); ?></a>
28
  <a target="_blank" class="nav-tab" href="https://wordpress.org/support/plugin/wp-ulike"><?php echo _e('Support',WP_ULIKE_SLUG); ?></a>
@@ -32,80 +32,91 @@
32
 
33
  <?php if(!isset($_GET["credit"])): ?>
34
 
35
- <div class="changelog headline-feature">
36
- <h2><?php echo _e('Introducing WP ULike',WP_ULIKE_SLUG); ?> <img draggable="false" class="emoji" alt="emoji" src="https://s.w.org/images/core/emoji/2.2.1/svg/1f60a.svg"></h2>
37
- <div class="featured-image">
38
- <img alt="wp ulike intro" src="<?php echo WP_ULIKE_ASSETS_URL; ?>/img/wp-ulike-intro.png">
39
- </div>
40
 
41
- <div class="feature-section">
42
- <div class="col">
43
- <h2><?php echo _e('About WP ULike',WP_ULIKE_SLUG); ?></h2>
44
- <div style="text-align:center">
45
- <?php $args = array(
46
- 'rating' => 5,
47
- 'type' => 'rating',
48
- 'number' => 43,
49
- );
50
- wp_star_rating( $args ); ?>
51
- </div>
52
- <p class="lead-description"><?php echo _e('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.',WP_ULIKE_SLUG); ?></p>
53
- </div>
54
- </div>
55
 
56
- <div class="clear"></div>
57
- </div>
58
- <hr>
59
- <div class="changelog feature-section three-col">
60
- <div class="col">
61
- <div class="icon-container">
62
- <i class="wp-ulike-icons-hotairballoon"></i>
63
- </div>
64
- <h3><?php echo _e('WP Ulike Extension',WP_ULIKE_SLUG); ?></h3>
65
- <p><?php echo _e('Right now, WP ULike support wordpress posts / comments, BuddyPress activities & bbPress Topics.',WP_ULIKE_SLUG); ?></p>
66
- </div>
67
- <div class="col">
68
- <div class="icon-container">
69
- <i class="wp-ulike-icons-globe"></i>
70
- </div>
71
- <h3><?php echo _e('Added More Than 20 Language Files',WP_ULIKE_SLUG); ?></h3>
72
- <p><?php echo _e('WP ULike is already translated into +20 languages, with more always in progress.',WP_ULIKE_SLUG); ?></p>
73
- </div>
74
- <div class="col">
75
- <div class="icon-container">
76
- <i class="wp-ulike-icons-profile-male"></i>
77
- </div>
78
- <h3><?php echo _e('User Profile Links',WP_ULIKE_SLUG); ?></h3>
79
- <p><?php echo _e('Since WP ULike 2.3, We have synced the likers profile with BuddyPress & UltimateMember plugins.',WP_ULIKE_SLUG); ?></p>
80
- </div>
81
- <div class="col">
82
- <div class="icon-container">
83
- <i class="wp-ulike-icons-paintbrush"></i>
84
- </div>
85
- <h3><?php echo _e('New Themes And Styles',WP_ULIKE_SLUG); ?></h3>
86
- <p><?php echo _e('Since WP ULike 2.3, We have made some new styles and themes and you can customize them by your taste.',WP_ULIKE_SLUG); ?></p>
87
- </div>
88
- <div class="col">
89
- <div class="icon-container">
90
- <i class="wp-ulike-icons-trophy"></i>
91
- </div>
92
- <h3><?php echo _e('myCRED Points Support',WP_ULIKE_SLUG); ?></h3>
93
- <p><?php echo _e('myCRED is an adaptive points management system that lets you award / charge your users for interacting with your WordPress.',WP_ULIKE_SLUG); ?></p>
94
- </div>
95
- <div class="col">
96
- <div class="icon-container">
97
- <i class="wp-ulike-icons-map"></i>
98
- </div>
99
- <h3><?php echo _e('Likers World Map',WP_ULIKE_SLUG); ?></h3>
100
- <p><?php echo _e('Since WP ULike 2.3, We have made a new ability that you can track your likers by their country in the world map & Top Liker widget.',WP_ULIKE_SLUG); ?></p>
101
- </div>
102
- </div>
103
 
104
- <div class="changelog feature-list">
105
- <div class="return-to-dashboard">
106
- <a href="admin.php?page=wp-ulike-statistics"><?php echo _e('WP ULike Statistics',WP_ULIKE_SLUG); ?> &rarr; <?php echo _e('Home',WP_ULIKE_SLUG); ?></a> <?php echo _e('OR',WP_ULIKE_SLUG); ?> <a href="admin.php?page=wp-ulike-settings"><?php echo _e('WP ULike Settings',WP_ULIKE_SLUG); ?></a>
 
 
 
 
107
  </div>
108
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
 
110
  <?php else: ?>
111
 
@@ -119,79 +130,5 @@
119
  </li>
120
  </ul>
121
 
122
- <h3 class="wp-people-group"><?php _e('Translations',WP_ULIKE_SLUG); ?></h3>
123
- <ul>
124
- <li>English (United States)</li>
125
- <li>Persian (Iran)</li>
126
- <li>French (France)</li>
127
- <li>Chinese (China)</li>
128
- <li>Chinese (Taiwan)</li>
129
- <li>Dutch (Netherlands) </li>
130
- <li>Arabic</li>
131
- <li>Portuguese (Brazil)</li>
132
- <li>Turkish (Turkey)</li>
133
- <li>Greek</li>
134
- <li>Russian (Russia)</li>
135
- <li>Spanish (Spain)</li>
136
- <li>German (Germany)</li>
137
- <li>Japanese</li>
138
- <li>Romanian (Romania)</li>
139
- <li>Slovak (Slovakia)</li>
140
- <li>Czech (Czech Republic)</li>
141
- <li>Hebrew (Israel)</li>
142
- <li>Italian (Italy)</li>
143
- <li>Polish (Poland)</li>
144
- <li>Finnish</li>
145
- <li>Hungarian (Hungary)</li>
146
- <li>Lithuanian (Lithuania)</li>
147
- <li>Indonesian (Indonesia)</li>
148
- <li>Khmer</li>
149
- <li>Norwegian Bokmal (Norway)</li>
150
- <li>Portuguese (Portugal)</li>
151
- <li>Swedish (Sweden)</li>
152
- <li>Danish (Denmark)</li>
153
- <li>Estonian</li>
154
- <li>Korean (Korea)</li>
155
- <li>Vietnamese</li>
156
- <li>Basque</li>
157
- <li>Bosnian (Bosnia and Herzegovina)</li>
158
- <li>English (United Kingdom)</li>
159
- </ul>
160
-
161
- <p class="about-description"><?php _e('Would you like to help translate the plugin into more languages?',WP_ULIKE_SLUG); ?> <a target="_blank" href="https://www.transifex.com/projects/p/wp-ulike/" title"WP-Translations">[<?php _e('Join our WP-Translations Community',WP_ULIKE_SLUG); ?>]</a></p>
162
-
163
- <h3 class="wp-people-group"><?php echo _e('Other Plugins',WP_ULIKE_SLUG); ?></h3>
164
- <ul class="wp-people-group">
165
- <li class="wp-person" id="wp-person-alimirzaei">
166
- <a target="_blank" href="https://wordpress.org/plugins/blue-login-style"><img class="gravatar" src="<?php echo WP_ULIKE_ASSETS_URL; ?>/img/blue-login-themes.jpg" alt="Blue Login Themes" /></a>
167
- <a class="web" href="https://profiles.wordpress.org/alimir/">Ali Mirzaei</a>
168
- <span class="title">Blue Login Themes</span>
169
- </li>
170
- <li class="wp-person" id="wp-person-alimirzaei">
171
- <a target="_blank" href="https://wordpress.org/plugins/custom-fields-notifications/"><img class="gravatar" src="<?php echo WP_ULIKE_ASSETS_URL; ?>/img/custom-fileds-notifications.png" alt="Custom Fields Notifications" /></a>
172
- <a class="web" href="https://profiles.wordpress.org/alimir/">Ali Mirzaei</a>
173
- <span class="title">Custom Fields Notifications</span>
174
- </li>
175
- <li class="wp-person" id="wp-person-alimirzaei">
176
- <a target="_blank" href="http://wordpress.org/plugins/ajax-bootmodal-login/"><img class="gravatar" src="<?php echo WP_ULIKE_ASSETS_URL; ?>/img/ajax-bootmodal-login.jpg" alt="Ajax BootModal Login" /></a>
177
- <a class="web" href="https://profiles.wordpress.org/alimir/">Ali Mirzaei</a>
178
- <span class="title">Ajax BootModal Login</span>
179
- </li>
180
- </ul>
181
-
182
- <h3 class="wp-people-group"><?php _e('Like this plugin?',WP_ULIKE_SLUG); ?></h3>
183
- <div class="wp-ulike-notice">
184
- <div class="wp-ulike-notice-image">
185
- <img src="<?php echo WP_ULIKE_ASSETS_URL; ?>/img/wp-ulike-badge.png" alt="WP ULike Plugin">
186
- </div>
187
- <div class="wp-ulike-notice-text">
188
- <p><?php echo _e( "It's great to see that you've been using the WP ULike plugin. 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>
189
- <div class="links">
190
- <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>
191
- <a href="https://m.do.co/c/13ad5bc24738" target="_blank"><?php echo _e( "I also want to donate!", WP_ULIKE_SLUG ); ?></a>
192
- <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>
193
- </div>
194
- </div>
195
- </div>
196
  <?php endif; ?>
197
  </div>
13
  }
14
  ?>
15
 
16
+ <div class="wrap about-wrap wp-ulike-about-page full-width-layout">
17
 
18
  <h1><?php echo _e( 'Welcome to WP ULike', WP_ULIKE_SLUG ) . ' ' . WP_ULIKE_VERSION; ?></h1>
19
  <div class="about-text"><?php echo _e('Thank you for choosing WP ULike! This version is our leanest and most powerful version yet.', WP_ULIKE_SLUG) ; ?><br />
22
  <a target="_blank" href="<?php echo WP_ULIKE_PLUGIN_URI . '?TB_iframe=true&amp;width=800&amp;height=600'; ?>" class="thickbox"> <?php _e('Visit our homepage',WP_ULIKE_SLUG); ?></a>
23
  </div>
24
  <div class="ulike-badge"><?php echo _e('Version',WP_ULIKE_SLUG) . ' ' . WP_ULIKE_VERSION; ?></div>
25
+ <h2 class="nav-tab-wrapper wp-clearfix">
26
  <a class="nav-tab <?php if(!isset($_GET["credit"])) echo 'nav-tab-active'; ?>" href="admin.php?page=wp-ulike-about"><?php echo _e('Getting Started',WP_ULIKE_SLUG); ?></a>
27
  <a class="nav-tab <?php if(isset($_GET["credit"])) echo 'nav-tab-active'; ?>" href="admin.php?page=wp-ulike-about&credit=true"><?php echo _e('Credits',WP_ULIKE_SLUG); ?></a>
28
  <a target="_blank" class="nav-tab" href="https://wordpress.org/support/plugin/wp-ulike"><?php echo _e('Support',WP_ULIKE_SLUG); ?></a>
32
 
33
  <?php if(!isset($_GET["credit"])): ?>
34
 
35
+ <div class="changelog point-releases">
36
+ <h3><?php echo _e( 'Keep it Simple with With Our Voting Plugin', WP_ULIKE_SLUG ); ?></h3>
37
+ <p><?php echo _e('If you’re looking for one of the best and fastest ways to add like and dislike functionality to your WordPress website, then the WP ULike plugin is for you! WP ULike will allow your website visitors to engage with your wide range of content types including posts, forum topics and replies, comments and activity updates.',WP_ULIKE_SLUG); ?></p>
38
+ </div>
 
39
 
40
+ <h2 class="feature-section-header" style="margin-bottom: -50px;"><?php echo _e( 'A Little Better Every Day', WP_ULIKE_SLUG ); ?></h2>
41
+ <div class="feature-section headline-feature one-col">
42
+ <div class="col">
43
+ <div class="inline-svg">
44
+ <img src="<?php echo WP_ULIKE_ASSETS_URL; ?>/img/stats-plan.png" alt="Statistics Planning" />
45
+ </div>
46
+ <p><?php echo _e('WP ULike’s amazing statistics tools help you to track your content effectiveness with a real-time report system and detailed statistics. What’s more, WP ULike have a wide variety of options available to customize your plugin. It will allow you to customize your like button in your favorite style.',WP_ULIKE_SLUG); ?></p>
47
+ </div>
 
 
 
 
 
 
48
 
49
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
 
51
+ <?php
52
+ $downloads_info = wp_ulike_get_repository_downloads_info();
53
+ if( ! empty( $downloads_info ) ) {
54
+ ?>
55
+ <div class="feature-section headline-feature one-col">
56
+ <div class="col">
57
+ <canvas id="downloads-stats"></canvas>
58
  </div>
59
  </div>
60
+ <script>
61
+ var config = {
62
+ type: 'line',
63
+ data: {
64
+ labels: <?php echo json_encode( $downloads_info['labels'] ); ?>,
65
+ datasets: [{
66
+ label: '<?php echo _e( 'Downloads', WP_ULIKE_SLUG ); ?>',
67
+ data: <?php echo json_encode( $downloads_info['data'] ); ?>,
68
+ backgroundColor: '#F3643A',
69
+ borderColor: '#F3643A',
70
+ type: 'line',
71
+ pointRadius: 0,
72
+ fill: false,
73
+ lineTension: 0,
74
+ borderWidth: 2
75
+ }]
76
+ },
77
+ options: {
78
+ responsive: true,
79
+ tooltips: {
80
+ mode: 'index',
81
+ intersect: false,
82
+ },
83
+ legend: {
84
+ display: false,
85
+ },
86
+ hover: {
87
+ mode: 'nearest',
88
+ intersect: true
89
+ },
90
+ scales: {
91
+ xAxes: [{
92
+ display: true,
93
+ scaleLabel: {
94
+ display: true,
95
+ labelString: 'Days'
96
+ }
97
+ }],
98
+ yAxes: [{
99
+ display: true,
100
+ scaleLabel: {
101
+ display: true,
102
+ labelString: 'Downloads'
103
+ }
104
+ }]
105
+ }
106
+ }
107
+ };
108
+ window.onload = function() {
109
+ var ctx = document.getElementById('downloads-stats').getContext('2d');
110
+ window.myLine = new Chart(ctx, config);
111
+ };
112
+ </script>
113
+ <?php
114
+ }
115
+ ?>
116
+ <hr>
117
+ <div class="return-to-dashboard">
118
+ <a href="admin.php?page=wp-ulike-statistics"><?php echo _e('WP ULike Statistics',WP_ULIKE_SLUG); ?> &rarr; <?php echo _e('Home',WP_ULIKE_SLUG); ?></a> <?php echo _e('OR',WP_ULIKE_SLUG); ?> <a href="admin.php?page=wp-ulike-settings"><?php echo _e('WP ULike Settings',WP_ULIKE_SLUG); ?></a>
119
+ </div>
120
 
121
  <?php else: ?>
122
 
130
  </li>
131
  </ul>
132
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
133
  <?php endif; ?>
134
  </div>
admin/index.php CHANGED
File without changes
assets/css/index.php CHANGED
File without changes
assets/css/wp-ulike.css CHANGED
File without changes
assets/css/wp-ulike.min.css CHANGED
File without changes
assets/img/ajax-bootmodal-login.jpg CHANGED
Binary file
assets/img/bg/button-love.png CHANGED
Binary file
assets/img/blue-login-themes.jpg CHANGED
Binary file
assets/img/custom-fileds-notifications.png CHANGED
Binary file
assets/img/icons/add-heart-16.png CHANGED
File without changes
assets/img/icons/add-heart-hover.png CHANGED
Binary file
assets/img/icons/add-heart.png CHANGED
File without changes
assets/img/icons/add-rtl.png CHANGED
File without changes
assets/img/icons/add.png CHANGED
File without changes
assets/img/icons/heart.png CHANGED
File without changes
assets/img/icons/loading.gif CHANGED
File without changes
assets/img/icons/remove-heart-16.png CHANGED
File without changes
assets/img/icons/remove-heart-hover.png CHANGED
File without changes
assets/img/icons/remove-heart.png CHANGED
File without changes
assets/img/icons/remove-rtl.png CHANGED
File without changes
assets/img/icons/remove.png CHANGED
File without changes
assets/img/icons/spinner.gif CHANGED
File without changes
assets/img/no-thumbnail.png CHANGED
Binary file
assets/img/stats-plan.png ADDED
Binary file
assets/img/wp-ulike-badge.png CHANGED
Binary file
assets/img/wp-ulike-banner.png CHANGED
Binary file
assets/img/wp-ulike-intro.png CHANGED
Binary file
assets/img/wp-ulike-thumb.png CHANGED
File without changes
assets/index.php CHANGED
File without changes
assets/js/index.php CHANGED
File without changes
assets/js/wp-ulike.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! WP ULike - v3.6.0
2
  * https://wpulike.com
3
  * Alimir 2019;
4
  */
@@ -180,7 +180,7 @@
180
  //Call _ajaxify function on click button
181
  this.buttonElement.click(this._initLike.bind(this));
182
  //Call _ajaxify function on click button
183
- this.generalElement.hover(this._updateLikers.bind(this));
184
  },
185
 
186
  /**
1
+ /*! WP ULike - v3.6.1
2
  * https://wpulike.com
3
  * Alimir 2019;
4
  */
180
  //Call _ajaxify function on click button
181
  this.buttonElement.click(this._initLike.bind(this));
182
  //Call _ajaxify function on click button
183
+ this.buttonElement.hover(this._updateLikers.bind(this));
184
  },
185
 
186
  /**
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.generalElement.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,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);
inc/classes/class-wp-ulike-mycred.php CHANGED
@@ -84,7 +84,7 @@ if ( class_exists( 'myCRED_Hook' ) ) :
84
  public function like( $id , $key, $user_id, $author_id = 0 ) {
85
 
86
  // Check for exclusion
87
- if ( $this->core->exclude_user( $user_id ) ) return;
88
 
89
  switch ( $key ) {
90
  case '_liked':
@@ -100,7 +100,6 @@ if ( class_exists( 'myCRED_Hook' ) ) :
100
  break;
101
  }
102
 
103
-
104
  if ( $user_id != $author_id ){
105
 
106
  // Award the user liking
@@ -155,7 +154,7 @@ if ( class_exists( 'myCRED_Hook' ) ) :
155
  public function unlike( $id , $key, $user_id, $author_id = 0 ) {
156
 
157
  // Check for exclusion
158
- if ( $this->core->exclude_user( $user_id ) ) return;
159
 
160
  switch ( $key ) {
161
  case '_liked':
84
  public function like( $id , $key, $user_id, $author_id = 0 ) {
85
 
86
  // Check for exclusion
87
+ if ( $this->core->exclude_user( $user_id ) || ! is_user_logged_in() ) return;
88
 
89
  switch ( $key ) {
90
  case '_liked':
100
  break;
101
  }
102
 
 
103
  if ( $user_id != $author_id ){
104
 
105
  // Award the user liking
154
  public function unlike( $id , $key, $user_id, $author_id = 0 ) {
155
 
156
  // Check for exclusion
157
+ if ( $this->core->exclude_user( $user_id ) || ! is_user_logged_in() ) return;
158
 
159
  switch ( $key ) {
160
  case '_liked':
inc/classes/class-wp-ulike.php CHANGED
@@ -287,6 +287,10 @@ if ( ! class_exists( 'wp_ulike' ) ) {
287
  * @return Void
288
  */
289
  public function update_meta_data( $id, $key, $data ){
 
 
 
 
290
  // Update Values
291
  switch ( $key ) {
292
  case '_liked' :
287
  * @return Void
288
  */
289
  public function update_meta_data( $id, $key, $data ){
290
+ // Fix negative values
291
+ if( (int) $data < 0 ){
292
+ $data = 0;
293
+ }
294
  // Update Values
295
  switch ( $key ) {
296
  case '_liked' :
inc/general-functions.php CHANGED
@@ -799,6 +799,7 @@ if( ! function_exists( 'is_wp_ulike' ) ){
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_archive' => is_archive() && $options['archive'] == '1',
803
  'is_category' => is_category() && $options['category'] == '1',
804
  'is_search' => is_search() && $options['search'] == '1',
@@ -907,6 +908,7 @@ if( ! function_exists( 'wp_ulike_get_rating_value' ) ){
907
  }
908
  wp_cache_add($cache_key, $rating_value, $cache_group, HOUR_IN_SECONDS);
909
  }
 
910
  return $rating_value;
911
  }
912
  }
@@ -1110,11 +1112,11 @@ if( ! function_exists( 'wp_ulike_bbp_is_component_exist' ) ) {
1110
  global $wpdb;
1111
  $bp = buddypress();
1112
 
1113
- return $wpdb->get_var(
1114
- $wpdb->prepare(
1115
  "SELECT COUNT(*) FROM {$bp->notifications->table_name} WHERE component_action = %s",
1116
  $component_name
1117
- )
1118
  );
1119
  }
1120
  }
@@ -1562,6 +1564,37 @@ if( ! function_exists( 'wp_ulike_generate_user_id' ) ){
1562
  }
1563
  }
1564
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1565
  /*******************************************************
1566
  Templates
1567
  *******************************************************/
@@ -1663,7 +1696,7 @@ if( ! function_exists( 'wp_ulike_set_robeen_template' ) ){
1663
  ?>
1664
  <div class="wpulike wpulike-robeen <?php echo $wrapper_class; ?>" <?php echo $attributes; ?>>
1665
  <div class="<?php echo $general_class; ?>">
1666
- <label>
1667
  <input type="checkbox"
1668
  data-ulike-id="<?php echo $ID; ?>"
1669
  data-ulike-nonce="<?php echo wp_create_nonce( $type . $ID ); ?>"
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',
908
  }
909
  wp_cache_add($cache_key, $rating_value, $cache_group, HOUR_IN_SECONDS);
910
  }
911
+
912
  return $rating_value;
913
  }
914
  }
1112
  global $wpdb;
1113
  $bp = buddypress();
1114
 
1115
+ return $wpdb->get_var(
1116
+ $wpdb->prepare(
1117
  "SELECT COUNT(*) FROM {$bp->notifications->table_name} WHERE component_action = %s",
1118
  $component_name
1119
+ )
1120
  );
1121
  }
1122
  }
1564
  }
1565
  }
1566
 
1567
+
1568
+ if( ! function_exists( 'wp_ulike_is_user_liked' ) ) {
1569
+ /**
1570
+ * A simple function to check if user has been liked post or not
1571
+ *
1572
+ * @param integer $item_ID
1573
+ * @param integer $user_ID
1574
+ * @param string $type
1575
+ * @return bool
1576
+ */
1577
+ function wp_ulike_is_user_liked( $item_ID, $user_ID, $type = 'likeThis' ) {
1578
+ global $wpdb;
1579
+ // Get ULike settings
1580
+ $get_settings = wp_ulike_get_post_settings_by_type( $type, $item_ID );
1581
+
1582
+ $query = sprintf( "
1583
+ SELECT COUNT(*)
1584
+ FROM %s
1585
+ WHERE `%s` = %s
1586
+ AND `status` = 'like'
1587
+ And `user_id` = %s",
1588
+ esc_sql( $wpdb->prefix . $get_settings['table_name'] ),
1589
+ esc_html( $get_settings['column_name'] ),
1590
+ esc_html( $item_ID ),
1591
+ esc_html( $user_ID )
1592
+ );
1593
+
1594
+ return $wpdb->get_var( $query );
1595
+ }
1596
+ }
1597
+
1598
  /*******************************************************
1599
  Templates
1600
  *******************************************************/
1696
  ?>
1697
  <div class="wpulike wpulike-robeen <?php echo $wrapper_class; ?>" <?php echo $attributes; ?>>
1698
  <div class="<?php echo $general_class; ?>">
1699
+ <label title="<?php echo esc_attr( 'like this' . $type ); ?>">
1700
  <input type="checkbox"
1701
  data-ulike-id="<?php echo $ID; ?>"
1702
  data-ulike-nonce="<?php echo wp_create_nonce( $type . $ID ); ?>"
inc/general-hooks.php CHANGED
@@ -160,14 +160,15 @@ if( ! function_exists( 'wp_ulike_put_posts' ) ){
160
  }
161
 
162
  //return by position
163
- if($position=='bottom')
164
- return $content . $button;
165
- else if($position=='top')
166
- return $button . $content;
167
- else if($position=='top_bottom')
168
- return $button . $content . $button;
169
- else
170
- return $content . $button;
 
171
  }
172
  if (wp_ulike_get_setting( 'wp_ulike_posts', 'auto_display' ) == '1') {
173
  add_filter('the_content', 'wp_ulike_put_posts');
@@ -196,20 +197,27 @@ if( ! function_exists( 'wp_ulike_get_posts_microdata' ) ){
196
  * @return string
197
  */
198
  function wp_ulike_get_posts_microdata(){
199
- $get_ulike_count = get_post_meta(get_the_ID(), '_liked', true);
200
- if(!is_singular() || !wp_ulike_get_setting( 'wp_ulike_posts', 'google_rich_snippets') || $get_ulike_count == 0) return;
201
- $post_meta = '<meta itemprop="name" content="' . get_the_title() . '" />';
202
- $post_meta .= apply_filters( 'wp_ulike_extra_structured_data', NULL );
203
- $post_meta .= '<span itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="name" content="' . get_the_author() . '" /></span>';
204
- $post_meta .= '<meta itemprop="datePublished" content="' . get_post_time('c') . '" />';
205
- $ratings_meta = '<span itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">';
 
 
 
 
 
 
206
  $ratings_meta .= '<meta itemprop="bestRating" content="5" />';
207
- $ratings_meta .= '<meta itemprop="worstRating" content="1" />';
208
- $ratings_meta .= '<meta itemprop="ratingValue" content="'. wp_ulike_get_rating_value(get_the_ID()) .'" />';
209
- $ratings_meta .= '<meta itemprop="ratingCount" content="' . $get_ulike_count . '" />';
210
- $ratings_meta .= '</span>';
211
- $itemtype = apply_filters( 'wp_ulike_remove_microdata_post_meta', false );
212
- return apply_filters( 'wp_ulike_generate_google_structured_data', ( $itemtype ? $ratings_meta : ( $post_meta . $ratings_meta ) ) );
 
213
  }
214
  add_filter( 'wp_ulike_posts_microdata', 'wp_ulike_get_posts_microdata');
215
  }
@@ -229,19 +237,18 @@ if( ! function_exists( 'wp_ulike_put_comments' ) ){
229
  function wp_ulike_put_comments( $content ) {
230
  //auto display position
231
  $position = wp_ulike_get_setting( 'wp_ulike_comments', 'auto_display_position');
232
-
233
  //add wp_ulike_comments function
234
  $button = wp_ulike_comments('put');
235
-
236
  //return by position
237
- if($position=='bottom')
238
- return $content . $button;
239
- else if($position=='top')
240
- return $button . $content;
241
- else if($position=='top_bottom')
242
- return $button . $content . $button;
243
- else
244
- return $content . $button;
 
245
  }
246
 
247
  if ( wp_ulike_get_setting( 'wp_ulike_comments', 'auto_display' ) == '1' && ! is_admin() ) {
@@ -644,6 +651,7 @@ if( ! function_exists( 'wp_ulike_put_bbpress' ) && function_exists( 'is_bbpress'
644
  Other Plugins
645
  *******************************************************/
646
 
 
647
  if( defined( 'myCRED_VERSION' ) ){
648
  if( ! function_exists( 'wp_ulike_register_myCRED_hook' ) ){
649
  /**
@@ -682,6 +690,7 @@ if( defined( 'myCRED_VERSION' ) ){
682
  }
683
  }
684
 
 
685
  if ( defined( 'ultimatemember_version' ) ) {
686
  if( ! function_exists( 'wp_ulike_add_custom_profile_tab' ) ){
687
  /**
@@ -792,4 +801,40 @@ if ( defined( 'ultimatemember_version' ) ) {
792
  }
793
  add_action('um_profile_content_wp-ulike-comments_default', 'wp_ulike_comments_um_profile_content');
794
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
795
  }
160
  }
161
 
162
  //return by position
163
+ if( $position=='bottom' ) {
164
+ return $content . $button;
165
+ } elseif( $position=='top' ) {
166
+ return $button . $content;
167
+ } elseif( $position=='top_bottom' ) {
168
+ return $button . $content . $button;
169
+ } else {
170
+ return $content . $button;
171
+ }
172
  }
173
  if (wp_ulike_get_setting( 'wp_ulike_posts', 'auto_display' ) == '1') {
174
  add_filter('the_content', 'wp_ulike_put_posts');
197
  * @return string
198
  */
199
  function wp_ulike_get_posts_microdata(){
200
+ global $post;
201
+ $get_ulike_count = get_post_meta( $post->ID, '_liked', true );
202
+ // Check data output
203
+ if( !is_singular() || !wp_ulike_get_setting( 'wp_ulike_posts', 'google_rich_snippets') || $get_ulike_count == 0 ) {
204
+ return;
205
+ }
206
+ // Post meta structure
207
+ $post_meta = '<meta itemprop="name" content="' . the_title_attribute( 'echo=0' ) . '" />';
208
+ $post_meta .= apply_filters( 'wp_ulike_extra_structured_data', NULL );
209
+ $post_meta .= '<span itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="name" content="' . esc_attr( get_the_author() ) . '" /></span>';
210
+ $post_meta .= '<meta itemprop="datePublished" content="' . esc_attr( get_post_time('c') ) . '" />';
211
+ // Rating meta structure
212
+ $ratings_meta = '<span itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">';
213
  $ratings_meta .= '<meta itemprop="bestRating" content="5" />';
214
+ $ratings_meta .= '<meta itemprop="worstRating" content="1" />';
215
+ $ratings_meta .= '<meta itemprop="ratingValue" content="'. wp_ulike_get_rating_value( $post->ID ) .'" />';
216
+ $ratings_meta .= '<meta itemprop="ratingCount" content="' . $get_ulike_count . '" />';
217
+ $ratings_meta .= '</span>';
218
+ // Return value
219
+ $itemtype = apply_filters( 'wp_ulike_remove_microdata_post_meta', false );
220
+ return apply_filters( 'wp_ulike_generate_google_structured_data', ( $itemtype ? $ratings_meta : ( $post_meta . $ratings_meta ) ) );
221
  }
222
  add_filter( 'wp_ulike_posts_microdata', 'wp_ulike_get_posts_microdata');
223
  }
237
  function wp_ulike_put_comments( $content ) {
238
  //auto display position
239
  $position = wp_ulike_get_setting( 'wp_ulike_comments', 'auto_display_position');
 
240
  //add wp_ulike_comments function
241
  $button = wp_ulike_comments('put');
 
242
  //return by position
243
+ if( $position=='bottom' ){
244
+ return $content . $button;
245
+ } elseif( $position=='top' ){
246
+ return $button . $content;
247
+ } elseif( $position=='top_bottom' ){
248
+ return $button . $content . $button;
249
+ } else {
250
+ return $content . $button;
251
+ }
252
  }
253
 
254
  if ( wp_ulike_get_setting( 'wp_ulike_comments', 'auto_display' ) == '1' && ! is_admin() ) {
651
  Other Plugins
652
  *******************************************************/
653
 
654
+ // My Cred Plugin
655
  if( defined( 'myCRED_VERSION' ) ){
656
  if( ! function_exists( 'wp_ulike_register_myCRED_hook' ) ){
657
  /**
690
  }
691
  }
692
 
693
+ // Ultimate Member plugin
694
  if ( defined( 'ultimatemember_version' ) ) {
695
  if( ! function_exists( 'wp_ulike_add_custom_profile_tab' ) ){
696
  /**
801
  }
802
  add_action('um_profile_content_wp-ulike-comments_default', 'wp_ulike_comments_um_profile_content');
803
  }
804
+ }
805
+
806
+ // Litespeed cache plugin
807
+ if( ! function_exists( 'wp_ulike_purge_litespeed_cache' ) && method_exists( 'LiteSpeed_Cache_API', 'purge_post' ) ){
808
+ /**
809
+ * Purge litespeed post cache
810
+ *
811
+ * @param integer $ID
812
+ * @param string $type
813
+ * @return void
814
+ */
815
+ function wp_ulike_purge_litespeed_cache( $ID, $type ){
816
+ if( $type === '_liked' ){
817
+ LiteSpeed_Cache_API::purge_post( $ID ) ;
818
+ }
819
+ }
820
+ add_action( 'wp_ulike_after_process', 'wp_ulike_purge_litespeed_cache' , 10, 2 );
821
+ }
822
+
823
+ // w3 total cache plugin
824
+ if( ! function_exists( 'wp_ulike_purge_w3_total_cache' ) && function_exists( 'w3tc_pgcache_flush_post' ) ){
825
+ /**
826
+ * Purge w3 total post cache
827
+ *
828
+ * @param integer $ID
829
+ * @param string $type
830
+ * @return void
831
+ */
832
+ function wp_ulike_purge_w3_total_cache( $ID, $type ){
833
+ if( $type === '_liked' ){
834
+ w3tc_pgcache_flush_post( $ID );
835
+ } else {
836
+ w3tc_pgcache_flush();
837
+ }
838
+ }
839
+ add_action( 'wp_ulike_after_process', 'wp_ulike_purge_w3_total_cache' , 10, 2 );
840
  }
index.php CHANGED
File without changes
lang/index.php CHANGED
File without changes
lang/readme.txt CHANGED
File without changes
lang/wp-ulike-NO.mo CHANGED
File without changes
lang/wp-ulike-NO.po CHANGED
File without changes
lang/wp-ulike-ar.mo CHANGED
File without changes
lang/wp-ulike-ar.po CHANGED
File without changes
lang/wp-ulike-cs_CZ.mo CHANGED
File without changes
lang/wp-ulike-cs_CZ.po CHANGED
File without changes
lang/wp-ulike-de_DE.mo CHANGED
File without changes
lang/wp-ulike-de_DE.po CHANGED
File without changes
lang/wp-ulike-el.mo CHANGED
File without changes
lang/wp-ulike-el.po CHANGED
File without changes
lang/wp-ulike-en_US.mo CHANGED
File without changes
lang/wp-ulike-en_US.po CHANGED
File without changes
lang/wp-ulike-es_ES.mo CHANGED
File without changes
lang/wp-ulike-es_ES.po CHANGED
File without changes
lang/wp-ulike-fa_IR.mo CHANGED
File without changes
lang/wp-ulike-fa_IR.po CHANGED
File without changes
lang/wp-ulike-fi.mo CHANGED
File without changes
lang/wp-ulike-fi.po CHANGED
File without changes
lang/wp-ulike-fr_FR.mo CHANGED
File without changes
lang/wp-ulike-fr_FR.po CHANGED
File without changes
lang/wp-ulike-he_IL.mo CHANGED
File without changes
lang/wp-ulike-he_IL.po CHANGED
File without changes
lang/wp-ulike-hu_HU.mo CHANGED
File without changes
lang/wp-ulike-hu_HU.po CHANGED
File without changes
lang/wp-ulike-id_ID.mo CHANGED
File without changes
lang/wp-ulike-id_ID.po CHANGED
File without changes
lang/wp-ulike-it_IT.mo CHANGED
File without changes
lang/wp-ulike-it_IT.po CHANGED
File without changes
lang/wp-ulike-ja.mo CHANGED
File without changes
lang/wp-ulike-ja.po CHANGED
File without changes
lang/wp-ulike-km.mo CHANGED
File without changes
lang/wp-ulike-km.po CHANGED
File without changes
lang/wp-ulike-lt_LT.mo CHANGED
File without changes
lang/wp-ulike-lt_LT.po CHANGED
File without changes
lang/wp-ulike-nl_NL.mo CHANGED
File without changes
lang/wp-ulike-nl_NL.po CHANGED
File without changes
lang/wp-ulike-pl_PL.mo CHANGED
File without changes
lang/wp-ulike-pl_PL.po CHANGED
File without changes
lang/wp-ulike-pt_BR.mo CHANGED
File without changes
lang/wp-ulike-pt_BR.po CHANGED
File without changes
lang/wp-ulike-pt_PT.mo CHANGED
File without changes
lang/wp-ulike-pt_PT.po CHANGED
File without changes
lang/wp-ulike-ro_RO.mo CHANGED
File without changes
lang/wp-ulike-ro_RO.po CHANGED
File without changes
lang/wp-ulike-ru_RU.mo CHANGED
File without changes
lang/wp-ulike-ru_RU.po CHANGED
File without changes
lang/wp-ulike-sk_SK.mo CHANGED
File without changes
lang/wp-ulike-sk_SK.po CHANGED
File without changes
lang/wp-ulike-sv_SE.mo CHANGED
File without changes
lang/wp-ulike-sv_SE.po CHANGED
File without changes
lang/wp-ulike-tr_TR.mo CHANGED
File without changes
lang/wp-ulike-tr_TR.po CHANGED
File without changes
lang/wp-ulike-zh_CN.mo CHANGED
File without changes
lang/wp-ulike-zh_CN.po CHANGED
File without changes
lang/wp-ulike-zh_TW.mo CHANGED
File without changes
lang/wp-ulike-zh_TW.po CHANGED
File without changes
readme.txt CHANGED
@@ -3,9 +3,10 @@ Contributors: alimir
3
  Donate link: https://m.do.co/c/13ad5bc24738
4
  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.0
7
- Tested up to: 5.0.2
8
- Stable tag: 3.6.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -174,6 +175,15 @@ define( 'WP_MEMORY_LIMIT', '256M' );
174
 
175
  == Changelog ==
176
 
 
 
 
 
 
 
 
 
 
177
  = 3.6.0 =
178
  * Added: Better BuddyPress notifications with some improvements on old functionalities.
179
  * Added: Simultaneously refresh for identical buttons.
3
  Donate link: https://m.do.co/c/13ad5bc24738
4
  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 PHP: 5.4
7
  Requires at least: 3.5.0
8
+ Tested up to: 5.2.2
9
+ Stable tag: 3.6.1
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.1 =
179
+ * Added: Purge functionality for litespeed & w3 total cache.
180
+ * Added: Better process for database table creation.
181
+ * Added: Better menu labels.
182
+ * Fixed: Some issues in likers box and some other functionalities.
183
+ * Fixed: An issue with myCred points.
184
+ * Fixed: Fix an issue in microdata structure.
185
+ * Fixed: Some reported issues.
186
+
187
  = 3.6.0 =
188
  * Added: Better BuddyPress notifications with some improvements on old functionalities.
189
  * Added: Simultaneously refresh for identical buttons.
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.0
14
  * Author: Ali Mirzaei
15
  * Author URI: http://alimir.ir
16
  * Text Domain: wp-ulike
@@ -34,11 +34,20 @@
34
  \------------------------------------------/
35
  */
36
 
 
 
 
 
 
 
 
 
 
 
37
  // Do not change these values
38
  define( 'WP_ULIKE_PLUGIN_URI' , 'https://wpulike.com/' );
39
- define( 'WP_ULIKE_VERSION' , '3.6.0' );
40
  define( 'WP_ULIKE_SLUG' , 'wp-ulike' );
41
- define( 'WP_ULIKE_DB_VERSION' , '1.6' );
42
 
43
  define( 'WP_ULIKE_DIR' , plugin_dir_path( __FILE__ ) );
44
  define( 'WP_ULIKE_URL' , plugins_url( '', __FILE__ ) );
@@ -57,9 +66,9 @@ define( 'WP_ULIKE_ASSETS_URL' , WP_ULIKE_URL . '/assets' );
57
  * Initialize the plugin
58
  * ===========================================================================*/
59
 
60
- if ( ! class_exists( 'WPULIKE' ) ) :
61
 
62
- class WPULIKE {
63
 
64
  /**
65
  * Instance of this class.
@@ -162,7 +171,7 @@ if ( ! class_exists( 'WPULIKE' ) ) :
162
 
163
  $wp_ulike_setting = new wp_ulike_settings(
164
  'wp-ulike-settings',
165
- __( 'WP ULike Settings', WP_ULIKE_SLUG ),
166
  array(
167
  'parent' => false,
168
  'title' => __( 'WP ULike', WP_ULIKE_SLUG ),
@@ -423,89 +432,67 @@ if ( ! class_exists( 'WPULIKE' ) ) :
423
  */
424
  private static function single_activate() {
425
 
426
- global $wpdb;
427
-
428
- if ( get_site_option( 'wp_ulike_dbVersion' ) != WP_ULIKE_DB_VERSION ) {
429
-
430
- $posts_table = $wpdb->prefix . "ulike";
431
- if ( $wpdb->get_var( "show tables like '$posts_table'" ) != $posts_table ) {
432
- $sql = "CREATE TABLE " . $posts_table . " (
433
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
434
- `post_id` bigint(20) NOT NULL,
435
- `date_time` datetime NOT NULL,
436
- `ip` varchar(60) NOT NULL,
437
- `user_id` varchar(30) NOT NULL,
438
- `status` varchar(15) NOT NULL,
439
- PRIMARY KEY (`id`)
440
- );";
441
-
442
- require_once ABSPATH . 'wp-admin/includes/upgrade.php';
443
- dbDelta( $sql );
444
- } else {
445
- // Fix an old issue with user_id column
446
- $wpdb->query( "ALTER TABLE $posts_table CHANGE `user_id` `user_id` VARCHAR(30) NOT NULL, CHANGE `ip` `ip` VARCHAR(60) NOT NULL" );
447
- }
448
-
449
- $comments_table = $wpdb->prefix . "ulike_comments";
450
- if ( $wpdb->get_var( "show tables like '$comments_table'" ) != $comments_table ) {
451
- $sql = "CREATE TABLE " . $comments_table . " (
452
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
453
- `comment_id` bigint(20) NOT NULL,
454
- `date_time` datetime NOT NULL,
455
- `ip` varchar(60) NOT NULL,
456
- `user_id` varchar(30) NOT NULL,
457
- `status` varchar(15) NOT NULL,
458
- PRIMARY KEY (`id`)
459
- );";
460
-
461
- require_once ABSPATH . 'wp-admin/includes/upgrade.php';
462
- dbDelta( $sql );
463
- } else {
464
- // Fix an old issue with user_id column
465
- $wpdb->query( "ALTER TABLE $comments_table CHANGE `user_id` `user_id` VARCHAR(30) NOT NULL, CHANGE `ip` `ip` VARCHAR(60) NOT NULL" );
466
- }
467
-
468
- $activities_table = $wpdb->prefix . "ulike_activities";
469
- if ( $wpdb->get_var( "show tables like '$activities_table'" ) != $activities_table ) {
470
- $sql = "CREATE TABLE " . $activities_table . " (
471
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
472
- `activity_id` bigint(20) NOT NULL,
473
- `date_time` datetime NOT NULL,
474
- `ip` varchar(60) NOT NULL,
475
- `user_id` varchar(30) NOT NULL,
476
- `status` varchar(15) NOT NULL,
477
- PRIMARY KEY (`id`)
478
- );";
479
-
480
- require_once ABSPATH . 'wp-admin/includes/upgrade.php';
481
- dbDelta( $sql );
482
- } else {
483
- // Fix an old issue with user_id column
484
- $wpdb->query( "ALTER TABLE $activities_table CHANGE `user_id` `user_id` VARCHAR(30) NOT NULL, CHANGE `ip` `ip` VARCHAR(60) NOT NULL" );
485
- }
486
 
487
- $forums_table = $wpdb->prefix . "ulike_forums";
488
- if ( $wpdb->get_var( "show tables like '$forums_table'" ) != $forums_table ) {
489
- $sql = "CREATE TABLE " . $forums_table . " (
490
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
491
- `topic_id` bigint(20) NOT NULL,
492
- `date_time` datetime NOT NULL,
493
- `ip` varchar(60) NOT NULL,
494
- `user_id` varchar(30) NOT NULL,
495
- `status` varchar(15) NOT NULL,
496
- PRIMARY KEY (`id`)
497
- );";
498
-
499
- require_once ABSPATH . 'wp-admin/includes/upgrade.php';
500
- dbDelta( $sql );
501
- } else {
502
- // Fix an old issue with user_id column
503
- $wpdb->query( "ALTER TABLE $forums_table CHANGE `user_id` `user_id` VARCHAR(30) NOT NULL, CHANGE `ip` `ip` VARCHAR(60) NOT NULL" );
504
- }
505
 
506
- update_option( 'wp_ulike_dbVersion', WP_ULIKE_DB_VERSION );
 
 
 
507
 
508
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
509
 
510
  do_action( 'wp_ulike_activated', get_current_blog_id() );
511
  }
@@ -572,20 +559,20 @@ if ( ! class_exists( 'WPULIKE' ) ) :
572
 
573
  }
574
 
 
 
 
 
575
  /**
576
  * Open WP Ulike World :)
577
  *
578
  * @since 3.1
579
  */
580
  function RUN_WPULIKE(){
581
- return WPULIKE::get_instance();
582
  }
583
  RUN_WPULIKE();
584
 
585
- // Register hooks that are fired when the plugin is activated or deactivated.
586
- register_activation_hook ( __FILE__, array( 'WPULIKE', 'activate' ) );
587
- register_deactivation_hook( __FILE__, array( 'WPULIKE', 'deactivate' ) );
588
-
589
  else :
590
 
591
  function wp_ulike_two_instances_error() {
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.1
14
  * Author: Ali Mirzaei
15
  * Author URI: http://alimir.ir
16
  * Text Domain: wp-ulike
34
  \------------------------------------------/
35
  */
36
 
37
+ // If this file is called directly, abort.
38
+ if ( ! defined( 'WPINC' ) ) {
39
+ die('No Naughty Business Please !');
40
+ }
41
+
42
+ // Abort loading if WordPress is upgrading
43
+ if ( defined( 'WP_INSTALLING' ) && WP_INSTALLING ) {
44
+ return;
45
+ }
46
+
47
  // Do not change these values
48
  define( 'WP_ULIKE_PLUGIN_URI' , 'https://wpulike.com/' );
49
+ define( 'WP_ULIKE_VERSION' , '3.6.1' );
50
  define( 'WP_ULIKE_SLUG' , 'wp-ulike' );
 
51
 
52
  define( 'WP_ULIKE_DIR' , plugin_dir_path( __FILE__ ) );
53
  define( 'WP_ULIKE_URL' , plugins_url( '', __FILE__ ) );
66
  * Initialize the plugin
67
  * ===========================================================================*/
68
 
69
+ if ( ! class_exists( 'WpUlikeInit' ) ) :
70
 
71
+ class WpUlikeInit {
72
 
73
  /**
74
  * Instance of this class.
171
 
172
  $wp_ulike_setting = new wp_ulike_settings(
173
  'wp-ulike-settings',
174
+ __( 'Settings', WP_ULIKE_SLUG ),
175
  array(
176
  'parent' => false,
177
  'title' => __( 'WP ULike', WP_ULIKE_SLUG ),
432
  */
433
  private static function single_activate() {
434
 
435
+ global $wpdb;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
436
 
437
+ if ( ! empty( $wpdb->charset ) ) {
438
+ $charset_collate = "DEFAULT CHARACTER SET $wpdb->charset";
439
+ }
440
+ if ( ! empty( $wpdb->collate ) ) {
441
+ $charset_collate .= " COLLATE $wpdb->collate";
442
+ }
 
 
 
 
 
 
 
 
 
 
 
 
443
 
444
+ if( ! function_exists('maybe_create_table') ){
445
+ // Add one library admin function for next function
446
+ require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
447
+ }
448
 
449
+ // Posts table
450
+ $posts_table = $wpdb->prefix . "ulike";
451
+ maybe_create_table( $posts_table, "CREATE TABLE IF NOT EXISTS `{$posts_table}` (
452
+ `id` bigint(20) NOT NULL AUTO_INCREMENT,
453
+ `post_id` bigint(20) NOT NULL,
454
+ `date_time` datetime NOT NULL,
455
+ `ip` varchar(100) NOT NULL,
456
+ `user_id` varchar(100) NOT NULL,
457
+ `status` varchar(30) NOT NULL,
458
+ PRIMARY KEY (`id`)
459
+ ) $charset_collate AUTO_INCREMENT=1;" );
460
+
461
+ // Comments table
462
+ $comments_table = $wpdb->prefix . "ulike_comments";
463
+ maybe_create_table( $comments_table, "CREATE TABLE IF NOT EXISTS `{$comments_table}` (
464
+ `id` bigint(20) NOT NULL AUTO_INCREMENT,
465
+ `comment_id` bigint(20) NOT NULL,
466
+ `date_time` datetime NOT NULL,
467
+ `ip` varchar(100) NOT NULL,
468
+ `user_id` varchar(100) NOT NULL,
469
+ `status` varchar(30) NOT NULL,
470
+ PRIMARY KEY (`id`)
471
+ ) $charset_collate AUTO_INCREMENT=1;" );
472
+
473
+ // Activities table
474
+ $activities_table = $wpdb->prefix . "ulike_activities";
475
+ maybe_create_table( $activities_table, "CREATE TABLE IF NOT EXISTS `{$activities_table}` (
476
+ `id` bigint(20) NOT NULL AUTO_INCREMENT,
477
+ `activity_id` bigint(20) NOT NULL,
478
+ `date_time` datetime NOT NULL,
479
+ `ip` varchar(100) NOT NULL,
480
+ `user_id` varchar(100) NOT NULL,
481
+ `status` varchar(30) NOT NULL,
482
+ PRIMARY KEY (`id`)
483
+ ) $charset_collate AUTO_INCREMENT=1;" );
484
+
485
+ // Forums table
486
+ $forums_table = $wpdb->prefix . "ulike_forums";
487
+ maybe_create_table( $forums_table, "CREATE TABLE IF NOT EXISTS `{$forums_table}` (
488
+ `id` bigint(20) NOT NULL AUTO_INCREMENT,
489
+ `topic_id` bigint(20) NOT NULL,
490
+ `date_time` datetime NOT NULL,
491
+ `ip` varchar(100) NOT NULL,
492
+ `user_id` varchar(100) NOT NULL,
493
+ `status` varchar(30) NOT NULL,
494
+ PRIMARY KEY (`id`)
495
+ ) $charset_collate AUTO_INCREMENT=1;" );
496
 
497
  do_action( 'wp_ulike_activated', get_current_blog_id() );
498
  }
559
 
560
  }
561
 
562
+ // Register hooks that are fired when the plugin is activated or deactivated.
563
+ register_activation_hook ( __FILE__, array( 'WpUlikeInit', 'activate' ) );
564
+ register_deactivation_hook( __FILE__, array( 'WpUlikeInit', 'deactivate' ) );
565
+
566
  /**
567
  * Open WP Ulike World :)
568
  *
569
  * @since 3.1
570
  */
571
  function RUN_WPULIKE(){
572
+ return WpUlikeInit::get_instance();
573
  }
574
  RUN_WPULIKE();
575
 
 
 
 
 
576
  else :
577
 
578
  function wp_ulike_two_instances_error() {