Version Description
- Fixed Bug #6 - Transfer add-on returns "low balance" for everyone.
- Fixed Bug #7 - Removed stray function in Sell Content Add-on causing error notices.
- Fixed Bug #8 - Sell Content add-on not parsing post template tags.
Download this release
Release Info
Developer | designbymerovingi |
Plugin | myCRED |
Version | 1.0.4 |
Comparing to | |
See all releases |
Code changes from version 1.0.3 to 1.0.4
addons/buy-creds/myCRED-addon-buy-creds.php
CHANGED
@@ -538,16 +538,6 @@ if ( !class_exists( 'myCRED_Buy_CREDs' ) ) {
|
|
538 |
$buy_self = true;
|
539 |
}
|
540 |
|
541 |
-
$user = get_userdata( (int) $user_id );
|
542 |
-
$username = $user->user_login;
|
543 |
-
$title = $this->core->template_tags_user( $title, $user );
|
544 |
-
unset( $user );
|
545 |
-
|
546 |
-
// Adjust title
|
547 |
-
if ( $buy_self === true ) {
|
548 |
-
$title = str_replace( '%display_name%', __( 'Yourself', 'mycred' ), $title );
|
549 |
-
}
|
550 |
-
|
551 |
// Button
|
552 |
if ( !empty( $gateway ) ) {
|
553 |
$gateway_title = $installed[$gateway]['title'];
|
538 |
$buy_self = true;
|
539 |
}
|
540 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
541 |
// Button
|
542 |
if ( !empty( $gateway ) ) {
|
543 |
$gateway_title = $installed[$gateway]['title'];
|
addons/sell-content/myCRED-addon-sell-content.php
CHANGED
@@ -99,7 +99,7 @@ if ( !class_exists( 'myCRED_Sell_Content' ) ) {
|
|
99 |
// Charge
|
100 |
$log = $sell_content['logs']['buy'];
|
101 |
$data = array(
|
102 |
-
'
|
103 |
'purchase_id' => 'TXID' . date_i18n( 'U' ),
|
104 |
'seller' => $author
|
105 |
);
|
@@ -118,7 +118,7 @@ if ( !class_exists( 'myCRED_Sell_Content' ) ) {
|
|
118 |
}
|
119 |
$log = $sell_content['logs']['sell'];
|
120 |
$data = array(
|
121 |
-
'
|
122 |
'purchase_id' => 'TXID' . date_i18n( 'U' ),
|
123 |
'buyer' => $user_id
|
124 |
);
|
99 |
// Charge
|
100 |
$log = $sell_content['logs']['buy'];
|
101 |
$data = array(
|
102 |
+
'ref_type' => 'post',
|
103 |
'purchase_id' => 'TXID' . date_i18n( 'U' ),
|
104 |
'seller' => $author
|
105 |
);
|
118 |
}
|
119 |
$log = $sell_content['logs']['sell'];
|
120 |
$data = array(
|
121 |
+
'ref_type' => 'post',
|
122 |
'purchase_id' => 'TXID' . date_i18n( 'U' ),
|
123 |
'buyer' => $user_id
|
124 |
);
|
addons/transfer/myCRED-addon-transfer.php
CHANGED
@@ -642,7 +642,7 @@ if ( !function_exists( 'mycred_transfer_render' ) ) {
|
|
642 |
$my_balance = $mycred->get_users_cred( $charge_from );
|
643 |
|
644 |
// Error. Not enough creds
|
645 |
-
if ( $status
|
646 |
if ( isset( $pref['errors']['low'] ) && !empty( $pref['errors']['low'] ) ) {
|
647 |
$no_cred = str_replace( '%limit%', $pref['limit']['limit'], $pref['errors']['low'] );
|
648 |
$no_cred = str_replace( '%Limit%', ucwords( $pref['limit']['limit'] ), $no_cred );
|
@@ -653,7 +653,7 @@ if ( !function_exists( 'mycred_transfer_render' ) ) {
|
|
653 |
}
|
654 |
|
655 |
// Error. Over limit
|
656 |
-
if ( $status
|
657 |
if ( isset( $pref['errors']['over'] ) && !empty( $pref['errors']['over'] ) ) {
|
658 |
$no_cred = str_replace( '%limit%', $pref['limit']['limit'], $pref['errors']['over'] );
|
659 |
$no_cred = str_replace( '%Limit%', ucwords( $pref['limit']['limit'] ), $no_cred );
|
642 |
$my_balance = $mycred->get_users_cred( $charge_from );
|
643 |
|
644 |
// Error. Not enough creds
|
645 |
+
if ( $status === 'low' ) {
|
646 |
if ( isset( $pref['errors']['low'] ) && !empty( $pref['errors']['low'] ) ) {
|
647 |
$no_cred = str_replace( '%limit%', $pref['limit']['limit'], $pref['errors']['low'] );
|
648 |
$no_cred = str_replace( '%Limit%', ucwords( $pref['limit']['limit'] ), $no_cred );
|
653 |
}
|
654 |
|
655 |
// Error. Over limit
|
656 |
+
if ( $status === 'limit' ) {
|
657 |
if ( isset( $pref['errors']['over'] ) && !empty( $pref['errors']['over'] ) ) {
|
658 |
$no_cred = str_replace( '%limit%', $pref['limit']['limit'], $pref['errors']['over'] );
|
659 |
$no_cred = str_replace( '%Limit%', ucwords( $pref['limit']['limit'] ), $no_cred );
|
includes/mycred-functions.php
CHANGED
@@ -214,8 +214,12 @@ if ( !class_exists( 'myCRED_Settings' ) ) {
|
|
214 |
$content = apply_filters( "mycred_parse_log_entry_{$reference}", $content, $log_entry );
|
215 |
|
216 |
// Get the reference type
|
217 |
-
if ( isset( $data['ref_type'] ) ) {
|
218 |
-
|
|
|
|
|
|
|
|
|
219 |
if ( $type == 'post' )
|
220 |
$content = $this->template_tags_post( $content, $ref_id, $data );
|
221 |
elseif ( $type == 'user' )
|
214 |
$content = apply_filters( "mycred_parse_log_entry_{$reference}", $content, $log_entry );
|
215 |
|
216 |
// Get the reference type
|
217 |
+
if ( isset( $data['ref_type'] ) || isset( $data['post_type'] ) ) {
|
218 |
+
if ( isset( $data['ref_type'] ) )
|
219 |
+
$type = $data['ref_type'];
|
220 |
+
elseif ( isset( $data['post_type'] ) )
|
221 |
+
$type = $data['post_type'];
|
222 |
+
|
223 |
if ( $type == 'post' )
|
224 |
$content = $this->template_tags_post( $content, $ref_id, $data );
|
225 |
elseif ( $type == 'user' )
|
mycred.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: myCRED
|
4 |
Plugin URI: http://mycred.merovingi.com
|
5 |
Description: <strong>my</strong>CRED is an adaptive points management system for WordPress powered websites, giving you full control on how points are gained, used, traded, managed, logged or presented.
|
6 |
-
Version: 1.0.
|
7 |
Tags: points, tokens, credit, management, reward, charge
|
8 |
Author: Gabriel S Merovingi
|
9 |
Author URI: http://www.merovingi.com
|
@@ -13,7 +13,7 @@ Tested up to: WP 3.5.1
|
|
13 |
License: GPLv2 or later
|
14 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
15 |
*/
|
16 |
-
define( 'myCRED_VERSION', '1.0.
|
17 |
define( 'myCRED_SLUG', 'mycred' );
|
18 |
|
19 |
define( 'myCRED_THIS', __FILE__ );
|
3 |
Plugin Name: myCRED
|
4 |
Plugin URI: http://mycred.merovingi.com
|
5 |
Description: <strong>my</strong>CRED is an adaptive points management system for WordPress powered websites, giving you full control on how points are gained, used, traded, managed, logged or presented.
|
6 |
+
Version: 1.0.4
|
7 |
Tags: points, tokens, credit, management, reward, charge
|
8 |
Author: Gabriel S Merovingi
|
9 |
Author URI: http://www.merovingi.com
|
13 |
License: GPLv2 or later
|
14 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
15 |
*/
|
16 |
+
define( 'myCRED_VERSION', '1.0.4' );
|
17 |
define( 'myCRED_SLUG', 'mycred' );
|
18 |
|
19 |
define( 'myCRED_THIS', __FILE__ );
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate Link: http://mycred.merovingi.com/donate/
|
|
4 |
Tags:points, tokens, credit, management, reward, charge, community
|
5 |
Requires at least: 3.1
|
6 |
Tested up to: 3.5.1
|
7 |
-
Stable tag: 1.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -34,12 +34,12 @@ myCRED is an adaptive points management system for WordPress powered websites, g
|
|
34 |
|
35 |
Add-ons are custom features that can be enabled individually.
|
36 |
|
37 |
-
* Transfer - Allows your users to send points to other members with an option to impose a daily-, weekly- or monthly transfer limit.
|
38 |
-
* Import - Import points from a CSV-file, Cubepoints or points stored under any custom user meta key.
|
39 |
-
* Sell Content - Sell access to entire contents or parts of it with the option to share a percentage of the sale with the content author.
|
40 |
-
* Buy Creds - Let your users buy points via PayPal, Skrill or NETbilling.
|
41 |
-
* Gateway - Allow your users to pay for items in their WooCommerce shopping cart using their point balance.
|
42 |
-
* BuddyPress - Extend myCRED to support BuddyPress, bbPress, BuddyPress Gifts, BuddyPress Links, BP Album+ and BP Gallery.
|
43 |
|
44 |
**Multisites**
|
45 |
|
@@ -108,6 +108,11 @@ You can always disable parts of a hook by awarding zero points. Hooks that have
|
|
108 |
|
109 |
== Changelog ==
|
110 |
|
|
|
|
|
|
|
|
|
|
|
111 |
= 1.0.3 =
|
112 |
* Fixed Bug #5 - Missing general template tag parser in Sell Content form.
|
113 |
|
4 |
Tags:points, tokens, credit, management, reward, charge, community
|
5 |
Requires at least: 3.1
|
6 |
Tested up to: 3.5.1
|
7 |
+
Stable tag: 1.0.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
34 |
|
35 |
Add-ons are custom features that can be enabled individually.
|
36 |
|
37 |
+
* *Transfer* - Allows your users to send points to other members with an option to impose a daily-, weekly- or monthly transfer limit.
|
38 |
+
* *Import* - Import points from a CSV-file, Cubepoints or points stored under any custom user meta key.
|
39 |
+
* *Sell Content* - Sell access to entire contents or parts of it with the option to share a percentage of the sale with the content author.
|
40 |
+
* *Buy Creds* - Let your users buy points via PayPal, Skrill or NETbilling.
|
41 |
+
* *Gateway* - Allow your users to pay for items in their WooCommerce shopping cart using their point balance.
|
42 |
+
* *BuddyPress* - Extend myCRED to support [BuddyPress](http://wordpress.org/extend/plugins/buddypress/), [bbPress](http://wordpress.org/extend/plugins/bbpress/), [BuddyPress Gifts](http://wordpress.org/extend/plugins/buddypress-gifts/), [BuddyPress Links](http://wordpress.org/extend/plugins/buddypress-links/), [BP Album+](http://wordpress.org/extend/plugins/bp-gallery/) and [BP Gallery](http://buddydev.com/plugins/bp-gallery/).
|
43 |
|
44 |
**Multisites**
|
45 |
|
108 |
|
109 |
== Changelog ==
|
110 |
|
111 |
+
= 1.0.4 =
|
112 |
+
* Fixed Bug #6 - Transfer add-on returns "low balance" for everyone.
|
113 |
+
* Fixed Bug #7 - Removed stray function in Sell Content Add-on causing error notices.
|
114 |
+
* Fixed Bug #8 - Sell Content add-on not parsing post template tags.
|
115 |
+
|
116 |
= 1.0.3 =
|
117 |
* Fixed Bug #5 - Missing general template tag parser in Sell Content form.
|
118 |
|