myCRED - Version 2.4.4.1

Version Description

Improvement and Bug fixes.

Download this release

Release Info

Developer wpexpertsio
Plugin Icon 128x128 myCRED
Version 2.4.4.1
Comparing to
See all releases

Code changes from version 2.4.4 to 2.4.4.1

addons/badges/myCRED-addon-badges.php CHANGED
@@ -1070,6 +1070,19 @@ th#badge-users { width: 10%; }
1070
  * @version 1.2
1071
  */
1072
  public function metabox_badge_setup( $post ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
1073
 
1074
  $badge = mycred_get_badge( $post->ID );
1075
  $references = mycred_get_all_references();
@@ -1105,8 +1118,8 @@ th#badge-users { width: 10%; }
1105
 
1106
  $level = $level_counter;
1107
 
1108
- $add_level = '<button type="button" class="button button-seconary button-small top-right-corner" id="badges-add-new-level">' . esc_js( __( 'Add Level', 'mycred' ) ) . '</button>';
1109
- $remove_level = '<button type="button" class="button button-seconary button-small top-right-corner remove-badge-level" data-level="{{level}}">' . esc_js( __( 'Remove Level', 'mycred' ) ) . '</button>';
1110
 
1111
  $level_image = $this->get_level_image( $setup, $level );
1112
  $empty_level = 'empty dashicons';
1070
  * @version 1.2
1071
  */
1072
  public function metabox_badge_setup( $post ) {
1073
+
1074
+ ?>
1075
+
1076
+ <style>
1077
+
1078
+ button.button.button-seconary.button-small.remove-badge-level {
1079
+ margin-bottom: 5px !important;
1080
+ margin-left: 94% !important;
1081
+ }
1082
+
1083
+ </style>
1084
+
1085
+ <?php
1086
 
1087
  $badge = mycred_get_badge( $post->ID );
1088
  $references = mycred_get_all_references();
1118
 
1119
  $level = $level_counter;
1120
 
1121
+ $add_level = '<button type="button" class="button button-seconary button-small top-right-corner mt-2" id="badges-add-new-level">' . esc_js( __( 'Add Level', 'mycred' ) ) . '</button>';
1122
+ $remove_level = '<button type="button" class="button button-seconary button-small remove-badge-level" data-level="{{level}}">' . esc_js( __( 'Remove Level', 'mycred' ) ) . '</button>';
1123
 
1124
  $level_image = $this->get_level_image( $setup, $level );
1125
  $empty_level = 'empty dashicons';
includes/mycred-tools.php CHANGED
@@ -63,12 +63,18 @@ class myCRED_Tools {
63
 
64
  /**
65
  * Register tools menu
 
 
66
  */
67
  public function tools_sub_menu() {
 
 
 
 
68
  mycred_add_main_submenu(
69
  'Tools',
70
  'Tools',
71
- 'manage_options',
72
  'mycred-tools',
73
  array( $this, 'tools_page' ),
74
  2
@@ -444,11 +450,20 @@ class myCRED_Tools {
444
  /**
445
  * Ajax Call-back
446
  * @since 2.4.1
 
447
  * @version 1.0
448
  */
449
  public function tools_select_user()
450
  {
 
451
  check_ajax_referer( 'mycred-tools', 'token' );
 
 
 
 
 
 
 
452
 
453
  if( isset( $_GET['action'] ) && $_GET['action'] == 'mycred-tools-select-user' )
454
  {
63
 
64
  /**
65
  * Register tools menu
66
+ *
67
+ * @since 2.4.4.1 `$capability` check added
68
  */
69
  public function tools_sub_menu() {
70
+
71
+ $mycred = new myCRED_Settings();
72
+ $capability = $mycred->get_point_admin_capability();
73
+
74
  mycred_add_main_submenu(
75
  'Tools',
76
  'Tools',
77
+ $capability,
78
  'mycred-tools',
79
  array( $this, 'tools_page' ),
80
  2
450
  /**
451
  * Ajax Call-back
452
  * @since 2.4.1
453
+ * @since 2.4.4.1 `current_user_can` security added
454
  * @version 1.0
455
  */
456
  public function tools_select_user()
457
  {
458
+
459
  check_ajax_referer( 'mycred-tools', 'token' );
460
+
461
+ $mycred = new myCRED_Settings();
462
+ $capability = $mycred->get_point_admin_capability();
463
+
464
+ if( !current_user_can( $capability ) ) {
465
+ die( '-1' );
466
+ }
467
 
468
  if( isset( $_GET['action'] ) && $_GET['action'] == 'mycred-tools-select-user' )
469
  {
mycred.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: myCred
4
  * Plugin URI: https://mycred.me
5
  * Description: An adaptive points management system for WordPress powered websites.
6
- * Version: 2.4.4
7
  * Tags: point, credit, loyalty program, engagement, reward, woocommerce rewards
8
  * Author: myCred
9
  * Author URI: https://mycred.me
@@ -20,7 +20,7 @@ if ( ! class_exists( 'myCRED_Core' ) ) :
20
  final class myCRED_Core {
21
 
22
  // Plugin Version
23
- public $version = '2.4.4';
24
 
25
  // Instnace
26
  protected static $_instance = NULL;
@@ -54,14 +54,14 @@ if ( ! class_exists( 'myCRED_Core' ) ) :
54
  * @since 1.7
55
  * @version 1.0
56
  */
57
- public function __clone() { _doing_it_wrong( __FUNCTION__, 'Cheatin&#8217; huh?', '2.4.4' ); }
58
 
59
  /**
60
  * Not allowed
61
  * @since 1.7
62
  * @version 1.0
63
  */
64
- public function __wakeup() { _doing_it_wrong( __FUNCTION__, 'Cheatin&#8217; huh?', '2.4.4' ); }
65
 
66
  /**
67
  * Get
@@ -82,7 +82,7 @@ if ( ! class_exists( 'myCRED_Core' ) ) :
82
  if ( ! defined( $name ) )
83
  define( $name, $value );
84
  elseif ( ! $definable && defined( $name ) )
85
- _doing_it_wrong( 'myCRED_Core->define()', 'Could not define: ' . $name . ' as it is already defined somewhere else!', '2.4.4' );
86
  }
87
 
88
  /**
@@ -94,7 +94,7 @@ if ( ! class_exists( 'myCRED_Core' ) ) :
94
  if ( file_exists( $required_file ) )
95
  require_once $required_file;
96
  else
97
- _doing_it_wrong( 'myCRED_Core->file()', 'Requested file ' . $required_file . ' not found.', '2.4.4' );
98
  }
99
 
100
  /**
3
  * Plugin Name: myCred
4
  * Plugin URI: https://mycred.me
5
  * Description: An adaptive points management system for WordPress powered websites.
6
+ * Version: 2.4.4.1
7
  * Tags: point, credit, loyalty program, engagement, reward, woocommerce rewards
8
  * Author: myCred
9
  * Author URI: https://mycred.me
20
  final class myCRED_Core {
21
 
22
  // Plugin Version
23
+ public $version = '2.4.4.1';
24
 
25
  // Instnace
26
  protected static $_instance = NULL;
54
  * @since 1.7
55
  * @version 1.0
56
  */
57
+ public function __clone() { _doing_it_wrong( __FUNCTION__, 'Cheatin&#8217; huh?', '2.4.4.1' ); }
58
 
59
  /**
60
  * Not allowed
61
  * @since 1.7
62
  * @version 1.0
63
  */
64
+ public function __wakeup() { _doing_it_wrong( __FUNCTION__, 'Cheatin&#8217; huh?', '2.4.4.1' ); }
65
 
66
  /**
67
  * Get
82
  if ( ! defined( $name ) )
83
  define( $name, $value );
84
  elseif ( ! $definable && defined( $name ) )
85
+ _doing_it_wrong( 'myCRED_Core->define()', 'Could not define: ' . $name . ' as it is already defined somewhere else!', '2.4.4.1' );
86
  }
87
 
88
  /**
94
  if ( file_exists( $required_file ) )
95
  require_once $required_file;
96
  else
97
+ _doing_it_wrong( 'myCRED_Core->file()', 'Requested file ' . $required_file . ' not found.', '2.4.4.1' );
98
  }
99
 
100
  /**
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: mycred,wpexpertsio
3
  Tags: badges, gamification, loyalty, points, rewards
4
  Requires at least: 4.8
5
  Tested up to: 5.9.2
6
- Stable tag: 2.4.4
7
  Requires PHP: 7.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -303,6 +303,9 @@ You can find a list of [frequently asked questions](https://mycred.me/about/faq/
303
 
304
  == Upgrade Notice ==
305
 
 
 
 
306
  = 2.4.4 =
307
  New features and Bug fixes.
308
 
@@ -360,6 +363,10 @@ The banking module have been replaced by Central deposite module, and interest r
360
 
361
  == Changelog ==
362
 
 
 
 
 
363
  = 2.4.4 =
364
  - **NEW** - All registered references will be listed on the support page.
365
  - **NEW** - Added Gutenberg blocks for the following shortcodes mycred_cashcred, mycred_badges_list, mycred_buy_pending, mycred_chart_circulation, mycred_chart_gain_loss, mycred_chart_history, mycred_chart_balance_history, mycred_chart_top_balance, mycred_chart_instance_history and mycred_chart_top_instance.
3
  Tags: badges, gamification, loyalty, points, rewards
4
  Requires at least: 4.8
5
  Tested up to: 5.9.2
6
+ Stable tag: 2.4.4.1
7
  Requires PHP: 7.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
303
 
304
  == Upgrade Notice ==
305
 
306
+ = 2.4.4.1 =
307
+ Improvement and Bug fixes.
308
+
309
  = 2.4.4 =
310
  New features and Bug fixes.
311
 
363
 
364
  == Changelog ==
365
 
366
+ = 2.4.4.1 =
367
+ * **Improvement** - Patched security vulnerability.
368
+ * **Improvement** - Badge UI Fix.
369
+
370
  = 2.4.4 =
371
  - **NEW** - All registered references will be listed on the support page.
372
  - **NEW** - Added Gutenberg blocks for the following shortcodes mycred_cashcred, mycred_badges_list, mycred_buy_pending, mycred_chart_circulation, mycred_chart_gain_loss, mycred_chart_history, mycred_chart_balance_history, mycred_chart_top_balance, mycred_chart_instance_history and mycred_chart_top_instance.