Version Description
Minor bug fixes.
=
Download this release
Release Info
Developer | designbymerovingi |
Plugin | myCRED |
Version | 1.7.8.1 |
Comparing to | |
See all releases |
Code changes from version 1.7.8 to 1.7.8.1
- addons/badges/myCRED-addon-badges.php +28 -3
- assets/js/mycred-edit-log.js +2 -2
- includes/classes/class.query-log.php +5 -5
- includes/mycred-functions.php +11 -5
- mycred.php +2 -2
- readme.txt +8 -19
addons/badges/myCRED-addon-badges.php
CHANGED
@@ -353,7 +353,7 @@ if ( ! class_exists( 'myCRED_Badge_Module' ) ) :
|
|
353 |
/**
|
354 |
* Add Finished
|
355 |
* @since 1.0
|
356 |
-
* @version 1.
|
357 |
*/
|
358 |
public function add_finished( $result, $request, $mycred ) {
|
359 |
|
@@ -369,8 +369,33 @@ if ( ! class_exists( 'myCRED_Badge_Module' ) ) :
|
|
369 |
foreach ( $badge_ids as $badge_id ) {
|
370 |
|
371 |
$level_reached = mycred_badge_level_reached( $user_id, $badge_id );
|
372 |
-
if ( $level_reached !== false )
|
373 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
374 |
|
375 |
}
|
376 |
|
353 |
/**
|
354 |
* Add Finished
|
355 |
* @since 1.0
|
356 |
+
* @version 1.3
|
357 |
*/
|
358 |
public function add_finished( $result, $request, $mycred ) {
|
359 |
|
369 |
foreach ( $badge_ids as $badge_id ) {
|
370 |
|
371 |
$level_reached = mycred_badge_level_reached( $user_id, $badge_id );
|
372 |
+
if ( $level_reached !== false ) {
|
373 |
+
|
374 |
+
$levels = mycred_get_badge_levels( $badge_id );
|
375 |
+
$assigned = mycred_assign_badge_to_user( $user_id, $badge_id, $level_reached );
|
376 |
+
|
377 |
+
// Payout reward
|
378 |
+
if ( $assigned && $levels[ $level_reached ]['reward']['log'] != '' && $levels[ $level_reached ]['reward']['amount'] != 0 ) {
|
379 |
+
|
380 |
+
$reward_type = $levels[ $level_reached ]['reward']['type'];
|
381 |
+
if ( $reward_type != $mycred->cred_id )
|
382 |
+
$mycred = mycred( $reward_type );
|
383 |
+
|
384 |
+
// Make sure we only get points once for each level we reach for each badge
|
385 |
+
if ( ! $mycred->has_entry( 'badge_reward', $badge_id, $user_id, $level_reached, $reward_type ) )
|
386 |
+
$mycred->add_creds(
|
387 |
+
'badge_reward',
|
388 |
+
$user_id,
|
389 |
+
$levels[ $level_reached ]['reward']['amount'],
|
390 |
+
$levels[ $level_reached ]['reward']['log'],
|
391 |
+
$badge_id,
|
392 |
+
$level_reached,
|
393 |
+
$reward_type
|
394 |
+
);
|
395 |
+
|
396 |
+
}
|
397 |
+
|
398 |
+
}
|
399 |
|
400 |
}
|
401 |
|
assets/js/mycred-edit-log.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* These scripts are used to edit or delete entries
|
4 |
* in the myCRED Log.
|
5 |
* @since 1.4
|
6 |
-
* @version 1.2.
|
7 |
*/
|
8 |
jQuery(function($) {
|
9 |
|
@@ -369,7 +369,7 @@ jQuery(function($) {
|
|
369 |
|
370 |
// Checkbox select in table
|
371 |
// @see http://stackoverflow.com/questions/19164816/jquery-select-all-checkboxes-in-table
|
372 |
-
$( '#myCRED-wrap form table .check-column input' ).click(function(e){
|
373 |
var table= $(e.target).closest('table');
|
374 |
$('.check-column input',table).prop( 'checked',this.checked );
|
375 |
});
|
3 |
* These scripts are used to edit or delete entries
|
4 |
* in the myCRED Log.
|
5 |
* @since 1.4
|
6 |
+
* @version 1.2.5
|
7 |
*/
|
8 |
jQuery(function($) {
|
9 |
|
369 |
|
370 |
// Checkbox select in table
|
371 |
// @see http://stackoverflow.com/questions/19164816/jquery-select-all-checkboxes-in-table
|
372 |
+
$( '#myCRED-wrap form table thead .check-column input' ).click(function(e){
|
373 |
var table= $(e.target).closest('table');
|
374 |
$('.check-column input',table).prop( 'checked',this.checked );
|
375 |
});
|
includes/classes/class.query-log.php
CHANGED
@@ -566,12 +566,12 @@ if ( ! class_exists( 'myCRED_Query_Log' ) ) :
|
|
566 |
if ( count( $dates ) == 1 )
|
567 |
$this->args['time'] = array( 'dates' => $dates[0], 'compare' => '=' );
|
568 |
|
569 |
-
// Keyword time query
|
570 |
-
elseif ( count( $dates ) == 2
|
571 |
$this->args['time'] = array( 'dates' => $dates, 'compare' => 'BETWEEN' );
|
572 |
|
573 |
// Multiple time query
|
574 |
-
|
575 |
$this->args['time'] = array( 'dates' => $dates, 'compare' => 'IN' );
|
576 |
|
577 |
}
|
@@ -1491,7 +1491,7 @@ if ( ! class_exists( 'myCRED_Query_Log' ) ) :
|
|
1491 |
* Generated a single entry row depending on the columns used / requested.
|
1492 |
* @filter mycred_log_date
|
1493 |
* @since 0.1
|
1494 |
-
* @version 1.4.
|
1495 |
*/
|
1496 |
public function get_the_entry( $log_entry, $wrap = 'td' ) {
|
1497 |
|
@@ -1592,7 +1592,7 @@ if ( ! class_exists( 'myCRED_Query_Log' ) ) :
|
|
1592 |
}
|
1593 |
|
1594 |
if ( $content !== false )
|
1595 |
-
$entry_data .= '<' . $wrap . ' class="' . ( ( $column_id == 'username' ) ? 'column-primary ' : '' ) . 'column-' . $column_id . $hidden . '"' . $data . '>' . $content . '</' . $wrap . '>';
|
1596 |
|
1597 |
}
|
1598 |
|
566 |
if ( count( $dates ) == 1 )
|
567 |
$this->args['time'] = array( 'dates' => $dates[0], 'compare' => '=' );
|
568 |
|
569 |
+
// Keyword time query or between two dates
|
570 |
+
elseif ( count( $dates ) == 2 || in_array( $this->args['time'], array( 'today', 'yesterday', 'thisweek', 'thismonth' ) ) )
|
571 |
$this->args['time'] = array( 'dates' => $dates, 'compare' => 'BETWEEN' );
|
572 |
|
573 |
// Multiple time query
|
574 |
+
else
|
575 |
$this->args['time'] = array( 'dates' => $dates, 'compare' => 'IN' );
|
576 |
|
577 |
}
|
1491 |
* Generated a single entry row depending on the columns used / requested.
|
1492 |
* @filter mycred_log_date
|
1493 |
* @since 0.1
|
1494 |
+
* @version 1.4.4
|
1495 |
*/
|
1496 |
public function get_the_entry( $log_entry, $wrap = 'td' ) {
|
1497 |
|
1592 |
}
|
1593 |
|
1594 |
if ( $content !== false )
|
1595 |
+
$entry_data .= '<' . $wrap . ' class="' . ( ( $column_id == 'username' ) ? 'column-primary ' : '' ) . 'column-' . $column_id . $hidden . '" data-colname="' . $column_name . '" ' . $data . '>' . $content . '</' . $wrap . '>';
|
1596 |
|
1597 |
}
|
1598 |
|
includes/mycred-functions.php
CHANGED
@@ -1389,20 +1389,26 @@ endif;
|
|
1389 |
/**
|
1390 |
* Get Module
|
1391 |
* @since 1.7.3
|
1392 |
-
* @version 1.0
|
1393 |
*/
|
1394 |
if ( ! function_exists( 'mycred_get_module' ) ) :
|
1395 |
function mycred_get_module( $module = '', $type = 'solo' ) {
|
1396 |
|
1397 |
global $mycred_modules;
|
1398 |
|
1399 |
-
if (
|
1400 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1401 |
|
1402 |
-
if ( ! array_key_exists( $
|
1403 |
return false;
|
1404 |
|
1405 |
-
return $mycred_modules[ $type ][ $module ];
|
1406 |
|
1407 |
}
|
1408 |
endif;
|
1389 |
/**
|
1390 |
* Get Module
|
1391 |
* @since 1.7.3
|
1392 |
+
* @version 1.0.1
|
1393 |
*/
|
1394 |
if ( ! function_exists( 'mycred_get_module' ) ) :
|
1395 |
function mycred_get_module( $module = '', $type = 'solo' ) {
|
1396 |
|
1397 |
global $mycred_modules;
|
1398 |
|
1399 |
+
if ( $type == 'solo' ) {
|
1400 |
+
|
1401 |
+
if ( ! array_key_exists( $module, $mycred_modules['solo'] ) )
|
1402 |
+
return false;
|
1403 |
+
|
1404 |
+
return $mycred_modules['solo'][ $module ];
|
1405 |
+
|
1406 |
+
}
|
1407 |
|
1408 |
+
if ( ! array_key_exists( $type, $mycred_modules['type'] ) )
|
1409 |
return false;
|
1410 |
|
1411 |
+
return $mycred_modules['type'][ $type ][ $module ];
|
1412 |
|
1413 |
}
|
1414 |
endif;
|
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: 1.7.8
|
7 |
* Tags: points, tokens, credit, management, reward, charge, buddypress, bbpress, jetpack, woocommerce, marketpress, wp e-commerce, gravity forms, simplepress
|
8 |
* Author: Gabriel S Merovingi
|
9 |
* Author URI: http://www.merovingi.com
|
@@ -19,7 +19,7 @@ if ( ! class_exists( 'myCRED_Core' ) ) :
|
|
19 |
final class myCRED_Core {
|
20 |
|
21 |
// Plugin Version
|
22 |
-
public $version = '1.7.8';
|
23 |
|
24 |
// Instnace
|
25 |
protected static $_instance = NULL;
|
3 |
* Plugin Name: myCRED
|
4 |
* Plugin URI: https://mycred.me
|
5 |
* Description: An adaptive points management system for WordPress powered websites.
|
6 |
+
* Version: 1.7.8.1
|
7 |
* Tags: points, tokens, credit, management, reward, charge, buddypress, bbpress, jetpack, woocommerce, marketpress, wp e-commerce, gravity forms, simplepress
|
8 |
* Author: Gabriel S Merovingi
|
9 |
* Author URI: http://www.merovingi.com
|
19 |
final class myCRED_Core {
|
20 |
|
21 |
// Plugin Version
|
22 |
+
public $version = '1.7.8.1';
|
23 |
|
24 |
// Instnace
|
25 |
protected static $_instance = NULL;
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: designbymerovingi
|
|
3 |
Tags: point, points, tokens, credit, management, reward, charge, community, contest, buddypress, jetpack, bbpress, simple press, woocommerce, wp e-commerce, contact-form-7
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 4.7.4
|
6 |
-
Stable tag: 1.7.8
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -96,8 +96,8 @@ You can find a list of [frequently asked questions](https://mycred.me/about/faq/
|
|
96 |
|
97 |
== Upgrade Notice ==
|
98 |
|
99 |
-
= 1.7.8 =
|
100 |
-
|
101 |
|
102 |
|
103 |
== Other Notes ==
|
@@ -121,22 +121,11 @@ Important bug fixes.
|
|
121 |
|
122 |
== Changelog ==
|
123 |
|
124 |
-
= 1.7.8 =
|
125 |
-
FIX -
|
126 |
-
FIX -
|
127 |
-
FIX -
|
128 |
-
FIX -
|
129 |
-
FIX - Exporting entries in the admin area fails due to array to string conversion error.
|
130 |
-
FIX - Replaced sanitize_url with esc_url_raw.
|
131 |
-
FIX - Pending buyCRED payments are shown incorrectly due to the cache not getting cleared. This causes trashed pending payments to still appear in shortcodes.
|
132 |
-
FIX - Front end column customisations for the mycred_history shortcode is not working.
|
133 |
-
FIX - Log entry import is not saving the log entry due to misspelled variable name.
|
134 |
-
NEW - Added new mycred_post_type_for_sale filter.
|
135 |
-
FIX - When setting all pages to sale by default using the Sell Content add-on, we need to make sure this excludes BuddyPress pages.
|
136 |
-
NEW - Added warning when the shortcode mycred_sell_this is used incorrectly.
|
137 |
-
TWEAK - Whenever the plugin is re-enabled, built in caches should be cleared.
|
138 |
-
TWEAK - Updated the mycred_link shortcode to stop using the admin-ajax.php file for calls.
|
139 |
-
UPDATE - Updated Sell Content script version.
|
140 |
|
141 |
|
142 |
= Previous Versions =
|
3 |
Tags: point, points, tokens, credit, management, reward, charge, community, contest, buddypress, jetpack, bbpress, simple press, woocommerce, wp e-commerce, contact-form-7
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 4.7.4
|
6 |
+
Stable tag: 1.7.8.1
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
96 |
|
97 |
== Upgrade Notice ==
|
98 |
|
99 |
+
= 1.7.8.1 =
|
100 |
+
Minor bug fixes.
|
101 |
|
102 |
|
103 |
== Other Notes ==
|
121 |
|
122 |
== Changelog ==
|
123 |
|
124 |
+
= 1.7.8.1 =
|
125 |
+
FIX - Selecting a log entry causes all entries to be selected.
|
126 |
+
FIX - mycred_get_module() function are returning incorrect details.
|
127 |
+
FIX - Badge rewards not getting paid out when a badge is automatically assigned.
|
128 |
+
FIX - The mycred_history shortcode can not render two dates correctly when using the time attribute.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
|
130 |
|
131 |
= Previous Versions =
|