myCRED - Version 1.1.1

Version Description

This version resolves bugs with the MarketPress add-on and third-party plugins support. You will also have access to the bbPress hooks without the need to use Buddypress.

  • bbPress users should visit the "Hooks" sub-menu and re-enter their hook settings as these will be reset.
  • Ranks Add-on users should visit the "Settings" sub-menu and confirm their Rank settings as new settings will be available.

=

Download this release

Release Info

Developer designbymerovingi
Plugin Icon 128x128 myCRED
Version 1.1.1
Comparing to
See all releases

Code changes from version 1.1 to 1.1.1

abstracts/mycred-abstract-hook.php CHANGED
@@ -59,7 +59,7 @@ if ( !class_exists( 'myCRED_Hook' ) ) {
59
  }
60
 
61
  /**
62
- * Sanitise Preference for Registration Hook
63
  * @since 0.1
64
  * @version 1.0
65
  */
@@ -149,10 +149,11 @@ if ( !class_exists( 'myCRED_Hook' ) ) {
149
  * @param $action (string) required reference
150
  * @param $ref_id (int) optional reference id
151
  * @param $user_id (int) optional user id
 
152
  * @since 0.1
153
- * @version 1.0
154
  */
155
- function has_entry( $action = '', $ref_id = '', $user_id = '' ) {
156
  global $wpdb;
157
 
158
  $where = $prep = array();
@@ -171,6 +172,11 @@ if ( !class_exists( 'myCRED_Hook' ) ) {
171
  $prep[] = abs( $user_id );
172
  }
173
 
 
 
 
 
 
174
  $where = implode( ' AND ', $where );
175
 
176
  if ( !empty( $where ) ) {
59
  }
60
 
61
  /**
62
+ * Sanitise Preference
63
  * @since 0.1
64
  * @version 1.0
65
  */
149
  * @param $action (string) required reference
150
  * @param $ref_id (int) optional reference id
151
  * @param $user_id (int) optional user id
152
+ * @param $data (array|string) option data to search
153
  * @since 0.1
154
+ * @version 1.1
155
  */
156
+ function has_entry( $action = '', $ref_id = '', $user_id = '', $data = '' ) {
157
  global $wpdb;
158
 
159
  $where = $prep = array();
172
  $prep[] = abs( $user_id );
173
  }
174
 
175
+ if ( !empty( $data ) ) {
176
+ $where[] = 'data = %s';
177
+ $prep[] = maybe_serialize( $data );
178
+ }
179
+
180
  $where = implode( ' AND ', $where );
181
 
182
  if ( !empty( $where ) ) {
abstracts/mycred-abstract-module.php CHANGED
@@ -4,7 +4,7 @@ if ( !defined( 'myCRED_VERSION' ) ) exit;
4
  * myCRED_Module class
5
  * @see http://mycred.me/classes/mycred_module/
6
  * @since 0.1
7
- * @version 1.0
8
  */
9
  if ( !class_exists( 'myCRED_Module' ) ) {
10
  abstract class myCRED_Module {
@@ -162,14 +162,22 @@ if ( !class_exists( 'myCRED_Module' ) ) {
162
  add_filter( 'mycred_save_core_prefs', array( $this, 'sanitize_extra_settings' ), 90, 3 );
163
  }
164
 
 
165
  add_action( 'mycred_pre_init', array( $this, 'module_pre_init' ) );
166
  add_action( 'mycred_init', array( $this, 'module_init' ) );
167
  add_action( 'mycred_admin_init', array( $this, 'module_admin_init' ) );
168
  add_action( 'mycred_widgets_init', array( $this, 'module_widgets_init' ) );
169
  }
 
 
 
 
 
 
 
170
 
171
  /**
172
- * Pre Init
173
  * @since 0.1
174
  * @version 1.0
175
  */
4
  * myCRED_Module class
5
  * @see http://mycred.me/classes/mycred_module/
6
  * @since 0.1
7
+ * @version 1.1
8
  */
9
  if ( !class_exists( 'myCRED_Module' ) ) {
10
  abstract class myCRED_Module {
162
  add_filter( 'mycred_save_core_prefs', array( $this, 'sanitize_extra_settings' ), 90, 3 );
163
  }
164
 
165
+ add_action( 'mycred_ready', array( $this, 'module_ready' ) );
166
  add_action( 'mycred_pre_init', array( $this, 'module_pre_init' ) );
167
  add_action( 'mycred_init', array( $this, 'module_init' ) );
168
  add_action( 'mycred_admin_init', array( $this, 'module_admin_init' ) );
169
  add_action( 'mycred_widgets_init', array( $this, 'module_widgets_init' ) );
170
  }
171
+
172
+ /**
173
+ * myCRED Ready
174
+ * @since 1.1.1
175
+ * @version 1.0
176
+ */
177
+ function module_ready() { }
178
 
179
  /**
180
+ * Plugins Loaded (pre init)
181
  * @since 0.1
182
  * @version 1.0
183
  */
addons/buddypress/hooks/bp-galleries.php CHANGED
@@ -58,9 +58,6 @@ if ( !class_exists( 'myCRED_BuddyPress_Gallery' ) ) {
58
  $gallery->id,
59
  'bp_gallery'
60
  );
61
-
62
- // Clean up
63
- unset( $this );
64
  }
65
 
66
  /**
58
  $gallery->id,
59
  'bp_gallery'
60
  );
 
 
 
61
  }
62
 
63
  /**
addons/buddypress/hooks/bp-groups.php CHANGED
@@ -125,9 +125,6 @@ if ( !class_exists( 'myCRED_BuddyPress_Groups' ) ) {
125
  $group_id,
126
  'bp_group'
127
  );
128
-
129
- // Clean up
130
- unset( $this );
131
  }
132
 
133
  /**
@@ -205,9 +202,6 @@ if ( !class_exists( 'myCRED_BuddyPress_Groups' ) ) {
205
  $group_id,
206
  'bp_group'
207
  );
208
-
209
- // Clean up
210
- unset( $this );
211
  }
212
 
213
  /**
@@ -233,9 +227,6 @@ if ( !class_exists( 'myCRED_BuddyPress_Groups' ) ) {
233
  $topic_id,
234
  'bp_ftopic'
235
  );
236
-
237
- // Clean up
238
- unset( $this );
239
  }
240
 
241
  /**
@@ -258,9 +249,6 @@ if ( !class_exists( 'myCRED_BuddyPress_Groups' ) ) {
258
  $topic_id,
259
  'bp_ftopic'
260
  );
261
-
262
- // Clean up
263
- unset( $this );
264
  }
265
 
266
  /**
@@ -286,9 +274,6 @@ if ( !class_exists( 'myCRED_BuddyPress_Groups' ) ) {
286
  $post_id,
287
  'bp_fpost'
288
  );
289
-
290
- // Clean up
291
- unset( $this );
292
  }
293
 
294
  /**
@@ -311,9 +296,6 @@ if ( !class_exists( 'myCRED_BuddyPress_Groups' ) ) {
311
  $post_id,
312
  'bp_fpost'
313
  );
314
-
315
- // Clean up
316
- unset( $this );
317
  }
318
 
319
  /**
@@ -352,9 +334,6 @@ if ( !class_exists( 'myCRED_BuddyPress_Groups' ) ) {
352
  $group_id,
353
  'bp_group'
354
  );
355
-
356
- // Clean up
357
- unset( $this );
358
  }
359
 
360
  /**
@@ -378,9 +357,6 @@ if ( !class_exists( 'myCRED_BuddyPress_Groups' ) ) {
378
  $group_id,
379
  'bp_group'
380
  );
381
-
382
- // Clean up
383
- unset( $this );
384
  }
385
 
386
  /**
@@ -406,9 +382,6 @@ if ( !class_exists( 'myCRED_BuddyPress_Groups' ) ) {
406
  $group_id,
407
  'bp_group'
408
  );
409
-
410
- // Clean up
411
- unset( $this );
412
  }
413
 
414
  /**
@@ -432,9 +405,6 @@ if ( !class_exists( 'myCRED_BuddyPress_Groups' ) ) {
432
  $activity_id,
433
  'bp_activity'
434
  );
435
-
436
- // Clean up
437
- unset( $this );
438
  }
439
 
440
  /**
125
  $group_id,
126
  'bp_group'
127
  );
 
 
 
128
  }
129
 
130
  /**
202
  $group_id,
203
  'bp_group'
204
  );
 
 
 
205
  }
206
 
207
  /**
227
  $topic_id,
228
  'bp_ftopic'
229
  );
 
 
 
230
  }
231
 
232
  /**
249
  $topic_id,
250
  'bp_ftopic'
251
  );
 
 
 
252
  }
253
 
254
  /**
274
  $post_id,
275
  'bp_fpost'
276
  );
 
 
 
277
  }
278
 
279
  /**
296
  $post_id,
297
  'bp_fpost'
298
  );
 
 
 
299
  }
300
 
301
  /**
334
  $group_id,
335
  'bp_group'
336
  );
 
 
 
337
  }
338
 
339
  /**
357
  $group_id,
358
  'bp_group'
359
  );
 
 
 
360
  }
361
 
362
  /**
382
  $group_id,
383
  'bp_group'
384
  );
 
 
 
385
  }
386
 
387
  /**
405
  $activity_id,
406
  'bp_activity'
407
  );
 
 
 
408
  }
409
 
410
  /**
addons/buddypress/hooks/bp-links.php CHANGED
@@ -79,9 +79,6 @@ if ( !class_exists( 'myCRED_BuddyPress_Links' ) ) {
79
  $link_id,
80
  'bp_links'
81
  );
82
-
83
- // Clean up
84
- unset( $this );
85
  }
86
 
87
  /**
@@ -107,9 +104,6 @@ if ( !class_exists( 'myCRED_BuddyPress_Links' ) ) {
107
  $link_id,
108
  'bp_links'
109
  );
110
-
111
- // Clean up
112
- unset( $this );
113
  }
114
 
115
  /**
@@ -133,9 +127,6 @@ if ( !class_exists( 'myCRED_BuddyPress_Links' ) ) {
133
  $activity_id,
134
  'bp_links'
135
  );
136
-
137
- // Clean up
138
- unset( $this );
139
  }
140
 
141
  /**
@@ -161,9 +152,6 @@ if ( !class_exists( 'myCRED_BuddyPress_Links' ) ) {
161
  $link_id,
162
  'bp_links'
163
  );
164
-
165
- // Clean up
166
- unset( $this );
167
  }
168
 
169
  /**
79
  $link_id,
80
  'bp_links'
81
  );
 
 
 
82
  }
83
 
84
  /**
104
  $link_id,
105
  'bp_links'
106
  );
 
 
 
107
  }
108
 
109
  /**
127
  $activity_id,
128
  'bp_links'
129
  );
 
 
 
130
  }
131
 
132
  /**
152
  $link_id,
153
  'bp_links'
154
  );
 
 
 
155
  }
156
 
157
  /**
addons/buddypress/hooks/bp-press.php DELETED
@@ -1,135 +0,0 @@
1
- <?php
2
- if ( !defined( 'myCRED_VERSION' ) ) exit;
3
- /**
4
- * myCRED_BuddyPress_bbPress class
5
- *
6
- * Creds for bbPress 2.0
7
- * @since 0.1
8
- * @version 1.0
9
- */
10
- if ( !class_exists( 'myCRED_BuddyPress_bbPress' ) ) {
11
- class myCRED_BuddyPress_bbPress extends myCRED_Hook {
12
-
13
- /**
14
- * Construct
15
- */
16
- function __construct( $hook_prefs ) {
17
- parent::__construct( array(
18
- 'id' => 'hook_bp_bbpress',
19
- 'defaults' => array(
20
- 'new_topic' => array(
21
- 'creds' => 1,
22
- 'log' => '%plural% for new forum topic'
23
- ),
24
- 'new_reply' => array(
25
- 'creds' => 1,
26
- 'log' => '%plural% for new forum reply'
27
- )
28
- )
29
- ), $hook_prefs );
30
- }
31
-
32
- /**
33
- * Run
34
- * @since 0.1
35
- * @version 1.0
36
- */
37
- public function run() {
38
- if ( $this->prefs['new_topic']['creds'] != 0 )
39
- add_action( 'bbp_new_topic', array( $this, 'new_topic' ), 20, 4 );
40
-
41
- if ( $this->prefs['new_reply']['creds'] != 0 )
42
- add_action( 'bbp_new_reply', array( $this, 'new_reply' ), 20, 5 );
43
- }
44
-
45
- /**
46
- * New Topic
47
- * @since 0.1
48
- * @version 1.0
49
- */
50
- public function new_topic( $topic_id, $forum_id, $anonymous_data, $topic_author ) {
51
- // Check if user is excluded
52
- if ( $this->core->exclude_user( $topic_author ) ) return;
53
-
54
- // Make sure this is unique event
55
- if ( $this->has_entry( 'new_forum_topic', $topic_id, $topic_author ) ) return;
56
-
57
- // Execute
58
- $this->core->add_creds(
59
- 'new_forum_topic',
60
- $topic_author,
61
- $this->prefs['new_topic']['creds'],
62
- $this->prefs['new_topic']['log'],
63
- $topic_id,
64
- array( 'ref_type' => 'post' )
65
- );
66
-
67
- // Clean up
68
- unset( $this );
69
- }
70
-
71
- /**
72
- * New Reply
73
- * @since 0.1
74
- * @version 1.0
75
- */
76
- public function new_reply( $reply_id, $topic_id, $forum_id, $anonymous_data, $reply_author ) {
77
- // Check if user is excluded
78
- if ( $this->core->exclude_user( $reply_author ) ) return;
79
-
80
- // Make sure this is unique event
81
- if ( $this->has_entry( 'new_forum_reply', $reply_id, $reply_author ) ) return;
82
-
83
- // Execute
84
- $this->core->add_creds(
85
- 'new_forum_reply',
86
- $reply_author,
87
- $this->prefs['new_reply']['creds'],
88
- $this->prefs['new_reply']['log'],
89
- $reply_id,
90
- array( 'ref_type' => 'post' )
91
- );
92
-
93
- // Clean up
94
- unset( $this );
95
- }
96
-
97
- /**
98
- * Preferences
99
- * @since 0.1
100
- * @version 1.0
101
- */
102
- public function preferences() {
103
- $prefs = $this->prefs; ?>
104
-
105
- <!-- Creds for New Topic -->
106
- <label for="<?php echo $this->field_id( array( 'new_topic', 'creds' ) ); ?>" class="subheader"><?php echo $this->core->template_tags_general( __( '%plural% for New Topic', 'mycred' ) ); ?></label>
107
- <ol id="">
108
- <li>
109
- <div class="h2"><input type="text" name="<?php echo $this->field_name( array( 'new_topic', 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'new_topic', 'creds' ) ); ?>" value="<?php echo $this->core->format_number( $prefs['new_topic']['creds'] ); ?>" size="8" /></div>
110
- </li>
111
- <li class="empty">&nbsp;</li>
112
- <li>
113
- <label for="<?php echo $this->field_id( array( 'new_topic', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
114
- <div class="h2"><input type="text" name="<?php echo $this->field_name( array( 'new_topic', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'new_topic', 'log' ) ); ?>" value="<?php echo $prefs['new_topic']['log']; ?>" class="long" /></div>
115
- <span class="description"><?php _e( 'Available template tags: General, Post', 'mycred' ); ?></span>
116
- </li>
117
- </ol>
118
- <!-- Creds for New Reply -->
119
- <label for="<?php echo $this->field_id( array( 'new_reply', 'creds' ) ); ?>" class="subheader"><?php echo $this->core->template_tags_general( __( '%plural% for New Reply', 'mycred' ) ); ?></label>
120
- <ol id="">
121
- <li>
122
- <div class="h2"><input type="text" name="<?php echo $this->field_name( array( 'new_reply', 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'new_reply', 'creds' ) ); ?>" value="<?php echo $this->core->format_number( $prefs['new_reply']['creds'] ); ?>" size="8" /></div>
123
- </li>
124
- <li class="empty">&nbsp;</li>
125
- <li>
126
- <label for="<?php echo $this->field_id( array( 'new_reply', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
127
- <div class="h2"><input type="text" name="<?php echo $this->field_name( array( 'new_reply', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'new_reply', 'log' ) ); ?>" value="<?php echo $prefs['new_reply']['log']; ?>" class="long" /></div>
128
- <span class="description"><?php _e( 'Available template tags: General, Post', 'mycred' ); ?></span>
129
- </li>
130
- </ol>
131
- <?php unset( $this );
132
- }
133
- }
134
- }
135
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
addons/buddypress/hooks/bp-profile.php CHANGED
@@ -105,9 +105,6 @@ if ( !class_exists( 'myCRED_BuddyPress_Profile' ) ) {
105
  $activity_id,
106
  'bp_activity'
107
  );
108
-
109
- // Clean up
110
- unset( $this );
111
  }
112
 
113
  /**
@@ -131,9 +128,6 @@ if ( !class_exists( 'myCRED_BuddyPress_Profile' ) ) {
131
  $this->prefs['avatar']['creds'],
132
  $this->prefs['avatar']['log']
133
  );
134
-
135
- // Clean up
136
- unset( $this );
137
  }
138
 
139
  /**
@@ -160,9 +154,6 @@ if ( !class_exists( 'myCRED_BuddyPress_Profile' ) ) {
160
  $friend_user_id,
161
  array( 'ref_type' => 'user' )
162
  );
163
-
164
- // Clean up
165
- unset( $this );
166
  }
167
 
168
  /**
@@ -189,9 +180,6 @@ if ( !class_exists( 'myCRED_BuddyPress_Profile' ) ) {
189
  $friend_user_id,
190
  array( 'ref_type' => 'user' )
191
  );
192
-
193
- // Clean up
194
- unset( $this );
195
  }
196
 
197
  /**
@@ -217,9 +205,6 @@ if ( !class_exists( 'myCRED_BuddyPress_Profile' ) ) {
217
  $comment_id,
218
  'bp_comment'
219
  );
220
-
221
- // Clean up
222
- unset( $this );
223
  }
224
 
225
  /**
@@ -243,9 +228,6 @@ if ( !class_exists( 'myCRED_BuddyPress_Profile' ) ) {
243
  $activity_id,
244
  'bp_comment'
245
  );
246
-
247
- // Clean up
248
- unset( $this );
249
  }
250
 
251
  /**
@@ -269,9 +251,6 @@ if ( !class_exists( 'myCRED_BuddyPress_Profile' ) ) {
269
  $message->thread_id,
270
  'bp_message'
271
  );
272
-
273
- // Clean up
274
- unset( $this );
275
  }
276
 
277
  /**
@@ -298,9 +277,6 @@ if ( !class_exists( 'myCRED_BuddyPress_Profile' ) ) {
298
  $to_user_id,
299
  'bp_gifts'
300
  );
301
-
302
- // Clean up
303
- unset( $this );
304
  }
305
 
306
  /**
105
  $activity_id,
106
  'bp_activity'
107
  );
 
 
 
108
  }
109
 
110
  /**
128
  $this->prefs['avatar']['creds'],
129
  $this->prefs['avatar']['log']
130
  );
 
 
 
131
  }
132
 
133
  /**
154
  $friend_user_id,
155
  array( 'ref_type' => 'user' )
156
  );
 
 
 
157
  }
158
 
159
  /**
180
  $friend_user_id,
181
  array( 'ref_type' => 'user' )
182
  );
 
 
 
183
  }
184
 
185
  /**
205
  $comment_id,
206
  'bp_comment'
207
  );
 
 
 
208
  }
209
 
210
  /**
228
  $activity_id,
229
  'bp_comment'
230
  );
 
 
 
231
  }
232
 
233
  /**
251
  $message->thread_id,
252
  'bp_message'
253
  );
 
 
 
254
  }
255
 
256
  /**
277
  $to_user_id,
278
  'bp_gifts'
279
  );
 
 
 
280
  }
281
 
282
  /**
addons/buddypress/myCRED-addon-buddypress.php CHANGED
@@ -18,7 +18,6 @@ define( 'myCRED_BP_HOOKS_DIR', myCRED_BP_DIR . 'hooks/' );
18
  require_once( myCRED_BP_HOOKS_DIR . 'bp-groups.php' );
19
  require_once( myCRED_BP_HOOKS_DIR . 'bp-profile.php' );
20
  require_once( myCRED_BP_HOOKS_DIR . 'bp-links.php' );
21
- require_once( myCRED_BP_HOOKS_DIR . 'bp-press.php' );
22
  require_once( myCRED_BP_HOOKS_DIR . 'bp-galleries.php' );
23
  /**
24
  * myCRED_BuddyPress class
@@ -65,30 +64,14 @@ if ( !class_exists( 'myCRED_BuddyPress' ) ) {
65
  * @version 1.0
66
  */
67
  public function module_init() {
68
- add_filter( 'mycred_setup_hooks', array( $this, 'register_hooks' ) );
69
- add_action( 'admin_bar_menu', array( $this, 'adjust_admin_bar' ), 110 );
70
- add_filter( 'mycred_post_type_excludes', array( $this, 'exclude_bb_post_types' ) );
71
 
72
  if ( $this->buddypress['balance_location'] == 'top' || $this->buddypress['balance_location'] == 'both' )
73
- add_action( 'bp_before_member_header_meta', array( $this, 'show_balance' ) );
74
 
75
  if ( $this->buddypress['balance_location'] == 'profile_tab' || $this->buddypress['balance_location'] == 'both' )
76
- add_action( 'bp_profile_field_item', array( $this, 'show_balance_profile' ) );
77
- }
78
-
79
- /**
80
- * Exclude Post Types
81
- * Used to exclude custom post types from being included under "Points for Publishing Content".
82
- * @since 0.1
83
- * @version 1.0
84
- */
85
- public function exclude_bb_post_types( $excludes ) {
86
- if ( class_exists( 'bbPress' ) ) {
87
- $excludes[] = 'topic';
88
- $excludes[] = 'reply';
89
- $excludes[] = 'forum';
90
- }
91
- return $excludes;
92
  }
93
 
94
  /**
@@ -126,8 +109,10 @@ if ( !class_exists( 'myCRED_BuddyPress' ) ) {
126
 
127
  $balance = $this->core->get_users_cred( $user_id ); ?>
128
 
129
- <tr id="mycred-users-balance">
130
- <td class="label"><?php
 
 
131
 
132
  // Balance label
133
  $template = $this->buddypress['balance_template'];
@@ -135,11 +120,13 @@ if ( !class_exists( 'myCRED_BuddyPress' ) ) {
135
  $template = str_replace( '%creds%', '', $template );
136
  $template = str_replace( '%rank%', '', $template );
137
  echo $this->core->template_tags_general( trim( $template ) ); ?></td>
138
- <td class="data">
139
  <?php echo $this->core->format_creds( $balance ); ?>
140
 
141
- </td>
142
- </tr>
 
 
143
  <?php
144
  }
145
 
@@ -330,14 +317,6 @@ if ( !class_exists( 'myCRED_BuddyPress' ) ) {
330
  'callback' => array( 'myCRED_BuddyPress_Gallery' )
331
  );
332
  }
333
-
334
- if ( class_exists( 'bbPress' ) ) {
335
- $installed['hook_bp_bbpress'] = array(
336
- 'title' => __( 'bbPress 2.0' ),
337
- 'description' => __( 'Awards %_plural% for bbPress actions.', 'mycred' ),
338
- 'callback' => array( 'myCRED_BuddyPress_bbPress' )
339
- );
340
- }
341
 
342
  return $installed;
343
  }
18
  require_once( myCRED_BP_HOOKS_DIR . 'bp-groups.php' );
19
  require_once( myCRED_BP_HOOKS_DIR . 'bp-profile.php' );
20
  require_once( myCRED_BP_HOOKS_DIR . 'bp-links.php' );
 
21
  require_once( myCRED_BP_HOOKS_DIR . 'bp-galleries.php' );
22
  /**
23
  * myCRED_BuddyPress class
64
  * @version 1.0
65
  */
66
  public function module_init() {
67
+ add_filter( 'mycred_setup_hooks', array( $this, 'register_hooks' ) );
68
+ add_action( 'admin_bar_menu', array( $this, 'adjust_admin_bar' ), 110 );
 
69
 
70
  if ( $this->buddypress['balance_location'] == 'top' || $this->buddypress['balance_location'] == 'both' )
71
+ add_action( 'bp_before_member_header_meta', array( $this, 'show_balance' ) );
72
 
73
  if ( $this->buddypress['balance_location'] == 'profile_tab' || $this->buddypress['balance_location'] == 'both' )
74
+ add_action( 'bp_after_profile_loop_content', array( $this, 'show_balance_profile' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  }
76
 
77
  /**
109
 
110
  $balance = $this->core->get_users_cred( $user_id ); ?>
111
 
112
+ <div class="bp-widget mycred-field">
113
+ <table class="profile-fields">
114
+ <tr id="mycred-users-balance">
115
+ <td class="label"><?php
116
 
117
  // Balance label
118
  $template = $this->buddypress['balance_template'];
120
  $template = str_replace( '%creds%', '', $template );
121
  $template = str_replace( '%rank%', '', $template );
122
  echo $this->core->template_tags_general( trim( $template ) ); ?></td>
123
+ <td class="data">
124
  <?php echo $this->core->format_creds( $balance ); ?>
125
 
126
+ </td>
127
+ </tr>
128
+ </table>
129
+ </div>
130
  <?php
131
  }
132
 
317
  'callback' => array( 'myCRED_BuddyPress_Gallery' )
318
  );
319
  }
 
 
 
 
 
 
 
 
320
 
321
  return $installed;
322
  }
addons/buy-creds/abstracts/mycred-abstract-payment-gateway.php CHANGED
@@ -381,13 +381,16 @@ if ( !class_exists( 'myCRED_Payment_Gateway' ) ) {
381
  /**
382
  * POST to data
383
  * @since 0.1
384
- * @version 1.1
385
  */
386
- public function POST_to_data() {
387
  $data = array();
388
  foreach ( $_POST as $key => $value ) {
389
  $data[$key] = stripslashes( $value );
390
  }
 
 
 
391
  return $data;
392
  }
393
 
381
  /**
382
  * POST to data
383
  * @since 0.1
384
+ * @version 1.2
385
  */
386
+ public function POST_to_data( $unset = false ) {
387
  $data = array();
388
  foreach ( $_POST as $key => $value ) {
389
  $data[$key] = stripslashes( $value );
390
  }
391
+ if ( $unset )
392
+ unset( $_POST );
393
+
394
  return $data;
395
  }
396
 
addons/gateway/carts/mycred-marketpress.php CHANGED
@@ -5,18 +5,24 @@ if ( !defined( 'WP_PLUGIN_DIR' ) ) exit;
5
  * @since 1.1
6
  * @version 1.0
7
  */
8
- if ( !class_exists( 'MP_Gateway_myCRED' ) && function_exists( 'mp_register_gateway_plugin' ) ) {
9
  /**
10
  * Locate the MarketPress base gateway file
11
  * @from MarketPress::init_vars()
12
  */
13
  $file = '/marketpress-includes/marketpress-gateways.php';
 
14
  if ( file_exists( WP_PLUGIN_DIR . '/wordpress-ecommerce' . $file ) )
15
  include_once( WP_PLUGIN_DIR . '/wordpress-ecommerce' . $file );
 
 
 
16
  elseif ( file_exists( WP_PLUGIN_DIR . $file ) )
17
  include_once( WP_PLUGIN_DIR . $file );
18
  elseif ( is_multisite() && file_exists( WPMU_PLUGIN_DIR . $file ) )
19
  include_once( WPMU_PLUGIN_DIR . $file );
 
 
20
 
21
  /**
22
  * myCRED Custom Gateway
@@ -378,6 +384,9 @@ if ( !class_exists( 'MP_Gateway_myCRED' ) && function_exists( 'mp_register_gatew
378
  return $settings;
379
  }
380
  }
 
 
 
381
  // Register Gateway
382
  mp_register_gateway_plugin( 'MP_Gateway_myCRED', 'mycred', 'myCRED' );
383
  }
5
  * @since 1.1
6
  * @version 1.0
7
  */
8
+ if ( !class_exists( 'MP_Gateway_myCRED' ) ) {
9
  /**
10
  * Locate the MarketPress base gateway file
11
  * @from MarketPress::init_vars()
12
  */
13
  $file = '/marketpress-includes/marketpress-gateways.php';
14
+ // Light
15
  if ( file_exists( WP_PLUGIN_DIR . '/wordpress-ecommerce' . $file ) )
16
  include_once( WP_PLUGIN_DIR . '/wordpress-ecommerce' . $file );
17
+ // Pro
18
+ elseif ( file_exists( WP_PLUGIN_DIR . '/marketpress' . $file ) )
19
+ include_once( WP_PLUGIN_DIR . '/marketpress' . $file );
20
  elseif ( file_exists( WP_PLUGIN_DIR . $file ) )
21
  include_once( WP_PLUGIN_DIR . $file );
22
  elseif ( is_multisite() && file_exists( WPMU_PLUGIN_DIR . $file ) )
23
  include_once( WPMU_PLUGIN_DIR . $file );
24
+ else
25
+ return;
26
 
27
  /**
28
  * myCRED Custom Gateway
384
  return $settings;
385
  }
386
  }
387
+ }
388
+
389
+ if ( function_exists( 'mp_register_gateway_plugin' ) ) {
390
  // Register Gateway
391
  mp_register_gateway_plugin( 'MP_Gateway_myCRED', 'mycred', 'myCRED' );
392
  }
addons/import/myCRED-addon-import.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Addon: Import
4
  * Addon URI: http://mycred.me/add-ons/import/
5
- * Version: 1.0
6
  * Description: With the Import add-on you can import CSV files, CubePoints or existing points under any custom user meta values.
7
  * Author: Gabriel S Merovingi
8
  * Author URI: http://www.merovingi.com
@@ -102,7 +102,7 @@ if ( !class_exists( 'myCRED_Import' ) ) {
102
  * Update Users
103
  * @param $data (array), required associative array of users and amounts to be added to their account.
104
  * @since 0.1
105
- * @version 1.0
106
  */
107
  public function update_users( $data = array(), $verify = true ) {
108
  // Prep
@@ -122,19 +122,20 @@ if ( !class_exists( 'myCRED_Import' ) ) {
122
  if ( isset( $_POST['precision'] ) && $_POST['precision'] != 0 )
123
  $precision = $_POST['precision'];
124
 
125
- $log_template = '';
126
- if ( isset( $_POST['log_template'] ) )
127
- $log_template = $_POST['log_template'];
128
-
129
  // Loop
130
  $imports = $skipped = 0;
131
  foreach ( $data as $row ) {
132
  // mycred_user and mycred_amount are two mandatory columns!
133
- if ( !isset( $row['mycred_user'] ) || empty( $row['mycred_user'] ) || !isset( $row['mycred_amount'] ) || empty( $row['mycred_amount'] ) ) {
 
 
 
 
134
  $skipped = $skipped+1;
135
  continue;
136
  }
137
 
 
138
  if ( $verify === true ) {
139
  // Get User (and with that confirm user exists)
140
  $user = get_user_by( $id_user_by, $row['mycred_user'] );
@@ -160,31 +161,29 @@ if ( !class_exists( 'myCRED_Import' ) ) {
160
  }
161
 
162
  // Amount (can not be zero)
163
- $cred = $this->core->format_number( $row['mycred_amount'] );
164
  if ( $cred == 0 ) {
165
  $skipped = $skipped+1;
166
  continue;
167
  }
168
 
169
  // If exchange rate is not 1 for 1
170
- if ( $this->core->format_number( $xrate ) != $this->core->format_number( 1 ) ) {
171
  // Cred = rate*amount
172
- $amount = $this->core->format_number( $xrate ) * $this->core->format_number( $row['mycred_amount'] );
173
  $cred = $this->core->round_value( $amount, $round, $precision );
174
  }
175
 
176
  // Adjust Balance
177
  $new_balance = $this->core->update_users_balance( $user_id, $cred );
178
 
179
- // Log (if requested with the import file having top priority)
180
- if ( ( isset( $row['mycred_log'] ) && !empty( $row['mycred_log'] ) ) || !empty( $log_template ) ) {
181
- if ( isset( $row['mycred_log'] ) )
182
- $template = sanitize_text_field( $row['mycred_log'] );
183
- else
184
- $template = sanitize_text_field( $log_template );
185
-
186
- if ( !empty( $template ) )
187
- $this->core->add_to_log( 'import', $user_id, $cred, $template );
188
  }
189
 
190
  $imports = $imports+1;
@@ -276,7 +275,7 @@ if ( !class_exists( 'myCRED_Import' ) ) {
276
  /**
277
  * Import CubePoints
278
  * @since 0.1
279
- * @version 1.0
280
  */
281
  public function import_cubepoints() {
282
  $delete = false;
@@ -305,7 +304,8 @@ if ( !class_exists( 'myCRED_Import' ) ) {
305
  foreach ( $search as $result ) {
306
  $data[] = array(
307
  'mycred_user' => $result->user_id,
308
- 'mycred_amount' => $result->meta_value
 
309
  );
310
  }
311
 
2
  /**
3
  * Addon: Import
4
  * Addon URI: http://mycred.me/add-ons/import/
5
+ * Version: 1.0.1
6
  * Description: With the Import add-on you can import CSV files, CubePoints or existing points under any custom user meta values.
7
  * Author: Gabriel S Merovingi
8
  * Author URI: http://www.merovingi.com
102
  * Update Users
103
  * @param $data (array), required associative array of users and amounts to be added to their account.
104
  * @since 0.1
105
+ * @version 1.1
106
  */
107
  public function update_users( $data = array(), $verify = true ) {
108
  // Prep
122
  if ( isset( $_POST['precision'] ) && $_POST['precision'] != 0 )
123
  $precision = $_POST['precision'];
124
 
 
 
 
 
125
  // Loop
126
  $imports = $skipped = 0;
127
  foreach ( $data as $row ) {
128
  // mycred_user and mycred_amount are two mandatory columns!
129
+ if ( !isset( $row['mycred_user'] ) || empty( $row['mycred_user'] ) ) {
130
+ $skipped = $skipped+1;
131
+ continue;
132
+ }
133
+ if ( !isset( $row['mycred_amount'] ) || empty( $row['mycred_amount'] ) ) {
134
  $skipped = $skipped+1;
135
  continue;
136
  }
137
 
138
+ // Verify User exist
139
  if ( $verify === true ) {
140
  // Get User (and with that confirm user exists)
141
  $user = get_user_by( $id_user_by, $row['mycred_user'] );
161
  }
162
 
163
  // Amount (can not be zero)
164
+ $cred = $this->core->number( $row['mycred_amount'] );
165
  if ( $cred == 0 ) {
166
  $skipped = $skipped+1;
167
  continue;
168
  }
169
 
170
  // If exchange rate is not 1 for 1
171
+ if ( $xrate != 1 ) {
172
  // Cred = rate*amount
173
+ $amount = $xrate * $row['mycred_amount'];
174
  $cred = $this->core->round_value( $amount, $round, $precision );
175
  }
176
 
177
  // Adjust Balance
178
  $new_balance = $this->core->update_users_balance( $user_id, $cred );
179
 
180
+ // First we check if the mycred_log column is used
181
+ if ( isset( $row['mycred_log'] ) && !empty( $row['mycred_log'] ) ) {
182
+ $this->core->add_to_log( 'import', $user_id, $cred, $row['mycred_log'] );
183
+ }
184
+ // Second we check if the log template is set
185
+ elseif ( isset( $_POST['log_template'] ) && !empty( $_POST['log_template'] ) ) {
186
+ $this->core->add_to_log( 'import', $user_id, $cred, sanitize_text_field( $_POST['log_template'] ) );
 
 
187
  }
188
 
189
  $imports = $imports+1;
275
  /**
276
  * Import CubePoints
277
  * @since 0.1
278
+ * @version 1.1
279
  */
280
  public function import_cubepoints() {
281
  $delete = false;
304
  foreach ( $search as $result ) {
305
  $data[] = array(
306
  'mycred_user' => $result->user_id,
307
+ 'mycred_amount' => $result->meta_value,
308
+ 'mycred_log' => ( isset( $_POST['log_template'] ) ) ? sanitize_text_field( $_POST['log_template'] ) : ''
309
  );
310
  }
311
 
addons/ranks/includes/mycred-rank-functions.php CHANGED
@@ -38,6 +38,9 @@ if ( !function_exists( 'mycred_get_rank' ) ) {
38
  * Retreaves the users current saved rank or if rank is missing
39
  * finds the appropriate rank and saves it.
40
  * @param $user_id (int) required user id to check
 
 
 
41
  * @uses mycred_find_users_rank()
42
  * @uses get_the_title()
43
  * @returns rank (string) or empty string on fail
@@ -45,12 +48,18 @@ if ( !function_exists( 'mycred_get_rank' ) ) {
45
  * @version 1.0
46
  */
47
  if ( !function_exists( 'mycred_get_users_rank' ) ) {
48
- function mycred_get_users_rank( $user_id = NULL ) {
 
49
  $rank_id = get_user_meta( $user_id, 'mycred_rank', true );
50
- if ( empty( $rank ) )
51
- return mycred_find_users_rank( $user_id, true );
52
- else
53
- return get_the_title( $rank_id );
 
 
 
 
 
54
  }
55
  }
56
  /**
@@ -64,10 +73,10 @@ if ( !function_exists( 'mycred_get_users_rank' ) ) {
64
  * @uses update_user_meta()
65
  * @returns empty (string) on failure or the users rank
66
  * @since 1.1
67
- * @version 1.0
68
  */
69
  if ( !function_exists( 'mycred_find_users_rank' ) ) {
70
- function mycred_find_users_rank( $user_id = NULL, $save = false ) {
71
  $mycred = mycred_get_settings();
72
 
73
  // Check for exclusion
@@ -79,6 +88,8 @@ if ( !function_exists( 'mycred_find_users_rank' ) ) {
79
  else
80
  $balance = $mycred->get_users_cred( $user_id );
81
 
 
 
82
  // Rank query arguments
83
  $args = array(
84
  'post_type' => 'mycred_rank', // rank type
@@ -138,6 +149,9 @@ if ( !function_exists( 'mycred_find_users_rank' ) ) {
138
  if ( $save )
139
  update_user_meta( $user_id, 'mycred_rank', $rank_id );
140
 
 
 
 
141
  // Reset & Return
142
  wp_reset_postdata();
143
  return $rank_title;
@@ -155,6 +169,7 @@ if ( !function_exists( 'mycred_find_users_rank' ) ) {
155
  if ( !function_exists( 'mycred_get_rank_id_from_title' ) ) {
156
  function mycred_get_rank_id_from_title( $title ) {
157
  $rank = mycred_get_rank( $title );
 
158
  return $rank->ID;
159
  }
160
  }
@@ -196,10 +211,7 @@ if ( !function_exists( 'mycred_get_ranks' ) ) {
196
  if ( $ranks->have_posts() ) {
197
  while ( $ranks->have_posts() ) {
198
  $ranks->the_post();
199
- $all_ranks[get_the_ID()] = array(
200
- 'title' => get_the_title(),
201
- 'slug' => isset( $ranks->post->post_name ) ? $ranks->post->post_name : ''
202
- );
203
  }
204
  }
205
 
@@ -220,39 +232,31 @@ if ( !function_exists( 'mycred_get_ranks' ) ) {
220
  * @version 1.0
221
  */
222
  if ( !function_exists( 'mycred_get_users_of_rank' ) ) {
223
- function mycred_get_users_of_rank( $rank, $number = NULL ) {
224
  if ( !is_numeric( $rank ) )
225
  $rank = mycred_get_rank_id_from_title( $rank );
226
 
227
  if ( $rank === NULL ) return '';
228
 
229
- $mycred = mycred_get_settings();
230
- $args = array(
231
- 'meta_key' => 'mycred_rank',
232
- 'meta_value' => $rank,
233
- 'order' => 'DESC',
234
- 'number' => $number,
235
- 'type' => 'mycred_default'
236
- );
237
-
238
  global $wpdb;
239
  $sql = "SELECT u.ID FROM $wpdb->users u INNER JOIN $wpdb->usermeta m ON (u.ID = m.user_id) INNER JOIN $wpdb->usermeta c ON (u.ID = c.user_id) WHERE 1=1 AND ( m.meta_key = %s AND m.meta_value = %d AND c.meta_key = %s ) ORDER BY c.meta_value+0";
240
 
241
  // Order
242
- if ( $args['order'] == 'ASC' || $args['order'] == 'DESC' )
243
- $sql .= ' ' . trim( $args['order'] );
244
  else
245
  $sql .= ' DESC';
246
 
247
  // Limit
248
- if ( $args['number'] !== NULL )
249
- $sql .= ' LIMIT 0,' . abs( $args['number'] );
250
 
251
  // Run query
252
- $users = $wpdb->get_results( $wpdb->prepare( $sql, $args['meta_key'], $args['meta_value'], $args['type'] ) );
253
 
254
  $rank_users = array();
255
  if ( $users ) {
 
256
  foreach ( $users as $user ) {
257
  // make sure user is not excluded
258
  if ( $mycred->exclude_user( $user->ID ) ) continue;
38
  * Retreaves the users current saved rank or if rank is missing
39
  * finds the appropriate rank and saves it.
40
  * @param $user_id (int) required user id to check
41
+ * @param $return (string) post detail to return, defaults to post_title
42
+ * @param $logo_size (string) if $return is set to 'logo', the size of the logo to return
43
+ * @param $attr (array) if $return is set to 'logo', optional logo image attributes
44
  * @uses mycred_find_users_rank()
45
  * @uses get_the_title()
46
  * @returns rank (string) or empty string on fail
48
  * @version 1.0
49
  */
50
  if ( !function_exists( 'mycred_get_users_rank' ) ) {
51
+ function mycred_get_users_rank( $user_id = NULL, $return = 'post_title', $logo_size = 'post-thumbnail', $attr = NULL ) {
52
+ if ( $user_id === NULL ) return '';
53
  $rank_id = get_user_meta( $user_id, 'mycred_rank', true );
54
+ if ( empty( $rank ) ) {
55
+ mycred_find_users_rank( $user_id, true );
56
+ $rank_id = get_user_meta( $user_id, 'mycred_rank', true );
57
+ }
58
+
59
+ if ( $return == 'logo' )
60
+ return mycred_get_rank_logo( $rank_id, $logo_size, $attr );
61
+
62
+ return get_post( $rank_id )->$return;
63
  }
64
  }
65
  /**
73
  * @uses update_user_meta()
74
  * @returns empty (string) on failure or the users rank
75
  * @since 1.1
76
+ * @version 1.1
77
  */
78
  if ( !function_exists( 'mycred_find_users_rank' ) ) {
79
+ function mycred_find_users_rank( $user_id = NULL, $save = false, $amount = 0 ) {
80
  $mycred = mycred_get_settings();
81
 
82
  // Check for exclusion
88
  else
89
  $balance = $mycred->get_users_cred( $user_id );
90
 
91
+ // The new balance before it is saved
92
+ $balance = $balance+$amount;
93
  // Rank query arguments
94
  $args = array(
95
  'post_type' => 'mycred_rank', // rank type
149
  if ( $save )
150
  update_user_meta( $user_id, 'mycred_rank', $rank_id );
151
 
152
+ // Let others play
153
+ do_action( 'mycred_find_users_rank', $user_id, $rank_id );
154
+
155
  // Reset & Return
156
  wp_reset_postdata();
157
  return $rank_title;
169
  if ( !function_exists( 'mycred_get_rank_id_from_title' ) ) {
170
  function mycred_get_rank_id_from_title( $title ) {
171
  $rank = mycred_get_rank( $title );
172
+ if ( $rank === NULL || empty( $rank ) ) return '';
173
  return $rank->ID;
174
  }
175
  }
211
  if ( $ranks->have_posts() ) {
212
  while ( $ranks->have_posts() ) {
213
  $ranks->the_post();
214
+ $all_ranks[get_the_ID()] = $ranks->post;
 
 
 
215
  }
216
  }
217
 
232
  * @version 1.0
233
  */
234
  if ( !function_exists( 'mycred_get_users_of_rank' ) ) {
235
+ function mycred_get_users_of_rank( $rank, $number = NULL, $order = 'DESC' ) {
236
  if ( !is_numeric( $rank ) )
237
  $rank = mycred_get_rank_id_from_title( $rank );
238
 
239
  if ( $rank === NULL ) return '';
240
 
 
 
 
 
 
 
 
 
 
241
  global $wpdb;
242
  $sql = "SELECT u.ID FROM $wpdb->users u INNER JOIN $wpdb->usermeta m ON (u.ID = m.user_id) INNER JOIN $wpdb->usermeta c ON (u.ID = c.user_id) WHERE 1=1 AND ( m.meta_key = %s AND m.meta_value = %d AND c.meta_key = %s ) ORDER BY c.meta_value+0";
243
 
244
  // Order
245
+ if ( $order == 'ASC' || $order == 'DESC' )
246
+ $sql .= ' ' . trim( $order );
247
  else
248
  $sql .= ' DESC';
249
 
250
  // Limit
251
+ if ( $number !== NULL )
252
+ $sql .= ' LIMIT 0,' . abs( $number );
253
 
254
  // Run query
255
+ $users = $wpdb->get_results( $wpdb->prepare( $sql, 'mycred_rank', $rank, 'mycred_default' ) );
256
 
257
  $rank_users = array();
258
  if ( $users ) {
259
+ $mycred = mycred_get_settings();
260
  foreach ( $users as $user ) {
261
  // make sure user is not excluded
262
  if ( $mycred->exclude_user( $user->ID ) ) continue;
addons/ranks/includes/mycred-rank-shortcodes.php CHANGED
@@ -53,6 +53,7 @@ if ( !function_exists( 'mycred_render_users_of_rank' ) ) {
53
  'login' => '',
54
  'number' => NULL,
55
  'wrap' => 'div',
 
56
  'nothing' => __( 'No users found with this rank', 'mycred' )
57
  ), $atts ) );
58
 
@@ -72,7 +73,7 @@ if ( !function_exists( 'mycred_render_users_of_rank' ) ) {
72
  $rank = get_post( $rank_id );
73
  // Make sure rank exist
74
  if ( $rank !== NULL ) {
75
- if ( $row_template === NULL )
76
  $row_template = '<p class="user-row">%user_profile_link% with %balance% %_plural%</p>';
77
 
78
  // Let others play
@@ -80,15 +81,31 @@ if ( !function_exists( 'mycred_render_users_of_rank' ) ) {
80
  // Get users of this rank if there are any
81
  $users = mycred_get_users_of_rank( $rank_id, $number );
82
  if ( !empty( $users ) ) {
83
- $output .= '<' . $wrap . ' class="mycred-users-of-rank-wrapper">';
 
 
 
 
84
  foreach ( $users as $user_id ) {
85
  $output .= $mycred->template_tags_user( $row_template, $user_id );
86
  }
87
- $output .= '</' . $wrap . '>' . "\n";
 
 
 
88
  }
89
  // No users found
90
  else {
91
- $output .= '<p>' . $nothing . '</p>' . "\n";
 
 
 
 
 
 
 
 
 
92
  }
93
  }
94
 
@@ -122,7 +139,7 @@ if ( !function_exists( 'mycred_render_users_of_all_ranks' ) ) {
122
  if ( !empty( $login ) && !is_user_logged_in() ) return $mycred->template_tags_general( $login );
123
 
124
  // Default template
125
- if ( $row_template === NULL )
126
  $row_template = '<p class="mycred-rank-user-row">%user_profile_link% with %balance% %_plural%</p>';
127
 
128
  // Let others play
@@ -136,9 +153,9 @@ if ( !function_exists( 'mycred_render_users_of_all_ranks' ) ) {
136
  // Loop though all ranks
137
  foreach ( $all_ranks as $rank_id => $rank ) {
138
  // Prep Slug
139
- $slug = $rank['slug'];
140
  if ( empty( $slug ) )
141
- $slug = str_replace( ' ', '-', strtolower( $rank['title'] ) );
142
 
143
  // Rank wrapper
144
  $output .= '<div class="mycred-rank rank-' . $slug . ' rank-' . $rank_id . '"><h2>';
@@ -148,7 +165,7 @@ if ( !function_exists( 'mycred_render_users_of_all_ranks' ) ) {
148
  $output .= mycred_get_rank_logo( $rank_id, $logo_size );
149
 
150
  // Rank title
151
- $output .= $rank['title'] . '</h2>' . "\n";
152
 
153
  $attr = array(
154
  'rank_id' => $rank_id,
@@ -166,4 +183,45 @@ if ( !function_exists( 'mycred_render_users_of_all_ranks' ) ) {
166
  return $output;
167
  }
168
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
169
  ?>
53
  'login' => '',
54
  'number' => NULL,
55
  'wrap' => 'div',
56
+ 'col' => 1,
57
  'nothing' => __( 'No users found with this rank', 'mycred' )
58
  ), $atts ) );
59
 
73
  $rank = get_post( $rank_id );
74
  // Make sure rank exist
75
  if ( $rank !== NULL ) {
76
+ if ( $row_template === NULL || empty( $row_template ) )
77
  $row_template = '<p class="user-row">%user_profile_link% with %balance% %_plural%</p>';
78
 
79
  // Let others play
81
  // Get users of this rank if there are any
82
  $users = mycred_get_users_of_rank( $rank_id, $number );
83
  if ( !empty( $users ) ) {
84
+ // Add support for table
85
+ if ( $wrap != 'table' && !empty( $wrap ) )
86
+ $output .= '<' . $wrap . ' class="mycred-users-of-rank-wrapper">';
87
+
88
+ // Loop
89
  foreach ( $users as $user_id ) {
90
  $output .= $mycred->template_tags_user( $row_template, $user_id );
91
  }
92
+
93
+ // Add support for table
94
+ if ( $wrap != 'table' && !empty( $wrap ) )
95
+ $output .= '</' . $wrap . '>' . "\n";
96
  }
97
  // No users found
98
  else {
99
+ // Add support for table
100
+ if ( $wrap == 'table' ) {
101
+ $output .= '<tr><td';
102
+ if ( $col > 1 ) $output .= ' colspan="' . $col . '"';
103
+ $output .= '>' . $nothing . '</td></tr>';
104
+ }
105
+ else {
106
+ if ( empty( $wrap ) ) $wrap = 'p';
107
+ $output .= '<' . $wrap . '>' . $nothing . '</' . $wrap . '>' . "\n";
108
+ }
109
  }
110
  }
111
 
139
  if ( !empty( $login ) && !is_user_logged_in() ) return $mycred->template_tags_general( $login );
140
 
141
  // Default template
142
+ if ( $row_template === NULL || empty( $row_template ) )
143
  $row_template = '<p class="mycred-rank-user-row">%user_profile_link% with %balance% %_plural%</p>';
144
 
145
  // Let others play
153
  // Loop though all ranks
154
  foreach ( $all_ranks as $rank_id => $rank ) {
155
  // Prep Slug
156
+ $slug = $rank->post_name;
157
  if ( empty( $slug ) )
158
+ $slug = str_replace( ' ', '-', strtolower( $rank->post_title ) );
159
 
160
  // Rank wrapper
161
  $output .= '<div class="mycred-rank rank-' . $slug . ' rank-' . $rank_id . '"><h2>';
165
  $output .= mycred_get_rank_logo( $rank_id, $logo_size );
166
 
167
  // Rank title
168
+ $output .= $rank->post_title . '</h2>' . "\n";
169
 
170
  $attr = array(
171
  'rank_id' => $rank_id,
183
  return $output;
184
  }
185
  }
186
+
187
+ /**
188
+ * myCRED Shortcode: mycred_list_ranks
189
+ * Returns a list of ranks with minimum and maximum point requirements.
190
+ * @see http://mycred.me/shortcodes/mycred_list_ranks/
191
+ * @since 1.1.1
192
+ * @version 1.0
193
+ */
194
+ if ( !function_exists( 'mycred_render_rank_list' ) ) {
195
+ function mycred_render_rank_list( $atts, $content = NULL )
196
+ {
197
+ extract( shortcode_atts( array(
198
+ 'order' => 'DESC',
199
+ 'wrap' => 'div'
200
+ ), $atts ) );
201
+
202
+ if ( $content === NULL || empty( $content ) )
203
+ $content = '<p>%rank% <span class="min">%min%</span> - <span class="max">%max%</span></p>';
204
+
205
+ $mycred = mycred_get_settings();
206
+
207
+ $output = '';
208
+ $all_ranks = mycred_get_ranks( 'publish', '-1', $order );
209
+ if ( !empty( $all_ranks ) ) {
210
+ $output .= '<' . $wrap . ' class="mycred-rank-list">';
211
+ $content = apply_filters( 'mycred_rank_list', $content, $atts, $mycred );
212
+ foreach ( $all_ranks as $rank_id => $rank ) {
213
+ $row = str_replace( '%rank%', $rank->post_title, $content );
214
+ $row = str_replace( '%rank_logo%', mycred_get_rank_logo( $rank_id ), $row );
215
+ $row = str_replace( '%min%', get_post_meta( $rank_id, 'mycred_rank_min', true ), $row );
216
+ $row = str_replace( '%max%', get_post_meta( $rank_id, 'mycred_rank_max', true ), $row );
217
+ $row = str_replace( '%count%', count( mycred_get_users_of_rank( $rank_id ) ), $row );
218
+ $row = $mycred->template_tags_general( $row );
219
+ $output .= $row . "\n";
220
+ }
221
+ $output .= '</' . $wrap . '>';
222
+ }
223
+
224
+ return $output;
225
+ }
226
+ }
227
  ?>
addons/ranks/myCRED-addon-ranks.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Addon: Ranks
4
  * Addon URI: http://mycred.me/add-ons/email-notices/
5
- * Version: 1.0
6
  * Description: Create ranks for users reaching a certain number of %_plural% with the option to add logos for each rank.
7
  * Author: Gabriel S Merovingi
8
  * Author URI: http://www.merovingi.com
@@ -19,7 +19,7 @@ include_once( myCRED_RANKS_DIR . 'includes/mycred-rank-shortcodes.php' );
19
  * points, ranks are titles that can be given to users when their reach a certain
20
  * amount.
21
  * @since 1.1
22
- * @version 1.0
23
  */
24
  if ( !class_exists( 'myCRED_Ranks' ) ) {
25
  class myCRED_Ranks extends myCRED_Module {
@@ -33,12 +33,32 @@ if ( !class_exists( 'myCRED_Ranks' ) ) {
33
  'defaults' => array(
34
  'public' => 0,
35
  'slug' => 'mycred_rank',
36
- 'bb_location' => 'top'
 
 
 
 
 
 
 
 
37
  ),
38
  'register' => false,
39
  'add_to_core' => true
40
  ) );
41
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  add_action( 'mycred_help', array( $this, 'help' ), 10, 2 );
43
  add_action( 'mycred_parse_tags_user', array( $this, 'parse_rank' ), 10, 3 );
44
  }
@@ -46,16 +66,20 @@ if ( !class_exists( 'myCRED_Ranks' ) ) {
46
  /**
47
  * Hook into Init
48
  * @since 1.1
49
- * @version 1.0
50
  */
51
  public function module_init() {
52
  $this->register_post_type();
53
  if ( !mycred_have_ranks() )
54
  $this->add_default_rank();
55
 
 
56
  add_action( 'mycred_admin_enqueue', array( $this, 'enqueue_scripts' ) );
57
- add_action( 'transition_post_status', array( $this, 'publishing_content' ), 10, 3 );
58
- add_filter( 'mycred_add', array( $this, 'check_for_rank' ), 10, 3 );
 
 
 
59
 
60
  // BuddyPress
61
  if ( function_exists( 'bp_displayed_user_id' ) && isset( $this->rank['bb_location'] ) && !empty( $this->rank['bb_location'] ) ) {
@@ -70,6 +94,7 @@ if ( !class_exists( 'myCRED_Ranks' ) ) {
70
  add_shortcode( 'mycred_my_rank', 'mycred_render_my_rank' );
71
  add_shortcode( 'mycred_users_of_rank', 'mycred_render_users_of_rank' );
72
  add_shortcode( 'mycred_users_of_all_ranks', 'mycred_render_users_of_all_ranks' );
 
73
  }
74
 
75
  /**
@@ -80,6 +105,9 @@ if ( !class_exists( 'myCRED_Ranks' ) ) {
80
  public function module_admin_init() {
81
  add_filter( 'manage_mycred_rank_posts_columns', array( $this, 'adjust_column_headers' ) );
82
  add_action( 'manage_mycred_rank_posts_custom_column', array( $this, 'adjust_column_content' ), 10, 2 );
 
 
 
83
 
84
  add_filter( 'post_row_actions', array( $this, 'adjust_row_actions' ), 10, 2 );
85
 
@@ -110,7 +138,7 @@ if ( !class_exists( 'myCRED_Ranks' ) ) {
110
  /**
111
  * Register Rank Post Type
112
  * @since 1.1
113
- * @version 1.0
114
  */
115
  public function register_post_type() {
116
  $labels = array(
@@ -128,68 +156,125 @@ if ( !class_exists( 'myCRED_Ranks' ) ) {
128
  'parent_item_colon' => '',
129
  'menu_name' => __( 'Ranks', 'mycred' )
130
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
  $args = array(
132
  'labels' => $labels,
133
  'public' => (bool) $this->rank['public'],
134
  'publicly_queryable' => (bool) $this->rank['public'],
 
135
  'show_ui' => true,
136
  'show_in_menu' => 'myCRED',
137
  'capability_type' => 'page',
138
- 'supports' => array( 'title', 'thumbnail' )
139
  );
140
 
141
- if ( $this->rank['public'] ) {
 
142
  $args['rewrite'] = array( 'slug' => $this->rank['slug'] );
143
  }
144
- register_post_type( 'mycred_rank', $args );
145
  }
146
 
147
  /**
148
- * Find Users Ranks
149
- * When a rank is published we run though all users to allowcate them to
150
- * the appropriate rank.
151
  * @since 1.1
152
  * @version 1.0
153
  */
154
- public function publishing_content( $new_status, $old_status, $post ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
155
  // Only ranks please
156
  if ( $post->post_type != 'mycred_rank' ) return;
157
 
158
- // Check for ranks that are getting published
159
  $status = apply_filters( 'mycred_publish_hook_old', array( 'new', 'auto-draft', 'draft', 'private', 'pending', 'scheduled' ) );
160
  if ( in_array( $old_status, $status ) && $new_status == 'publish' ) {
161
- // Run though all users and find their rank
162
- $mycred = mycred_get_settings();
163
- $args = array();
 
 
 
 
164
 
165
- // In case we have an exclude list
166
- if ( isset( $mycred->exclude['list'] ) && !empty( $mycred->exclude['list'] ) )
167
- $args['exclude'] = explode( ',', $mycred->exclude['list'] );
 
 
 
 
 
 
 
 
 
 
 
168
 
169
- $users = get_users( $args );
170
- $rank_users = array();
171
- if ( $users ) {
172
- foreach ( $users as $user ) {
173
- // The above exclude list will not take into account
174
- // if admins are excluded. For this reason we need to run
175
- // this check again to avoid including them in this list.
176
- if ( $mycred->exclude_user( $user->ID ) ) continue;
177
- // Find users rank
178
- mycred_find_users_rank( $user->ID, true );
179
- }
180
  }
181
  }
182
  }
183
 
184
  /**
185
- * Check For Rank
186
- * Each time a users balance changes we check if this effects their ranking.
187
- * @since 1.1
188
  * @version 1.0
189
  */
190
- public function check_for_rank( $reply, $request, $mycred ) {
191
- mycred_find_users_rank( $request['user_id'], true );
192
- return $reply;
 
 
 
 
 
 
 
193
  }
194
 
195
  /**
@@ -330,7 +415,29 @@ if ( !class_exists( 'myCRED_Ranks' ) ) {
330
  }
331
 
332
  /**
333
- * Adjust Column Header
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
334
  * @since 1.1
335
  * @version 1.0
336
  */
@@ -349,7 +456,7 @@ if ( !class_exists( 'myCRED_Ranks' ) ) {
349
  }
350
 
351
  /**
352
- * Adjust Column Content
353
  * @since 1.1
354
  * @version 1.0
355
  */
@@ -443,12 +550,12 @@ if ( !class_exists( 'myCRED_Ranks' ) ) {
443
 
444
  $all = mycred_get_ranks();
445
  if ( !empty( $all ) ) {
446
- foreach ( $all as $rank_id => $rank_title ) {
447
  $_min = get_post_meta( $rank_id, 'mycred_rank_min', true );
448
  if ( empty( $_min ) && (int) $_min !== 0 ) $_min = __( 'Not Set', 'mycred' );
449
  $_max = get_post_meta( $rank_id, 'mycred_rank_max', true );
450
  if ( empty( $_max ) ) $_max = __( 'Not Set', 'mycred' );
451
- echo '<p><strong style="display:inline-block;width:20%;">' . $rank_title . '</strong> ' . $_min . ' - ' . $_max . '</p>';
452
  }
453
  }
454
  else {
@@ -485,38 +592,71 @@ if ( !class_exists( 'myCRED_Ranks' ) ) {
485
 
486
  // Maximum can not be empty
487
  if ( empty( $_POST['mycred_rank']['max'] ) )
488
- $max = 9999999;
489
  else
490
  $max = trim( $_POST['mycred_rank']['max'] );
491
 
492
  update_post_meta( $post_id, 'mycred_rank_min', $min );
493
  update_post_meta( $post_id, 'mycred_rank_max', $max );
 
 
 
494
  }
495
 
496
  /**
497
  * Add to General Settings
498
  * @since 1.1
499
- * @version 1.0
500
  */
501
  public function after_general_settings() { ?>
502
 
503
  <h4 style="color:#BBD865;"><?php _e( 'Ranks', 'mycred' ); ?></h4>
504
  <div class="body" style="display:none;">
 
 
 
 
 
 
 
 
 
 
 
 
 
505
  <label class="subheader" for="<?php echo $this->field_id( 'public' ); ?>"><?php _e( 'Public', 'mycred' ); ?></label>
506
- <ol id="myCRED-email-notice-allow-filters">
507
  <li>
508
  <input type="checkbox" name="<?php echo $this->field_name( 'public' ); ?>" id="<?php echo $this->field_id( 'public' ); ?>" <?php checked( $this->rank['public'], 1 ); ?> value="1" />
509
  <label for="<?php echo $this->field_id( 'public' ); ?>"><?php _e( 'If you want to create a template archive for each rank, you must select to have ranks public. Defaults to disabled.', 'mycred' ); ?></label>
510
  </li>
511
- <li class="empty">&nbsp;</li>
 
 
512
  <li>
513
- <label for="<?php echo $this->field_id( 'slug' ); ?>"><?php _e( 'Rank Post Type URL Slug', 'mycred' ); ?></label>
514
  <div class="h2"><?php bloginfo( 'url' ); ?>/ <input type="text" name="<?php echo $this->field_name( 'slug' ); ?>" id="<?php echo $this->field_id( 'slug' ); ?>" value="<?php echo $this->rank['slug']; ?>" size="20" />/</div>
515
- <span class="description"><?php _e( 'If you are using a custom permalink structure and you make ranks public or change the slug, you will need to visit your permalink settings page and click "Save Changes" to flush your re-write rules! Otherwise you will get a 404 error message when trying to view a rank archive page.', 'mycred' ); ?></span>
516
  </li>
517
- <li class="empty">&nbsp;</li>
 
 
518
  <li>
519
- <p><?php echo sprintf( __( 'For more information on Templates for Custom Post Types visit the <a href="%s">WordPress Codex</a>.', 'mycred' ), 'http://codex.wordpress.org/Post_Types#Custom_Post_Types' ); ?></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
520
  </li>
521
  </ol>
522
  <?php
@@ -533,7 +673,7 @@ if ( !class_exists( 'myCRED_Ranks' ) ) {
533
  ); ?>
534
 
535
  <label class="subheader" for="<?php echo $this->field_id( 'bb_location' ); ?>"><?php _e( 'Rank in BuddyPress', 'mycred' ); ?></label>
536
- <ol id="myCRED-email-notice-buddypress-location">
537
  <li>
538
  <select name="<?php echo $this->field_name( 'bb_location' ); ?>" id="<?php echo $this->field_id( 'bb_location' ); ?>">
539
  <?php
@@ -560,11 +700,18 @@ if ( !class_exists( 'myCRED_Ranks' ) ) {
560
  /**
561
  * Save Settings
562
  * @since 1.1
563
- * @version 1.0
564
  */
565
  public function sanitize_extra_settings( $new_data, $data, $core ) {
 
 
 
 
 
 
566
  $new_data['rank']['public'] = ( isset( $data['rank']['public'] ) ) ? true : false;
567
  $new_data['rank']['slug'] = sanitize_text_field( $data['rank']['slug'] );
 
568
  $new_data['rank']['bb_location'] = sanitize_text_field( $data['rank']['bb_location'] );
569
  return $new_data;
570
  }
2
  /**
3
  * Addon: Ranks
4
  * Addon URI: http://mycred.me/add-ons/email-notices/
5
+ * Version: 1.0.1
6
  * Description: Create ranks for users reaching a certain number of %_plural% with the option to add logos for each rank.
7
  * Author: Gabriel S Merovingi
8
  * Author URI: http://www.merovingi.com
19
  * points, ranks are titles that can be given to users when their reach a certain
20
  * amount.
21
  * @since 1.1
22
+ * @version 1.0.1
23
  */
24
  if ( !class_exists( 'myCRED_Ranks' ) ) {
25
  class myCRED_Ranks extends myCRED_Module {
33
  'defaults' => array(
34
  'public' => 0,
35
  'slug' => 'mycred_rank',
36
+ 'bb_location' => 'top',
37
+ 'order' => 'ASC',
38
+ 'support' => array(
39
+ 'content' => 0,
40
+ 'excerpt' => 0,
41
+ 'comments' => 0,
42
+ 'page-attributes' => 0,
43
+ 'custom-fields' => 0
44
+ )
45
  ),
46
  'register' => false,
47
  'add_to_core' => true
48
  ) );
49
 
50
+ if ( !isset( $this->rank['order'] ) ) {
51
+ $this->rank['order'] = 'ASC';
52
+ }
53
+ if ( !isset( $this->rank['support'] ) )
54
+ $this->rank['support'] = array(
55
+ 'content' => 0,
56
+ 'excerpt' => 0,
57
+ 'comments' => 0,
58
+ 'page-attributes' => 0,
59
+ 'custom-fields' => 0
60
+ );
61
+
62
  add_action( 'mycred_help', array( $this, 'help' ), 10, 2 );
63
  add_action( 'mycred_parse_tags_user', array( $this, 'parse_rank' ), 10, 3 );
64
  }
66
  /**
67
  * Hook into Init
68
  * @since 1.1
69
+ * @version 1.1
70
  */
71
  public function module_init() {
72
  $this->register_post_type();
73
  if ( !mycred_have_ranks() )
74
  $this->add_default_rank();
75
 
76
+ add_filter( 'pre_get_posts', array( $this, 'adjust_wp_query' ), 20 );
77
  add_action( 'mycred_admin_enqueue', array( $this, 'enqueue_scripts' ) );
78
+
79
+ // Instances to update ranks
80
+ add_action( 'transition_post_status', array( $this, 'post_status_change' ), 99, 3 );
81
+ add_filter( 'mycred_add', array( $this, 'balance_adjustments' ), 99, 3 );
82
+ add_action( 'user_register', array( $this, 'registration' ), 999 );
83
 
84
  // BuddyPress
85
  if ( function_exists( 'bp_displayed_user_id' ) && isset( $this->rank['bb_location'] ) && !empty( $this->rank['bb_location'] ) ) {
94
  add_shortcode( 'mycred_my_rank', 'mycred_render_my_rank' );
95
  add_shortcode( 'mycred_users_of_rank', 'mycred_render_users_of_rank' );
96
  add_shortcode( 'mycred_users_of_all_ranks', 'mycred_render_users_of_all_ranks' );
97
+ add_shortcode( 'mycred_list_ranks', 'mycred_render_rank_list' );
98
  }
99
 
100
  /**
105
  public function module_admin_init() {
106
  add_filter( 'manage_mycred_rank_posts_columns', array( $this, 'adjust_column_headers' ) );
107
  add_action( 'manage_mycred_rank_posts_custom_column', array( $this, 'adjust_column_content' ), 10, 2 );
108
+
109
+ add_filter( 'manage_users_columns', array( $this, 'custom_user_column' ) );
110
+ add_action( 'manage_users_custom_column', array( $this, 'custom_user_column_content' ), 10, 3 );
111
 
112
  add_filter( 'post_row_actions', array( $this, 'adjust_row_actions' ), 10, 2 );
113
 
138
  /**
139
  * Register Rank Post Type
140
  * @since 1.1
141
+ * @version 1.1
142
  */
143
  public function register_post_type() {
144
  $labels = array(
156
  'parent_item_colon' => '',
157
  'menu_name' => __( 'Ranks', 'mycred' )
158
  );
159
+
160
+ // Support
161
+ $supports = array( 'title', 'thumbnail' );
162
+ if ( isset( $this->rank['support']['content'] ) && $this->rank['support']['content'] )
163
+ $supports[] = 'editor';
164
+ if ( isset( $this->rank['support']['excerpt'] ) && $this->rank['support']['excerpt'] )
165
+ $supports[] = 'excerpts';
166
+ if ( isset( $this->rank['support']['comments'] ) && $this->rank['support']['comments'] )
167
+ $supports[] = 'comments';
168
+ if ( isset( $this->rank['support']['page-attributes'] ) && $this->rank['support']['page-attributes'] )
169
+ $supports[] = 'page-attributes';
170
+ if ( isset( $this->rank['support']['custom-fields'] ) && $this->rank['support']['custom-fields'] )
171
+ $supports[] = 'custom-fields';
172
+
173
  $args = array(
174
  'labels' => $labels,
175
  'public' => (bool) $this->rank['public'],
176
  'publicly_queryable' => (bool) $this->rank['public'],
177
+ 'has_archive' => (bool) $this->rank['public'],
178
  'show_ui' => true,
179
  'show_in_menu' => 'myCRED',
180
  'capability_type' => 'page',
181
+ 'supports' => $supports
182
  );
183
 
184
+ // Rewrite
185
+ if ( $this->rank['public'] && !empty( $this->rank['slug'] ) ) {
186
  $args['rewrite'] = array( 'slug' => $this->rank['slug'] );
187
  }
188
+ register_post_type( 'mycred_rank', apply_filters( 'mycred_register_ranks', $args ) );
189
  }
190
 
191
  /**
192
+ * Registration
193
+ * Check what rank this user should have
 
194
  * @since 1.1
195
  * @version 1.0
196
  */
197
+ public function registration( $user_id ) {
198
+ mycred_find_users_rank( $user_id, true );
199
+ }
200
+
201
+ /**
202
+ * Balance Adjustment
203
+ * Check if users rank should change.
204
+ * @since 1.1
205
+ * @version 1.1
206
+ */
207
+ public function balance_adjustments( $reply, $request, $mycred ) {
208
+ mycred_find_users_rank( $request['user_id'], true, $request['amount'] );
209
+ return $reply;
210
+ }
211
+
212
+ /**
213
+ * Publishing Content
214
+ * Check if users rank should change.
215
+ * @since 1.1
216
+ * @version 1.0
217
+ */
218
+ public function post_status_change( $new_status, $old_status, $post ) {
219
  // Only ranks please
220
  if ( $post->post_type != 'mycred_rank' ) return;
221
 
222
+ // Publishing rank
223
  $status = apply_filters( 'mycred_publish_hook_old', array( 'new', 'auto-draft', 'draft', 'private', 'pending', 'scheduled' ) );
224
  if ( in_array( $old_status, $status ) && $new_status == 'publish' ) {
225
+ $this->assign_ranks();
226
+ }
227
+ // Trashing of rank
228
+ elseif ( $old_status == 'publish' && $new_status == 'trash' ) {
229
+ $this->assign_ranks();
230
+ }
231
+ }
232
 
233
+ /**
234
+ * Assign Ranks
235
+ * Runs though all registered members and assigns ranks
236
+ * @since 1.1.1
237
+ * @version 1.0
238
+ */
239
+ public function assign_ranks() {
240
+ // Run though all users and find their rank
241
+ $mycred = mycred_get_settings();
242
+ $args = array();
243
+
244
+ // In case we have an exclude list
245
+ if ( isset( $mycred->exclude['list'] ) && !empty( $mycred->exclude['list'] ) )
246
+ $args['exclude'] = explode( ',', $mycred->exclude['list'] );
247
 
248
+ $users = get_users( $args );
249
+ $rank_users = array();
250
+ if ( $users ) {
251
+ foreach ( $users as $user ) {
252
+ // The above exclude list will not take into account
253
+ // if admins are excluded. For this reason we need to run
254
+ // this check again to avoid including them in this list.
255
+ if ( $mycred->exclude_user( $user->ID ) ) continue;
256
+ // Find users rank
257
+ mycred_find_users_rank( $user->ID, true );
 
258
  }
259
  }
260
  }
261
 
262
  /**
263
+ * Adjust Rank Sort Order
264
+ * Adjusts the wp query when viewing ranks to order by the min. point requirement.
265
+ * @since 1.1.1
266
  * @version 1.0
267
  */
268
+ public function adjust_wp_query( $query ) {
269
+ if ( isset( $query->query['post_type'] ) && $query->is_main_query() && $query->query['post_type'] == 'mycred_rank' ) {
270
+ $query->set( 'meta_key', 'mycred_rank_min' );
271
+ $query->set( 'orderby', 'meta_value_num' );
272
+
273
+ if ( !isset( $this->rank['order'] ) ) $this->rank['order'] = 'ASC';
274
+ $query->set( 'order', $this->rank['order'] );
275
+ }
276
+
277
+ return $query;
278
  }
279
 
280
  /**
415
  }
416
 
417
  /**
418
+ * Customize Users Column Headers
419
+ * @since 1.1.1
420
+ * @version 1.0
421
+ */
422
+ public function custom_user_column( $columns ) {
423
+ $columns['mycred-rank'] = __( 'Rank', 'mycred' );
424
+ return $columns;
425
+ }
426
+
427
+ /**
428
+ * Customize User Columns Content
429
+ * @filter 'mycred_user_row_actions'
430
+ * @since 1.1.1
431
+ * @version 1.0
432
+ */
433
+ public function custom_user_column_content( $value, $column_name, $user_id ) {
434
+ if ( 'mycred-rank' != $column_name ) return $value;
435
+
436
+ return mycred_get_users_rank( $user_id );
437
+ }
438
+
439
+ /**
440
+ * Adjust Rank Column Header
441
  * @since 1.1
442
  * @version 1.0
443
  */
456
  }
457
 
458
  /**
459
+ * Adjust Rank Column Content
460
  * @since 1.1
461
  * @version 1.0
462
  */
550
 
551
  $all = mycred_get_ranks();
552
  if ( !empty( $all ) ) {
553
+ foreach ( $all as $rank_id => $rank ) {
554
  $_min = get_post_meta( $rank_id, 'mycred_rank_min', true );
555
  if ( empty( $_min ) && (int) $_min !== 0 ) $_min = __( 'Not Set', 'mycred' );
556
  $_max = get_post_meta( $rank_id, 'mycred_rank_max', true );
557
  if ( empty( $_max ) ) $_max = __( 'Not Set', 'mycred' );
558
+ echo '<p><strong style="display:inline-block;width:20%;">' . $rank->post_title . '</strong> ' . $_min . ' - ' . $_max . '</p>';
559
  }
560
  }
561
  else {
592
 
593
  // Maximum can not be empty
594
  if ( empty( $_POST['mycred_rank']['max'] ) )
595
+ $max = 999;
596
  else
597
  $max = trim( $_POST['mycred_rank']['max'] );
598
 
599
  update_post_meta( $post_id, 'mycred_rank_min', $min );
600
  update_post_meta( $post_id, 'mycred_rank_max', $max );
601
+
602
+ if ( get_post_status( $post_id ) == 'publish' )
603
+ $this->assign_ranks();
604
  }
605
 
606
  /**
607
  * Add to General Settings
608
  * @since 1.1
609
+ * @version 1.1
610
  */
611
  public function after_general_settings() { ?>
612
 
613
  <h4 style="color:#BBD865;"><?php _e( 'Ranks', 'mycred' ); ?></h4>
614
  <div class="body" style="display:none;">
615
+ <label class="subheader" for="<?php echo $this->field_id( 'public' ); ?>"><?php _e( 'Rank Features', 'mycred' ); ?></label>
616
+ <ol id="myCRED-rank-supports">
617
+ <li>
618
+ <input type="checkbox" value="1" checked="checked" disabled="disabled" /> <label for=""><?php _e( 'Title', 'mycred' ); ?></label><br />
619
+ <input type="checkbox" value="1" checked="checked" disabled="disabled" /> <label for=""><?php echo $this->core->template_tags_general( __( '%plural% requirement', 'mycred' ) ); ?></label><br />
620
+ <input type="checkbox" value="1" checked="checked" disabled="disabled" /> <label for=""><?php _e( 'Featured Image (Logo)', 'mycred' ); ?></label><br />
621
+ <input type="checkbox" name="<?php echo $this->field_name( array( 'support' => 'content' ) ); ?>" id="<?php echo $this->field_id( array( 'support' => 'content' ) ); ?>" <?php checked( $this->rank['support']['content'], 1 ); ?> value="1" /> <label for=""><?php _e( 'Content', 'mycred' ); ?></label><br />
622
+ <input type="checkbox" name="<?php echo $this->field_name( array( 'support' => 'excerpt' ) ); ?>" id="<?php echo $this->field_id( array( 'support' => 'excerpt' ) ); ?>" <?php checked( $this->rank['support']['excerpt'], 1 ); ?> value="1" /> <label for=""><?php _e( 'Excerpt', 'mycred' ); ?></label><br />
623
+ <input type="checkbox" name="<?php echo $this->field_name( array( 'support' => 'comments' ) ); ?>" id="<?php echo $this->field_id( array( 'support' => 'comments' ) ); ?>" <?php checked( $this->rank['support']['comments'], 1 ); ?> value="1" /> <label for=""><?php _e( 'Comments', 'mycred' ); ?></label><br />
624
+ <input type="checkbox" name="<?php echo $this->field_name( array( 'support' => 'page-attributes' ) ); ?>" id="<?php echo $this->field_id( array( 'support' => 'page-attributes' ) ); ?>" <?php checked( $this->rank['support']['page-attributes'], 1 ); ?> value="1" /> <label for=""><?php _e( 'Page Attributes', 'mycred' ); ?></label><br />
625
+ <input type="checkbox" name="<?php echo $this->field_name( array( 'support' => 'custom-fields' ) ); ?>" id="<?php echo $this->field_id( array( 'support' => 'custom-fields' ) ); ?>" <?php checked( $this->rank['support']['custom-fields'], 1 ); ?> value="1" /> <label for=""><?php _e( 'Custom Fields', 'mycred' ); ?></label>
626
+ </li>
627
+ </ol>
628
  <label class="subheader" for="<?php echo $this->field_id( 'public' ); ?>"><?php _e( 'Public', 'mycred' ); ?></label>
629
+ <ol id="myCRED-rank-public">
630
  <li>
631
  <input type="checkbox" name="<?php echo $this->field_name( 'public' ); ?>" id="<?php echo $this->field_id( 'public' ); ?>" <?php checked( $this->rank['public'], 1 ); ?> value="1" />
632
  <label for="<?php echo $this->field_id( 'public' ); ?>"><?php _e( 'If you want to create a template archive for each rank, you must select to have ranks public. Defaults to disabled.', 'mycred' ); ?></label>
633
  </li>
634
+ </ol>
635
+ <label class="subheader" for="<?php echo $this->field_id( 'slug' ); ?>"><?php _e( 'Archive URL', 'mycred' ); ?></label>
636
+ <ol id="">
637
  <li>
 
638
  <div class="h2"><?php bloginfo( 'url' ); ?>/ <input type="text" name="<?php echo $this->field_name( 'slug' ); ?>" id="<?php echo $this->field_id( 'slug' ); ?>" value="<?php echo $this->rank['slug']; ?>" size="20" />/</div>
639
+ <span class="description"><?php _e( 'Ignored if Ranks are not public', 'mycred' ); ?></span>
640
  </li>
641
+ </ol>
642
+ <label class="subheader" for="<?php echo $this->field_id( 'order' ); ?>"><?php _e( 'Display Order', 'mycred' ); ?></label>
643
+ <ol id="myCRED-rank-order">
644
  <li>
645
+ <select name="<?php echo $this->field_name( 'order' ); ?>" id="<?php echo $this->field_id( 'order' ); ?>">
646
+ <?php
647
+ // Order added in 1.1.1
648
+ $options = array(
649
+ 'ASC' => 'Ascending - Lowest rank to highest',
650
+ 'DESC' => 'Descending - Highest rank to lowest'
651
+ );
652
+ foreach ( $options as $option_value => $option_label ) {
653
+ echo '<option value="' . $option_value . '"';
654
+ if ( $this->rank['order'] == $option_value ) echo ' selected="selected"';
655
+ echo '>' . $option_label . '</option>';
656
+ } ?>
657
+
658
+ </select><br />
659
+ <span class="description"><?php _e( 'Select in what order ranks should be displayed in your admin area and/or front if ranks are "Public"', 'mycred' ); ?></span>
660
  </li>
661
  </ol>
662
  <?php
673
  ); ?>
674
 
675
  <label class="subheader" for="<?php echo $this->field_id( 'bb_location' ); ?>"><?php _e( 'Rank in BuddyPress', 'mycred' ); ?></label>
676
+ <ol id="myCRED-rank-bb-location">
677
  <li>
678
  <select name="<?php echo $this->field_name( 'bb_location' ); ?>" id="<?php echo $this->field_id( 'bb_location' ); ?>">
679
  <?php
700
  /**
701
  * Save Settings
702
  * @since 1.1
703
+ * @version 1.1
704
  */
705
  public function sanitize_extra_settings( $new_data, $data, $core ) {
706
+ $new_data['rank']['support']['content'] = ( isset( $data['rank']['support']['content'] ) ) ? true : false;
707
+ $new_data['rank']['support']['excerpt'] = ( isset( $data['rank']['support']['excerpt'] ) ) ? true : false;
708
+ $new_data['rank']['support']['comments'] = ( isset( $data['rank']['support']['comments'] ) ) ? true : false;
709
+ $new_data['rank']['support']['page-attributes'] = ( isset( $data['rank']['support']['page-attributes'] ) ) ? true : false;
710
+ $new_data['rank']['support']['custom-fields'] = ( isset( $data['rank']['support']['custom-fields'] ) ) ? true : false;
711
+
712
  $new_data['rank']['public'] = ( isset( $data['rank']['public'] ) ) ? true : false;
713
  $new_data['rank']['slug'] = sanitize_text_field( $data['rank']['slug'] );
714
+ $new_data['rank']['order'] = sanitize_text_field( $data['rank']['order'] );
715
  $new_data['rank']['bb_location'] = sanitize_text_field( $data['rank']['bb_location'] );
716
  return $new_data;
717
  }
addons/transfer/myCRED-addon-transfer.php CHANGED
@@ -300,7 +300,7 @@ if ( !class_exists( 'myCRED_Transfer_Creds' ) ) {
300
  // Prep
301
  $to = $_POST['recipient'];
302
  $from = $_POST['sender'];
303
- $amount = $_POST['amount'];
304
 
305
  // Add-on has not been installed
306
  if ( !isset( $this->transfers ) )
300
  // Prep
301
  $to = $_POST['recipient'];
302
  $from = $_POST['sender'];
303
+ $amount = abs( $_POST['amount'] );
304
 
305
  // Add-on has not been installed
306
  if ( !isset( $this->transfers ) )
includes/mycred-admin.php CHANGED
@@ -149,6 +149,7 @@ if ( !class_exists( 'myCRED_Admin' ) ) {
149
  * @version 1.0
150
  */
151
  public function adjust_users_balance( $user ) {
 
152
  // Editors can not edit their own creds
153
  if ( !$this->core->can_edit_creds() ) return;
154
  // Make sure we do not want to exclude this user
@@ -175,6 +176,7 @@ if ( !class_exists( 'myCRED_Admin' ) ) {
175
  <?php echo $this->core->plural(); ?>: <input type="text" name="myCRED-manual-add-points" id="myCRED-manual-add-points" value="<?php echo $this->core->number( 0 ); ?>" size="4" /><br /><br />
176
  <label for="myCRED-manual-add-description"><?php _e( 'Log description for adjustment', 'mycred' ); ?> <?php echo $req; ?></label><br />
177
  <input type="text" name="myCRED-manual-add-description" id="myCRED-manual-add-description" value="" class="regular-text" /> <?php submit_button( __( 'Update', 'mycred' ), 'primary medium', 'myCRED_update', '' ); ?>
 
178
  </td>
179
  </tr>
180
  <?php if ( IS_PROFILE_PAGE ) return; ?>
@@ -190,19 +192,29 @@ if ( !class_exists( 'myCRED_Admin' ) ) {
190
  /**
191
  * Save Manual Adjustments
192
  * @since 0.1
193
- * @version 1.0
194
  */
195
  public function adjust_points_manually( $user_id ) {
196
- // All the reasons we should bail
197
- if ( !$this->core->can_edit_creds() ) return;
198
- if ( $this->core->exclude_user( $user_id ) === true ) return;
199
- if ( !isset( $_POST['myCRED-manual-add-points'] ) || !isset( $_POST['myCRED-manual-add-description'] ) ) return;
200
- if ( empty( $_POST['myCRED-manual-add-description'] ) ) return;
201
 
 
 
 
 
202
  // Add new creds
203
  $cred = $_POST['myCRED-manual-add-points'];
204
  $entry = $_POST['myCRED-manual-add-description'];
205
- $data = apply_filters( 'mycred_manual_change', array( 'type' => 'user' ), $this );
 
 
 
 
 
 
 
 
 
 
206
  $this->core->add_creds( 'manual', $user_id, $cred, $entry, get_current_user_id(), $data );
207
  }
208
  }
149
  * @version 1.0
150
  */
151
  public function adjust_users_balance( $user ) {
152
+ global $mycred_errors;
153
  // Editors can not edit their own creds
154
  if ( !$this->core->can_edit_creds() ) return;
155
  // Make sure we do not want to exclude this user
176
  <?php echo $this->core->plural(); ?>: <input type="text" name="myCRED-manual-add-points" id="myCRED-manual-add-points" value="<?php echo $this->core->number( 0 ); ?>" size="4" /><br /><br />
177
  <label for="myCRED-manual-add-description"><?php _e( 'Log description for adjustment', 'mycred' ); ?> <?php echo $req; ?></label><br />
178
  <input type="text" name="myCRED-manual-add-description" id="myCRED-manual-add-description" value="" class="regular-text" /> <?php submit_button( __( 'Update', 'mycred' ), 'primary medium', 'myCRED_update', '' ); ?>
179
+ <?php if ( $mycred_errors ) echo '<p style="color:red;">' . __( 'Description is required!', 'mycred' ) . '</p>'; ?>
180
  </td>
181
  </tr>
182
  <?php if ( IS_PROFILE_PAGE ) return; ?>
192
  /**
193
  * Save Manual Adjustments
194
  * @since 0.1
195
+ * @version 1.1
196
  */
197
  public function adjust_points_manually( $user_id ) {
198
+ global $mycred_errors;
 
 
 
 
199
 
200
+ // All the reasons we should bail
201
+ if ( !$this->core->can_edit_creds() || $this->core->exclude_user( $user_id ) ) return false;
202
+ if ( !isset( $_POST['myCRED-manual-add-points'] ) || !isset( $_POST['myCRED-manual-add-description'] ) ) return false;
203
+
204
  // Add new creds
205
  $cred = $_POST['myCRED-manual-add-points'];
206
  $entry = $_POST['myCRED-manual-add-description'];
207
+ $data = apply_filters( 'mycred_manual_change', array( 'ref_type' => 'user' ), $this );
208
+
209
+ // If person editing points can edit points but can not edit the plugin
210
+ // a description must be set!
211
+ if ( $this->core->can_edit_creds() && !$this->core->can_edit_plugin() ) {
212
+ if ( empty( $entry ) ) {
213
+ $mycred_errors = true;
214
+ return false;
215
+ }
216
+ }
217
+
218
  $this->core->add_creds( 'manual', $user_id, $cred, $entry, get_current_user_id(), $data );
219
  }
220
  }
includes/mycred-functions.php CHANGED
@@ -729,8 +729,8 @@ if ( !class_exists( 'myCRED_Settings' ) ) {
729
  // true (boolean) - "Yes" let myCRED add points and log the event
730
  if ( $execute === true ) {
731
  $this->update_users_balance( $user_id, $amount );
732
- // Only admins can have empty log entries which do not add a log entry
733
- if ( ( $this->can_edit_plugin() && empty( $entry ) ) === false )
734
  $this->add_to_log( $ref, $user_id, $amount, $entry, $ref_id, $data, $type );
735
 
736
  return true;
@@ -757,7 +757,7 @@ if ( !class_exists( 'myCRED_Settings' ) ) {
757
  * @returns boolean true on success or false on fail
758
  * @version 1.0
759
  */
760
- public function add_to_log( $ref = '', $user_id = '', $amount = '', $entry = '', $ref_id = '', $data = '', $type = '' ) {
761
  // All the reasons we would fail
762
  if ( empty( $ref ) || empty( $user_id ) || empty( $amount ) ) return false;
763
  if ( !preg_match( '/mycred_/', $type ) ) return false;
@@ -1017,7 +1017,7 @@ if ( !function_exists( 'mycred_flush_widget_cache' ) ) {
1017
  * @version 1.1
1018
  */
1019
  if ( !function_exists( 'mycred_add' ) ) {
1020
- function mycred_add( $ref = '', $user_id = '', $amount = '', $entry = '', $ref_id = '', $data = '', $type = '' )
1021
  {
1022
  // $ref, $user_id and $cred is required
1023
  if ( empty( $ref ) || empty( $user_id ) || empty( $amount ) ) return false;
@@ -1039,7 +1039,7 @@ if ( !function_exists( 'mycred_add' ) ) {
1039
  * @version 1.0
1040
  */
1041
  if ( !function_exists( 'mycred_subtract' ) ) {
1042
- function mycred_subtract( $ref = '', $user_id = '', $amount = '', $entry = '', $ref_id = '', $data = '', $type = '' )
1043
  {
1044
  if ( empty( $ref ) || empty( $user_id ) || empty( $amount ) ) return false;
1045
  if ( (int) $amount > 0 ) $amount = 0-$amount;
@@ -1075,4 +1075,100 @@ if ( !function_exists( 'mycred_count_ref_instances' ) ) {
1075
  return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM " . $wpdb->prefix . 'myCRED_log' . " WHERE ref = %s", $reference ) );
1076
  }
1077
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1078
  ?>
729
  // true (boolean) - "Yes" let myCRED add points and log the event
730
  if ( $execute === true ) {
731
  $this->update_users_balance( $user_id, $amount );
732
+
733
+ if ( !empty( $entry ) )
734
  $this->add_to_log( $ref, $user_id, $amount, $entry, $ref_id, $data, $type );
735
 
736
  return true;
757
  * @returns boolean true on success or false on fail
758
  * @version 1.0
759
  */
760
+ public function add_to_log( $ref = '', $user_id = '', $amount = '', $entry = '', $ref_id = '', $data = '', $type = 'mycred_default' ) {
761
  // All the reasons we would fail
762
  if ( empty( $ref ) || empty( $user_id ) || empty( $amount ) ) return false;
763
  if ( !preg_match( '/mycred_/', $type ) ) return false;
1017
  * @version 1.1
1018
  */
1019
  if ( !function_exists( 'mycred_add' ) ) {
1020
+ function mycred_add( $ref = '', $user_id = '', $amount = '', $entry = '', $ref_id = '', $data = '', $type = 'mycred_default' )
1021
  {
1022
  // $ref, $user_id and $cred is required
1023
  if ( empty( $ref ) || empty( $user_id ) || empty( $amount ) ) return false;
1039
  * @version 1.0
1040
  */
1041
  if ( !function_exists( 'mycred_subtract' ) ) {
1042
+ function mycred_subtract( $ref = '', $user_id = '', $amount = '', $entry = '', $ref_id = '', $data = '', $type = 'mycred_default' )
1043
  {
1044
  if ( empty( $ref ) || empty( $user_id ) || empty( $amount ) ) return false;
1045
  if ( (int) $amount > 0 ) $amount = 0-$amount;
1075
  return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM " . $wpdb->prefix . 'myCRED_log' . " WHERE ref = %s", $reference ) );
1076
  }
1077
  }
1078
+
1079
+ /**
1080
+ * Get Total Points by Time
1081
+ * Counts the total amount of points that has been entered into the log between
1082
+ * two given UNIX timestamps. Optionally you can restrict counting to a specific user
1083
+ * or specific reference (or both).
1084
+ *
1085
+ * Will return false if the time stamps are incorrectly formated same for user id (must be int).
1086
+ * If you do not want to filter by reference pass NULL and not an empty string or this function will
1087
+ * return false. Same goes for the user id!
1088
+ *
1089
+ * @param $from (int|string) UNIX timestamp from when to start counting. The string 'today' can also
1090
+ * be used to start counting from the start of today.
1091
+ * @param $to (int|string) UNIX timestamp for when to stop counting. The string 'now' can also be used
1092
+ * to count up until now.
1093
+ * @param $ref (string) reference to filter by.
1094
+ * @param $user_id (int|NULL) user id to filter by.
1095
+ * @param $type (string) point type to filer by.
1096
+ * @returns total points (int|float) or error message (string)
1097
+ * @since 1.1.1
1098
+ * @version 1.0
1099
+ */
1100
+ if ( !function_exists( 'mycred_get_total_by_time' ) ) {
1101
+ function mycred_get_total_by_time( $from = 'today', $to = 'now', $ref = NULL, $user_id = NULL, $type = '' )
1102
+ {
1103
+ // Get myCRED
1104
+ $mycred = mycred_get_settings();
1105
+
1106
+ // Prep
1107
+ $wheres = array();
1108
+ $prep = array();
1109
+
1110
+ // Reference
1111
+ if ( $ref !== NULL ) {
1112
+ if ( empty( $ref ) ) return 'ref empty';
1113
+
1114
+ $wheres[] = 'ref = %s';
1115
+ $prep[] = $ref;
1116
+ }
1117
+
1118
+ // User
1119
+ if ( $user_id !== NULL ) {
1120
+ if ( !is_int( $user_id ) ) return 'incorrect user id format';
1121
+
1122
+ $wheres[] = 'user_id = %d';
1123
+ $prep[] = $user_id;
1124
+ }
1125
+
1126
+ // Default from start of today
1127
+ if ( $from == 'today' ) {
1128
+ $today = date_i18n( 'Y/m/d 00:00:00' );
1129
+ $from = strtotime( $today );
1130
+ }
1131
+
1132
+ // From
1133
+ if ( !is_numeric( $from ) ) return 'incorrect unix timestamp (from): ' . $from;
1134
+ $wheres[] = 'time >= %d';
1135
+ $prep[] = $from;
1136
+
1137
+ // Default to is now
1138
+ if ( $to == 'now' )
1139
+ $to = date_i18n( 'U' );
1140
+
1141
+ // To
1142
+ if ( !is_numeric( $to ) ) return 'incorrect unix timestamp (to): ' . $to;
1143
+ $wheres[] = 'time <= %d';
1144
+ $prep[] = $to;
1145
+
1146
+ // Type
1147
+ if ( empty( $type ) )
1148
+ $type = $mycred->get_cred_id();
1149
+
1150
+ $wheres[] = 'ctype = %s';
1151
+ $prep[] = $type;
1152
+
1153
+ global $wpdb;
1154
+
1155
+ // Construct
1156
+ $db = $wpdb->prefix . $mycred->db_name;
1157
+ $where = implode( ' AND ', $wheres );
1158
+ $sql = "SELECT creds FROM {$db} WHERE {$where} ORDER BY time;";
1159
+
1160
+ // Query
1161
+ $query = $wpdb->get_results( $wpdb->prepare( $sql, $prep ) );
1162
+
1163
+ $count = 0;
1164
+ // if we have results we add creds up
1165
+ if ( !empty( $query ) ) {
1166
+ foreach ( $query as $entry ) {
1167
+ $count = $count+$entry->creds;
1168
+ }
1169
+ }
1170
+
1171
+ return $mycred->format_number( $count );
1172
+ }
1173
+ }
1174
  ?>
includes/mycred-shortcodes.php CHANGED
@@ -259,8 +259,9 @@ if ( !function_exists( 'mycred_render_shortcode_send' ) ) {
259
 
260
  if ( $to == 'author' ) {
261
  // You can not use this outside the loop
262
- if ( !is_single() ) return;
263
- $to = $GLOBALS['post']->post_author;
 
264
  }
265
 
266
  global $mycred_sending_points;
259
 
260
  if ( $to == 'author' ) {
261
  // You can not use this outside the loop
262
+ $author = get_the_author_meta( 'ID' );
263
+ if ( empty( $author ) ) $author = $GLOBALS['post']->post_author;
264
+ $to = $author;
265
  }
266
 
267
  global $mycred_sending_points;
includes/mycred-widgets.php CHANGED
@@ -55,7 +55,7 @@ if ( !class_exists( 'myCRED_Widget_Balance' ) ) {
55
  if ( empty( $balance ) ) $balance = 0;
56
 
57
  $layout = $mycred->template_tags_amount( $instance['cred_format'], $balance );
58
- $layout = $mycred->template_tags_user( $layout, $balance );
59
 
60
  // Include Ranking
61
  if ( $instance['show_rank'] ) {
55
  if ( empty( $balance ) ) $balance = 0;
56
 
57
  $layout = $mycred->template_tags_amount( $instance['cred_format'], $balance );
58
+ $layout = $mycred->template_tags_user( $layout, $user_id );
59
 
60
  // Include Ranking
61
  if ( $instance['show_rank'] ) {
lang/mycred-en_US.mo CHANGED
Binary file
lang/mycred-en_US.po CHANGED
@@ -1,9 +1,9 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: myCRED v1.1beta8\n"
4
  "Report-Msgid-Bugs-To: \n"
5
  "POT-Creation-Date: \n"
6
- "PO-Revision-Date: 2013-06-17 12:28:36+0000\n"
7
  "Last-Translator: unimatrix0 <gabriel.s@merovingi.com>\n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
@@ -20,353 +20,350 @@ msgstr ""
20
  "X-Poedit-SearchPath-0: .\n"
21
  "X-Textdomain-Support: yes"
22
 
23
- #: addons/buddypress/hooks/bp-galleries.php:75
24
  #, php-format
25
  #@ mycred
26
  msgid "%plural% for New Gallery"
27
  msgstr ""
28
 
29
- #: addons/buddypress/hooks/bp-galleries.php:82
30
- #: addons/buddypress/hooks/bp-groups.php:463
31
- #: addons/buddypress/hooks/bp-groups.php:476
32
- #: addons/buddypress/hooks/bp-groups.php:489
33
- #: addons/buddypress/hooks/bp-groups.php:502
34
- #: addons/buddypress/hooks/bp-groups.php:515
35
- #: addons/buddypress/hooks/bp-groups.php:528
36
- #: addons/buddypress/hooks/bp-groups.php:542
37
- #: addons/buddypress/hooks/bp-groups.php:555
38
- #: addons/buddypress/hooks/bp-groups.php:568
39
- #: addons/buddypress/hooks/bp-groups.php:581
40
- #: addons/buddypress/hooks/bp-links.php:185
41
- #: addons/buddypress/hooks/bp-links.php:198
42
- #: addons/buddypress/hooks/bp-links.php:211
43
- #: addons/buddypress/hooks/bp-links.php:224
44
- #: addons/buddypress/hooks/bp-press.php:113
45
- #: addons/buddypress/hooks/bp-press.php:126
46
- #: addons/buddypress/hooks/bp-profile.php:322
47
- #: addons/buddypress/hooks/bp-profile.php:335
48
- #: addons/buddypress/hooks/bp-profile.php:348
49
- #: addons/buddypress/hooks/bp-profile.php:361
50
- #: addons/buddypress/hooks/bp-profile.php:374
51
- #: addons/buddypress/hooks/bp-profile.php:387
52
- #: addons/buddypress/hooks/bp-profile.php:400
53
- #: addons/buddypress/hooks/bp-profile.php:413
54
- #: modules/mycred-module-hooks.php:340
55
- #: modules/mycred-module-hooks.php:582
56
- #: modules/mycred-module-hooks.php:595
57
- #: modules/mycred-module-hooks.php:630
58
- #: modules/mycred-module-hooks.php:851
59
- #: modules/mycred-module-hooks.php:863
60
- #: modules/mycred-module-hooks.php:875
61
- #: modules/mycred-module-plugins.php:136
62
- #: modules/mycred-module-plugins.php:157
63
- #: modules/mycred-module-plugins.php:292
64
- #: modules/mycred-module-plugins.php:546
 
 
65
  #: modules/mycred-module-subscriptions.php:486
66
  #: modules/mycred-module-subscriptions.php:499
67
  #@ mycred
68
  msgid "Log template"
69
  msgstr ""
70
 
71
- #: addons/buddypress/hooks/bp-groups.php:449
72
  #, php-format
73
  #@ mycred
74
  msgid "%plural% for Creating Groups"
75
  msgstr ""
76
 
77
- #: addons/buddypress/hooks/bp-groups.php:457
78
  #@ mycred
79
  msgid "Number of members before awarding %_plural%"
80
  msgstr ""
81
 
82
- #: addons/buddypress/hooks/bp-groups.php:459
83
  #@ mycred
84
  msgid "Use zero to award %_plural% when group is created."
85
  msgstr ""
86
 
87
- #: addons/buddypress/hooks/bp-groups.php:469
88
  #, php-format
89
  #@ mycred
90
  msgid "%plural% for Deleting Groups"
91
  msgstr ""
92
 
93
- #: addons/buddypress/hooks/bp-groups.php:482
94
  #, php-format
95
  #@ mycred
96
  msgid "%plural% for New Forum Topic"
97
  msgstr ""
98
 
99
- #: addons/buddypress/hooks/bp-groups.php:495
100
  #, php-format
101
  #@ mycred
102
  msgid "%plural% for Editing Forum Topic"
103
  msgstr ""
104
 
105
- #: addons/buddypress/hooks/bp-groups.php:508
106
  #, php-format
107
  #@ mycred
108
  msgid "%plural% for New Forum Post"
109
  msgstr ""
110
 
111
- #: addons/buddypress/hooks/bp-groups.php:521
112
  #, php-format
113
  #@ mycred
114
  msgid "%plural% for Editing Forum Post"
115
  msgstr ""
116
 
117
- #: addons/buddypress/hooks/bp-groups.php:534
118
  #, php-format
119
  #@ mycred
120
  msgid "%plural% for Joining Groups"
121
  msgstr ""
122
 
123
- #: addons/buddypress/hooks/bp-groups.php:548
124
  #, php-format
125
  #@ mycred
126
  msgid "%plural% for Leaving Groups"
127
  msgstr ""
128
 
129
- #: addons/buddypress/hooks/bp-groups.php:561
130
  #, php-format
131
  #@ mycred
132
  msgid "%plural% for New Group Avatar"
133
  msgstr ""
134
 
135
- #: addons/buddypress/hooks/bp-groups.php:574
136
  #, php-format
137
  #@ mycred
138
  msgid "%plural% for New Group Comment"
139
  msgstr ""
140
 
141
- #: addons/buddypress/hooks/bp-links.php:178
142
  #, php-format
143
  #@ mycred
144
  msgid "%plural% for New Links"
145
  msgstr ""
146
 
147
- #: addons/buddypress/hooks/bp-links.php:191
148
  #, php-format
149
  #@ mycred
150
  msgid "%plural% for Vote on Link"
151
  msgstr ""
152
 
153
- #: addons/buddypress/hooks/bp-links.php:204
154
  #, php-format
155
  #@ mycred
156
  msgid "%plural% for Updating Links"
157
  msgstr ""
158
 
159
- #: addons/buddypress/hooks/bp-links.php:217
160
  #, php-format
161
  #@ mycred
162
  msgid "%plural% for Deleting Links"
163
  msgstr ""
164
 
165
- #: addons/buddypress/hooks/bp-press.php:106
166
  #, php-format
167
  #@ mycred
168
  msgid "%plural% for New Topic"
169
  msgstr ""
170
 
171
- #: addons/buddypress/hooks/bp-press.php:119
172
  #, php-format
173
  #@ mycred
174
  msgid "%plural% for New Reply"
175
  msgstr ""
176
 
177
- #: addons/buddypress/hooks/bp-profile.php:315
178
  #, php-format
179
  #@ mycred
180
  msgid "%plural% for Profile Updates"
181
  msgstr ""
182
 
183
- #: addons/buddypress/hooks/bp-profile.php:328
184
  #, php-format
185
  #@ mycred
186
  msgid "%plural% for New Avatar"
187
  msgstr ""
188
 
189
- #: addons/buddypress/hooks/bp-profile.php:341
190
  #, php-format
191
  #@ mycred
192
  msgid "%plural% for New Friendships"
193
  msgstr ""
194
 
195
- #: addons/buddypress/hooks/bp-profile.php:354
196
  #, php-format
197
  #@ mycred
198
  msgid "%plural% for Leaving Friendship"
199
  msgstr ""
200
 
201
- #: addons/buddypress/hooks/bp-profile.php:367
202
  #, php-format
203
  #@ mycred
204
  msgid "%plural% for New Comment"
205
  msgstr ""
206
 
207
- #: addons/buddypress/hooks/bp-profile.php:380
208
  #, php-format
209
  #@ mycred
210
  msgid "%plural% for Deleting Comment"
211
  msgstr ""
212
 
213
- #: addons/buddypress/hooks/bp-profile.php:393
214
  #, php-format
215
  #@ mycred
216
  msgid "%plural% for New Messages"
217
  msgstr ""
218
 
219
- #: addons/buddypress/hooks/bp-profile.php:406
220
  #, php-format
221
  #@ mycred
222
  msgid "%plural% for Sending Gift"
223
  msgstr ""
224
 
225
- #: addons/buddypress/myCRED-addon-buddypress.php:50
226
  #: modules/mycred-module-log.php:65
227
  #: modules/mycred-module-log.php:424
228
  #@ mycred
229
  msgid "My History"
230
  msgstr ""
231
 
232
- #: addons/buddypress/myCRED-addon-buddypress.php:51
233
  #, php-format
234
  #@ mycred
235
  msgid "%s's History"
236
  msgstr ""
237
 
238
- #: addons/buddypress/myCRED-addon-buddypress.php:378
239
  #, php-format
240
  #@ mycred
241
  msgid "%singular% Balance"
242
  msgstr ""
243
 
244
- #: addons/buddypress/myCRED-addon-buddypress.php:208
245
  #: modules/mycred-module-log.php:207
246
  #@ mycred
247
  msgid "All"
248
  msgstr ""
249
 
250
- #: addons/buddypress/myCRED-addon-buddypress.php:209
251
  #: modules/mycred-module-log.php:208
252
  #@ mycred
253
  msgid "Today"
254
  msgstr ""
255
 
256
- #: addons/buddypress/myCRED-addon-buddypress.php:210
257
  #: modules/mycred-module-log.php:209
258
  #@ mycred
259
  msgid "Yesterday"
260
  msgstr ""
261
 
262
- #: addons/buddypress/myCRED-addon-buddypress.php:211
263
  #: modules/mycred-module-log.php:210
264
  #@ mycred
265
  msgid "This Week"
266
  msgstr ""
267
 
268
- #: addons/buddypress/myCRED-addon-buddypress.php:212
269
  #: modules/mycred-module-log.php:211
270
  #@ mycred
271
  msgid "This Month"
272
  msgstr ""
273
 
274
- #: addons/buddypress/myCRED-addon-buddypress.php:336
275
- #@ default
276
- msgid "bbPress 2.0"
277
- msgstr ""
278
-
279
- #: addons/buddypress/myCRED-addon-buddypress.php:337
280
  #@ mycred
281
  msgid "Awards %_plural% for bbPress actions."
282
  msgstr ""
283
 
284
- #: addons/buddypress/myCRED-addon-buddypress.php:308
285
  #@ default
286
  msgid "BuddyPress: Groups"
287
  msgstr ""
288
 
289
- #: addons/buddypress/myCRED-addon-buddypress.php:309
290
  #@ mycred
291
  msgid "Awards %_plural% for group related actions. Use minus to deduct %_plural% or zero to disable a specific hook."
292
  msgstr ""
293
 
294
- #: addons/buddypress/myCRED-addon-buddypress.php:313
295
  #@ default
296
  msgid "BuddyPress: Members"
297
  msgstr ""
298
 
299
- #: addons/buddypress/myCRED-addon-buddypress.php:314
300
  #@ mycred
301
  msgid "Awards %_plural% for profile related actions."
302
  msgstr ""
303
 
304
- #: addons/buddypress/myCRED-addon-buddypress.php:320
305
  #@ default
306
  msgid "BuddyPress: Links"
307
  msgstr ""
308
 
309
- #: addons/buddypress/myCRED-addon-buddypress.php:321
310
  #@ mycred
311
  msgid "Awards %_plural% for link related actions."
312
  msgstr ""
313
 
314
- #: addons/buddypress/myCRED-addon-buddypress.php:328
315
  #@ default
316
  msgid "BuddyPress: Gallery Actions"
317
  msgstr ""
318
 
319
- #: addons/buddypress/myCRED-addon-buddypress.php:329
320
  #@ mycred
321
  msgid "Awards %_plural% for creating a new gallery either using BP Album+ or BP Gallery."
322
  msgstr ""
323
 
324
- #: addons/buddypress/myCRED-addon-buddypress.php:357
325
- #: addons/buddypress/myCRED-addon-buddypress.php:364
326
- #: addons/ranks/myCRED-addon-ranks.php:529
327
  #@ mycred
328
  msgid "Do not show."
329
  msgstr ""
330
 
331
- #: addons/buddypress/myCRED-addon-buddypress.php:358
332
- #: addons/ranks/myCRED-addon-ranks.php:530
333
  #@ mycred
334
  msgid "Include in Profile Header."
335
  msgstr ""
336
 
337
- #: addons/buddypress/myCRED-addon-buddypress.php:359
338
- #: addons/ranks/myCRED-addon-ranks.php:531
339
  #@ mycred
340
  msgid "Include under the \"Profile\" tab"
341
  msgstr ""
342
 
343
- #: addons/buddypress/myCRED-addon-buddypress.php:360
344
- #: addons/ranks/myCRED-addon-ranks.php:532
345
  #@ mycred
346
  msgid "Include under the \"Profile\" tab and Profile Header."
347
  msgstr ""
348
 
349
- #: addons/buddypress/myCRED-addon-buddypress.php:365
350
  #@ mycred
351
  msgid "Show in Profile"
352
  msgstr ""
353
 
354
- #: addons/buddypress/myCRED-addon-buddypress.php:376
355
  #@ mycred
356
  msgid "BuddyPress"
357
  msgstr ""
358
 
359
- #: addons/buddypress/myCRED-addon-buddypress.php:394
360
  #@ mycred
361
  msgid "Members can view each others %_singular% balance."
362
  msgstr ""
363
 
364
- #: addons/buddypress/myCRED-addon-buddypress.php:399
365
  #@ mycred
366
  msgid "Template"
367
  msgstr ""
368
 
369
- #: addons/buddypress/myCRED-addon-buddypress.php:406
370
  #: includes/mycred-widgets.php:159
371
  #: modules/mycred-module-log.php:66
372
  #, php-format
@@ -374,33 +371,33 @@ msgstr ""
374
  msgid "%plural% History"
375
  msgstr ""
376
 
377
- #: addons/buddypress/myCRED-addon-buddypress.php:422
378
  #@ mycred
379
  msgid "Members can view each others %_plural% history."
380
  msgstr ""
381
 
382
- #: addons/buddypress/myCRED-addon-buddypress.php:427
383
  #@ mycred
384
  msgid "Menu Title"
385
  msgstr ""
386
 
387
- #: addons/buddypress/myCRED-addon-buddypress.php:429
388
  #@ mycred
389
  msgid "Title shown to me"
390
  msgstr ""
391
 
392
- #: addons/buddypress/myCRED-addon-buddypress.php:434
393
  #, php-format
394
  #@ mycred
395
  msgid "Title shown to others. Use %s to show the first name."
396
  msgstr ""
397
 
398
- #: addons/buddypress/myCRED-addon-buddypress.php:439
399
  #@ mycred
400
  msgid "Menu Position"
401
  msgstr ""
402
 
403
- #: addons/buddypress/myCRED-addon-buddypress.php:441
404
  #@ mycred
405
  msgid "Current menu positions:"
406
  msgstr ""
@@ -409,7 +406,7 @@ msgstr ""
409
  #: includes/mycred-network.php:115
410
  #: modules/mycred-module-addons.php:249
411
  #: modules/mycred-module-general.php:35
412
- #: modules/mycred-module-hooks.php:206
413
  #: modules/mycred-module-log.php:326
414
  #: modules/mycred-module-log.php:402
415
  #@ mycred
@@ -668,8 +665,8 @@ msgid "Billing Details"
668
  msgstr ""
669
 
670
  #: abstracts/mycred-abstract-hook.php:136
671
- #: addons/buy-creds/abstracts/mycred-abstract-payment-gateway.php:512
672
- #: addons/buy-creds/abstracts/mycred-abstract-payment-gateway.php:535
673
  #: addons/buy-creds/gateways/netbilling.php:514
674
  #: addons/buy-creds/gateways/zombaio.php:382
675
  #: addons/buy-creds/myCRED-addon-buy-creds.php:231
@@ -862,6 +859,7 @@ msgstr ""
862
 
863
  #: addons/buy-creds/gateways/skrill.php:386
864
  #: addons/gateway/carts/mycred-woocommerce.php:75
 
865
  #: addons/transfer/myCRED-addon-transfer.php:581
866
  #: includes/mycred-widgets.php:185
867
  #: includes/mycred-widgets.php:356
@@ -932,7 +930,7 @@ msgid "Gift purchase from %display_name%."
932
  msgstr ""
933
 
934
  #: addons/buy-creds/myCRED-addon-buy-creds.php:195
935
- #: addons/ranks/myCRED-addon-ranks.php:372
936
  #, php-format
937
  #@ mycred
938
  msgid "Minimum %plural%"
@@ -983,18 +981,18 @@ msgstr ""
983
 
984
  #: addons/buy-creds/myCRED-addon-buy-creds.php:209
985
  #: addons/buy-creds/myCRED-addon-buy-creds.php:264
986
- #: addons/gateway/carts/mycred-marketpress.php:292
987
  #: addons/gateway/carts/mycred-woocommerce.php:87
988
- #: modules/mycred-module-hooks.php:475
989
- #: modules/mycred-module-hooks.php:1079
990
- #: modules/mycred-module-plugins.php:380
991
- #: modules/mycred-module-plugins.php:382
992
- #: modules/mycred-module-plugins.php:391
993
- #: modules/mycred-module-plugins.php:670
994
- #: modules/mycred-module-plugins.php:790
995
- #: modules/mycred-module-plugins.php:803
996
- #: modules/mycred-module-plugins.php:950
997
- #: modules/mycred-module-plugins.php:963
998
  #@ mycred
999
  msgid "Log Template"
1000
  msgstr ""
@@ -1007,7 +1005,7 @@ msgstr ""
1007
 
1008
  #: addons/buy-creds/myCRED-addon-buy-creds.php:310
1009
  #: modules/mycred-module-general.php:42
1010
- #: modules/mycred-module-hooks.php:213
1011
  #@ mycred
1012
  msgid "Settings Updated"
1013
  msgstr ""
@@ -1019,7 +1017,7 @@ msgid "Select the payment gateways you want to offer your users to buy %plural%.
1019
  msgstr ""
1020
 
1021
  #: addons/buy-creds/myCRED-addon-buy-creds.php:339
1022
- #: modules/mycred-module-hooks.php:231
1023
  #@ mycred
1024
  msgid "Enable"
1025
  msgstr ""
@@ -1117,7 +1115,7 @@ msgstr ""
1117
  msgid "Click here if you are not automatically redirected"
1118
  msgstr ""
1119
 
1120
- #: addons/buy-creds/abstracts/mycred-abstract-payment-gateway.php:863
1121
  #@ mycred
1122
  msgid "Outside US"
1123
  msgstr ""
@@ -1165,29 +1163,29 @@ msgstr ""
1165
  msgid "Import %_plural% from pre-existing custom user meta."
1166
  msgstr ""
1167
 
1168
- #: addons/import/myCRED-addon-import.php:211
1169
  #@ mycred
1170
  msgid "No file selected. Please select your CSV file and try again."
1171
  msgstr ""
1172
 
1173
- #: addons/import/myCRED-addon-import.php:226
1174
  #@ mycred
1175
  msgid "Failed to load file."
1176
  msgstr ""
1177
 
1178
- #: addons/import/myCRED-addon-import.php:247
1179
  #: addons/import/myCRED-addon-import.php:416
1180
  #, php-format
1181
  #@ mycred
1182
  msgid "Zero rows imported! Skipped %d entries. Import completed in %.2f seconds."
1183
  msgstr ""
1184
 
1185
- #: addons/import/myCRED-addon-import.php:256
1186
  #@ mycred
1187
  msgid "No valid records found in file. Make sure you have selected the correct way to identify users in the mycred_user column!"
1188
  msgstr ""
1189
 
1190
- #: addons/import/myCRED-addon-import.php:262
1191
  #: addons/import/myCRED-addon-import.php:344
1192
  #: addons/import/myCRED-addon-import.php:431
1193
  #, php-format
@@ -1195,7 +1193,7 @@ msgstr ""
1195
  msgid "Import successfully completed. A total of %d users were effected and %d entires were skipped. Import completed in %.2f seconds."
1196
  msgstr ""
1197
 
1198
- #: addons/import/myCRED-addon-import.php:296
1199
  #: addons/import/myCRED-addon-import.php:580
1200
  #@ mycred
1201
  msgid "No CubePoints found."
@@ -1268,7 +1266,7 @@ msgstr ""
1268
  msgid "Email"
1269
  msgstr ""
1270
 
1271
- #: addons/gateway/carts/mycred-marketpress.php:306
1272
  #: addons/gateway/carts/mycred-woocommerce.php:100
1273
  #: addons/import/myCRED-addon-import.php:518
1274
  #: addons/import/myCRED-addon-import.php:587
@@ -1648,7 +1646,8 @@ msgid "Log template for receiving"
1648
  msgstr ""
1649
 
1650
  #: addons/transfer/myCRED-addon-transfer.php:192
1651
- #: modules/mycred-module-hooks.php:1086
 
1652
  #@ mycred
1653
  msgid "Limits"
1654
  msgstr ""
@@ -1750,27 +1749,27 @@ msgstr ""
1750
  msgid "My current %singular% balance"
1751
  msgstr ""
1752
 
1753
- #: includes/mycred-admin.php:161
1754
  #@ mycred
1755
  msgid "Adjust Users Balance"
1756
  msgstr ""
1757
 
1758
- #: includes/mycred-admin.php:176
1759
  #@ mycred
1760
  msgid "Log description for adjustment"
1761
  msgstr ""
1762
 
1763
- #: includes/mycred-admin.php:168
1764
  #@ mycred
1765
  msgid "required"
1766
  msgstr ""
1767
 
1768
- #: includes/mycred-admin.php:177
1769
  #@ mycred
1770
  msgid "Update"
1771
  msgstr ""
1772
 
1773
- #: includes/mycred-admin.php:182
1774
  #@ mycred
1775
  msgid "Users Current Balance"
1776
  msgstr ""
@@ -1798,7 +1797,7 @@ msgstr ""
1798
 
1799
  #: addons/email-notices/myCRED-addon-email-notices.php:589
1800
  #: includes/mycred-install.php:398
1801
- #: mycred.php:98
1802
  #@ mycred
1803
  msgid "Setup"
1804
  msgstr ""
@@ -2033,7 +2032,7 @@ msgid "This Hook does no settings"
2033
  msgstr ""
2034
 
2035
  #: abstracts/mycred-abstract-hook.php:125
2036
- #: modules/mycred-module-hooks.php:928
2037
  #@ mycred
2038
  msgid "No limit"
2039
  msgstr ""
@@ -2126,14 +2125,14 @@ msgstr ""
2126
  msgid "Visit Website"
2127
  msgstr ""
2128
 
2129
- #: addons/gateway/carts/mycred-marketpress.php:274
2130
  #: includes/mycred-network.php:139
2131
  #: modules/mycred-module-general.php:19
2132
  #: modules/mycred-module-general.php:20
2133
  #: modules/mycred-module-general.php:21
2134
  #: modules/mycred-module-general.php:47
2135
  #: modules/mycred-module-log.php:306
2136
- #: mycred.php:105
2137
  #@ mycred
2138
  msgid "Settings"
2139
  msgstr ""
@@ -2209,139 +2208,139 @@ msgstr ""
2209
  #: modules/mycred-module-hooks.php:28
2210
  #: modules/mycred-module-hooks.php:29
2211
  #: modules/mycred-module-hooks.php:30
2212
- #: modules/mycred-module-hooks.php:218
2213
  #@ mycred
2214
  msgid "Hooks"
2215
  msgstr ""
2216
 
2217
- #: modules/mycred-module-hooks.php:88
2218
  #, php-format
2219
  #@ mycred
2220
  msgid "%plural% for registrations"
2221
  msgstr ""
2222
 
2223
- #: modules/mycred-module-hooks.php:89
2224
  #@ mycred
2225
  msgid "Award %_plural% for users joining your website."
2226
  msgstr ""
2227
 
2228
- #: modules/mycred-module-hooks.php:95
2229
  #, php-format
2230
  #@ mycred
2231
  msgid "%plural% for logins"
2232
  msgstr ""
2233
 
2234
- #: modules/mycred-module-hooks.php:96
2235
  #@ mycred
2236
  msgid "Award %_plural% for logging in to your website. You can also set an optional limit."
2237
  msgstr ""
2238
 
2239
- #: modules/mycred-module-hooks.php:102
2240
  #, php-format
2241
  #@ mycred
2242
  msgid "%plural% for publishing content"
2243
  msgstr ""
2244
 
2245
- #: modules/mycred-module-hooks.php:103
2246
  #@ mycred
2247
  msgid "Award %_plural% for publishing content on your website. If your custom post type is not shown bellow, make sure it is set to \"Public\"."
2248
  msgstr ""
2249
 
2250
- #: modules/mycred-module-hooks.php:109
2251
  #, php-format
2252
  #@ mycred
2253
  msgid "%plural% for comments"
2254
  msgstr ""
2255
 
2256
- #: modules/mycred-module-hooks.php:110
2257
  #@ mycred
2258
  msgid "Award %_plural% for making comments."
2259
  msgstr ""
2260
 
2261
- #: modules/mycred-module-hooks.php:124
2262
  #@ mycred
2263
  msgid "Invite Anyone Plugin"
2264
  msgstr ""
2265
 
2266
- #: modules/mycred-module-hooks.php:125
2267
  #@ mycred
2268
  msgid "Awards %_plural% for sending invitations and/or %_plural% if the invite is accepted."
2269
  msgstr ""
2270
 
2271
- #: modules/mycred-module-hooks.php:133
2272
  #@ mycred
2273
  msgid "Contact Form 7 Form Submissions"
2274
  msgstr ""
2275
 
2276
- #: modules/mycred-module-hooks.php:134
2277
  #@ mycred
2278
  msgid "Awards %_plural% for successful form submissions (by logged in users)."
2279
  msgstr ""
2280
 
2281
- #: modules/mycred-module-hooks.php:219
2282
  #@ mycred
2283
  msgid "Hooks are instances where %_plural% are awarded or deducted from a user, depending on their actions around your website."
2284
  msgstr ""
2285
 
2286
- #: modules/mycred-module-hooks.php:244
2287
  #@ mycred
2288
  msgid "Update Changes"
2289
  msgstr ""
2290
 
2291
- #: modules/mycred-module-hooks.php:482
2292
- #: modules/mycred-module-plugins.php:141
2293
- #: modules/mycred-module-plugins.php:162
2294
  #@ mycred
2295
  msgid "Limit"
2296
  msgstr ""
2297
 
2298
- #: modules/mycred-module-hooks.php:576
2299
  #, php-format
2300
  #@ mycred
2301
  msgid "%plural% for Posts"
2302
  msgstr ""
2303
 
2304
- #: modules/mycred-module-hooks.php:589
2305
  #, php-format
2306
  #@ mycred
2307
  msgid "%plural% for Pages"
2308
  msgstr ""
2309
 
2310
- #: modules/mycred-module-hooks.php:624
2311
  #, php-format
2312
  #@ mycred
2313
  msgid "%plural% for %s"
2314
  msgstr ""
2315
 
2316
- #: modules/mycred-module-plugins.php:129
2317
  #, php-format
2318
  #@ mycred
2319
  msgid "%plural% for Sending An Invite"
2320
  msgstr ""
2321
 
2322
- #: modules/mycred-module-plugins.php:145
2323
  #@ mycred
2324
  msgid "Maximum number of invites that grants %_plural%. User zero for unlimited."
2325
  msgstr ""
2326
 
2327
- #: modules/mycred-module-plugins.php:149
2328
  #, php-format
2329
  #@ mycred
2330
  msgid "%plural% for Accepting An Invite"
2331
  msgstr ""
2332
 
2333
- #: modules/mycred-module-plugins.php:153
2334
  #, php-format
2335
  #@ mycred
2336
  msgid "%plural% for each invited user that accepts an invitation."
2337
  msgstr ""
2338
 
2339
- #: modules/mycred-module-plugins.php:166
2340
  #@ mycred
2341
  msgid "Maximum number of accepted invitations that grants %_plural%. User zero for unlimited."
2342
  msgstr ""
2343
 
2344
- #: modules/mycred-module-plugins.php:264
2345
  #@ mycred
2346
  msgid "No forms found."
2347
  msgstr ""
@@ -2417,42 +2416,42 @@ msgstr ""
2417
  msgid "myCRED_Module() Error. A Module ID is required!"
2418
  msgstr ""
2419
 
2420
- #: abstracts/mycred-abstract-module.php:283
2421
  #: abstracts/mycred-abstract-module.php:291
 
2422
  #@ mycred
2423
  msgid "Surprise"
2424
  msgstr ""
2425
 
2426
- #: abstracts/mycred-abstract-module.php:339
2427
  #@ mycred
2428
  msgid "click to open"
2429
  msgstr ""
2430
 
2431
- #: abstracts/mycred-abstract-module.php:340
2432
  #@ mycred
2433
  msgid "click to close"
2434
  msgstr ""
2435
 
2436
- #: mycred.php:365
2437
  #@ mycred
2438
  msgid "My Balance: "
2439
  msgstr ""
2440
 
2441
- #: addons/gateway/carts/mycred-marketpress.php:173
2442
  #: addons/gateway/carts/mycred-woocommerce.php:34
2443
  #: includes/mycred-network.php:53
2444
  #: includes/mycred-network.php:54
2445
- #: modules/mycred-module-plugins.php:346
2446
  #@ mycred
2447
  msgid "myCRED"
2448
  msgstr ""
2449
 
2450
- #: addons/buddypress/hooks/bp-groups.php:453
2451
  #@ mycred
2452
  msgid "If you use a negative value and the user does not have enough %_plural% the \"Create Group\" button will be disabled."
2453
  msgstr ""
2454
 
2455
- #: addons/buddypress/hooks/bp-groups.php:538
2456
  #@ mycred
2457
  msgid "If you use a negative value and the user does not have enough %_plural% the \"Join Group\" button will be disabled."
2458
  msgstr ""
@@ -2589,63 +2588,65 @@ msgstr ""
2589
  msgid "Template Tags"
2590
  msgstr ""
2591
 
2592
- #: mycred.php:118
2593
  #@ mycred
2594
  msgid "myCRED is blocked for this site. Please contact your network administrator for further details."
2595
  msgstr ""
2596
 
2597
- #: addons/buddypress/hooks/bp-galleries.php:84
2598
- #: addons/buddypress/hooks/bp-groups.php:465
2599
- #: addons/buddypress/hooks/bp-groups.php:478
2600
- #: addons/buddypress/hooks/bp-groups.php:491
2601
- #: addons/buddypress/hooks/bp-groups.php:504
2602
- #: addons/buddypress/hooks/bp-groups.php:517
2603
- #: addons/buddypress/hooks/bp-groups.php:530
2604
- #: addons/buddypress/hooks/bp-groups.php:544
2605
- #: addons/buddypress/hooks/bp-groups.php:557
2606
- #: addons/buddypress/hooks/bp-groups.php:570
2607
- #: addons/buddypress/hooks/bp-groups.php:583
2608
- #: addons/buddypress/hooks/bp-links.php:187
2609
- #: addons/buddypress/hooks/bp-links.php:200
2610
- #: addons/buddypress/hooks/bp-links.php:213
2611
- #: addons/buddypress/hooks/bp-links.php:226
2612
- #: addons/buddypress/hooks/bp-profile.php:324
2613
- #: addons/buddypress/hooks/bp-profile.php:337
2614
- #: addons/buddypress/hooks/bp-profile.php:376
2615
- #: addons/buddypress/hooks/bp-profile.php:389
2616
- #: addons/buddypress/hooks/bp-profile.php:402
2617
- #: addons/buddypress/hooks/bp-profile.php:415
2618
- #: modules/mycred-module-hooks.php:479
2619
- #: modules/mycred-module-plugins.php:138
2620
- #: modules/mycred-module-plugins.php:159
2621
  #: modules/mycred-module-subscriptions.php:488
2622
  #: modules/mycred-module-subscriptions.php:501
2623
  #@ mycred
2624
  msgid "Available template tags: General"
2625
  msgstr ""
2626
 
2627
- #: addons/buddypress/hooks/bp-press.php:115
2628
- #: addons/buddypress/hooks/bp-press.php:128
2629
- #: modules/mycred-module-hooks.php:586
2630
- #: modules/mycred-module-hooks.php:599
2631
- #: modules/mycred-module-hooks.php:634
2632
- #: modules/mycred-module-plugins.php:294
2633
- #: modules/mycred-module-plugins.php:538
2634
- #: modules/mycred-module-plugins.php:548
 
 
2635
  #@ mycred
2636
  msgid "Available template tags: General, Post"
2637
  msgstr ""
2638
 
2639
- #: addons/buddypress/hooks/bp-profile.php:350
2640
- #: addons/buddypress/hooks/bp-profile.php:363
2641
  #: addons/transfer/myCRED-addon-transfer.php:182
2642
  #: addons/transfer/myCRED-addon-transfer.php:189
2643
- #: modules/mycred-module-hooks.php:344
2644
  #@ mycred
2645
  msgid "Available template tags: General, User"
2646
  msgstr ""
2647
 
2648
- #: addons/buddypress/myCRED-addon-buddypress.php:401
2649
  #, php-format
2650
  #@ mycred
2651
  msgid "Available template tags are: %creds%, %number%, %rank%"
@@ -2691,7 +2692,7 @@ msgstr ""
2691
  msgid "Deduct the amount from your %_plural% balance."
2692
  msgstr ""
2693
 
2694
- #: addons/gateway/carts/mycred-marketpress.php:294
2695
  #: addons/gateway/carts/mycred-woocommerce.php:89
2696
  #, php-format
2697
  #@ mycred
@@ -2704,7 +2705,7 @@ msgstr ""
2704
  msgid "Payment for Order: #%order_id%"
2705
  msgstr ""
2706
 
2707
- #: addons/gateway/carts/mycred-marketpress.php:301
2708
  #: addons/gateway/carts/mycred-woocommerce.php:95
2709
  #, php-format
2710
  #@ mycred
@@ -2786,24 +2787,24 @@ msgstr ""
2786
  msgid "Your current balance"
2787
  msgstr ""
2788
 
2789
- #: modules/mycred-module-hooks.php:853
2790
- #: modules/mycred-module-hooks.php:865
2791
- #: modules/mycred-module-hooks.php:877
2792
  #@ mycred
2793
  msgid "Available template tags: General, Comment"
2794
  msgstr ""
2795
 
2796
- #: modules/mycred-module-hooks.php:844
2797
  #@ mycred
2798
  msgid "Approved Comment"
2799
  msgstr ""
2800
 
2801
- #: modules/mycred-module-hooks.php:856
2802
  #@ mycred
2803
  msgid "Comment Marked SPAM"
2804
  msgstr ""
2805
 
2806
- #: modules/mycred-module-hooks.php:868
2807
  #@ mycred
2808
  msgid "Trashed / Unapproved Comments"
2809
  msgstr ""
@@ -2990,7 +2991,7 @@ msgstr ""
2990
  msgid "Transfers can be made by either using the <code>mycred_transfer</code> shortcode or via the myCRED Transfer Widget.<br />For more information on how to use the shortcode, please visit the"
2991
  msgstr ""
2992
 
2993
- #: includes/mycred-admin.php:159
2994
  #@ mycred
2995
  msgid "Adjust Your Balance"
2996
  msgstr ""
@@ -3364,12 +3365,12 @@ msgstr ""
3364
  msgid "Here you can name your installation along with setting your layout and format. You can use any name as long as you set both the singular and plural format and you can change the name at any time."
3365
  msgstr ""
3366
 
3367
- #: modules/mycred-module-hooks.php:142
3368
  #@ mycred
3369
  msgid "Jetpack Subscriptions"
3370
  msgstr ""
3371
 
3372
- #: modules/mycred-module-hooks.php:143
3373
  #@ mycred
3374
  msgid "Awards %_plural% for users signing up for site or comment updates using Jetpack."
3375
  msgstr ""
@@ -3384,7 +3385,7 @@ msgstr ""
3384
  msgid "Comment Subscriptions"
3385
  msgstr ""
3386
 
3387
- #: addons/buddypress/myCRED-addon-buddypress.php:402
3388
  #, php-format
3389
  #@ mycred
3390
  msgid "Note that you can also use %rank_logo% to show the feature image of the rank."
@@ -3479,7 +3480,7 @@ msgid "Email Notice"
3479
  msgstr ""
3480
 
3481
  #: addons/email-notices/myCRED-addon-email-notices.php:150
3482
- #: addons/ranks/myCRED-addon-ranks.php:119
3483
  #@ mycred
3484
  msgid "Add New"
3485
  msgstr ""
@@ -3887,13 +3888,13 @@ msgid "Email Notice Updated. View <a href=\"%1$s\">All Notices</a>."
3887
  msgstr ""
3888
 
3889
  #: addons/email-notices/myCRED-addon-email-notices.php:909
3890
- #: addons/ranks/myCRED-addon-ranks.php:299
3891
  #@ mycred
3892
  msgid "Custom field updated"
3893
  msgstr ""
3894
 
3895
  #: addons/email-notices/myCRED-addon-email-notices.php:910
3896
- #: addons/ranks/myCRED-addon-ranks.php:300
3897
  #@ mycred
3898
  msgid "Custom filed updated"
3899
  msgstr ""
@@ -3936,117 +3937,117 @@ msgstr ""
3936
  msgid "This email notice is active."
3937
  msgstr ""
3938
 
3939
- #: addons/gateway/carts/mycred-marketpress.php:121
3940
  #, php-format
3941
  #@ mycred
3942
  msgid "Sorry, but you must be logged in to use this gateway. Please <a href=\"%s\">Login</a> or <a href=\"%s\">select a different payment method</a>."
3943
  msgstr ""
3944
 
3945
- #: addons/gateway/carts/mycred-marketpress.php:133
3946
  #, php-format
3947
  #@ mycred
3948
  msgid "Sorry, but you can not use this gateway as your account is excluded. Please <a href=\"%s\">select a different payment method</a>."
3949
  msgstr ""
3950
 
3951
- #: addons/gateway/carts/mycred-marketpress.php:170
3952
  #@ mycred
3953
  msgid "Paid"
3954
  msgstr ""
3955
 
3956
- #: addons/gateway/carts/mycred-marketpress.php:195
3957
  #, php-format
3958
  #@ mycred
3959
  msgid "Insufficient Funds Please select a different payment method. <a href=\"%s\">Go Back</a>"
3960
  msgstr ""
3961
 
3962
- #: addons/gateway/carts/mycred-marketpress.php:253
3963
  #@ mycred
3964
  msgid "%_singular% Balance"
3965
  msgstr ""
3966
 
3967
- #: addons/gateway/carts/mycred-marketpress.php:276
3968
  #, php-format
3969
  #@ mycred
3970
  msgid "Let your users pay for items in their shopping cart using their %s Account. Note! This gateway requires your users to be logged in when making a purchase!"
3971
  msgstr ""
3972
 
3973
- #: addons/gateway/carts/mycred-marketpress.php:279
3974
  #@ mycred
3975
  msgid "Method Name"
3976
  msgstr ""
3977
 
3978
- #: addons/gateway/carts/mycred-marketpress.php:281
3979
  #@ mycred
3980
  msgid "Enter a public name for this payment method that is displayed to users - No HTML"
3981
  msgstr ""
3982
 
3983
- #: addons/gateway/carts/mycred-marketpress.php:286
3984
  #@ mycred
3985
  msgid "Gateway Logo URL"
3986
  msgstr ""
3987
 
3988
- #: addons/gateway/carts/mycred-marketpress.php:315
3989
  #@ mycred
3990
  msgid "User Instructions"
3991
  msgstr ""
3992
 
3993
- #: addons/gateway/carts/mycred-marketpress.php:317
3994
  #@ mycred
3995
  msgid "Information to show users before payment."
3996
  msgstr ""
3997
 
3998
- #: addons/gateway/carts/mycred-marketpress.php:319
3999
  #, php-format
4000
  #@ mycred
4001
  msgid "Available template tags are: %balance% and %balance_f% for users current balance."
4002
  msgstr ""
4003
 
4004
- #: addons/gateway/carts/mycred-marketpress.php:323
4005
  #@ mycred
4006
  msgid "Confirmation Information"
4007
  msgstr ""
4008
 
4009
- #: addons/gateway/carts/mycred-marketpress.php:325
4010
  #@ mycred
4011
  msgid "Information to display on the order confirmation page. - HTML allowed"
4012
  msgstr ""
4013
 
4014
- #: addons/gateway/carts/mycred-marketpress.php:327
4015
  #, php-format
4016
  #@ mycred
4017
  msgid "Available template tags: TOTAL - total cart cost, %balance% and %balance_f% - users current balance."
4018
  msgstr ""
4019
 
4020
- #: addons/gateway/carts/mycred-marketpress.php:331
4021
  #@ mycred
4022
  msgid "Order Confirmation Email"
4023
  msgstr ""
4024
 
4025
- #: addons/gateway/carts/mycred-marketpress.php:333
4026
  #, php-format
4027
  #@ mycred
4028
  msgid "This is the email text to send to those who have made %s checkouts. It overrides the default order checkout email. These codes will be replaced with order details: CUSTOMERNAME, ORDERID, ORDERINFO, SHIPPINGINFO, PAYMENTINFO, TOTAL, TRACKINGURL. No HTML allowed."
4029
  msgstr ""
4030
 
4031
- #: addons/gateway/carts/mycred-marketpress.php:335
4032
  #, php-format
4033
  #@ mycred
4034
  msgid "Available template tags: %balance% or %balance_f% for users balance."
4035
  msgstr ""
4036
 
4037
- #: addons/ranks/includes/mycred-rank-functions.php:126
4038
- #: addons/ranks/includes/mycred-rank-functions.php:132
4039
  #@ mycred
4040
  msgid "No Rank"
4041
  msgstr ""
4042
 
4043
- #: addons/ranks/includes/mycred-rank-shortcodes.php:56
4044
- #: addons/ranks/includes/mycred-rank-shortcodes.php:115
4045
  #@ mycred
4046
  msgid "No users found with this rank"
4047
  msgstr ""
4048
 
4049
- #: addons/ranks/includes/mycred-rank-shortcodes.php:61
4050
  #: includes/mycred-shortcodes.php:139
4051
  #: includes/mycred-shortcodes.php:142
4052
  #: includes/mycred-shortcodes.php:201
@@ -4057,221 +4058,215 @@ msgstr ""
4057
  msgid "error"
4058
  msgstr ""
4059
 
4060
- #: addons/ranks/includes/mycred-rank-shortcodes.php:61
4061
  #@ mycred
4062
  msgid "Rank ID is required!"
4063
  msgstr ""
4064
 
4065
- #: addons/ranks/myCRED-addon-ranks.php:117
4066
- #: addons/ranks/myCRED-addon-ranks.php:123
4067
- #: addons/ranks/myCRED-addon-ranks.php:129
4068
- #: addons/ranks/myCRED-addon-ranks.php:503
4069
- #: addons/ranks/myCRED-addon-ranks.php:581
4070
  #@ mycred
4071
  msgid "Ranks"
4072
  msgstr ""
4073
 
4074
- #: addons/ranks/myCRED-addon-ranks.php:118
4075
- #: addons/ranks/myCRED-addon-ranks.php:230
4076
- #: addons/ranks/myCRED-addon-ranks.php:245
 
4077
  #@ mycred
4078
  msgid "Rank"
4079
  msgstr ""
4080
 
4081
- #: addons/ranks/myCRED-addon-ranks.php:120
4082
  #@ mycred
4083
  msgid "Add New Rank"
4084
  msgstr ""
4085
 
4086
- #: addons/ranks/myCRED-addon-ranks.php:121
4087
  #@ mycred
4088
  msgid "Edit Rank"
4089
  msgstr ""
4090
 
4091
- #: addons/ranks/myCRED-addon-ranks.php:122
4092
  #@ mycred
4093
  msgid "New Rank"
4094
  msgstr ""
4095
 
4096
- #: addons/ranks/myCRED-addon-ranks.php:124
4097
  #@ mycred
4098
  msgid "View Rank"
4099
  msgstr ""
4100
 
4101
- #: addons/ranks/myCRED-addon-ranks.php:125
4102
  #@ mycred
4103
  msgid "Search Ranks"
4104
  msgstr ""
4105
 
4106
- #: addons/ranks/myCRED-addon-ranks.php:126
4107
  #@ mycred
4108
  msgid "No ranks found"
4109
  msgstr ""
4110
 
4111
- #: addons/ranks/myCRED-addon-ranks.php:127
4112
  #@ mycred
4113
  msgid "No ranks found in Trash"
4114
  msgstr ""
4115
 
4116
- #: addons/ranks/myCRED-addon-ranks.php:267
4117
  #@ mycred
4118
  msgid "Newbie"
4119
  msgstr ""
4120
 
4121
- #: addons/ranks/myCRED-addon-ranks.php:298
4122
- #: addons/ranks/myCRED-addon-ranks.php:301
4123
  #, php-format
4124
  #@ mycred
4125
  msgid "Rank Updated. View <a href=\"%1$s\">All Ranks</a>."
4126
  msgstr ""
4127
 
4128
- #: addons/ranks/myCRED-addon-ranks.php:303
4129
  #@ mycred
4130
  msgid "Rank Activated"
4131
  msgstr ""
4132
 
4133
- #: addons/ranks/myCRED-addon-ranks.php:304
4134
  #@ mycred
4135
  msgid "Rank Saved"
4136
  msgstr ""
4137
 
4138
- #: addons/ranks/myCRED-addon-ranks.php:305
4139
  #, php-format
4140
  #@ mycred
4141
  msgid "Rank Submitted for approval. View <a href=\"%1$s\">All Ranks</a>."
4142
  msgstr ""
4143
 
4144
- #: addons/ranks/myCRED-addon-ranks.php:307
4145
  #, php-format
4146
  #@ mycred
4147
  msgid "Rank scheduled for: <strong>%1$s</strong>."
4148
  msgstr ""
4149
 
4150
- #: addons/ranks/myCRED-addon-ranks.php:342
4151
- #: addons/ranks/myCRED-addon-ranks.php:397
4152
  #@ mycred
4153
  msgid "Rank Title"
4154
  msgstr ""
4155
 
4156
- #: addons/ranks/myCRED-addon-ranks.php:343
4157
  #@ mycred
4158
  msgid "Logo"
4159
  msgstr ""
4160
 
4161
- #: addons/ranks/myCRED-addon-ranks.php:344
4162
  #@ mycred
4163
  msgid "Requirement"
4164
  msgstr ""
4165
 
4166
- #: addons/ranks/myCRED-addon-ranks.php:345
4167
  #@ mycred
4168
  msgid "Users"
4169
  msgstr ""
4170
 
4171
- #: addons/ranks/myCRED-addon-ranks.php:361
4172
  #@ mycred
4173
  msgid "No Logo Set"
4174
  msgstr ""
4175
 
4176
- #: addons/ranks/myCRED-addon-ranks.php:370
4177
- #: addons/ranks/myCRED-addon-ranks.php:375
4178
  #@ mycred
4179
  msgid "Any Value"
4180
  msgstr ""
4181
 
4182
- #: addons/ranks/myCRED-addon-ranks.php:377
4183
  #, php-format
4184
  #@ mycred
4185
  msgid "Maximum %plural%"
4186
  msgstr ""
4187
 
4188
- #: addons/ranks/myCRED-addon-ranks.php:410
4189
  #@ mycred
4190
  msgid "Rank Settings"
4191
  msgstr ""
4192
 
4193
- #: addons/ranks/myCRED-addon-ranks.php:432
4194
  #, php-format
4195
  #@ mycred
4196
  msgid "Minimum %plural% to reach this rank"
4197
  msgstr ""
4198
 
4199
- #: addons/ranks/myCRED-addon-ranks.php:436
4200
  #, php-format
4201
  #@ mycred
4202
  msgid "Maximum %plural% to be included in this rank"
4203
  msgstr ""
4204
 
4205
- #: addons/ranks/myCRED-addon-ranks.php:441
4206
  #@ mycred
4207
  msgid "All Published Ranks"
4208
  msgstr ""
4209
 
4210
- #: addons/ranks/myCRED-addon-ranks.php:448
4211
- #: addons/ranks/myCRED-addon-ranks.php:450
4212
  #@ mycred
4213
  msgid "Not Set"
4214
  msgstr ""
4215
 
4216
- #: addons/ranks/myCRED-addon-ranks.php:455
4217
  #@ mycred
4218
  msgid "No Ranks found"
4219
  msgstr ""
4220
 
4221
- #: addons/ranks/myCRED-addon-ranks.php:505
4222
  #@ mycred
4223
  msgid "Public"
4224
  msgstr ""
4225
 
4226
- #: addons/ranks/myCRED-addon-ranks.php:509
4227
  #@ mycred
4228
  msgid "If you want to create a template archive for each rank, you must select to have ranks public. Defaults to disabled."
4229
  msgstr ""
4230
 
4231
- #: addons/ranks/myCRED-addon-ranks.php:513
4232
- #@ mycred
4233
- msgid "Rank Post Type URL Slug"
4234
- msgstr ""
4235
-
4236
- #: addons/ranks/myCRED-addon-ranks.php:515
4237
- #: addons/ranks/myCRED-addon-ranks.php:589
4238
  #@ mycred
4239
  msgid "If you are using a custom permalink structure and you make ranks public or change the slug, you will need to visit your permalink settings page and click \"Save Changes\" to flush your re-write rules! Otherwise you will get a 404 error message when trying to view a rank archive page."
4240
  msgstr ""
4241
 
4242
- #: addons/ranks/myCRED-addon-ranks.php:519
4243
- #: addons/ranks/myCRED-addon-ranks.php:586
4244
  #, php-format
4245
  #@ mycred
4246
  msgid "For more information on Templates for Custom Post Types visit the <a href=\"%s\">WordPress Codex</a>."
4247
  msgstr ""
4248
 
4249
- #: addons/ranks/myCRED-addon-ranks.php:535
4250
  #@ mycred
4251
  msgid "Rank in BuddyPress"
4252
  msgstr ""
4253
 
4254
- #: addons/ranks/myCRED-addon-ranks.php:583
4255
  #@ mycred
4256
  msgid "You can create ranks according to the amount of points a user has. By default, ranks are only visible in widgets and shortcodes however it is possible for you to also create archive pages in your theme for all ranks or specific ones."
4257
  msgstr ""
4258
 
4259
- #: addons/ranks/myCRED-addon-ranks.php:584
4260
  #@ mycred
4261
  msgid "Templates"
4262
  msgstr ""
4263
 
4264
- #: addons/ranks/myCRED-addon-ranks.php:585
4265
  #@ mycred
4266
  msgid "Ranks are just another custom post type which means that you can, if you select to make Ranks Public, create custom template files for ranks in your theme folder."
4267
  msgstr ""
4268
 
4269
- #: addons/ranks/myCRED-addon-ranks.php:587
4270
  #@ mycred
4271
  msgid "Changing URL Slug"
4272
  msgstr ""
4273
 
4274
- #: addons/ranks/myCRED-addon-ranks.php:588
4275
  #@ mycred
4276
  msgid "You can change the URL slug used for ranks to any URL friendly value."
4277
  msgstr ""
@@ -4288,7 +4283,7 @@ msgstr ""
4288
 
4289
  #: addons/sell-content/myCRED-addon-sell-content.php:269
4290
  #: addons/transfer/myCRED-addon-transfer.php:129
4291
- #: mycred.php:493
4292
  #@ mycred
4293
  msgid "Processing..."
4294
  msgstr ""
@@ -4454,84 +4449,84 @@ msgstr ""
4454
  msgid "Descending"
4455
  msgstr ""
4456
 
4457
- #: modules/mycred-module-hooks.php:116
4458
  #, php-format
4459
  #@ mycred
4460
  msgid "%plural% for clicking on links"
4461
  msgstr ""
4462
 
4463
- #: modules/mycred-module-hooks.php:117
4464
  #@ mycred
4465
  msgid "Award %_plural% to users who clicks on links generated by the [mycred_link] shortcode."
4466
  msgstr ""
4467
 
4468
- #: modules/mycred-module-hooks.php:151
4469
  #@ mycred
4470
  msgid "BadgeOS"
4471
  msgstr ""
4472
 
4473
- #: modules/mycred-module-hooks.php:152
4474
  #@ mycred
4475
  msgid "Default settings for each BadgeOS Achievement type. These settings may be overridden for individual achievement type."
4476
  msgstr ""
4477
 
4478
- #: modules/mycred-module-hooks.php:160
4479
  #@ mycred
4480
  msgid "WP-Polls"
4481
  msgstr ""
4482
 
4483
- #: modules/mycred-module-hooks.php:161
4484
  #@ mycred
4485
  msgid "Awards %_plural% for users voting in polls."
4486
  msgstr ""
4487
 
4488
- #: modules/mycred-module-hooks.php:169
4489
  #@ mycred
4490
  msgid "WP Favorite Posts"
4491
  msgstr ""
4492
 
4493
- #: modules/mycred-module-hooks.php:170
4494
  #@ mycred
4495
  msgid "Awards %_plural% for users adding posts to their favorites."
4496
  msgstr ""
4497
 
4498
- #: modules/mycred-module-hooks.php:178
4499
  #@ mycred
4500
  msgid "Events Manager"
4501
  msgstr ""
4502
 
4503
- #: modules/mycred-module-hooks.php:179
4504
  #@ mycred
4505
  msgid "Awards %_plural% for users attending events."
4506
  msgstr ""
4507
 
4508
- #: modules/mycred-module-hooks.php:929
4509
  #@ mycred
4510
  msgid "Once for each unique URL"
4511
  msgstr ""
4512
 
4513
- #: modules/mycred-module-hooks.php:930
4514
  #@ mycred
4515
  msgid "Once for each unique link id"
4516
  msgstr ""
4517
 
4518
- #: modules/mycred-module-hooks.php:1076
4519
  #@ mycred
4520
  msgid "The default amount to award for clicking on links. You can override this in the shortcode."
4521
  msgstr ""
4522
 
4523
- #: modules/mycred-module-hooks.php:1083
4524
  #, php-format
4525
  #@ mycred
4526
  msgid "Available template tags: General and custom tags: %url% or %id%."
4527
  msgstr ""
4528
 
4529
- #: modules/mycred-module-hooks.php:1094
4530
  #@ mycred
4531
  msgid "Remember!"
4532
  msgstr ""
4533
 
4534
- #: modules/mycred-module-hooks.php:1094
4535
  #@ mycred
4536
  msgid "If you select to limit by id and you do not include the id attribute in the shortcode, no %_plural% will be awarded!"
4537
  msgstr ""
@@ -4541,85 +4536,85 @@ msgstr ""
4541
  msgid "User Missing"
4542
  msgstr ""
4543
 
4544
- #: modules/mycred-module-plugins.php:363
4545
  #, php-format
4546
  #@ mycred
4547
  msgid "Please setup your <a href=\"%s\">default settings</a> before using this feature."
4548
  msgstr ""
4549
 
4550
- #: modules/mycred-module-plugins.php:374
4551
- #: modules/mycred-module-plugins.php:376
4552
  #, php-format
4553
  #@ mycred
4554
  msgid "%plural% to Award"
4555
  msgstr ""
4556
 
4557
- #: modules/mycred-module-plugins.php:378
4558
  #@ mycred
4559
  msgid "Use zero to disable"
4560
  msgstr ""
4561
 
4562
- #: modules/mycred-module-plugins.php:389
4563
  #@ mycred
4564
  msgid "Deduction Log Template"
4565
  msgstr ""
4566
 
4567
- #: modules/mycred-module-plugins.php:525
4568
  #, php-format
4569
  #@ mycred
4570
  msgid "Default %s for %s"
4571
  msgstr ""
4572
 
4573
- #: modules/mycred-module-plugins.php:532
4574
  #@ mycred
4575
  msgid "User zero to disable users gaining %_plural%"
4576
  msgstr ""
4577
 
4578
- #: modules/mycred-module-plugins.php:536
4579
  #@ mycred
4580
  msgid "Default Log template"
4581
  msgstr ""
4582
 
4583
- #: modules/mycred-module-plugins.php:674
4584
  #, php-format
4585
  #@ mycred
4586
  msgid "Available template tags: General. You can also use %poll_id% and %poll_question%."
4587
  msgstr ""
4588
 
4589
- #: modules/mycred-module-plugins.php:784
4590
  #@ mycred
4591
  msgid "Adding Content to Favorites"
4592
  msgstr ""
4593
 
4594
- #: modules/mycred-module-plugins.php:794
4595
- #: modules/mycred-module-plugins.php:807
4596
- #: modules/mycred-module-plugins.php:954
4597
- #: modules/mycred-module-plugins.php:967
4598
  #@ mycred
4599
  msgid "Available template tags: General and Post Related"
4600
  msgstr ""
4601
 
4602
- #: modules/mycred-module-plugins.php:797
4603
  #@ mycred
4604
  msgid "Removing Content from Favorites"
4605
  msgstr ""
4606
 
4607
- #: modules/mycred-module-plugins.php:944
4608
  #@ mycred
4609
  msgid "Attending Event"
4610
  msgstr ""
4611
 
4612
- #: modules/mycred-module-plugins.php:957
4613
  #@ mycred
4614
  msgid "Cancelling Attendance"
4615
  msgstr ""
4616
 
4617
- #: mycred.php:494
4618
  #@ mycred
4619
  msgid "Sent"
4620
  msgstr ""
4621
 
4622
- #: mycred.php:495
4623
  #@ mycred
4624
  msgid "Error - Try Again"
4625
  msgstr ""
@@ -4636,3 +4631,133 @@ msgstr ""
4636
  msgid "The users ranking. Was \"%rank%\" before version 1.1"
4637
  msgstr ""
4638
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: myCRED v1.1.1\n"
4
  "Report-Msgid-Bugs-To: \n"
5
  "POT-Creation-Date: \n"
6
+ "PO-Revision-Date: 2013-06-27 23:25:33+0000\n"
7
  "Last-Translator: unimatrix0 <gabriel.s@merovingi.com>\n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
20
  "X-Poedit-SearchPath-0: .\n"
21
  "X-Textdomain-Support: yes"
22
 
23
+ #: addons/buddypress/hooks/bp-galleries.php:72
24
  #, php-format
25
  #@ mycred
26
  msgid "%plural% for New Gallery"
27
  msgstr ""
28
 
29
+ #: addons/buddypress/hooks/bp-galleries.php:79
30
+ #: addons/buddypress/hooks/bp-groups.php:433
31
+ #: addons/buddypress/hooks/bp-groups.php:446
32
+ #: addons/buddypress/hooks/bp-groups.php:459
33
+ #: addons/buddypress/hooks/bp-groups.php:472
34
+ #: addons/buddypress/hooks/bp-groups.php:485
35
+ #: addons/buddypress/hooks/bp-groups.php:498
36
+ #: addons/buddypress/hooks/bp-groups.php:512
37
+ #: addons/buddypress/hooks/bp-groups.php:525
38
+ #: addons/buddypress/hooks/bp-groups.php:538
39
+ #: addons/buddypress/hooks/bp-groups.php:551
40
+ #: addons/buddypress/hooks/bp-links.php:173
41
+ #: addons/buddypress/hooks/bp-links.php:186
42
+ #: addons/buddypress/hooks/bp-links.php:199
43
+ #: addons/buddypress/hooks/bp-links.php:212
44
+ #: addons/buddypress/hooks/bp-profile.php:298
45
+ #: addons/buddypress/hooks/bp-profile.php:311
46
+ #: addons/buddypress/hooks/bp-profile.php:324
47
+ #: addons/buddypress/hooks/bp-profile.php:337
48
+ #: addons/buddypress/hooks/bp-profile.php:350
49
+ #: addons/buddypress/hooks/bp-profile.php:363
50
+ #: addons/buddypress/hooks/bp-profile.php:376
51
+ #: addons/buddypress/hooks/bp-profile.php:389
52
+ #: modules/mycred-module-hooks.php:364
53
+ #: modules/mycred-module-hooks.php:602
54
+ #: modules/mycred-module-hooks.php:615
55
+ #: modules/mycred-module-hooks.php:650
56
+ #: modules/mycred-module-hooks.php:960
57
+ #: modules/mycred-module-hooks.php:972
58
+ #: modules/mycred-module-hooks.php:984
59
+ #: modules/mycred-module-plugins.php:244
60
+ #: modules/mycred-module-plugins.php:257
61
+ #: modules/mycred-module-plugins.php:275
62
+ #: modules/mycred-module-plugins.php:288
63
+ #: modules/mycred-module-plugins.php:442
64
+ #: modules/mycred-module-plugins.php:463
65
+ #: modules/mycred-module-plugins.php:593
66
+ #: modules/mycred-module-plugins.php:847
67
  #: modules/mycred-module-subscriptions.php:486
68
  #: modules/mycred-module-subscriptions.php:499
69
  #@ mycred
70
  msgid "Log template"
71
  msgstr ""
72
 
73
+ #: addons/buddypress/hooks/bp-groups.php:419
74
  #, php-format
75
  #@ mycred
76
  msgid "%plural% for Creating Groups"
77
  msgstr ""
78
 
79
+ #: addons/buddypress/hooks/bp-groups.php:427
80
  #@ mycred
81
  msgid "Number of members before awarding %_plural%"
82
  msgstr ""
83
 
84
+ #: addons/buddypress/hooks/bp-groups.php:429
85
  #@ mycred
86
  msgid "Use zero to award %_plural% when group is created."
87
  msgstr ""
88
 
89
+ #: addons/buddypress/hooks/bp-groups.php:439
90
  #, php-format
91
  #@ mycred
92
  msgid "%plural% for Deleting Groups"
93
  msgstr ""
94
 
95
+ #: addons/buddypress/hooks/bp-groups.php:452
96
  #, php-format
97
  #@ mycred
98
  msgid "%plural% for New Forum Topic"
99
  msgstr ""
100
 
101
+ #: addons/buddypress/hooks/bp-groups.php:465
102
  #, php-format
103
  #@ mycred
104
  msgid "%plural% for Editing Forum Topic"
105
  msgstr ""
106
 
107
+ #: addons/buddypress/hooks/bp-groups.php:478
108
  #, php-format
109
  #@ mycred
110
  msgid "%plural% for New Forum Post"
111
  msgstr ""
112
 
113
+ #: addons/buddypress/hooks/bp-groups.php:491
114
  #, php-format
115
  #@ mycred
116
  msgid "%plural% for Editing Forum Post"
117
  msgstr ""
118
 
119
+ #: addons/buddypress/hooks/bp-groups.php:504
120
  #, php-format
121
  #@ mycred
122
  msgid "%plural% for Joining Groups"
123
  msgstr ""
124
 
125
+ #: addons/buddypress/hooks/bp-groups.php:518
126
  #, php-format
127
  #@ mycred
128
  msgid "%plural% for Leaving Groups"
129
  msgstr ""
130
 
131
+ #: addons/buddypress/hooks/bp-groups.php:531
132
  #, php-format
133
  #@ mycred
134
  msgid "%plural% for New Group Avatar"
135
  msgstr ""
136
 
137
+ #: addons/buddypress/hooks/bp-groups.php:544
138
  #, php-format
139
  #@ mycred
140
  msgid "%plural% for New Group Comment"
141
  msgstr ""
142
 
143
+ #: addons/buddypress/hooks/bp-links.php:166
144
  #, php-format
145
  #@ mycred
146
  msgid "%plural% for New Links"
147
  msgstr ""
148
 
149
+ #: addons/buddypress/hooks/bp-links.php:179
150
  #, php-format
151
  #@ mycred
152
  msgid "%plural% for Vote on Link"
153
  msgstr ""
154
 
155
+ #: addons/buddypress/hooks/bp-links.php:192
156
  #, php-format
157
  #@ mycred
158
  msgid "%plural% for Updating Links"
159
  msgstr ""
160
 
161
+ #: addons/buddypress/hooks/bp-links.php:205
162
  #, php-format
163
  #@ mycred
164
  msgid "%plural% for Deleting Links"
165
  msgstr ""
166
 
167
+ #: modules/mycred-module-plugins.php:250
168
  #, php-format
169
  #@ mycred
170
  msgid "%plural% for New Topic"
171
  msgstr ""
172
 
173
+ #: modules/mycred-module-plugins.php:281
174
  #, php-format
175
  #@ mycred
176
  msgid "%plural% for New Reply"
177
  msgstr ""
178
 
179
+ #: addons/buddypress/hooks/bp-profile.php:291
180
  #, php-format
181
  #@ mycred
182
  msgid "%plural% for Profile Updates"
183
  msgstr ""
184
 
185
+ #: addons/buddypress/hooks/bp-profile.php:304
186
  #, php-format
187
  #@ mycred
188
  msgid "%plural% for New Avatar"
189
  msgstr ""
190
 
191
+ #: addons/buddypress/hooks/bp-profile.php:317
192
  #, php-format
193
  #@ mycred
194
  msgid "%plural% for New Friendships"
195
  msgstr ""
196
 
197
+ #: addons/buddypress/hooks/bp-profile.php:330
198
  #, php-format
199
  #@ mycred
200
  msgid "%plural% for Leaving Friendship"
201
  msgstr ""
202
 
203
+ #: addons/buddypress/hooks/bp-profile.php:343
204
  #, php-format
205
  #@ mycred
206
  msgid "%plural% for New Comment"
207
  msgstr ""
208
 
209
+ #: addons/buddypress/hooks/bp-profile.php:356
210
  #, php-format
211
  #@ mycred
212
  msgid "%plural% for Deleting Comment"
213
  msgstr ""
214
 
215
+ #: addons/buddypress/hooks/bp-profile.php:369
216
  #, php-format
217
  #@ mycred
218
  msgid "%plural% for New Messages"
219
  msgstr ""
220
 
221
+ #: addons/buddypress/hooks/bp-profile.php:382
222
  #, php-format
223
  #@ mycred
224
  msgid "%plural% for Sending Gift"
225
  msgstr ""
226
 
227
+ #: addons/buddypress/myCRED-addon-buddypress.php:49
228
  #: modules/mycred-module-log.php:65
229
  #: modules/mycred-module-log.php:424
230
  #@ mycred
231
  msgid "My History"
232
  msgstr ""
233
 
234
+ #: addons/buddypress/myCRED-addon-buddypress.php:50
235
  #, php-format
236
  #@ mycred
237
  msgid "%s's History"
238
  msgstr ""
239
 
240
+ #: addons/buddypress/myCRED-addon-buddypress.php:353
241
  #, php-format
242
  #@ mycred
243
  msgid "%singular% Balance"
244
  msgstr ""
245
 
246
+ #: addons/buddypress/myCRED-addon-buddypress.php:191
247
  #: modules/mycred-module-log.php:207
248
  #@ mycred
249
  msgid "All"
250
  msgstr ""
251
 
252
+ #: addons/buddypress/myCRED-addon-buddypress.php:192
253
  #: modules/mycred-module-log.php:208
254
  #@ mycred
255
  msgid "Today"
256
  msgstr ""
257
 
258
+ #: addons/buddypress/myCRED-addon-buddypress.php:193
259
  #: modules/mycred-module-log.php:209
260
  #@ mycred
261
  msgid "Yesterday"
262
  msgstr ""
263
 
264
+ #: addons/buddypress/myCRED-addon-buddypress.php:194
265
  #: modules/mycred-module-log.php:210
266
  #@ mycred
267
  msgid "This Week"
268
  msgstr ""
269
 
270
+ #: addons/buddypress/myCRED-addon-buddypress.php:195
271
  #: modules/mycred-module-log.php:211
272
  #@ mycred
273
  msgid "This Month"
274
  msgstr ""
275
 
276
+ #: modules/mycred-module-hooks.php:126
 
 
 
 
 
277
  #@ mycred
278
  msgid "Awards %_plural% for bbPress actions."
279
  msgstr ""
280
 
281
+ #: addons/buddypress/myCRED-addon-buddypress.php:291
282
  #@ default
283
  msgid "BuddyPress: Groups"
284
  msgstr ""
285
 
286
+ #: addons/buddypress/myCRED-addon-buddypress.php:292
287
  #@ mycred
288
  msgid "Awards %_plural% for group related actions. Use minus to deduct %_plural% or zero to disable a specific hook."
289
  msgstr ""
290
 
291
+ #: addons/buddypress/myCRED-addon-buddypress.php:296
292
  #@ default
293
  msgid "BuddyPress: Members"
294
  msgstr ""
295
 
296
+ #: addons/buddypress/myCRED-addon-buddypress.php:297
297
  #@ mycred
298
  msgid "Awards %_plural% for profile related actions."
299
  msgstr ""
300
 
301
+ #: addons/buddypress/myCRED-addon-buddypress.php:303
302
  #@ default
303
  msgid "BuddyPress: Links"
304
  msgstr ""
305
 
306
+ #: addons/buddypress/myCRED-addon-buddypress.php:304
307
  #@ mycred
308
  msgid "Awards %_plural% for link related actions."
309
  msgstr ""
310
 
311
+ #: addons/buddypress/myCRED-addon-buddypress.php:311
312
  #@ default
313
  msgid "BuddyPress: Gallery Actions"
314
  msgstr ""
315
 
316
+ #: addons/buddypress/myCRED-addon-buddypress.php:312
317
  #@ mycred
318
  msgid "Awards %_plural% for creating a new gallery either using BP Album+ or BP Gallery."
319
  msgstr ""
320
 
321
+ #: addons/buddypress/myCRED-addon-buddypress.php:332
322
+ #: addons/buddypress/myCRED-addon-buddypress.php:339
323
+ #: addons/ranks/myCRED-addon-ranks.php:669
324
  #@ mycred
325
  msgid "Do not show."
326
  msgstr ""
327
 
328
+ #: addons/buddypress/myCRED-addon-buddypress.php:333
329
+ #: addons/ranks/myCRED-addon-ranks.php:670
330
  #@ mycred
331
  msgid "Include in Profile Header."
332
  msgstr ""
333
 
334
+ #: addons/buddypress/myCRED-addon-buddypress.php:334
335
+ #: addons/ranks/myCRED-addon-ranks.php:671
336
  #@ mycred
337
  msgid "Include under the \"Profile\" tab"
338
  msgstr ""
339
 
340
+ #: addons/buddypress/myCRED-addon-buddypress.php:335
341
+ #: addons/ranks/myCRED-addon-ranks.php:672
342
  #@ mycred
343
  msgid "Include under the \"Profile\" tab and Profile Header."
344
  msgstr ""
345
 
346
+ #: addons/buddypress/myCRED-addon-buddypress.php:340
347
  #@ mycred
348
  msgid "Show in Profile"
349
  msgstr ""
350
 
351
+ #: addons/buddypress/myCRED-addon-buddypress.php:351
352
  #@ mycred
353
  msgid "BuddyPress"
354
  msgstr ""
355
 
356
+ #: addons/buddypress/myCRED-addon-buddypress.php:369
357
  #@ mycred
358
  msgid "Members can view each others %_singular% balance."
359
  msgstr ""
360
 
361
+ #: addons/buddypress/myCRED-addon-buddypress.php:374
362
  #@ mycred
363
  msgid "Template"
364
  msgstr ""
365
 
366
+ #: addons/buddypress/myCRED-addon-buddypress.php:381
367
  #: includes/mycred-widgets.php:159
368
  #: modules/mycred-module-log.php:66
369
  #, php-format
371
  msgid "%plural% History"
372
  msgstr ""
373
 
374
+ #: addons/buddypress/myCRED-addon-buddypress.php:397
375
  #@ mycred
376
  msgid "Members can view each others %_plural% history."
377
  msgstr ""
378
 
379
+ #: addons/buddypress/myCRED-addon-buddypress.php:402
380
  #@ mycred
381
  msgid "Menu Title"
382
  msgstr ""
383
 
384
+ #: addons/buddypress/myCRED-addon-buddypress.php:404
385
  #@ mycred
386
  msgid "Title shown to me"
387
  msgstr ""
388
 
389
+ #: addons/buddypress/myCRED-addon-buddypress.php:409
390
  #, php-format
391
  #@ mycred
392
  msgid "Title shown to others. Use %s to show the first name."
393
  msgstr ""
394
 
395
+ #: addons/buddypress/myCRED-addon-buddypress.php:414
396
  #@ mycred
397
  msgid "Menu Position"
398
  msgstr ""
399
 
400
+ #: addons/buddypress/myCRED-addon-buddypress.php:416
401
  #@ mycred
402
  msgid "Current menu positions:"
403
  msgstr ""
406
  #: includes/mycred-network.php:115
407
  #: modules/mycred-module-addons.php:249
408
  #: modules/mycred-module-general.php:35
409
+ #: modules/mycred-module-hooks.php:216
410
  #: modules/mycred-module-log.php:326
411
  #: modules/mycred-module-log.php:402
412
  #@ mycred
665
  msgstr ""
666
 
667
  #: abstracts/mycred-abstract-hook.php:136
668
+ #: addons/buy-creds/abstracts/mycred-abstract-payment-gateway.php:515
669
+ #: addons/buy-creds/abstracts/mycred-abstract-payment-gateway.php:538
670
  #: addons/buy-creds/gateways/netbilling.php:514
671
  #: addons/buy-creds/gateways/zombaio.php:382
672
  #: addons/buy-creds/myCRED-addon-buy-creds.php:231
859
 
860
  #: addons/buy-creds/gateways/skrill.php:386
861
  #: addons/gateway/carts/mycred-woocommerce.php:75
862
+ #: addons/ranks/myCRED-addon-ranks.php:618
863
  #: addons/transfer/myCRED-addon-transfer.php:581
864
  #: includes/mycred-widgets.php:185
865
  #: includes/mycred-widgets.php:356
930
  msgstr ""
931
 
932
  #: addons/buy-creds/myCRED-addon-buy-creds.php:195
933
+ #: addons/ranks/myCRED-addon-ranks.php:479
934
  #, php-format
935
  #@ mycred
936
  msgid "Minimum %plural%"
981
 
982
  #: addons/buy-creds/myCRED-addon-buy-creds.php:209
983
  #: addons/buy-creds/myCRED-addon-buy-creds.php:264
984
+ #: addons/gateway/carts/mycred-marketpress.php:298
985
  #: addons/gateway/carts/mycred-woocommerce.php:87
986
+ #: modules/mycred-module-hooks.php:496
987
+ #: modules/mycred-module-hooks.php:1222
988
+ #: modules/mycred-module-plugins.php:681
989
+ #: modules/mycred-module-plugins.php:683
990
+ #: modules/mycred-module-plugins.php:692
991
+ #: modules/mycred-module-plugins.php:971
992
+ #: modules/mycred-module-plugins.php:1091
993
+ #: modules/mycred-module-plugins.php:1104
994
+ #: modules/mycred-module-plugins.php:1251
995
+ #: modules/mycred-module-plugins.php:1264
996
  #@ mycred
997
  msgid "Log Template"
998
  msgstr ""
1005
 
1006
  #: addons/buy-creds/myCRED-addon-buy-creds.php:310
1007
  #: modules/mycred-module-general.php:42
1008
+ #: modules/mycred-module-hooks.php:223
1009
  #@ mycred
1010
  msgid "Settings Updated"
1011
  msgstr ""
1017
  msgstr ""
1018
 
1019
  #: addons/buy-creds/myCRED-addon-buy-creds.php:339
1020
+ #: modules/mycred-module-hooks.php:241
1021
  #@ mycred
1022
  msgid "Enable"
1023
  msgstr ""
1115
  msgid "Click here if you are not automatically redirected"
1116
  msgstr ""
1117
 
1118
+ #: addons/buy-creds/abstracts/mycred-abstract-payment-gateway.php:866
1119
  #@ mycred
1120
  msgid "Outside US"
1121
  msgstr ""
1163
  msgid "Import %_plural% from pre-existing custom user meta."
1164
  msgstr ""
1165
 
1166
+ #: addons/import/myCRED-addon-import.php:210
1167
  #@ mycred
1168
  msgid "No file selected. Please select your CSV file and try again."
1169
  msgstr ""
1170
 
1171
+ #: addons/import/myCRED-addon-import.php:225
1172
  #@ mycred
1173
  msgid "Failed to load file."
1174
  msgstr ""
1175
 
1176
+ #: addons/import/myCRED-addon-import.php:246
1177
  #: addons/import/myCRED-addon-import.php:416
1178
  #, php-format
1179
  #@ mycred
1180
  msgid "Zero rows imported! Skipped %d entries. Import completed in %.2f seconds."
1181
  msgstr ""
1182
 
1183
+ #: addons/import/myCRED-addon-import.php:255
1184
  #@ mycred
1185
  msgid "No valid records found in file. Make sure you have selected the correct way to identify users in the mycred_user column!"
1186
  msgstr ""
1187
 
1188
+ #: addons/import/myCRED-addon-import.php:261
1189
  #: addons/import/myCRED-addon-import.php:344
1190
  #: addons/import/myCRED-addon-import.php:431
1191
  #, php-format
1193
  msgid "Import successfully completed. A total of %d users were effected and %d entires were skipped. Import completed in %.2f seconds."
1194
  msgstr ""
1195
 
1196
+ #: addons/import/myCRED-addon-import.php:295
1197
  #: addons/import/myCRED-addon-import.php:580
1198
  #@ mycred
1199
  msgid "No CubePoints found."
1266
  msgid "Email"
1267
  msgstr ""
1268
 
1269
+ #: addons/gateway/carts/mycred-marketpress.php:312
1270
  #: addons/gateway/carts/mycred-woocommerce.php:100
1271
  #: addons/import/myCRED-addon-import.php:518
1272
  #: addons/import/myCRED-addon-import.php:587
1646
  msgstr ""
1647
 
1648
  #: addons/transfer/myCRED-addon-transfer.php:192
1649
+ #: modules/mycred-module-hooks.php:989
1650
+ #: modules/mycred-module-hooks.php:1229
1651
  #@ mycred
1652
  msgid "Limits"
1653
  msgstr ""
1749
  msgid "My current %singular% balance"
1750
  msgstr ""
1751
 
1752
+ #: includes/mycred-admin.php:162
1753
  #@ mycred
1754
  msgid "Adjust Users Balance"
1755
  msgstr ""
1756
 
1757
+ #: includes/mycred-admin.php:177
1758
  #@ mycred
1759
  msgid "Log description for adjustment"
1760
  msgstr ""
1761
 
1762
+ #: includes/mycred-admin.php:169
1763
  #@ mycred
1764
  msgid "required"
1765
  msgstr ""
1766
 
1767
+ #: includes/mycred-admin.php:178
1768
  #@ mycred
1769
  msgid "Update"
1770
  msgstr ""
1771
 
1772
+ #: includes/mycred-admin.php:184
1773
  #@ mycred
1774
  msgid "Users Current Balance"
1775
  msgstr ""
1797
 
1798
  #: addons/email-notices/myCRED-addon-email-notices.php:589
1799
  #: includes/mycred-install.php:398
1800
+ #: mycred.php:112
1801
  #@ mycred
1802
  msgid "Setup"
1803
  msgstr ""
2032
  msgstr ""
2033
 
2034
  #: abstracts/mycred-abstract-hook.php:125
2035
+ #: modules/mycred-module-hooks.php:1071
2036
  #@ mycred
2037
  msgid "No limit"
2038
  msgstr ""
2125
  msgid "Visit Website"
2126
  msgstr ""
2127
 
2128
+ #: addons/gateway/carts/mycred-marketpress.php:280
2129
  #: includes/mycred-network.php:139
2130
  #: modules/mycred-module-general.php:19
2131
  #: modules/mycred-module-general.php:20
2132
  #: modules/mycred-module-general.php:21
2133
  #: modules/mycred-module-general.php:47
2134
  #: modules/mycred-module-log.php:306
2135
+ #: mycred.php:119
2136
  #@ mycred
2137
  msgid "Settings"
2138
  msgstr ""
2208
  #: modules/mycred-module-hooks.php:28
2209
  #: modules/mycred-module-hooks.php:29
2210
  #: modules/mycred-module-hooks.php:30
2211
+ #: modules/mycred-module-hooks.php:228
2212
  #@ mycred
2213
  msgid "Hooks"
2214
  msgstr ""
2215
 
2216
+ #: modules/mycred-module-hooks.php:89
2217
  #, php-format
2218
  #@ mycred
2219
  msgid "%plural% for registrations"
2220
  msgstr ""
2221
 
2222
+ #: modules/mycred-module-hooks.php:90
2223
  #@ mycred
2224
  msgid "Award %_plural% for users joining your website."
2225
  msgstr ""
2226
 
2227
+ #: modules/mycred-module-hooks.php:96
2228
  #, php-format
2229
  #@ mycred
2230
  msgid "%plural% for logins"
2231
  msgstr ""
2232
 
2233
+ #: modules/mycred-module-hooks.php:97
2234
  #@ mycred
2235
  msgid "Award %_plural% for logging in to your website. You can also set an optional limit."
2236
  msgstr ""
2237
 
2238
+ #: modules/mycred-module-hooks.php:103
2239
  #, php-format
2240
  #@ mycred
2241
  msgid "%plural% for publishing content"
2242
  msgstr ""
2243
 
2244
+ #: modules/mycred-module-hooks.php:104
2245
  #@ mycred
2246
  msgid "Award %_plural% for publishing content on your website. If your custom post type is not shown bellow, make sure it is set to \"Public\"."
2247
  msgstr ""
2248
 
2249
+ #: modules/mycred-module-hooks.php:110
2250
  #, php-format
2251
  #@ mycred
2252
  msgid "%plural% for comments"
2253
  msgstr ""
2254
 
2255
+ #: modules/mycred-module-hooks.php:111
2256
  #@ mycred
2257
  msgid "Award %_plural% for making comments."
2258
  msgstr ""
2259
 
2260
+ #: modules/mycred-module-hooks.php:134
2261
  #@ mycred
2262
  msgid "Invite Anyone Plugin"
2263
  msgstr ""
2264
 
2265
+ #: modules/mycred-module-hooks.php:135
2266
  #@ mycred
2267
  msgid "Awards %_plural% for sending invitations and/or %_plural% if the invite is accepted."
2268
  msgstr ""
2269
 
2270
+ #: modules/mycred-module-hooks.php:143
2271
  #@ mycred
2272
  msgid "Contact Form 7 Form Submissions"
2273
  msgstr ""
2274
 
2275
+ #: modules/mycred-module-hooks.php:144
2276
  #@ mycred
2277
  msgid "Awards %_plural% for successful form submissions (by logged in users)."
2278
  msgstr ""
2279
 
2280
+ #: modules/mycred-module-hooks.php:229
2281
  #@ mycred
2282
  msgid "Hooks are instances where %_plural% are awarded or deducted from a user, depending on their actions around your website."
2283
  msgstr ""
2284
 
2285
+ #: modules/mycred-module-hooks.php:254
2286
  #@ mycred
2287
  msgid "Update Changes"
2288
  msgstr ""
2289
 
2290
+ #: modules/mycred-module-hooks.php:503
2291
+ #: modules/mycred-module-plugins.php:447
2292
+ #: modules/mycred-module-plugins.php:468
2293
  #@ mycred
2294
  msgid "Limit"
2295
  msgstr ""
2296
 
2297
+ #: modules/mycred-module-hooks.php:596
2298
  #, php-format
2299
  #@ mycred
2300
  msgid "%plural% for Posts"
2301
  msgstr ""
2302
 
2303
+ #: modules/mycred-module-hooks.php:609
2304
  #, php-format
2305
  #@ mycred
2306
  msgid "%plural% for Pages"
2307
  msgstr ""
2308
 
2309
+ #: modules/mycred-module-hooks.php:644
2310
  #, php-format
2311
  #@ mycred
2312
  msgid "%plural% for %s"
2313
  msgstr ""
2314
 
2315
+ #: modules/mycred-module-plugins.php:435
2316
  #, php-format
2317
  #@ mycred
2318
  msgid "%plural% for Sending An Invite"
2319
  msgstr ""
2320
 
2321
+ #: modules/mycred-module-plugins.php:451
2322
  #@ mycred
2323
  msgid "Maximum number of invites that grants %_plural%. User zero for unlimited."
2324
  msgstr ""
2325
 
2326
+ #: modules/mycred-module-plugins.php:455
2327
  #, php-format
2328
  #@ mycred
2329
  msgid "%plural% for Accepting An Invite"
2330
  msgstr ""
2331
 
2332
+ #: modules/mycred-module-plugins.php:459
2333
  #, php-format
2334
  #@ mycred
2335
  msgid "%plural% for each invited user that accepts an invitation."
2336
  msgstr ""
2337
 
2338
+ #: modules/mycred-module-plugins.php:472
2339
  #@ mycred
2340
  msgid "Maximum number of accepted invitations that grants %_plural%. User zero for unlimited."
2341
  msgstr ""
2342
 
2343
+ #: modules/mycred-module-plugins.php:565
2344
  #@ mycred
2345
  msgid "No forms found."
2346
  msgstr ""
2416
  msgid "myCRED_Module() Error. A Module ID is required!"
2417
  msgstr ""
2418
 
 
2419
  #: abstracts/mycred-abstract-module.php:291
2420
+ #: abstracts/mycred-abstract-module.php:299
2421
  #@ mycred
2422
  msgid "Surprise"
2423
  msgstr ""
2424
 
2425
+ #: abstracts/mycred-abstract-module.php:347
2426
  #@ mycred
2427
  msgid "click to open"
2428
  msgstr ""
2429
 
2430
+ #: abstracts/mycred-abstract-module.php:348
2431
  #@ mycred
2432
  msgid "click to close"
2433
  msgstr ""
2434
 
2435
+ #: mycred.php:397
2436
  #@ mycred
2437
  msgid "My Balance: "
2438
  msgstr ""
2439
 
2440
+ #: addons/gateway/carts/mycred-marketpress.php:179
2441
  #: addons/gateway/carts/mycred-woocommerce.php:34
2442
  #: includes/mycred-network.php:53
2443
  #: includes/mycred-network.php:54
2444
+ #: modules/mycred-module-plugins.php:647
2445
  #@ mycred
2446
  msgid "myCRED"
2447
  msgstr ""
2448
 
2449
+ #: addons/buddypress/hooks/bp-groups.php:423
2450
  #@ mycred
2451
  msgid "If you use a negative value and the user does not have enough %_plural% the \"Create Group\" button will be disabled."
2452
  msgstr ""
2453
 
2454
+ #: addons/buddypress/hooks/bp-groups.php:508
2455
  #@ mycred
2456
  msgid "If you use a negative value and the user does not have enough %_plural% the \"Join Group\" button will be disabled."
2457
  msgstr ""
2588
  msgid "Template Tags"
2589
  msgstr ""
2590
 
2591
+ #: mycred.php:132
2592
  #@ mycred
2593
  msgid "myCRED is blocked for this site. Please contact your network administrator for further details."
2594
  msgstr ""
2595
 
2596
+ #: addons/buddypress/hooks/bp-galleries.php:81
2597
+ #: addons/buddypress/hooks/bp-groups.php:435
2598
+ #: addons/buddypress/hooks/bp-groups.php:448
2599
+ #: addons/buddypress/hooks/bp-groups.php:461
2600
+ #: addons/buddypress/hooks/bp-groups.php:474
2601
+ #: addons/buddypress/hooks/bp-groups.php:487
2602
+ #: addons/buddypress/hooks/bp-groups.php:500
2603
+ #: addons/buddypress/hooks/bp-groups.php:514
2604
+ #: addons/buddypress/hooks/bp-groups.php:527
2605
+ #: addons/buddypress/hooks/bp-groups.php:540
2606
+ #: addons/buddypress/hooks/bp-groups.php:553
2607
+ #: addons/buddypress/hooks/bp-links.php:175
2608
+ #: addons/buddypress/hooks/bp-links.php:188
2609
+ #: addons/buddypress/hooks/bp-links.php:201
2610
+ #: addons/buddypress/hooks/bp-links.php:214
2611
+ #: addons/buddypress/hooks/bp-profile.php:300
2612
+ #: addons/buddypress/hooks/bp-profile.php:313
2613
+ #: addons/buddypress/hooks/bp-profile.php:352
2614
+ #: addons/buddypress/hooks/bp-profile.php:365
2615
+ #: addons/buddypress/hooks/bp-profile.php:378
2616
+ #: addons/buddypress/hooks/bp-profile.php:391
2617
+ #: modules/mycred-module-hooks.php:500
2618
+ #: modules/mycred-module-plugins.php:444
2619
+ #: modules/mycred-module-plugins.php:465
2620
  #: modules/mycred-module-subscriptions.php:488
2621
  #: modules/mycred-module-subscriptions.php:501
2622
  #@ mycred
2623
  msgid "Available template tags: General"
2624
  msgstr ""
2625
 
2626
+ #: modules/mycred-module-hooks.php:606
2627
+ #: modules/mycred-module-hooks.php:619
2628
+ #: modules/mycred-module-hooks.php:654
2629
+ #: modules/mycred-module-plugins.php:246
2630
+ #: modules/mycred-module-plugins.php:259
2631
+ #: modules/mycred-module-plugins.php:277
2632
+ #: modules/mycred-module-plugins.php:290
2633
+ #: modules/mycred-module-plugins.php:595
2634
+ #: modules/mycred-module-plugins.php:839
2635
+ #: modules/mycred-module-plugins.php:849
2636
  #@ mycred
2637
  msgid "Available template tags: General, Post"
2638
  msgstr ""
2639
 
2640
+ #: addons/buddypress/hooks/bp-profile.php:326
2641
+ #: addons/buddypress/hooks/bp-profile.php:339
2642
  #: addons/transfer/myCRED-addon-transfer.php:182
2643
  #: addons/transfer/myCRED-addon-transfer.php:189
2644
+ #: modules/mycred-module-hooks.php:368
2645
  #@ mycred
2646
  msgid "Available template tags: General, User"
2647
  msgstr ""
2648
 
2649
+ #: addons/buddypress/myCRED-addon-buddypress.php:376
2650
  #, php-format
2651
  #@ mycred
2652
  msgid "Available template tags are: %creds%, %number%, %rank%"
2692
  msgid "Deduct the amount from your %_plural% balance."
2693
  msgstr ""
2694
 
2695
+ #: addons/gateway/carts/mycred-marketpress.php:300
2696
  #: addons/gateway/carts/mycred-woocommerce.php:89
2697
  #, php-format
2698
  #@ mycred
2705
  msgid "Payment for Order: #%order_id%"
2706
  msgstr ""
2707
 
2708
+ #: addons/gateway/carts/mycred-marketpress.php:307
2709
  #: addons/gateway/carts/mycred-woocommerce.php:95
2710
  #, php-format
2711
  #@ mycred
2787
  msgid "Your current balance"
2788
  msgstr ""
2789
 
2790
+ #: modules/mycred-module-hooks.php:962
2791
+ #: modules/mycred-module-hooks.php:974
2792
+ #: modules/mycred-module-hooks.php:986
2793
  #@ mycred
2794
  msgid "Available template tags: General, Comment"
2795
  msgstr ""
2796
 
2797
+ #: modules/mycred-module-hooks.php:953
2798
  #@ mycred
2799
  msgid "Approved Comment"
2800
  msgstr ""
2801
 
2802
+ #: modules/mycred-module-hooks.php:965
2803
  #@ mycred
2804
  msgid "Comment Marked SPAM"
2805
  msgstr ""
2806
 
2807
+ #: modules/mycred-module-hooks.php:977
2808
  #@ mycred
2809
  msgid "Trashed / Unapproved Comments"
2810
  msgstr ""
2991
  msgid "Transfers can be made by either using the <code>mycred_transfer</code> shortcode or via the myCRED Transfer Widget.<br />For more information on how to use the shortcode, please visit the"
2992
  msgstr ""
2993
 
2994
+ #: includes/mycred-admin.php:160
2995
  #@ mycred
2996
  msgid "Adjust Your Balance"
2997
  msgstr ""
3365
  msgid "Here you can name your installation along with setting your layout and format. You can use any name as long as you set both the singular and plural format and you can change the name at any time."
3366
  msgstr ""
3367
 
3368
+ #: modules/mycred-module-hooks.php:152
3369
  #@ mycred
3370
  msgid "Jetpack Subscriptions"
3371
  msgstr ""
3372
 
3373
+ #: modules/mycred-module-hooks.php:153
3374
  #@ mycred
3375
  msgid "Awards %_plural% for users signing up for site or comment updates using Jetpack."
3376
  msgstr ""
3385
  msgid "Comment Subscriptions"
3386
  msgstr ""
3387
 
3388
+ #: addons/buddypress/myCRED-addon-buddypress.php:377
3389
  #, php-format
3390
  #@ mycred
3391
  msgid "Note that you can also use %rank_logo% to show the feature image of the rank."
3480
  msgstr ""
3481
 
3482
  #: addons/email-notices/myCRED-addon-email-notices.php:150
3483
+ #: addons/ranks/myCRED-addon-ranks.php:147
3484
  #@ mycred
3485
  msgid "Add New"
3486
  msgstr ""
3888
  msgstr ""
3889
 
3890
  #: addons/email-notices/myCRED-addon-email-notices.php:909
3891
+ #: addons/ranks/myCRED-addon-ranks.php:384
3892
  #@ mycred
3893
  msgid "Custom field updated"
3894
  msgstr ""
3895
 
3896
  #: addons/email-notices/myCRED-addon-email-notices.php:910
3897
+ #: addons/ranks/myCRED-addon-ranks.php:385
3898
  #@ mycred
3899
  msgid "Custom filed updated"
3900
  msgstr ""
3937
  msgid "This email notice is active."
3938
  msgstr ""
3939
 
3940
+ #: addons/gateway/carts/mycred-marketpress.php:127
3941
  #, php-format
3942
  #@ mycred
3943
  msgid "Sorry, but you must be logged in to use this gateway. Please <a href=\"%s\">Login</a> or <a href=\"%s\">select a different payment method</a>."
3944
  msgstr ""
3945
 
3946
+ #: addons/gateway/carts/mycred-marketpress.php:139
3947
  #, php-format
3948
  #@ mycred
3949
  msgid "Sorry, but you can not use this gateway as your account is excluded. Please <a href=\"%s\">select a different payment method</a>."
3950
  msgstr ""
3951
 
3952
+ #: addons/gateway/carts/mycred-marketpress.php:176
3953
  #@ mycred
3954
  msgid "Paid"
3955
  msgstr ""
3956
 
3957
+ #: addons/gateway/carts/mycred-marketpress.php:201
3958
  #, php-format
3959
  #@ mycred
3960
  msgid "Insufficient Funds Please select a different payment method. <a href=\"%s\">Go Back</a>"
3961
  msgstr ""
3962
 
3963
+ #: addons/gateway/carts/mycred-marketpress.php:259
3964
  #@ mycred
3965
  msgid "%_singular% Balance"
3966
  msgstr ""
3967
 
3968
+ #: addons/gateway/carts/mycred-marketpress.php:282
3969
  #, php-format
3970
  #@ mycred
3971
  msgid "Let your users pay for items in their shopping cart using their %s Account. Note! This gateway requires your users to be logged in when making a purchase!"
3972
  msgstr ""
3973
 
3974
+ #: addons/gateway/carts/mycred-marketpress.php:285
3975
  #@ mycred
3976
  msgid "Method Name"
3977
  msgstr ""
3978
 
3979
+ #: addons/gateway/carts/mycred-marketpress.php:287
3980
  #@ mycred
3981
  msgid "Enter a public name for this payment method that is displayed to users - No HTML"
3982
  msgstr ""
3983
 
3984
+ #: addons/gateway/carts/mycred-marketpress.php:292
3985
  #@ mycred
3986
  msgid "Gateway Logo URL"
3987
  msgstr ""
3988
 
3989
+ #: addons/gateway/carts/mycred-marketpress.php:321
3990
  #@ mycred
3991
  msgid "User Instructions"
3992
  msgstr ""
3993
 
3994
+ #: addons/gateway/carts/mycred-marketpress.php:323
3995
  #@ mycred
3996
  msgid "Information to show users before payment."
3997
  msgstr ""
3998
 
3999
+ #: addons/gateway/carts/mycred-marketpress.php:325
4000
  #, php-format
4001
  #@ mycred
4002
  msgid "Available template tags are: %balance% and %balance_f% for users current balance."
4003
  msgstr ""
4004
 
4005
+ #: addons/gateway/carts/mycred-marketpress.php:329
4006
  #@ mycred
4007
  msgid "Confirmation Information"
4008
  msgstr ""
4009
 
4010
+ #: addons/gateway/carts/mycred-marketpress.php:331
4011
  #@ mycred
4012
  msgid "Information to display on the order confirmation page. - HTML allowed"
4013
  msgstr ""
4014
 
4015
+ #: addons/gateway/carts/mycred-marketpress.php:333
4016
  #, php-format
4017
  #@ mycred
4018
  msgid "Available template tags: TOTAL - total cart cost, %balance% and %balance_f% - users current balance."
4019
  msgstr ""
4020
 
4021
+ #: addons/gateway/carts/mycred-marketpress.php:337
4022
  #@ mycred
4023
  msgid "Order Confirmation Email"
4024
  msgstr ""
4025
 
4026
+ #: addons/gateway/carts/mycred-marketpress.php:339
4027
  #, php-format
4028
  #@ mycred
4029
  msgid "This is the email text to send to those who have made %s checkouts. It overrides the default order checkout email. These codes will be replaced with order details: CUSTOMERNAME, ORDERID, ORDERINFO, SHIPPINGINFO, PAYMENTINFO, TOTAL, TRACKINGURL. No HTML allowed."
4030
  msgstr ""
4031
 
4032
+ #: addons/gateway/carts/mycred-marketpress.php:341
4033
  #, php-format
4034
  #@ mycred
4035
  msgid "Available template tags: %balance% or %balance_f% for users balance."
4036
  msgstr ""
4037
 
4038
+ #: addons/ranks/includes/mycred-rank-functions.php:137
4039
+ #: addons/ranks/includes/mycred-rank-functions.php:143
4040
  #@ mycred
4041
  msgid "No Rank"
4042
  msgstr ""
4043
 
4044
+ #: addons/ranks/includes/mycred-rank-shortcodes.php:57
4045
+ #: addons/ranks/includes/mycred-rank-shortcodes.php:132
4046
  #@ mycred
4047
  msgid "No users found with this rank"
4048
  msgstr ""
4049
 
4050
+ #: addons/ranks/includes/mycred-rank-shortcodes.php:62
4051
  #: includes/mycred-shortcodes.php:139
4052
  #: includes/mycred-shortcodes.php:142
4053
  #: includes/mycred-shortcodes.php:201
4058
  msgid "error"
4059
  msgstr ""
4060
 
4061
+ #: addons/ranks/includes/mycred-rank-shortcodes.php:62
4062
  #@ mycred
4063
  msgid "Rank ID is required!"
4064
  msgstr ""
4065
 
4066
+ #: addons/ranks/myCRED-addon-ranks.php:145
4067
+ #: addons/ranks/myCRED-addon-ranks.php:151
4068
+ #: addons/ranks/myCRED-addon-ranks.php:157
4069
+ #: addons/ranks/myCRED-addon-ranks.php:613
4070
+ #: addons/ranks/myCRED-addon-ranks.php:728
4071
  #@ mycred
4072
  msgid "Ranks"
4073
  msgstr ""
4074
 
4075
+ #: addons/ranks/myCRED-addon-ranks.php:146
4076
+ #: addons/ranks/myCRED-addon-ranks.php:315
4077
+ #: addons/ranks/myCRED-addon-ranks.php:330
4078
+ #: addons/ranks/myCRED-addon-ranks.php:423
4079
  #@ mycred
4080
  msgid "Rank"
4081
  msgstr ""
4082
 
4083
+ #: addons/ranks/myCRED-addon-ranks.php:148
4084
  #@ mycred
4085
  msgid "Add New Rank"
4086
  msgstr ""
4087
 
4088
+ #: addons/ranks/myCRED-addon-ranks.php:149
4089
  #@ mycred
4090
  msgid "Edit Rank"
4091
  msgstr ""
4092
 
4093
+ #: addons/ranks/myCRED-addon-ranks.php:150
4094
  #@ mycred
4095
  msgid "New Rank"
4096
  msgstr ""
4097
 
4098
+ #: addons/ranks/myCRED-addon-ranks.php:152
4099
  #@ mycred
4100
  msgid "View Rank"
4101
  msgstr ""
4102
 
4103
+ #: addons/ranks/myCRED-addon-ranks.php:153
4104
  #@ mycred
4105
  msgid "Search Ranks"
4106
  msgstr ""
4107
 
4108
+ #: addons/ranks/myCRED-addon-ranks.php:154
4109
  #@ mycred
4110
  msgid "No ranks found"
4111
  msgstr ""
4112
 
4113
+ #: addons/ranks/myCRED-addon-ranks.php:155
4114
  #@ mycred
4115
  msgid "No ranks found in Trash"
4116
  msgstr ""
4117
 
4118
+ #: addons/ranks/myCRED-addon-ranks.php:352
4119
  #@ mycred
4120
  msgid "Newbie"
4121
  msgstr ""
4122
 
4123
+ #: addons/ranks/myCRED-addon-ranks.php:383
4124
+ #: addons/ranks/myCRED-addon-ranks.php:386
4125
  #, php-format
4126
  #@ mycred
4127
  msgid "Rank Updated. View <a href=\"%1$s\">All Ranks</a>."
4128
  msgstr ""
4129
 
4130
+ #: addons/ranks/myCRED-addon-ranks.php:388
4131
  #@ mycred
4132
  msgid "Rank Activated"
4133
  msgstr ""
4134
 
4135
+ #: addons/ranks/myCRED-addon-ranks.php:389
4136
  #@ mycred
4137
  msgid "Rank Saved"
4138
  msgstr ""
4139
 
4140
+ #: addons/ranks/myCRED-addon-ranks.php:390
4141
  #, php-format
4142
  #@ mycred
4143
  msgid "Rank Submitted for approval. View <a href=\"%1$s\">All Ranks</a>."
4144
  msgstr ""
4145
 
4146
+ #: addons/ranks/myCRED-addon-ranks.php:392
4147
  #, php-format
4148
  #@ mycred
4149
  msgid "Rank scheduled for: <strong>%1$s</strong>."
4150
  msgstr ""
4151
 
4152
+ #: addons/ranks/myCRED-addon-ranks.php:449
4153
+ #: addons/ranks/myCRED-addon-ranks.php:504
4154
  #@ mycred
4155
  msgid "Rank Title"
4156
  msgstr ""
4157
 
4158
+ #: addons/ranks/myCRED-addon-ranks.php:450
4159
  #@ mycred
4160
  msgid "Logo"
4161
  msgstr ""
4162
 
4163
+ #: addons/ranks/myCRED-addon-ranks.php:451
4164
  #@ mycred
4165
  msgid "Requirement"
4166
  msgstr ""
4167
 
4168
+ #: addons/ranks/myCRED-addon-ranks.php:452
4169
  #@ mycred
4170
  msgid "Users"
4171
  msgstr ""
4172
 
4173
+ #: addons/ranks/myCRED-addon-ranks.php:468
4174
  #@ mycred
4175
  msgid "No Logo Set"
4176
  msgstr ""
4177
 
4178
+ #: addons/ranks/myCRED-addon-ranks.php:477
4179
+ #: addons/ranks/myCRED-addon-ranks.php:482
4180
  #@ mycred
4181
  msgid "Any Value"
4182
  msgstr ""
4183
 
4184
+ #: addons/ranks/myCRED-addon-ranks.php:484
4185
  #, php-format
4186
  #@ mycred
4187
  msgid "Maximum %plural%"
4188
  msgstr ""
4189
 
4190
+ #: addons/ranks/myCRED-addon-ranks.php:517
4191
  #@ mycred
4192
  msgid "Rank Settings"
4193
  msgstr ""
4194
 
4195
+ #: addons/ranks/myCRED-addon-ranks.php:539
4196
  #, php-format
4197
  #@ mycred
4198
  msgid "Minimum %plural% to reach this rank"
4199
  msgstr ""
4200
 
4201
+ #: addons/ranks/myCRED-addon-ranks.php:543
4202
  #, php-format
4203
  #@ mycred
4204
  msgid "Maximum %plural% to be included in this rank"
4205
  msgstr ""
4206
 
4207
+ #: addons/ranks/myCRED-addon-ranks.php:548
4208
  #@ mycred
4209
  msgid "All Published Ranks"
4210
  msgstr ""
4211
 
4212
+ #: addons/ranks/myCRED-addon-ranks.php:555
4213
+ #: addons/ranks/myCRED-addon-ranks.php:557
4214
  #@ mycred
4215
  msgid "Not Set"
4216
  msgstr ""
4217
 
4218
+ #: addons/ranks/myCRED-addon-ranks.php:562
4219
  #@ mycred
4220
  msgid "No Ranks found"
4221
  msgstr ""
4222
 
4223
+ #: addons/ranks/myCRED-addon-ranks.php:628
4224
  #@ mycred
4225
  msgid "Public"
4226
  msgstr ""
4227
 
4228
+ #: addons/ranks/myCRED-addon-ranks.php:632
4229
  #@ mycred
4230
  msgid "If you want to create a template archive for each rank, you must select to have ranks public. Defaults to disabled."
4231
  msgstr ""
4232
 
4233
+ #: addons/ranks/myCRED-addon-ranks.php:736
 
 
 
 
 
 
4234
  #@ mycred
4235
  msgid "If you are using a custom permalink structure and you make ranks public or change the slug, you will need to visit your permalink settings page and click \"Save Changes\" to flush your re-write rules! Otherwise you will get a 404 error message when trying to view a rank archive page."
4236
  msgstr ""
4237
 
4238
+ #: addons/ranks/myCRED-addon-ranks.php:733
 
4239
  #, php-format
4240
  #@ mycred
4241
  msgid "For more information on Templates for Custom Post Types visit the <a href=\"%s\">WordPress Codex</a>."
4242
  msgstr ""
4243
 
4244
+ #: addons/ranks/myCRED-addon-ranks.php:675
4245
  #@ mycred
4246
  msgid "Rank in BuddyPress"
4247
  msgstr ""
4248
 
4249
+ #: addons/ranks/myCRED-addon-ranks.php:730
4250
  #@ mycred
4251
  msgid "You can create ranks according to the amount of points a user has. By default, ranks are only visible in widgets and shortcodes however it is possible for you to also create archive pages in your theme for all ranks or specific ones."
4252
  msgstr ""
4253
 
4254
+ #: addons/ranks/myCRED-addon-ranks.php:731
4255
  #@ mycred
4256
  msgid "Templates"
4257
  msgstr ""
4258
 
4259
+ #: addons/ranks/myCRED-addon-ranks.php:732
4260
  #@ mycred
4261
  msgid "Ranks are just another custom post type which means that you can, if you select to make Ranks Public, create custom template files for ranks in your theme folder."
4262
  msgstr ""
4263
 
4264
+ #: addons/ranks/myCRED-addon-ranks.php:734
4265
  #@ mycred
4266
  msgid "Changing URL Slug"
4267
  msgstr ""
4268
 
4269
+ #: addons/ranks/myCRED-addon-ranks.php:735
4270
  #@ mycred
4271
  msgid "You can change the URL slug used for ranks to any URL friendly value."
4272
  msgstr ""
4283
 
4284
  #: addons/sell-content/myCRED-addon-sell-content.php:269
4285
  #: addons/transfer/myCRED-addon-transfer.php:129
4286
+ #: mycred.php:525
4287
  #@ mycred
4288
  msgid "Processing..."
4289
  msgstr ""
4449
  msgid "Descending"
4450
  msgstr ""
4451
 
4452
+ #: modules/mycred-module-hooks.php:117
4453
  #, php-format
4454
  #@ mycred
4455
  msgid "%plural% for clicking on links"
4456
  msgstr ""
4457
 
4458
+ #: modules/mycred-module-hooks.php:118
4459
  #@ mycred
4460
  msgid "Award %_plural% to users who clicks on links generated by the [mycred_link] shortcode."
4461
  msgstr ""
4462
 
4463
+ #: modules/mycred-module-hooks.php:161
4464
  #@ mycred
4465
  msgid "BadgeOS"
4466
  msgstr ""
4467
 
4468
+ #: modules/mycred-module-hooks.php:162
4469
  #@ mycred
4470
  msgid "Default settings for each BadgeOS Achievement type. These settings may be overridden for individual achievement type."
4471
  msgstr ""
4472
 
4473
+ #: modules/mycred-module-hooks.php:170
4474
  #@ mycred
4475
  msgid "WP-Polls"
4476
  msgstr ""
4477
 
4478
+ #: modules/mycred-module-hooks.php:171
4479
  #@ mycred
4480
  msgid "Awards %_plural% for users voting in polls."
4481
  msgstr ""
4482
 
4483
+ #: modules/mycred-module-hooks.php:179
4484
  #@ mycred
4485
  msgid "WP Favorite Posts"
4486
  msgstr ""
4487
 
4488
+ #: modules/mycred-module-hooks.php:180
4489
  #@ mycred
4490
  msgid "Awards %_plural% for users adding posts to their favorites."
4491
  msgstr ""
4492
 
4493
+ #: modules/mycred-module-hooks.php:188
4494
  #@ mycred
4495
  msgid "Events Manager"
4496
  msgstr ""
4497
 
4498
+ #: modules/mycred-module-hooks.php:189
4499
  #@ mycred
4500
  msgid "Awards %_plural% for users attending events."
4501
  msgstr ""
4502
 
4503
+ #: modules/mycred-module-hooks.php:1072
4504
  #@ mycred
4505
  msgid "Once for each unique URL"
4506
  msgstr ""
4507
 
4508
+ #: modules/mycred-module-hooks.php:1073
4509
  #@ mycred
4510
  msgid "Once for each unique link id"
4511
  msgstr ""
4512
 
4513
+ #: modules/mycred-module-hooks.php:1219
4514
  #@ mycred
4515
  msgid "The default amount to award for clicking on links. You can override this in the shortcode."
4516
  msgstr ""
4517
 
4518
+ #: modules/mycred-module-hooks.php:1226
4519
  #, php-format
4520
  #@ mycred
4521
  msgid "Available template tags: General and custom tags: %url% or %id%."
4522
  msgstr ""
4523
 
4524
+ #: modules/mycred-module-hooks.php:1237
4525
  #@ mycred
4526
  msgid "Remember!"
4527
  msgstr ""
4528
 
4529
+ #: modules/mycred-module-hooks.php:1237
4530
  #@ mycred
4531
  msgid "If you select to limit by id and you do not include the id attribute in the shortcode, no %_plural% will be awarded!"
4532
  msgstr ""
4536
  msgid "User Missing"
4537
  msgstr ""
4538
 
4539
+ #: modules/mycred-module-plugins.php:664
4540
  #, php-format
4541
  #@ mycred
4542
  msgid "Please setup your <a href=\"%s\">default settings</a> before using this feature."
4543
  msgstr ""
4544
 
4545
+ #: modules/mycred-module-plugins.php:675
4546
+ #: modules/mycred-module-plugins.php:677
4547
  #, php-format
4548
  #@ mycred
4549
  msgid "%plural% to Award"
4550
  msgstr ""
4551
 
4552
+ #: modules/mycred-module-plugins.php:679
4553
  #@ mycred
4554
  msgid "Use zero to disable"
4555
  msgstr ""
4556
 
4557
+ #: modules/mycred-module-plugins.php:690
4558
  #@ mycred
4559
  msgid "Deduction Log Template"
4560
  msgstr ""
4561
 
4562
+ #: modules/mycred-module-plugins.php:826
4563
  #, php-format
4564
  #@ mycred
4565
  msgid "Default %s for %s"
4566
  msgstr ""
4567
 
4568
+ #: modules/mycred-module-plugins.php:833
4569
  #@ mycred
4570
  msgid "User zero to disable users gaining %_plural%"
4571
  msgstr ""
4572
 
4573
+ #: modules/mycred-module-plugins.php:837
4574
  #@ mycred
4575
  msgid "Default Log template"
4576
  msgstr ""
4577
 
4578
+ #: modules/mycred-module-plugins.php:975
4579
  #, php-format
4580
  #@ mycred
4581
  msgid "Available template tags: General. You can also use %poll_id% and %poll_question%."
4582
  msgstr ""
4583
 
4584
+ #: modules/mycred-module-plugins.php:1085
4585
  #@ mycred
4586
  msgid "Adding Content to Favorites"
4587
  msgstr ""
4588
 
4589
+ #: modules/mycred-module-plugins.php:1095
4590
+ #: modules/mycred-module-plugins.php:1108
4591
+ #: modules/mycred-module-plugins.php:1255
4592
+ #: modules/mycred-module-plugins.php:1268
4593
  #@ mycred
4594
  msgid "Available template tags: General and Post Related"
4595
  msgstr ""
4596
 
4597
+ #: modules/mycred-module-plugins.php:1098
4598
  #@ mycred
4599
  msgid "Removing Content from Favorites"
4600
  msgstr ""
4601
 
4602
+ #: modules/mycred-module-plugins.php:1245
4603
  #@ mycred
4604
  msgid "Attending Event"
4605
  msgstr ""
4606
 
4607
+ #: modules/mycred-module-plugins.php:1258
4608
  #@ mycred
4609
  msgid "Cancelling Attendance"
4610
  msgstr ""
4611
 
4612
+ #: mycred.php:526
4613
  #@ mycred
4614
  msgid "Sent"
4615
  msgstr ""
4616
 
4617
+ #: mycred.php:527
4618
  #@ mycred
4619
  msgid "Error - Try Again"
4620
  msgstr ""
4631
  msgid "The users ranking. Was \"%rank%\" before version 1.1"
4632
  msgstr ""
4633
 
4634
+ #: addons/ranks/myCRED-addon-ranks.php:615
4635
+ #@ mycred
4636
+ msgid "Rank Features"
4637
+ msgstr ""
4638
+
4639
+ #: addons/ranks/myCRED-addon-ranks.php:619
4640
+ #, php-format
4641
+ #@ mycred
4642
+ msgid "%plural% requirement"
4643
+ msgstr ""
4644
+
4645
+ #: addons/ranks/myCRED-addon-ranks.php:620
4646
+ #@ mycred
4647
+ msgid "Featured Image (Logo)"
4648
+ msgstr ""
4649
+
4650
+ #: addons/ranks/myCRED-addon-ranks.php:621
4651
+ #@ mycred
4652
+ msgid "Content"
4653
+ msgstr ""
4654
+
4655
+ #: addons/ranks/myCRED-addon-ranks.php:622
4656
+ #@ mycred
4657
+ msgid "Excerpt"
4658
+ msgstr ""
4659
+
4660
+ #: addons/ranks/myCRED-addon-ranks.php:623
4661
+ #@ mycred
4662
+ msgid "Comments"
4663
+ msgstr ""
4664
+
4665
+ #: addons/ranks/myCRED-addon-ranks.php:624
4666
+ #@ mycred
4667
+ msgid "Page Attributes"
4668
+ msgstr ""
4669
+
4670
+ #: addons/ranks/myCRED-addon-ranks.php:625
4671
+ #@ mycred
4672
+ msgid "Custom Fields"
4673
+ msgstr ""
4674
+
4675
+ #: addons/ranks/myCRED-addon-ranks.php:635
4676
+ #@ mycred
4677
+ msgid "Archive URL"
4678
+ msgstr ""
4679
+
4680
+ #: addons/ranks/myCRED-addon-ranks.php:639
4681
+ #@ mycred
4682
+ msgid "Ignored if Ranks are not public"
4683
+ msgstr ""
4684
+
4685
+ #: addons/ranks/myCRED-addon-ranks.php:642
4686
+ #@ mycred
4687
+ msgid "Display Order"
4688
+ msgstr ""
4689
+
4690
+ #: addons/ranks/myCRED-addon-ranks.php:659
4691
+ #@ mycred
4692
+ msgid "Select in what order ranks should be displayed in your admin area and/or front if ranks are \"Public\""
4693
+ msgstr ""
4694
+
4695
+ #: includes/mycred-admin.php:179
4696
+ #@ mycred
4697
+ msgid "Description is required!"
4698
+ msgstr ""
4699
+
4700
+ #: modules/mycred-module-hooks.php:125
4701
+ #@ default
4702
+ msgid "bbPress"
4703
+ msgstr ""
4704
+
4705
+ #: modules/mycred-module-hooks.php:992
4706
+ #@ mycred
4707
+ msgid "Limit per post"
4708
+ msgstr ""
4709
+
4710
+ #: modules/mycred-module-hooks.php:994
4711
+ #@ mycred
4712
+ msgid "The number of comments per post that grants %_plural%. User zero for unlimited."
4713
+ msgstr ""
4714
+
4715
+ #: modules/mycred-module-hooks.php:998
4716
+ #@ mycred
4717
+ msgid "Limit per day"
4718
+ msgstr ""
4719
+
4720
+ #: modules/mycred-module-hooks.php:1000
4721
+ #@ mycred
4722
+ msgid "Number of comments per day that grants %_plural%. User zero for unlimited."
4723
+ msgstr ""
4724
+
4725
+ #: modules/mycred-module-hooks.php:1005
4726
+ #, php-format
4727
+ #@ mycred
4728
+ msgid "%plural% is to be awarded even when comment authors reply to their own comment."
4729
+ msgstr ""
4730
+
4731
+ #: modules/mycred-module-plugins.php:237
4732
+ #, php-format
4733
+ #@ mycred
4734
+ msgid "%plural% for New Forum"
4735
+ msgstr ""
4736
+
4737
+ #: modules/mycred-module-plugins.php:264
4738
+ #@ mycred
4739
+ msgid "Forum authors can receive %_plural% for creating new topics."
4740
+ msgstr ""
4741
+
4742
+ #: modules/mycred-module-plugins.php:268
4743
+ #, php-format
4744
+ #@ mycred
4745
+ msgid "%plural% for Favorited Topic"
4746
+ msgstr ""
4747
+
4748
+ #: modules/mycred-module-plugins.php:295
4749
+ #@ mycred
4750
+ msgid "Topic authors can receive %_plural% for replying to their own Topic"
4751
+ msgstr ""
4752
+
4753
+ #: modules/mycred-module-plugins.php:299
4754
+ #@ mycred
4755
+ msgid "Show users %_plural% balance in replies"
4756
+ msgstr ""
4757
+
4758
+ #: mycred.php:95
4759
+ #: mycred.php:102
4760
+ #@ mycred
4761
+ msgid "Cheatin&#8217; huh?"
4762
+ msgstr ""
4763
+
modules/mycred-module-addons.php CHANGED
@@ -36,7 +36,7 @@ if ( !class_exists( 'myCRED_Addons' ) ) {
36
  * @since 0.1
37
  * @version 1.0
38
  */
39
- public function module_pre_init() {
40
  $addons = $this->addons;
41
  $active = $addons['active'];
42
  $installed = $this->get();
36
  * @since 0.1
37
  * @version 1.0
38
  */
39
+ public function module_ready() {
40
  $addons = $this->addons;
41
  $active = $addons['active'];
42
  $installed = $this->get();
modules/mycred-module-hooks.php CHANGED
@@ -3,7 +3,7 @@ if ( !defined( 'myCRED_VERSION' ) ) exit;
3
  // Subscription Related Hooks
4
  include_once( myCRED_MODULES_DIR . 'mycred-module-subscriptions.php' );
5
  // Third-Party Plugin Hooks
6
- include_once( myCRED_MODULES_DIR . 'mycred-module-plugins.php' );
7
  /**
8
  * myCRED_Hooks class
9
  * @since 0.1
@@ -40,7 +40,7 @@ if ( !class_exists( 'myCRED_Hooks' ) ) {
40
  * @since 0.1
41
  * @version 1.0
42
  */
43
- public function module_pre_init() {
44
  if ( !empty( $this->installed ) ) {
45
  foreach ( $this->installed as $key => $gdata ) {
46
  if ( $this->is_active( $key ) && isset( $gdata['callback'] ) ) {
@@ -62,10 +62,11 @@ if ( !class_exists( 'myCRED_Hooks' ) ) {
62
  $class = $callback[0];
63
  $methods = get_class_methods( $class );
64
  if ( in_array( $call, $methods ) ) {
65
- $new = new $class( ( isset( $this->hook_prefs ) ) ? $this->hook_prefs : $this );
66
  return $new->$call( $return );
67
  }
68
  }
 
69
  // Function
70
  if ( !is_array( $callback ) ) {
71
  if ( function_exists( $callback ) ) {
@@ -117,6 +118,15 @@ if ( !class_exists( 'myCRED_Hooks' ) ) {
117
  'description' => __( 'Award %_plural% to users who clicks on links generated by the [mycred_link] shortcode.', 'mycred' ),
118
  'callback' => array( 'myCRED_Hook_Click_Links' )
119
  );
 
 
 
 
 
 
 
 
 
120
 
121
  // Prep for Invite Anyone Plugin
122
  if ( function_exists( 'invite_anyone_init' ) ) {
@@ -171,7 +181,7 @@ if ( !class_exists( 'myCRED_Hooks' ) ) {
171
  'callback' => array( 'myCRED_Hook_WPFavorite' )
172
  );
173
  }
174
-
175
  // Events Manager
176
  if ( function_exists( 'bp_em_init' ) ) {
177
  $installed['eventsmanager'] = array(
@@ -207,7 +217,7 @@ if ( !class_exists( 'myCRED_Hooks' ) ) {
207
 
208
  // Get installed
209
  $installed = $this->get( true );
210
-
211
  // Message
212
  if ( isset( $_GET['settings-updated'] ) && $_GET['settings-updated'] == true ) {
213
  echo '<div class="updated settings-error"><p>' . __( 'Settings Updated', 'mycred' ) . '</p></div>';
@@ -254,17 +264,34 @@ if ( !class_exists( 'myCRED_Hooks' ) ) {
254
  * @since 0.1
255
  * @version 1.0
256
  */
257
- public function sanitize_settings( $data ) {
 
258
  $installed = $this->get();
 
 
 
 
 
259
  if ( !empty( $installed ) ) {
260
- foreach ( $installed as $key => $gdata ) {
261
- if ( isset( $gdata['callback'] ) && isset( $data['hook_prefs'][$key] ) ) {
262
- $data['hook_prefs'][$key] = $this->call( 'sanitise_preferences', $gdata['callback'], $data['hook_prefs'][$key] );
 
 
 
 
 
 
 
 
 
 
 
263
  }
264
  }
265
  }
266
- unset( $installed );
267
- return $data;
268
  }
269
  }
270
  }
@@ -318,9 +345,6 @@ if ( !class_exists( 'myCRED_Hook_Registration' ) ) {
318
  $user_id,
319
  array( 'ref_type' => 'user' )
320
  );
321
-
322
- // Clean up
323
- unset( $this );
324
  }
325
 
326
  /**
@@ -400,9 +424,6 @@ if ( !class_exists( 'myCRED_Hook_Logging_In' ) ) {
400
  $this->prefs['creds'],
401
  $this->prefs['log']
402
  );
403
-
404
- // Clean up
405
- unset( $this );
406
  }
407
 
408
  /**
@@ -550,7 +571,7 @@ if ( !class_exists( 'myCRED_Hook_Publishing_Content' ) ) {
550
 
551
  // Prep
552
  $entry = $this->prefs[$post_type]['log'];
553
- $data = array( 'ref_type' => 'post' ) ;
554
 
555
  // Add Creds
556
  $this->core->add_creds(
@@ -562,7 +583,6 @@ if ( !class_exists( 'myCRED_Hook_Publishing_Content' ) ) {
562
  $data
563
  );
564
  }
565
- unset( $this );
566
  }
567
 
568
  /**
@@ -642,10 +662,25 @@ if ( !class_exists( 'myCRED_Hook_Publishing_Content' ) ) {
642
  * Include Post Type
643
  * Checks if a given post type should be excluded
644
  * @since 0.1
645
- * @version 1.0
646
  */
647
  protected function include_post_type( $post_type ) {
648
- if ( in_array( $post_type, apply_filters( 'mycred_post_type_excludes', array( 'post', 'page' ) ) ) ) return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
649
  return true;
650
  }
651
  }
@@ -666,6 +701,11 @@ if ( !class_exists( 'myCRED_Hook_Comments' ) ) {
666
  parent::__construct( array(
667
  'id' => 'comments',
668
  'defaults' => array(
 
 
 
 
 
669
  'approved' => array(
670
  'creds' => 1,
671
  'log' => '%plural% for Approved Comment'
@@ -749,6 +789,15 @@ if ( !class_exists( 'myCRED_Hook_Comments' ) ) {
749
  // Make sure this is unique event
750
  if ( $this->has_entry( 'approved_comment', $comment->comment_ID, $comment->user_id ) ) return;
751
 
 
 
 
 
 
 
 
 
 
752
  // Execute
753
  $this->core->add_creds(
754
  'approved_comment',
@@ -758,9 +807,6 @@ if ( !class_exists( 'myCRED_Hook_Comments' ) ) {
758
  $comment->comment_ID,
759
  array( 'ref_type' => 'comment' )
760
  );
761
-
762
- // Clean up
763
- unset( $this );
764
  }
765
 
766
  /**
@@ -793,9 +839,6 @@ if ( !class_exists( 'myCRED_Hook_Comments' ) ) {
793
  $comment->comment_ID,
794
  array( 'ref_type' => 'comment' )
795
  );
796
-
797
- // Clean up
798
- unset( $this );
799
  }
800
 
801
  /**
@@ -828,9 +871,68 @@ if ( !class_exists( 'myCRED_Hook_Comments' ) ) {
828
  $comment->comment_ID,
829
  array( 'ref_type' => 'comment' )
830
  );
 
 
 
 
 
 
 
 
 
831
 
832
- // Clean up
833
- unset( $this );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
834
  }
835
 
836
  /**
@@ -839,7 +941,14 @@ if ( !class_exists( 'myCRED_Hook_Comments' ) ) {
839
  * @version 1.0
840
  */
841
  public function preferences() {
842
- $prefs = $this->prefs; ?>
 
 
 
 
 
 
 
843
 
844
  <label class="subheader" for="<?php echo $this->field_id( array( 'approved' => 'creds' ) ); ?>"><?php _e( 'Approved Comment', 'mycred' ); ?></label>
845
  <ol>
@@ -877,8 +986,42 @@ if ( !class_exists( 'myCRED_Hook_Comments' ) ) {
877
  <span class="description"><?php _e( 'Available template tags: General, Comment', 'mycred' ); ?></span>
878
  </li>
879
  </ol>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
880
  <?php unset( $this );
881
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
882
  }
883
  }
884
  /**
3
  // Subscription Related Hooks
4
  include_once( myCRED_MODULES_DIR . 'mycred-module-subscriptions.php' );
5
  // Third-Party Plugin Hooks
6
+ require_once( myCRED_MODULES_DIR . 'mycred-module-plugins.php' );
7
  /**
8
  * myCRED_Hooks class
9
  * @since 0.1
40
  * @since 0.1
41
  * @version 1.0
42
  */
43
+ public function module_init() {
44
  if ( !empty( $this->installed ) ) {
45
  foreach ( $this->installed as $key => $gdata ) {
46
  if ( $this->is_active( $key ) && isset( $gdata['callback'] ) ) {
62
  $class = $callback[0];
63
  $methods = get_class_methods( $class );
64
  if ( in_array( $call, $methods ) ) {
65
+ $new = new $class( ( isset( $this->hook_prefs ) ) ? $this->hook_prefs : array() );
66
  return $new->$call( $return );
67
  }
68
  }
69
+
70
  // Function
71
  if ( !is_array( $callback ) ) {
72
  if ( function_exists( $callback ) ) {
118
  'description' => __( 'Award %_plural% to users who clicks on links generated by the [mycred_link] shortcode.', 'mycred' ),
119
  'callback' => array( 'myCRED_Hook_Click_Links' )
120
  );
121
+
122
+ // Prep for bbPress
123
+ if ( class_exists( 'bbPress' ) ) {
124
+ $installed['hook_bbpress'] = array(
125
+ 'title' => __( 'bbPress' ),
126
+ 'description' => __( 'Awards %_plural% for bbPress actions.', 'mycred' ),
127
+ 'callback' => array( 'myCRED_bbPress' )
128
+ );
129
+ }
130
 
131
  // Prep for Invite Anyone Plugin
132
  if ( function_exists( 'invite_anyone_init' ) ) {
181
  'callback' => array( 'myCRED_Hook_WPFavorite' )
182
  );
183
  }
184
+
185
  // Events Manager
186
  if ( function_exists( 'bp_em_init' ) ) {
187
  $installed['eventsmanager'] = array(
217
 
218
  // Get installed
219
  $installed = $this->get( true );
220
+
221
  // Message
222
  if ( isset( $_GET['settings-updated'] ) && $_GET['settings-updated'] == true ) {
223
  echo '<div class="updated settings-error"><p>' . __( 'Settings Updated', 'mycred' ) . '</p></div>';
264
  * @since 0.1
265
  * @version 1.0
266
  */
267
+ public function sanitize_settings( $post ) {
268
+ // Loop though all installed hooks
269
  $installed = $this->get();
270
+
271
+ // Construct new settings
272
+ $new_post['installed'] = $installed;
273
+ $new_post['active'] = $post['active'];
274
+
275
  if ( !empty( $installed ) ) {
276
+ foreach ( $installed as $key => $data ) {
277
+ if ( isset( $data['callback'] ) && isset( $post['hook_prefs'][$key] ) ) {
278
+ // Old settings
279
+ $old_settings = $post['hook_prefs'][$key];
280
+
281
+ // New settings
282
+ $new_settings = $this->call( 'sanitise_preferences', $data['callback'], $old_settings );
283
+
284
+ // If something went wrong use the old settings
285
+ if ( empty( $new_settings ) || $new_settings === NULL || !is_array( $new_settings ) )
286
+ $new_post['hook_prefs'][$key] = $old_settings;
287
+ // Else we got ourselves new settings
288
+ else
289
+ $new_post['hook_prefs'][$key] = $new_settings;
290
  }
291
  }
292
  }
293
+
294
+ return $new_post;
295
  }
296
  }
297
  }
345
  $user_id,
346
  array( 'ref_type' => 'user' )
347
  );
 
 
 
348
  }
349
 
350
  /**
424
  $this->prefs['creds'],
425
  $this->prefs['log']
426
  );
 
 
 
427
  }
428
 
429
  /**
571
 
572
  // Prep
573
  $entry = $this->prefs[$post_type]['log'];
574
+ $data = array( 'ref_type' => 'post' );
575
 
576
  // Add Creds
577
  $this->core->add_creds(
583
  $data
584
  );
585
  }
 
586
  }
587
 
588
  /**
662
  * Include Post Type
663
  * Checks if a given post type should be excluded
664
  * @since 0.1
665
+ * @version 1.1
666
  */
667
  protected function include_post_type( $post_type ) {
668
+ // Exclude Core
669
+ $excludes = array( 'post', 'page' );
670
+
671
+ // Prep for bbPress
672
+ if ( class_exists( 'bbPress' ) ) {
673
+ $excludes[] = bbp_get_forum_post_type();
674
+ $excludes[] = bbp_get_topic_post_type();
675
+ $excludes[] = bbp_get_reply_post_type();
676
+ }
677
+
678
+ // Prep for BadgeOS
679
+ if ( function_exists( 'badgeos_get_achievement_types_slugs' ) ) {
680
+ $excludes = array_merge( $excludes, badgeos_get_achievement_types_slugs() );
681
+ }
682
+
683
+ if ( in_array( $post_type, apply_filters( 'mycred_post_type_excludes', $excludes ) ) ) return false;
684
  return true;
685
  }
686
  }
701
  parent::__construct( array(
702
  'id' => 'comments',
703
  'defaults' => array(
704
+ 'limits' => array(
705
+ 'self_reply' => 0,
706
+ 'per_post' => 10,
707
+ 'per_day' => 0
708
+ ),
709
  'approved' => array(
710
  'creds' => 1,
711
  'log' => '%plural% for Approved Comment'
789
  // Make sure this is unique event
790
  if ( $this->has_entry( 'approved_comment', $comment->comment_ID, $comment->user_id ) ) return;
791
 
792
+ // Check if we are allowed to comment our own comment
793
+ if ( $this->prefs['limits']['self_reply'] != 0 && $comment->comment_parent != 0 ) {
794
+ $parent = get_comment( $comment->comment_parent );
795
+ if ( $parent->user_id == $comment->user_id ) return;
796
+ }
797
+
798
+ // Enforce limits
799
+ if ( $this->user_exceeds_limit( $comment->user_id, $comment->comment_post_ID ) ) return;
800
+
801
  // Execute
802
  $this->core->add_creds(
803
  'approved_comment',
807
  $comment->comment_ID,
808
  array( 'ref_type' => 'comment' )
809
  );
 
 
 
810
  }
811
 
812
  /**
839
  $comment->comment_ID,
840
  array( 'ref_type' => 'comment' )
841
  );
 
 
 
842
  }
843
 
844
  /**
871
  $comment->comment_ID,
872
  array( 'ref_type' => 'comment' )
873
  );
874
+ }
875
+
876
+ /**
877
+ * Check if user exceeds limit
878
+ * @since 1.1.1
879
+ * @version 1.0
880
+ */
881
+ public function user_exceeds_limit( $user_id = NULL, $post_id = NULL ) {
882
+ if ( !isset( $this->prefs['limits'] ) ) return false;
883
 
884
+ // Prep
885
+ $today = date_i18n( 'Y-m-d' );
886
+
887
+ // First we check post limit
888
+ if ( $this->prefs['limits']['per_post'] > 0 ) {
889
+ $post_limit = 0;
890
+ // Grab limit
891
+ $limit = get_user_meta( $user_id, 'mycred_comment_limit_post', true );
892
+ // Apply default if none exist
893
+ if ( empty( $limit ) ) $limit = array( $post_id => $post_limit );
894
+
895
+ // Check if post_id is in limit array
896
+ if ( array_key_exists( $post_id, $limit ) ) {
897
+ $post_limit = $limit[$post_id];
898
+
899
+ // Limit is reached
900
+ if ( $post_limit >= $this->prefs['limits']['per_post'] ) return true;
901
+ }
902
+
903
+ // Add / Replace post_id counter with an incremented value
904
+ $limit[$post_id] = $post_limit+1;
905
+ // Save
906
+ update_user_meta( $user_id, 'mycred_comment_limit_post', $limit );
907
+ }
908
+
909
+ // Second we check daily limit
910
+ if ( $this->prefs['limits']['per_day'] > 0 ) {
911
+ $daily_limit = 0;
912
+ // Grab limit
913
+ $limit = get_user_meta( $user_id, 'mycred_comment_limit_day', true );
914
+ // Apply default if none exist
915
+ if ( empty( $limit ) ) $limit = array();
916
+
917
+ // Check if todays date is in limit
918
+ if ( array_key_exists( $today, $limit ) ) {
919
+ $daily_limit = $limit[$today];
920
+
921
+ // Limit is reached
922
+ if ( $daily_limit >= $this->prefs['limits']['per_day'] ) return true;
923
+ }
924
+ // Today is not in limit array so we reset to remove other dates
925
+ else {
926
+ $limit = array();
927
+ }
928
+
929
+ // Add / Replace todays counter with an imcremented value
930
+ $limit[$today] = $daily_limit+1;
931
+ // Save
932
+ update_user_meta( $user_id, 'mycred_comment_limit_day', $limit );
933
+ }
934
+
935
+ return false;
936
  }
937
 
938
  /**
941
  * @version 1.0
942
  */
943
  public function preferences() {
944
+ $prefs = $this->prefs;
945
+
946
+ if ( !isset( $prefs['limits'] ) )
947
+ $prefs['limits'] = array(
948
+ 'self_reply' => 0,
949
+ 'per_post' => 10,
950
+ 'per_day' => 0
951
+ ); ?>
952
 
953
  <label class="subheader" for="<?php echo $this->field_id( array( 'approved' => 'creds' ) ); ?>"><?php _e( 'Approved Comment', 'mycred' ); ?></label>
954
  <ol>
986
  <span class="description"><?php _e( 'Available template tags: General, Comment', 'mycred' ); ?></span>
987
  </li>
988
  </ol>
989
+ <label class="subheader"><?php _e( 'Limits', 'mycred' ); ?></label>
990
+ <ol>
991
+ <li>
992
+ <label for="<?php echo $this->field_id( array( 'limits' => 'per_post' ) ); ?>"><?php _e( 'Limit per post', 'mycred' ); ?></label>
993
+ <div class="h2"><input type="text" name="<?php echo $this->field_name( array( 'limits' => 'per_post' ) ); ?>" id="<?php echo $this->field_id( array( 'limits' => 'per_post' ) ); ?>" value="<?php echo $prefs['limits']['per_post']; ?>" size="8" /></div>
994
+ <span class="description"><?php echo $this->core->template_tags_general( __( 'The number of comments per post that grants %_plural%. User zero for unlimited.', 'mycred' ) ); ?></span>
995
+ </li>
996
+ <li class="empty">&nbsp;</li>
997
+ <li>
998
+ <label for="<?php echo $this->field_id( array( 'limits' => 'per_day' ) ); ?>"><?php _e( 'Limit per day', 'mycred' ); ?></label>
999
+ <div class="h2"><input type="text" name="<?php echo $this->field_name( array( 'limits' => 'per_day' ) ); ?>" id="<?php echo $this->field_id( array( 'limits' => 'per_day' ) ); ?>" value="<?php echo $prefs['limits']['per_day']; ?>" size="8" /></div>
1000
+ <span class="description"><?php echo $this->core->template_tags_general( __( 'Number of comments per day that grants %_plural%. User zero for unlimited.', 'mycred' ) ); ?></span>
1001
+ </li>
1002
+ <li class="empty">&nbsp;</li>
1003
+ <li>
1004
+ <input type="checkbox" name="<?php echo $this->field_name( array( 'limits' => 'self_reply' ) ); ?>" id="<?php echo $this->field_id( array( 'limits' => 'self_reply' ) ); ?>" <?php checked( $prefs['limits']['self_reply'], 1 ); ?> value="1" />
1005
+ <label for="<?php echo $this->field_id( array( 'limits' => 'self_reply' ) ); ?>"><?php echo $this->core->template_tags_general( __( '%plural% is to be awarded even when comment authors reply to their own comment.', 'mycred' ) ); ?></label>
1006
+ </li>
1007
+ </ol>
1008
  <?php unset( $this );
1009
  }
1010
+
1011
+ /**
1012
+ * Sanitise Preference
1013
+ * @since 1.1.1
1014
+ * @version 1.0
1015
+ */
1016
+ function sanitise_preferences( $data ) {
1017
+ $new_data = $data;
1018
+
1019
+ $new_data['limits']['per_post'] = ( !empty( $data['limits']['per_post'] ) ) ? abs( $data['limits']['per_post'] ) : 0;
1020
+ $new_data['limits']['per_day'] = ( !empty( $data['limits']['per_day'] ) ) ? abs( $data['limits']['per_day'] ) : 0;
1021
+ $new_data['limits']['self_reply'] = ( isset( $data['limits']['self_reply'] ) ) ? $data['limits']['self_reply'] : 0;
1022
+
1023
+ return $new_data;
1024
+ }
1025
  }
1026
  }
1027
  /**
modules/mycred-module-log.php CHANGED
@@ -902,10 +902,10 @@ if ( !class_exists( 'myCRED_Query_Log' ) ) {
902
  /**
903
  * The Entry
904
  * @since 0.1
905
- * @version 1.0
906
  */
907
- public function the_entry( $log_entry ) {
908
- echo $this->get_the_entry( $log_entry );
909
  }
910
 
911
  /**
@@ -913,10 +913,10 @@ if ( !class_exists( 'myCRED_Query_Log' ) ) {
913
  * Generated a single entry row depending on the columns used / requested.
914
  *
915
  * @since 0.1
916
- * @version 1.1
917
  */
918
- public function get_the_entry( $log_entry ) {
919
- $date = get_option( 'date_format' ) . ' ' . get_option( 'time_format' );
920
  $entry_data = '';
921
 
922
  // Run though columns
@@ -935,7 +935,7 @@ if ( !class_exists( 'myCRED_Query_Log' ) ) {
935
  break;
936
  // Date & Time Column
937
  case 'column-time' :
938
- $content = date_i18n( $date, $log_entry->time );
939
  break;
940
  // Amount Column
941
  case 'column-creds' :
@@ -946,7 +946,7 @@ if ( !class_exists( 'myCRED_Query_Log' ) ) {
946
  $content = $this->core->parse_template_tags( $log_entry->entry, $log_entry );
947
  break;
948
  }
949
- $entry_data .= '<td class="' . $column_id . '">' . $content . '</td>';
950
  }
951
  return $entry_data;
952
  }
902
  /**
903
  * The Entry
904
  * @since 0.1
905
+ * @version 1.1
906
  */
907
+ public function the_entry( $log_entry, $wrap = 'td' ) {
908
+ echo $this->get_the_entry( $log_entry, $wrap );
909
  }
910
 
911
  /**
913
  * Generated a single entry row depending on the columns used / requested.
914
  *
915
  * @since 0.1
916
+ * @version 1.2
917
  */
918
+ public function get_the_entry( $log_entry, $wrap = 'td' ) {
919
+ $date_format = get_option( 'date_format' ) . ' ' . get_option( 'time_format' );
920
  $entry_data = '';
921
 
922
  // Run though columns
935
  break;
936
  // Date & Time Column
937
  case 'column-time' :
938
+ $content = date_i18n( $date_format, $log_entry->time );
939
  break;
940
  // Amount Column
941
  case 'column-creds' :
946
  $content = $this->core->parse_template_tags( $log_entry->entry, $log_entry );
947
  break;
948
  }
949
+ $entry_data .= '<' . $wrap . ' class="' . $column_id . '">' . $content . '</' . $wrap . '>';
950
  }
951
  return $entry_data;
952
  }
modules/mycred-module-plugins.php CHANGED
@@ -7,6 +7,318 @@
7
  */
8
  if ( !defined( 'myCRED_VERSION' ) ) exit;
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  /**
11
  * Hooks for Invite Anyone Plugin
12
  * @since 0.1
@@ -77,9 +389,6 @@ if ( !class_exists( 'myCRED_Invite_Anyone' ) && function_exists( 'invite_anyone_
77
  $user_log['sent'] = $user_log['sent']+1;
78
  update_user_meta( $user_id, 'mycred_invite_anyone', $user_log );
79
  }
80
-
81
- // Clean up
82
- unset( $this );
83
  }
84
 
85
  /**
@@ -112,9 +421,6 @@ if ( !class_exists( 'myCRED_Invite_Anyone' ) && function_exists( 'invite_anyone_
112
  update_user_meta( $inviter_id, 'mycred_invite_anyone', $user_log );
113
  }
114
  }
115
-
116
- // Clean up
117
- unset( $this );
118
  }
119
 
120
  /**
@@ -221,8 +527,6 @@ if ( !class_exists( 'myCRED_Contact_Form7' ) && function_exists( 'wpcf7' ) ) {
221
  endwhile;
222
  }
223
  wp_reset_postdata();
224
-
225
- return $result;
226
  }
227
 
228
  /**
@@ -245,9 +549,6 @@ if ( !class_exists( 'myCRED_Contact_Form7' ) && function_exists( 'wpcf7' ) ) {
245
  array( 'ref_type' => 'post' )
246
  );
247
  }
248
-
249
- // Clean up
250
- unset( $this );
251
  }
252
 
253
  /**
7
  */
8
  if ( !defined( 'myCRED_VERSION' ) ) exit;
9
 
10
+ /**
11
+ * bbPress
12
+ * @since 0.1
13
+ * @version 1.1
14
+ */
15
+ if ( class_exists( 'bbPress' ) ) {
16
+ /**
17
+ * Insert Points Balance in Profile
18
+ * @since 1.1.1
19
+ * @version 1.0
20
+ */
21
+ add_action( 'bbp_template_after_user_profile', 'mycred_bbp_add_balance_in_profile' );
22
+ function mycred_bbp_add_balance_in_profile() {
23
+ $user_id = bbp_get_displayed_user_id();
24
+ $mycred = mycred_get_settings();
25
+
26
+ if ( $mycred->exclude_user( $user_id ) ) return;
27
+
28
+ $balance = $mycred->get_users_cred( $user_id );
29
+ echo '<div class="users-mycred-balance">' . $mycred->plural() . ': ' . $mycred->format_creds( $balance ) . '</div>';
30
+ }
31
+
32
+ /**
33
+ * bbPress Hook
34
+ * @since 1.1.1
35
+ * @version 1.0
36
+ */
37
+ if ( !class_exists( 'myCRED_bbPress' ) ) {
38
+ class myCRED_bbPress extends myCRED_Hook {
39
+
40
+ /**
41
+ * Construct
42
+ */
43
+ function __construct( $hook_prefs ) {
44
+ parent::__construct( array(
45
+ 'id' => 'hook_bbpress',
46
+ 'defaults' => array(
47
+ 'new_forum' => array(
48
+ 'creds' => 1,
49
+ 'log' => '%plural% for new forum'
50
+ ),
51
+ 'new_topic' => array(
52
+ 'creds' => 1,
53
+ 'log' => '%plural% for new forum topic',
54
+ 'author' => 0
55
+ ),
56
+ 'fav_topic' => array(
57
+ 'creds' => 1,
58
+ 'log' => '%plural% for someone favorited your forum topic'
59
+ ),
60
+ 'new_reply' => array(
61
+ 'creds' => 1,
62
+ 'log' => '%plural% for new forum reply',
63
+ 'author' => 0
64
+ ),
65
+ 'show_points_in_reply' => 0
66
+ )
67
+ ), $hook_prefs );
68
+ }
69
+
70
+ /**
71
+ * Run
72
+ * @since 0.1
73
+ * @version 1.0
74
+ */
75
+ public function run() {
76
+ if ( isset( $this->prefs['show_points_in_reply'] ) && $this->prefs['show_points_in_reply'] == 1 )
77
+ add_action( 'bbp_theme_after_reply_author_details', array( $this, 'insert_balance' ) );
78
+
79
+ if ( $this->prefs['new_forum']['creds'] != 0 )
80
+ add_action( 'bbp_new_forum', array( $this, 'new_forum' ), 20 );
81
+
82
+ if ( $this->prefs['new_topic']['creds'] != 0 )
83
+ add_action( 'bbp_new_topic', array( $this, 'new_topic' ), 20, 4 );
84
+
85
+ if ( $this->prefs['fav_topic']['creds'] != 0 )
86
+ add_action( 'bbp_add_user_favorite', array( $this, 'fav_topic' ), 10, 2 );
87
+
88
+ if ( $this->prefs['new_reply']['creds'] != 0 )
89
+ add_action( 'bbp_new_reply', array( $this, 'new_reply' ), 20, 5 );
90
+ }
91
+
92
+ /**
93
+ * New Forum
94
+ * @since 1.1.1
95
+ * @version 1.0
96
+ */
97
+ public function new_forum( $forum ) {
98
+ // Forum id
99
+ $forum_id = $forum['forum_id'];
100
+
101
+ // Forum author
102
+ $forum_author = bbp_get_forum_author_id( $forum_id );
103
+
104
+ // Check if user is excluded
105
+ if ( $this->core->exclude_user( $forum_author ) ) return;
106
+
107
+ // Make sure this is unique event
108
+ if ( $this->has_entry( 'new_forum', $forum_id, $forum_author ) ) return;
109
+
110
+ // Execute
111
+ $this->core->add_creds(
112
+ 'new_forum',
113
+ $forum_author,
114
+ $this->prefs['new_forum']['creds'],
115
+ $this->prefs['new_forum']['log'],
116
+ $forum_id,
117
+ array( 'ref_type' => 'post' )
118
+ );
119
+ }
120
+
121
+ /**
122
+ * New Topic
123
+ * @since 0.1
124
+ * @version 1.1
125
+ */
126
+ public function new_topic( $topic_id, $forum_id, $anonymous_data, $topic_author ) {
127
+ // Check if user is excluded
128
+ if ( $this->core->exclude_user( $topic_author ) ) return;
129
+
130
+ // Check if forum author is allowed to get points for their own topics
131
+ if ( (bool) $this->prefs['new_topic']['author'] == false ) {
132
+ if ( bbp_get_forum_author_id( $forum_id ) == $topic_author ) return;
133
+ }
134
+
135
+ // Make sure this is unique event
136
+ if ( $this->has_entry( 'new_forum_topic', $topic_id, $topic_author ) ) return;
137
+
138
+ // Execute
139
+ $this->core->add_creds(
140
+ 'new_forum_topic',
141
+ $topic_author,
142
+ $this->prefs['new_topic']['creds'],
143
+ $this->prefs['new_topic']['log'],
144
+ $topic_id,
145
+ array( 'ref_type' => 'post' )
146
+ );
147
+ }
148
+
149
+ /**
150
+ * Topic Added to Favorites
151
+ * @by Fee (http://wordpress.org/support/profile/wdfee)
152
+ * @since 1.1.1
153
+ * @version 1.0
154
+ */
155
+ public function fav_topic( $user_id, $topic_id ) {
156
+
157
+ // $user_id is loggedin_user, not author, so get topic author
158
+ $topic_author = get_post_field( 'post_author', $topic_id );
159
+
160
+ // Check if user is excluded (required)
161
+ if ( $this->core->exclude_user( $topic_author ) || $topic_author == $user_id ) return;
162
+
163
+ // Make sure this is a unique event (favorite not from same user)
164
+ if ( $this->has_entry( 'topic_favorited', $topic_id, $topic_author, 's:8:"ref_user";i:' . $user_id . ';' ) ) return;
165
+
166
+ // Execute
167
+ $this->core->add_creds(
168
+ 'topic_favorited',
169
+ $topic_author,
170
+ $this->prefs['fav_topic']['creds'],
171
+ $this->prefs['fav_topic']['log'],
172
+ $topic_id,
173
+ array( 'ref_user' => $user_id, 'ref_type' => 'post' )
174
+ );
175
+ }
176
+
177
+ /**
178
+ * New Reply
179
+ * @since 0.1
180
+ * @version 1.1
181
+ */
182
+ public function new_reply( $reply_id, $topic_id, $forum_id, $anonymous_data, $reply_author ) {
183
+ // Check if user is excluded
184
+ if ( $this->core->exclude_user( $reply_author ) ) return;
185
+
186
+ // Check if topic author gets points for their own replies
187
+ if ( (bool) $this->prefs['new_reply']['author'] === false ) {
188
+ if ( bbp_get_topic_author_id( $topic_id ) == $reply_author ) return;
189
+ }
190
+
191
+ // Make sure this is unique event
192
+ if ( $this->has_entry( 'new_forum_reply', $reply_id, $reply_author ) ) return;
193
+
194
+ // Execute
195
+ $this->core->add_creds(
196
+ 'new_forum_reply',
197
+ $reply_author,
198
+ $this->prefs['new_reply']['creds'],
199
+ $this->prefs['new_reply']['log'],
200
+ $reply_id,
201
+ array( 'ref_type' => 'post' )
202
+ );
203
+ }
204
+
205
+ /**
206
+ * Insert Balance
207
+ * @since 0.1
208
+ * @version 1.1
209
+ */
210
+ public function insert_balance() {
211
+ $reply_id = bbp_get_reply_id();
212
+ if ( bbp_is_reply_anonymous( $reply_id ) ) return;
213
+
214
+ $balance = $this->core->get_users_cred( bbp_get_reply_author_id( $reply_id ) );
215
+ echo '<div class="mycred-balance">' . $this->core->plural() . ': ' . $this->core->format_creds( $balance ) . '</div>';
216
+ }
217
+
218
+ /**
219
+ * Preferences
220
+ * @since 0.1
221
+ * @version 1.1
222
+ */
223
+ public function preferences() {
224
+ $prefs = $this->prefs;
225
+
226
+ // Update
227
+ if ( !isset( $prefs['show_points_in_reply'] ) )
228
+ $prefs['show_points_in_reply'] = 0;
229
+ if ( !isset( $prefs['new_topic']['author'] ) )
230
+ $prefs['new_topic']['author'] = 0;
231
+ if ( !isset( $prefs['fav_topic'] ) )
232
+ $prefs['fav_topic'] = array( 'creds' => 1, 'log' => '%plural% for someone favorited your forum topic' );
233
+ if ( !isset( $prefs['new_reply']['author'] ) )
234
+ $prefs['new_reply']['author'] = 0; ?>
235
+
236
+ <!-- Creds for New Forums -->
237
+ <label for="<?php echo $this->field_id( array( 'new_forum', 'creds' ) ); ?>" class="subheader"><?php echo $this->core->template_tags_general( __( '%plural% for New Forum', 'mycred' ) ); ?></label>
238
+ <ol id="">
239
+ <li>
240
+ <div class="h2"><input type="text" name="<?php echo $this->field_name( array( 'new_forum', 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'new_forum', 'creds' ) ); ?>" value="<?php echo $this->core->format_number( $prefs['new_forum']['creds'] ); ?>" size="8" /></div>
241
+ </li>
242
+ <li class="empty">&nbsp;</li>
243
+ <li>
244
+ <label for="<?php echo $this->field_id( array( 'new_forum', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
245
+ <div class="h2"><input type="text" name="<?php echo $this->field_name( array( 'new_forum', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'new_forum', 'log' ) ); ?>" value="<?php echo $prefs['new_forum']['log']; ?>" class="long" /></div>
246
+ <span class="description"><?php _e( 'Available template tags: General, Post', 'mycred' ); ?></span>
247
+ </li>
248
+ </ol>
249
+ <!-- Creds for New Topic -->
250
+ <label for="<?php echo $this->field_id( array( 'new_topic', 'creds' ) ); ?>" class="subheader"><?php echo $this->core->template_tags_general( __( '%plural% for New Topic', 'mycred' ) ); ?></label>
251
+ <ol id="">
252
+ <li>
253
+ <div class="h2"><input type="text" name="<?php echo $this->field_name( array( 'new_topic', 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'new_topic', 'creds' ) ); ?>" value="<?php echo $this->core->format_number( $prefs['new_topic']['creds'] ); ?>" size="8" /></div>
254
+ </li>
255
+ <li class="empty">&nbsp;</li>
256
+ <li>
257
+ <label for="<?php echo $this->field_id( array( 'new_topic', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
258
+ <div class="h2"><input type="text" name="<?php echo $this->field_name( array( 'new_topic', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'new_topic', 'log' ) ); ?>" value="<?php echo $prefs['new_topic']['log']; ?>" class="long" /></div>
259
+ <span class="description"><?php _e( 'Available template tags: General, Post', 'mycred' ); ?></span>
260
+ </li>
261
+ <li class="empty">&nbsp;</li>
262
+ <li>
263
+ <input type="checkbox" name="<?php echo $this->field_name( array( 'new_topic' => 'author' ) ); ?>" id="<?php echo $this->field_id( array( 'new_topic' => 'author' ) ); ?>" <?php checked( $prefs['new_topic']['author'], 1 ); ?> value="1" />
264
+ <label for="<?php echo $this->field_id( array( 'new_topic' => 'author' ) ); ?>"><?php echo $this->core->template_tags_general( __( 'Forum authors can receive %_plural% for creating new topics.', 'mycred' ) ); ?></label>
265
+ </li>
266
+ </ol>
267
+ <!-- Creds for Faved Topic -->
268
+ <label for="<?php echo $this->field_id( array( 'fav_topic', 'creds' ) ); ?>" class="subheader"><?php echo $this->core->template_tags_general( __( '%plural% for Favorited Topic', 'mycred' ) ); ?></label>
269
+ <ol id="">
270
+ <li>
271
+ <div class="h2"><input type="text" name="<?php echo $this->field_name( array( 'fav_topic', 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'fav_topic', 'creds' ) ); ?>" value="<?php echo $this->core->format_number( $prefs['fav_topic']['creds'] ); ?>" size="8" /></div>
272
+ </li>
273
+ <li class="empty">&nbsp;</li>
274
+ <li>
275
+ <label for="<?php echo $this->field_id( array( 'fav_topic', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
276
+ <div class="h2"><input type="text" name="<?php echo $this->field_name( array( 'fav_topic', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'fav_topic', 'log' ) ); ?>" value="<?php echo $prefs['fav_topic']['log']; ?>" class="long" /></div>
277
+ <span class="description"><?php _e( 'Available template tags: General, Post', 'mycred' ); ?></span>
278
+ </li>
279
+ </ol>
280
+ <!-- Creds for New Reply -->
281
+ <label for="<?php echo $this->field_id( array( 'new_reply', 'creds' ) ); ?>" class="subheader"><?php echo $this->core->template_tags_general( __( '%plural% for New Reply', 'mycred' ) ); ?></label>
282
+ <ol id="">
283
+ <li>
284
+ <div class="h2"><input type="text" name="<?php echo $this->field_name( array( 'new_reply', 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'new_reply', 'creds' ) ); ?>" value="<?php echo $this->core->format_number( $prefs['new_reply']['creds'] ); ?>" size="8" /></div>
285
+ </li>
286
+ <li class="empty">&nbsp;</li>
287
+ <li>
288
+ <label for="<?php echo $this->field_id( array( 'new_reply', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
289
+ <div class="h2"><input type="text" name="<?php echo $this->field_name( array( 'new_reply', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'new_reply', 'log' ) ); ?>" value="<?php echo $prefs['new_reply']['log']; ?>" class="long" /></div>
290
+ <span class="description"><?php _e( 'Available template tags: General, Post', 'mycred' ); ?></span>
291
+ </li>
292
+ <li class="empty">&nbsp;</li>
293
+ <li>
294
+ <input type="checkbox" name="<?php echo $this->field_name( array( 'new_reply' => 'author' ) ); ?>" id="<?php echo $this->field_id( array( 'new_reply' => 'author' ) ); ?>" <?php checked( $prefs['new_reply']['author'], 1 ); ?> value="1" />
295
+ <label for="<?php echo $this->field_id( array( 'new_reply' => 'author' ) ); ?>"><?php echo $this->core->template_tags_general( __( 'Topic authors can receive %_plural% for replying to their own Topic', 'mycred' ) ); ?></label>
296
+ </li>
297
+ <li class="empty">&nbsp;</li>
298
+ <li>
299
+ <input type="checkbox" name="<?php echo $this->field_name( 'show_points_in_reply' ); ?>" id="<?php echo $this->field_id( 'show_points_in_reply' ); ?>" <?php checked( $prefs['show_points_in_reply'], 1 ); ?> value="1" /> <label for="<?php echo $this->field_id( 'show_points_in_reply' ); ?>"><?php echo $this->core->template_tags_general( __( 'Show users %_plural% balance in replies', 'mycred' ) ); ?>.</label>
300
+ </li>
301
+ </ol>
302
+ <?php unset( $this );
303
+ }
304
+
305
+ /**
306
+ * Sanitise Preference
307
+ * @since 1.1.1
308
+ * @version 1.0
309
+ */
310
+ function sanitise_preferences( $data ) {
311
+ $new_data = $data;
312
+
313
+ $new_data['new_topic']['author'] = ( isset( $data['new_topic']['author'] ) ) ? $data['new_topic']['author'] : 0;
314
+ $new_data['new_reply']['author'] = ( isset( $data['new_reply']['author'] ) ) ? $data['new_reply']['author'] : 0;
315
+
316
+ return $new_data;
317
+ }
318
+ }
319
+ }
320
+ }
321
+
322
  /**
323
  * Hooks for Invite Anyone Plugin
324
  * @since 0.1
389
  $user_log['sent'] = $user_log['sent']+1;
390
  update_user_meta( $user_id, 'mycred_invite_anyone', $user_log );
391
  }
 
 
 
392
  }
393
 
394
  /**
421
  update_user_meta( $inviter_id, 'mycred_invite_anyone', $user_log );
422
  }
423
  }
 
 
 
424
  }
425
 
426
  /**
527
  endwhile;
528
  }
529
  wp_reset_postdata();
 
 
530
  }
531
 
532
  /**
549
  array( 'ref_type' => 'post' )
550
  );
551
  }
 
 
 
552
  }
553
 
554
  /**
mycred.php CHANGED
@@ -3,17 +3,17 @@
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.1
7
- Tags: points, tokens, credit, management, reward, charge, buddypress, jetpack, ranks, email notice, buy, sell
8
  Author: Gabriel S Merovingi
9
  Author URI: http://www.merovingi.com
10
- Author Email: support@mycred.me
11
  Requires at least: WP 3.1
12
  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.1' );
17
  define( 'myCRED_SLUG', 'mycred' );
18
  define( 'myCRED_NAME', '<strong>my</strong>CRED' );
19
 
@@ -33,7 +33,7 @@ define( 'myCRED_MODULES_DIR', myCRED_ROOT_DIR . 'modules/' );
33
  * @version 1.0
34
  */
35
  if ( !class_exists( 'myCRED_Core' ) ) {
36
- class myCRED_Core {
37
 
38
  public $plug;
39
 
@@ -61,31 +61,45 @@ if ( !class_exists( 'myCRED_Core' ) ) {
61
  // Make sure we are ready
62
  if ( !$this->ready() ) return;
63
 
64
- // Load these only when ready
65
- require_once( myCRED_INCLUDES_DIR . 'mycred-rankings.php' );
66
- require_once( myCRED_INCLUDES_DIR . 'mycred-shortcodes.php' );
67
-
68
  // Load
69
  $this->load();
70
 
71
- // Localization
72
- add_action( 'plugins_loaded', array( $this, 'pre_init' ) );
73
 
74
- // Inits
75
  add_action( 'init', array( $this, 'init_mycred' ) );
76
 
 
77
  if ( is_admin() )
78
  add_action( 'admin_init', array( $this, 'admin_init_mycred' ) );
79
 
 
80
  add_action( 'widgets_init', array( $this, 'widgets_init_mycred' ) );
 
 
81
  add_action( 'mycred_reset_key', array( $this, 'reset_key' ) );
82
 
83
- // Pre Init
84
- do_action( 'mycred_pre_init' );
85
 
86
  // Clean up
87
  $this->clean_up();
88
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
 
90
  /**
91
  * Plugin Links
@@ -222,9 +236,32 @@ if ( !class_exists( 'myCRED_Core' ) ) {
222
  * @version 2.0
223
  */
224
  function load() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
225
  // Load Modules
226
  $modules = apply_filters( 'mycred_modules', array(
227
- 'addons' => array( 'class' => 'myCRED_Addons' ),
228
  'general' => array( 'class' => 'myCRED_General' ),
229
  'hooks' => array( 'class' => 'myCRED_Hooks' ),
230
  'log' => array( 'class' => 'myCRED_Log' ),
@@ -233,10 +270,6 @@ if ( !class_exists( 'myCRED_Core' ) ) {
233
 
234
  if ( !empty( $modules ) ) {
235
 
236
- // Load Abstracts
237
- require_once( myCRED_ABSTRACTS_DIR . 'mycred-abstract-module.php' );
238
- require_once( myCRED_ABSTRACTS_DIR . 'mycred-abstract-hook.php' );
239
-
240
  // Include, init and load each module
241
  foreach ( $modules as $id => $data ) {
242
  // If a file is not specified we assume it is our own and load from the default locaiton
@@ -249,24 +282,23 @@ if ( !class_exists( 'myCRED_Core' ) ) {
249
  // Load class
250
  if ( isset( $data['class'] ) ) {
251
  $class = $data['class'];
 
252
  $module = new $class();
253
  $module->load();
254
  }
 
 
 
 
 
 
255
  }
256
  // Clean up
257
  unset( $modules );
258
  }
259
- }
260
-
261
- /**
262
- * Pre Init (Plugins Loaded)
263
- * @since 0.1
264
- * @version 3.0
265
- */
266
- function pre_init() {
267
- load_plugin_textdomain( 'mycred', false, myCRED_LANG_DIR );
268
-
269
- do_action( 'mycred_plugins_loaded' );
270
  }
271
 
272
  /**
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.1.1
7
+ Tags: points, tokens, credit, management, reward, charge
8
  Author: Gabriel S Merovingi
9
  Author URI: http://www.merovingi.com
10
+ Author Email: mycred@merovingi.com
11
  Requires at least: WP 3.1
12
  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.1.1' );
17
  define( 'myCRED_SLUG', 'mycred' );
18
  define( 'myCRED_NAME', '<strong>my</strong>CRED' );
19
 
33
  * @version 1.0
34
  */
35
  if ( !class_exists( 'myCRED_Core' ) ) {
36
+ final class myCRED_Core {
37
 
38
  public $plug;
39
 
61
  // Make sure we are ready
62
  if ( !$this->ready() ) return;
63
 
 
 
 
 
64
  // Load
65
  $this->load();
66
 
67
+ // Plugins Loaded (attempt to run last so others can load before us)
68
+ add_action( 'plugins_loaded', array( $this, 'wp_ready' ), 999 );
69
 
70
+ // Init
71
  add_action( 'init', array( $this, 'init_mycred' ) );
72
 
73
+ // Admin Init
74
  if ( is_admin() )
75
  add_action( 'admin_init', array( $this, 'admin_init_mycred' ) );
76
 
77
+ // Widget Init
78
  add_action( 'widgets_init', array( $this, 'widgets_init_mycred' ) );
79
+
80
+ // Add key reset to cron
81
  add_action( 'mycred_reset_key', array( $this, 'reset_key' ) );
82
 
83
+ // myCRED is ready
84
+ do_action( 'mycred_ready' );
85
 
86
  // Clean up
87
  $this->clean_up();
88
  }
89
+
90
+ /**
91
+ * Prevent myCRED from being cloned
92
+ * @since 1.1.1
93
+ * @version 1.0
94
+ */
95
+ public function __clone() { _doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'mycred' ), '1.1.1' ); }
96
+
97
+ /**
98
+ * Prevent myCRED from being unserialized
99
+ * @since 1.1.1
100
+ * @version 1.0
101
+ */
102
+ public function __wakeup() { _doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'mycred' ), '1.1.1' ); }
103
 
104
  /**
105
  * Plugin Links
236
  * @version 2.0
237
  */
238
  function load() {
239
+ // Rankings
240
+ require_once( myCRED_INCLUDES_DIR . 'mycred-rankings.php' );
241
+
242
+ // Shortcodes
243
+ require_once( myCRED_INCLUDES_DIR . 'mycred-shortcodes.php' );
244
+
245
+ // Abstract Classes
246
+ require_once( myCRED_ABSTRACTS_DIR . 'mycred-abstract-module.php' );
247
+ require_once( myCRED_ABSTRACTS_DIR . 'mycred-abstract-hook.php' );
248
+
249
+ // Start with Add-ons so they can hook in as early as possible
250
+ require_once( myCRED_MODULES_DIR . 'mycred-module-addons.php' );
251
+ $addons = new myCRED_Addons();
252
+ $addons->load();
253
+ }
254
+
255
+ /**
256
+ * WordPress Ready
257
+ * @since 0.1
258
+ * @version 3.1
259
+ */
260
+ function wp_ready() {
261
+ load_plugin_textdomain( 'mycred', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
262
+
263
  // Load Modules
264
  $modules = apply_filters( 'mycred_modules', array(
 
265
  'general' => array( 'class' => 'myCRED_General' ),
266
  'hooks' => array( 'class' => 'myCRED_Hooks' ),
267
  'log' => array( 'class' => 'myCRED_Log' ),
270
 
271
  if ( !empty( $modules ) ) {
272
 
 
 
 
 
273
  // Include, init and load each module
274
  foreach ( $modules as $id => $data ) {
275
  // If a file is not specified we assume it is our own and load from the default locaiton
282
  // Load class
283
  if ( isset( $data['class'] ) ) {
284
  $class = $data['class'];
285
+ if ( !class_exists( $class ) ) continue;
286
  $module = new $class();
287
  $module->load();
288
  }
289
+ // Load function
290
+ elseif ( isset( $data['function'] ) ) {
291
+ $function = $data['function'];
292
+ if ( !function_exists( $function ) ) continue;
293
+ $function( 'load' );
294
+ }
295
  }
296
  // Clean up
297
  unset( $modules );
298
  }
299
+
300
+ // First Custom Hook
301
+ do_action( 'mycred_pre_init' );
 
 
 
 
 
 
 
 
302
  }
303
 
304
  /**
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === myCRED ===
2
  Contributors: designbymerovingi
3
  Donate Link: http://mycred.me/donate/
4
- Tags:points, tokens, credit, management, reward, charge, community, contest, BuddyPress, Jetpack, ranks, email notice
5
  Requires at least: 3.1
6
- Tested up to: 3.5.1
7
- Stable tag: 1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -42,8 +42,7 @@ Your myCRED installation comes packed with optional add-ons, adding further feat
42
  * *Buy Creds* - Let your users buy points via PayPal, Skrill, Zombaio or NETbilling.
43
  * *Ranks* - Allows you to setup ranks based on your users points balance.
44
  * *Gateway* - Allow your users to pay for items in their WooCommerce or MarketPress shopping cart using their point balance.
45
- * *BuddyPress* - Extend **my**CRED 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/).
46
-
47
 
48
  **Multisites**
49
 
@@ -52,7 +51,6 @@ Your myCRED installation comes packed with optional add-ons, adding further feat
52
  * *Master Template* - Force your main sites **my**CRED installation upon all other sites. Each site will have it's own log but have no access to any settings, hooks or add-ons.
53
  * *Block List* - Allows you to block specific sites from using **my**CRED.
54
 
55
-
56
  **Supported Third-party Plugins:**
57
 
58
  The following third party plugins are supported by default:
@@ -64,6 +62,8 @@ The following third party plugins are supported by default:
64
  * [WP-Polls](http://wordpress.org/plugins/wp-polls/) - Award points for users voting in polls.
65
  * [WP Favorite Posts](http://wordpress.org/plugins/wp-favorite-posts/) - Award points for users adding posts to their favorites or deduct points if they remove posts.
66
  * [Events Manager](http://wordpress.org/plugins/events-manager/) - Award points for users attending events with the option to deduct points if attendance is cancelled.
 
 
67
 
68
  **Further Details**
69
 
@@ -126,8 +126,39 @@ Yes but if one of them is bought, all is shown. The mycred_sell_this shortcode w
126
  5. **Import Add-on** - The Import Add-on allows you to import points using a CSV file or by importing existing points from your database.
127
 
128
 
 
 
 
 
 
 
 
 
 
129
  == Changelog ==
130
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
  = 1.1 =
132
  * Added new Email Notices Add-on.
133
  * Added new Ranks Add-on.
1
  === myCRED ===
2
  Contributors: designbymerovingi
3
  Donate Link: http://mycred.me/donate/
4
+ Tags:points, tokens, credit, management, reward, charge, community, contest, BuddyPress, Jetpack, bbPress
5
  Requires at least: 3.1
6
+ Tested up to: 3.5.2
7
+ Stable tag: 1.1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
42
  * *Buy Creds* - Let your users buy points via PayPal, Skrill, Zombaio or NETbilling.
43
  * *Ranks* - Allows you to setup ranks based on your users points balance.
44
  * *Gateway* - Allow your users to pay for items in their WooCommerce or MarketPress shopping cart using their point balance.
45
+ * *BuddyPress* - Extend **my**CRED to support [BuddyPress](http://wordpress.org/extend/plugins/buddypress/), [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/).
 
46
 
47
  **Multisites**
48
 
51
  * *Master Template* - Force your main sites **my**CRED installation upon all other sites. Each site will have it's own log but have no access to any settings, hooks or add-ons.
52
  * *Block List* - Allows you to block specific sites from using **my**CRED.
53
 
 
54
  **Supported Third-party Plugins:**
55
 
56
  The following third party plugins are supported by default:
62
  * [WP-Polls](http://wordpress.org/plugins/wp-polls/) - Award points for users voting in polls.
63
  * [WP Favorite Posts](http://wordpress.org/plugins/wp-favorite-posts/) - Award points for users adding posts to their favorites or deduct points if they remove posts.
64
  * [Events Manager](http://wordpress.org/plugins/events-manager/) - Award points for users attending events with the option to deduct points if attendance is cancelled.
65
+ * [bbPress](http://wordpress.org/extend/plugins/bbpress/) - Award points for new forums, topics, replies and for topics getting added to "Favorites".
66
+
67
 
68
  **Further Details**
69
 
126
  5. **Import Add-on** - The Import Add-on allows you to import points using a CSV file or by importing existing points from your database.
127
 
128
 
129
+ == Upgrade Notice ==
130
+
131
+ = 1.1.1 =
132
+ This version resolves bugs with the MarketPress add-on and third-party plugins support. You will also have access to the bbPress hooks without the need to use Buddypress.
133
+
134
+ * bbPress users should visit the "Hooks" sub-menu and re-enter their hook settings as these will be reset.
135
+ * Ranks Add-on users should visit the "Settings" sub-menu and confirm their Rank settings as new settings will be available.
136
+
137
+
138
  == Changelog ==
139
 
140
+ **Updating to 1.1.1** Note that in this version the bbPress hook has been moved from the BuddyPress add-on to the core plugin support. This means that you you no longer require BuddyPress to access the bbPress Hook!
141
+
142
+ Once you have updated to 1.1.1, visit the Hooks sub-menu page in the myCRED menu and update your bbPress settings!
143
+
144
+ = 1.1.1 =
145
+ * Moved the bbPress Hook from BuddyPress add-on to default plugin hooks.
146
+ * Added points for users adding an authors topic to favourites. By [Fee](http://wordpress.org/support/profile/wdfee).
147
+ * Added option to include authors point balance under author details and profile.
148
+ * Added [mycred_list_ranks] to Ranks Add-on.
149
+ * Added option to set if ranks should be displayed Ascending or Descending.
150
+ * Added support for 'content', 'excerpt', 'custom-fields' and 'page-attributes' for Ranks.
151
+ * Added Rank column in User list.
152
+ * Adjusted Ranks add-on to update all users ranks when an already published rank gets updated.
153
+ * Adjusted [mycred_users_of_rank] to support table outputs.
154
+ * Added new function mycred_get_total_by_time.
155
+ * Added Daily and / or Per post limits for comments. By default these are disabled.
156
+ * Added option to allow points to be awarded for comment authors reply to their own comment. By default disabled.
157
+ * Fixed Bug #31 - Language files are not loaded.
158
+ * Fixed Bug #32 - Incorrect spelling of the myCRED_Hook class for Events Manager causes white screen of death.
159
+ * Fixed Bug #33 - Hooks run() method fires to early causing custom hooks to fail to run.
160
+ * Fixed Bug #34 - Import Add-on's CubePoints import does not log import.
161
+
162
  = 1.1 =
163
  * Added new Email Notices Add-on.
164
  * Added new Ranks Add-on.