wpForo Forum - Version 2.1.4

Version Description

Download this release

Release Info

Developer Tomdever
Plugin Icon 128x128 wpForo Forum
Version 2.1.4
Comparing to
See all releases

Code changes from version 2.1.3 to 2.1.4

assets/js/ajax.js CHANGED
@@ -700,18 +700,20 @@ $wpf(document).ready(function ($) {
700
  loading.remove();
701
  children.fadeOut('fast');
702
  var f = $(form);
703
- f.on('click', '.wpf-edit-post-cancel', function(){
 
 
704
  f.fadeOut('fast');
705
  children.fadeIn('slow');
706
  wpforo_editor.set_active( wpforo_editor.get_main() );
707
- $( 'html, body' ).animate({scrollTop: (wrap.offset().top - 80)}, 415);
708
  });
709
  if( init ){
710
  f.appendTo(wrap);
711
  wpforo_trigger_custom_event(document, 'wpforo_topic_portable_form', f);
712
  }
713
  f.fadeIn('slow');
714
- $( 'html, body' ).animate({scrollTop: (wrap.offset().top - 80)}, 415);
715
  $this.removeClass('wpf-processing');
716
  }
717
 
@@ -1150,7 +1152,6 @@ $wpf(document).ready(function ($) {
1150
  }).done(function (response) {
1151
  if( response.success ){
1152
  wpforo_editor.set_content(response.data.body);
1153
- //$('html, body').animate({ scrollTop: form.offset().top }, 500);
1154
  }
1155
  }).always(function(){
1156
  wpforo_load_hide();
700
  loading.remove();
701
  children.fadeOut('fast');
702
  var f = $(form);
703
+ f.on('click', '.wpf-edit-post-cancel', function(e){
704
+ e.stopPropagation();
705
+ e.preventDefault();
706
  f.fadeOut('fast');
707
  children.fadeIn('slow');
708
  wpforo_editor.set_active( wpforo_editor.get_main() );
709
+ $('html').scrollTop( (wrap.offset().top - 80) );
710
  });
711
  if( init ){
712
  f.appendTo(wrap);
713
  wpforo_trigger_custom_event(document, 'wpforo_topic_portable_form', f);
714
  }
715
  f.fadeIn('slow');
716
+ $('html').scrollTop( (wrap.offset().top - 80) );
717
  $this.removeClass('wpf-processing');
718
  }
719
 
1152
  }).done(function (response) {
1153
  if( response.success ){
1154
  wpforo_editor.set_content(response.data.body);
 
1155
  }
1156
  }).always(function(){
1157
  wpforo_load_hide();
assets/js/frontend.js CHANGED
@@ -216,7 +216,7 @@ var wpforo_editor = {
216
  var scrollto = null;
217
  var form = this.get_form( textareaid );
218
  if( form !== null ) scrollto = form.offset().top - 400;
219
- if( scrollto !== null ) $wpf('html, body').animate({ scrollTop: scrollto }, 500);
220
  },
221
  tinymce_focus: function(textareaid, caret_to_end){
222
  textareaid = this.fix_textareaid(textareaid);
@@ -454,7 +454,6 @@ function wpforo_getTextSelection(){
454
  editorContent = '[quote data-userid="'+ userid +'" data-postid="'+ postid +'"]' + container.innerHTML.replace(/\s*data-[\w-]+="[^"]*?"/gi, '') + '[/quote]';
455
  }
456
  wpforo_editor.insert_content( editorContent );
457
- // $wpf('html, body').animate({ scrollTop: $wpf("form.wpforo-main-form").offset().top }, 500);
458
  $wpf(this).remove();
459
  });
460
  toolTip.append(link);
@@ -477,6 +476,9 @@ window.wpforo_fix_form_data_attributes = function(){
477
  }
478
 
479
  $wpf(document).ready(function($){
 
 
 
480
  var wpforo_wrap = $('#wpforo-wrap');
481
 
482
  var scroll_to;
@@ -634,7 +636,7 @@ $wpf(document).ready(function($){
634
  var add_wpftopic = '<i class="fas fa-times" aria-hidden="true"></i>';
635
  if( !stat ) add_wpftopic = $('input[type="submit"]', form).val();
636
  $(this).html(add_wpftopic);
637
- $('html, body').animate({ scrollTop: ($(this).offset().top - 35) }, 415);
638
  });
639
 
640
  wpforo_wrap.on('click', '.wpf-answer-button .wpf-button:not(.not_reg_user)', function(){
@@ -663,7 +665,7 @@ $wpf(document).ready(function($){
663
  option_no_selected.prop('selected', true);
664
  }
665
  $( this ).html( add_wpftopic );
666
- $('html, body').animate({ scrollTop: (wrap.offset().top -30 ) }, 415);
667
  });
668
 
669
  wpforo_wrap.on('click', '.not_reg_user', function(){
@@ -750,7 +752,7 @@ $wpf(document).ready(function($){
750
 
751
  wpforo_editor.set_content( content, wpforo_editor.get_main() );
752
 
753
- $('html, body').animate({ scrollTop: wrap.offset().top }, 500);
754
 
755
  wpforo_load_hide();
756
 
@@ -778,7 +780,7 @@ $wpf(document).ready(function($){
778
 
779
  wpforo_editor.set_content( content, wpforo_editor.get_main() );
780
 
781
- $('html, body').animate({ scrollTop: wrap.offset().top }, 500);
782
 
783
  wpforo_load_hide();
784
 
216
  var scrollto = null;
217
  var form = this.get_form( textareaid );
218
  if( form !== null ) scrollto = form.offset().top - 400;
219
+ if( scrollto !== null ) $wpf('html').scrollTop( scrollto );
220
  },
221
  tinymce_focus: function(textareaid, caret_to_end){
222
  textareaid = this.fix_textareaid(textareaid);
454
  editorContent = '[quote data-userid="'+ userid +'" data-postid="'+ postid +'"]' + container.innerHTML.replace(/\s*data-[\w-]+="[^"]*?"/gi, '') + '[/quote]';
455
  }
456
  wpforo_editor.insert_content( editorContent );
 
457
  $wpf(this).remove();
458
  });
459
  toolTip.append(link);
476
  }
477
 
478
  $wpf(document).ready(function($){
479
+ var iwpfp = $( 'body.is_wpforo_page-1' );
480
+ if( iwpfp.length ) $('html').addClass( 'is_wpforo_page-1' );
481
+
482
  var wpforo_wrap = $('#wpforo-wrap');
483
 
484
  var scroll_to;
636
  var add_wpftopic = '<i class="fas fa-times" aria-hidden="true"></i>';
637
  if( !stat ) add_wpftopic = $('input[type="submit"]', form).val();
638
  $(this).html(add_wpftopic);
639
+ $('html').scrollTop( ($(this).offset().top - 35) );
640
  });
641
 
642
  wpforo_wrap.on('click', '.wpf-answer-button .wpf-button:not(.not_reg_user)', function(){
665
  option_no_selected.prop('selected', true);
666
  }
667
  $( this ).html( add_wpftopic );
668
+ $('html').scrollTop( (wrap.offset().top -30 ) );
669
  });
670
 
671
  wpforo_wrap.on('click', '.not_reg_user', function(){
752
 
753
  wpforo_editor.set_content( content, wpforo_editor.get_main() );
754
 
755
+ $('html').scrollTop( wrap.offset().top );
756
 
757
  wpforo_load_hide();
758
 
780
 
781
  wpforo_editor.set_content( content, wpforo_editor.get_main() );
782
 
783
+ $('html').scrollTop( wrap.offset().top );
784
 
785
  wpforo_load_hide();
786
 
classes/Cache.php CHANGED
@@ -80,8 +80,18 @@ class Cache {
80
  }
81
  }
82
 
83
- public function on(){
84
- return wpforo_setting( 'board', 'cache' );
 
 
 
 
 
 
 
 
 
 
85
  }
86
 
87
  public function get( $key, $type = 'loop', $template = null ) {
80
  }
81
  }
82
 
83
+ public function on( $type = 'all' ){
84
+ if( $type !== 'all' ){
85
+ if( $type === 'forum' && !apply_filters( 'wpforo_cache_forum', true ) ) return false;
86
+ if( $type === 'topic' && !apply_filters( 'wpforo_cache_topic', true ) ) return false;
87
+ if( $type === 'post' && !apply_filters( 'wpforo_cache_post', true ) ) return false;
88
+ if( $type === 'tag' && !apply_filters( 'wpforo_cache_tag', true ) ) return false;
89
+ if( $type === 'url' && !apply_filters( 'wpforo_cache_url', true ) ) return false;
90
+ if( $type === 'reaction' && !apply_filters( 'wpforo_cache_reaction', true ) ) return false;
91
+ if( $type === 'avatar' && !apply_filters( 'wpforo_cache_avatar', true ) ) return false;
92
+ if( $type === 'option' && !apply_filters( 'wpforo_cache_option', true ) ) return false;
93
+ }
94
+ return wpforo_setting( 'board', 'cache' );
95
  }
96
 
97
  public function get( $key, $type = 'loop', $template = null ) {
classes/Forums.php CHANGED
@@ -492,7 +492,7 @@ class Forums {
492
  }
493
 
494
  function get_forums( $args = [], &$items_count = 0, $count = false ) {
495
- $cache = WPF()->cache->on();
496
 
497
  $default = [
498
  'include' => [], // array( 2, 10, 25 )
492
  }
493
 
494
  function get_forums( $args = [], &$items_count = 0, $count = false ) {
495
+ $cache = WPF()->cache->on('forum');
496
 
497
  $default = [
498
  'include' => [], // array( 2, 10, 25 )
classes/Members.php CHANGED
@@ -1506,7 +1506,7 @@ class Members {
1506
  }
1507
 
1508
  public function _get_avatar_url( $userid ) {
1509
- $cache = WPF()->cache->on();
1510
  $cache_avatar = apply_filters( 'wpforo_avatar_cache', true, $userid );
1511
  if( $cache && $cache_avatar && $avatar_url = WPF()->cache->get_item( $userid, 'avatar') ) {
1512
  return str_replace('#', '', (string) $avatar_url );
1506
  }
1507
 
1508
  public function _get_avatar_url( $userid ) {
1509
+ $cache = WPF()->cache->on('avatar');
1510
  $cache_avatar = apply_filters( 'wpforo_avatar_cache', true, $userid );
1511
  if( $cache && $cache_avatar && $avatar_url = WPF()->cache->get_item( $userid, 'avatar') ) {
1512
  return str_replace('#', '', (string) $avatar_url );
classes/Posts.php CHANGED
@@ -467,7 +467,7 @@ class Posts {
467
  */
468
  function get_posts( $args = [], &$items_count = 0, $count = true ) {
469
 
470
- $cache = WPF()->cache->on();
471
 
472
  $default = [
473
  'include' => [], // array( 2, 10, 25 )
@@ -1184,7 +1184,7 @@ class Posts {
1184
  }
1185
 
1186
  public function get_full_url( $arg ) {
1187
- $cache = WPF()->cache->on();
1188
 
1189
  if( isset( $arg ) && ! is_array( $arg ) ) {
1190
  $postid = wpforo_bigintval( $arg );
467
  */
468
  function get_posts( $args = [], &$items_count = 0, $count = true ) {
469
 
470
+ $cache = WPF()->cache->on('post');
471
 
472
  $default = [
473
  'include' => [], // array( 2, 10, 25 )
1184
  }
1185
 
1186
  public function get_full_url( $arg ) {
1187
+ $cache = WPF()->cache->on('url');
1188
 
1189
  if( isset( $arg ) && ! is_array( $arg ) ) {
1190
  $postid = wpforo_bigintval( $arg );
classes/Topics.php CHANGED
@@ -555,7 +555,7 @@ class Topics {
555
  *
556
  */
557
  function get_topics( $args = [], &$items_count = 0, $count = true ) {
558
- $cache = WPF()->cache->on();
559
 
560
  $default = [
561
  'include' => [], // array( 2, 10, 25 )
@@ -1099,7 +1099,7 @@ class Topics {
1099
  public function get_full_url( $topic, $forum = [], $_cache = true ) {
1100
  if( ! is_array( $topic ) ) $topic = $this->get_topic( $topic );
1101
  if( $topic ) {
1102
- $cache = WPF()->cache->on();
1103
  // $_cache is used to stop caching on merge and move actions,
1104
  // otherwise the merging and splitting go to redirection loop
1105
  if( $_cache && $cache && wpfval($topic, 'topicid') ) {
@@ -1603,7 +1603,7 @@ class Topics {
1603
  }
1604
 
1605
  public function get_tags( $args = [], &$items_count = 0 ) {
1606
- $cache = WPF()->cache->on();
1607
  $default = [
1608
  'tag' => '',
1609
  'prefix' => 0,
555
  *
556
  */
557
  function get_topics( $args = [], &$items_count = 0, $count = true ) {
558
+ $cache = WPF()->cache->on('topic');
559
 
560
  $default = [
561
  'include' => [], // array( 2, 10, 25 )
1099
  public function get_full_url( $topic, $forum = [], $_cache = true ) {
1100
  if( ! is_array( $topic ) ) $topic = $this->get_topic( $topic );
1101
  if( $topic ) {
1102
+ $cache = WPF()->cache->on('url');
1103
  // $_cache is used to stop caching on merge and move actions,
1104
  // otherwise the merging and splitting go to redirection loop
1105
  if( $_cache && $cache && wpfval($topic, 'topicid') ) {
1603
  }
1604
 
1605
  public function get_tags( $args = [], &$items_count = 0 ) {
1606
+ $cache = WPF()->cache->on('tag');
1607
  $default = [
1608
  'tag' => '',
1609
  'prefix' => 0,
includes/functions-template.php CHANGED
@@ -296,7 +296,7 @@ function _wpforo_post( $postid, $var = 'item' ) {
296
  function wpforo_post( $postid, $var = 'item', $echo = false ) {
297
  $post = ( $var === 'item' ) ? [] : null;
298
  if( ! $postid ) return $post;
299
- $cache = WPF()->cache->on();
300
  if( $cache ) $post = WPF()->cache->get_item( $postid, 'post' );
301
  if( empty( $post ) ) {
302
  $post = [];
@@ -329,7 +329,7 @@ function wpforo_post( $postid, $var = 'item', $echo = false ) {
329
  }
330
  }
331
 
332
- if( $var !== 'item' ) $post = wpfkey( $post, $var ) ? $post[ $var ] : wpforo_get_postmeta( $postid, $var, true );
333
 
334
  if( $echo && is_scalar( $post ) ) echo $post;
335
  return $post;
@@ -367,7 +367,7 @@ function _wpforo_topic( $topicid, $var = 'item' ) {
367
  function wpforo_topic( $topicid, $var = 'item', $echo = false ) {
368
  $topic = ( $var === 'item' ) ? [] : null;
369
  if( ! $topicid ) return $topic;
370
- $cache = WPF()->cache->on();
371
  if( $cache ) $topic = WPF()->cache->get_item( $topicid, 'topic' );
372
 
373
  if( empty( $topic ) ) {
@@ -392,16 +392,16 @@ function wpforo_topic( $topicid, $var = 'item', $echo = false ) {
392
  }
393
  }
394
 
395
- if( $var !== 'item' ) {
396
  if( $var === 'body' ){
397
  $topic = wpforo_post( $topic['first_postid'], 'body' );
398
  }else{
399
- $topic = wpfval( $topic, $var );
400
  }
401
- }
402
 
403
- if( $echo && is_scalar( $topic ) ) echo $topic;
404
- return $topic;
405
  }
406
 
407
  function _wpforo_forum( $forumid, $var = 'item' ) {
@@ -424,7 +424,7 @@ function _wpforo_forum( $forumid, $var = 'item' ) {
424
 
425
  function wpforo_forum( $forumid, $var = 'item', $echo = false ) {
426
  $forum = ( $var === 'item' ) ? [] : null;
427
- $cache = WPF()->cache->on();
428
  if( ! $forumid ) return $forum;
429
  if( $cache ) $forum = WPF()->cache->get_item( $forumid, 'forum' );
430
 
@@ -450,9 +450,11 @@ function wpforo_forum( $forumid, $var = 'item', $echo = false ) {
450
  }
451
  }
452
 
453
- if( $var !== 'item' ) $forum = wpfval( $forum, $var );
 
 
454
 
455
- if( $echo && is_scalar( $forum ) ) echo $forum;
456
  return $forum;
457
  }
458
 
@@ -501,7 +503,7 @@ function _wpforo_tag( $tagid, $var = 'item' ) {
501
  function wpforo_tag( $tagid, $var = 'item', $echo = false ) {
502
  $tag = ( $var == 'item' ) ? [] : null;
503
  if( ! $tagid ) return $tag;
504
- $cache = WPF()->cache->on();
505
 
506
  if( $cache ) $tag = WPF()->cache->get_item( md5( $tagid ), 'tag' );
507
 
@@ -521,9 +523,11 @@ function wpforo_tag( $tagid, $var = 'item', $echo = false ) {
521
  }
522
  }
523
 
524
- if( $var !== 'item' ) $tag = wpfval( $tag, $var );
 
 
525
 
526
- if( $echo && is_scalar( $tag ) ) echo $tag;
527
  return $tag;
528
  }
529
 
296
  function wpforo_post( $postid, $var = 'item', $echo = false ) {
297
  $post = ( $var === 'item' ) ? [] : null;
298
  if( ! $postid ) return $post;
299
+ $cache = WPF()->cache->on('post');
300
  if( $cache ) $post = WPF()->cache->get_item( $postid, 'post' );
301
  if( empty( $post ) ) {
302
  $post = [];
329
  }
330
  }
331
 
332
+ if( $var && $var !== 'item' ) $post = wpfkey( $post, $var ) ? $post[ $var ] : wpforo_get_postmeta( $postid, $var, true );
333
 
334
  if( $echo && is_scalar( $post ) ) echo $post;
335
  return $post;
367
  function wpforo_topic( $topicid, $var = 'item', $echo = false ) {
368
  $topic = ( $var === 'item' ) ? [] : null;
369
  if( ! $topicid ) return $topic;
370
+ $cache = WPF()->cache->on('topic');
371
  if( $cache ) $topic = WPF()->cache->get_item( $topicid, 'topic' );
372
 
373
  if( empty( $topic ) ) {
392
  }
393
  }
394
 
395
+ if( $var && $var !== 'item' ) {
396
  if( $var === 'body' ){
397
  $topic = wpforo_post( $topic['first_postid'], 'body' );
398
  }else{
399
+ $topic = wpfkey( $topic, $var ) ? $topic[ $var ] : '';
400
  }
401
+ }
402
 
403
+ if( $echo ) echo $topic;
404
+ return $topic;
405
  }
406
 
407
  function _wpforo_forum( $forumid, $var = 'item' ) {
424
 
425
  function wpforo_forum( $forumid, $var = 'item', $echo = false ) {
426
  $forum = ( $var === 'item' ) ? [] : null;
427
+ $cache = WPF()->cache->on('forum');
428
  if( ! $forumid ) return $forum;
429
  if( $cache ) $forum = WPF()->cache->get_item( $forumid, 'forum' );
430
 
450
  }
451
  }
452
 
453
+ if( $var && $var != 'item' ) {
454
+ $forum = ( isset( $forum[ $var ] ) ) ? $forum[ $var ] : '';
455
+ }
456
 
457
+ if( $echo ) echo $forum;
458
  return $forum;
459
  }
460
 
503
  function wpforo_tag( $tagid, $var = 'item', $echo = false ) {
504
  $tag = ( $var == 'item' ) ? [] : null;
505
  if( ! $tagid ) return $tag;
506
+ $cache = WPF()->cache->on('tag');
507
 
508
  if( $cache ) $tag = WPF()->cache->get_item( md5( $tagid ), 'tag' );
509
 
523
  }
524
  }
525
 
526
+ if( $var && $var != 'item' ) {
527
+ $tag = ( isset( $tag[ $var ] ) ) ? $tag[ $var ] : '';
528
+ }
529
 
530
+ if( $echo ) echo $tag;
531
  return $tag;
532
  }
533
 
includes/functions.php CHANGED
@@ -469,10 +469,10 @@ function wpforo_is_admin( $url = '' ) {
469
  }
470
 
471
  function _is_wpforo_page( $url = '' ) {
472
- if( ! $url ) $url = wpforo_get_request_uri();
473
- $result = ( ! ( wpforo_is_admin( $url ) || ( is_wpforo_exclude_url( $url ) && !is_wpforo_url( $url ) && ! is_wpforo_shortcode_page( $url ) ) ) && ( is_wpforo_url( $url ) || is_wpforo_shortcode_page( $url ) ) );
474
 
475
- return apply_filters( 'is_wpforo_page', $result, $url );
476
  }
477
 
478
  function is_wpforo_page( $url = '' ) {
469
  }
470
 
471
  function _is_wpforo_page( $url = '' ) {
472
+ if( ! $url ) $url = wpforo_get_request_uri();
473
+ $result = ( ! ( wpforo_is_admin( $url ) || ( is_wpforo_exclude_url( $url ) && ! is_wpforo_shortcode_page( $url ) ) ) && ( is_wpforo_url( $url ) || is_wpforo_shortcode_page( $url ) ) );
474
 
475
+ return apply_filters( 'is_wpforo_page', $result, $url );
476
  }
477
 
478
  function is_wpforo_page( $url = '' ) {
modules/follows/classes/Actions.php CHANGED
@@ -55,7 +55,7 @@ class Actions {
55
  $key = 'topicid_' . $topic['topicid'] . '_user_email_' . $user['user_email'];
56
  if( ! WPF()->ram_cache->exists( $key ) ){
57
 
58
- if( wpfval($user, 'status') !== 'active' ) continue;
59
  if( wpforo_is_users_same( $owner, $user ) ) continue;
60
  if( wpforo_is_users_same( $user ) ) continue;
61
  if( ! WPF()->topic->view_access( $topic, $user ) ) continue;
@@ -85,7 +85,7 @@ class Actions {
85
  $key = 'postid_' . $post['postid'] . '_user_email_' . $user['user_email'];
86
  if( ! WPF()->ram_cache->exists( $key ) ){
87
 
88
- if( wpfval($user, 'status') !== 'active' ) continue;
89
  if( wpforo_is_users_same( $owner, $user ) ) continue;
90
  if( wpforo_is_users_same( $user ) ) continue;
91
  if( ! WPF()->post->view_access( $post, $user ) ) continue;
55
  $key = 'topicid_' . $topic['topicid'] . '_user_email_' . $user['user_email'];
56
  if( ! WPF()->ram_cache->exists( $key ) ){
57
 
58
+ if( wpfval($user, 'status') === 'inactive' ) continue;
59
  if( wpforo_is_users_same( $owner, $user ) ) continue;
60
  if( wpforo_is_users_same( $user ) ) continue;
61
  if( ! WPF()->topic->view_access( $topic, $user ) ) continue;
85
  $key = 'postid_' . $post['postid'] . '_user_email_' . $user['user_email'];
86
  if( ! WPF()->ram_cache->exists( $key ) ){
87
 
88
+ if( wpfval($user, 'status') === 'inactive' ) continue;
89
  if( wpforo_is_users_same( $owner, $user ) ) continue;
90
  if( wpforo_is_users_same( $user ) ) continue;
91
  if( ! WPF()->post->view_access( $post, $user ) ) continue;
modules/mentioning/classes/Actions.php CHANGED
@@ -41,7 +41,7 @@ class Actions {
41
  $user = WPF()->member->get_member( $match[1] );
42
  if( ! empty( $user['user_email'] ) && ! $user['is_mention_muted'] ) {
43
  if( apply_filters( 'break_wpforo_mention_send_email', false, $user, $owner, $item, $pitem ) ) continue;
44
- if( wpfval($user, 'status') !== 'active' ) continue;
45
  if( wpforo_is_users_same( $owner, $user ) ) continue;
46
  if( wpforo_is_users_same( $user ) ) continue;
47
  if( wpfkey( $item, 'first_postid' ) ){
41
  $user = WPF()->member->get_member( $match[1] );
42
  if( ! empty( $user['user_email'] ) && ! $user['is_mention_muted'] ) {
43
  if( apply_filters( 'break_wpforo_mention_send_email', false, $user, $owner, $item, $pitem ) ) continue;
44
+ if( wpfval($user, 'status') === 'inactive' ) continue;
45
  if( wpforo_is_users_same( $owner, $user ) ) continue;
46
  if( wpforo_is_users_same( $user ) ) continue;
47
  if( wpfkey( $item, 'first_postid' ) ){
modules/reactions/Reactions.php CHANGED
@@ -293,7 +293,7 @@ class Reactions {
293
  */
294
  public function _get_reaction( $args, $operator = 'AND' ) {
295
 
296
- $cache = WPF()->cache->on();
297
  if( is_numeric( $args ) ) $args = [ 'reactionid' => wpforo_bigintval( $args ) ];
298
 
299
  // get_reaction_cache() returns all reactions of the requested postid
@@ -444,7 +444,7 @@ class Reactions {
444
  * @return mixed | NULL: if the cache is not found | []: if there is no reaction | array( array(...), array(...) ): the reaction
445
  */
446
  public function get_reaction_cache( $args ){
447
- $cache = WPF()->cache->on();
448
  $cache_reaction = apply_filters( 'wpforo_reaction_cache', true, $args );
449
  if( $cache && $cache_reaction && wpfval($args, 'postid') ) {
450
  $reactions = WPF()->cache->get_item( $args['postid'], 'reaction');
@@ -533,7 +533,7 @@ class Reactions {
533
  }
534
 
535
  public function create_reaction_cache( $postid, $post_reactions = [] ){
536
- $cache = WPF()->cache->on();
537
  $cache_reaction = apply_filters( 'wpforo_reaction_cache', true, [ 'postid' => $postid ] );
538
  if( $cache && $cache_reaction && $postid ){
539
  $post_reactions = ( !empty( $post_reactions ) ) ? $post_reactions : $this->get_reactions( [ 'postid' => $postid ] );
@@ -543,7 +543,7 @@ class Reactions {
543
  }
544
 
545
  public function get_post_reactions_and_cache( $args ){
546
- $cache = WPF()->cache->on();
547
  // If there is no reaction cache it creates a new cache file
548
  // The cache is based on postid, each cache item contains all reactions of the postid
549
  if( $cache && wpfval( $args, 'postid' ) ){
293
  */
294
  public function _get_reaction( $args, $operator = 'AND' ) {
295
 
296
+ $cache = WPF()->cache->on('reaction');
297
  if( is_numeric( $args ) ) $args = [ 'reactionid' => wpforo_bigintval( $args ) ];
298
 
299
  // get_reaction_cache() returns all reactions of the requested postid
444
  * @return mixed | NULL: if the cache is not found | []: if there is no reaction | array( array(...), array(...) ): the reaction
445
  */
446
  public function get_reaction_cache( $args ){
447
+ $cache = WPF()->cache->on('reaction');
448
  $cache_reaction = apply_filters( 'wpforo_reaction_cache', true, $args );
449
  if( $cache && $cache_reaction && wpfval($args, 'postid') ) {
450
  $reactions = WPF()->cache->get_item( $args['postid'], 'reaction');
533
  }
534
 
535
  public function create_reaction_cache( $postid, $post_reactions = [] ){
536
+ $cache = WPF()->cache->on('reaction');
537
  $cache_reaction = apply_filters( 'wpforo_reaction_cache', true, [ 'postid' => $postid ] );
538
  if( $cache && $cache_reaction && $postid ){
539
  $post_reactions = ( !empty( $post_reactions ) ) ? $post_reactions : $this->get_reactions( [ 'postid' => $postid ] );
543
  }
544
 
545
  public function get_post_reactions_and_cache( $args ){
546
+ $cache = WPF()->cache->on('reaction');
547
  // If there is no reaction cache it creates a new cache file
548
  // The cache is based on postid, each cache item contains all reactions of the postid
549
  if( $cache && wpfval( $args, 'postid' ) ){
modules/subscriptions/classes/Actions.php CHANGED
@@ -235,7 +235,7 @@ class Actions {
235
 
236
  if( apply_filters( 'break_wpforo_subscriber_send_email_after_add_topic', false, $user, $owner, $topic, $forum ) ) continue;
237
 
238
- if( wpfval($user, 'status') !== 'active' ) continue;
239
  if( wpforo_is_users_same( $owner, $user ) ) continue;
240
  if( wpforo_is_users_same( $user ) ) continue;
241
 
@@ -282,7 +282,7 @@ class Actions {
282
 
283
  if( apply_filters( 'break_wpforo_subscriber_send_email_after_add_post', false, $user, $owner, $post, $topic ) ) continue;
284
 
285
- if( wpfval($user, 'status') !== 'active' ) continue;
286
  if( wpforo_is_users_same( $owner, $user ) ) continue;
287
  if( wpforo_is_users_same( $user ) ) continue;
288
 
235
 
236
  if( apply_filters( 'break_wpforo_subscriber_send_email_after_add_topic', false, $user, $owner, $topic, $forum ) ) continue;
237
 
238
+ if( wpfval($user, 'status') === 'inactive' ) continue;
239
  if( wpforo_is_users_same( $owner, $user ) ) continue;
240
  if( wpforo_is_users_same( $user ) ) continue;
241
 
282
 
283
  if( apply_filters( 'break_wpforo_subscriber_send_email_after_add_post', false, $user, $owner, $post, $topic ) ) continue;
284
 
285
+ if( wpfval($user, 'status') === 'inactive' ) continue;
286
  if( wpforo_is_users_same( $owner, $user ) ) continue;
287
  if( wpforo_is_users_same( $user ) ) continue;
288
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: gVectors Team
3
  Tags: forum, forums, forum plugin, WordPress forum plugin, community, discussion
4
  Requires at least: 5.1
5
  Tested up to: 6.1
6
- Stable tag: 2.1.3
7
  Requires PHP: 5.6 and higher
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -163,10 +163,15 @@ Find wpForo forum plugin addons on [gVectors Team website...](https://gvectors.c
163
 
164
  == Changelog ==
165
 
166
- = wpForo Forum 2.1.0 - 2.1.3 | 13.12.2022 =
167
 
168
  [wpForo Forum v2.1 Release Summary](https://wpforo.com/community/wpforo-announcements/wpforo-2-1-0-is-released/)
169
 
 
 
 
 
 
170
  * Version 2.1.2 - 2.1.3
171
  * Fixed Bug: Let users create and edit questions with empty content
172
  * Fixed Bug: Email sending issues with internal cache
3
  Tags: forum, forums, forum plugin, WordPress forum plugin, community, discussion
4
  Requires at least: 5.1
5
  Tested up to: 6.1
6
+ Stable tag: 2.1.4
7
  Requires PHP: 5.6 and higher
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
163
 
164
  == Changelog ==
165
 
166
+ = wpForo Forum 2.1.0 - 2.1.4 | 14.12.2022 =
167
 
168
  [wpForo Forum v2.1 Release Summary](https://wpforo.com/community/wpforo-announcements/wpforo-2-1-0-is-released/)
169
 
170
+ * Version 2.1.4
171
+ * Fixed Bug: Topic and Post URL problems
172
+ * Fixed Bug: Scrolling issues
173
+ * Fixed Bug: Email sending issues
174
+ * --------
175
  * Version 2.1.2 - 2.1.3
176
  * Fixed Bug: Let users create and edit questions with empty content
177
  * Fixed Bug: Email sending issues with internal cache
themes/2022/style-rtl.css CHANGED
@@ -1,7 +1,6 @@
1
  /*
2
  RTL Style of Classic Theme
3
  */
4
- body.is_wpforo_page-1, html{ overflow-y: scroll; scroll-behavior: smooth; }
5
  #wpforo #wpforo-wrap .wpforo-main{clear:both;}
6
  #wpforo #wpforo-wrap.wpf-dark{ padding:30px; margin:2px;}
7
  #wpforo #wpforo-wrap .wpforo-subtop{display: block!important; position: relative;}
1
  /*
2
  RTL Style of Classic Theme
3
  */
 
4
  #wpforo #wpforo-wrap .wpforo-main{clear:both;}
5
  #wpforo #wpforo-wrap.wpf-dark{ padding:30px; margin:2px;}
6
  #wpforo #wpforo-wrap .wpforo-subtop{display: block!important; position: relative;}
themes/2022/style.css CHANGED
@@ -6,7 +6,6 @@ Theme URI: http://wpforo.com
6
  Author: gVectors Team
7
  */
8
 
9
- body.is_wpforo_page-1, html{ overflow-y: scroll; scroll-behavior: smooth; }
10
  #wpforo #wpforo-wrap .wpforo-main{clear:both;}
11
  #wpforo #wpforo-wrap.wpf-dark{ padding:30px; margin:2px;}
12
  #wpforo #wpforo-wrap .wpforo-subtop{display: block!important; position: relative;}
6
  Author: gVectors Team
7
  */
8
 
 
9
  #wpforo #wpforo-wrap .wpforo-main{clear:both;}
10
  #wpforo #wpforo-wrap.wpf-dark{ padding:30px; margin:2px;}
11
  #wpforo #wpforo-wrap .wpforo-subtop{display: block!important; position: relative;}
themes/classic/style-rtl.css CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  RTL Style of Classic Theme
3
  */
4
- body.is_wpforo_page-1, html{ overflow-y: scroll; scroll-behavior: smooth; }
5
  #wpforo #wpforo-wrap .wpforo-main{clear:both;}
6
  #wpforo #wpforo-wrap.wpf-dark{ padding:30px; margin:2px;}
7
  #wpforo #wpforo-wrap .wpforo-subtop{display: block!important; position: relative;}
1
  /*
2
  RTL Style of Classic Theme
3
  */
4
+
5
  #wpforo #wpforo-wrap .wpforo-main{clear:both;}
6
  #wpforo #wpforo-wrap.wpf-dark{ padding:30px; margin:2px;}
7
  #wpforo #wpforo-wrap .wpforo-subtop{display: block!important; position: relative;}
themes/classic/style.css CHANGED
@@ -6,7 +6,6 @@ Theme URI: http://wpforo.com
6
  Author: gVectors Team
7
  */
8
 
9
- body.is_wpforo_page-1, html{ overflow-y: scroll; scroll-behavior: smooth; }
10
  #wpforo #wpforo-wrap .wpforo-main{clear:both;}
11
  #wpforo #wpforo-wrap.wpf-dark{ padding:30px; margin:2px;}
12
  #wpforo #wpforo-wrap .wpforo-subtop{display: block!important; position: relative;}
6
  Author: gVectors Team
7
  */
8
 
 
9
  #wpforo #wpforo-wrap .wpforo-main{clear:both;}
10
  #wpforo #wpforo-wrap.wpf-dark{ padding:30px; margin:2px;}
11
  #wpforo #wpforo-wrap .wpforo-subtop{display: block!important; position: relative;}
wpforo.php CHANGED
@@ -5,14 +5,14 @@
5
  * Description: WordPress Forum plugin. wpForo is a full-fledged forum solution for your community. Comes with multiple modern forum layouts.
6
  * Author: gVectors Team
7
  * Author URI: https://gvectors.com/
8
- * Version: 2.1.3
9
  * Text Domain: wpforo
10
  * Domain Path: /languages
11
  */
12
 
13
  namespace wpforo;
14
 
15
- define( 'WPFORO_VERSION', '2.1.3' );
16
 
17
  //Exit if accessed directly
18
  if( ! defined( 'ABSPATH' ) ) exit;
@@ -515,7 +515,7 @@ final class wpforo {
515
  }
516
 
517
  public function shortcode_atts_to_url( $atts ) {
518
- if( is_null( $this->forum ) ) $this->init_classes();
519
 
520
  $url = wpforo_home_url();
521
 
@@ -559,7 +559,7 @@ final class wpforo {
559
  }
560
 
561
  public function init_current_url( $atts = [] ) {
562
- if( is_null( $this->post ) ) $this->init_classes();
563
 
564
  if( is_scalar( $atts ) ) {
565
  $url = $atts;
5
  * Description: WordPress Forum plugin. wpForo is a full-fledged forum solution for your community. Comes with multiple modern forum layouts.
6
  * Author: gVectors Team
7
  * Author URI: https://gvectors.com/
8
+ * Version: 2.1.4
9
  * Text Domain: wpforo
10
  * Domain Path: /languages
11
  */
12
 
13
  namespace wpforo;
14
 
15
+ define( 'WPFORO_VERSION', '2.1.4' );
16
 
17
  //Exit if accessed directly
18
  if( ! defined( 'ABSPATH' ) ) exit;
515
  }
516
 
517
  public function shortcode_atts_to_url( $atts ) {
518
+ //if( is_null( $this->forum ) ) $this->init_classes();
519
 
520
  $url = wpforo_home_url();
521
 
559
  }
560
 
561
  public function init_current_url( $atts = [] ) {
562
+ //if( is_null( $this->post ) ) $this->init_classes();
563
 
564
  if( is_scalar( $atts ) ) {
565
  $url = $atts;