Version Description
Critical bug fixes.
=
Download this release
Release Info
Developer | designbymerovingi |
Plugin | myCRED |
Version | 1.6.6 |
Comparing to | |
See all releases |
Code changes from version 1.6.5 to 1.6.6
- addons/ranks/myCRED-addon-ranks.php +5 -4
- addons/transfer/myCRED-addon-transfer.php +2 -4
- assets/css/admin.css +5 -1
- includes/mycred-functions.php +13 -9
- includes/mycred-network.php +90 -64
- includes/mycred-shortcodes.php +104 -0
- mycred.php +4 -3
- readme.txt +31 -160
addons/ranks/myCRED-addon-ranks.php
CHANGED
@@ -499,7 +499,7 @@ if ( ! class_exists( 'myCRED_Ranks_Module' ) ) :
|
|
499 |
/**
|
500 |
* AJAX: Calculate Totals
|
501 |
* @since 1.2
|
502 |
-
* @version 1.3
|
503 |
*/
|
504 |
public function calculate_totals() {
|
505 |
|
@@ -511,6 +511,7 @@ if ( ! class_exists( 'myCRED_Ranks_Module' ) ) :
|
|
511 |
$type = sanitize_text_field( $_POST['ctype'] );
|
512 |
|
513 |
$balance_key = $type;
|
|
|
514 |
|
515 |
if ( $mycred->is_multisite && $GLOBALS['blog_id'] > 1 && ! $mycred->use_central_logging )
|
516 |
$balance_key .= '_' . $GLOBALS['blog_id'];
|
@@ -1286,9 +1287,9 @@ if ( ! class_exists( 'myCRED_Ranks_Module' ) ) :
|
|
1286 |
* @since 1.1
|
1287 |
* @version 1.3
|
1288 |
*/
|
1289 |
-
public function after_general_settings() {
|
1290 |
|
1291 |
-
$prefs
|
1292 |
$this->add_to_core = true;
|
1293 |
if ( $mycred->mycred_type != 'mycred_default' ) {
|
1294 |
|
@@ -1301,7 +1302,7 @@ if ( ! class_exists( 'myCRED_Ranks_Module' ) ) :
|
|
1301 |
|
1302 |
}
|
1303 |
|
1304 |
-
if ( $
|
1305 |
$box = 'display: none;';
|
1306 |
else
|
1307 |
$box = 'display: block;';
|
499 |
/**
|
500 |
* AJAX: Calculate Totals
|
501 |
* @since 1.2
|
502 |
+
* @version 1.3.1
|
503 |
*/
|
504 |
public function calculate_totals() {
|
505 |
|
511 |
$type = sanitize_text_field( $_POST['ctype'] );
|
512 |
|
513 |
$balance_key = $type;
|
514 |
+
$mycred = mycred( $type );
|
515 |
|
516 |
if ( $mycred->is_multisite && $GLOBALS['blog_id'] > 1 && ! $mycred->use_central_logging )
|
517 |
$balance_key .= '_' . $GLOBALS['blog_id'];
|
1287 |
* @since 1.1
|
1288 |
* @version 1.3
|
1289 |
*/
|
1290 |
+
public function after_general_settings( $mycred ) {
|
1291 |
|
1292 |
+
$prefs = $this->rank;
|
1293 |
$this->add_to_core = true;
|
1294 |
if ( $mycred->mycred_type != 'mycred_default' ) {
|
1295 |
|
1302 |
|
1303 |
}
|
1304 |
|
1305 |
+
if ( $prefs['base'] == 'current' )
|
1306 |
$box = 'display: none;';
|
1307 |
else
|
1308 |
$box = 'display: block;';
|
addons/transfer/myCRED-addon-transfer.php
CHANGED
@@ -325,13 +325,11 @@ if ( ! class_exists( 'myCRED_Transfer_Module' ) ) :
|
|
325 |
/**
|
326 |
* Sanitize & Save Settings
|
327 |
* @since 0.1
|
328 |
-
* @version 1.2
|
329 |
*/
|
330 |
public function sanitize_extra_settings( $new_data, $data, $general ) {
|
331 |
|
332 |
-
|
333 |
-
|
334 |
-
$allowed = $mycred->allowed_html_tags();
|
335 |
|
336 |
$new_data['transfers']['types'] = $data['transfers']['types'];
|
337 |
$new_data['transfers']['logs']['sending'] = wp_kses( $data['transfers']['logs']['sending'], $allowed );
|
325 |
/**
|
326 |
* Sanitize & Save Settings
|
327 |
* @since 0.1
|
328 |
+
* @version 1.2.1
|
329 |
*/
|
330 |
public function sanitize_extra_settings( $new_data, $data, $general ) {
|
331 |
|
332 |
+
$allowed = $this->core->allowed_html_tags();
|
|
|
|
|
333 |
|
334 |
$new_data['transfers']['types'] = $data['transfers']['types'];
|
335 |
$new_data['transfers']['logs']['sending'] = wp_kses( $data['transfers']['logs']['sending'], $allowed );
|
assets/css/admin.css
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
* myCRED Admin Styling
|
3 |
* @since 0.1
|
4 |
-
* @version 1.3.
|
5 |
*/
|
6 |
#myCRED-wrap table .column-username { width: 190px; }
|
7 |
#myCRED-wrap table .column-creds { width: 80px; }
|
@@ -12,6 +12,10 @@
|
|
12 |
#myCRED-wrap table tr.deleted-row td { background-color: red !important; color: white !important; }
|
13 |
#myCRED-wrap table tr.updated-row td { background-color: yellow; }
|
14 |
|
|
|
|
|
|
|
|
|
15 |
/* Text Alignments */
|
16 |
.tl { text-align: left; }
|
17 |
.tc { text-align: center; }
|
1 |
/**
|
2 |
* myCRED Admin Styling
|
3 |
* @since 0.1
|
4 |
+
* @version 1.3.2
|
5 |
*/
|
6 |
#myCRED-wrap table .column-username { width: 190px; }
|
7 |
#myCRED-wrap table .column-creds { width: 80px; }
|
12 |
#myCRED-wrap table tr.deleted-row td { background-color: red !important; color: white !important; }
|
13 |
#myCRED-wrap table tr.updated-row td { background-color: yellow; }
|
14 |
|
15 |
+
#myCRED-wrap input[type=radio] { margin-top: 0; }
|
16 |
+
#myCRED-wrap input.large-text, #myCRED-wrap textarea.large-text { display: block; width: 80%; }
|
17 |
+
#myCRED-wrap textarea.large-text { margin-bottom: 6px; }
|
18 |
+
|
19 |
/* Text Alignments */
|
20 |
.tl { text-align: left; }
|
21 |
.tc { text-align: center; }
|
includes/mycred-functions.php
CHANGED
@@ -912,7 +912,7 @@ if ( ! class_exists( 'myCRED_Settings' ) ) :
|
|
912 |
* @param $amount (int|float), amount to add/deduct from users balance. This value must be pre-formated.
|
913 |
* @returns the new balance.
|
914 |
* @since 0.1
|
915 |
-
* @version 1.4
|
916 |
*/
|
917 |
public function update_users_balance( $user_id = NULL, $amount = NULL, $type = 'mycred_default' ) {
|
918 |
|
@@ -938,6 +938,9 @@ if ( ! class_exists( 'myCRED_Settings' ) ) :
|
|
938 |
$total = mycred_query_users_total( $user_id, $type );
|
939 |
mycred_update_user_meta( $user_id, $type, '_total', $total );
|
940 |
|
|
|
|
|
|
|
941 |
// Let others play
|
942 |
do_action( 'mycred_update_user_balance', $user_id, $current_balance, $amount, $type );
|
943 |
|
@@ -2083,21 +2086,21 @@ endif;
|
|
2083 |
/**
|
2084 |
* Check if site is blocked
|
2085 |
* @since 1.5.4
|
2086 |
-
* @version 1.0
|
2087 |
*/
|
2088 |
if ( ! function_exists( 'mycred_is_site_blocked' ) ) :
|
2089 |
function mycred_is_site_blocked( $blog_id = NULL )
|
2090 |
{
|
2091 |
// Only applicable for multisites
|
2092 |
-
if ( ! is_multisite()
|
2093 |
-
|
2094 |
-
$reply = false;
|
2095 |
|
|
|
2096 |
if ( $blog_id === NULL )
|
2097 |
-
$blog_id =
|
2098 |
|
2099 |
// Get Network settings
|
2100 |
$network = mycred_get_settings_network();
|
|
|
2101 |
|
2102 |
// Only applicable if the block is set and this is not the main blog
|
2103 |
if ( ! empty( $network['block'] ) && $blog_id > 1 ) {
|
@@ -2106,15 +2109,16 @@ if ( ! function_exists( 'mycred_is_site_blocked' ) ) :
|
|
2106 |
$list = explode( ',', $network['block'] );
|
2107 |
$clean = array();
|
2108 |
foreach ( $list as $blog_id ) {
|
2109 |
-
$clean[] =
|
2110 |
}
|
2111 |
|
2112 |
// Check if blog is blocked from using myCRED.
|
2113 |
-
if ( in_array( $blog_id, $clean ) )
|
|
|
2114 |
|
2115 |
}
|
2116 |
|
2117 |
-
return apply_filters( 'mycred_is_site_blocked', $
|
2118 |
|
2119 |
}
|
2120 |
endif;
|
912 |
* @param $amount (int|float), amount to add/deduct from users balance. This value must be pre-formated.
|
913 |
* @returns the new balance.
|
914 |
* @since 0.1
|
915 |
+
* @version 1.4.1
|
916 |
*/
|
917 |
public function update_users_balance( $user_id = NULL, $amount = NULL, $type = 'mycred_default' ) {
|
918 |
|
938 |
$total = mycred_query_users_total( $user_id, $type );
|
939 |
mycred_update_user_meta( $user_id, $type, '_total', $total );
|
940 |
|
941 |
+
// Clear caches
|
942 |
+
mycred_delete_option( 'mycred-cache-total-' . $type );
|
943 |
+
|
944 |
// Let others play
|
945 |
do_action( 'mycred_update_user_balance', $user_id, $current_balance, $amount, $type );
|
946 |
|
2086 |
/**
|
2087 |
* Check if site is blocked
|
2088 |
* @since 1.5.4
|
2089 |
+
* @version 1.0.1
|
2090 |
*/
|
2091 |
if ( ! function_exists( 'mycred_is_site_blocked' ) ) :
|
2092 |
function mycred_is_site_blocked( $blog_id = NULL )
|
2093 |
{
|
2094 |
// Only applicable for multisites
|
2095 |
+
if ( ! is_multisite() ) return false;
|
|
|
|
|
2096 |
|
2097 |
+
// Blog ID
|
2098 |
if ( $blog_id === NULL )
|
2099 |
+
$blog_id = get_current_blog_id();
|
2100 |
|
2101 |
// Get Network settings
|
2102 |
$network = mycred_get_settings_network();
|
2103 |
+
$blocked = false;
|
2104 |
|
2105 |
// Only applicable if the block is set and this is not the main blog
|
2106 |
if ( ! empty( $network['block'] ) && $blog_id > 1 ) {
|
2109 |
$list = explode( ',', $network['block'] );
|
2110 |
$clean = array();
|
2111 |
foreach ( $list as $blog_id ) {
|
2112 |
+
$clean[] = absint( $blog_id );
|
2113 |
}
|
2114 |
|
2115 |
// Check if blog is blocked from using myCRED.
|
2116 |
+
if ( in_array( $blog_id, $clean ) )
|
2117 |
+
$blocked = true;
|
2118 |
|
2119 |
}
|
2120 |
|
2121 |
+
return apply_filters( 'mycred_is_site_blocked', $blocked, $blog_id );
|
2122 |
|
2123 |
}
|
2124 |
endif;
|
includes/mycred-network.php
CHANGED
@@ -4,9 +4,9 @@ if ( ! defined( 'myCRED_VERSION' ) ) exit;
|
|
4 |
/**
|
5 |
* myCRED_Network class
|
6 |
* @since 0.1
|
7 |
-
* @version 1.2
|
8 |
*/
|
9 |
-
if ( ! class_exists( 'myCRED_Network_Module' ) )
|
10 |
class myCRED_Network_Module {
|
11 |
|
12 |
public $core;
|
@@ -16,8 +16,10 @@ if ( ! class_exists( 'myCRED_Network_Module' ) ) {
|
|
16 |
* Construct
|
17 |
*/
|
18 |
function __construct() {
|
|
|
19 |
global $mycred_network;
|
20 |
$this->core = mycred();
|
|
|
21 |
}
|
22 |
|
23 |
/**
|
@@ -26,9 +28,11 @@ if ( ! class_exists( 'myCRED_Network_Module' ) ) {
|
|
26 |
* @version 1.1
|
27 |
*/
|
28 |
public function load() {
|
|
|
29 |
add_action( 'admin_init', array( $this, 'module_admin_init' ) );
|
30 |
add_action( 'admin_head', array( $this, 'admin_menu_styling' ) );
|
31 |
add_action( 'network_admin_menu', array( $this, 'add_menu' ) );
|
|
|
32 |
}
|
33 |
|
34 |
/**
|
@@ -37,7 +41,9 @@ if ( ! class_exists( 'myCRED_Network_Module' ) ) {
|
|
37 |
* @version 1.0
|
38 |
*/
|
39 |
public function module_admin_init() {
|
|
|
40 |
register_setting( 'mycred_network', 'mycred_network', array( $this, 'save_network_prefs' ) );
|
|
|
41 |
}
|
42 |
|
43 |
/**
|
@@ -46,6 +52,7 @@ if ( ! class_exists( 'myCRED_Network_Module' ) ) {
|
|
46 |
* @version 1.2
|
47 |
*/
|
48 |
public function add_menu() {
|
|
|
49 |
$pages[] = add_menu_page(
|
50 |
__( 'myCRED', 'mycred' ),
|
51 |
__( 'myCRED', 'mycred' ),
|
@@ -65,6 +72,7 @@ if ( ! class_exists( 'myCRED_Network_Module' ) ) {
|
|
65 |
|
66 |
foreach ( $pages as $page )
|
67 |
add_action( 'admin_print_styles-' . $page, array( $this, 'admin_menu_styling' ) );
|
|
|
68 |
}
|
69 |
|
70 |
/**
|
@@ -73,17 +81,20 @@ if ( ! class_exists( 'myCRED_Network_Module' ) ) {
|
|
73 |
* @version 1.0
|
74 |
*/
|
75 |
public function admin_menu_styling() {
|
|
|
76 |
global $wp_version;
|
77 |
|
78 |
wp_enqueue_style( 'mycred-admin' );
|
79 |
-
$image = plugins_url( 'assets/images/logo-menu.png', myCRED_THIS );
|
80 |
|
|
|
81 |
<style type="text/css">
|
82 |
h4:before { float:right; padding-right: 12px; font-size: 14px; font-weight: normal; color: silver; }
|
83 |
h4.ui-accordion-header.ui-state-active:before { content: "<?php _e( 'click to close', 'mycred' ); ?>"; }
|
84 |
h4.ui-accordion-header:before { content: "<?php _e( 'click to open', 'mycred' ); ?>"; }
|
85 |
</style>
|
86 |
<?php
|
|
|
87 |
}
|
88 |
|
89 |
/**
|
@@ -92,6 +103,7 @@ h4.ui-accordion-header:before { content: "<?php _e( 'click to open', 'mycred' );
|
|
92 |
* @version 1.0
|
93 |
*/
|
94 |
public function admin_print_styles() {
|
|
|
95 |
if ( ! wp_style_is( 'mycred-admin', 'registered' ) ) {
|
96 |
wp_register_style(
|
97 |
'mycred-admin',
|
@@ -101,6 +113,7 @@ h4.ui-accordion-header:before { content: "<?php _e( 'click to open', 'mycred' );
|
|
101 |
'all'
|
102 |
);
|
103 |
}
|
|
|
104 |
wp_enqueue_style( 'mycred-admin' );
|
105 |
|
106 |
if ( ! wp_script_is( 'mycred-admin', 'registered' ) ) {
|
@@ -112,7 +125,9 @@ h4.ui-accordion-header:before { content: "<?php _e( 'click to open', 'mycred' );
|
|
112 |
);
|
113 |
wp_localize_script( 'mycred-admin', 'myCRED', apply_filters( 'mycred_localize_admin', array( 'active' => '-1' ) ) );
|
114 |
}
|
|
|
115 |
wp_enqueue_script( 'mycred-admin' );
|
|
|
116 |
}
|
117 |
|
118 |
/**
|
@@ -121,18 +136,20 @@ h4.ui-accordion-header:before { content: "<?php _e( 'click to open', 'mycred' );
|
|
121 |
* @version 1.1
|
122 |
*/
|
123 |
public function admin_page_settings() {
|
|
|
124 |
// Security
|
125 |
if ( ! current_user_can( 'manage_network_options' ) ) wp_die( __( 'Access Denied', 'mycred' ) );
|
126 |
|
127 |
global $mycred_network;
|
128 |
|
129 |
$prefs = mycred_get_settings_network();
|
130 |
-
$name
|
131 |
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
|
|
136 |
|
137 |
// Inform user that myCRED has not yet been setup
|
138 |
$setup = get_blog_option( 1, 'mycred_setup_completed', false );
|
@@ -141,62 +158,70 @@ h4.ui-accordion-header:before { content: "<?php _e( 'click to open', 'mycred' );
|
|
141 |
|
142 |
// Settings Updated
|
143 |
if ( isset( $_GET['settings-updated'] ) )
|
144 |
-
echo '<div class="updated"><p>' . __( 'Network Settings Updated', 'mycred' ) . '</p></div>';
|
145 |
-
|
146 |
-
|
147 |
-
<
|
148 |
-
<?php
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
<div class="
|
153 |
-
<
|
154 |
-
<
|
155 |
-
<
|
156 |
-
|
157 |
-
<
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
<
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
<
|
170 |
-
|
171 |
-
<
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
<
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
<
|
184 |
-
|
185 |
-
<
|
186 |
-
|
187 |
-
|
188 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
189 |
|
190 |
</div>
|
191 |
-
<?php do_action( 'mycred_after_network_prefs', $this ); ?>
|
192 |
|
193 |
-
|
194 |
-
|
195 |
-
</form>
|
196 |
-
|
|
|
197 |
|
198 |
</div>
|
199 |
<?php
|
|
|
200 |
}
|
201 |
|
202 |
/**
|
@@ -206,15 +231,16 @@ h4.ui-accordion-header:before { content: "<?php _e( 'click to open', 'mycred' );
|
|
206 |
*/
|
207 |
public function save_network_prefs( $settings ) {
|
208 |
|
209 |
-
$new_settings
|
210 |
-
$new_settings['master']
|
211 |
$new_settings['central'] = ( isset( $settings['central'] ) ) ? $settings['central'] : 0;
|
212 |
-
$new_settings['block']
|
213 |
|
214 |
-
|
215 |
|
216 |
-
return $new_settings;
|
217 |
}
|
|
|
218 |
}
|
219 |
-
|
|
|
220 |
?>
|
4 |
/**
|
5 |
* myCRED_Network class
|
6 |
* @since 0.1
|
7 |
+
* @version 1.2.1
|
8 |
*/
|
9 |
+
if ( ! class_exists( 'myCRED_Network_Module' ) ) :
|
10 |
class myCRED_Network_Module {
|
11 |
|
12 |
public $core;
|
16 |
* Construct
|
17 |
*/
|
18 |
function __construct() {
|
19 |
+
|
20 |
global $mycred_network;
|
21 |
$this->core = mycred();
|
22 |
+
|
23 |
}
|
24 |
|
25 |
/**
|
28 |
* @version 1.1
|
29 |
*/
|
30 |
public function load() {
|
31 |
+
|
32 |
add_action( 'admin_init', array( $this, 'module_admin_init' ) );
|
33 |
add_action( 'admin_head', array( $this, 'admin_menu_styling' ) );
|
34 |
add_action( 'network_admin_menu', array( $this, 'add_menu' ) );
|
35 |
+
|
36 |
}
|
37 |
|
38 |
/**
|
41 |
* @version 1.0
|
42 |
*/
|
43 |
public function module_admin_init() {
|
44 |
+
|
45 |
register_setting( 'mycred_network', 'mycred_network', array( $this, 'save_network_prefs' ) );
|
46 |
+
|
47 |
}
|
48 |
|
49 |
/**
|
52 |
* @version 1.2
|
53 |
*/
|
54 |
public function add_menu() {
|
55 |
+
|
56 |
$pages[] = add_menu_page(
|
57 |
__( 'myCRED', 'mycred' ),
|
58 |
__( 'myCRED', 'mycred' ),
|
72 |
|
73 |
foreach ( $pages as $page )
|
74 |
add_action( 'admin_print_styles-' . $page, array( $this, 'admin_menu_styling' ) );
|
75 |
+
|
76 |
}
|
77 |
|
78 |
/**
|
81 |
* @version 1.0
|
82 |
*/
|
83 |
public function admin_menu_styling() {
|
84 |
+
|
85 |
global $wp_version;
|
86 |
|
87 |
wp_enqueue_style( 'mycred-admin' );
|
88 |
+
$image = plugins_url( 'assets/images/logo-menu.png', myCRED_THIS );
|
89 |
|
90 |
+
?>
|
91 |
<style type="text/css">
|
92 |
h4:before { float:right; padding-right: 12px; font-size: 14px; font-weight: normal; color: silver; }
|
93 |
h4.ui-accordion-header.ui-state-active:before { content: "<?php _e( 'click to close', 'mycred' ); ?>"; }
|
94 |
h4.ui-accordion-header:before { content: "<?php _e( 'click to open', 'mycred' ); ?>"; }
|
95 |
</style>
|
96 |
<?php
|
97 |
+
|
98 |
}
|
99 |
|
100 |
/**
|
103 |
* @version 1.0
|
104 |
*/
|
105 |
public function admin_print_styles() {
|
106 |
+
|
107 |
if ( ! wp_style_is( 'mycred-admin', 'registered' ) ) {
|
108 |
wp_register_style(
|
109 |
'mycred-admin',
|
113 |
'all'
|
114 |
);
|
115 |
}
|
116 |
+
|
117 |
wp_enqueue_style( 'mycred-admin' );
|
118 |
|
119 |
if ( ! wp_script_is( 'mycred-admin', 'registered' ) ) {
|
125 |
);
|
126 |
wp_localize_script( 'mycred-admin', 'myCRED', apply_filters( 'mycred_localize_admin', array( 'active' => '-1' ) ) );
|
127 |
}
|
128 |
+
|
129 |
wp_enqueue_script( 'mycred-admin' );
|
130 |
+
|
131 |
}
|
132 |
|
133 |
/**
|
136 |
* @version 1.1
|
137 |
*/
|
138 |
public function admin_page_settings() {
|
139 |
+
|
140 |
// Security
|
141 |
if ( ! current_user_can( 'manage_network_options' ) ) wp_die( __( 'Access Denied', 'mycred' ) );
|
142 |
|
143 |
global $mycred_network;
|
144 |
|
145 |
$prefs = mycred_get_settings_network();
|
146 |
+
$name = mycred_label();
|
147 |
|
148 |
+
?>
|
149 |
+
<div class="wrap" id="myCRED-wrap">
|
150 |
+
<div id="icon-myCRED" class="icon32"><br /></div>
|
151 |
+
<h2> <?php echo sprintf( __( '%s Network', 'mycred' ), $name ); ?></h2>
|
152 |
+
<?php
|
153 |
|
154 |
// Inform user that myCRED has not yet been setup
|
155 |
$setup = get_blog_option( 1, 'mycred_setup_completed', false );
|
158 |
|
159 |
// Settings Updated
|
160 |
if ( isset( $_GET['settings-updated'] ) )
|
161 |
+
echo '<div class="updated"><p>' . __( 'Network Settings Updated', 'mycred' ) . '</p></div>';
|
162 |
+
|
163 |
+
?>
|
164 |
+
<p><?php echo sprintf( __( 'Configure network settings for %s.', 'mycred' ), $name ); ?></p>
|
165 |
+
<form method="post" action="<?php echo admin_url( 'options.php' ); ?>" class="">
|
166 |
+
|
167 |
+
<?php settings_fields( 'mycred_network' ); ?>
|
168 |
+
|
169 |
+
<div class="list-items expandable-li" id="accordion">
|
170 |
+
<h4><div class="icon icon-inactive core"></div><?php _e( 'Settings', 'mycred' ); ?></h4>
|
171 |
+
<div class="body" style="display:block;">
|
172 |
+
<label class="subheader"><?php _e( 'Master Template', 'mycred' ); ?></label>
|
173 |
+
<ol id="myCRED-network-settings-enabling">
|
174 |
+
<li>
|
175 |
+
<input type="radio" name="mycred_network[master]" id="myCRED-network-overwrite-enabled" <?php checked( $prefs['master'], 1 ); ?> value="1" />
|
176 |
+
<label for="myCRED-network-"><?php _e( 'Yes', 'mycred' ); ?></label>
|
177 |
+
</li>
|
178 |
+
<li>
|
179 |
+
<input type="radio" name="mycred_network[master]" id="myCRED-network-overwrite-disabled" <?php checked( $prefs['master'], 0 ); ?> value="0" />
|
180 |
+
<label for="myCRED-network-"><?php _e( 'No', 'mycred' ); ?></label>
|
181 |
+
</li>
|
182 |
+
<li>
|
183 |
+
<p class="description"><?php echo sprintf( __( "If enabled, %s will use your main site's settings for all other sites in your network.", 'mycred' ), $name ); ?></p>
|
184 |
+
</li>
|
185 |
+
</ol>
|
186 |
+
<label class="subheader"><?php _e( 'Central Logging', 'mycred' ); ?></label>
|
187 |
+
<ol id="myCRED-network-log-enabling">
|
188 |
+
<li>
|
189 |
+
<input type="radio" name="mycred_network[central]" id="myCRED-network-overwrite-log-enabled" <?php checked( $prefs['central'], 1 ); ?> value="1" />
|
190 |
+
<label for="myCRED-network-"><?php _e( 'Yes', 'mycred' ); ?></label>
|
191 |
+
</li>
|
192 |
+
<li>
|
193 |
+
<input type="radio" name="mycred_network[central]" id="myCRED-network-overwrite-log-disabled" <?php checked( $prefs['central'], 0 ); ?> value="0" />
|
194 |
+
<label for="myCRED-network-"><?php _e( 'No', 'mycred' ); ?></label>
|
195 |
+
</li>
|
196 |
+
<li>
|
197 |
+
<p class="description"><?php echo sprintf( __( "If enabled, %s will log all site actions in your main site's log.", 'mycred' ), $name ); ?></p>
|
198 |
+
</li>
|
199 |
+
</ol>
|
200 |
+
<label class="subheader"><?php _e( 'Site Block', 'mycred' ); ?></label>
|
201 |
+
<ol id="myCRED-network-site-blocks">
|
202 |
+
<li>
|
203 |
+
<div class="h2"><input type="text" name="mycred_network[block]" id="myCRED-network-block" value="<?php echo $prefs['block']; ?>" class="long" /></div>
|
204 |
+
<span class="description"><?php echo sprintf( __( 'Comma separated list of blog ids where %s is to be disabled.', 'mycred' ), $name ); ?></span>
|
205 |
+
</li>
|
206 |
+
</ol>
|
207 |
+
|
208 |
+
<?php do_action( 'mycred_network_prefs', $this ); ?>
|
209 |
+
|
210 |
+
</div>
|
211 |
+
|
212 |
+
<?php do_action( 'mycred_after_network_prefs', $this ); ?>
|
213 |
|
214 |
</div>
|
|
|
215 |
|
216 |
+
<?php submit_button( __( 'Save Network Settings', 'mycred' ), 'primary large', 'submit' ); ?>
|
217 |
+
|
218 |
+
</form>
|
219 |
+
|
220 |
+
<?php do_action( 'mycred_bottom_network_page', $this ); ?>
|
221 |
|
222 |
</div>
|
223 |
<?php
|
224 |
+
|
225 |
}
|
226 |
|
227 |
/**
|
231 |
*/
|
232 |
public function save_network_prefs( $settings ) {
|
233 |
|
234 |
+
$new_settings = array();
|
235 |
+
$new_settings['master'] = ( isset( $settings['master'] ) ) ? $settings['master'] : 0;
|
236 |
$new_settings['central'] = ( isset( $settings['central'] ) ) ? $settings['central'] : 0;
|
237 |
+
$new_settings['block'] = sanitize_text_field( $settings['block'] );
|
238 |
|
239 |
+
return apply_filters( 'mycred_save_network_prefs', $new_settings, $settings, $this->core );
|
240 |
|
|
|
241 |
}
|
242 |
+
|
243 |
}
|
244 |
+
endif;
|
245 |
+
|
246 |
?>
|
includes/mycred-shortcodes.php
CHANGED
@@ -1180,4 +1180,108 @@ table.mycred-hook-table th { font-weight: bold; }
|
|
1180 |
}
|
1181 |
endif;
|
1182 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1183 |
?>
|
1180 |
}
|
1181 |
endif;
|
1182 |
|
1183 |
+
/**
|
1184 |
+
* Total Points
|
1185 |
+
* Allows to show total points of a specific point type or add up
|
1186 |
+
* points from the log based on reference, reference id or user id.
|
1187 |
+
* @since 1.6.6
|
1188 |
+
* @version 1.0
|
1189 |
+
*/
|
1190 |
+
if ( ! function_exists( 'mycred_render_shortcode_total_points' ) ) :
|
1191 |
+
function mycred_render_shortcode_total_points( $atts ) {
|
1192 |
+
|
1193 |
+
extract( shortcode_atts( array(
|
1194 |
+
'type' => 'mycred_default',
|
1195 |
+
'ref' => '',
|
1196 |
+
'ref_id' => '',
|
1197 |
+
'user_id' => '',
|
1198 |
+
'formatted' => 1
|
1199 |
+
), $atts ) );
|
1200 |
+
|
1201 |
+
$types = mycred_get_types();
|
1202 |
+
if ( ! array_key_exists( $type, $types ) )
|
1203 |
+
$type = 'mycred_default';
|
1204 |
+
|
1205 |
+
// First we construct the meta_key
|
1206 |
+
$point_type = $type;
|
1207 |
+
if ( is_multisite() && $GLOBALS['blog_id'] > 1 && ! mycred_centralize_log() )
|
1208 |
+
$type .= '_' . $GLOBALS['blog_id'];
|
1209 |
+
|
1210 |
+
elseif ( is_multisite() && $GLOBALS['blog_id'] > 1 && ! mycred_override_settings() )
|
1211 |
+
$type .= '_' . $GLOBALS['blog_id'];
|
1212 |
+
|
1213 |
+
$mycred = mycred( $point_type );
|
1214 |
+
|
1215 |
+
global $wpdb;
|
1216 |
+
|
1217 |
+
// Simple
|
1218 |
+
if ( $ref == '' && $ref_id == '' && $user_id == '' ) {
|
1219 |
+
|
1220 |
+
// Check if cached value exists
|
1221 |
+
$total = mycred_get_option( 'mycred-cache-total-' . $point_type, false );
|
1222 |
+
if ( $total === false ) {
|
1223 |
+
|
1224 |
+
// Add up all balances
|
1225 |
+
$total = $wpdb->get_var( $wpdb->prepare( "SELECT SUM( meta_value ) FROM {$wpdb->usermeta} WHERE meta_key = %s", $type ) );
|
1226 |
+
if ( $total !== NULL )
|
1227 |
+
mycred_update_option( 'mycred-cache-total-' . $point_type, $total );
|
1228 |
+
|
1229 |
+
}
|
1230 |
+
|
1231 |
+
}
|
1232 |
+
|
1233 |
+
// Complex
|
1234 |
+
else {
|
1235 |
+
|
1236 |
+
$wheres = array();
|
1237 |
+
$wheres[] = $wpdb->prepare( "ctype = %s", $point_type );
|
1238 |
+
|
1239 |
+
$ref = sanitize_key( $ref );
|
1240 |
+
if ( strlen( $ref ) > 0 ) {
|
1241 |
+
|
1242 |
+
// Either we have just one reference
|
1243 |
+
$multiple = explode( ',', $ref );
|
1244 |
+
if ( count( $multiple ) == 1 )
|
1245 |
+
$wheres[] = $wpdb->prepare( "ref = %s", $ref );
|
1246 |
+
|
1247 |
+
// Or a comma seperated list of references
|
1248 |
+
else {
|
1249 |
+
$_clean = array();
|
1250 |
+
foreach ( $multiple as $ref ) {
|
1251 |
+
$ref = sanitize_key( $ref );
|
1252 |
+
if ( strlen( $ref ) > 0 )
|
1253 |
+
$_clean[] = $ref;
|
1254 |
+
}
|
1255 |
+
|
1256 |
+
if ( ! empty( $_clean ) )
|
1257 |
+
$wheres[] = "ref IN ( '" . implode( "', '", $_clean ) . "' )";
|
1258 |
+
|
1259 |
+
}
|
1260 |
+
|
1261 |
+
}
|
1262 |
+
|
1263 |
+
$ref_id = sanitize_text_field( $ref );
|
1264 |
+
if ( strlen( $ref_id ) > 0 )
|
1265 |
+
$wheres[] = $wpdb->prepare( "ref_id = %d", $ref_id );
|
1266 |
+
|
1267 |
+
$user_id = sanitize_text_field( $ref );
|
1268 |
+
if ( strlen( $user_id ) > 0 )
|
1269 |
+
$wheres[] = $wpdb->prepare( "user_id = %d", $user_id );
|
1270 |
+
|
1271 |
+
$wheres = implode( " AND ", $wheres );
|
1272 |
+
$total = $wpdb->get_var( "SELECT SUM( creds ) FROM {$mycred->log_table} WHERE {$wheres};" );
|
1273 |
+
|
1274 |
+
}
|
1275 |
+
|
1276 |
+
if ( $total === NULL )
|
1277 |
+
$total = 0;
|
1278 |
+
|
1279 |
+
if ( $formatted == 1 )
|
1280 |
+
return $mycred->format_creds( $total );
|
1281 |
+
|
1282 |
+
return $total;
|
1283 |
+
|
1284 |
+
}
|
1285 |
+
endif;
|
1286 |
+
|
1287 |
?>
|
mycred.php
CHANGED
@@ -3,13 +3,13 @@
|
|
3 |
* Plugin Name: myCRED
|
4 |
* Plugin URI: http://mycred.me
|
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.6.
|
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
|
10 |
* Author Email: support@mycred.me
|
11 |
* Requires at least: WP 3.8
|
12 |
-
* Tested up to: WP 4.3
|
13 |
* Text Domain: mycred
|
14 |
* Domain Path: /lang
|
15 |
* License: GPLv2 or later
|
@@ -20,7 +20,7 @@
|
|
20 |
* BuddyPress Compatible: yes
|
21 |
* Forum URI: http://mycred.me/support/forums/
|
22 |
*/
|
23 |
-
define( 'myCRED_VERSION', '1.6.
|
24 |
define( 'myCRED_SLUG', 'mycred' );
|
25 |
define( 'myCRED_NAME', '<strong>my</strong>CRED' );
|
26 |
|
@@ -343,6 +343,7 @@ if ( ! function_exists( 'mycred_init' ) ) :
|
|
343 |
add_shortcode( 'mycred_total_balance', 'mycred_render_shortcode_total' );
|
344 |
add_shortcode( 'mycred_exchange', 'mycred_render_shortcode_exchange' );
|
345 |
add_shortcode( 'mycred_hook_table', 'mycred_render_shortcode_hook_table' );
|
|
|
346 |
|
347 |
// Shortcode related
|
348 |
add_action( 'wp_footer', 'mycred_send_shortcode_footer' );
|
3 |
* Plugin Name: myCRED
|
4 |
* Plugin URI: http://mycred.me
|
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.6.6
|
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
|
10 |
* Author Email: support@mycred.me
|
11 |
* Requires at least: WP 3.8
|
12 |
+
* Tested up to: WP 4.3
|
13 |
* Text Domain: mycred
|
14 |
* Domain Path: /lang
|
15 |
* License: GPLv2 or later
|
20 |
* BuddyPress Compatible: yes
|
21 |
* Forum URI: http://mycred.me/support/forums/
|
22 |
*/
|
23 |
+
define( 'myCRED_VERSION', '1.6.6' );
|
24 |
define( 'myCRED_SLUG', 'mycred' );
|
25 |
define( 'myCRED_NAME', '<strong>my</strong>CRED' );
|
26 |
|
343 |
add_shortcode( 'mycred_total_balance', 'mycred_render_shortcode_total' );
|
344 |
add_shortcode( 'mycred_exchange', 'mycred_render_shortcode_exchange' );
|
345 |
add_shortcode( 'mycred_hook_table', 'mycred_render_shortcode_hook_table' );
|
346 |
+
add_shortcode( 'mycred_total_points', 'mycred_render_shortcode_total_points' );
|
347 |
|
348 |
// Shortcode related
|
349 |
add_action( 'wp_footer', 'mycred_send_shortcode_footer' );
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: designbymerovingi
|
|
3 |
Tags:points, tokens, credit, management, reward, charge, community, contest, buddypress, jetpack, bbpress, simple press, woocommerce, marketpress, wp e-commerce, gravity forms, share-this
|
4 |
Requires at least: 3.8
|
5 |
Tested up to: 4.3.1
|
6 |
-
Stable tag: 1.6.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -19,52 +19,46 @@ myCRED is a adaptive points management tool to help you build reward programs, m
|
|
19 |
Packed with features, myCRED also supports some of the most popular WordPress plugins like WooCommerce, BuddyPress, Jetpack, Contact Form 7 and [more](http://mycred.me/about/supported-plugins/).
|
20 |
|
21 |
|
22 |
-
|
23 |
|
24 |
Each user on your WordPress websites gets their own point balance which you can manually [adjust](http://mycred.me/about/features/easy-manual-adjustments/) at any time. As of version 1.4, myCRED also supports multiple point types for those who need more then one type of points on their website.
|
25 |
|
26 |
|
27 |
-
|
28 |
-
**Log**
|
29 |
|
30 |
Each time myCRED adds or deducts points from a user, the adjustment is [logged](http://mycred.me/about/features/the-log/) in a dedicated log, allowing your users to browse their history. The log is also used to provide you with statistics or enforce limits you set.
|
31 |
|
32 |
|
|
|
33 |
|
34 |
-
|
35 |
-
|
36 |
-
myCRED supports a vast set of ways you can automatically give / take points from a user. Everything from new comments to store purchases. These automatic adjustments are managed by “Hooks” which you can setup in your admin area.
|
37 |
|
38 |
|
39 |
-
|
40 |
-
**Third-party plugin Support**
|
41 |
|
42 |
myCRED supports some of the most [popular plugins](http://mycred.me/about/supported-plugins/) for WordPress like BuddyPress, WooCommerce, Jetpack, Contact Form 7 etc. To prevent to much cluttering in the admin area with settings, myCRED will automatically hide settings for plugins that you are not using.
|
43 |
|
44 |
|
45 |
-
|
46 |
-
**Add-ons**
|
47 |
|
48 |
There is so much more to myCRED then just adjusting balances. The plugin comes with several [built-in add-ons](http://mycred.me/add-ons/) which enabled more complex features such as allowing point transfers, buying points for real money, allow payments in stores etc.
|
49 |
|
50 |
To help fund development of myCRED, I also provide an ever growing set of [premium add-ons](http://mycred.me/store/) that brings you even more features or add support for more payment gateways.
|
51 |
|
52 |
|
53 |
-
|
54 |
-
**Documentation**
|
55 |
|
56 |
The myCRED [Codex](http://codex.mycred.me/) provides a large amount of documentation for users and developers. You can also find installation guides on each add-ons page on the myCRED.me website.
|
57 |
|
58 |
|
59 |
-
|
60 |
-
**Support**
|
61 |
|
62 |
I provide free technical support via the [myCRED website](http://mycred.me/support/forums/). Support is **NOT** provided here on the wordpress.org support forum. This also means I do not provide support for forks or clones of this plugin.
|
63 |
|
64 |
|
65 |
== Installation ==
|
66 |
|
67 |
-
|
68 |
|
69 |
[myCRED Codex - Setup Guides](http://codex.mycred.me/get-started/)
|
70 |
|
@@ -85,21 +79,29 @@ I provide free technical support via the [myCRED website](http://mycred.me/suppo
|
|
85 |
|
86 |
Yep! myCRED also offers you the option to centralize your log or enforce your main sites installation on all sub sites via the "Master Template" feature.
|
87 |
|
88 |
-
=
|
89 |
|
90 |
-
|
91 |
|
92 |
= Does myCRED support Multiple Point Types? =
|
93 |
|
94 |
Yes! myCRED as of version 1.4 officially supports multiple point types. You can setup an unlimited number of point types with it's own settings, available hooks and log page for each administration. Note that add-ons have limited support. Please consult the myCRED website for more information.
|
95 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
= Can users use points to pay for items in my store? =
|
97 |
|
98 |
Yes, myCRED supports WooCommerce, MarketPress and WP E-Commerce straight out of the box. If you want users to pay for event tickets myCRED also supports Events Manger and Event Espresso.
|
99 |
|
100 |
= Can myCRED award points for users sharing posts on social media sites? =
|
101 |
|
102 |
-
No. myCRED
|
103 |
|
104 |
= Can I award points for watching videos? =
|
105 |
|
@@ -121,8 +123,8 @@ myCRED supports importing, exporting, inline editing and manual deletion of log
|
|
121 |
|
122 |
== Upgrade Notice ==
|
123 |
|
124 |
-
= 1.6.
|
125 |
-
|
126 |
|
127 |
|
128 |
== Other Notes ==
|
@@ -146,143 +148,12 @@ Bug fixes and BuddyPress 2.3+ comp.
|
|
146 |
|
147 |
== Changelog ==
|
148 |
|
149 |
-
= 1.6.
|
150 |
-
|
151 |
-
FIX -
|
152 |
-
FIX -
|
153 |
-
FIX -
|
154 |
-
TWEAK -
|
155 |
-
TWEAK - Re-wrote the daily hook limit query.
|
156 |
-
TWEAK - Cleaned up abstract class files and added some inline documentation.
|
157 |
-
|
158 |
-
= 1.6.4 =
|
159 |
-
http://mycred.me/support/changelog/
|
160 |
-
|
161 |
-
= 1.6.3 =
|
162 |
-
http://mycred.me/support/changelog/
|
163 |
-
|
164 |
-
= 1.6.2 =
|
165 |
-
http://mycred.me/support/changelog/
|
166 |
-
|
167 |
-
= 1.6.1 =
|
168 |
-
http://mycred.me/support/changelog/
|
169 |
-
|
170 |
-
= 1.6 =
|
171 |
-
http://mycred.me/support/changelog/
|
172 |
-
|
173 |
-
= 1.5.4 =
|
174 |
-
http://mycred.me/support/changelog/
|
175 |
-
|
176 |
-
= 1.5.3 =
|
177 |
-
http://mycred.me/support/changelog/
|
178 |
-
|
179 |
-
= 1.5.2 =
|
180 |
-
http://mycred.me/support/changelog/
|
181 |
-
|
182 |
-
= 1.5.1 =
|
183 |
-
http://mycred.me/support/changelog/
|
184 |
-
|
185 |
-
= 1.5 =
|
186 |
-
http://mycred.me/support/changelog/
|
187 |
-
|
188 |
-
= 1.4.7 =
|
189 |
-
http://mycred.me/support/changelog/2/
|
190 |
-
|
191 |
-
= 1.4.6 =
|
192 |
-
http://mycred.me/support/changelog/2/
|
193 |
-
|
194 |
-
= 1.4.5 =
|
195 |
-
http://mycred.me/support/changelog/2/
|
196 |
-
|
197 |
-
= 1.4.4 =
|
198 |
-
http://mycred.me/support/changelog/2/
|
199 |
-
|
200 |
-
= 1.4.3 =
|
201 |
-
http://mycred.me/support/changelog/2/
|
202 |
-
|
203 |
-
= 1.4.2 =
|
204 |
-
http://mycred.me/support/changelog/2/
|
205 |
-
|
206 |
-
= 1.4.1 =
|
207 |
-
http://mycred.me/support/changelog/2/
|
208 |
-
|
209 |
-
= 1.4 =
|
210 |
-
http://mycred.me/support/changelog/2/
|
211 |
-
|
212 |
-
= 1.3.3.2 =
|
213 |
-
http://mycred.me/support/changelog/3/
|
214 |
-
|
215 |
-
= 1.3.3.1 =
|
216 |
-
http://mycred.me/support/changelog/3/
|
217 |
-
|
218 |
-
= 1.3.3 =
|
219 |
-
http://mycred.me/support/changelog/3/
|
220 |
-
|
221 |
-
= 1.3.2 =
|
222 |
-
http://mycred.me/support/changelog/3/
|
223 |
-
|
224 |
-
= 1.3.1 =
|
225 |
-
http://mycred.me/support/changelog/3/
|
226 |
-
|
227 |
-
= 1.3 =
|
228 |
-
http://mycred.me/support/changelog/3/
|
229 |
-
|
230 |
-
= 1.2.3 =
|
231 |
-
http://mycred.me/support/changelog/4/
|
232 |
-
|
233 |
-
= 1.2.2 =
|
234 |
-
http://mycred.me/support/changelog/4/
|
235 |
-
|
236 |
-
= 1.2.1 =
|
237 |
-
http://mycred.me/support/changelog/4/
|
238 |
-
|
239 |
-
= 1.2 =
|
240 |
-
http://mycred.me/support/changelog/4/
|
241 |
-
|
242 |
-
= 1.1.2 =
|
243 |
-
http://mycred.me/support/changelog/5/
|
244 |
-
|
245 |
-
= 1.1.1 =
|
246 |
-
http://mycred.me/support/changelog/5/
|
247 |
-
|
248 |
-
= 1.1 =
|
249 |
-
http://mycred.me/support/changelog/5/
|
250 |
-
|
251 |
-
= 1.0.9.3 =
|
252 |
-
http://mycred.me/support/changelog/6/
|
253 |
-
|
254 |
-
= 1.0.9.2 =
|
255 |
-
http://mycred.me/support/changelog/6/
|
256 |
-
|
257 |
-
= 1.0.9.1 =
|
258 |
-
http://mycred.me/support/changelog/6/
|
259 |
-
|
260 |
-
= 1.0.9 =
|
261 |
-
http://mycred.me/support/changelog/6/
|
262 |
-
|
263 |
-
= 1.0.8 =
|
264 |
-
http://mycred.me/support/changelog/6/
|
265 |
-
|
266 |
-
= 1.0.7 =
|
267 |
-
http://mycred.me/support/changelog/6/
|
268 |
-
|
269 |
-
= 1.0.6 =
|
270 |
-
http://mycred.me/support/changelog/6/
|
271 |
-
|
272 |
-
= 1.0.5 =
|
273 |
-
http://mycred.me/support/changelog/6/
|
274 |
-
|
275 |
-
= 1.0.4 =
|
276 |
-
http://mycred.me/support/changelog/6/
|
277 |
-
|
278 |
-
= 1.0.3 =
|
279 |
-
http://mycred.me/support/changelog/6/
|
280 |
-
|
281 |
-
= 1.0.2 =
|
282 |
-
http://mycred.me/support/changelog/6/
|
283 |
-
|
284 |
-
= 1.0.1 =
|
285 |
-
http://mycred.me/support/changelog/6/
|
286 |
|
287 |
-
=
|
288 |
-
http://mycred.me/support/changelog/
|
3 |
Tags:points, tokens, credit, management, reward, charge, community, contest, buddypress, jetpack, bbpress, simple press, woocommerce, marketpress, wp e-commerce, gravity forms, share-this
|
4 |
Requires at least: 3.8
|
5 |
Tested up to: 4.3.1
|
6 |
+
Stable tag: 1.6.6
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
19 |
Packed with features, myCRED also supports some of the most popular WordPress plugins like WooCommerce, BuddyPress, Jetpack, Contact Form 7 and [more](http://mycred.me/about/supported-plugins/).
|
20 |
|
21 |
|
22 |
+
= Points =
|
23 |
|
24 |
Each user on your WordPress websites gets their own point balance which you can manually [adjust](http://mycred.me/about/features/easy-manual-adjustments/) at any time. As of version 1.4, myCRED also supports multiple point types for those who need more then one type of points on their website.
|
25 |
|
26 |
|
27 |
+
= Log =
|
|
|
28 |
|
29 |
Each time myCRED adds or deducts points from a user, the adjustment is [logged](http://mycred.me/about/features/the-log/) in a dedicated log, allowing your users to browse their history. The log is also used to provide you with statistics or enforce limits you set.
|
30 |
|
31 |
|
32 |
+
= Awarding or Deducting Points Automatically =
|
33 |
|
34 |
+
myCRED supports a vast set of ways you can automatically give / take points from a user. Everything from new comments to store purchases. These automatic adjustments are managed by so called Hooks which you can setup in your admin area.
|
|
|
|
|
35 |
|
36 |
|
37 |
+
= Third-party plugin Support =
|
|
|
38 |
|
39 |
myCRED supports some of the most [popular plugins](http://mycred.me/about/supported-plugins/) for WordPress like BuddyPress, WooCommerce, Jetpack, Contact Form 7 etc. To prevent to much cluttering in the admin area with settings, myCRED will automatically hide settings for plugins that you are not using.
|
40 |
|
41 |
|
42 |
+
= Add-ons =
|
|
|
43 |
|
44 |
There is so much more to myCRED then just adjusting balances. The plugin comes with several [built-in add-ons](http://mycred.me/add-ons/) which enabled more complex features such as allowing point transfers, buying points for real money, allow payments in stores etc.
|
45 |
|
46 |
To help fund development of myCRED, I also provide an ever growing set of [premium add-ons](http://mycred.me/store/) that brings you even more features or add support for more payment gateways.
|
47 |
|
48 |
|
49 |
+
= Documentation =
|
|
|
50 |
|
51 |
The myCRED [Codex](http://codex.mycred.me/) provides a large amount of documentation for users and developers. You can also find installation guides on each add-ons page on the myCRED.me website.
|
52 |
|
53 |
|
54 |
+
= Support =
|
|
|
55 |
|
56 |
I provide free technical support via the [myCRED website](http://mycred.me/support/forums/). Support is **NOT** provided here on the wordpress.org support forum. This also means I do not provide support for forks or clones of this plugin.
|
57 |
|
58 |
|
59 |
== Installation ==
|
60 |
|
61 |
+
= myCRED Guides =
|
62 |
|
63 |
[myCRED Codex - Setup Guides](http://codex.mycred.me/get-started/)
|
64 |
|
79 |
|
80 |
Yep! myCRED also offers you the option to centralize your log or enforce your main sites installation on all sub sites via the "Master Template" feature.
|
81 |
|
82 |
+
= Can I as an administrator adjust my users balances? =
|
83 |
|
84 |
+
Yes of course. Administrators have full access to all users point types, balances and history.
|
85 |
|
86 |
= Does myCRED support Multiple Point Types? =
|
87 |
|
88 |
Yes! myCRED as of version 1.4 officially supports multiple point types. You can setup an unlimited number of point types with it's own settings, available hooks and log page for each administration. Note that add-ons have limited support. Please consult the myCRED website for more information.
|
89 |
|
90 |
+
= What point formats does myCRED support? =
|
91 |
+
|
92 |
+
myCRED supports whole numbers or the use of decimals (max 20 decimal places). You can setup to use both if you use mutliple point types however the default point type must be set to use the highest number of decimal places.
|
93 |
+
|
94 |
+
= How many point types does myCRED support? =
|
95 |
+
|
96 |
+
There is no built-in limit for how many point types you can setup, however, with that being said, I do not recommend more then 5-6 types. Remember that myCRED will add an admin menu for each point type so with large sets of point types, you will have a very long admin menu.
|
97 |
+
|
98 |
= Can users use points to pay for items in my store? =
|
99 |
|
100 |
Yes, myCRED supports WooCommerce, MarketPress and WP E-Commerce straight out of the box. If you want users to pay for event tickets myCRED also supports Events Manger and Event Espresso.
|
101 |
|
102 |
= Can myCRED award points for users sharing posts on social media sites? =
|
103 |
|
104 |
+
No. myCRED does not support this but there are WordPress plugins out there that can provide this functionality with support for myCRED.
|
105 |
|
106 |
= Can I award points for watching videos? =
|
107 |
|
123 |
|
124 |
== Upgrade Notice ==
|
125 |
|
126 |
+
= 1.6.6 =
|
127 |
+
Critical bug fixes.
|
128 |
|
129 |
|
130 |
== Other Notes ==
|
148 |
|
149 |
== Changelog ==
|
150 |
|
151 |
+
= 1.6.6 =
|
152 |
+
NEW - Added new mycred_total_points shortcode.
|
153 |
+
FIX - PayPal IPN Verification is missing User-Agent.
|
154 |
+
FIX - Ranks add-on causes an error that prevents the settings page from loading.
|
155 |
+
FIX - Multisite block list is not being enforced.
|
156 |
+
TWEAK - Updated Settings page styling slightly for better fit.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
157 |
|
158 |
+
= Previous Versions =
|
159 |
+
http://mycred.me/support/changelog/
|