myCRED - Version 2.4.5

Version Description

Code improvement.

Download this release

Release Info

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

Code changes from version 2.4.4.4 to 2.4.5

Files changed (86) hide show
  1. addons/badges/includes/mycred-badge-secondary.php +14 -1
  2. addons/badges/myCRED-addon-badges.php +54 -35
  3. addons/buy-creds/abstracts/mycred-abstract-payment-gateway.php +43 -43
  4. addons/buy-creds/gateways/bank-transfer.php +18 -18
  5. addons/buy-creds/gateways/bitpay.php +29 -29
  6. addons/buy-creds/gateways/netbilling.php +31 -25
  7. addons/buy-creds/gateways/paypal-standard.php +19 -19
  8. addons/buy-creds/gateways/skrill.php +38 -32
  9. addons/buy-creds/includes/buycred-reward-hook.php +9 -9
  10. addons/buy-creds/includes/buycred-shortcodes.php +12 -12
  11. addons/buy-creds/modules/buycred-module-core.php +35 -35
  12. addons/buy-creds/modules/buycred-module-pending.php +10 -10
  13. addons/cash-creds/gateways/bank-transfer.php +8 -8
  14. addons/cash-creds/includes/cashcred-shortcodes.php +7 -7
  15. addons/cash-creds/modules/cashcred-module-core.php +18 -19
  16. addons/cash-creds/modules/cashcred-module-withdrawal.php +14 -14
  17. addons/coupons/includes/mycred-coupon-shortcodes.php +2 -2
  18. addons/coupons/myCRED-addon-coupons.php +64 -63
  19. addons/email-notices/includes/mycred-email-shortcodes.php +8 -8
  20. addons/email-notices/myCRED-addon-email-notices.php +56 -56
  21. addons/notifications/myCRED-addon-notifications.php +14 -14
  22. addons/ranks/myCRED-addon-ranks.php +128 -113
  23. addons/sell-content/includes/mycred-sell-shortcodes.php +6 -6
  24. addons/sell-content/myCRED-addon-sell-content.php +82 -84
  25. addons/stats/includes/mycred-stats-object.php +1 -1
  26. addons/stats/myCRED-addon-stats.php +9 -9
  27. addons/stats/widgets/mycred-stats-widget-circulation.php +24 -24
  28. addons/stats/widgets/mycred-stats-widget-daily-gains.php +2 -2
  29. addons/stats/widgets/mycred-stats-widget-daily-loses.php +2 -2
  30. addons/transfer/includes/mycred-transfer-widgets.php +18 -18
  31. addons/transfer/myCRED-addon-transfer.php +27 -27
  32. freemius/includes/sdk/Exceptions/ArgumentNotExistException.php +13 -13
  33. freemius/includes/sdk/Exceptions/EmptyArgumentException.php +13 -13
  34. includes/classes/class.query-log.php +6 -6
  35. includes/hooks/external/mycred-hook-affiliatewp.php +34 -34
  36. includes/hooks/external/mycred-hook-badgeOS.php +21 -21
  37. includes/hooks/external/mycred-hook-bbPress.php +43 -43
  38. includes/hooks/external/mycred-hook-buddypress-media.php +21 -21
  39. includes/hooks/external/mycred-hook-buddypress.php +87 -87
  40. includes/hooks/external/mycred-hook-contact-form7.php +3 -3
  41. includes/hooks/external/mycred-hook-events-manager-light.php +7 -7
  42. includes/hooks/external/mycred-hook-gravityforms.php +3 -3
  43. includes/hooks/external/mycred-hook-invite-anyone.php +8 -8
  44. includes/hooks/external/mycred-hook-jetpack.php +6 -6
  45. includes/hooks/external/mycred-hook-simplepress.php +14 -14
  46. includes/hooks/external/mycred-hook-woocommerce.php +4 -4
  47. includes/hooks/external/mycred-hook-wp-favorite-posts.php +16 -16
  48. includes/hooks/external/mycred-hook-wp-polls.php +2 -2
  49. includes/hooks/external/mycred-hook-wp-postratings.php +11 -11
  50. includes/hooks/mycred-hook-anniversary.php +5 -5
  51. includes/hooks/mycred-hook-comments.php +23 -23
  52. includes/hooks/mycred-hook-delete-content.php +11 -11
  53. includes/hooks/mycred-hook-link-clicks.php +4 -4
  54. includes/hooks/mycred-hook-logins.php +3 -3
  55. includes/hooks/mycred-hook-publishing-content.php +11 -11
  56. includes/hooks/mycred-hook-referrals.php +22 -19
  57. includes/hooks/mycred-hook-registrations.php +2 -2
  58. includes/hooks/mycred-hook-site-visits.php +2 -2
  59. includes/hooks/mycred-hook-view-content.php +26 -26
  60. includes/hooks/mycred-hook-watching-video.php +11 -11
  61. includes/importers/mycred-balances.php +7 -7
  62. includes/importers/mycred-cubepoints.php +7 -7
  63. includes/importers/mycred-log-entries.php +4 -4
  64. includes/mycred-overview.php +3 -3
  65. includes/mycred-remote.php +13 -13
  66. includes/mycred-tools-bulk-assign.php +11 -11
  67. includes/mycred-tools-import-export.php +42 -42
  68. includes/mycred-tools-setup-import-export.php +5 -5
  69. includes/shortcodes/mycred_exchange.php +2 -2
  70. includes/shortcodes/mycred_hook_table.php +3 -3
  71. includes/shortcodes/mycred_show_if.php +6 -0
  72. includes/widgets/mycred-widget-balance.php +9 -9
  73. includes/widgets/mycred-widget-leaderboard.php +24 -24
  74. includes/widgets/mycred-widget-wallet.php +5 -5
  75. membership/mycred-connect-membership.php +3 -3
  76. modules/mycred-module-addons.php +3 -3
  77. modules/mycred-module-buddypress.php +9 -9
  78. modules/mycred-module-caching.php +17 -17
  79. modules/mycred-module-export.php +12 -12
  80. modules/mycred-module-hooks.php +17 -14
  81. modules/mycred-module-log.php +8 -8
  82. modules/mycred-module-management.php +22 -22
  83. modules/mycred-module-network.php +15 -15
  84. modules/mycred-module-settings.php +62 -62
  85. mycred.php +6 -6
  86. readme.txt +7 -1
addons/badges/includes/mycred-badge-secondary.php CHANGED
@@ -80,13 +80,26 @@ if ( ! class_exists( 'myCRED_Badge_Secondary' ) ) :
80
 
81
  <?php
82
  if( class_exists('RGFormsModel') ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  $gravityforms = RGFormsModel::get_forms();
84
  $form_list = '<option>Any</option>';
85
  foreach ( $gravityforms as $form ) {
86
  $form_list .= '<option value="'.$form->id.'">'. htmlentities( $form->title, ENT_QUOTES ) .'</option>';
87
  }
88
  $data = '<div class="form-group"><select name="{{element_name}}" class="form-control specific" data-row="{{reqlevel}}" >'.$form_list.'</select></div>';
89
- echo "var mycred_badge_gravity_form_submission = '" . $data . "';";
90
  }
91
  ?>
92
  </script>
80
 
81
  <?php
82
  if( class_exists('RGFormsModel') ) {
83
+ $select_parm = array(
84
+ 'div' => array(
85
+ 'class' => array(),
86
+ ),
87
+ 'select' => array(
88
+ 'name' => array(),
89
+ 'class' => array(),
90
+ 'data-row' => array(),
91
+ ),
92
+ 'option' => array(
93
+ 'value' => array()
94
+ ),
95
+ );
96
  $gravityforms = RGFormsModel::get_forms();
97
  $form_list = '<option>Any</option>';
98
  foreach ( $gravityforms as $form ) {
99
  $form_list .= '<option value="'.$form->id.'">'. htmlentities( $form->title, ENT_QUOTES ) .'</option>';
100
  }
101
  $data = '<div class="form-group"><select name="{{element_name}}" class="form-control specific" data-row="{{reqlevel}}" >'.$form_list.'</select></div>';
102
+ echo "var mycred_badge_gravity_form_submission = '" . wp_kses( $data, $select_parm ) . "';";
103
  }
104
  ?>
105
  </script>
addons/badges/myCRED-addon-badges.php CHANGED
@@ -502,7 +502,7 @@ if ( ! class_exists( 'myCRED_Badge_Module' ) ) :
502
 
503
  }
504
 
505
- elseif ( $pagenow == 'post.php' && isset( $_GET['post'] ) && mycred_get_post_type( $_GET['post'] ) == MYCRED_BADGE_KEY ) {
506
 
507
  return MYCRED_MAIN_SLUG;
508
 
@@ -534,7 +534,7 @@ if ( ! class_exists( 'myCRED_Badge_Module' ) ) :
534
 
535
  }
536
 
537
- elseif ( $pagenow == 'post.php' && isset( $_GET['post'] ) && mycred_get_post_type( $_GET['post'] ) == MYCRED_BADGE_KEY ) {
538
 
539
  return 'edit.php?post_type=' . MYCRED_BADGE_KEY;
540
 
@@ -1099,6 +1099,42 @@ th#badge-users { width: 10%; }
1099
  <div id="badge-levels">
1100
  <?php
1101
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1102
  // Loop through each badge level
1103
  $level_counter = 0;
1104
  foreach ( $badge->levels as $level => $setup ) {
@@ -1275,7 +1311,7 @@ th#badge-users { width: 10%; }
1275
 
1276
  $js_level = str_replace( '{{rewards}}', $rewards, $js_level );
1277
 
1278
- echo $template;
1279
 
1280
  $level_counter++;
1281
 
@@ -1286,9 +1322,9 @@ th#badge-users { width: 10%; }
1286
  ?>
1287
  </div>
1288
  <script type="text/javascript">
1289
- var BadgeLevel = '<?php echo $js_level; ?>';
1290
- var BadgeNewRequrement = '<?php echo $js_requirement; ?>';
1291
- var BadgeRequirement = '<?php echo $js_requirement_clone; ?>';
1292
  </script>
1293
  <?php
1294
 
@@ -1304,7 +1340,7 @@ th#badge-users { width: 10%; }
1304
  if ( $post === NULL || ! $this->core->user_is_point_editor() || ! isset( $_POST['mycred_badge'] ) ) return $post_id;
1305
 
1306
  // Main image (used when a user has not earned a badge
1307
- $main_image = $_POST['mycred_badge']['main_image'];
1308
 
1309
  // If we are using an attachment
1310
  if ( absint( $main_image ) > 0 )
@@ -1312,7 +1348,7 @@ th#badge-users { width: 10%; }
1312
 
1313
  // Else we are using a URL (old setup)
1314
  else
1315
- $image = sanitize_text_field( $_POST['mycred_badge']['main_image_url'] );
1316
 
1317
  $manual = 0;
1318
  if ( isset( $_POST['mycred_badge']['manual'] ) )
@@ -1324,15 +1360,15 @@ th#badge-users { width: 10%; }
1324
 
1325
  $congratulation_msg = '';
1326
  if ( isset( $_POST['mycred_badge']['congratulation_msg'] ) )
1327
- $congratulation_msg = sanitize_text_field( $_POST['mycred_badge']['congratulation_msg'] );
1328
 
1329
  $badge_align = '';
1330
  if ( isset( $_POST['mycred_badge']['mycred_badge_align'] ) )
1331
- $badge_align = sanitize_text_field( $_POST['mycred_badge']['mycred_badge_align'] );
1332
 
1333
  $layout = '';
1334
  if ( isset( $_POST['mycred_badge']['mycred_layout_check'] ) )
1335
- $layout = sanitize_text_field( $_POST['mycred_badge']['mycred_layout_check'] );
1336
 
1337
  $badge_levels = array();
1338
  $badge_requirements = array();
@@ -1755,7 +1791,7 @@ th#badge-users { width: 10%; }
1755
  <div class="badge-wrapper<?php if ( ! mycred_is_admin() ) echo ' badge-wrapper-center'; ?> color-option<?php if ( $earned === 1 ) echo ' selected'; ?>" id="mycred-badge<?php echo esc_attr( $badge_id ); ?>-wrapper">
1756
  <div>
1757
  <?php if ( mycred_is_admin() ):?>
1758
- <label for="mycred-badge<?php echo esc_attr( $badge_id ); ?>"><input type="checkbox" name="mycred_badge_manual[badges][<?php echo $badge_id; ?>][has]" class="toggle-badge" id="mycred-badge<?php echo esc_attr( $badge_id ); ?>" <?php checked( $earned, 1 );?> value="1" /> <?php esc_html_e( 'Earned', 'mycred' ); ?></label>
1759
  <?php endif; ?>
1760
  <div class="badge-image-wrap">
1761
 
@@ -1791,7 +1827,7 @@ th#badge-users { width: 10%; }
1791
 
1792
  <?php if ( $badge->open_badge && array_key_exists( $badge_id, $users_badges ) ):?>
1793
  <div class="badge-image-wrap">
1794
- <a href="<?php echo $badge->get_earned_image( $user_id ); ?> " class="button button-primary button-large mycred-open-badge-download" download>Download</a>
1795
  </div>
1796
  <?php endif; ?>
1797
  </div>
@@ -1902,7 +1938,7 @@ th#badge-users { width: 10%; }
1902
 
1903
  check_ajax_referer( 'mycred-assign-badge', 'token' );
1904
 
1905
- $badge_id = absint( $_POST['badge_id'] );
1906
  if ( $badge_id === 0 ) wp_send_json_error();
1907
 
1908
  // Get the badge object
@@ -1929,7 +1965,7 @@ th#badge-users { width: 10%; }
1929
 
1930
  check_ajax_referer( 'mycred-remove-badge-connection', 'token' );
1931
 
1932
- $badge_id = absint( $_POST['badge_id'] );
1933
  if ( $badge_id === 0 ) wp_send_json_error();
1934
 
1935
  // Get the badge object
@@ -1956,13 +1992,7 @@ th#badge-users { width: 10%; }
1956
 
1957
  $user_id = bbp_get_displayed_user_id();
1958
  if ( isset( $this->badges['show_all_bb'] ) && $this->badges['show_all_bb'] == 1 )
1959
- echo mycred_render_my_badges( array(
1960
- 'show' => 'all',
1961
- 'width' => MYCRED_BADGE_WIDTH,
1962
- 'height' => MYCRED_BADGE_HEIGHT,
1963
- 'user_id' => $user_id
1964
- ) );
1965
-
1966
  else
1967
  mycred_display_users_badges( $user_id );
1968
 
@@ -1980,13 +2010,7 @@ th#badge-users { width: 10%; }
1980
  if ( $user_id > 0 ) {
1981
 
1982
  if ( isset( $this->badges['show_all_bb'] ) && $this->badges['show_all_bb'] == 1 )
1983
- echo mycred_render_my_badges( array(
1984
- 'show' => 'all',
1985
- 'width' => MYCRED_BADGE_WIDTH,
1986
- 'height' => MYCRED_BADGE_HEIGHT,
1987
- 'user_id' => $user_id
1988
- ) );
1989
-
1990
  else
1991
  mycred_display_users_badges( $user_id );
1992
 
@@ -2003,12 +2027,7 @@ th#badge-users { width: 10%; }
2003
 
2004
  $user_id = bp_displayed_user_id();
2005
  if ( isset( $this->badges['show_all_bp'] ) && $this->badges['show_all_bp'] == 1 )
2006
- echo mycred_render_my_badges( array(
2007
- 'show' => 'all',
2008
- 'width' => MYCRED_BADGE_WIDTH,
2009
- 'height' => MYCRED_BADGE_HEIGHT,
2010
- 'user_id' => $user_id
2011
- ) );
2012
 
2013
  else
2014
  mycred_display_users_badges( $user_id );
502
 
503
  }
504
 
505
+ elseif ( $pagenow == 'post.php' && isset( $_GET['post'] ) && mycred_get_post_type( sanitize_text_field( wp_unslash( $_GET['post'] ) ) ) == MYCRED_BADGE_KEY ) {
506
 
507
  return MYCRED_MAIN_SLUG;
508
 
534
 
535
  }
536
 
537
+ elseif ( $pagenow == 'post.php' && isset( $_GET['post'] ) && mycred_get_post_type( sanitize_text_field( wp_unslash( $_GET['post'] ) ) ) == MYCRED_BADGE_KEY ) {
538
 
539
  return 'edit.php?post_type=' . MYCRED_BADGE_KEY;
540
 
1099
  <div id="badge-levels">
1100
  <?php
1101
 
1102
+ $esc_param = array(
1103
+ 'div' => array(
1104
+ 'class' => array(),
1105
+ 'id' => array(),
1106
+ 'data-level' => array(),
1107
+ 'style' => array(),
1108
+ ),
1109
+ 'button' => array(
1110
+ 'type' => array(),
1111
+ 'class' => array(),
1112
+ 'id' => array(),
1113
+ ),
1114
+ 'img' => array(
1115
+ 'alt' => array(),
1116
+ 'class' => array(),
1117
+ 'height' => array(),
1118
+ 'src' => array(),
1119
+ 'width' => array(),
1120
+ ),
1121
+ 'input' => array(
1122
+ 'type' => array(),
1123
+ 'name' => array(),
1124
+ 'value' => array(),
1125
+ 'placeholder' => array(),
1126
+ 'class' => array(),
1127
+ ),
1128
+ 'select' => array(
1129
+ 'name' => array(),
1130
+ 'class' => array(),
1131
+ 'data_row' => array(),
1132
+ ),
1133
+ 'option' => array(
1134
+ 'value' => array()
1135
+ ),
1136
+ );
1137
+
1138
  // Loop through each badge level
1139
  $level_counter = 0;
1140
  foreach ( $badge->levels as $level => $setup ) {
1311
 
1312
  $js_level = str_replace( '{{rewards}}', $rewards, $js_level );
1313
 
1314
+ echo $template;
1315
 
1316
  $level_counter++;
1317
 
1322
  ?>
1323
  </div>
1324
  <script type="text/javascript">
1325
+ var BadgeLevel = '<?php echo wp_kses( $js_level, $esc_param ); ?>';
1326
+ var BadgeNewRequrement = '<?php echo wp_kses( $js_requirement, $esc_param ); ?>';
1327
+ var BadgeRequirement = '<?php echo wp_kses( $js_requirement_clone, $esc_param ); ?>';
1328
  </script>
1329
  <?php
1330
 
1340
  if ( $post === NULL || ! $this->core->user_is_point_editor() || ! isset( $_POST['mycred_badge'] ) ) return $post_id;
1341
 
1342
  // Main image (used when a user has not earned a badge
1343
+ $main_image = ! empty( $_POST['mycred_badge']['main_image'] ) ? absint( $_POST['mycred_badge']['main_image'] ) : '';
1344
 
1345
  // If we are using an attachment
1346
  if ( absint( $main_image ) > 0 )
1348
 
1349
  // Else we are using a URL (old setup)
1350
  else
1351
+ $image = ! empty( $_POST['mycred_badge']['main_image_url'] ) ? sanitize_text_field( wp_unslash( $_POST['mycred_badge']['main_image_url'] ) ) : '';
1352
 
1353
  $manual = 0;
1354
  if ( isset( $_POST['mycred_badge']['manual'] ) )
1360
 
1361
  $congratulation_msg = '';
1362
  if ( isset( $_POST['mycred_badge']['congratulation_msg'] ) )
1363
+ $congratulation_msg = sanitize_text_field( wp_unslash( $_POST['mycred_badge']['congratulation_msg'] ) );
1364
 
1365
  $badge_align = '';
1366
  if ( isset( $_POST['mycred_badge']['mycred_badge_align'] ) )
1367
+ $badge_align = sanitize_text_field( wp_unslash( $_POST['mycred_badge']['mycred_badge_align'] ) );
1368
 
1369
  $layout = '';
1370
  if ( isset( $_POST['mycred_badge']['mycred_layout_check'] ) )
1371
+ $layout = sanitize_text_field( wp_unslash( $_POST['mycred_badge']['mycred_layout_check'] ) );
1372
 
1373
  $badge_levels = array();
1374
  $badge_requirements = array();
1791
  <div class="badge-wrapper<?php if ( ! mycred_is_admin() ) echo ' badge-wrapper-center'; ?> color-option<?php if ( $earned === 1 ) echo ' selected'; ?>" id="mycred-badge<?php echo esc_attr( $badge_id ); ?>-wrapper">
1792
  <div>
1793
  <?php if ( mycred_is_admin() ):?>
1794
+ <label for="mycred-badge<?php echo esc_attr( $badge_id ); ?>"><input type="checkbox" name="mycred_badge_manual[badges][<?php echo esc_attr( $badge_id ); ?>][has]" class="toggle-badge" id="mycred-badge<?php echo esc_attr( $badge_id ); ?>" <?php checked( $earned, 1 );?> value="1" /> <?php esc_html_e( 'Earned', 'mycred' ); ?></label>
1795
  <?php endif; ?>
1796
  <div class="badge-image-wrap">
1797
 
1827
 
1828
  <?php if ( $badge->open_badge && array_key_exists( $badge_id, $users_badges ) ):?>
1829
  <div class="badge-image-wrap">
1830
+ <a href="<?php echo esc_url( $badge->get_earned_image( $user_id ) ); ?> " class="button button-primary button-large mycred-open-badge-download" download>Download</a>
1831
  </div>
1832
  <?php endif; ?>
1833
  </div>
1938
 
1939
  check_ajax_referer( 'mycred-assign-badge', 'token' );
1940
 
1941
+ $badge_id = ! empty( $_POST['badge_id'] ) ? absint( $_POST['badge_id'] ) : '';
1942
  if ( $badge_id === 0 ) wp_send_json_error();
1943
 
1944
  // Get the badge object
1965
 
1966
  check_ajax_referer( 'mycred-remove-badge-connection', 'token' );
1967
 
1968
+ $badge_id = ! empty( $_POST['badge_id'] ) ? absint( $_POST['badge_id'] ) : '';
1969
  if ( $badge_id === 0 ) wp_send_json_error();
1970
 
1971
  // Get the badge object
1992
 
1993
  $user_id = bbp_get_displayed_user_id();
1994
  if ( isset( $this->badges['show_all_bb'] ) && $this->badges['show_all_bb'] == 1 )
1995
+ echo do_shortcode( "[mycred_my_badges show=all width=".MYCRED_BADGE_WIDTH." height=".MYCRED_BADGE_HEIGHT." user_id={$user_id}]" );
 
 
 
 
 
 
1996
  else
1997
  mycred_display_users_badges( $user_id );
1998
 
2010
  if ( $user_id > 0 ) {
2011
 
2012
  if ( isset( $this->badges['show_all_bb'] ) && $this->badges['show_all_bb'] == 1 )
2013
+ echo do_shortcode( "[mycred_my_badges show=all width=".MYCRED_BADGE_WIDTH." height=".MYCRED_BADGE_HEIGHT." user_id={$user_id}]" );
 
 
 
 
 
 
2014
  else
2015
  mycred_display_users_badges( $user_id );
2016
 
2027
 
2028
  $user_id = bp_displayed_user_id();
2029
  if ( isset( $this->badges['show_all_bp'] ) && $this->badges['show_all_bp'] == 1 )
2030
+ echo do_shortcode( "[mycred_my_badges show=all width=".MYCRED_BADGE_WIDTH." height=".MYCRED_BADGE_HEIGHT." user_id={$user_id}]" );
 
 
 
 
 
2031
 
2032
  else
2033
  mycred_display_users_badges( $user_id );
addons/buy-creds/abstracts/mycred-abstract-payment-gateway.php CHANGED
@@ -904,7 +904,7 @@ if ( ! class_exists( 'myCRED_Payment_Gateway' ) ) :
904
 
905
  if( ! empty( $_REQUEST['er_random'] ) ) {
906
 
907
- $custom_rate = mycred_decode_values( $_REQUEST['er_random'] );
908
 
909
  }
910
 
@@ -1217,24 +1217,24 @@ if ( ! class_exists( 'myCRED_Payment_Gateway' ) ) :
1217
  <meta charset="<?php bloginfo( 'charset' ); ?>" />
1218
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
1219
  <meta name="apple-mobile-web-app-capable" content="yes" />
1220
- <title><?php echo $site_title; ?></title>
1221
  <meta name="robots" content="noindex, nofollow" />
1222
- <?php if ( $reload ) echo '<meta http-equiv="refresh" content="2;url=' . $reload . '" />'; ?>
1223
 
1224
- <link rel="stylesheet" href="<?php echo plugins_url( 'assets/css/gateway.css', MYCRED_PURCHASE ); ?>" type="text/css" media="all" />
1225
- <link rel="stylesheet" href="<?php echo plugins_url( 'assets/css/bootstrap-grid.css', myCRED_THIS ); ?>" type="text/css" media="all" />
1226
- <link rel="stylesheet" href="<?php echo plugins_url( 'assets/css/mycred-forms.css', myCRED_THIS ); ?>" type="text/css" media="all" />
1227
  <?php do_action( 'mycred_buycred_page_header', $title, $reload, $this->id ); ?>
1228
 
1229
  </head>
1230
  <body class="mycred-metabox">
1231
  <div class="row">
1232
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1233
- <?php echo $logo; ?>
1234
  </div>
1235
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12 text-right">
1236
- <h2><?php echo $title; ?></h2>
1237
- <p><a href="<?php echo $this->get_cancelled( $this->transaction_id ); ?>" id="return-where-we-came-from"><?php _e( 'Cancel', 'mycred' ); ?></a></p>
1238
  </div>
1239
  </div>
1240
  <?php
@@ -1341,7 +1341,7 @@ if ( ! class_exists( 'myCRED_Payment_Gateway' ) ) :
1341
  $errors[] = $error_message;
1342
 
1343
  ?>
1344
- <div class="gateway-error"><?php echo implode( '<br />', $errors ); ?></div>
1345
  <?php
1346
 
1347
  }
@@ -1366,15 +1366,15 @@ if ( ! class_exists( 'myCRED_Payment_Gateway' ) ) :
1366
  ?>
1367
  <div class="row">
1368
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
1369
- <form name="mycred_<?php echo $id; ?>_request" class="form text-center" action="<?php echo $location; ?>" method="post" id="redirect-form">
1370
- <?php foreach ( $hidden_fields as $name => $value ) echo '<input type="hidden" name="' . $name . '" value="' . $value . '" />' . "\n"; ?>
1371
- <img src="<?php echo plugins_url( 'assets/images/loading.gif', MYCRED_PURCHASE ); ?>" alt="Loading" />
1372
- <noscript><input type="submit" name="submit-form" value="<?php printf( __( 'Continue to %s', 'mycred' ), $this->label ); ?>" /></noscript>
1373
- <p id="manual-continue"><a href="javascript:void(0);" onclick="document.mycred_<?php echo $id; ?>_request.submit();return false;"><?php _e( 'Click here if you are not automatically redirected', 'mycred' ); ?></a></p>
1374
  </form>
1375
  </div>
1376
  </div>
1377
- <script type="text/javascript"><?php if ( $this->sandbox_mode ) echo '//'; ?>setTimeout( "document.mycred_<?php echo $id; ?>_request.submit()",2000 );</script>
1378
  <?php
1379
 
1380
  }
@@ -1559,12 +1559,12 @@ if ( ! class_exists( 'myCRED_Payment_Gateway' ) ) :
1559
  if ( $js != '' )
1560
  $js = ' data-update="' . $js . '"';
1561
 
1562
- echo '<select name="' . $this->field_name( $name ) . '" id="' . $this->field_id( $name ) . '" class="currency form-control"' . $js . '>';
1563
- echo '<option value="">' . __( 'Select', 'mycred' ) . '</option>';
1564
  foreach ( $currencies as $code => $cname ) {
1565
- echo '<option value="' . $code . '"';
1566
  if ( isset( $this->prefs[ $name ] ) && $this->prefs[ $name ] == $code ) echo ' selected="selected"';
1567
- echo '>' . $cname . '</option>';
1568
  }
1569
  echo '</select>';
1570
 
@@ -1584,12 +1584,12 @@ if ( ! class_exists( 'myCRED_Payment_Gateway' ) ) :
1584
  );
1585
  $types = apply_filters( 'mycred_dropdown_item_types', $types );
1586
 
1587
- echo '<select name="' . $this->field_name( $name ) . '" id="' . $this->field_id( $name ) . '">';
1588
- echo '<option value="">' . __( 'Select', 'mycred' ) . '</option>';
1589
  foreach ( $types as $code => $cname ) {
1590
- echo '<option value="' . $code . '"';
1591
  if ( isset( $this->prefs[ $name ] ) && $this->prefs[ $name ] == $code ) echo ' selected="selected"';
1592
- echo '>' . $cname . '</option>';
1593
  }
1594
  echo '</select>';
1595
 
@@ -1847,9 +1847,9 @@ if ( ! class_exists( 'myCRED_Payment_Gateway' ) ) :
1847
  $countries = apply_filters( 'mycred_list_option_countries', $countries );
1848
 
1849
  foreach ( $countries as $code => $cname ) {
1850
- echo '<option value="' . $code . '"';
1851
  if ( $selected == $code ) echo ' selected="selected"';
1852
- echo '>' . $cname . '</option>';
1853
  }
1854
 
1855
  }
@@ -1917,13 +1917,13 @@ if ( ! class_exists( 'myCRED_Payment_Gateway' ) ) :
1917
  $states = apply_filters( 'mycred_list_option_us', $states );
1918
 
1919
  $outside = 'Outside US';
1920
- if ( $non_us == 'top' ) echo '<option value="">' . $outside . '</option>';
1921
  foreach ( $states as $code => $cname ) {
1922
- echo '<option value="' . $code . '"';
1923
  if ( $selected == $code ) echo ' selected="selected"';
1924
- echo '>' . $cname . '</option>';
1925
  }
1926
- if ( $non_us == 'bottom' ) echo '<option value="">' . $outside . '</option>';
1927
 
1928
  }
1929
 
@@ -1950,9 +1950,9 @@ if ( ! class_exists( 'myCRED_Payment_Gateway' ) ) :
1950
  );
1951
 
1952
  foreach ( $months as $number => $text ) {
1953
- echo '<option value="' . $number . '"';
1954
  if ( $selected == $number ) echo ' selected="selected"';
1955
- echo '>' . $text . '</option>';
1956
  }
1957
 
1958
  }
@@ -1980,9 +1980,9 @@ if ( ! class_exists( 'myCRED_Payment_Gateway' ) ) :
1980
  }
1981
 
1982
  foreach ( $options as $key => $value ) {
1983
- echo '<option value="' . $key . '"';
1984
  if ( $selected == $key ) echo ' selected="selected"';
1985
- echo '>' . $value . '</option>';
1986
  }
1987
 
1988
  }
@@ -2044,11 +2044,11 @@ if ( ! class_exists( 'myCRED_Payment_Gateway' ) ) :
2044
  public function IPN_is_valid_sale( $sales_data_key = '', $cost_key = '', $transactionid_key = '', $method = '' ) {
2045
 
2046
  if ( $method == 'POST' )
2047
- $post_id = absint( $_POST[ $sales_data_key ] );
2048
  elseif ( $method == 'GET' )
2049
- $post_id = absint( $_GET[ $sales_data_key ] );
2050
  else
2051
- $post_id = absint( $_REQUEST[ $sales_data_key ] );
2052
 
2053
  $pending_payment = $this->get_pending_payment( $post_id );
2054
  if ( $pending_payment === false ) return false;
@@ -2056,11 +2056,11 @@ if ( ! class_exists( 'myCRED_Payment_Gateway' ) ) :
2056
  $result = true;
2057
 
2058
  if ( $method == 'POST' )
2059
- $price = floatval( $_POST[ $cost_key ] );
2060
  elseif ( $method == 'GET' )
2061
- $price = floatval( $_GET[ $cost_key ] );
2062
  else
2063
- $price = floatval( $_REQUEST[ $cost_key ] );
2064
 
2065
  if ( $result === true && $pending_payment['cost'] != $price ) {
2066
  $result = false;
@@ -2071,11 +2071,11 @@ if ( ! class_exists( 'myCRED_Payment_Gateway' ) ) :
2071
  }
2072
 
2073
  if ( $method == 'POST' )
2074
- $transaction_id = sanitize_title( $_POST[ $transactionid_key ] );
2075
  elseif ( $method == 'GET' )
2076
- $transaction_id = sanitize_title( $_GET[ $transactionid_key ] );
2077
  else
2078
- $transaction_id = sanitize_title( $_REQUEST[ $transactionid_key ] );
2079
 
2080
  if ( $result === true && ! $this->transaction_id_is_unique( $transaction_id ) ) {
2081
  $result = false;
904
 
905
  if( ! empty( $_REQUEST['er_random'] ) ) {
906
 
907
+ $custom_rate = mycred_decode_values( sanitize_text_field( wp_unslash( $_REQUEST['er_random'] ) ) );
908
 
909
  }
910
 
1217
  <meta charset="<?php bloginfo( 'charset' ); ?>" />
1218
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
1219
  <meta name="apple-mobile-web-app-capable" content="yes" />
1220
+ <title><?php echo esc_html( $site_title ); ?></title>
1221
  <meta name="robots" content="noindex, nofollow" />
1222
+ <?php if ( $reload ) echo '<meta http-equiv="refresh" content="2;url=' . esc_url( $reload ) . '" />'; ?>
1223
 
1224
+ <link rel="stylesheet" href="<?php echo esc_url( plugins_url( 'assets/css/gateway.css', MYCRED_PURCHASE ) ); ?>" type="text/css" media="all" />
1225
+ <link rel="stylesheet" href="<?php echo esc_url( plugins_url( 'assets/css/bootstrap-grid.css', myCRED_THIS ) ); ?>" type="text/css" media="all" />
1226
+ <link rel="stylesheet" href="<?php echo esc_url( plugins_url( 'assets/css/mycred-forms.css', myCRED_THIS ) ); ?>" type="text/css" media="all" />
1227
  <?php do_action( 'mycred_buycred_page_header', $title, $reload, $this->id ); ?>
1228
 
1229
  </head>
1230
  <body class="mycred-metabox">
1231
  <div class="row">
1232
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1233
+ <?php echo esc_html( $logo ); ?>
1234
  </div>
1235
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12 text-right">
1236
+ <h2><?php echo esc_html( $title ); ?></h2>
1237
+ <p><a href="<?php echo esc_url( $this->get_cancelled( $this->transaction_id ) ); ?>" id="return-where-we-came-from"><?php esc_html_e( 'Cancel', 'mycred' ); ?></a></p>
1238
  </div>
1239
  </div>
1240
  <?php
1341
  $errors[] = $error_message;
1342
 
1343
  ?>
1344
+ <div class="gateway-error"><?php echo wp_kses( implode( '<br />', $errors ), array( 'br' => array() ) ); ?></div>
1345
  <?php
1346
 
1347
  }
1366
  ?>
1367
  <div class="row">
1368
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
1369
+ <form name="mycred_<?php echo esc_attr( $id ); ?>_request" class="form text-center" action="<?php echo esc_url( $location ); ?>" method="post" id="redirect-form">
1370
+ <?php foreach ( $hidden_fields as $name => $value ) echo '<input type="hidden" name="' . esc_attr( $name ) . '" value="' . esc_attr( $value ) . '" />' . "\n"; ?>
1371
+ <img src="<?php echo esc_url( plugins_url( 'assets/images/loading.gif', MYCRED_PURCHASE ) ); ?>" alt="Loading" />
1372
+ <noscript><input type="submit" name="submit-form" value="<?php printf( esc_attr__( 'Continue to %s', 'mycred' ), esc_attr( $this->label ) ); ?>" /></noscript>
1373
+ <p id="manual-continue"><a href="javascript:void(0);" onclick="document.mycred_<?php echo esc_attr( $id ); ?>_request.submit();return false;"><?php esc_html_e( 'Click here if you are not automatically redirected', 'mycred' ); ?></a></p>
1374
  </form>
1375
  </div>
1376
  </div>
1377
+ <script type="text/javascript"><?php if ( $this->sandbox_mode ) echo '//'; ?>setTimeout( "document.mycred_<?php echo esc_attr( $id ); ?>_request.submit()",2000 );</script>
1378
  <?php
1379
 
1380
  }
1559
  if ( $js != '' )
1560
  $js = ' data-update="' . $js . '"';
1561
 
1562
+ echo '<select name="' . esc_attr( $this->field_name( $name ) ) . '" id="' . esc_attr( $this->field_id( $name ) ) . '" class="currency form-control"' . wp_kses_post( $js ) . '>';
1563
+ echo '<option value="">' . esc_html__( 'Select', 'mycred' ) . '</option>';
1564
  foreach ( $currencies as $code => $cname ) {
1565
+ echo '<option value="' . esc_attr( $code ) . '"';
1566
  if ( isset( $this->prefs[ $name ] ) && $this->prefs[ $name ] == $code ) echo ' selected="selected"';
1567
+ echo '>' . esc_html( $cname ) . '</option>';
1568
  }
1569
  echo '</select>';
1570
 
1584
  );
1585
  $types = apply_filters( 'mycred_dropdown_item_types', $types );
1586
 
1587
+ echo '<select name="' . esc_attr( $this->field_name( $name ) ) . '" id="' . esc_attr( $this->field_id( $name ) ) . '">';
1588
+ echo '<option value="">' . esc_html__( 'Select', 'mycred' ) . '</option>';
1589
  foreach ( $types as $code => $cname ) {
1590
+ echo '<option value="' . esc_attr( $code ) . '"';
1591
  if ( isset( $this->prefs[ $name ] ) && $this->prefs[ $name ] == $code ) echo ' selected="selected"';
1592
+ echo '>' . esc_html( $cname ) . '</option>';
1593
  }
1594
  echo '</select>';
1595
 
1847
  $countries = apply_filters( 'mycred_list_option_countries', $countries );
1848
 
1849
  foreach ( $countries as $code => $cname ) {
1850
+ echo '<option value="' . esc_attr( $code ) . '"';
1851
  if ( $selected == $code ) echo ' selected="selected"';
1852
+ echo '>' . esc_html( $cname ) . '</option>';
1853
  }
1854
 
1855
  }
1917
  $states = apply_filters( 'mycred_list_option_us', $states );
1918
 
1919
  $outside = 'Outside US';
1920
+ if ( $non_us == 'top' ) echo '<option value="">' . esc_html( $outside ) . '</option>';
1921
  foreach ( $states as $code => $cname ) {
1922
+ echo '<option value="' . esc_attr( $code ) . '"';
1923
  if ( $selected == $code ) echo ' selected="selected"';
1924
+ echo '>' . esc_html( $cname ) . '</option>';
1925
  }
1926
+ if ( $non_us == 'bottom' ) echo '<option value="">' . esc_html( $outside ) . '</option>';
1927
 
1928
  }
1929
 
1950
  );
1951
 
1952
  foreach ( $months as $number => $text ) {
1953
+ echo '<option value="' . esc_attr( $number ) . '"';
1954
  if ( $selected == $number ) echo ' selected="selected"';
1955
+ echo '>' . esc_html( $text ) . '</option>';
1956
  }
1957
 
1958
  }
1980
  }
1981
 
1982
  foreach ( $options as $key => $value ) {
1983
+ echo '<option value="' . esc_attr( $key ) . '"';
1984
  if ( $selected == $key ) echo ' selected="selected"';
1985
+ echo '>' . esc_html( $value ) . '</option>';
1986
  }
1987
 
1988
  }
2044
  public function IPN_is_valid_sale( $sales_data_key = '', $cost_key = '', $transactionid_key = '', $method = '' ) {
2045
 
2046
  if ( $method == 'POST' )
2047
+ $post_id = isset( $_POST[ $sales_data_key ] ) ? absint( $_POST[ $sales_data_key ] ) : 0;
2048
  elseif ( $method == 'GET' )
2049
+ $post_id = isset( $_GET[ $sales_data_key ] ) ? absint( $_GET[ $sales_data_key ] ) : 0;
2050
  else
2051
+ $post_id = isset( $_REQUEST[ $sales_data_key ] ) ? absint( $_REQUEST[ $sales_data_key ] ) : 0;
2052
 
2053
  $pending_payment = $this->get_pending_payment( $post_id );
2054
  if ( $pending_payment === false ) return false;
2056
  $result = true;
2057
 
2058
  if ( $method == 'POST' )
2059
+ $price = isset( $_POST[ $cost_key ] ) ? floatval( $_POST[ $cost_key ] ) : 0;
2060
  elseif ( $method == 'GET' )
2061
+ $price = isset( $_GET[ $cost_key ] ) ? floatval( $_GET[ $cost_key ] ) : 0;
2062
  else
2063
+ $price = isset( $_REQUEST[ $cost_key ] ) ? floatval( $_REQUEST[ $cost_key ] ) : 0;
2064
 
2065
  if ( $result === true && $pending_payment['cost'] != $price ) {
2066
  $result = false;
2071
  }
2072
 
2073
  if ( $method == 'POST' )
2074
+ $transaction_id = isset( $_POST[ $transactionid_key ] ) ? sanitize_title( wp_unslash( $_POST[ $transactionid_key ] ) ) : '';
2075
  elseif ( $method == 'GET' )
2076
+ $transaction_id = isset( $_GET[ $transactionid_key ] ) ? sanitize_title( wp_unslash( $_GET[ $transactionid_key ] ) ) : '';
2077
  else
2078
+ $transaction_id = isset( $_REQUEST[ $transactionid_key ] ) ? sanitize_title( wp_unslash( $_REQUEST[ $transactionid_key ] ) ) : '';
2079
 
2080
  if ( $result === true && ! $this->transaction_id_is_unique( $transaction_id ) ) {
2081
  $result = false;
addons/buy-creds/gateways/bank-transfer.php CHANGED
@@ -117,7 +117,7 @@ if ( ! class_exists( 'myCRED_Bank_Transfer' ) ) :
117
  */
118
  public function checkout_page_title() {
119
 
120
- echo $this->checkout_logo();
121
 
122
  }
123
 
@@ -130,22 +130,22 @@ if ( ! class_exists( 'myCRED_Bank_Transfer' ) ) :
130
 
131
  $this->toggle_id = 'buycred-checkout-step2';
132
 
133
- echo $this->checkout_header();
134
- echo $this->checkout_logo( false );
135
 
136
  echo '<div id="buycred-checkout-step1">';
137
 
138
- echo $this->checkout_order();
139
- echo $this->checkout_cancel();
140
 
141
  echo '</div><div id="buycred-checkout-step2" style="display: none;">';
142
 
143
- echo $this->checkout_transaction_id();
144
- echo wptexturize( wpautop( $this->prefs['account'] ) );
145
 
146
  echo '</div>';
147
 
148
- echo $this->checkout_footer();
149
 
150
  }
151
 
@@ -161,24 +161,24 @@ if ( ! class_exists( 'myCRED_Bank_Transfer' ) ) :
161
  ?>
162
  <div class="row">
163
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
164
- <h3><?php _e( 'Details', 'mycred' ); ?></h3>
165
  <div class="form-group">
166
- <label for="<?php echo $this->field_id( 'title' ); ?>"><?php _e( 'Title', 'mycred' ); ?></label>
167
- <input type="text" name="<?php echo $this->field_name( 'title' ); ?>" id="<?php echo $this->field_id( 'title' ); ?>" value="<?php echo esc_attr( $prefs['title'] ); ?>" class="form-control" />
168
  </div>
169
  <div class="form-group">
170
- <label for="<?php echo $this->field_id( 'logo_url' ); ?>"><?php _e( 'Logo URL', 'mycred' ); ?></label>
171
- <input type="text" name="<?php echo $this->field_name( 'logo_url' ); ?>" id="<?php echo $this->field_id( 'logo_url' ); ?>" value="<?php echo esc_attr( $prefs['logo_url'] ); ?>" class="form-control" />
172
  </div>
173
  </div>
174
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
175
- <h3><?php _e( 'Setup', 'mycred' ); ?></h3>
176
  <div class="form-group">
177
- <label for="<?php echo $this->field_id( 'currency' ); ?>"><?php _e( 'Currency', 'mycred' ); ?></label>
178
- <input type="text" name="<?php echo $this->field_name( 'currency' ); ?>" id="<?php echo $this->field_id( 'currency' ); ?>" value="<?php echo esc_attr( $prefs['currency'] ); ?>" class="form-control" />
179
  </div>
180
  <div class="form-group">
181
- <label><?php _e( 'Exchange Rates', 'mycred' ); ?></label>
182
 
183
  <?php $this->exchange_rate_setup(); ?>
184
 
@@ -188,7 +188,7 @@ if ( ! class_exists( 'myCRED_Bank_Transfer' ) ) :
188
  <div class="row">
189
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
190
  <div class="form-group">
191
- <label for="buycredbanktransferaccount"><?php _e( 'Bank Account Information', 'mycred' ); ?></label>
192
  <?php wp_editor( $prefs['account'], 'buycredbanktransferaccount', array( 'textarea_name' => $this->field_name( 'account' ), 'textarea_rows' => 10 ) ); ?>
193
  </div>
194
  </div>
117
  */
118
  public function checkout_page_title() {
119
 
120
+ echo wp_kses_post( $this->checkout_logo() );
121
 
122
  }
123
 
130
 
131
  $this->toggle_id = 'buycred-checkout-step2';
132
 
133
+ echo wp_kses_post( $this->checkout_header() );
134
+ echo wp_kses_post( $this->checkout_logo( false ) );
135
 
136
  echo '<div id="buycred-checkout-step1">';
137
 
138
+ echo wp_kses_post( $this->checkout_order() );
139
+ echo wp_kses_post( $this->checkout_cancel() );
140
 
141
  echo '</div><div id="buycred-checkout-step2" style="display: none;">';
142
 
143
+ echo wp_kses_post( $this->checkout_transaction_id() );
144
+ echo wp_kses_post( wptexturize( wpautop( $this->prefs['account'] ) ) );
145
 
146
  echo '</div>';
147
 
148
+ echo wp_kses_post( $this->checkout_footer() );
149
 
150
  }
151
 
161
  ?>
162
  <div class="row">
163
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
164
+ <h3><?php esc_html_e( 'Details', 'mycred' ); ?></h3>
165
  <div class="form-group">
166
+ <label for="<?php echo esc_attr( $this->field_id( 'title' ) ); ?>"><?php esc_html_e( 'Title', 'mycred' ); ?></label>
167
+ <input type="text" name="<?php echo esc_attr( $this->field_name( 'title' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'title' ) ); ?>" value="<?php echo esc_attr( $prefs['title'] ); ?>" class="form-control" />
168
  </div>
169
  <div class="form-group">
170
+ <label for="<?php echo esc_attr( $this->field_id( 'logo_url' ) ); ?>"><?php esc_html_e( 'Logo URL', 'mycred' ); ?></label>
171
+ <input type="text" name="<?php echo esc_attr( $this->field_name( 'logo_url' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'logo_url' ) ); ?>" value="<?php echo esc_attr( $prefs['logo_url'] ); ?>" class="form-control" />
172
  </div>
173
  </div>
174
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
175
+ <h3><?php esc_html_e( 'Setup', 'mycred' ); ?></h3>
176
  <div class="form-group">
177
+ <label for="<?php echo esc_attr( $this->field_id( 'currency' ) ); ?>"><?php esc_html_e( 'Currency', 'mycred' ); ?></label>
178
+ <input type="text" name="<?php echo esc_attr( $this->field_name( 'currency' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'currency' ) ); ?>" value="<?php echo esc_attr( $prefs['currency'] ); ?>" class="form-control" />
179
  </div>
180
  <div class="form-group">
181
+ <label><?php esc_html_e( 'Exchange Rates', 'mycred' ); ?></label>
182
 
183
  <?php $this->exchange_rate_setup(); ?>
184
 
188
  <div class="row">
189
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
190
  <div class="form-group">
191
+ <label for="buycredbanktransferaccount"><?php esc_html_e( 'Bank Account Information', 'mycred' ); ?></label>
192
  <?php wp_editor( $prefs['account'], 'buycredbanktransferaccount', array( 'textarea_name' => $this->field_name( 'account' ), 'textarea_rows' => 10 ) ); ?>
193
  </div>
194
  </div>
addons/buy-creds/gateways/bitpay.php CHANGED
@@ -171,8 +171,8 @@ if ( ! class_exists( 'myCRED_Bitpay' ) ) :
171
 
172
  check_ajax_referer( 'buycred-pair-bitpay', 'token' );
173
 
174
- $pairing_code = sanitize_text_field( $_POST['code'] );
175
- $network = sanitize_text_field( $_POST['network'] );
176
 
177
  try {
178
 
@@ -343,13 +343,13 @@ if ( ! class_exists( 'myCRED_Bitpay' ) ) :
343
  */
344
  public function checkout_page_body() {
345
 
346
- echo $this->checkout_header();
347
- echo $this->checkout_logo( false );
348
 
349
- echo $this->checkout_order();
350
- echo $this->checkout_cancel();
351
 
352
- echo $this->checkout_footer();
353
 
354
  }
355
 
@@ -365,12 +365,12 @@ if ( ! class_exists( 'myCRED_Bitpay' ) ) :
365
  ?>
366
  <div class="row">
367
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
368
- <h3><?php _e( 'Details', 'mycred' ); ?></h3>
369
 
370
  <?php if ( ! $this->is_ready ) : ?>
371
 
372
  <div class="form-group">
373
- <label><?php _e( 'API Token', 'mycred' ); ?></label>
374
  <div class="form-inline" id="bitpay-pairing-wrapper">
375
  <input type="text" id="bitpay-pair-code" class="form-control" placeholder="Pairing Code" value="" />
376
  <select id="bitpay-pair-network" class="form-control">
@@ -395,12 +395,12 @@ jQuery(function($){
395
  type : "POST",
396
  data : {
397
  action : 'buycred-bitpay-pairing',
398
- token : '<?php echo wp_create_nonce( 'buycred-pair-bitpay' ); ?>',
399
  code : $( '#bitpay-pair-code' ).val(),
400
  network : $( '#bitpay-pair-network' ).find( ':selected' ).val(),
401
  },
402
  dataType : "JSON",
403
- url : '<?php echo admin_url( 'admin-ajax.php' ); ?>',
404
  beforeSend : function() {
405
 
406
  $( '#sync-bitpay-pairing-code' ).attr( 'disabled', 'disabled' );
@@ -448,14 +448,14 @@ jQuery(function($){
448
  <?php else : ?>
449
 
450
  <div class="form-group">
451
- <label><?php _e( 'API Token', 'mycred' ); ?></label>
452
  <p class="form-control-static"><?php echo esc_attr( $prefs['api_label'] ); ?></p>
453
  <button type="button" id="bitpay-cancel-pair" class="button button-secondary">Revoke Token</button>
454
- <input type="hidden" class="reset-api" name="<?php echo $this->field_name( 'api_secret' ); ?>" value="<?php echo esc_attr( $prefs['api_secret'] ); ?>" />
455
- <input type="hidden" class="reset-api" name="<?php echo $this->field_name( 'api_public' ); ?>" value="<?php echo esc_attr( $prefs['api_public'] ); ?>" />
456
- <input type="hidden" class="reset-api" name="<?php echo $this->field_name( 'api_sign' ); ?>" value="<?php echo esc_attr( $prefs['api_sign'] ); ?>" />
457
- <input type="hidden" class="reset-api" name="<?php echo $this->field_name( 'api_token' ); ?>" value="<?php echo esc_attr( $prefs['api_token'] ); ?>" />
458
- <input type="hidden" class="reset-api" name="<?php echo $this->field_name( 'api_label' ); ?>" value="<?php echo esc_attr( $prefs['api_label'] ); ?>" />
459
  </div>
460
  <script type="text/javascript">
461
  jQuery(function($){
@@ -479,18 +479,18 @@ jQuery(function($){
479
  <?php endif; ?>
480
 
481
  <div class="form-group">
482
- <label for="<?php echo $this->field_id( 'item_name' ); ?>"><?php _e( 'Item Name', 'mycred' ); ?></label>
483
- <input type="text" name="<?php echo $this->field_name( 'item_name' ); ?>" id="<?php echo $this->field_id( 'item_name' ); ?>" value="<?php echo esc_attr( $prefs['item_name'] ); ?>" class="form-control" />
484
  </div>
485
  <div class="form-group">
486
- <label for="<?php echo $this->field_id( 'logo_url' ); ?>"><?php _e( 'Logo URL', 'mycred' ); ?></label>
487
- <input type="text" name="<?php echo $this->field_name( 'logo_url' ); ?>" id="<?php echo $this->field_id( 'logo_url' ); ?>" value="<?php echo esc_attr( $prefs['logo_url'] ); ?>" class="form-control" />
488
  </div>
489
  <div class="row">
490
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
491
  <div class="form-group">
492
- <label for="<?php echo $this->field_id( 'speed' ); ?>"><?php _e( 'Transaction Speed', 'mycred' ); ?></label>
493
- <select name="<?php echo $this->field_name( 'speed' ); ?>" id="<?php echo $this->field_id( 'speed' ); ?>" class="form-control">
494
  <?php
495
 
496
  $options = array(
@@ -509,8 +509,8 @@ jQuery(function($){
509
  </div>
510
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
511
  <div class="form-group">
512
- <label for="<?php echo $this->field_id( 'notifications' ); ?>"><?php _e( 'Full Notifications', 'mycred' ); ?></label>
513
- <select name="<?php echo $this->field_name( 'notifications' ); ?>" id="<?php echo $this->field_id( 'notifications' ); ?>" class="form-control">
514
  <?php
515
 
516
  $options = array(
@@ -529,14 +529,14 @@ jQuery(function($){
529
  </div>
530
  </div>
531
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
532
- <h3><?php _e( 'Setup', 'mycred' ); ?></h3>
533
  <div class="form-group">
534
- <label for="<?php echo $this->field_id( 'currency' ); ?>"><?php _e( 'Currency', 'mycred' ); ?></label>
535
- <input type="text" name="<?php echo $this->field_name( 'currency' ); ?>" id="<?php echo $this->field_id( 'currency' ); ?>" value="<?php echo $prefs['currency']; ?>" class="form-control" maxlength="3" placeholder="<?php _e( 'Currency Code', 'mycred' ); ?>" />
536
 
537
  </div>
538
  <div class="form-group">
539
- <label><?php _e( 'Exchange Rates', 'mycred' ); ?></label>
540
 
541
  <?php $this->exchange_rate_setup(); ?>
542
 
171
 
172
  check_ajax_referer( 'buycred-pair-bitpay', 'token' );
173
 
174
+ $pairing_code = isset( $_POST['code'] ) ? sanitize_text_field( wp_unslash( $_POST['code'] ) ) : '';
175
+ $network = isset( $_POST['network'] ) ? sanitize_text_field( wp_unslash( $_POST['network'] ) ) : '';
176
 
177
  try {
178
 
343
  */
344
  public function checkout_page_body() {
345
 
346
+ echo wp_kses_post( $this->checkout_header() );
347
+ echo wp_kses_post( $this->checkout_logo( false ) );
348
 
349
+ echo wp_kses_post( $this->checkout_order() );
350
+ echo wp_kses_post( $this->checkout_cancel() );
351
 
352
+ echo wp_kses_post( $this->checkout_footer() );
353
 
354
  }
355
 
365
  ?>
366
  <div class="row">
367
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
368
+ <h3><?php esc_html_e( 'Details', 'mycred' ); ?></h3>
369
 
370
  <?php if ( ! $this->is_ready ) : ?>
371
 
372
  <div class="form-group">
373
+ <label><?php esc_html_e( 'API Token', 'mycred' ); ?></label>
374
  <div class="form-inline" id="bitpay-pairing-wrapper">
375
  <input type="text" id="bitpay-pair-code" class="form-control" placeholder="Pairing Code" value="" />
376
  <select id="bitpay-pair-network" class="form-control">
395
  type : "POST",
396
  data : {
397
  action : 'buycred-bitpay-pairing',
398
+ token : '<?php echo esc_attr( wp_create_nonce( 'buycred-pair-bitpay' ) ); ?>',
399
  code : $( '#bitpay-pair-code' ).val(),
400
  network : $( '#bitpay-pair-network' ).find( ':selected' ).val(),
401
  },
402
  dataType : "JSON",
403
+ url : '<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>',
404
  beforeSend : function() {
405
 
406
  $( '#sync-bitpay-pairing-code' ).attr( 'disabled', 'disabled' );
448
  <?php else : ?>
449
 
450
  <div class="form-group">
451
+ <label><?php esc_html_e( 'API Token', 'mycred' ); ?></label>
452
  <p class="form-control-static"><?php echo esc_attr( $prefs['api_label'] ); ?></p>
453
  <button type="button" id="bitpay-cancel-pair" class="button button-secondary">Revoke Token</button>
454
+ <input type="hidden" class="reset-api" name="<?php echo esc_attr( $this->field_name( 'api_secret' ) ); ?>" value="<?php echo esc_attr( $prefs['api_secret'] ); ?>" />
455
+ <input type="hidden" class="reset-api" name="<?php echo esc_attr( $this->field_name( 'api_public' ) ); ?>" value="<?php echo esc_attr( $prefs['api_public'] ); ?>" />
456
+ <input type="hidden" class="reset-api" name="<?php echo esc_attr( $this->field_name( 'api_sign' ) ); ?>" value="<?php echo esc_attr( $prefs['api_sign'] ); ?>" />
457
+ <input type="hidden" class="reset-api" name="<?php echo esc_attr( $this->field_name( 'api_token' ) ); ?>" value="<?php echo esc_attr( $prefs['api_token'] ); ?>" />
458
+ <input type="hidden" class="reset-api" name="<?php echo esc_attr( $this->field_name( 'api_label' ) ); ?>" value="<?php echo esc_attr( $prefs['api_label'] ); ?>" />
459
  </div>
460
  <script type="text/javascript">
461
  jQuery(function($){
479
  <?php endif; ?>
480
 
481
  <div class="form-group">
482
+ <label for="<?php echo esc_attr( $this->field_id( 'item_name' ) ); ?>"><?php esc_html_e( 'Item Name', 'mycred' ); ?></label>
483
+ <input type="text" name="<?php echo esc_attr( $this->field_name( 'item_name' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'item_name' ) ); ?>" value="<?php echo esc_attr( $prefs['item_name'] ); ?>" class="form-control" />
484
  </div>
485
  <div class="form-group">
486
+ <label for="<?php echo esc_attr( $this->field_id( 'logo_url' ) ); ?>"><?php esc_html_e( 'Logo URL', 'mycred' ); ?></label>
487
+ <input type="text" name="<?php echo esc_attr( $this->field_name( 'logo_url' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'logo_url' ) ); ?>" value="<?php echo esc_attr( $prefs['logo_url'] ); ?>" class="form-control" />
488
  </div>
489
  <div class="row">
490
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
491
  <div class="form-group">
492
+ <label for="<?php echo esc_attr( $this->field_id( 'speed' ) ); ?>"><?php esc_html_e( 'Transaction Speed', 'mycred' ); ?></label>
493
+ <select name="<?php echo esc_attr( $this->field_name( 'speed' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'speed' ) ); ?>" class="form-control">
494
  <?php
495
 
496
  $options = array(
509
  </div>
510
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
511
  <div class="form-group">
512
+ <label for="<?php echo esc_attr( $this->field_id( 'notifications' ) ); ?>"><?php esc_html_e( 'Full Notifications', 'mycred' ); ?></label>
513
+ <select name="<?php echo esc_attr( $this->field_name( 'notifications' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'notifications' ) ); ?>" class="form-control">
514
  <?php
515
 
516
  $options = array(
529
  </div>
530
  </div>
531
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
532
+ <h3><?php esc_html_e( 'Setup', 'mycred' ); ?></h3>
533
  <div class="form-group">
534
+ <label for="<?php echo esc_attr( $this->field_id( 'currency' ) ); ?>"><?php esc_html_e( 'Currency', 'mycred' ); ?></label>
535
+ <input type="text" name="<?php echo esc_attr( $this->field_name( 'currency' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'currency' ) ); ?>" value="<?php echo esc_attr( $prefs['currency'] ); ?>" class="form-control" maxlength="3" placeholder="<?php esc_html_e( 'Currency Code', 'mycred' ); ?>" />
536
 
537
  </div>
538
  <div class="form-group">
539
+ <label><?php esc_html_e( 'Exchange Rates', 'mycred' ); ?></label>
540
 
541
  <?php $this->exchange_rate_setup(); ?>
542
 
addons/buy-creds/gateways/netbilling.php CHANGED
@@ -53,14 +53,20 @@ if ( ! class_exists( 'myCRED_NETbilling' ) ) :
53
 
54
  $result = true;
55
 
 
 
56
  // Accounts Match
57
- $account = explode( ':', sanitize_text_field( $_REQUEST['Ecom_Ezic_AccountAndSitetag'] ) );
58
  if ( $account[0] != $this->prefs['account'] || $account[1] != $this->prefs['site_tag'] )
59
  $result = false;
60
 
 
 
 
61
  // Crypto Check
62
- $crypto_check = md5( $this->prefs['cryptokey'] . sanitize_text_field( $_REQUEST['Ecom_Cost_Total'] ) . sanitize_text_field( $_REQUEST['Ecom_Receipt_Description'] ) );
63
- if ( $crypto_check != $_REQUEST['Ecom_Ezic_Security_HashValue_MD5'] )
 
64
  $result = false;
65
 
66
  return $result;
@@ -90,12 +96,12 @@ if ( ! class_exists( 'myCRED_NETbilling' ) ) :
90
 
91
  // Check amount paid
92
  if ( $_REQUEST['Ecom_Cost_Total'] != $pending_payment->cost ) {
93
- $new_call[] = sprintf( __( 'Price mismatch. Expected: %s Received: %s', 'mycred' ), $pending_payment->cost, $_REQUEST['Ecom_Cost_Total'] );
94
  $errors = true;
95
  }
96
 
97
  // Check status
98
- if ( $_REQUEST['Ecom_Ezic_Response_StatusCode'] != 1 ) {
99
  $new_call[] = sprintf( __( 'Payment not completed. Received: %s', 'mycred' ), absint( $_REQUEST['Ecom_Ezic_Response_StatusCode'] ) );
100
  $errors = true;
101
  }
@@ -104,7 +110,7 @@ if ( ! class_exists( 'myCRED_NETbilling' ) ) :
104
  if ( $errors === false ) {
105
 
106
  // If account is credited, delete the post and it's comments.
107
- if ( $this->complete_payment( $pending_payment, sanitize_title( $_REQUEST['Ecom_Ezic_Response_TransactionID'] ) ) )
108
  $this->trash_pending_payment( $pending_post_id );
109
  else
110
  $new_call[] = __( 'Failed to credit users account.', 'mycred' );
@@ -217,45 +223,45 @@ if ( ! class_exists( 'myCRED_NETbilling' ) ) :
217
  ?>
218
  <div class="row">
219
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
220
- <h3><?php _e( 'Details', 'mycred' ); ?></h3>
221
  <div class="form-group">
222
- <label for="<?php echo $this->field_id( 'account' ); ?>"><?php _e( 'Account ID', 'mycred' ); ?></label>
223
- <input type="text" name="<?php echo $this->field_name( 'account' ); ?>" id="<?php echo $this->field_id( 'account' ); ?>" value="<?php echo esc_attr( $prefs['account'] ); ?>" class="form-control" />
224
  </div>
225
  <div class="form-group">
226
- <label for="<?php echo $this->field_id( 'site_tag' ); ?>"><?php _e( 'Site Tag', 'mycred' ); ?></label>
227
- <input type="text" name="<?php echo $this->field_name( 'site_tag' ); ?>" id="<?php echo $this->field_id( 'site_tag' ); ?>" value="<?php echo esc_attr( $prefs['site_tag'] ); ?>" class="form-control" />
228
  </div>
229
  <div class="form-group">
230
- <label for="<?php echo $this->field_id( 'cryptokey' ); ?>"><?php _e( 'Order Integrity Key', 'mycred' ); ?></label>
231
- <input type="password" name="<?php echo $this->field_name( 'cryptokey' ); ?>" id="<?php echo $this->field_id( 'cryptokey' ); ?>" value="<?php echo esc_attr( $prefs['cryptokey'] ); ?>" class="form-control" />
232
- <p><span class="description"><?php _e( 'Found under Step 12 on the Fraud Defense page.', 'mycred' ); ?></span></p>
233
  </div>
234
  <div class="form-group">
235
- <label for="<?php echo $this->field_id( 'item_name' ); ?>"><?php _e( 'Item Name', 'mycred' ); ?></label>
236
- <input type="text" name="<?php echo $this->field_name( 'item_name' ); ?>" id="<?php echo $this->field_id( 'item_name' ); ?>" value="<?php echo esc_attr( $prefs['item_name'] ); ?>" class="form-control" />
237
  </div>
238
  <div class="form-group">
239
- <label for="<?php echo $this->field_id( 'logo_url' ); ?>"><?php _e( 'Logo URL', 'mycred' ); ?></label>
240
- <input type="text" name="<?php echo $this->field_name( 'logo_url' ); ?>" id="<?php echo $this->field_id( 'logo_url' ); ?>" value="<?php echo esc_attr( $prefs['logo_url'] ); ?>" class="form-control" />
241
  </div>
242
  </div>
243
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
244
- <h3><?php _e( 'Setup', 'mycred' ); ?></h3>
245
  <div class="form-group">
246
- <label><?php _e( 'Currency', 'mycred' ); ?></label>
247
- <input type="text" readonly="readonly" class="form-control" name="<?php echo $this->field_name( 'currency' ); ?>" value="USD" />
248
  </div>
249
  <div class="form-group">
250
- <label><?php _e( 'Exchange Rates', 'mycred' ); ?></label>
251
 
252
  <?php $this->exchange_rate_setup(); ?>
253
 
254
  </div>
255
  <div class="form-group">
256
- <label><?php _e( 'Postback CGI URL', 'mycred' ); ?></label>
257
- <code style="padding: 12px;display:block;"><?php echo $this->callback_url(); ?></code>
258
- <p><?php _e( 'For this gateway to work, you must login to your NETbilling account and edit your site. Under "Default payment form settings" make sure the Postback CGI URL is set to the above address and "Return method" is set to POST.', 'mycred' ); ?></p>
259
  </div>
260
  </div>
261
  </div>
53
 
54
  $result = true;
55
 
56
+ $account_data = isset( $_REQUEST['Ecom_Ezic_AccountAndSitetag'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['Ecom_Ezic_AccountAndSitetag'] ) ) : '';
57
+
58
  // Accounts Match
59
+ $account = explode( ':', $account_data );
60
  if ( $account[0] != $this->prefs['account'] || $account[1] != $this->prefs['site_tag'] )
61
  $result = false;
62
 
63
+ $cost_total = isset( $_REQUEST['Ecom_Cost_Total'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['Ecom_Cost_Total'] ) ) : '';
64
+ $cost_description = isset( $_REQUEST['Ecom_Receipt_Description'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['Ecom_Receipt_Description'] ) ) : '';
65
+
66
  // Crypto Check
67
+ $crypto_check = md5( $this->prefs['cryptokey'] . $cost_total . $cost_description );
68
+
69
+ if ( ! isset( $_REQUEST['Ecom_Ezic_Security_HashValue_MD5'] ) || $crypto_check != $_REQUEST['Ecom_Ezic_Security_HashValue_MD5'] )
70
  $result = false;
71
 
72
  return $result;
96
 
97
  // Check amount paid
98
  if ( $_REQUEST['Ecom_Cost_Total'] != $pending_payment->cost ) {
99
+ $new_call[] = sprintf( __( 'Price mismatch. Expected: %s Received: %s', 'mycred' ), $pending_payment->cost, sanitize_text_field( wp_unslash( $_REQUEST['Ecom_Cost_Total'] ) ) );
100
  $errors = true;
101
  }
102
 
103
  // Check status
104
+ if ( ! empty( $_REQUEST['Ecom_Ezic_Response_StatusCode'] ) && $_REQUEST['Ecom_Ezic_Response_StatusCode'] != 1 ) {
105
  $new_call[] = sprintf( __( 'Payment not completed. Received: %s', 'mycred' ), absint( $_REQUEST['Ecom_Ezic_Response_StatusCode'] ) );
106
  $errors = true;
107
  }
110
  if ( $errors === false ) {
111
 
112
  // If account is credited, delete the post and it's comments.
113
+ if ( $this->complete_payment( $pending_payment, sanitize_title( wp_unslash( $_REQUEST['Ecom_Ezic_Response_TransactionID'] ) ) ) )
114
  $this->trash_pending_payment( $pending_post_id );
115
  else
116
  $new_call[] = __( 'Failed to credit users account.', 'mycred' );
223
  ?>
224
  <div class="row">
225
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
226
+ <h3><?php esc_html_e( 'Details', 'mycred' ); ?></h3>
227
  <div class="form-group">
228
+ <label for="<?php echo esc_attr( $this->field_id( 'account' ) ); ?>"><?php esc_html_e( 'Account ID', 'mycred' ); ?></label>
229
+ <input type="text" name="<?php echo esc_attr( $this->field_name( 'account' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'account' ) ); ?>" value="<?php echo esc_attr( $prefs['account'] ); ?>" class="form-control" />
230
  </div>
231
  <div class="form-group">
232
+ <label for="<?php echo esc_attr( $this->field_id( 'site_tag' ) ); ?>"><?php esc_html_e( 'Site Tag', 'mycred' ); ?></label>
233
+ <input type="text" name="<?php echo esc_attr( $this->field_name( 'site_tag' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'site_tag' ) ); ?>" value="<?php echo esc_attr( $prefs['site_tag'] ); ?>" class="form-control" />
234
  </div>
235
  <div class="form-group">
236
+ <label for="<?php echo esc_attr( $this->field_id( 'cryptokey' ) ); ?>"><?php esc_html_e( 'Order Integrity Key', 'mycred' ); ?></label>
237
+ <input type="password" name="<?php echo esc_attr( $this->field_name( 'cryptokey' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'cryptokey' ) ); ?>" value="<?php echo esc_attr( $prefs['cryptokey'] ); ?>" class="form-control" />
238
+ <p><span class="description"><?php esc_html_e( 'Found under Step 12 on the Fraud Defense page.', 'mycred' ); ?></span></p>
239
  </div>
240
  <div class="form-group">
241
+ <label for="<?php echo esc_attr( $this->field_id( 'item_name' ) ); ?>"><?php esc_html_e( 'Item Name', 'mycred' ); ?></label>
242
+ <input type="text" name="<?php echo esc_attr( $this->field_name( 'item_name' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'item_name' ) ); ?>" value="<?php echo esc_attr( $prefs['item_name'] ); ?>" class="form-control" />
243
  </div>
244
  <div class="form-group">
245
+ <label for="<?php echo esc_attr( $this->field_id( 'logo_url' ) ); ?>"><?php esc_html_e( 'Logo URL', 'mycred' ); ?></label>
246
+ <input type="text" name="<?php echo esc_attr( $this->field_name( 'logo_url' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'logo_url' ) ); ?>" value="<?php echo esc_attr( $prefs['logo_url'] ); ?>" class="form-control" />
247
  </div>
248
  </div>
249
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
250
+ <h3><?php esc_html_e( 'Setup', 'mycred' ); ?></h3>
251
  <div class="form-group">
252
+ <label><?php esc_html_e( 'Currency', 'mycred' ); ?></label>
253
+ <input type="text" readonly="readonly" class="form-control" name="<?php echo esc_attr( $this->field_name( 'currency' ) ); ?>" value="USD" />
254
  </div>
255
  <div class="form-group">
256
+ <label><?php esc_html_e( 'Exchange Rates', 'mycred' ); ?></label>
257
 
258
  <?php $this->exchange_rate_setup(); ?>
259
 
260
  </div>
261
  <div class="form-group">
262
+ <label><?php esc_html_e( 'Postback CGI URL', 'mycred' ); ?></label>
263
+ <code style="padding: 12px;display:block;"><?php echo esc_url( $this->callback_url() ); ?></code>
264
+ <p><?php esc_html_e( 'For this gateway to work, you must login to your NETbilling account and edit your site. Under "Default payment form settings" make sure the Postback CGI URL is set to the above address and "Return method" is set to POST.', 'mycred' ); ?></p>
265
  </div>
266
  </div>
267
  </div>
addons/buy-creds/gateways/paypal-standard.php CHANGED
@@ -141,20 +141,20 @@ if ( ! class_exists( 'myCRED_PayPal_Standard' ) ) :
141
  $new_call = array();
142
 
143
  // Check amount paid
144
- if ( $_POST['mc_gross'] != $pending_payment->cost ) {
145
- $new_call[] = sprintf( __( 'Price mismatch. Expected: %s Received: %s', 'mycred' ), $pending_payment->cost, $_POST['mc_gross'] );
146
  $errors = true;
147
  }
148
 
149
  // Check currency
150
- if ( $_POST['mc_currency'] != $pending_payment->currency ) {
151
- $new_call[] = sprintf( __( 'Currency mismatch. Expected: %s Received: %s', 'mycred' ), $pending_payment->currency, $_POST['mc_currency'] );
152
  $errors = true;
153
  }
154
 
155
  // Check status
156
- if ( $_POST['payment_status'] != 'Completed' ) {
157
- $new_call[] = sprintf( __( 'Payment not completed. Received: %s', 'mycred' ), $_POST['payment_status'] );
158
  $errors = true;
159
  }
160
 
@@ -162,10 +162,10 @@ if ( ! class_exists( 'myCRED_PayPal_Standard' ) ) :
162
  if ( $errors === false ) {
163
 
164
  // If account is credited, delete the post and it's comments.
165
- if ( $this->complete_payment( $pending_payment, $_POST['txn_id'] ) )
166
  $this->trash_pending_payment( $pending_post_id );
167
  else
168
- $new_call[] = __( 'Failed to credit users account.', 'mycred' );
169
 
170
  }
171
 
@@ -190,7 +190,7 @@ if ( ! class_exists( 'myCRED_PayPal_Standard' ) ) :
190
 
191
  if ( isset( $_REQUEST['tx'] ) && isset( $_REQUEST['st'] ) && $_REQUEST['st'] == 'Completed' ) {
192
  $this->get_page_header( __( 'Success', 'mycred' ), $this->get_thankyou() );
193
- echo '<h1 style="text-align:center;">' . __( 'Thank you for your purchase', 'mycred' ) . '</h1>';
194
  $this->get_page_footer();
195
  exit;
196
  }
@@ -283,30 +283,30 @@ if ( ! class_exists( 'myCRED_PayPal_Standard' ) ) :
283
  ?>
284
  <div class="row">
285
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
286
- <h3><?php _e( 'Details', 'mycred' ); ?></h3>
287
  <div class="form-group">
288
- <label for="<?php echo $this->field_id( 'account' ); ?>"><?php _e( 'Account Email', 'mycred' ); ?></label>
289
- <input type="text" name="<?php echo $this->field_name( 'account' ); ?>" id="<?php echo $this->field_id( 'account' ); ?>" value="<?php echo esc_attr( $prefs['account'] ); ?>" class="form-control" />
290
  </div>
291
  <div class="form-group">
292
- <label for="<?php echo $this->field_id( 'item_name' ); ?>"><?php _e( 'Item Name', 'mycred' ); ?></label>
293
- <input type="text" name="<?php echo $this->field_name( 'item_name' ); ?>" id="<?php echo $this->field_id( 'item_name' ); ?>" value="<?php echo esc_attr( $prefs['item_name'] ); ?>" class="form-control" />
294
  </div>
295
  <div class="form-group">
296
- <label for="<?php echo $this->field_id( 'logo_url' ); ?>"><?php _e( 'Logo URL', 'mycred' ); ?></label>
297
- <input type="text" name="<?php echo $this->field_name( 'logo_url' ); ?>" id="<?php echo $this->field_id( 'logo_url' ); ?>" value="<?php echo esc_attr( $prefs['logo_url'] ); ?>" class="form-control" />
298
  </div>
299
  </div>
300
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
301
- <h3><?php _e( 'Setup', 'mycred' ); ?></h3>
302
  <div class="form-group">
303
- <label for="<?php echo $this->field_id( 'currency' ); ?>"><?php _e( 'Currency', 'mycred' ); ?></label>
304
 
305
  <?php $this->currencies_dropdown( 'currency', 'mycred-gateway-paypal-standard-currency' ); ?>
306
 
307
  </div>
308
  <div class="form-group">
309
- <label><?php _e( 'Exchange Rates', 'mycred' ); ?></label>
310
 
311
  <?php $this->exchange_rate_setup(); ?>
312
 
141
  $new_call = array();
142
 
143
  // Check amount paid
144
+ if ( ! empty( $_POST['mc_gross'] ) && $_POST['mc_gross'] != $pending_payment->cost ) {
145
+ $new_call[] = sprintf( __( 'Price mismatch. Expected: %s Received: %s', 'mycred' ), $pending_payment->cost, sanitize_text_field( wp_unslash( $_POST['mc_gross'] ) ) );
146
  $errors = true;
147
  }
148
 
149
  // Check currency
150
+ if ( ! empty( $_POST['mc_currency'] ) && $_POST['mc_currency'] != $pending_payment->currency ) {
151
+ $new_call[] = sprintf( __( 'Currency mismatch. Expected: %s Received: %s', 'mycred' ), $pending_payment->currency, sanitize_text_field( wp_unslash( $_POST['mc_currency'] ) ) );
152
  $errors = true;
153
  }
154
 
155
  // Check status
156
+ if ( ! empty( $_POST['payment_status'] ) && $_POST['payment_status'] != 'Completed' ) {
157
+ $new_call[] = sprintf( __( 'Payment not completed. Received: %s', 'mycred' ), sanitize_text_field( wp_unslash( $_POST['payment_status'] ) ) );
158
  $errors = true;
159
  }
160
 
162
  if ( $errors === false ) {
163
 
164
  // If account is credited, delete the post and it's comments.
165
+ if ( $this->complete_payment( $pending_payment,sanitize_text_field( wp_unslash( $_POST['txn_id'] ) ) ) )
166
  $this->trash_pending_payment( $pending_post_id );
167
  else
168
+ $new_call[] = esc_html__( 'Failed to credit users account.', 'mycred' );
169
 
170
  }
171
 
190
 
191
  if ( isset( $_REQUEST['tx'] ) && isset( $_REQUEST['st'] ) && $_REQUEST['st'] == 'Completed' ) {
192
  $this->get_page_header( __( 'Success', 'mycred' ), $this->get_thankyou() );
193
+ echo '<h1 style="text-align:center;">' . esc_html__( 'Thank you for your purchase', 'mycred' ) . '</h1>';
194
  $this->get_page_footer();
195
  exit;
196
  }
283
  ?>
284
  <div class="row">
285
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
286
+ <h3><?php esc_html_e( 'Details', 'mycred' ); ?></h3>
287
  <div class="form-group">
288
+ <label for="<?php echo esc_attr( $this->field_id( 'account' ) ); ?>"><?php esc_html_e( 'Account Email', 'mycred' ); ?></label>
289
+ <input type="text" name="<?php echo esc_attr( $this->field_name( 'account' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'account' ) ); ?>" value="<?php echo esc_attr( $prefs['account'] ); ?>" class="form-control" />
290
  </div>
291
  <div class="form-group">
292
+ <label for="<?php echo esc_attr( $this->field_id( 'item_name' ) ); ?>"><?php esc_html_e( 'Item Name', 'mycred' ); ?></label>
293
+ <input type="text" name="<?php echo esc_attr( $this->field_name( 'item_name' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'item_name' ) ); ?>" value="<?php echo esc_attr( $prefs['item_name'] ); ?>" class="form-control" />
294
  </div>
295
  <div class="form-group">
296
+ <label for="<?php echo esc_attr( $this->field_id( 'logo_url' ) ); ?>"><?php esc_html_e( 'Logo URL', 'mycred' ); ?></label>
297
+ <input type="text" name="<?php echo esc_attr( $this->field_name( 'logo_url' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'logo_url' ) ); ?>" value="<?php echo esc_attr( $prefs['logo_url'] ); ?>" class="form-control" />
298
  </div>
299
  </div>
300
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
301
+ <h3><?php esc_html_e( 'Setup', 'mycred' ); ?></h3>
302
  <div class="form-group">
303
+ <label for="<?php echo esc_attr( $this->field_id( 'currency' ) ); ?>"><?php esc_html_e( 'Currency', 'mycred' ); ?></label>
304
 
305
  <?php $this->currencies_dropdown( 'currency', 'mycred-gateway-paypal-standard-currency' ); ?>
306
 
307
  </div>
308
  <div class="form-group">
309
+ <label><?php esc_html_e( 'Exchange Rates', 'mycred' ); ?></label>
310
 
311
  <?php $this->exchange_rate_setup(); ?>
312
 
addons/buy-creds/gateways/skrill.php CHANGED
@@ -51,11 +51,17 @@ if ( ! class_exists( 'myCRED_Skrill' ) ) :
51
 
52
  $result = true;
53
 
54
- $check = sanitize_text_field( $_POST['merchant_id'] ) . sanitize_text_field( $_POST['transaction_id'] ) . strtoupper( md5( $this->prefs['word'] ) ) . sanitize_text_field( $_POST['mb_amount'] ) . sanitize_text_field( $_POST['mb_currency'] ) . sanitize_text_field( $_POST['status'] );
55
- if ( strtoupper( md5( $check ) ) !== $_POST['md5sig'] )
 
 
 
 
 
 
56
  $result = false;
57
 
58
- if ( $_POST['pay_to_email'] != trim( $this->prefs['account'] ) )
59
  $result = false;
60
 
61
  return $result;
@@ -84,20 +90,20 @@ if ( ! class_exists( 'myCRED_Skrill' ) ) :
84
  $new_call = array();
85
 
86
  // Check amount paid
87
- if ( $_POST['amount'] != $pending_payment->cost ) {
88
- $new_call[] = sprintf( __( 'Price mismatch. Expected: %s Received: %s', 'mycred' ), $pending_payment->cost, $_POST['amount'] );
89
  $errors = true;
90
  }
91
 
92
  // Check currency
93
- if ( $_POST['currency'] != $pending_payment->currency ) {
94
- $new_call[] = sprintf( __( 'Currency mismatch. Expected: %s Received: %s', 'mycred' ), $pending_payment->currency, $_POST['currency'] );
95
  $errors = true;
96
  }
97
 
98
  // Check status
99
- if ( $_POST['status'] != '2' ) {
100
- $new_call[] = sprintf( __( 'Payment not completed. Received: %s', 'mycred' ), $_POST['status'] );
101
  $errors = true;
102
  }
103
 
@@ -105,10 +111,10 @@ if ( ! class_exists( 'myCRED_Skrill' ) ) :
105
  if ( $errors === false ) {
106
 
107
  // If account is credited, delete the post and it's comments.
108
- if ( $this->complete_payment( $pending_payment, $_POST['transaction_id'] ) )
109
  $this->trash_pending_payment( $pending_post_id );
110
  else
111
- $new_call[] = __( 'Failed to credit users account.', 'mycred' );
112
 
113
  }
114
 
@@ -133,7 +139,7 @@ if ( ! class_exists( 'myCRED_Skrill' ) ) :
133
 
134
  if ( isset( $_GET['transaction_id'] ) && ! empty( $_GET['transaction_id'] ) && isset( $_GET['msid'] ) && ! empty( $_GET['msid'] ) ) {
135
  $this->get_page_header( __( 'Success', 'mycred' ), $this->get_thankyou() );
136
- echo '<h1>' . __( 'Thank you for your purchase', 'mycred' ) . '</h1>';
137
  $this->get_page_footer();
138
  exit;
139
  }
@@ -249,55 +255,55 @@ if ( ! class_exists( 'myCRED_Skrill' ) ) :
249
  ?>
250
  <div class="row">
251
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
252
- <h3><?php _e( 'Details', 'mycred' ); ?></h3>
253
  <div class="form-group">
254
- <label for="<?php echo $this->field_id( 'account' ); ?>"><?php _e( 'Account Email', 'mycred' ); ?></label>
255
- <input type="text" name="<?php echo $this->field_name( 'account' ); ?>" id="<?php echo $this->field_id( 'account' ); ?>" value="<?php echo esc_attr( $prefs['account'] ); ?>" class="form-control" />
256
  </div>
257
  <div class="form-group">
258
- <label for="<?php echo $this->field_id( 'word' ); ?>"><?php _e( 'Secret Word', 'mycred' ); ?></label>
259
- <input type="text" name="<?php echo $this->field_name( 'word' ); ?>" id="<?php echo $this->field_id( 'word' ); ?>" value="<?php echo esc_attr( $prefs['word'] ); ?>" class="form-control" />
260
  </div>
261
  <div class="form-group">
262
- <label for="<?php echo $this->field_id( 'item_name' ); ?>"><?php _e( 'Item Name', 'mycred' ); ?></label>
263
- <input type="text" name="<?php echo $this->field_name( 'item_name' ); ?>" id="<?php echo $this->field_id( 'item_name' ); ?>" value="<?php echo esc_attr( $prefs['item_name'] ); ?>" class="form-control" />
264
  </div>
265
  <div class="form-group">
266
- <label for="<?php echo $this->field_id( 'logo_url' ); ?>"><?php _e( 'Logo URL', 'mycred' ); ?></label>
267
- <input type="text" name="<?php echo $this->field_name( 'logo_url' ); ?>" id="<?php echo $this->field_id( 'logo_url' ); ?>" value="<?php echo esc_attr( $prefs['logo_url'] ); ?>" class="form-control" />
268
  </div>
269
  <div class="form-group">
270
- <label for="<?php echo $this->field_id( 'email_receipt' ); ?>"><input type="checkbox" name="<?php echo $this->field_name( 'email_receipt' ); ?>" id="<?php echo $this->field_id( 'email_receipt' ); ?>" value="1"<?php checked( $prefs['email_receipt'], 1 ); ?> /> <?php _e( 'Ask Skrill to send me a confirmation email for each successful purchase.', 'mycred' ); ?></label>
271
  </div>
272
  </div>
273
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
274
- <h3><?php _e( 'Setup', 'mycred' ); ?></h3>
275
  <div class="form-group">
276
- <label for="<?php echo $this->field_id( 'currency' ); ?>"><?php _e( 'Currency', 'mycred' ); ?></label>
277
 
278
  <?php $this->currencies_dropdown( 'currency', 'mycred-gateway-skrill-currency' ); ?>
279
 
280
  </div>
281
  <div class="form-group">
282
- <label><?php _e( 'Exchange Rates', 'mycred' ); ?></label>
283
 
284
  <?php $this->exchange_rate_setup(); ?>
285
 
286
  </div>
287
  </div>
288
  </div>
289
- <h3><?php _e( 'Checkout Page', 'mycred' ); ?></h3>
290
  <div class="row">
291
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
292
  <div class="form-group">
293
- <label for="<?php echo $this->field_id( 'account_title' ); ?>"><?php _e( 'Title', 'mycred' ); ?></label>
294
- <p><span class="description"><?php _e( 'If left empty, your account email is used as title on the Skill Payment Page.', 'mycred' ); ?></span></p>
295
- <input type="text" name="<?php echo $this->field_name( 'account_title' ); ?>" id="<?php echo $this->field_id( 'account_title' ); ?>" value="<?php echo esc_attr( $prefs['account_title'] ); ?>" class="form-control" />
296
  </div>
297
  <div class="form-group">
298
- <label for="<?php echo $this->field_id( 'confirmation_note' ); ?>"><?php _e( 'Confirmation Note', 'mycred' ); ?></label>
299
- <p><span class="description"><?php _e( 'Optional text to show user once a transaction has been successfully completed. This text is shown by Skrill.', 'mycred' ); ?></span></p>
300
- <textarea rows="10" cols="50" name="<?php echo $this->field_name( 'confirmation_note' ); ?>" id="<?php echo $this->field_id( 'confirmation_note' ); ?>" class="form-control"><?php echo esc_html( $prefs['confirmation_note'] ); ?></textarea>
301
  </div>
302
  </div>
303
  </div>
51
 
52
  $result = true;
53
 
54
+ $merchant_id = isset( $_POST['merchant_id'] ) ? sanitize_text_field( wp_unslash( $_POST['merchant_id'] ) ) : '';
55
+ $transaction_id = isset( $_POST['transaction_id'] ) ? sanitize_text_field( wp_unslash( $_POST['transaction_id'] ) ) : '';
56
+ $mb_amount = isset( $_POST['mb_amount'] ) ? sanitize_text_field( wp_unslash( $_POST['mb_amount'] ) ) : '';
57
+ $mb_currency = isset( $_POST['mb_currency'] ) ? sanitize_text_field( wp_unslash( $_POST['mb_currency'] ) ) : '';
58
+ $status = isset( $_POST['status'] ) ? sanitize_text_field( wp_unslash( $_POST['status'] ) ) : '';
59
+
60
+ $check = $merchant_id . $transaction_id . strtoupper( md5( $this->prefs['word'] ) ) . $mb_amount . $mb_currency . $status;
61
+ if ( isset( $_POST['md5sig'] ) && strtoupper( md5( $check ) ) !== $_POST['md5sig'] )
62
  $result = false;
63
 
64
+ if ( isset( $_POST['pay_to_email'] ) && $_POST['pay_to_email'] != trim( $this->prefs['account'] ) )
65
  $result = false;
66
 
67
  return $result;
90
  $new_call = array();
91
 
92
  // Check amount paid
93
+ if ( isset( $_POST['amount'] ) && $_POST['amount'] != $pending_payment->cost ) {
94
+ $new_call[] = sprintf( __( 'Price mismatch. Expected: %s Received: %s', 'mycred' ), $pending_payment->cost,sanitize_text_field( wp_unslash( $_POST['amount'] ) ) );
95
  $errors = true;
96
  }
97
 
98
  // Check currency
99
+ if ( isset( $_POST['currency'] ) && $_POST['currency'] != $pending_payment->currency ) {
100
+ $new_call[] = sprintf( __( 'Currency mismatch. Expected: %s Received: %s', 'mycred' ), $pending_payment->currency, sanitize_text_field( wp_unslash( $_POST['currency'] ) ) );
101
  $errors = true;
102
  }
103
 
104
  // Check status
105
+ if ( isset( $_POST['status'] ) && $_POST['status'] != '2' ) {
106
+ $new_call[] = sprintf( __( 'Payment not completed. Received: %s', 'mycred' ), sanitize_text_field( wp_unslash( $_POST['status'] ) ) );
107
  $errors = true;
108
  }
109
 
111
  if ( $errors === false ) {
112
 
113
  // If account is credited, delete the post and it's comments.
114
+ if ( $this->complete_payment( $pending_payment, sanitize_text_field( wp_unslash( $_POST['transaction_id'] ) ) ) )
115
  $this->trash_pending_payment( $pending_post_id );
116
  else
117
+ $new_call[] = esc_html__( 'Failed to credit users account.', 'mycred' );
118
 
119
  }
120
 
139
 
140
  if ( isset( $_GET['transaction_id'] ) && ! empty( $_GET['transaction_id'] ) && isset( $_GET['msid'] ) && ! empty( $_GET['msid'] ) ) {
141
  $this->get_page_header( __( 'Success', 'mycred' ), $this->get_thankyou() );
142
+ echo '<h1>' . esc_html__( 'Thank you for your purchase', 'mycred' ) . '</h1>';
143
  $this->get_page_footer();
144
  exit;
145
  }
255
  ?>
256
  <div class="row">
257
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
258
+ <h3><?php esc_html_e( 'Details', 'mycred' ); ?></h3>
259
  <div class="form-group">
260
+ <label for="<?php echo esc_attr( $this->field_id( 'account' ) ); ?>"><?php esc_html_e( 'Account Email', 'mycred' ); ?></label>
261
+ <input type="text" name="<?php echo esc_attr( $this->field_name( 'account' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'account' ) ); ?>" value="<?php echo esc_attr( $prefs['account'] ); ?>" class="form-control" />
262
  </div>
263
  <div class="form-group">
264
+ <label for="<?php echo esc_attr( $this->field_id( 'word' ) ); ?>"><?php esc_html_e( 'Secret Word', 'mycred' ); ?></label>
265
+ <input type="text" name="<?php echo esc_attr( $this->field_name( 'word' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'word' ) ); ?>" value="<?php echo esc_attr( $prefs['word'] ); ?>" class="form-control" />
266
  </div>
267
  <div class="form-group">
268
+ <label for="<?php echo esc_attr( $this->field_id( 'item_name' ) ); ?>"><?php esc_html_e( 'Item Name', 'mycred' ); ?></label>
269
+ <input type="text" name="<?php echo esc_attr( $this->field_name( 'item_name' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'item_name' ) ); ?>" value="<?php echo esc_attr( $prefs['item_name'] ); ?>" class="form-control" />
270
  </div>
271
  <div class="form-group">
272
+ <label for="<?php echo esc_attr( $this->field_id( 'logo_url' ) ); ?>"><?php esc_html_e( 'Logo URL', 'mycred' ); ?></label>
273
+ <input type="text" name="<?php echo esc_attr( $this->field_name( 'logo_url' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'logo_url' ) ); ?>" value="<?php echo esc_attr( $prefs['logo_url'] ); ?>" class="form-control" />
274
  </div>
275
  <div class="form-group">
276
+ <label for="<?php echo esc_attr( $this->field_id( 'email_receipt' ) ); ?>"><input type="checkbox" name="<?php echo esc_attr( $this->field_name( 'email_receipt' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'email_receipt' ) ); ?>" value="1"<?php checked( $prefs['email_receipt'], 1 ); ?> /> <?php esc_html_e( 'Ask Skrill to send me a confirmation email for each successful purchase.', 'mycred' ); ?></label>
277
  </div>
278
  </div>
279
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
280
+ <h3><?php esc_html_e( 'Setup', 'mycred' ); ?></h3>
281
  <div class="form-group">
282
+ <label for="<?php echo esc_attr( $this->field_id( 'currency' ) ); ?>"><?php esc_html_e( 'Currency', 'mycred' ); ?></label>
283
 
284
  <?php $this->currencies_dropdown( 'currency', 'mycred-gateway-skrill-currency' ); ?>
285
 
286
  </div>
287
  <div class="form-group">
288
+ <label><?php esc_html_e( 'Exchange Rates', 'mycred' ); ?></label>
289
 
290
  <?php $this->exchange_rate_setup(); ?>
291
 
292
  </div>
293
  </div>
294
  </div>
295
+ <h3><?php esc_html_e( 'Checkout Page', 'mycred' ); ?></h3>
296
  <div class="row">
297
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
298
  <div class="form-group">
299
+ <label for="<?php echo esc_attr( $this->field_id( 'account_title' ) ); ?>"><?php esc_html_e( 'Title', 'mycred' ); ?></label>
300
+ <p><span class="description"><?php esc_html_e( 'If left empty, your account email is used as title on the Skill Payment Page.', 'mycred' ); ?></span></p>
301
+ <input type="text" name="<?php echo esc_attr( $this->field_name( 'account_title' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'account_title' ) ); ?>" value="<?php echo esc_attr( $prefs['account_title'] ); ?>" class="form-control" />
302
  </div>
303
  <div class="form-group">
304
+ <label for="<?php echo esc_attr( $this->field_id( 'confirmation_note' ) ); ?>"><?php esc_html_e( 'Confirmation Note', 'mycred' ); ?></label>
305
+ <p><span class="description"><?php esc_html_e( 'Optional text to show user once a transaction has been successfully completed. This text is shown by Skrill.', 'mycred' ); ?></span></p>
306
+ <textarea rows="10" cols="50" name="<?php echo esc_attr( $this->field_name( 'confirmation_note' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'confirmation_note' ) ); ?>" class="form-control"><?php echo esc_html( $prefs['confirmation_note'] ); ?></textarea>
307
  </div>
308
  </div>
309
  </div>
addons/buy-creds/includes/buycred-reward-hook.php CHANGED
@@ -165,29 +165,29 @@ if ( ! class_exists( 'myCRED_buyCRED_Reward_Hook' ) ) :
165
  <div class="row">
166
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
167
  <div class="form-group">
168
- <label>Reward <?php echo $this->core->plural(); ?></label>
169
- <input type="text" name="<?php echo $this->name( $this->mycred_type, 'creds' ); ?>" value="<?php echo $this->core->number( $hook['creds'] ); ?>" class="form-control buycred-reward-creds" />
170
  </div>
171
  </div>
172
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
173
  <div class="form-group">
174
- <label><?php _e( 'Log Template', 'mycred' ); ?></label>
175
- <input type="text" name="<?php echo $this->name( $this->mycred_type, 'log' ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $hook['log'] ); ?>" class="form-control buycred-reward-log" />
176
- <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
177
  </div>
178
  </div>
179
  </div>
180
  <div class="row">
181
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
182
  <div class="form-group">
183
- <label><?php _e( 'Minimum', 'mycred' ); ?></label>
184
- <input type="text" name="<?php echo $this->name( $this->mycred_type, 'min' ); ?>" value="<?php echo $this->core->number( $hook['min'] ); ?>" class="form-control buycred-reward-min" />
185
  </div>
186
  </div>
187
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
188
  <div class="form-group">
189
- <label><?php _e( 'Maximium', 'mycred' ); ?></label>
190
- <input type="text" name="<?php echo $this->name( $this->mycred_type, 'max' ); ?>" value="<?php echo $this->core->number( $hook['max'] ); ?>" class="form-control buycred-reward-max" />
191
  </div>
192
  </div>
193
  </div>
165
  <div class="row">
166
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
167
  <div class="form-group">
168
+ <label>Reward <?php echo esc_html( $this->core->plural() ); ?></label>
169
+ <input type="text" name="<?php echo esc_attr( $this->name( $this->mycred_type, 'creds' ) ); ?>" value="<?php echo esc_attr( $this->core->number( $hook['creds'] ) ); ?>" class="form-control buycred-reward-creds" />
170
  </div>
171
  </div>
172
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
173
  <div class="form-group">
174
+ <label><?php esc_html_e( 'Log Template', 'mycred' ); ?></label>
175
+ <input type="text" name="<?php echo esc_attr( $this->name( $this->mycred_type, 'log' ) ); ?>" placeholder="<?php esc_html_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $hook['log'] ); ?>" class="form-control buycred-reward-log" />
176
+ <span class="description"><?php echo esc_attr( $this->available_template_tags( array( 'general' ) ) ); ?></span>
177
  </div>
178
  </div>
179
  </div>
180
  <div class="row">
181
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
182
  <div class="form-group">
183
+ <label><?php esc_html_e( 'Minimum', 'mycred' ); ?></label>
184
+ <input type="text" name="<?php echo esc_attr( $this->name( $this->mycred_type, 'min' ) ); ?>" value="<?php echo esc_attr( $this->core->number( $hook['min'] ) ); ?>" class="form-control buycred-reward-min" />
185
  </div>
186
  </div>
187
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
188
  <div class="form-group">
189
+ <label><?php esc_html_e( 'Maximium', 'mycred' ); ?></label>
190
+ <input type="text" name="<?php echo esc_attr( $this->name( $this->mycred_type, 'max' ) ); ?>" value="<?php echo esc_attr( $this->core->number( $hook['max'] ) ); ?>" class="form-control buycred-reward-max" />
191
  </div>
192
  </div>
193
  </div>
addons/buy-creds/includes/buycred-shortcodes.php CHANGED
@@ -203,7 +203,7 @@ if ( ! function_exists( 'mycred_render_buy_form_points' ) ) :
203
  if ( ! empty( $buycred_instance->gateway->errors ) ) {
204
 
205
  foreach ( $buycred_instance->gateway->errors as $error )
206
- echo '<div class="alert alert-warnng"><p>' . $error . '</p></div>';
207
 
208
  }
209
 
@@ -216,7 +216,7 @@ if ( ! function_exists( 'mycred_render_buy_form_points' ) ) :
216
  if( count( $point_types ) > 1 ){ ?>
217
  <select name="ctype" class="mycred-change-pointtypes">
218
  <?php foreach ( $point_types as $key => $value ) :?>
219
- <option value="<?php echo $value[0]; ?>"><?php echo $value[1]; ?></option><?php endforeach;?>
220
  </select><?php
221
  }else{ ?>
222
  <input type="hidden" name="ctype" value="<?php echo esc_attr( $point_types[0][0] ); ?>" /><?php
@@ -228,7 +228,7 @@ if ( ! function_exists( 'mycred_render_buy_form_points' ) ) :
228
  <input type="hidden" name="er_random" value="<?php echo esc_attr( $e_rate ); ?>" />
229
  <?php } ?>
230
  <div class="form-group">
231
- <label class="mycred-point-type"><?php echo $point_types[0][1]; ?></label>
232
  <?php
233
 
234
  // No amount given - user must nominate the amount
@@ -282,7 +282,7 @@ if ( ! function_exists( 'mycred_render_buy_form_points' ) ) :
282
 
283
  ?>
284
  <div class="form-group">
285
- <label for="gift_to"><?php _e( 'Recipient', 'mycred' ); ?></label>
286
  <p class="form-control-static"><?php echo esc_html( $user->display_name ); ?></p>
287
  <input type="hidden" name="<?php if ( $gift_to == 'author' ) echo 'post_id'; else echo 'gift_to'; ?>" value="<?php echo absint( $recipient_id ); ?>" />
288
  </div>
@@ -295,7 +295,7 @@ if ( ! function_exists( 'mycred_render_buy_form_points' ) ) :
295
 
296
  ?>
297
  <div class="form-group">
298
- <label for="gateway"><?php _e( 'Pay Using', 'mycred' ); ?></label>
299
  <select name="mycred_buy" class="form-control">
300
  <?php
301
 
@@ -375,12 +375,12 @@ if ( ! function_exists( 'mycred_render_pending_purchases' ) ) :
375
  <table class="table">
376
  <thead>
377
  <tr>
378
- <th class="column-transaction-id"><?php _e( 'Transaction ID', 'mycred' ); ?></th>
379
- <th class="column-gateway"><?php _e( 'Gateway', 'mycred' ); ?></th>
380
- <th class="column-amount"><?php _e( 'Amount', 'mycred' ); ?></th>
381
- <th class="column-cost"><?php _e( 'Cost', 'mycred' ); ?></th>
382
- <?php if ( $ctype == '' ) : ?><th class="column-ctype"><?php _e( 'Point Type', 'mycred' ); ?></th><?php endif; ?>
383
- <th class="column-actions"><?php _e( 'Actions', 'mycred' ); ?></th>
384
  </tr>
385
  </thead>
386
  <tbody>
@@ -448,7 +448,7 @@ if ( ! function_exists( 'mycred_render_pending_purchases' ) ) :
448
 
449
  ?>
450
  <tr>
451
- <td colspan="<?php if ( $ctype == '' ) echo '6'; else echo '5'; ?>"><?php _e( 'No pending payments found', 'mycred' ); ?></td>
452
  </tr>
453
  <?php
454
 
203
  if ( ! empty( $buycred_instance->gateway->errors ) ) {
204
 
205
  foreach ( $buycred_instance->gateway->errors as $error )
206
+ echo '<div class="alert alert-warnng"><p>' . esc_html( $error ) . '</p></div>';
207
 
208
  }
209
 
216
  if( count( $point_types ) > 1 ){ ?>
217
  <select name="ctype" class="mycred-change-pointtypes">
218
  <?php foreach ( $point_types as $key => $value ) :?>
219
+ <option value="<?php echo esc_attr( $value[0] ); ?>"><?php echo esc_html( $value[1] ); ?></option><?php endforeach;?>
220
  </select><?php
221
  }else{ ?>
222
  <input type="hidden" name="ctype" value="<?php echo esc_attr( $point_types[0][0] ); ?>" /><?php
228
  <input type="hidden" name="er_random" value="<?php echo esc_attr( $e_rate ); ?>" />
229
  <?php } ?>
230
  <div class="form-group">
231
+ <label class="mycred-point-type"><?php echo esc_html( $point_types[0][1] ); ?></label>
232
  <?php
233
 
234
  // No amount given - user must nominate the amount
282
 
283
  ?>
284
  <div class="form-group">
285
+ <label for="gift_to"><?php esc_html_e( 'Recipient', 'mycred' ); ?></label>
286
  <p class="form-control-static"><?php echo esc_html( $user->display_name ); ?></p>
287
  <input type="hidden" name="<?php if ( $gift_to == 'author' ) echo 'post_id'; else echo 'gift_to'; ?>" value="<?php echo absint( $recipient_id ); ?>" />
288
  </div>
295
 
296
  ?>
297
  <div class="form-group">
298
+ <label for="gateway"><?php esc_html_e( 'Pay Using', 'mycred' ); ?></label>
299
  <select name="mycred_buy" class="form-control">
300
  <?php
301
 
375
  <table class="table">
376
  <thead>
377
  <tr>
378
+ <th class="column-transaction-id"><?php esc_html_e( 'Transaction ID', 'mycred' ); ?></th>
379
+ <th class="column-gateway"><?php esc_html_e( 'Gateway', 'mycred' ); ?></th>
380
+ <th class="column-amount"><?php esc_html_e( 'Amount', 'mycred' ); ?></th>
381
+ <th class="column-cost"><?php esc_html_e( 'Cost', 'mycred' ); ?></th>
382
+ <?php if ( $ctype == '' ) : ?><th class="column-ctype"><?php esc_html_e( 'Point Type', 'mycred' ); ?></th><?php endif; ?>
383
+ <th class="column-actions"><?php esc_html_e( 'Actions', 'mycred' ); ?></th>
384
  </tr>
385
  </thead>
386
  <tbody>
448
 
449
  ?>
450
  <tr>
451
+ <td colspan="<?php if ( $ctype == '' ) echo '6'; else echo '5'; ?>"><?php esc_html_e( 'No pending payments found', 'mycred' ); ?></td>
452
  </tr>
453
  <?php
454
 
addons/buy-creds/modules/buycred-module-core.php CHANGED
@@ -388,7 +388,7 @@ if ( ! class_exists( 'myCRED_buyCRED_Module' ) ) :
388
 
389
  <div class="row">
390
  <div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
391
- <h3><?php _e( 'Sale Setup', 'mycred' ); ?></h3>
392
  <?php
393
 
394
  foreach ( $this->point_types as $type_id => $label ) {
@@ -403,7 +403,7 @@ if ( ! class_exists( 'myCRED_buyCRED_Module' ) ) :
403
  <div class="form-group">
404
  <label for="buycred-type-<?php echo esc_attr( $type_id ); ?>-enabled"><?php echo $mycred->plural(); ?></label>
405
  <div class="checkbox" style="padding-top: 4px;">
406
- <label for="buycred-type-<?php echo esc_attr( $type_id ); ?>-enabled"><input type="checkbox" name="mycred_pref_core[buy_creds][types][<?php echo esc_attr( $type_id ); ?>][enabled]" id="buycred-type-<?php echo esc_attr( $type_id ); ?>-enabled"<?php if ( in_array( $type_id, $settings['types'] ) ) echo ' checked="checked"'; ?> value="<?php echo esc_attr( $type_id ); ?>" /> <?php _e( 'Enable', 'mycred' ); ?></label>
407
  </div>
408
  </div>
409
 
@@ -411,7 +411,7 @@ if ( ! class_exists( 'myCRED_buyCRED_Module' ) ) :
411
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
412
 
413
  <div class="form-group">
414
- <label for="buycred-type-<?php echo esc_attr( $type_id ); ?>-min"><?php _e( 'Minimum Amount', 'mycred' ); ?></label>
415
  <input type="text" name="mycred_pref_core[buy_creds][types][<?php echo esc_attr( $type_id ); ?>][min]" id="buycred-type-<?php echo esc_attr( $type_id ); ?>-min" class="form-control" placeholder="<?php echo $mycred->get_lowest_value(); ?>" value="<?php echo esc_attr( $sale_setup['min'] ); ?>" />
416
  </div>
417
 
@@ -419,10 +419,10 @@ if ( ! class_exists( 'myCRED_buyCRED_Module' ) ) :
419
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
420
 
421
  <div class="form-group">
422
- <label for="buycred-type-<?php echo esc_attr( $type_id ); ?>-max"><?php _e( 'Maximum', 'mycred' ); ?></label>
423
  <div class="row">
424
  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
425
- <input type="text" name="mycred_pref_core[buy_creds][types][<?php echo esc_attr( $type_id ); ?>][max]" id="buycred-type-<?php echo esc_attr( $type_id ); ?>-max" class="form-control" placeholder="<?php _e( 'No limit', 'mycred' ); ?>" value="<?php echo esc_attr( $sale_setup['max'] ); ?>" />
426
  </div>
427
  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
428
  <?php mycred_purchase_limit_dropdown( 'mycred_pref_core[buy_creds][types][' . $type_id . '][time]', 'buycred-type-' . $type_id . '-time', $sale_setup['time'] ); ?>
@@ -445,7 +445,7 @@ if ( ! class_exists( 'myCRED_buyCRED_Module' ) ) :
445
  </div>
446
  </div>
447
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
448
- <h3><?php _e( 'Checkout', 'mycred' ); ?></h3>
449
 
450
  <div class="form-group">
451
 
@@ -469,15 +469,15 @@ if ( ! class_exists( 'myCRED_buyCRED_Module' ) ) :
469
  </div>
470
  </div>
471
 
472
- <h3><?php _e( 'Redirects', 'mycred' ); ?></h3>
473
  <div class="row">
474
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
475
 
476
  <div class="form-group">
477
- <p style="margin-top: 0;"><span class="description"><?php _e( 'Where should users be redirected to upon successfully completing a purchase. You can nominate a specific URL or a page.', 'mycred' ); ?></span></p>
478
  </div>
479
  <div class="form-group">
480
- <label for="<?php echo $this->field_id( array( 'thankyou' => 'page' ) ); ?>"><?php _e( 'Redirect to Page', 'mycred' ); ?></label>
481
  <?php
482
 
483
  // Thank you page dropdown
@@ -493,21 +493,21 @@ if ( ! class_exists( 'myCRED_buyCRED_Module' ) ) :
493
  ?>
494
  </div>
495
  <div class="form-group">
496
- <label for="<?php echo $this->field_id( array( 'thankyou' => 'custom' ) ); ?>"><?php _e( 'Redirect to URL', 'mycred' ); ?></label>
497
  <input type="text" name="<?php echo $this->field_name( array( 'thankyou' => 'custom' ) ); ?>" id="<?php echo $this->field_id( array( 'thankyou' => 'custom' ) ); ?>" placeholder="https://" class="form-control" value="<?php echo esc_attr( $settings['thankyou']['custom'] ); ?>" />
498
  </div>
499
  <?php if ( $uses_buddypress ) : ?>
500
- <p style="margin-top: 0;"><span class="description"><?php _e( 'You can use %profile% for the base URL of the users profile.', 'mycred' ); ?></span></p>
501
  <?php endif; ?>
502
 
503
  </div>
504
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
505
 
506
  <div class="form-group">
507
- <p style="margin-top: 0;"><span class="description"><?php _e( 'Where should users be redirected to if they cancel a transaction. You can nominate a specific URL or a page.', 'mycred' ); ?></span></p>
508
  </div>
509
  <div class="form-group">
510
- <label for="<?php echo $this->field_id( array( 'cancelled' => 'page' ) ); ?>"><?php _e( 'Redirect to Page', 'mycred' ); ?></label>
511
  <?php
512
 
513
  // Thank you page dropdown
@@ -523,39 +523,39 @@ if ( ! class_exists( 'myCRED_buyCRED_Module' ) ) :
523
  ?>
524
  </div>
525
  <div class="form-group">
526
- <label for="<?php echo $this->field_id( array( 'cancelled' => 'custom' ) ); ?>"><?php _e( 'Redirect to URL', 'mycred' ); ?></label>
527
  <input type="text" name="<?php echo $this->field_name( array( 'cancelled' => 'custom' ) ); ?>" id="<?php echo $this->field_id( array( 'cancelled' => 'custom' ) ); ?>" placeholder="https://" class="form-control" value="<?php echo esc_attr( $settings['cancelled']['custom'] ); ?>" />
528
  </div>
529
  <?php if ( $uses_buddypress ) : ?>
530
- <p style="margin-top: 0;"><span class="description"><?php _e( 'You can use %profile% for the base URL of the users profile.', 'mycred' ); ?></span></p>
531
  <?php endif; ?>
532
 
533
  </div>
534
  </div>
535
 
536
- <h3><?php _e( 'Templates', 'mycred' ); ?></h3>
537
  <div class="row">
538
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
539
 
540
  <div class="form-group">
541
- <label for="<?php echo $this->field_id( 'login' ); ?>"><?php _e( 'Login Message', 'mycred' ); ?></label>
542
  <input type="text" name="<?php echo $this->field_name( 'login' ); ?>" id="<?php echo $this->field_id( 'login' ); ?>" class="form-control" value="<?php echo esc_attr( $settings['login'] ); ?>" />
543
- <p><span class="description"><?php _e( 'Message to show in shortcodes when viewed by someone who is not logged in.', 'mycred' ); ?></span></p>
544
  </div>
545
 
546
  </div>
547
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
548
 
549
  <div class="form-group">
550
- <label for="<?php echo $this->field_id( 'log' ); ?>"><?php _e( 'Log Template', 'mycred' ); ?></label>
551
- <input type="text" name="<?php echo $this->field_name( 'log' ); ?>" id="<?php echo $this->field_id( 'log' ); ?>" class="form-control" placeholder="<?php _e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $settings['log'] ); ?>" />
552
  <p><span class="description"><?php echo $this->core->available_template_tags( array( 'general' ), '%gateway%' ); ?></span></p>
553
  </div>
554
 
555
  </div>
556
  </div>
557
 
558
- <h3><?php _e( 'Gifting', 'mycred' ); ?></h3>
559
  <div class="row">
560
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
561
 
@@ -572,15 +572,15 @@ if ( ! class_exists( 'myCRED_buyCRED_Module' ) ) :
572
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
573
 
574
  <div class="form-group">
575
- <label for="<?php echo $this->field_id( array( 'gifting' => 'log' ) ); ?>"><?php _e( 'Log Template', 'mycred' ); ?></label>
576
- <input type="text" name="<?php echo $this->field_name( array( 'gifting' => 'log' ) ); ?>" id="<?php echo $this->field_id( 'log' ); ?>" class="form-control" placeholder="<?php _e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $settings['gifting']['log'] ); ?>" />
577
  <p><span class="description"><?php echo $this->core->available_template_tags( array( 'general', 'user' ) ); ?></span></p>
578
  </div>
579
 
580
  </div>
581
  </div>
582
 
583
- <h3 style="margin-bottom: 0;"><?php _e( 'Available Shortcodes', 'mycred' ); ?></h3>
584
  <div class="row">
585
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
586
  <p><a href="http://codex.mycred.me/shortcodes/mycred_buy/" target="_blank">[mycred_buy]</a>, <a href="http://codex.mycred.me/shortcodes/mycred_buy_form/" target="_blank">[mycred_buy_form]</a>, <a href="http://codex.mycred.me/shortcodes/mycred_buy_pending/" target="_blank">[mycred_buy_pending]</a></p>
@@ -740,7 +740,7 @@ if ( ! class_exists( 'myCRED_buyCRED_Module' ) ) :
740
 
741
  ?>
742
  <div class="wrap mycred-metabox" id="myCRED-wrap">
743
- <h1><?php _e( 'buyCred Payment Gateways', 'mycred' ); ?></h1>
744
  <?php
745
 
746
  // Updated settings
@@ -781,14 +781,14 @@ if ( ! class_exists( 'myCRED_buyCRED_Module' ) ) :
781
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
782
  <div class="form-group">
783
  <div>&nbsp;</div>
784
- <label for="buycred-gateway-<?php echo $key; ?>"><input type="checkbox" name="mycred_pref_buycreds[active][]" id="buycred-gateway-<?php echo $key; ?>" value="<?php echo $key; ?>"<?php if ( $this->is_active( $key ) ) echo ' checked="checked"'; ?> /> <?php _e( 'Enable', 'mycred' ); ?></label>
785
  </div>
786
  </div>
787
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
788
  <?php if ( $has_test_mode ) : ?>
789
  <div class="form-group">
790
  <div>&nbsp;</div>
791
- <label for="buycred-gateway-<?php echo $key; ?>-sandbox"><input type="checkbox" name="mycred_pref_buycreds[gateway_prefs][<?php echo $key; ?>][sandbox]" id="buycred-gateway-<?php echo $key; ?>-sandbox" value="<?php echo $key; ?>"<?php if ( $sandbox_mode ) echo ' checked="checked"'; ?> /> <?php _e( 'Sandbox Mode', 'mycred' ); ?></label>
792
  </div>
793
  <?php endif; ?>
794
  </div>
@@ -796,7 +796,7 @@ if ( ! class_exists( 'myCRED_buyCRED_Module' ) ) :
796
  <?php if ( MYCRED_DEFAULT_LABEL === 'myCRED' && $has_documentation ) : ?>
797
  <div class="form-group">
798
  <div>&nbsp;</div>
799
- <a href="<?php echo $has_documentation; ?>" target="_blank"><?php _e( 'Documentation', 'mycred' ); ?></a>
800
  </div>
801
  <?php endif; ?>
802
  </div>
@@ -1000,7 +1000,7 @@ jQuery(function($) {
1000
 
1001
  ?>
1002
  <div class="wrap list" id="myCRED-wrap">
1003
- <h1><?php _e( 'Purchase Log', 'mycred' ); ?></h1>
1004
 
1005
  <?php $log->filter_dates( esc_url( $filter_url ) ); ?>
1006
 
@@ -1327,7 +1327,7 @@ jQuery(function($) {
1327
  if ( empty( $available_options ) ) return;
1328
 
1329
  ?>
1330
- <p class="mycred-p"><?php _e( 'Users exchange rate when buying points.', 'mycred' ); ?></p>
1331
  <table class="form-table mycred-inline-table">
1332
  <?php
1333
 
@@ -1338,7 +1338,7 @@ jQuery(function($) {
1338
  <th scope="row"><?php echo esc_attr( $setup['name'] ); ?></th>
1339
  <td>
1340
  <fieldset id="mycred-buycred-list" class="buycred-list">
1341
- <legend class="screen-reader-text"><span><?php _e( 'buyCRED Exchange Rates', 'mycred' ); ?></span></legend>
1342
  <?php
1343
 
1344
  foreach ( $setup['types'] as $type_id => $data ) {
@@ -1350,8 +1350,8 @@ jQuery(function($) {
1350
  <div class="mycred-wrapper buycred-wrapper disabled-option color-option">
1351
  <div><?php printf( _x( 'Buying %s', 'Points Name', 'mycred' ), $data['name'] ); ?></div>
1352
  <div class="balance-row">
1353
- <div class="balance-view"><?php _e( 'Disabled', 'mycred' ); ?></div>
1354
- <div class="balance-desc"><em><?php _e( 'This point type is not for sale.', 'mycred' ); ?></em></div>
1355
  </div>
1356
  </div>
1357
  <?php
@@ -1365,7 +1365,7 @@ jQuery(function($) {
1365
  <div class="mycred-wrapper buycred-wrapper excluded-option color-option">
1366
  <div><?php printf( _x( 'Buying %s', 'Buying Points', 'mycred' ), $data['name'] ); ?></div>
1367
  <div class="balance-row">
1368
- <div class="balance-view"><?php _e( 'Excluded', 'mycred' ); ?></div>
1369
  <div class="balance-desc"><em><?php printf( _x( 'User can not buy %s', 'Points Name', 'mycred' ), $data['name'] ); ?></em></div>
1370
  </div>
1371
  </div>
@@ -1381,7 +1381,7 @@ jQuery(function($) {
1381
  <div><?php printf( _x( 'Buying %s', 'Buying Points', 'mycred' ), $data['name'] ); ?></div>
1382
  <div class="balance-row">
1383
  <div class="balance-view"><?php echo $data['before']; ?><input type="text" name="mycred_adjust_users_buyrates[<?php echo $type_id; ?>][<?php echo $gateway_id; ?>]" placeholder="<?php echo $data['default']; ?>" value="<?php if ( $data['override'] ) echo esc_attr( $data['custom'] ); ?>" class="short" size="8" /><?php echo ' ' . $setup['currency']; ?></div>
1384
- <div class="balance-desc"><em><?php _e( 'Leave empty to use the default rate.', 'mycred' ); ?></em></div>
1385
  </div>
1386
  </div>
1387
  <?php
388
 
389
  <div class="row">
390
  <div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
391
+ <h3><?php esc_html_e( 'Sale Setup', 'mycred' ); ?></h3>
392
  <?php
393
 
394
  foreach ( $this->point_types as $type_id => $label ) {
403
  <div class="form-group">
404
  <label for="buycred-type-<?php echo esc_attr( $type_id ); ?>-enabled"><?php echo $mycred->plural(); ?></label>
405
  <div class="checkbox" style="padding-top: 4px;">
406
+ <label for="buycred-type-<?php echo esc_attr( $type_id ); ?>-enabled"><input type="checkbox" name="mycred_pref_core[buy_creds][types][<?php echo esc_attr( $type_id ); ?>][enabled]" id="buycred-type-<?php echo esc_attr( $type_id ); ?>-enabled"<?php if ( in_array( $type_id, $settings['types'] ) ) echo ' checked="checked"'; ?> value="<?php echo esc_attr( $type_id ); ?>" /> <?php esc_html_e( 'Enable', 'mycred' ); ?></label>
407
  </div>
408
  </div>
409
 
411
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
412
 
413
  <div class="form-group">
414
+ <label for="buycred-type-<?php echo esc_attr( $type_id ); ?>-min"><?php esc_html_e( 'Minimum Amount', 'mycred' ); ?></label>
415
  <input type="text" name="mycred_pref_core[buy_creds][types][<?php echo esc_attr( $type_id ); ?>][min]" id="buycred-type-<?php echo esc_attr( $type_id ); ?>-min" class="form-control" placeholder="<?php echo $mycred->get_lowest_value(); ?>" value="<?php echo esc_attr( $sale_setup['min'] ); ?>" />
416
  </div>
417
 
419
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
420
 
421
  <div class="form-group">
422
+ <label for="buycred-type-<?php echo esc_attr( $type_id ); ?>-max"><?php esc_html_e( 'Maximum', 'mycred' ); ?></label>
423
  <div class="row">
424
  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
425
+ <input type="text" name="mycred_pref_core[buy_creds][types][<?php echo esc_attr( $type_id ); ?>][max]" id="buycred-type-<?php echo esc_attr( $type_id ); ?>-max" class="form-control" placeholder="<?php esc_attr_e( 'No limit', 'mycred' ); ?>" value="<?php echo esc_attr( $sale_setup['max'] ); ?>" />
426
  </div>
427
  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
428
  <?php mycred_purchase_limit_dropdown( 'mycred_pref_core[buy_creds][types][' . $type_id . '][time]', 'buycred-type-' . $type_id . '-time', $sale_setup['time'] ); ?>
445
  </div>
446
  </div>
447
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
448
+ <h3><?php esc_html_e( 'Checkout', 'mycred' ); ?></h3>
449
 
450
  <div class="form-group">
451
 
469
  </div>
470
  </div>
471
 
472
+ <h3><?php esc_html_e( 'Redirects', 'mycred' ); ?></h3>
473
  <div class="row">
474
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
475
 
476
  <div class="form-group">
477
+ <p style="margin-top: 0;"><span class="description"><?php esc_html_e( 'Where should users be redirected to upon successfully completing a purchase. You can nominate a specific URL or a page.', 'mycred' ); ?></span></p>
478
  </div>
479
  <div class="form-group">
480
+ <label for="<?php echo $this->field_id( array( 'thankyou' => 'page' ) ); ?>"><?php esc_html_e( 'Redirect to Page', 'mycred' ); ?></label>
481
  <?php
482
 
483
  // Thank you page dropdown
493
  ?>
494
  </div>
495
  <div class="form-group">
496
+ <label for="<?php echo $this->field_id( array( 'thankyou' => 'custom' ) ); ?>"><?php esc_html_e( 'Redirect to URL', 'mycred' ); ?></label>
497
  <input type="text" name="<?php echo $this->field_name( array( 'thankyou' => 'custom' ) ); ?>" id="<?php echo $this->field_id( array( 'thankyou' => 'custom' ) ); ?>" placeholder="https://" class="form-control" value="<?php echo esc_attr( $settings['thankyou']['custom'] ); ?>" />
498
  </div>
499
  <?php if ( $uses_buddypress ) : ?>
500
+ <p style="margin-top: 0;"><span class="description"><?php esc_html_e( 'You can use %profile% for the base URL of the users profile.', 'mycred' ); ?></span></p>
501
  <?php endif; ?>
502
 
503
  </div>
504
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
505
 
506
  <div class="form-group">
507
+ <p style="margin-top: 0;"><span class="description"><?php esc_html_e( 'Where should users be redirected to if they cancel a transaction. You can nominate a specific URL or a page.', 'mycred' ); ?></span></p>
508
  </div>
509
  <div class="form-group">
510
+ <label for="<?php echo $this->field_id( array( 'cancelled' => 'page' ) ); ?>"><?php esc_html_e( 'Redirect to Page', 'mycred' ); ?></label>
511
  <?php
512
 
513
  // Thank you page dropdown
523
  ?>
524
  </div>
525
  <div class="form-group">
526
+ <label for="<?php echo $this->field_id( array( 'cancelled' => 'custom' ) ); ?>"><?php esc_html_e( 'Redirect to URL', 'mycred' ); ?></label>
527
  <input type="text" name="<?php echo $this->field_name( array( 'cancelled' => 'custom' ) ); ?>" id="<?php echo $this->field_id( array( 'cancelled' => 'custom' ) ); ?>" placeholder="https://" class="form-control" value="<?php echo esc_attr( $settings['cancelled']['custom'] ); ?>" />
528
  </div>
529
  <?php if ( $uses_buddypress ) : ?>
530
+ <p style="margin-top: 0;"><span class="description"><?php esc_html_e( 'You can use %profile% for the base URL of the users profile.', 'mycred' ); ?></span></p>
531
  <?php endif; ?>
532
 
533
  </div>
534
  </div>
535
 
536
+ <h3><?php esc_html_e( 'Templates', 'mycred' ); ?></h3>
537
  <div class="row">
538
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
539
 
540
  <div class="form-group">
541
+ <label for="<?php echo $this->field_id( 'login' ); ?>"><?php esc_html_e( 'Login Message', 'mycred' ); ?></label>
542
  <input type="text" name="<?php echo $this->field_name( 'login' ); ?>" id="<?php echo $this->field_id( 'login' ); ?>" class="form-control" value="<?php echo esc_attr( $settings['login'] ); ?>" />
543
+ <p><span class="description"><?php esc_html_e( 'Message to show in shortcodes when viewed by someone who is not logged in.', 'mycred' ); ?></span></p>
544
  </div>
545
 
546
  </div>
547
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
548
 
549
  <div class="form-group">
550
+ <label for="<?php echo $this->field_id( 'log' ); ?>"><?php esc_html_e( 'Log Template', 'mycred' ); ?></label>
551
+ <input type="text" name="<?php echo $this->field_name( 'log' ); ?>" id="<?php echo $this->field_id( 'log' ); ?>" class="form-control" placeholder="<?php esc_attr_e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $settings['log'] ); ?>" />
552
  <p><span class="description"><?php echo $this->core->available_template_tags( array( 'general' ), '%gateway%' ); ?></span></p>
553
  </div>
554
 
555
  </div>
556
  </div>
557
 
558
+ <h3><?php esc_html_e( 'Gifting', 'mycred' ); ?></h3>
559
  <div class="row">
560
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
561
 
572
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
573
 
574
  <div class="form-group">
575
+ <label for="<?php echo $this->field_id( array( 'gifting' => 'log' ) ); ?>"><?php esc_html_e( 'Log Template', 'mycred' ); ?></label>
576
+ <input type="text" name="<?php echo $this->field_name( array( 'gifting' => 'log' ) ); ?>" id="<?php echo $this->field_id( 'log' ); ?>" class="form-control" placeholder="<?php esc_attr_e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $settings['gifting']['log'] ); ?>" />
577
  <p><span class="description"><?php echo $this->core->available_template_tags( array( 'general', 'user' ) ); ?></span></p>
578
  </div>
579
 
580
  </div>
581
  </div>
582
 
583
+ <h3 style="margin-bottom: 0;"><?php esc_html_e( 'Available Shortcodes', 'mycred' ); ?></h3>
584
  <div class="row">
585
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
586
  <p><a href="http://codex.mycred.me/shortcodes/mycred_buy/" target="_blank">[mycred_buy]</a>, <a href="http://codex.mycred.me/shortcodes/mycred_buy_form/" target="_blank">[mycred_buy_form]</a>, <a href="http://codex.mycred.me/shortcodes/mycred_buy_pending/" target="_blank">[mycred_buy_pending]</a></p>
740
 
741
  ?>
742
  <div class="wrap mycred-metabox" id="myCRED-wrap">
743
+ <h1><?php esc_html_e( 'buyCred Payment Gateways', 'mycred' ); ?></h1>
744
  <?php
745
 
746
  // Updated settings
781
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
782
  <div class="form-group">
783
  <div>&nbsp;</div>
784
+ <label for="buycred-gateway-<?php echo $key; ?>"><input type="checkbox" name="mycred_pref_buycreds[active][]" id="buycred-gateway-<?php echo $key; ?>" value="<?php echo $key; ?>"<?php if ( $this->is_active( $key ) ) echo ' checked="checked"'; ?> /> <?php esc_html_e( 'Enable', 'mycred' ); ?></label>
785
  </div>
786
  </div>
787
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
788
  <?php if ( $has_test_mode ) : ?>
789
  <div class="form-group">
790
  <div>&nbsp;</div>
791
+ <label for="buycred-gateway-<?php echo $key; ?>-sandbox"><input type="checkbox" name="mycred_pref_buycreds[gateway_prefs][<?php echo $key; ?>][sandbox]" id="buycred-gateway-<?php echo $key; ?>-sandbox" value="<?php echo $key; ?>"<?php if ( $sandbox_mode ) echo ' checked="checked"'; ?> /> <?php esc_html_e( 'Sandbox Mode', 'mycred' ); ?></label>
792
  </div>
793
  <?php endif; ?>
794
  </div>
796
  <?php if ( MYCRED_DEFAULT_LABEL === 'myCRED' && $has_documentation ) : ?>
797
  <div class="form-group">
798
  <div>&nbsp;</div>
799
+ <a href="<?php echo $has_documentation; ?>" target="_blank"><?php esc_html_e( 'Documentation', 'mycred' ); ?></a>
800
  </div>
801
  <?php endif; ?>
802
  </div>
1000
 
1001
  ?>
1002
  <div class="wrap list" id="myCRED-wrap">
1003
+ <h1><?php esc_html_e( 'Purchase Log', 'mycred' ); ?></h1>
1004
 
1005
  <?php $log->filter_dates( esc_url( $filter_url ) ); ?>
1006
 
1327
  if ( empty( $available_options ) ) return;
1328
 
1329
  ?>
1330
+ <p class="mycred-p"><?php esc_html_e( 'Users exchange rate when buying points.', 'mycred' ); ?></p>
1331
  <table class="form-table mycred-inline-table">
1332
  <?php
1333
 
1338
  <th scope="row"><?php echo esc_attr( $setup['name'] ); ?></th>
1339
  <td>
1340
  <fieldset id="mycred-buycred-list" class="buycred-list">
1341
+ <legend class="screen-reader-text"><span><?php esc_html_e( 'buyCRED Exchange Rates', 'mycred' ); ?></span></legend>
1342
  <?php
1343
 
1344
  foreach ( $setup['types'] as $type_id => $data ) {
1350
  <div class="mycred-wrapper buycred-wrapper disabled-option color-option">
1351
  <div><?php printf( _x( 'Buying %s', 'Points Name', 'mycred' ), $data['name'] ); ?></div>
1352
  <div class="balance-row">
1353
+ <div class="balance-view"><?php esc_html_e( 'Disabled', 'mycred' ); ?></div>
1354
+ <div class="balance-desc"><em><?php esc_html_e( 'This point type is not for sale.', 'mycred' ); ?></em></div>
1355
  </div>
1356
  </div>
1357
  <?php
1365
  <div class="mycred-wrapper buycred-wrapper excluded-option color-option">
1366
  <div><?php printf( _x( 'Buying %s', 'Buying Points', 'mycred' ), $data['name'] ); ?></div>
1367
  <div class="balance-row">
1368
+ <div class="balance-view"><?php esc_html_e( 'Excluded', 'mycred' ); ?></div>
1369
  <div class="balance-desc"><em><?php printf( _x( 'User can not buy %s', 'Points Name', 'mycred' ), $data['name'] ); ?></em></div>
1370
  </div>
1371
  </div>
1381
  <div><?php printf( _x( 'Buying %s', 'Buying Points', 'mycred' ), $data['name'] ); ?></div>
1382
  <div class="balance-row">
1383
  <div class="balance-view"><?php echo $data['before']; ?><input type="text" name="mycred_adjust_users_buyrates[<?php echo $type_id; ?>][<?php echo $gateway_id; ?>]" placeholder="<?php echo $data['default']; ?>" value="<?php if ( $data['override'] ) echo esc_attr( $data['custom'] ); ?>" class="short" size="8" /><?php echo ' ' . $setup['currency']; ?></div>
1384
+ <div class="balance-desc"><em><?php esc_html_e( 'Leave empty to use the default rate.', 'mycred' ); ?></em></div>
1385
  </div>
1386
  </div>
1387
  <?php
addons/buy-creds/modules/buycred-module-pending.php CHANGED
@@ -538,8 +538,8 @@ jQuery(function($){
538
 
539
  <div id="minor-publishing-actions">
540
 
541
- <div><a href="<?php echo $payout_url; ?>" class="button button-secondary button-block"><?php _e( 'Pay Out', 'mycred' ); ?></a></div>
542
- <div><a href="<?php echo $delete_url; ?>" class="button button-secondary button-block"><?php _e( 'Trash', 'mycred' ); ?></a></div>
543
 
544
  </div>
545
 
@@ -550,7 +550,7 @@ jQuery(function($){
550
  <div id="publishing-action">
551
  <span class="spinner"></span>
552
 
553
- <input type="submit" id="publish" class="button button-primary primary button-large" value="<?php _e( 'Save Changes', 'mycred' ); ?>" />
554
 
555
  </div>
556
  <div class="clear"></div>
@@ -603,13 +603,13 @@ jQuery(function($){
603
  <div class="row">
604
  <div class="col-md-6">
605
  <div class="form-group">
606
- <label><?php _e( 'Payer', 'mycred' ); ?></label>
607
  <p class="form-control-static"><?php echo esc_attr( $buyer_name ); ?></p>
608
  </div>
609
  </div>
610
  <div class="col-md-6">
611
  <div class="form-group">
612
- <label><?php _e( 'Recipient', 'mycred' ); ?></label>
613
  <p class="form-control-static"><?php echo esc_attr( $recipient_name ); ?></p>
614
  </div>
615
  </div>
@@ -617,7 +617,7 @@ jQuery(function($){
617
  <div class="row">
618
  <div class="col-md-3 col-sm-6">
619
  <div class="form-group">
620
- <label for="buycred-pending-payment-point_type"><?php _e( 'Point Type', 'mycred' ); ?></label>
621
  <?php
622
 
623
  // Just one point type is set for sale. No need for a dropdown menu
@@ -656,7 +656,7 @@ jQuery(function($){
656
  </div>
657
  <div class="col-md-3 col-sm-6">
658
  <div class="form-group">
659
- <label for="buycred-pending-payment-gateway"><?php _e( 'Gateway', 'mycred' ); ?></label>
660
  <select name="buycred_pending_payment[gateway]" id="buycred-pending-payment-gateway" class="form-control">
661
  <?php
662
 
@@ -675,19 +675,19 @@ jQuery(function($){
675
  </div>
676
  <div class="col-md-2 col-sm-6">
677
  <div class="form-group">
678
- <label for="buycred-pending-payment-amount"><?php _e( 'Amount', 'mycred' ); ?></label>
679
  <input type="text" name="buycred_pending_payment[amount]" id="buycred-pending-payment-amount" class="form-control" value="<?php echo $mycred->number( $pending_payment->amount ); ?>" />
680
  </div>
681
  </div>
682
  <div class="col-md-2 col-sm-6">
683
  <div class="form-group">
684
- <label for="buycred-pending-payment-cost"><?php _e( 'Cost', 'mycred' ); ?></label>
685
  <input type="text" name="buycred_pending_payment[cost]" id="buycred-pending-payment-cost" class="form-control" value="<?php echo esc_attr( $pending_payment->cost ); ?>" />
686
  </div>
687
  </div>
688
  <div class="col-md-2 col-sm-6">
689
  <div class="form-group">
690
- <label for="buycred-pending-payment-currency"><?php _e( 'Currency', 'mycred' ); ?></label>
691
  <input type="text" name="buycred_pending_payment[currency]" id="buycred-pending-payment-currency" class="form-control" value="<?php echo esc_attr( $pending_payment->currency ); ?>" />
692
  </div>
693
  </div>
538
 
539
  <div id="minor-publishing-actions">
540
 
541
+ <div><a href="<?php echo $payout_url; ?>" class="button button-secondary button-block"><?php esc_html_e( 'Pay Out', 'mycred' ); ?></a></div>
542
+ <div><a href="<?php echo $delete_url; ?>" class="button button-secondary button-block"><?php esc_html_e( 'Trash', 'mycred' ); ?></a></div>
543
 
544
  </div>
545
 
550
  <div id="publishing-action">
551
  <span class="spinner"></span>
552
 
553
+ <input type="submit" id="publish" class="button button-primary primary button-large" value="<?php esc_attr_e( 'Save Changes', 'mycred' ); ?>" />
554
 
555
  </div>
556
  <div class="clear"></div>
603
  <div class="row">
604
  <div class="col-md-6">
605
  <div class="form-group">
606
+ <label><?php esc_html_e( 'Payer', 'mycred' ); ?></label>
607
  <p class="form-control-static"><?php echo esc_attr( $buyer_name ); ?></p>
608
  </div>
609
  </div>
610
  <div class="col-md-6">
611
  <div class="form-group">
612
+ <label><?php esc_html_e( 'Recipient', 'mycred' ); ?></label>
613
  <p class="form-control-static"><?php echo esc_attr( $recipient_name ); ?></p>
614
  </div>
615
  </div>
617
  <div class="row">
618
  <div class="col-md-3 col-sm-6">
619
  <div class="form-group">
620
+ <label for="buycred-pending-payment-point_type"><?php esc_html_e( 'Point Type', 'mycred' ); ?></label>
621
  <?php
622
 
623
  // Just one point type is set for sale. No need for a dropdown menu
656
  </div>
657
  <div class="col-md-3 col-sm-6">
658
  <div class="form-group">
659
+ <label for="buycred-pending-payment-gateway"><?php esc_html_e( 'Gateway', 'mycred' ); ?></label>
660
  <select name="buycred_pending_payment[gateway]" id="buycred-pending-payment-gateway" class="form-control">
661
  <?php
662
 
675
  </div>
676
  <div class="col-md-2 col-sm-6">
677
  <div class="form-group">
678
+ <label for="buycred-pending-payment-amount"><?php esc_html_e( 'Amount', 'mycred' ); ?></label>
679
  <input type="text" name="buycred_pending_payment[amount]" id="buycred-pending-payment-amount" class="form-control" value="<?php echo $mycred->number( $pending_payment->amount ); ?>" />
680
  </div>
681
  </div>
682
  <div class="col-md-2 col-sm-6">
683
  <div class="form-group">
684
+ <label for="buycred-pending-payment-cost"><?php esc_html_e( 'Cost', 'mycred' ); ?></label>
685
  <input type="text" name="buycred_pending_payment[cost]" id="buycred-pending-payment-cost" class="form-control" value="<?php echo esc_attr( $pending_payment->cost ); ?>" />
686
  </div>
687
  </div>
688
  <div class="col-md-2 col-sm-6">
689
  <div class="form-group">
690
+ <label for="buycred-pending-payment-currency"><?php esc_html_e( 'Currency', 'mycred' ); ?></label>
691
  <input type="text" name="buycred_pending_payment[currency]" id="buycred-pending-payment-currency" class="form-control" value="<?php echo esc_attr( $pending_payment->currency ); ?>" />
692
  </div>
693
  </div>
addons/cash-creds/gateways/bank-transfer.php CHANGED
@@ -105,33 +105,33 @@ if ( ! class_exists( 'myCRED_cashcred_Bank_Transfer' ) ) :
105
  ?>
106
  <div class="row">
107
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
108
- <h3><?php _e( 'Details', 'mycred' ); ?></h3>
109
 
110
  <div class="form-group">
111
- <label for="<?php echo $this->field_id( 'minimum_amount' ); ?>"><?php _e( 'Minimum Points Withdrawal', 'mycred' ); ?></label>
112
  <input type="number" name="<?php echo $this->field_name( 'minimum_amount' ); ?>" id="<?php echo $this->field_id( 'minimum_amount' ); ?>" min="1" value="<?php echo esc_attr( $prefs['minimum_amount'] ); ?>" class="form-control" />
113
  </div>
114
 
115
  <div class="form-group">
116
- <label for="<?php echo $this->field_id( 'maximum_amount' ); ?>"><?php _e( 'Maximum Points Withdrawal', 'mycred' ); ?></label>
117
  <input type="number" name="<?php echo $this->field_name( 'maximum_amount' ); ?>" id="<?php echo $this->field_id( 'maximum_amount' ); ?>" value="<?php echo esc_attr( $prefs['maximum_amount'] ); ?>" class="form-control" />
118
  </div>
119
 
120
  <div class="form-group">
121
- <label for="<?php echo $this->field_id( 'enable_additional_notes' ); ?>"><input type="checkbox" name="<?php echo $this->field_name( 'enable_additional_notes' ); ?>" id="<?php echo $this->field_id( 'enable_additional_notes' ); ?>" value="1"<?php checked( $prefs['enable_additional_notes'], 1 ); ?> /> <?php _e( 'Enable Additional Notes', 'mycred' ); ?></label>
122
  </div>
123
 
124
  </div>
125
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
126
- <h3><?php _e( 'Setup', 'mycred' ); ?></h3>
127
 
128
  <div class="form-group">
129
- <label for="<?php echo $this->field_id( 'currency' ); ?>"><?php _e( 'Currency', 'mycred' ); ?></label>
130
  <input type="text" name="<?php echo $this->field_name( 'currency' ); ?>" id="<?php echo $this->field_id( 'currency' ); ?>" value="<?php echo esc_attr( $prefs['currency'] ); ?>" class="form-control" />
131
  </div>
132
 
133
  <div class="form-group">
134
- <label><?php _e( 'Exchange Rates', 'mycred' ); ?></label>
135
 
136
  <?php $this->exchange_rate_setup(); ?>
137
 
@@ -143,7 +143,7 @@ if ( ! class_exists( 'myCRED_cashcred_Bank_Transfer' ) ) :
143
  <div class="row" id="additional_notes_show">
144
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
145
  <div class="form-group">
146
- <label for="cashcredbanktransferaccount"><?php _e( 'Additional notes', 'mycred' ); ?></label>
147
  <?php wp_editor( $prefs['additional_notes'], 'cashcredbanktransferaccount', array( 'textarea_name' => $this->field_name( 'additional_notes' ), 'textarea_rows' => 10 ) ); ?>
148
  </div>
149
  </div>
105
  ?>
106
  <div class="row">
107
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
108
+ <h3><?php esc_html_e( 'Details', 'mycred' ); ?></h3>
109
 
110
  <div class="form-group">
111
+ <label for="<?php echo $this->field_id( 'minimum_amount' ); ?>"><?php esc_html_e( 'Minimum Points Withdrawal', 'mycred' ); ?></label>
112
  <input type="number" name="<?php echo $this->field_name( 'minimum_amount' ); ?>" id="<?php echo $this->field_id( 'minimum_amount' ); ?>" min="1" value="<?php echo esc_attr( $prefs['minimum_amount'] ); ?>" class="form-control" />
113
  </div>
114
 
115
  <div class="form-group">
116
+ <label for="<?php echo $this->field_id( 'maximum_amount' ); ?>"><?php esc_html_e( 'Maximum Points Withdrawal', 'mycred' ); ?></label>
117
  <input type="number" name="<?php echo $this->field_name( 'maximum_amount' ); ?>" id="<?php echo $this->field_id( 'maximum_amount' ); ?>" value="<?php echo esc_attr( $prefs['maximum_amount'] ); ?>" class="form-control" />
118
  </div>
119
 
120
  <div class="form-group">
121
+ <label for="<?php echo $this->field_id( 'enable_additional_notes' ); ?>"><input type="checkbox" name="<?php echo $this->field_name( 'enable_additional_notes' ); ?>" id="<?php echo $this->field_id( 'enable_additional_notes' ); ?>" value="1"<?php checked( $prefs['enable_additional_notes'], 1 ); ?> /> <?php esc_html_e( 'Enable Additional Notes', 'mycred' ); ?></label>
122
  </div>
123
 
124
  </div>
125
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
126
+ <h3><?php esc_html_e( 'Setup', 'mycred' ); ?></h3>
127
 
128
  <div class="form-group">
129
+ <label for="<?php echo $this->field_id( 'currency' ); ?>"><?php esc_html_e( 'Currency', 'mycred' ); ?></label>
130
  <input type="text" name="<?php echo $this->field_name( 'currency' ); ?>" id="<?php echo $this->field_id( 'currency' ); ?>" value="<?php echo esc_attr( $prefs['currency'] ); ?>" class="form-control" />
131
  </div>
132
 
133
  <div class="form-group">
134
+ <label><?php esc_html_e( 'Exchange Rates', 'mycred' ); ?></label>
135
 
136
  <?php $this->exchange_rate_setup(); ?>
137
 
143
  <div class="row" id="additional_notes_show">
144
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
145
  <div class="form-group">
146
+ <label for="cashcredbanktransferaccount"><?php esc_html_e( 'Additional notes', 'mycred' ); ?></label>
147
  <?php wp_editor( $prefs['additional_notes'], 'cashcredbanktransferaccount', array( 'textarea_name' => $this->field_name( 'additional_notes' ), 'textarea_rows' => 10 ) ); ?>
148
  </div>
149
  </div>
addons/cash-creds/includes/cashcred-shortcodes.php CHANGED
@@ -57,10 +57,10 @@ if ( ! function_exists( 'mycred_render_cashcred' ) ) :
57
  ?>
58
  <div id="cashcred">
59
  <ul class="cashcred-nav-tabs">
60
- <li id="tab1" class="active"><?php _e( 'Withdraw Request', 'mycred' ); ?></li>
61
- <li id="tab2"><?php _e( 'Approved Requests', 'mycred' ); ?></li>
62
- <li id="tab3"><?php _e( 'Cancelled Requests', 'mycred' ); ?></li>
63
- <li id="tab4"><?php _e( 'Payment Settings', 'mycred' ); ?></li>
64
  </ul>
65
  <div id="cashcred_tab_content">
66
  <!--------First tab--------->
@@ -140,7 +140,7 @@ if ( ! function_exists( 'mycred_render_cashcred' ) ) :
140
  $mycred_cashcred_gateway_notice = apply_filters( 'mycred_cashcred_gateway_notice', 'Selected gateway details are incomplete.' );
141
  ?>
142
 
143
- <div class="cashcred_gateway_notice"><?php _e( $mycred_cashcred_gateway_notice, 'mycred' ) ?></div>
144
 
145
  <form method="post" class="mycred-cashcred-form" action="">
146
 
@@ -148,7 +148,7 @@ if ( ! function_exists( 'mycred_render_cashcred' ) ) :
148
 
149
  <?php if( count( $point_types ) > 1 ) {?>
150
  <div class="form-group">
151
- <label for="gateway"><?php _e( 'Withdraw Point Type', 'mycred' ); ?></label>
152
  <select id="cashcred_point_type" name="cashcred_point_type" class="form-control">
153
  <?php
154
  foreach( $point_types as $point_type_id => $point_type_obj ) {
@@ -163,7 +163,7 @@ if ( ! function_exists( 'mycred_render_cashcred' ) ) :
163
 
164
  <?php if ( count( $gateways ) > 1 ) { ?>
165
  <div class="form-group">
166
- <label for="gateway"><?php _e( 'Withdrawal Payment Method', 'mycred' ); ?></label>
167
  <select id="cashcred_pay_method" name="cashcred_pay_method" class="form-control">
168
  <?php
169
  foreach ( $gateways as $gateway_id => $gateway_data ) {
57
  ?>
58
  <div id="cashcred">
59
  <ul class="cashcred-nav-tabs">
60
+ <li id="tab1" class="active"><?php esc_html_e( 'Withdraw Request', 'mycred' ); ?></li>
61
+ <li id="tab2"><?php esc_html_e( 'Approved Requests', 'mycred' ); ?></li>
62
+ <li id="tab3"><?php esc_html_e( 'Cancelled Requests', 'mycred' ); ?></li>
63
+ <li id="tab4"><?php esc_html_e( 'Payment Settings', 'mycred' ); ?></li>
64
  </ul>
65
  <div id="cashcred_tab_content">
66
  <!--------First tab--------->
140
  $mycred_cashcred_gateway_notice = apply_filters( 'mycred_cashcred_gateway_notice', 'Selected gateway details are incomplete.' );
141
  ?>
142
 
143
+ <div class="cashcred_gateway_notice"><?php esc_html_e( $mycred_cashcred_gateway_notice, 'mycred' ) ?></div>
144
 
145
  <form method="post" class="mycred-cashcred-form" action="">
146
 
148
 
149
  <?php if( count( $point_types ) > 1 ) {?>
150
  <div class="form-group">
151
+ <label for="gateway"><?php esc_html_e( 'Withdraw Point Type', 'mycred' ); ?></label>
152
  <select id="cashcred_point_type" name="cashcred_point_type" class="form-control">
153
  <?php
154
  foreach( $point_types as $point_type_id => $point_type_obj ) {
163
 
164
  <?php if ( count( $gateways ) > 1 ) { ?>
165
  <div class="form-group">
166
+ <label for="gateway"><?php esc_html_e( 'Withdrawal Payment Method', 'mycred' ); ?></label>
167
  <select id="cashcred_pay_method" name="cashcred_pay_method" class="form-control">
168
  <?php
169
  foreach ( $gateways as $gateway_id => $gateway_data ) {
addons/cash-creds/modules/cashcred-module-core.php CHANGED
@@ -342,7 +342,6 @@ if ( ! class_exists( 'myCRED_cashCRED_Module' ) ) :
342
  $format = '%s payment credited';
343
  $entry = sprintf($format, $gateway_name->label);
344
 
345
-
346
  mycred_subtract( 'cashcred_withdrawal', $user_id, -$points, $entry, $post_id , $log_data, $point_type );
347
 
348
  if($manual == true) {
@@ -754,7 +753,7 @@ if ( ! class_exists( 'myCRED_cashCRED_Module' ) ) :
754
 
755
  ?>
756
  <div class="wrap mycred-metabox" id="myCRED-wrap">
757
- <h1><?php _e( 'cashCred Payment Gateways', 'mycred' ); ?></h1>
758
  <?php
759
 
760
  // Updated settings
@@ -795,14 +794,14 @@ if ( ! class_exists( 'myCRED_cashCRED_Module' ) ) :
795
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
796
  <div class="form-group">
797
  <div>&nbsp;</div>
798
- <label for="cashcred-gateway-<?php echo $key; ?>"><input type="checkbox" name="mycred_pref_cashcreds[active][]" id="cashcred-gateway-<?php echo $key; ?>" value="<?php echo $key; ?>"<?php if ( $this->is_active( $key ) ) echo ' checked="checked"'; ?> /> <?php _e( 'Enable', 'mycred' ); ?></label>
799
  </div>
800
  </div>
801
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
802
  <?php if ( $has_test_mode ) : ?>
803
  <div class="form-group">
804
  <div>&nbsp;</div>
805
- <label for="cashcred-gateway-<?php echo $key; ?>-sandbox"><input type="checkbox" name="mycred_pref_cashcreds[gateway_prefs][<?php echo $key; ?>][sandbox]" id="cashcred-gateway-<?php echo $key; ?>-sandbox" value="<?php echo $key; ?>"<?php if ( $sandbox_mode ) echo ' checked="checked"'; ?> /> <?php _e( 'Sandbox Mode', 'mycred' ); ?></label>
806
  </div>
807
  <?php endif; ?>
808
  </div>
@@ -810,7 +809,7 @@ if ( ! class_exists( 'myCRED_cashCRED_Module' ) ) :
810
  <?php if ( MYCRED_DEFAULT_LABEL === 'myCRED' && $has_documentation ) : ?>
811
  <div class="form-group">
812
  <div>&nbsp;</div>
813
- <a href="<?php echo $has_documentation; ?>" target="_blank"><?php _e( 'Documentation', 'mycred' ); ?></a>
814
  </div>
815
  <?php endif; ?>
816
  </div>
@@ -960,29 +959,29 @@ jQuery(function($) {
960
  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
961
 
962
  <div class="form-group">
963
- <label for="mycred_pref_core_cashcreds_debugging"><?php _e( 'Payment Debugging Log', 'mycred' ); ?></label>
964
  <select class="form-control" name="mycred_pref_core[cashcreds][debugging]" id="mycred_pref_core_cashcreds_debugging">
965
  <option value="disable" <?php echo $cashcred_prefs['debugging'] != 'enable' ? 'selected="selected"' : ''; ?>>Disabled</option>
966
  <option value="enable" <?php echo $cashcred_prefs['debugging'] == 'enable' ? 'selected="selected"' : ''; ?>>Enable</option>
967
  </select>
968
- <p><span class="description"><?php _e( 'Payment Debugging log for developers.', 'mycred' ); ?></span></p>
969
  </div>
970
 
971
  </div>
972
  </div>
973
 
974
- <h3><?php _e( 'Setup', 'mycred' ); ?></h3>
975
  <div class="row">
976
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
977
  <div class="form-group">
978
- <label for="<?php echo $this->field_id( array( 'fees' => 'use' ) ); ?>"><input type="checkbox" name="mycred_pref_core[cashcreds][fees][use]" id="<?php echo $this->field_id( array( 'fees' => 'use' ) ); ?>"<?php checked( $cashcred_prefs['fees']['use'], 1 ); ?> value="1" /> <?php _e( 'Enable this feature', 'mycred' ); ?></label>
979
  </div>
980
  </div>
981
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
982
  <div class="form-group">
983
- <label for="<?php echo $this->field_id( array( 'fees' => 'account' ) ); ?>"><?php _e( 'Fee Account', 'mycred' ); ?></label>
984
  <input type="text" class="form-control" name="mycred_pref_core[cashcreds][fees][account]" id="<?php echo $this->field_id( array( 'fees' => 'account' ) ); ?>" value="<?php echo esc_attr( $cashcred_prefs['fees']['account'] ); ?>" />
985
- <p><span class="description"><?php _e( 'Option to deposit transfer fees into a specific users account. Use zero to disable.', 'mycred' ); ?></span></p>
986
  </div>
987
  </div>
988
  </div>
@@ -1009,7 +1008,7 @@ jQuery(function($) {
1009
  <div class="row">
1010
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
1011
  <div class="form-group">
1012
- <label for="<?php echo $this->field_id( array( 'fees', 'types', $key, 'amount' ) ); ?>"><?php _e( 'The Fee', 'mycred' ); ?></label>
1013
  <div>
1014
  <input type="text" size="8" name="mycred_pref_core[cashcreds][fees][types][<?php echo $key; ?>][amount]" id="<?php echo $this->field_id( array( 'fees', 'types', $key, 'amount' ) ); ?>" value="<?php echo esc_attr( $cashcred_prefs['fees']['types'][ $key ]['amount'] ); ?>" />
1015
  <select name="mycred_pref_core[cashcreds][fees][types][<?php echo $key; ?>][by]" id="<?php echo $this->field_id( array( 'fees', 'types', $key, 'by' ) ); ?>"><?php
@@ -1023,30 +1022,30 @@ jQuery(function($) {
1023
 
1024
  ?></select>
1025
  </div>
1026
- <p><span class="description"><?php _e( 'Use zero for no fee.', 'mycred' ); ?></span></p>
1027
  </div>
1028
  </div>
1029
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
1030
  <div class="form-group">
1031
- <label for="<?php echo $this->field_id( array( 'fees', 'types', $key, 'min_cap' ) ); ?>"><?php _e( 'Minimum Charge', 'mycred' ); ?></label>
1032
  <div><input type="text" size="8" name="mycred_pref_core[cashcreds][fees][types][<?php echo $key; ?>][min_cap]" id="<?php echo $this->field_id( array( 'fees', 'types', $key, 'min_cap' ) ); ?>" value="<?php echo esc_attr( $cashcred_prefs['fees']['types'][ $key ]['min_cap'] ); ?>" /> <?php echo $mycred->plural(); ?></div>
1033
- <p><span class="description"><?php _e( 'Option to set a minimum charge. If set, this amount is added on top of the fee. Example 2% fee + 1.30 points. Use zero to disable.', 'mycred' ); ?></span></p>
1034
  </div>
1035
  </div>
1036
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
1037
  <div class="form-group">
1038
- <label for="<?php echo $this->field_id( array( 'fees', 'types', $key, 'max_cap' ) ); ?>"><?php _e( 'Maximum Cap', 'mycred' ); ?></label>
1039
  <div><input type="text" size="8" name="mycred_pref_core[cashcreds][fees][types][<?php echo $key; ?>][max_cap]" id="<?php echo $this->field_id( array( 'fees', 'types', $key, 'max_cap' ) ); ?>" value="<?php echo esc_attr( $cashcred_prefs['fees']['types'][ $key ]['max_cap'] ); ?>" /> <?php echo $mycred->plural(); ?></div>
1040
- <p><span class="description"><?php _e( 'Optional maximum cap for transfer fees. Use zero to disable.', 'mycred' ); ?></span></p>
1041
  </div>
1042
  </div>
1043
  </div>
1044
  <div class="row">
1045
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
1046
  <div class="form-group">
1047
- <label for="<?php echo $this->field_id( array( 'fees', 'types', $key, 'presentation' ) ); ?>"><?php _e( 'Presentation', 'mycred' ); ?></label>
1048
  <input type="text" class="form-control" name="mycred_pref_core[cashcreds][fees][types][<?php echo $key; ?>][presentation]" id="<?php echo $this->field_id( array( 'fees', 'types', $key, 'presentation' ) ); ?>" value="<?php echo esc_attr( $cashcred_prefs['fees']['types'][ $key ]['presentation'] ); ?>" />
1049
- <p><span class="description"><?php _e( 'Option to set how fees are displayed to your users. Available template tags are: %fee%, %min% and %max% = %total%', 'mycred' ); ?></span></p>
1050
  </div>
1051
  </div>
1052
  </div>
342
  $format = '%s payment credited';
343
  $entry = sprintf($format, $gateway_name->label);
344
 
 
345
  mycred_subtract( 'cashcred_withdrawal', $user_id, -$points, $entry, $post_id , $log_data, $point_type );
346
 
347
  if($manual == true) {
753
 
754
  ?>
755
  <div class="wrap mycred-metabox" id="myCRED-wrap">
756
+ <h1><?php esc_html_e( 'cashCred Payment Gateways', 'mycred' ); ?></h1>
757
  <?php
758
 
759
  // Updated settings
794
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
795
  <div class="form-group">
796
  <div>&nbsp;</div>
797
+ <label for="cashcred-gateway-<?php echo $key; ?>"><input type="checkbox" name="mycred_pref_cashcreds[active][]" id="cashcred-gateway-<?php echo $key; ?>" value="<?php echo $key; ?>"<?php if ( $this->is_active( $key ) ) echo ' checked="checked"'; ?> /> <?php esc_html_e( 'Enable', 'mycred' ); ?></label>
798
  </div>
799
  </div>
800
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
801
  <?php if ( $has_test_mode ) : ?>
802
  <div class="form-group">
803
  <div>&nbsp;</div>
804
+ <label for="cashcred-gateway-<?php echo $key; ?>-sandbox"><input type="checkbox" name="mycred_pref_cashcreds[gateway_prefs][<?php echo $key; ?>][sandbox]" id="cashcred-gateway-<?php echo $key; ?>-sandbox" value="<?php echo $key; ?>"<?php if ( $sandbox_mode ) echo ' checked="checked"'; ?> /> <?php esc_html_e( 'Sandbox Mode', 'mycred' ); ?></label>
805
  </div>
806
  <?php endif; ?>
807
  </div>
809
  <?php if ( MYCRED_DEFAULT_LABEL === 'myCRED' && $has_documentation ) : ?>
810
  <div class="form-group">
811
  <div>&nbsp;</div>
812
+ <a href="<?php echo $has_documentation; ?>" target="_blank"><?php esc_html_e( 'Documentation', 'mycred' ); ?></a>
813
  </div>
814
  <?php endif; ?>
815
  </div>
959
  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
960
 
961
  <div class="form-group">
962
+ <label for="mycred_pref_core_cashcreds_debugging"><?php esc_html_e( 'Payment Debugging Log', 'mycred' ); ?></label>
963
  <select class="form-control" name="mycred_pref_core[cashcreds][debugging]" id="mycred_pref_core_cashcreds_debugging">
964
  <option value="disable" <?php echo $cashcred_prefs['debugging'] != 'enable' ? 'selected="selected"' : ''; ?>>Disabled</option>
965
  <option value="enable" <?php echo $cashcred_prefs['debugging'] == 'enable' ? 'selected="selected"' : ''; ?>>Enable</option>
966
  </select>
967
+ <p><span class="description"><?php esc_html_e( 'Payment Debugging log for developers.', 'mycred' ); ?></span></p>
968
  </div>
969
 
970
  </div>
971
  </div>
972
 
973
+ <h3><?php esc_html_e( 'Setup', 'mycred' ); ?></h3>
974
  <div class="row">
975
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
976
  <div class="form-group">
977
+ <label for="<?php echo $this->field_id( array( 'fees' => 'use' ) ); ?>"><input type="checkbox" name="mycred_pref_core[cashcreds][fees][use]" id="<?php echo $this->field_id( array( 'fees' => 'use' ) ); ?>"<?php checked( $cashcred_prefs['fees']['use'], 1 ); ?> value="1" /> <?php esc_html_e( 'Enable this feature', 'mycred' ); ?></label>
978
  </div>
979
  </div>
980
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
981
  <div class="form-group">
982
+ <label for="<?php echo $this->field_id( array( 'fees' => 'account' ) ); ?>"><?php esc_html_e( 'Fee Account', 'mycred' ); ?></label>
983
  <input type="text" class="form-control" name="mycred_pref_core[cashcreds][fees][account]" id="<?php echo $this->field_id( array( 'fees' => 'account' ) ); ?>" value="<?php echo esc_attr( $cashcred_prefs['fees']['account'] ); ?>" />
984
+ <p><span class="description"><?php esc_html_e( 'Option to deposit transfer fees into a specific users account. Use zero to disable.', 'mycred' ); ?></span></p>
985
  </div>
986
  </div>
987
  </div>
1008
  <div class="row">
1009
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
1010
  <div class="form-group">
1011
+ <label for="<?php echo $this->field_id( array( 'fees', 'types', $key, 'amount' ) ); ?>"><?php esc_html_e( 'The Fee', 'mycred' ); ?></label>
1012
  <div>
1013
  <input type="text" size="8" name="mycred_pref_core[cashcreds][fees][types][<?php echo $key; ?>][amount]" id="<?php echo $this->field_id( array( 'fees', 'types', $key, 'amount' ) ); ?>" value="<?php echo esc_attr( $cashcred_prefs['fees']['types'][ $key ]['amount'] ); ?>" />
1014
  <select name="mycred_pref_core[cashcreds][fees][types][<?php echo $key; ?>][by]" id="<?php echo $this->field_id( array( 'fees', 'types', $key, 'by' ) ); ?>"><?php
1022
 
1023
  ?></select>
1024
  </div>
1025
+ <p><span class="description"><?php esc_html_e( 'Use zero for no fee.', 'mycred' ); ?></span></p>
1026
  </div>
1027
  </div>
1028
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
1029
  <div class="form-group">
1030
+ <label for="<?php echo $this->field_id( array( 'fees', 'types', $key, 'min_cap' ) ); ?>"><?php esc_html_e( 'Minimum Charge', 'mycred' ); ?></label>
1031
  <div><input type="text" size="8" name="mycred_pref_core[cashcreds][fees][types][<?php echo $key; ?>][min_cap]" id="<?php echo $this->field_id( array( 'fees', 'types', $key, 'min_cap' ) ); ?>" value="<?php echo esc_attr( $cashcred_prefs['fees']['types'][ $key ]['min_cap'] ); ?>" /> <?php echo $mycred->plural(); ?></div>
1032
+ <p><span class="description"><?php esc_html_e( 'Option to set a minimum charge. If set, this amount is added on top of the fee. Example 2% fee + 1.30 points. Use zero to disable.', 'mycred' ); ?></span></p>
1033
  </div>
1034
  </div>
1035
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
1036
  <div class="form-group">
1037
+ <label for="<?php echo $this->field_id( array( 'fees', 'types', $key, 'max_cap' ) ); ?>"><?php esc_html_e( 'Maximum Cap', 'mycred' ); ?></label>
1038
  <div><input type="text" size="8" name="mycred_pref_core[cashcreds][fees][types][<?php echo $key; ?>][max_cap]" id="<?php echo $this->field_id( array( 'fees', 'types', $key, 'max_cap' ) ); ?>" value="<?php echo esc_attr( $cashcred_prefs['fees']['types'][ $key ]['max_cap'] ); ?>" /> <?php echo $mycred->plural(); ?></div>
1039
+ <p><span class="description"><?php esc_html_e( 'Optional maximum cap for transfer fees. Use zero to disable.', 'mycred' ); ?></span></p>
1040
  </div>
1041
  </div>
1042
  </div>
1043
  <div class="row">
1044
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
1045
  <div class="form-group">
1046
+ <label for="<?php echo $this->field_id( array( 'fees', 'types', $key, 'presentation' ) ); ?>"><?php esc_html_e( 'Presentation', 'mycred' ); ?></label>
1047
  <input type="text" class="form-control" name="mycred_pref_core[cashcreds][fees][types][<?php echo $key; ?>][presentation]" id="<?php echo $this->field_id( array( 'fees', 'types', $key, 'presentation' ) ); ?>" value="<?php echo esc_attr( $cashcred_prefs['fees']['types'][ $key ]['presentation'] ); ?>" />
1048
+ <p><span class="description"><?php esc_html_e( 'Option to set how fees are displayed to your users. Available template tags are: %fee%, %min% and %max% = %total%', 'mycred' ); ?></span></p>
1049
  </div>
1050
  </div>
1051
  </div>
addons/cash-creds/modules/cashcred-module-withdrawal.php CHANGED
@@ -108,7 +108,7 @@ if ( ! class_exists( 'cashCRED_Pending_Payments' ) ) :
108
  ?>
109
  <select name="Status" id="Status">
110
  <option value="all" <?php selected( 'all', $current_plugin ); ?>>
111
- <?php _e( 'All Status', 'mycred' ); ?>
112
  </option>
113
  <?php foreach( $status as $key => $value ) { ?>
114
  <option value="<?php echo esc_attr( $value ); ?>" <?php selected( $value, $current_plugin ); ?>>
@@ -124,7 +124,7 @@ if ( ! class_exists( 'cashCRED_Pending_Payments' ) ) :
124
  ?>
125
  <select name="gateway" id="gateway">
126
  <option value="all" <?php selected( 'all', $current_selected ); ?>>
127
- <?php _e( 'All Gateway', 'mycred' ); ?>
128
  </option>
129
  <?php
130
  foreach ( $mycred_modules['solo']['cashcred']->get() as $gateway_id => $info ) { ?>
@@ -142,7 +142,7 @@ if ( ! class_exists( 'cashCRED_Pending_Payments' ) ) :
142
  ?>
143
  <select name="user_id" id="user_id">
144
  <option value="all" <?php selected( 'all', $current_user ); ?>>
145
- <?php _e( 'All Users', 'mycred' ); ?>
146
  </option>
147
  <?php
148
  foreach ( $users as $user ) { ?>
@@ -923,20 +923,20 @@ if ( ! class_exists( 'cashCRED_Pending_Payments' ) ) :
923
 
924
  <select name="status">
925
  <option value="Pending" <?php echo $status == "Pending" ? "selected" : "" ?>>
926
- <?php _e('Pending', 'cashcred'); ?>
927
  </option>
928
  <option value="Approved" <?php echo $status == "Approved" ? "selected" : "" ?>>
929
- <?php _e('Approved', 'cashcred'); ?>
930
  </option>
931
  <option value="Cancelled" <?php echo $status == "Cancelled" ? "selected" : "" ?>>
932
- <?php _e('Cancelled', 'cashcred'); ?>
933
  </option>
934
  </select>
935
 
936
  </div>
937
 
938
  <div>
939
- <a href="<?php echo $delete_url; ?>" class="button button-secondary button-block"><?php _e( 'Trash', 'mycred' ); ?></a>
940
  </div>
941
 
942
  </div>
@@ -948,7 +948,7 @@ if ( ! class_exists( 'cashCRED_Pending_Payments' ) ) :
948
  <div id="publishing-action">
949
  <span class="spinner"></span>
950
 
951
- <input type="submit" id="publish" class="button button-primary primary button-large" value="<?php _e( 'Save Changes', 'mycred' ); ?>" />
952
 
953
  </div>
954
  <div class="clear"></div>
@@ -1015,7 +1015,7 @@ if ( ! class_exists( 'cashCRED_Pending_Payments' ) ) :
1015
  <div class="row">
1016
  <div class="col-md-2 col-sm-6">
1017
  <div class="form-group">
1018
- <label for="cashcred-pending-payment-point_type"><?php _e( 'Point Type', 'mycred' ); ?></label>
1019
 
1020
  <select name="cashcred_pending_payment[point_type]" <?php echo $disabled; ?> id="cashcred-pending-payment-point_type" class="form-control disabled_fields">
1021
  <?php
@@ -1035,7 +1035,7 @@ if ( ! class_exists( 'cashCRED_Pending_Payments' ) ) :
1035
  </div>
1036
  <div class="col-md-2 col-sm-6">
1037
  <div class="form-group">
1038
- <label for="cashcred-pending-payment-gateway"><?php _e( 'Gateway', 'mycred' ); ?></label>
1039
  <select name="cashcred_pending_payment[gateway]" <?php echo $disabled; ?> id="cashcred-pending-payment-gateway" class="form-control disabled_fields">
1040
  <?php
1041
 
@@ -1054,7 +1054,7 @@ if ( ! class_exists( 'cashCRED_Pending_Payments' ) ) :
1054
  </div>
1055
  <div class="<?php echo $cashcred_setting['fees']['use'] == 1 ? 'col-md-1 col-sm-5' : 'col-md-2 col-sm-6' ?>">
1056
  <div class="form-group">
1057
- <label for="cashcred-pending-payment-points"><?php _e( 'Points', 'mycred' ); ?></label>
1058
  <input type="text" <?php echo $readonly; ?> name="cashcred_pending_payment[points]" id="cashcred-pending-payment-points" class="form-control readonly_fields" value="<?php echo $mycred->number( $pending_payment->points ); ?>" />
1059
  </div>
1060
  </div>
@@ -1064,7 +1064,7 @@ if ( ! class_exists( 'cashCRED_Pending_Payments' ) ) :
1064
  if( $cashcred_setting['fees']['use'] == 1 ) { ?>
1065
  <div class="col-md-1 col-sm-5">
1066
  <div class="form-group">
1067
- <label for="cashcred-pending-payment-fee"><?php _e( 'Fee', 'mycred' ); ?></label>
1068
  <input type="text" <?php echo $readonly; ?> name="cashcred_pending_payment[fee]" id="cashcred-pending-payment-fee" class="form-control readonly_fields" value="<?php echo esc_attr( $fee ); ?>" readonly/>
1069
  </div>
1070
  </div><?php
@@ -1073,13 +1073,13 @@ if ( ! class_exists( 'cashCRED_Pending_Payments' ) ) :
1073
  ?>
1074
  <div class="<?php echo $cashcred_setting['fees']['use'] == 1 ? 'col-md-1 col-sm-5' : 'col-md-2 col-sm-6'; ?>">
1075
  <div class="form-group">
1076
- <label for="cashcred-pending-payment-cost"><?php _e( 'Cost', 'mycred' ); ?></label>
1077
  <input type="text" <?php echo $readonly; ?> name="cashcred_pending_payment[cost]" id="cashcred-pending-payment-cost" class="form-control readonly_fields" value="<?php echo esc_attr( $pending_payment->cost ); ?>" />
1078
  </div>
1079
  </div>
1080
  <div class="<?php echo $cashcred_setting['fees']['use'] == 1 ? 'col-md-1 col-sm-5' : 'col-md-2 col-sm-6'; ?>">
1081
  <div class="form-group">
1082
- <label for="cashcred-pending-payment-currency"><?php _e( 'Currency', 'mycred' ); ?></label>
1083
  <input type="text" <?php echo $readonly; ?> name="cashcred_pending_payment[currency]" id="cashcred-pending-payment-currency" class="form-control readonly_fields" value="<?php echo esc_attr( $pending_payment->currency ); ?>" />
1084
  </div>
1085
  </div>
108
  ?>
109
  <select name="Status" id="Status">
110
  <option value="all" <?php selected( 'all', $current_plugin ); ?>>
111
+ <?php esc_html_e( 'All Status', 'mycred' ); ?>
112
  </option>
113
  <?php foreach( $status as $key => $value ) { ?>
114
  <option value="<?php echo esc_attr( $value ); ?>" <?php selected( $value, $current_plugin ); ?>>
124
  ?>
125
  <select name="gateway" id="gateway">
126
  <option value="all" <?php selected( 'all', $current_selected ); ?>>
127
+ <?php esc_html_e( 'All Gateway', 'mycred' ); ?>
128
  </option>
129
  <?php
130
  foreach ( $mycred_modules['solo']['cashcred']->get() as $gateway_id => $info ) { ?>
142
  ?>
143
  <select name="user_id" id="user_id">
144
  <option value="all" <?php selected( 'all', $current_user ); ?>>
145
+ <?php esc_html_e( 'All Users', 'mycred' ); ?>
146
  </option>
147
  <?php
148
  foreach ( $users as $user ) { ?>
923
 
924
  <select name="status">
925
  <option value="Pending" <?php echo $status == "Pending" ? "selected" : "" ?>>
926
+ <?php esc_html_e('Pending', 'cashcred'); ?>
927
  </option>
928
  <option value="Approved" <?php echo $status == "Approved" ? "selected" : "" ?>>
929
+ <?php esc_html_e('Approved', 'cashcred'); ?>
930
  </option>
931
  <option value="Cancelled" <?php echo $status == "Cancelled" ? "selected" : "" ?>>
932
+ <?php esc_html_e('Cancelled', 'cashcred'); ?>
933
  </option>
934
  </select>
935
 
936
  </div>
937
 
938
  <div>
939
+ <a href="<?php echo $delete_url; ?>" class="button button-secondary button-block"><?php esc_html_e( 'Trash', 'mycred' ); ?></a>
940
  </div>
941
 
942
  </div>
948
  <div id="publishing-action">
949
  <span class="spinner"></span>
950
 
951
+ <input type="submit" id="publish" class="button button-primary primary button-large" value="<?php esc_attr_e( 'Save Changes', 'mycred' ); ?>" />
952
 
953
  </div>
954
  <div class="clear"></div>
1015
  <div class="row">
1016
  <div class="col-md-2 col-sm-6">
1017
  <div class="form-group">
1018
+ <label for="cashcred-pending-payment-point_type"><?php esc_html_e( 'Point Type', 'mycred' ); ?></label>
1019
 
1020
  <select name="cashcred_pending_payment[point_type]" <?php echo $disabled; ?> id="cashcred-pending-payment-point_type" class="form-control disabled_fields">
1021
  <?php
1035
  </div>
1036
  <div class="col-md-2 col-sm-6">
1037
  <div class="form-group">
1038
+ <label for="cashcred-pending-payment-gateway"><?php esc_html_e( 'Gateway', 'mycred' ); ?></label>
1039
  <select name="cashcred_pending_payment[gateway]" <?php echo $disabled; ?> id="cashcred-pending-payment-gateway" class="form-control disabled_fields">
1040
  <?php
1041
 
1054
  </div>
1055
  <div class="<?php echo $cashcred_setting['fees']['use'] == 1 ? 'col-md-1 col-sm-5' : 'col-md-2 col-sm-6' ?>">
1056
  <div class="form-group">
1057
+ <label for="cashcred-pending-payment-points"><?php esc_html_e( 'Points', 'mycred' ); ?></label>
1058
  <input type="text" <?php echo $readonly; ?> name="cashcred_pending_payment[points]" id="cashcred-pending-payment-points" class="form-control readonly_fields" value="<?php echo $mycred->number( $pending_payment->points ); ?>" />
1059
  </div>
1060
  </div>
1064
  if( $cashcred_setting['fees']['use'] == 1 ) { ?>
1065
  <div class="col-md-1 col-sm-5">
1066
  <div class="form-group">
1067
+ <label for="cashcred-pending-payment-fee"><?php esc_html_e( 'Fee', 'mycred' ); ?></label>
1068
  <input type="text" <?php echo $readonly; ?> name="cashcred_pending_payment[fee]" id="cashcred-pending-payment-fee" class="form-control readonly_fields" value="<?php echo esc_attr( $fee ); ?>" readonly/>
1069
  </div>
1070
  </div><?php
1073
  ?>
1074
  <div class="<?php echo $cashcred_setting['fees']['use'] == 1 ? 'col-md-1 col-sm-5' : 'col-md-2 col-sm-6'; ?>">
1075
  <div class="form-group">
1076
+ <label for="cashcred-pending-payment-cost"><?php esc_html_e( 'Cost', 'mycred' ); ?></label>
1077
  <input type="text" <?php echo $readonly; ?> name="cashcred_pending_payment[cost]" id="cashcred-pending-payment-cost" class="form-control readonly_fields" value="<?php echo esc_attr( $pending_payment->cost ); ?>" />
1078
  </div>
1079
  </div>
1080
  <div class="<?php echo $cashcred_setting['fees']['use'] == 1 ? 'col-md-1 col-sm-5' : 'col-md-2 col-sm-6'; ?>">
1081
  <div class="form-group">
1082
+ <label for="cashcred-pending-payment-currency"><?php esc_html_e( 'Currency', 'mycred' ); ?></label>
1083
  <input type="text" <?php echo $readonly; ?> name="cashcred_pending_payment[currency]" id="cashcred-pending-payment-currency" class="form-control readonly_fields" value="<?php echo esc_attr( $pending_payment->currency ); ?>" />
1084
  </div>
1085
  </div>
addons/coupons/includes/mycred-coupon-shortcodes.php CHANGED
@@ -30,9 +30,9 @@ if ( ! function_exists( 'mycred_render_shortcode_load_coupon' ) ) :
30
  $output = '<div class="mycred-coupon-form">';
31
 
32
  // On submits
33
- if ( isset( $_POST['mycred_coupon_load']['token'] ) && wp_verify_nonce( $_POST['mycred_coupon_load']['token'], 'mycred-load-coupon' . $user_id ) ) {
34
 
35
- $coupon_code = sanitize_text_field( $_POST['mycred_coupon_load']['couponkey'] );
36
  $coupon_post = mycred_get_coupon_post( $coupon_code );
37
  if ( isset( $coupon_post->ID ) ) {
38
 
30
  $output = '<div class="mycred-coupon-form">';
31
 
32
  // On submits
33
+ if ( isset( $_POST['mycred_coupon_load']['token'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['mycred_coupon_load']['token'] ) ), 'mycred-load-coupon' . $user_id ) ) {
34
 
35
+ $coupon_code = isset( $_POST['mycred_coupon_load']['couponkey'] ) ? sanitize_text_field( wp_unslash( $_POST['mycred_coupon_load']['couponkey'] ) ) : '';
36
  $coupon_post = mycred_get_coupon_post( $coupon_code );
37
  if ( isset( $coupon_post->ID ) ) {
38
 
addons/coupons/myCRED-addon-coupons.php CHANGED
@@ -185,7 +185,7 @@ if ( ! class_exists( 'myCRED_Coupons_Module' ) ) :
185
 
186
  global $pagenow;
187
 
188
- if ( isset( $_GET['post'] ) && mycred_get_post_type( $_GET['post'] ) == MYCRED_COUPON_KEY && isset( $_GET['action'] ) && $_GET['action'] == 'edit' )
189
  return MYCRED_MAIN_SLUG;
190
 
191
  if ( $pagenow == 'post-new.php' && isset( $_GET['post_type'] ) && $_GET['post_type'] == MYCRED_COUPON_KEY )
@@ -210,7 +210,7 @@ if ( ! class_exists( 'myCRED_Coupons_Module' ) ) :
210
 
211
  }
212
 
213
- elseif ( $pagenow == 'post.php' && isset( $_GET['post'] ) && get_post_type( $_GET['post'] ) == MYCRED_COUPON_KEY ) {
214
 
215
  return 'edit.php?post_type=' . MYCRED_COUPON_KEY;
216
 
@@ -275,7 +275,7 @@ if ( ! class_exists( 'myCRED_Coupons_Module' ) ) :
275
 
276
  $mycred = mycred( $coupon->point_type );
277
 
278
- echo $mycred->format_creds( $coupon->value );
279
 
280
  break;
281
 
@@ -293,7 +293,7 @@ if ( ! class_exists( 'myCRED_Coupons_Module' ) ) :
293
  $page .= '_' . $set_type;
294
 
295
  $url = add_query_arg( array( 'page' => $page, 'ref' => 'coupon', 'ref_id' => $post_id ), admin_url( 'admin.php' ) );
296
- echo '<a href="' . esc_url( $url ) . '">' . sprintf( _n( '1 time', '%d times', $coupon->used, 'mycred' ), $coupon->used ) . '</a>';
297
 
298
  }
299
 
@@ -301,7 +301,7 @@ if ( ! class_exists( 'myCRED_Coupons_Module' ) ) :
301
 
302
  case 'limits' :
303
 
304
- printf( '%1$s: %2$d<br />%3$s: %4$d', __( 'Total', 'mycred' ), $coupon->max_global, __( 'Per User', 'mycred' ), $coupon->max_user );
305
 
306
  break;
307
 
@@ -316,13 +316,13 @@ if ( ! class_exists( 'myCRED_Coupons_Module' ) ) :
316
 
317
  mycred_trash_post( $post_id );
318
 
319
- echo '<span style="color:red;">' . __( 'Expired', 'mycred' ) . '</span>';
320
 
321
  }
322
 
323
  else {
324
 
325
- echo sprintf( __( 'In %s time', 'mycred' ), human_time_diff( $coupon->expires_unix ) ) . '<br /><small class="description">' . date( get_option( 'date_format' ), $coupon->expires_unix ) . '</small>';
326
 
327
  }
328
 
@@ -333,7 +333,7 @@ if ( ! class_exists( 'myCRED_Coupons_Module' ) ) :
333
  case 'ctype' :
334
 
335
  if ( isset( $this->point_types[ $coupon->point_type ] ) )
336
- echo $this->point_types[ $coupon->point_type ];
337
 
338
  else
339
  echo '-';
@@ -489,7 +489,7 @@ if ( ! class_exists( 'myCRED_Coupons_Module' ) ) :
489
 
490
  mycred_delete_post_meta( $post_id, '_warning_bad_expiration' );
491
 
492
- echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Warning. The previous expiration date set for this coupon was formatted incorrectly and was deleted. If you still want the coupon to expire, please enter a new date or leave empty to disable.', 'mycred' ) . '</p><button type="button" class="notice-dismiss"></button></div>';
493
 
494
  }
495
 
@@ -516,32 +516,32 @@ if ( ! class_exists( 'myCRED_Coupons_Module' ) ) :
516
  <div class="row">
517
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
518
  <div class="form-group">
519
- <label for=""><?php _e( 'Value', 'mycred' ); ?></label>
520
- <input type="text" name="mycred_coupon[value]" class="form-control" id="mycred-coupon-value" value="<?php echo $mycred->number( $coupon->value ); ?>" />
521
- <span class="description"><?php echo $mycred->template_tags_general( __( 'The amount of %plural% a user receives when redeeming this coupon.', 'mycred' ) ); ?></span>
522
  </div>
523
  </div>
524
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
525
  <div class="form-group">
526
- <label for=""><?php _e( 'Point Type', 'mycred' ); ?></label>
527
  <?php if ( count( $this->point_types ) > 1 ) : ?>
528
 
529
  <?php mycred_types_select_from_dropdown( 'mycred_coupon[type]', 'mycred-coupon-type', $coupon->point_type, false, ' class="form-control"' ); ?><br />
530
- <span class="description"><?php _e( 'Select the point type that this coupon is applied.', 'mycred' ); ?></span>
531
 
532
  <?php else : ?>
533
 
534
- <p class="form-control-static"><?php echo $mycred->plural(); ?></p>
535
- <input type="hidden" name="mycred_coupon[type]" value="<?php echo MYCRED_DEFAULT_TYPE_KEY; ?>" />
536
 
537
  <?php endif; ?>
538
  </div>
539
  </div>
540
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
541
  <div class="form-group">
542
- <label for=""><?php _e( 'Expire', 'mycred' ); ?></label>
543
  <input type="text" name="mycred_coupon[expires]" class="form-control" id="mycred-coupon-expire" maxlength="10" value="<?php echo esc_attr( $coupon->expires ); ?>" placeholder="YYYY-MM-DD" />
544
- <span class="description"><?php _e( 'Optional date when this coupon expires. Expired coupons will be trashed.', 'mycred' ); ?></span>
545
  </div>
546
  </div>
547
  </div>
@@ -569,16 +569,16 @@ if ( ! class_exists( 'myCRED_Coupons_Module' ) ) :
569
  <div class="row">
570
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
571
  <div class="form-group">
572
- <label for="mycred-coupon-global"><?php _e( 'Global Maximum', 'mycred' ); ?></label>
573
  <input type="text" name="mycred_coupon[global]" class="form-control" id="mycred-coupon-global" value="<?php echo absint( $coupon->max_global ); ?>" />
574
- <span class="description"><?php _e( 'The maximum number of times this coupon can be used in total. Once this is reached, the coupon is automatically trashed. If 0 is selected then the coupon will not work and will automatically expire. For more info please read the <a href="https://codex.mycred.me/chapter-iii/coupons/creating-coupons/">Description</a>', 'mycred' ); ?></span>
575
  </div>
576
  </div>
577
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
578
  <div class="form-group">
579
- <label for="mycred-coupon-user"><?php _e( 'User Maximum', 'mycred' ); ?></label>
580
  <input type="text" name="mycred_coupon[user]" class="form-control" id="mycred-coupon-user" value="<?php echo absint( $coupon->max_user ); ?>" />
581
- <span class="description"><?php _e( 'The maximum number of times this coupon can be used by a user. If 0 is selected then the coupon will not work.', 'mycred' ); ?></span>
582
  </div>
583
  </div>
584
  </div>
@@ -606,24 +606,24 @@ if ( ! class_exists( 'myCRED_Coupons_Module' ) ) :
606
  <div class="row">
607
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
608
  <div class="form-group">
609
- <label for="mycred-coupon-min_balance"><?php _e( 'Minimum Balance', 'mycred' ); ?></label>
610
  <div>
611
- <input type="text" name="mycred_coupon[min_balance]" <?php if ( count( $this->point_types ) > 1 ) echo 'size="8"'; else echo ' style="width: 99%;"'; ?> id="mycred-coupon-min_balance" value="<?php echo $mycred->number( $coupon->requires_min['value'] ); ?>" />
612
  <?php echo mycred_types_select_from_dropdown( 'mycred_coupon[min_balance_type]', 'mycred-coupon-min_balance_type', $coupon->requires_min_type, true, ' style="vertical-align: top;"' ); ?>
613
  </div>
614
- <span class="description"><?php _e( 'Optional minimum balance a user must have in order to use this coupon. Use zero to disable.', 'mycred' ); ?></span>
615
  </div>
616
  </div>
617
  </div>
618
  <div class="row">
619
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
620
  <div class="form-group">
621
- <label for="mycred-coupon-max_balance"><?php _e( 'Maximum Balance', 'mycred' ); ?></label>
622
  <div>
623
  <input type="text" name="mycred_coupon[max_balance]" <?php if ( count( $this->point_types ) > 1 ) echo 'size="8"'; else echo ' style="width: 99%;"'; ?> id="mycred-coupon-max_balance" value="<?php echo $mycred->number( $coupon->requires_max['value'] ); ?>" />
624
  <?php echo mycred_types_select_from_dropdown( 'mycred_coupon[max_balance_type]', 'mycred-coupon-max_balance_type', $coupon->requires_max_type, true, ' style="vertical-align: top;"' ); ?>
625
  </div>
626
- <span class="description"><?php _e( 'Optional maximum balance a user can have in order to use this coupon. Use zero to disable.', 'mycred' ); ?></span>
627
  </div>
628
  </div>
629
  </div>
@@ -658,18 +658,18 @@ if ( ! class_exists( 'myCRED_Coupons_Module' ) ) :
658
  <div class="mycred-border" >
659
  <div class="row">
660
  <div class="mycred-title"><button type="button" class="dashicons-before dashicons-no-alt close-button" ></button><?php
661
- _e( 'Reward', 'mycred' ); ?>
662
  </div>
663
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
664
  <div class="form-group">
665
- <label for="mycred-select-coupon-reward"><?php _e( 'Select Reward Type : ', 'mycred' ); ?></label>
666
  <div class="mycred-select-coupon-reward" >
667
  <select name="mycred_coupon[reward][types][]" class="mycred-select-coupon-rewards"><?php
668
  if( class_exists( 'myCRED_Badge' ) && ( empty( $ranks ) || ! empty( $badge_id ) ) ){ ?>
669
- <option value="mycred_coupon_badges" ><?php _e( 'Badges', 'mycred' ); ?></option>
670
  <?php }
671
  if( class_exists( 'myCRED_Ranks_Module' ) && $manual_rank && ( ! empty( $ranks ) || empty( $badge_id ) ) ) { ?>
672
- <option value="mycred_coupon_ranks" ><?php _e( 'Ranks', 'mycred' ); ?></option>
673
  <?php } ?>
674
  </select>
675
  </div>
@@ -681,19 +681,19 @@ if ( ! class_exists( 'myCRED_Coupons_Module' ) ) :
681
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
682
  <div class="form-group">
683
  <div class="ids show-badges" >
684
- <label for="mycred-select-coupon" id="change-text"><?php echo class_exists( 'myCRED_Badge' ) && ( empty( $ranks ) || ! empty( $badge_id ) ) ? _e( 'Badges : ', 'mycred' ) : _e( 'Ranks : ', 'mycred' ); ?></label>
685
  <div class="mycred-select-coupon"><?php
686
  if( ! empty( $badge_id ) || ! empty( $ranks ) ){?>
687
  <select name="mycred_coupon[reward][ids][]" class="mycred-select-ids"><?php
688
  if( class_exists( 'myCRED_Badge' ) ) {
689
  foreach ($badge_id as $key => $value) {
690
  $badges = mycred_get_badge( $value );?>
691
- <option value="<?php echo $value ?>" ><?php _e( $badges->title ) ?></option><?php
692
  }
693
  }
694
  if( class_exists( 'myCRED_Ranks_Module' ) && empty($badge_id) ) {
695
  foreach ( $ranks as $key => $value ) { ?>
696
- <option value="<?php echo $value->post_id ?>"><?php _e( $value->post->post_title ) ?></option><?php
697
  }
698
  }?>
699
  </select><?php
@@ -709,7 +709,7 @@ if ( ! class_exists( 'myCRED_Coupons_Module' ) ) :
709
 
710
  <div class="mycred-badge-rank-hide-show">
711
  <div class="mycred-switch">
712
- <label><strong><?php _e( 'Enable this to assign badge/ranks through coupon.', 'mycred' ); ?></strong></label>
713
  <label class="mycred-switch1">
714
  <input type="checkbox" id="mycred-check" name="mycred_coupon[check]" <?php echo $enable_disable == true ? 'checked' : ''; ?>>
715
  <span class="slider round"></span>
@@ -718,14 +718,15 @@ if ( ! class_exists( 'myCRED_Coupons_Module' ) ) :
718
  </div>
719
  <div class="form mycred-coupon-form" <?php echo $enable_disable == true ? 'style="display: block;"' : 'style="display: none;"' ?> >
720
  <label class="mycred-rank-msg">
721
- <strong><?php _e( 'You can only assign Ranks when Ranks are set to Manual Mode.: ', 'mycred' ); ?></strong>
722
  </label><?php
723
 
724
- if( ! empty( $types_ids ) ){
725
  foreach ( $types_ids[0] as $keys => $values ) {
726
  echo $this->mycred_coupon_badge_rank_html( $values['types'], $values['ids'], $manual_rank );
727
  }
728
- }else {
 
729
  echo $html;
730
  }?>
731
 
@@ -755,11 +756,11 @@ if ( ! class_exists( 'myCRED_Coupons_Module' ) ) :
755
  <div class="mycred-border" >
756
  <div class="row">
757
  <div class="mycred-title"><button type="button" class="dashicons-before dashicons-no-alt close-button" ></button><?php
758
- _e( 'Reward', 'mycred' ); ?>
759
  </div>
760
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
761
  <div class="form-group">
762
- <label for="mycred-select-coupon-reward"><?php _e( 'Select Reward Type : ', 'mycred' ); ?></label>
763
  <div class="mycred-select-coupon-reward">
764
  <select name="mycred_coupon[reward][types][]" class="mycred-select-coupon-rewards"><?php
765
 
@@ -768,7 +769,7 @@ if ( ! class_exists( 'myCRED_Coupons_Module' ) ) :
768
  if ( $types == 'mycred_coupon_badges' ) $selected_type = 'badge';
769
 
770
  ?>
771
- <option value="mycred_coupon_badges" <?php echo $types == 'mycred_coupon_badges' ? 'selected="selected"' : ''; ?>><?php _e( 'Badges', 'mycred' ); ?></option>
772
  <?php }
773
  else {
774
  if ( $types == 'mycred_coupon_badges' && class_exists( 'myCRED_Ranks_Module' ) && $manual_rank ) $selected_type = 'rank';
@@ -777,7 +778,7 @@ if ( ! class_exists( 'myCRED_Coupons_Module' ) ) :
777
 
778
  if ( $types == 'mycred_coupon_ranks' ) $selected_type = 'rank';
779
  ?>
780
- <option value="mycred_coupon_ranks" <?php echo $types == 'mycred_coupon_ranks' ? 'selected="selected"' : ''; ?>><?php _e( 'Ranks', 'mycred' ); ?></option>
781
  <?php }
782
  else{
783
  if ( $types == 'mycred_coupon_ranks' && class_exists( 'myCRED_Badge' ) ) $selected_type = 'badge';
@@ -795,7 +796,7 @@ if ( ! class_exists( 'myCRED_Coupons_Module' ) ) :
795
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
796
  <div class="form-group">
797
  <div class="ids show-badges" >
798
- <label for="mycred-select-coupon" id="change-text"><?php ( ! empty( $badge_id ) && $types == 'mycred_coupon_badges' ) ? _e( 'Badges : ', 'mycred' ) : _e( 'Ranks : ', 'mycred' ); ?></label>
799
  <div class="mycred-select-coupon"><?php
800
 
801
  if( ! empty( $badge_id ) || ! empty( $ranks ) ){?>
@@ -805,12 +806,12 @@ if ( ! class_exists( 'myCRED_Coupons_Module' ) ) :
805
  if( $selected_type == 'badge' ){
806
  foreach ($badge_id as $key => $value) {
807
  $badges = mycred_get_badge( $value );?>
808
- <option value="<?php echo $value ?>" <?php echo $ids == $value ? 'selected="selected"' : ''; ?>><?php _e( $badges->title ) ?></option><?php
809
  }
810
  }elseif( $selected_type == 'rank' ) {
811
 
812
  foreach ( $ranks as $key => $value ) { ?>
813
- <option value="<?php echo $value->post_id ?>" <?php echo $ids == $value->post_id ? 'selected="selected"' : ''; ?>><?php _e( $value->post->post_title ) ?></option><?php
814
  }
815
  }
816
  ?>
@@ -970,22 +971,22 @@ if ( ! class_exists( 'myCRED_Coupons_Module' ) ) :
970
  $prefs = mycred_apply_defaults( $this->default_prefs, $this->coupons );
971
 
972
  ?>
973
- <h4><span class="dashicons dashicons-admin-plugins static"></span><?php _e( 'Coupons', 'mycred' ); ?></h4>
974
  <div class="body" style="display:none;">
975
 
976
- <h3><?php _e( 'Message Templates', 'mycred' ); ?></h3>
977
  <div class="row">
978
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
979
  <div class="form-group">
980
- <label for="<?php echo $this->field_id( 'invalid' ); ?>"><?php _e( 'Invalid Coupon Message', 'mycred' ); ?></label>
981
- <input type="text" name="<?php echo $this->field_name( 'invalid' ); ?>" id="<?php echo $this->field_id( 'invalid' ); ?>" class="form-control" placeholder="<?php _e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['invalid'] ); ?>" />
982
  <p><span class="description"><?php printf( '%s %s', __( 'Message to show when users try to use a coupon that does not exists.', 'mycred' ), $this->available_template_tags( array( 'general' ) ) ); ?></span></p>
983
  </div>
984
  </div>
985
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
986
  <div class="form-group">
987
- <label for="<?php echo $this->field_id( 'expired' ); ?>"><?php _e( 'Expired Coupon Message', 'mycred' ); ?></label>
988
- <input type="text" name="<?php echo $this->field_name( 'expired' ); ?>" id="<?php echo $this->field_id( 'expired' ); ?>" class="form-control" placeholder="<?php _e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['expired'] ); ?>" />
989
  <p><span class="description"><?php printf( '%s %s', __( 'Message to show when users try to use that has expired.', 'mycred' ), $this->available_template_tags( array( 'general' ) ) ); ?></span></p>
990
  </div>
991
  </div>
@@ -993,15 +994,15 @@ if ( ! class_exists( 'myCRED_Coupons_Module' ) ) :
993
  <div class="row">
994
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
995
  <div class="form-group">
996
- <label for="<?php echo $this->field_id( 'min' ); ?>"><?php _e( 'Minimum Balance Message', 'mycred' ); ?></label>
997
- <input type="text" name="<?php echo $this->field_name( 'min' ); ?>" id="<?php echo $this->field_id( 'min' ); ?>" class="form-control" placeholder="<?php _e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['min'] ); ?>" />
998
  <p><span class="description"><?php printf( '%s %s', __( 'Message to show when a user does not meet the minimum balance requirement. (if used)', 'mycred' ), $this->available_template_tags( array( 'general' ) ) ); ?></span></p>
999
  </div>
1000
  </div>
1001
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1002
  <div class="form-group">
1003
- <label for="<?php echo $this->field_id( 'max' ); ?>"><?php _e( 'Maximum Balance Message', 'mycred' ); ?></label>
1004
- <input type="text" name="<?php echo $this->field_name( 'max' ); ?>" id="<?php echo $this->field_id( 'max' ); ?>" class="form-control" placeholder="<?php _e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['max'] ); ?>" />
1005
  <p><span class="description"><?php printf( '%s %s', __( 'Message to show when a user does not meet the maximum balance requirement. (if used)', 'mycred' ), $this->available_template_tags( array( 'general' ) ) ); ?></span></p>
1006
  </div>
1007
  </div>
@@ -1009,15 +1010,15 @@ if ( ! class_exists( 'myCRED_Coupons_Module' ) ) :
1009
  <div class="row">
1010
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1011
  <div class="form-group">
1012
- <label for="<?php echo $this->field_id( 'user_limit' ); ?>"><?php _e( 'User Limit Message', 'mycred' ); ?></label>
1013
- <input type="text" name="<?php echo $this->field_name( 'user_limit' ); ?>" id="<?php echo $this->field_id( 'user_limit' ); ?>" class="form-control" placeholder="<?php _e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['user_limit'] ); ?>" />
1014
  <p><span class="description"><?php printf( '%s %s', __( 'Message to show when the user limit has been reached for the coupon.', 'mycred' ), $this->available_template_tags( array( 'general' ) ) ); ?></span></p>
1015
  </div>
1016
  </div>
1017
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1018
  <div class="form-group">
1019
- <label for="<?php echo $this->field_id( 'excluded' ); ?>"><?php _e( 'Excluded Message', 'mycred' ); ?></label>
1020
- <input type="text" name="<?php echo $this->field_name( 'excluded' ); ?>" id="<?php echo $this->field_id( 'excluded' ); ?>" class="form-control" placeholder="<?php _e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['excluded'] ); ?>" />
1021
  <p><span class="description"><?php printf( '%s %s', __( 'Message to show when a user is excluded from the point type the coupon gives.', 'mycred' ), $this->available_template_tags( array( 'general' ) ) ); ?></span></p>
1022
  </div>
1023
  </div>
@@ -1025,15 +1026,15 @@ if ( ! class_exists( 'myCRED_Coupons_Module' ) ) :
1025
  <div class="row">
1026
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1027
  <div class="form-group">
1028
- <label for="<?php echo $this->field_id( 'success' ); ?>"><?php _e( 'Success Message', 'mycred' ); ?></label>
1029
- <input type="text" name="<?php echo $this->field_name( 'success' ); ?>" id="<?php echo $this->field_id( 'success' ); ?>" class="form-control" placeholder="<?php _e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['success'] ); ?>" />
1030
  <p><span class="description"><?php printf( '%s %s', __( 'Message to show when a coupon was successfully deposited to a users account.', 'mycred' ), $this->available_template_tags( array( 'general', 'amount' ) ) ); ?></span></p>
1031
  </div>
1032
  </div>
1033
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1034
  <div class="form-group">
1035
- <label for="<?php echo $this->field_id( 'log' ); ?>"><?php _e( 'Log Template', 'mycred' ); ?></label>
1036
- <input type="text" name="<?php echo $this->field_name( 'log' ); ?>" id="<?php echo $this->field_id( 'log' ); ?>" class="form-control" placeholder="<?php _e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['log'] ); ?>" />
1037
  <p><span class="description"><?php printf( '%s %s', __( 'Log entry for successful coupon redemption. Use %coupon% to show the coupon code.', 'mycred' ), $this->available_template_tags( array( 'general', 'amount' ) ) ); ?></span></p>
1038
  </div>
1039
  </div>
185
 
186
  global $pagenow;
187
 
188
+ if ( isset( $_GET['post'] ) && mycred_get_post_type( sanitize_key( wp_unslash( $_GET['post'] ) ) ) == MYCRED_COUPON_KEY && isset( $_GET['action'] ) && $_GET['action'] == 'edit' )
189
  return MYCRED_MAIN_SLUG;
190
 
191
  if ( $pagenow == 'post-new.php' && isset( $_GET['post_type'] ) && $_GET['post_type'] == MYCRED_COUPON_KEY )
210
 
211
  }
212
 
213
+ elseif ( $pagenow == 'post.php' && isset( $_GET['post'] ) && get_post_type( sanitize_key( wp_unslash( $_GET['post'] ) ) ) == MYCRED_COUPON_KEY ) {
214
 
215
  return 'edit.php?post_type=' . MYCRED_COUPON_KEY;
216
 
275
 
276
  $mycred = mycred( $coupon->point_type );
277
 
278
+ echo esc_html( $mycred->format_creds( $coupon->value ) );
279
 
280
  break;
281
 
293
  $page .= '_' . $set_type;
294
 
295
  $url = add_query_arg( array( 'page' => $page, 'ref' => 'coupon', 'ref_id' => $post_id ), admin_url( 'admin.php' ) );
296
+ echo '<a href="' . esc_url( $url ) . '">' . esc_html( sprintf( _n( '1 time', '%d times', $coupon->used, 'mycred' ), $coupon->used ) ). '</a>';
297
 
298
  }
299
 
301
 
302
  case 'limits' :
303
 
304
+ printf( '%1$s: %2$d<br />%3$s: %4$d', esc_html__( 'Total', 'mycred' ), intval( $coupon->max_global ), esc_html__( 'Per User', 'mycred' ), intval( $coupon->max_user ) );
305
 
306
  break;
307
 
316
 
317
  mycred_trash_post( $post_id );
318
 
319
+ echo '<span style="color:red;">' . esc_html__( 'Expired', 'mycred' ) . '</span>';
320
 
321
  }
322
 
323
  else {
324
 
325
+ echo wp_kses_post( sprintf( esc_html__( 'In %s time', 'mycred' ), human_time_diff( $coupon->expires_unix ) ) . '<br /><small class="description">' . date( get_option( 'date_format' ), $coupon->expires_unix ) . '</small>' );
326
 
327
  }
328
 
333
  case 'ctype' :
334
 
335
  if ( isset( $this->point_types[ $coupon->point_type ] ) )
336
+ echo esc_html( $this->point_types[ $coupon->point_type ] );
337
 
338
  else
339
  echo '-';
489
 
490
  mycred_delete_post_meta( $post_id, '_warning_bad_expiration' );
491
 
492
+ echo '<div id="message" class="error notice is-dismissible"><p>' . esc_html__( 'Warning. The previous expiration date set for this coupon was formatted incorrectly and was deleted. If you still want the coupon to expire, please enter a new date or leave empty to disable.', 'mycred' ) . '</p><button type="button" class="notice-dismiss"></button></div>';
493
 
494
  }
495
 
516
  <div class="row">
517
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
518
  <div class="form-group">
519
+ <label for=""><?php esc_html_e( 'Value', 'mycred' ); ?></label>
520
+ <input type="text" name="mycred_coupon[value]" class="form-control" id="mycred-coupon-value" value="<?php echo esc_attr( $mycred->number( $coupon->value ) ); ?>" />
521
+ <span class="description"><?php echo esc_html( $mycred->template_tags_general( __( 'The amount of %plural% a user receives when redeeming this coupon.', 'mycred' ) ) ); ?></span>
522
  </div>
523
  </div>
524
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
525
  <div class="form-group">
526
+ <label for=""><?php esc_html_e( 'Point Type', 'mycred' ); ?></label>
527
  <?php if ( count( $this->point_types ) > 1 ) : ?>
528
 
529
  <?php mycred_types_select_from_dropdown( 'mycred_coupon[type]', 'mycred-coupon-type', $coupon->point_type, false, ' class="form-control"' ); ?><br />
530
+ <span class="description"><?php esc_html_e( 'Select the point type that this coupon is applied.', 'mycred' ); ?></span>
531
 
532
  <?php else : ?>
533
 
534
+ <p class="form-control-static"><?php echo esc_html( $mycred->plural() ); ?></p>
535
+ <input type="hidden" name="mycred_coupon[type]" value="<?php echo esc_attr( MYCRED_DEFAULT_TYPE_KEY ); ?>" />
536
 
537
  <?php endif; ?>
538
  </div>
539
  </div>
540
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
541
  <div class="form-group">
542
+ <label for=""><?php esc_html_e( 'Expire', 'mycred' ); ?></label>
543
  <input type="text" name="mycred_coupon[expires]" class="form-control" id="mycred-coupon-expire" maxlength="10" value="<?php echo esc_attr( $coupon->expires ); ?>" placeholder="YYYY-MM-DD" />
544
+ <span class="description"><?php esc_html_e( 'Optional date when this coupon expires. Expired coupons will be trashed.', 'mycred' ); ?></span>
545
  </div>
546
  </div>
547
  </div>
569
  <div class="row">
570
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
571
  <div class="form-group">
572
+ <label for="mycred-coupon-global"><?php esc_html_e( 'Global Maximum', 'mycred' ); ?></label>
573
  <input type="text" name="mycred_coupon[global]" class="form-control" id="mycred-coupon-global" value="<?php echo absint( $coupon->max_global ); ?>" />
574
+ <span class="description"><?php esc_html_e( 'The maximum number of times this coupon can be used in total. Once this is reached, the coupon is automatically trashed. If 0 is selected then the coupon will not work and will automatically expire. For more info please read the <a href="https://codex.mycred.me/chapter-iii/coupons/creating-coupons/">Description</a>', 'mycred' ); ?></span>
575
  </div>
576
  </div>
577
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
578
  <div class="form-group">
579
+ <label for="mycred-coupon-user"><?php esc_html_e( 'User Maximum', 'mycred' ); ?></label>
580
  <input type="text" name="mycred_coupon[user]" class="form-control" id="mycred-coupon-user" value="<?php echo absint( $coupon->max_user ); ?>" />
581
+ <span class="description"><?php esc_html_e( 'The maximum number of times this coupon can be used by a user. If 0 is selected then the coupon will not work.', 'mycred' ); ?></span>
582
  </div>
583
  </div>
584
  </div>
606
  <div class="row">
607
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
608
  <div class="form-group">
609
+ <label for="mycred-coupon-min_balance"><?php esc_html_e( 'Minimum Balance', 'mycred' ); ?></label>
610
  <div>
611
+ <input type="text" name="mycred_coupon[min_balance]" <?php if ( count( $this->point_types ) > 1 ) echo 'size="8"'; else echo ' style="width: 99%;"'; ?> id="mycred-coupon-min_balance" value="<?php echo esc_attr( $mycred->number( $coupon->requires_min['value'] ) ); ?>" />
612
  <?php echo mycred_types_select_from_dropdown( 'mycred_coupon[min_balance_type]', 'mycred-coupon-min_balance_type', $coupon->requires_min_type, true, ' style="vertical-align: top;"' ); ?>
613
  </div>
614
+ <span class="description"><?php esc_html_e( 'Optional minimum balance a user must have in order to use this coupon. Use zero to disable.', 'mycred' ); ?></span>
615
  </div>
616
  </div>
617
  </div>
618
  <div class="row">
619
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
620
  <div class="form-group">
621
+ <label for="mycred-coupon-max_balance"><?php esc_html_e( 'Maximum Balance', 'mycred' ); ?></label>
622
  <div>
623
  <input type="text" name="mycred_coupon[max_balance]" <?php if ( count( $this->point_types ) > 1 ) echo 'size="8"'; else echo ' style="width: 99%;"'; ?> id="mycred-coupon-max_balance" value="<?php echo $mycred->number( $coupon->requires_max['value'] ); ?>" />
624
  <?php echo mycred_types_select_from_dropdown( 'mycred_coupon[max_balance_type]', 'mycred-coupon-max_balance_type', $coupon->requires_max_type, true, ' style="vertical-align: top;"' ); ?>
625
  </div>
626
+ <span class="description"><?php esc_html_e( 'Optional maximum balance a user can have in order to use this coupon. Use zero to disable.', 'mycred' ); ?></span>
627
  </div>
628
  </div>
629
  </div>
658
  <div class="mycred-border" >
659
  <div class="row">
660
  <div class="mycred-title"><button type="button" class="dashicons-before dashicons-no-alt close-button" ></button><?php
661
+ esc_html_e( 'Reward', 'mycred' ); ?>
662
  </div>
663
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
664
  <div class="form-group">
665
+ <label for="mycred-select-coupon-reward"><?php esc_html_e( 'Select Reward Type : ', 'mycred' ); ?></label>
666
  <div class="mycred-select-coupon-reward" >
667
  <select name="mycred_coupon[reward][types][]" class="mycred-select-coupon-rewards"><?php
668
  if( class_exists( 'myCRED_Badge' ) && ( empty( $ranks ) || ! empty( $badge_id ) ) ){ ?>
669
+ <option value="mycred_coupon_badges" ><?php esc_html_e( 'Badges', 'mycred' ); ?></option>
670
  <?php }
671
  if( class_exists( 'myCRED_Ranks_Module' ) && $manual_rank && ( ! empty( $ranks ) || empty( $badge_id ) ) ) { ?>
672
+ <option value="mycred_coupon_ranks" ><?php esc_html_e( 'Ranks', 'mycred' ); ?></option>
673
  <?php } ?>
674
  </select>
675
  </div>
681
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
682
  <div class="form-group">
683
  <div class="ids show-badges" >
684
+ <label for="mycred-select-coupon" id="change-text"><?php echo class_exists( 'myCRED_Badge' ) && ( empty( $ranks ) || ! empty( $badge_id ) ) ? esc_html_e( 'Badges : ', 'mycred' ) : esc_html_e( 'Ranks : ', 'mycred' ); ?></label>
685
  <div class="mycred-select-coupon"><?php
686
  if( ! empty( $badge_id ) || ! empty( $ranks ) ){?>
687
  <select name="mycred_coupon[reward][ids][]" class="mycred-select-ids"><?php
688
  if( class_exists( 'myCRED_Badge' ) ) {
689
  foreach ($badge_id as $key => $value) {
690
  $badges = mycred_get_badge( $value );?>
691
+ <option value="<?php echo esc_attr( $value );?>"><?php esc_html_e( $badges->title ) ?></option><?php
692
  }
693
  }
694
  if( class_exists( 'myCRED_Ranks_Module' ) && empty($badge_id) ) {
695
  foreach ( $ranks as $key => $value ) { ?>
696
+ <option value="<?php echo esc_attr( $value->post_id );?>"><?php esc_html_e( $value->post->post_title ) ?></option><?php
697
  }
698
  }?>
699
  </select><?php
709
 
710
  <div class="mycred-badge-rank-hide-show">
711
  <div class="mycred-switch">
712
+ <label><strong><?php esc_html_e( 'Enable this to assign badge/ranks through coupon.', 'mycred' ); ?></strong></label>
713
  <label class="mycred-switch1">
714
  <input type="checkbox" id="mycred-check" name="mycred_coupon[check]" <?php echo $enable_disable == true ? 'checked' : ''; ?>>
715
  <span class="slider round"></span>
718
  </div>
719
  <div class="form mycred-coupon-form" <?php echo $enable_disable == true ? 'style="display: block;"' : 'style="display: none;"' ?> >
720
  <label class="mycred-rank-msg">
721
+ <strong><?php esc_html_e( 'You can only assign Ranks when Ranks are set to Manual Mode.: ', 'mycred' ); ?></strong>
722
  </label><?php
723
 
724
+ if( ! empty( $types_ids ) ) {
725
  foreach ( $types_ids[0] as $keys => $values ) {
726
  echo $this->mycred_coupon_badge_rank_html( $values['types'], $values['ids'], $manual_rank );
727
  }
728
+ }
729
+ else {
730
  echo $html;
731
  }?>
732
 
756
  <div class="mycred-border" >
757
  <div class="row">
758
  <div class="mycred-title"><button type="button" class="dashicons-before dashicons-no-alt close-button" ></button><?php
759
+ esc_html_e( 'Reward', 'mycred' ); ?>
760
  </div>
761
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
762
  <div class="form-group">
763
+ <label for="mycred-select-coupon-reward"><?php esc_html_e( 'Select Reward Type : ', 'mycred' ); ?></label>
764
  <div class="mycred-select-coupon-reward">
765
  <select name="mycred_coupon[reward][types][]" class="mycred-select-coupon-rewards"><?php
766
 
769
  if ( $types == 'mycred_coupon_badges' ) $selected_type = 'badge';
770
 
771
  ?>
772
+ <option value="mycred_coupon_badges" <?php echo $types == 'mycred_coupon_badges' ? 'selected="selected"' : ''; ?>><?php esc_html_e( 'Badges', 'mycred' ); ?></option>
773
  <?php }
774
  else {
775
  if ( $types == 'mycred_coupon_badges' && class_exists( 'myCRED_Ranks_Module' ) && $manual_rank ) $selected_type = 'rank';
778
 
779
  if ( $types == 'mycred_coupon_ranks' ) $selected_type = 'rank';
780
  ?>
781
+ <option value="mycred_coupon_ranks" <?php echo $types == 'mycred_coupon_ranks' ? 'selected="selected"' : ''; ?>><?php esc_html_e( 'Ranks', 'mycred' ); ?></option>
782
  <?php }
783
  else{
784
  if ( $types == 'mycred_coupon_ranks' && class_exists( 'myCRED_Badge' ) ) $selected_type = 'badge';
796
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
797
  <div class="form-group">
798
  <div class="ids show-badges" >
799
+ <label for="mycred-select-coupon" id="change-text"><?php ( ! empty( $badge_id ) && $types == 'mycred_coupon_badges' ) ? esc_html_e( 'Badges : ', 'mycred' ) : esc_html_e( 'Ranks : ', 'mycred' ); ?></label>
800
  <div class="mycred-select-coupon"><?php
801
 
802
  if( ! empty( $badge_id ) || ! empty( $ranks ) ){?>
806
  if( $selected_type == 'badge' ){
807
  foreach ($badge_id as $key => $value) {
808
  $badges = mycred_get_badge( $value );?>
809
+ <option value="<?php echo $value ?>" <?php echo $ids == $value ? 'selected="selected"' : ''; ?>><?php esc_html_e( $badges->title ) ?></option><?php
810
  }
811
  }elseif( $selected_type == 'rank' ) {
812
 
813
  foreach ( $ranks as $key => $value ) { ?>
814
+ <option value="<?php echo $value->post_id ?>" <?php echo $ids == $value->post_id ? 'selected="selected"' : ''; ?>><?php esc_html_e( $value->post->post_title ) ?></option><?php
815
  }
816
  }
817
  ?>
971
  $prefs = mycred_apply_defaults( $this->default_prefs, $this->coupons );
972
 
973
  ?>
974
+ <h4><span class="dashicons dashicons-admin-plugins static"></span><?php esc_html_e( 'Coupons', 'mycred' ); ?></h4>
975
  <div class="body" style="display:none;">
976
 
977
+ <h3><?php esc_html_e( 'Message Templates', 'mycred' ); ?></h3>
978
  <div class="row">
979
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
980
  <div class="form-group">
981
+ <label for="<?php echo $this->field_id( 'invalid' ); ?>"><?php esc_html_e( 'Invalid Coupon Message', 'mycred' ); ?></label>
982
+ <input type="text" name="<?php echo $this->field_name( 'invalid' ); ?>" id="<?php echo $this->field_id( 'invalid' ); ?>" class="form-control" placeholder="<?php esc_attr_e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['invalid'] ); ?>" />
983
  <p><span class="description"><?php printf( '%s %s', __( 'Message to show when users try to use a coupon that does not exists.', 'mycred' ), $this->available_template_tags( array( 'general' ) ) ); ?></span></p>
984
  </div>
985
  </div>
986
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
987
  <div class="form-group">
988
+ <label for="<?php echo $this->field_id( 'expired' ); ?>"><?php esc_html_e( 'Expired Coupon Message', 'mycred' ); ?></label>
989
+ <input type="text" name="<?php echo $this->field_name( 'expired' ); ?>" id="<?php echo $this->field_id( 'expired' ); ?>" class="form-control" placeholder="<?php esc_attr_e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['expired'] ); ?>" />
990
  <p><span class="description"><?php printf( '%s %s', __( 'Message to show when users try to use that has expired.', 'mycred' ), $this->available_template_tags( array( 'general' ) ) ); ?></span></p>
991
  </div>
992
  </div>
994
  <div class="row">
995
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
996
  <div class="form-group">
997
+ <label for="<?php echo $this->field_id( 'min' ); ?>"><?php esc_html_e( 'Minimum Balance Message', 'mycred' ); ?></label>
998
+ <input type="text" name="<?php echo $this->field_name( 'min' ); ?>" id="<?php echo $this->field_id( 'min' ); ?>" class="form-control" placeholder="<?php esc_attr_e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['min'] ); ?>" />
999
  <p><span class="description"><?php printf( '%s %s', __( 'Message to show when a user does not meet the minimum balance requirement. (if used)', 'mycred' ), $this->available_template_tags( array( 'general' ) ) ); ?></span></p>
1000
  </div>
1001
  </div>
1002
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1003
  <div class="form-group">
1004
+ <label for="<?php echo $this->field_id( 'max' ); ?>"><?php esc_html_e( 'Maximum Balance Message', 'mycred' ); ?></label>
1005
+ <input type="text" name="<?php echo $this->field_name( 'max' ); ?>" id="<?php echo $this->field_id( 'max' ); ?>" class="form-control" placeholder="<?php esc_attr_e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['max'] ); ?>" />
1006
  <p><span class="description"><?php printf( '%s %s', __( 'Message to show when a user does not meet the maximum balance requirement. (if used)', 'mycred' ), $this->available_template_tags( array( 'general' ) ) ); ?></span></p>
1007
  </div>
1008
  </div>
1010
  <div class="row">
1011
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1012
  <div class="form-group">
1013
+ <label for="<?php echo $this->field_id( 'user_limit' ); ?>"><?php esc_html_e( 'User Limit Message', 'mycred' ); ?></label>
1014
+ <input type="text" name="<?php echo $this->field_name( 'user_limit' ); ?>" id="<?php echo $this->field_id( 'user_limit' ); ?>" class="form-control" placeholder="<?php esc_attr_e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['user_limit'] ); ?>" />
1015
  <p><span class="description"><?php printf( '%s %s', __( 'Message to show when the user limit has been reached for the coupon.', 'mycred' ), $this->available_template_tags( array( 'general' ) ) ); ?></span></p>
1016
  </div>
1017
  </div>
1018
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1019
  <div class="form-group">
1020
+ <label for="<?php echo $this->field_id( 'excluded' ); ?>"><?php esc_html_e( 'Excluded Message', 'mycred' ); ?></label>
1021
+ <input type="text" name="<?php echo $this->field_name( 'excluded' ); ?>" id="<?php echo $this->field_id( 'excluded' ); ?>" class="form-control" placeholder="<?php esc_attr_e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['excluded'] ); ?>" />
1022
  <p><span class="description"><?php printf( '%s %s', __( 'Message to show when a user is excluded from the point type the coupon gives.', 'mycred' ), $this->available_template_tags( array( 'general' ) ) ); ?></span></p>
1023
  </div>
1024
  </div>
1026
  <div class="row">
1027
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1028
  <div class="form-group">
1029
+ <label for="<?php echo $this->field_id( 'success' ); ?>"><?php esc_html_e( 'Success Message', 'mycred' ); ?></label>
1030
+ <input type="text" name="<?php echo $this->field_name( 'success' ); ?>" id="<?php echo $this->field_id( 'success' ); ?>" class="form-control" placeholder="<?php esc_attr_e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['success'] ); ?>" />
1031
  <p><span class="description"><?php printf( '%s %s', __( 'Message to show when a coupon was successfully deposited to a users account.', 'mycred' ), $this->available_template_tags( array( 'general', 'amount' ) ) ); ?></span></p>
1032
  </div>
1033
  </div>
1034
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1035
  <div class="form-group">
1036
+ <label for="<?php echo $this->field_id( 'log' ); ?>"><?php esc_html_e( 'Log Template', 'mycred' ); ?></label>
1037
+ <input type="text" name="<?php echo $this->field_name( 'log' ); ?>" id="<?php echo $this->field_id( 'log' ); ?>" class="form-control" placeholder="<?php esc_attr_e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['log'] ); ?>" />
1038
  <p><span class="description"><?php printf( '%s %s', __( 'Log entry for successful coupon redemption. Use %coupon% to show the coupon code.', 'mycred' ), $this->available_template_tags( array( 'general', 'amount' ) ) ); ?></span></p>
1039
  </div>
1040
  </div>
addons/email-notices/includes/mycred-email-shortcodes.php CHANGED
@@ -24,10 +24,10 @@ if ( ! function_exists( 'mycred_render_email_subscriptions' ) ) :
24
 
25
  // Save
26
  $saved = false;
27
- if ( isset( $_REQUEST['do'] ) && $_REQUEST['do'] == 'mycred-unsubscribe' && wp_verify_nonce( $_REQUEST['token'], 'update-mycred-email-subscriptions' ) ) {
28
 
29
  if ( isset( $_POST['mycred_email_unsubscribe'] ) && ! empty( $_POST['mycred_email_unsubscribe'] ) )
30
- $new_selection = sanitize_email( $_POST['mycred_email_unsubscribe'] );
31
  else
32
  $new_selection = array();
33
 
@@ -53,7 +53,7 @@ if ( ! function_exists( 'mycred_render_email_subscriptions' ) ) :
53
  ob_start();
54
 
55
  if ( $saved )
56
- echo '<p class="updated-email-subscriptions">' . $success . '</p>';
57
 
58
  $url = add_query_arg( array( 'do' => 'mycred-unsubscribe', 'user' => get_current_user_id(), 'token' => wp_create_nonce( 'update-mycred-email-subscriptions' ) ) );
59
 
@@ -62,8 +62,8 @@ if ( ! function_exists( 'mycred_render_email_subscriptions' ) ) :
62
  <table class="table">
63
  <thead>
64
  <tr>
65
- <th class="check"><?php _e( 'Unsubscribe', 'mycred' ); ?></th>
66
- <th class="notice-title"><?php _e( 'Email Notice', 'mycred' ); ?></th>
67
  </tr>
68
  </thead>
69
  <tbody>
@@ -75,7 +75,7 @@ if ( ! function_exists( 'mycred_render_email_subscriptions' ) ) :
75
  <?php if ( $settings['recipient'] == 'admin' ) continue; ?>
76
 
77
  <tr>
78
- <td class="check"><input type="checkbox" name="mycred_email_unsubscribe[]"<?php if ( in_array( $notice->ID, $unsubscriptions ) ) echo ' checked="checked"'; ?> value="<?php echo $notice->ID; ?>" /></td>
79
  <td class="notice-title"><?php echo esc_html( $settings['label'] ); ?></td>
80
  </tr>
81
 
@@ -84,14 +84,14 @@ if ( ! function_exists( 'mycred_render_email_subscriptions' ) ) :
84
  <?php else : ?>
85
 
86
  <tr>
87
- <td colspan="2"><?php _e( 'There are no email notifications yet.', 'mycred' ); ?></td>
88
  </tr>
89
 
90
  <?php endif; ?>
91
 
92
  </tbody>
93
  </table>
94
- <input type="submit" class="btn btn-primary button button-primary pull-right" value="<?php _e( 'Save Changes', 'mycred' ); ?>" />
95
  </form>
96
  <?php
97
 
24
 
25
  // Save
26
  $saved = false;
27
+ if ( isset( $_REQUEST['do'] ) && $_REQUEST['do'] == 'mycred-unsubscribe' && isset( $_REQUEST['token'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_REQUEST['token'] ) ), 'update-mycred-email-subscriptions' ) ) {
28
 
29
  if ( isset( $_POST['mycred_email_unsubscribe'] ) && ! empty( $_POST['mycred_email_unsubscribe'] ) )
30
+ $new_selection = sanitize_email( wp_unslash( $_POST['mycred_email_unsubscribe'] ) );
31
  else
32
  $new_selection = array();
33
 
53
  ob_start();
54
 
55
  if ( $saved )
56
+ echo '<p class="updated-email-subscriptions">' . esc_html( $success ) . '</p>';
57
 
58
  $url = add_query_arg( array( 'do' => 'mycred-unsubscribe', 'user' => get_current_user_id(), 'token' => wp_create_nonce( 'update-mycred-email-subscriptions' ) ) );
59
 
62
  <table class="table">
63
  <thead>
64
  <tr>
65
+ <th class="check"><?php esc_html_e( 'Unsubscribe', 'mycred' ); ?></th>
66
+ <th class="notice-title"><?php esc_html_e( 'Email Notice', 'mycred' ); ?></th>
67
  </tr>
68
  </thead>
69
  <tbody>
75
  <?php if ( $settings['recipient'] == 'admin' ) continue; ?>
76
 
77
  <tr>
78
+ <td class="check"><input type="checkbox" name="mycred_email_unsubscribe[]"<?php if ( in_array( $notice->ID, $unsubscriptions ) ) echo ' checked="checked"'; ?> value="<?php echo esc_attr( $notice->ID ); ?>" /></td>
79
  <td class="notice-title"><?php echo esc_html( $settings['label'] ); ?></td>
80
  </tr>
81
 
84
  <?php else : ?>
85
 
86
  <tr>
87
+ <td colspan="2"><?php esc_html_e( 'There are no email notifications yet.', 'mycred' ); ?></td>
88
  </tr>
89
 
90
  <?php endif; ?>
91
 
92
  </tbody>
93
  </table>
94
+ <input type="submit" class="btn btn-primary button button-primary pull-right" value="<?php esc_html_e( 'Save Changes', 'mycred' ); ?>" />
95
  </form>
96
  <?php
97
 
addons/email-notices/myCRED-addon-email-notices.php CHANGED
@@ -593,14 +593,14 @@ if ( ! class_exists( 'myCRED_Email_Notice_Module' ) ) :
593
  <div class="row">
594
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
595
  <div class="form-group">
596
- <label for="mycred-email-instance"<?php if ( $post->post_status == 'publish' && empty( $trigger ) ) echo ' style="color:red;font-weight:bold;"'; ?>><?php _e( 'Send this email notice when...', 'mycred' ); ?></label>
597
  <select name="mycred_email[instance]" id="mycred-email-instance" class="form-control mycred-email-instance-options">
598
  <?php
599
 
600
  // Loop though instances
601
  foreach ( $instances as $instance => $event ) {
602
 
603
- echo '<option value="' . $instance . '"';
604
  if ( $instance == $trigger || ( $instance == 'any' && $trigger == '' ) || ( $instance == 'custom' && ( $uses_specific || $uses_custom ) ) ) echo ' selected="selected"';
605
  echo '>... ' . esc_html( $event ) . '</option>';
606
 
@@ -611,7 +611,7 @@ if ( ! class_exists( 'myCRED_Email_Notice_Module' ) ) :
611
  </div>
612
  <div id="reference-selection" style="display: <?php if ( $uses_specific || $uses_custom ) echo 'block'; else echo 'none'; ?>;">
613
  <div class="form-group">
614
- <label for="mycred-email-ctype"><?php _e( 'Reference', 'mycred' ); ?></label>
615
  <select name="mycred_email[reference]" id="mycred-email-reference" class="form-control">
616
  <?php
617
 
@@ -631,16 +631,16 @@ if ( ! class_exists( 'myCRED_Email_Notice_Module' ) ) :
631
  </div>
632
  <div id="custom-reference-selection" style="display: <?php if ( $uses_custom ) echo 'block'; else echo 'none'; ?>;">
633
  <div class="form-group">
634
- <label for="mycred-email-custom-ref"><?php _e( 'Custom Reference', 'mycred' ); ?></label>
635
- <input type="text" name="mycred_email[custom_reference]" placeholder="<?php _e( 'required', 'mycred' ); ?>" id="mycred-email-custom-ref" class="form-control" value="<?php echo esc_attr( $trigger ); ?>" />
636
  </div>
637
- <p class="description" style="line-height: 16px;"><?php _e( 'This can be either a single reference or a comma separated list of references.', 'mycred' ); ?></p>
638
  </div>
639
  </div>
640
  <hr />
641
 
642
  <div class="form-group">
643
- <label for="mycred-email-ctype"><?php _e( 'Point Types', 'mycred' ); ?></label>
644
  <?php
645
 
646
 
@@ -658,8 +658,8 @@ if ( ! class_exists( 'myCRED_Email_Notice_Module' ) ) :
658
 
659
  ?>
660
 
661
- <p class="form-control-static"><?php echo $this->core->plural(); ?></p>
662
- <input type="hidden" name="mycred_email[ctype][]" id="mycred-email-ctype" value="<?php echo MYCRED_DEFAULT_TYPE_KEY; ?>" />
663
  <?php
664
 
665
  }
@@ -671,15 +671,15 @@ if ( ! class_exists( 'myCRED_Email_Notice_Module' ) ) :
671
  <hr />
672
 
673
  <div class="form-group" style="margin-bottom: 0;">
674
- <label for="mycred-email-recipient-user"><?php _e( 'Recipient:', 'mycred' ); ?></label>
675
  <div class="inline-radio">
676
- <label for="mycred-email-recipient-user"><input type="radio" name="mycred_email[recipient]" id="mycred-email-recipient-user" value="user" <?php checked( $email->settings['recipient'], 'user' ); ?> /> <?php _e( 'User', 'mycred' ); ?></label>
677
  </div>
678
  <div class="inline-radio">
679
- <label for="mycred-email-recipient-admin"><input type="radio" name="mycred_email[recipient]" id="mycred-email-recipient-admin" value="admin" <?php checked( $email->settings['recipient'], 'admin' ); ?> /> <?php _e( 'Administrator', 'mycred' ); ?></label>
680
  </div>
681
  <div class="inline-radio">
682
- <label for="mycred-email-recipient-both"><input type="radio" name="mycred_email[recipient]" id="mycred-email-recipient-both" value="both" <?php checked( $email->settings['recipient'], 'both' ); ?> /> <?php _e( 'Both', 'mycred' ); ?></label>
683
  </div>
684
  </div>
685
  </div>
@@ -706,19 +706,19 @@ if ( ! class_exists( 'myCRED_Email_Notice_Module' ) ) :
706
  <div class="row">
707
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
708
  <div class="form-group">
709
- <label for="mycred-email-senders-name"><?php _e( 'Senders Name:', 'mycred' ); ?></label>
710
  <input type="text" name="mycred_email[senders_name]" id="mycred-email-senders-name" class="form-control" value="<?php echo esc_attr( $email->settings['senders_name'] ); ?>" />
711
  </div>
712
  </div>
713
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
714
  <div class="form-group">
715
- <label for="mycred-email-senders-email"><?php _e( 'Senders Email:', 'mycred' ); ?></label>
716
  <input type="text" name="mycred_email[senders_email]" id="mycred-email-senders-email" class="form-control" value="<?php echo esc_attr( $email->settings['senders_email'] ); ?>" />
717
  </div>
718
  </div>
719
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
720
  <div class="form-group">
721
- <label for="mycred-email-reply-to"><?php _e( 'Reply-To Email:', 'mycred' ); ?></label>
722
  <input type="text" name="mycred_email[reply_to]" id="mycred-email-reply-to" class="form-control" value="<?php echo esc_attr( $email->settings['reply_to'] ); ?>" />
723
  </div>
724
  </div>
@@ -733,7 +733,7 @@ if ( ! class_exists( 'myCRED_Email_Notice_Module' ) ) :
733
  <div class="row">
734
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
735
  <div class="form-group">
736
- <label for="mycred-email-styling"><?php _e( 'CSS Styling', 'mycred' ); ?></label>
737
  <textarea name="mycred_email[styling]" class="form-control code" rows="10" cols="30" id="mycred-email-styling"><?php echo esc_html( $email->get_email_styling() ); ?></textarea>
738
  </div>
739
  </div>
@@ -757,13 +757,13 @@ if ( ! class_exists( 'myCRED_Email_Notice_Module' ) ) :
757
  ?>
758
  <div class="row">
759
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
760
- <h3><?php _e( 'Site Related', 'mycred' ); ?></h3>
761
  <div class="row">
762
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
763
  <strong>%blog_name%</strong>
764
  </div>
765
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
766
- <div><?php _e( 'Your websites title', 'mycred' ); ?></div>
767
  </div>
768
  </div>
769
  <div class="row">
@@ -771,7 +771,7 @@ if ( ! class_exists( 'myCRED_Email_Notice_Module' ) ) :
771
  <strong>%blog_url%</strong>
772
  </div>
773
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
774
- <div><?php _e( 'Your websites address', 'mycred' ); ?></div>
775
  </div>
776
  </div>
777
  <div class="row">
@@ -779,7 +779,7 @@ if ( ! class_exists( 'myCRED_Email_Notice_Module' ) ) :
779
  <strong>%blog_info%</strong>
780
  </div>
781
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
782
- <div><?php _e( 'Your websites tagline (description)', 'mycred' ); ?></div>
783
  </div>
784
  </div>
785
  <div class="row">
@@ -787,7 +787,7 @@ if ( ! class_exists( 'myCRED_Email_Notice_Module' ) ) :
787
  <strong>%admin_email%</strong>
788
  </div>
789
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
790
- <div><?php _e( 'Your websites admin email', 'mycred' ); ?></div>
791
  </div>
792
  </div>
793
  <div class="row">
@@ -795,18 +795,18 @@ if ( ! class_exists( 'myCRED_Email_Notice_Module' ) ) :
795
  <strong>%num_members%</strong>
796
  </div>
797
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
798
- <div><?php _e( 'Total number of blog members', 'mycred' ); ?></div>
799
  </div>
800
  </div>
801
  </div>
802
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
803
- <h3><?php _e( 'Instance Related', 'mycred' ); ?></h3>
804
  <div class="row">
805
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
806
  <strong>%new_balance%</strong>
807
  </div>
808
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
809
- <div><?php _e( 'The users new balance', 'mycred' ); ?></div>
810
  </div>
811
  </div>
812
  <div class="row">
@@ -814,7 +814,7 @@ if ( ! class_exists( 'myCRED_Email_Notice_Module' ) ) :
814
  <strong>%old_balance%</strong>
815
  </div>
816
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
817
- <div><?php _e( 'The users old balance', 'mycred' ); ?></div>
818
  </div>
819
  </div>
820
  <div class="row">
@@ -822,7 +822,7 @@ if ( ! class_exists( 'myCRED_Email_Notice_Module' ) ) :
822
  <strong>%amount%</strong>
823
  </div>
824
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
825
- <div><?php _e( 'The amount of points gained or lost in this instance', 'mycred' ); ?></div>
826
  </div>
827
  </div>
828
  <div class="row">
@@ -830,25 +830,25 @@ if ( ! class_exists( 'myCRED_Email_Notice_Module' ) ) :
830
  <strong>%entry%</strong>
831
  </div>
832
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
833
- <div><?php _e( 'The log entry', 'mycred' ); ?></div>
834
  </div>
835
  </div>
836
  <div class="row">
837
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
838
- <div><?php printf( __( 'You can also use %s.', 'mycred' ), '<a href="http://codex.mycred.me/category/template-tags/temp-user/" target="_blank">' . __( 'user related template tags', 'mycred' ) . '</a>' ); ?></div>
839
  </div>
840
  </div>
841
  </div>
842
  </div>
843
  <div class="row">
844
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
845
- <h3><?php _e( 'Badge Related', 'mycred' ); ?></h3>
846
  <div class="row">
847
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
848
  <strong>%badge_title%</strong>
849
  </div>
850
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
851
- <div><?php _e( 'Gained badge title', 'mycred' ); ?></div>
852
  </div>
853
  </div>
854
  <div class="row">
@@ -856,18 +856,18 @@ if ( ! class_exists( 'myCRED_Email_Notice_Module' ) ) :
856
  <strong>%badge_image%</strong>
857
  </div>
858
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
859
- <div><?php _e( 'Gained badge image', 'mycred' ); ?></div>
860
  </div>
861
  </div>
862
  </div>
863
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
864
- <h3><?php _e( 'Rank Related', 'mycred' ); ?></h3>
865
  <div class="row">
866
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
867
  <strong>%rank_title%</strong>
868
  </div>
869
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
870
- <div><?php _e( 'Users rank title', 'mycred' ); ?></div>
871
  </div>
872
  </div>
873
  <div class="row">
@@ -875,7 +875,7 @@ if ( ! class_exists( 'myCRED_Email_Notice_Module' ) ) :
875
  <strong>%rank_image%</strong>
876
  </div>
877
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
878
- <div><?php _e( 'Users rank image', 'mycred' ); ?></div>
879
  </div>
880
  </div>
881
  </div>
@@ -1225,15 +1225,15 @@ if ( ! class_exists( 'myCRED_Email_Notice_Module' ) ) :
1225
  $this->emailnotices = mycred_apply_defaults( $this->default_prefs, $this->emailnotices );
1226
 
1227
  ?>
1228
- <h4><span class="dashicons dashicons-admin-plugins static"></span><?php _e( 'Email Notices', 'mycred' ); ?></h4>
1229
  <div class="body" style="display:none;">
1230
 
1231
  <div class="row">
1232
  <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
1233
- <h3><?php _e( 'Format', 'mycred' ); ?></h3>
1234
  <div class="form-group">
1235
  <div class="radio">
1236
- <label for="<?php echo $this->field_id( array( 'use_html' => 'no' ) ); ?>"><input type="radio" name="<?php echo $this->field_name( 'use_html' ); ?>" id="<?php echo $this->field_id( array( 'use_html' => 'no' ) ); ?>" <?php checked( $this->emailnotices['use_html'], 0 ); ?> value="0" /> <?php _e( 'Plain Text', 'mycred' ); ?></label>
1237
  </div>
1238
  <div class="radio">
1239
  <label for="<?php echo $this->field_id( array( 'use_html' => 'yes' ) ); ?>"><input type="radio" name="<?php echo $this->field_name( 'use_html' ); ?>" id="<?php echo $this->field_id( array( 'use_html' => 'yes' ) ); ?>" <?php checked( $this->emailnotices['use_html'], 1 ); ?> value="1" /> HTML</label>
@@ -1241,32 +1241,32 @@ if ( ! class_exists( 'myCRED_Email_Notice_Module' ) ) :
1241
  </div>
1242
  </div>
1243
  <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
1244
- <h3><?php _e( 'Schedule', 'mycred' ); ?></h3>
1245
  <div class="form-group">
1246
  <?php if ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) : ?>
1247
  <input type="hidden" name="<?php echo $this->field_name( 'send' ); ?>" value="" />
1248
- <p class="form-control-static"><?php _e( 'WordPress Cron is disabled. Emails will be sent immediately.', 'mycred' ); ?></p>
1249
  <?php else : ?>
1250
  <div class="radio">
1251
- <label for="<?php echo $this->field_id( 'send' ); ?>"><input type="radio" name="<?php echo $this->field_name( 'send' ); ?>" id="<?php echo $this->field_id( 'send' ); ?>" <?php checked( $this->emailnotices['send'], '' ); ?> value="" /> <?php _e( 'Send emails immediately', 'mycred' ); ?></label>
1252
  </div>
1253
  <div class="radio">
1254
- <label for="<?php echo $this->field_id( 'send' ); ?>-hourly"><input type="radio" name="<?php echo $this->field_name( 'send' ); ?>" id="<?php echo $this->field_id( 'send' ); ?>-hourly" <?php checked( $this->emailnotices['send'], 'hourly' ); ?> value="hourly" /> <?php _e( 'Send emails once an hour', 'mycred' ); ?></label>
1255
  </div>
1256
  <div class="radio">
1257
- <label for="<?php echo $this->field_id( 'send' ); ?>-daily"><input type="radio" name="<?php echo $this->field_name( 'send' ); ?>" id="<?php echo $this->field_id( 'send' ); ?>-daily" <?php checked( $this->emailnotices['send'], 'daily' ); ?> value="daily" /> <?php _e( 'Send emails once a day', 'mycred' ); ?></label>
1258
  </div>
1259
  <?php endif; ?>
1260
  </div>
1261
  </div>
1262
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
1263
- <h3><?php _e( 'Advanced', 'mycred' ); ?></h3>
1264
  <div class="form-group">
1265
  <div class="checkbox">
1266
- <label for="<?php echo $this->field_id( array( 'filter' => 'subject' ) ); ?>"><input type="checkbox" name="<?php echo $this->field_name( array( 'filter' => 'subject' ) ); ?>" id="<?php echo $this->field_id( array( 'filter' => 'subject' ) ); ?>" <?php checked( $this->emailnotices['filter']['subject'], 1 ); ?> value="1" /> <?php _e( 'Filter Email Subjects', 'mycred' ); ?></label>
1267
  </div>
1268
  <div class="checkbox">
1269
- <label for="<?php echo $this->field_id( array( 'filter' => 'content' ) ); ?>"><input type="checkbox" name="<?php echo $this->field_name( array( 'filter' => 'content' ) ); ?>" id="<?php echo $this->field_id( array( 'filter' => 'content' ) ); ?>" <?php checked( $this->emailnotices['filter']['content'], 1 ); ?> value="1" /> <?php _e( 'Filter Email Body', 'mycred' ); ?></label>
1270
  </div>
1271
  </div>
1272
  </div>
@@ -1275,36 +1275,36 @@ if ( ! class_exists( 'myCRED_Email_Notice_Module' ) ) :
1275
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
1276
  <div class="form-group">
1277
  <div class="checkbox">
1278
- <label for="<?php echo $this->field_id( 'override' ); ?>"><input type="checkbox" name="<?php echo $this->field_name( 'override' ); ?>" id="<?php echo $this->field_id( 'override' ); ?>" <?php checked( $this->emailnotices['override'], 1 ); ?> value="1" /> <?php _e( 'SMTP Debug. Enable if you are experiencing issues with wp_mail() or if you use a SMTP plugin for emails.', 'mycred' ); ?></label>
1279
  </div>
1280
  </div>
1281
  </div>
1282
  </div>
1283
 
1284
- <h3 style="margin-bottom: 0;"><?php _e( 'Available Shortcodes', 'mycred' ); ?></h3>
1285
  <div class="row">
1286
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
1287
  <p><a href="http://codex.mycred.me/shortcodes/mycred_email_subscriptions/" target="_blank">[mycred_email_subscriptions]</a></p>
1288
  </div>
1289
  </div>
1290
 
1291
- <h3><?php _e( 'Defaults', 'mycred' ); ?></h3>
1292
  <div class="row">
1293
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
1294
  <div class="form-group">
1295
- <label for="<?php echo $this->field_id( array( 'from' => 'name' ) ); ?>"><?php _e( 'Senders Name:', 'mycred' ); ?></label>
1296
  <input type="text" name="<?php echo $this->field_name( array( 'from' => 'name' ) ); ?>" id="<?php echo $this->field_id( array( 'from' => 'name' ) ); ?>" value="<?php echo esc_attr( $this->emailnotices['from']['name'] ); ?>" class="form-control" />
1297
  </div>
1298
  </div>
1299
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
1300
  <div class="form-group">
1301
- <label for="<?php echo $this->field_id( array( 'from' => 'email' ) ); ?>"><?php _e( 'Senders Email:', 'mycred' ); ?></label>
1302
  <input type="text" name="<?php echo $this->field_name( array( 'from' => 'email' ) ); ?>" id="<?php echo $this->field_id( array( 'from' => 'email' ) ); ?>" value="<?php echo esc_attr( $this->emailnotices['from']['email'] ); ?>" class="form-control" />
1303
  </div>
1304
  </div>
1305
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
1306
  <div class="form-group">
1307
- <label for="<?php echo $this->field_id( array( 'from' => 'reply_to' ) ); ?>"><?php _e( 'Reply-To:', 'mycred' ); ?></label>
1308
  <input type="text" name="<?php echo $this->field_name( array( 'from' => 'reply_to' ) ); ?>" id="<?php echo $this->field_id( array( 'from' => 'reply_to' ) ); ?>" value="<?php echo esc_attr( $this->emailnotices['from']['reply_to'] ); ?>" class="form-control" />
1309
  </div>
1310
  </div>
@@ -1312,18 +1312,18 @@ if ( ! class_exists( 'myCRED_Email_Notice_Module' ) ) :
1312
  <div class="row">
1313
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
1314
  <div class="form-group">
1315
- <label for="<?php echo $this->field_id( 'content' ); ?>"><?php _e( 'Default Email Content', 'mycred' ); ?></label>
1316
  <textarea rows="10" cols="50" name="<?php echo $this->field_name( 'content' ); ?>" id="<?php echo $this->field_id( 'content' ); ?>" class="form-control"><?php echo esc_attr( $this->emailnotices['content'] ); ?></textarea>
1317
- <p><span class="description"><?php _e( 'Default email content.', 'mycred' ); ?></span></p>
1318
  </div>
1319
  </div>
1320
  </div>
1321
  <div class="row">
1322
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
1323
  <div class="form-group">
1324
- <label for="<?php echo $this->field_id( 'styling' ); ?>"><?php _e( 'Default CSS Styling', 'mycred' ); ?></label>
1325
  <textarea rows="10" cols="50" name="<?php echo $this->field_name( 'styling' ); ?>" id="<?php echo $this->field_id( 'styling' ); ?>" class="form-control"><?php echo esc_attr( $this->emailnotices['styling'] ); ?></textarea>
1326
- <p><span class="description"><?php _e( 'Default email CSS styling. Note that if you intend to send HTML emails, you should use inline CSS styling for best results.', 'mycred' ); ?></span></p>
1327
  </div>
1328
  </div>
1329
  </div>
593
  <div class="row">
594
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
595
  <div class="form-group">
596
+ <label for="mycred-email-instance"<?php if ( $post->post_status == 'publish' && empty( $trigger ) ) echo ' style="color:red;font-weight:bold;"'; ?>><?php esc_html_e( 'Send this email notice when...', 'mycred' ); ?></label>
597
  <select name="mycred_email[instance]" id="mycred-email-instance" class="form-control mycred-email-instance-options">
598
  <?php
599
 
600
  // Loop though instances
601
  foreach ( $instances as $instance => $event ) {
602
 
603
+ echo '<option value="' . esc_attr( $instance ) . '"';
604
  if ( $instance == $trigger || ( $instance == 'any' && $trigger == '' ) || ( $instance == 'custom' && ( $uses_specific || $uses_custom ) ) ) echo ' selected="selected"';
605
  echo '>... ' . esc_html( $event ) . '</option>';
606
 
611
  </div>
612
  <div id="reference-selection" style="display: <?php if ( $uses_specific || $uses_custom ) echo 'block'; else echo 'none'; ?>;">
613
  <div class="form-group">
614
+ <label for="mycred-email-ctype"><?php esc_html_e( 'Reference', 'mycred' ); ?></label>
615
  <select name="mycred_email[reference]" id="mycred-email-reference" class="form-control">
616
  <?php
617
 
631
  </div>
632
  <div id="custom-reference-selection" style="display: <?php if ( $uses_custom ) echo 'block'; else echo 'none'; ?>;">
633
  <div class="form-group">
634
+ <label for="mycred-email-custom-ref"><?php esc_html_e( 'Custom Reference', 'mycred' ); ?></label>
635
+ <input type="text" name="mycred_email[custom_reference]" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" id="mycred-email-custom-ref" class="form-control" value="<?php echo esc_attr( $trigger ); ?>" />
636
  </div>
637
+ <p class="description" style="line-height: 16px;"><?php esc_html_e( 'This can be either a single reference or a comma separated list of references.', 'mycred' ); ?></p>
638
  </div>
639
  </div>
640
  <hr />
641
 
642
  <div class="form-group">
643
+ <label for="mycred-email-ctype"><?php esc_html_e( 'Point Types', 'mycred' ); ?></label>
644
  <?php
645
 
646
 
658
 
659
  ?>
660
 
661
+ <p class="form-control-static"><?php echo esc_html( $this->core->plural() ); ?></p>
662
+ <input type="hidden" name="mycred_email[ctype][]" id="mycred-email-ctype" value="<?php echo esc_attr( MYCRED_DEFAULT_TYPE_KEY ); ?>" />
663
  <?php
664
 
665
  }
671
  <hr />
672
 
673
  <div class="form-group" style="margin-bottom: 0;">
674
+ <label for="mycred-email-recipient-user"><?php esc_html_e( 'Recipient:', 'mycred' ); ?></label>
675
  <div class="inline-radio">
676
+ <label for="mycred-email-recipient-user"><input type="radio" name="mycred_email[recipient]" id="mycred-email-recipient-user" value="user" <?php checked( $email->settings['recipient'], 'user' ); ?> /> <?php esc_html_e( 'User', 'mycred' ); ?></label>
677
  </div>
678
  <div class="inline-radio">
679
+ <label for="mycred-email-recipient-admin"><input type="radio" name="mycred_email[recipient]" id="mycred-email-recipient-admin" value="admin" <?php checked( $email->settings['recipient'], 'admin' ); ?> /> <?php esc_html_e( 'Administrator', 'mycred' ); ?></label>
680
  </div>
681
  <div class="inline-radio">
682
+ <label for="mycred-email-recipient-both"><input type="radio" name="mycred_email[recipient]" id="mycred-email-recipient-both" value="both" <?php checked( $email->settings['recipient'], 'both' ); ?> /> <?php esc_html_e( 'Both', 'mycred' ); ?></label>
683
  </div>
684
  </div>
685
  </div>
706
  <div class="row">
707
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
708
  <div class="form-group">
709
+ <label for="mycred-email-senders-name"><?php esc_html_e( 'Senders Name:', 'mycred' ); ?></label>
710
  <input type="text" name="mycred_email[senders_name]" id="mycred-email-senders-name" class="form-control" value="<?php echo esc_attr( $email->settings['senders_name'] ); ?>" />
711
  </div>
712
  </div>
713
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
714
  <div class="form-group">
715
+ <label for="mycred-email-senders-email"><?php esc_html_e( 'Senders Email:', 'mycred' ); ?></label>
716
  <input type="text" name="mycred_email[senders_email]" id="mycred-email-senders-email" class="form-control" value="<?php echo esc_attr( $email->settings['senders_email'] ); ?>" />
717
  </div>
718
  </div>
719
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
720
  <div class="form-group">
721
+ <label for="mycred-email-reply-to"><?php esc_html_e( 'Reply-To Email:', 'mycred' ); ?></label>
722
  <input type="text" name="mycred_email[reply_to]" id="mycred-email-reply-to" class="form-control" value="<?php echo esc_attr( $email->settings['reply_to'] ); ?>" />
723
  </div>
724
  </div>
733
  <div class="row">
734
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
735
  <div class="form-group">
736
+ <label for="mycred-email-styling"><?php esc_html_e( 'CSS Styling', 'mycred' ); ?></label>
737
  <textarea name="mycred_email[styling]" class="form-control code" rows="10" cols="30" id="mycred-email-styling"><?php echo esc_html( $email->get_email_styling() ); ?></textarea>
738
  </div>
739
  </div>
757
  ?>
758
  <div class="row">
759
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
760
+ <h3><?php esc_html_e( 'Site Related', 'mycred' ); ?></h3>
761
  <div class="row">
762
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
763
  <strong>%blog_name%</strong>
764
  </div>
765
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
766
+ <div><?php esc_html_e( 'Your websites title', 'mycred' ); ?></div>
767
  </div>
768
  </div>
769
  <div class="row">
771
  <strong>%blog_url%</strong>
772
  </div>
773
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
774
+ <div><?php esc_html_e( 'Your websites address', 'mycred' ); ?></div>
775
  </div>
776
  </div>
777
  <div class="row">
779
  <strong>%blog_info%</strong>
780
  </div>
781
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
782
+ <div><?php esc_html_e( 'Your websites tagline (description)', 'mycred' ); ?></div>
783
  </div>
784
  </div>
785
  <div class="row">
787
  <strong>%admin_email%</strong>
788
  </div>
789
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
790
+ <div><?php esc_html_e( 'Your websites admin email', 'mycred' ); ?></div>
791
  </div>
792
  </div>
793
  <div class="row">
795
  <strong>%num_members%</strong>
796
  </div>
797
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
798
+ <div><?php esc_html_e( 'Total number of blog members', 'mycred' ); ?></div>
799
  </div>
800
  </div>
801
  </div>
802
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
803
+ <h3><?php esc_html_e( 'Instance Related', 'mycred' ); ?></h3>
804
  <div class="row">
805
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
806
  <strong>%new_balance%</strong>
807
  </div>
808
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
809
+ <div><?php esc_html_e( 'The users new balance', 'mycred' ); ?></div>
810
  </div>
811
  </div>
812
  <div class="row">
814
  <strong>%old_balance%</strong>
815
  </div>
816
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
817
+ <div><?php esc_html_e( 'The users old balance', 'mycred' ); ?></div>
818
  </div>
819
  </div>
820
  <div class="row">
822
  <strong>%amount%</strong>
823
  </div>
824
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
825
+ <div><?php esc_html_e( 'The amount of points gained or lost in this instance', 'mycred' ); ?></div>
826
  </div>
827
  </div>
828
  <div class="row">
830
  <strong>%entry%</strong>
831
  </div>
832
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
833
+ <div><?php esc_html_e( 'The log entry', 'mycred' ); ?></div>
834
  </div>
835
  </div>
836
  <div class="row">
837
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
838
+ <div><?php printf( esc_html__( 'You can also use %s.', 'mycred' ), '<a href="http://codex.mycred.me/category/template-tags/temp-user/" target="_blank">' . esc_html__( 'user related template tags', 'mycred' ) . '</a>' ); ?></div>
839
  </div>
840
  </div>
841
  </div>
842
  </div>
843
  <div class="row">
844
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
845
+ <h3><?php esc_html_e( 'Badge Related', 'mycred' ); ?></h3>
846
  <div class="row">
847
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
848
  <strong>%badge_title%</strong>
849
  </div>
850
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
851
+ <div><?php esc_html_e( 'Gained badge title', 'mycred' ); ?></div>
852
  </div>
853
  </div>
854
  <div class="row">
856
  <strong>%badge_image%</strong>
857
  </div>
858
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
859
+ <div><?php esc_html_e( 'Gained badge image', 'mycred' ); ?></div>
860
  </div>
861
  </div>
862
  </div>
863
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
864
+ <h3><?php esc_html_e( 'Rank Related', 'mycred' ); ?></h3>
865
  <div class="row">
866
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
867
  <strong>%rank_title%</strong>
868
  </div>
869
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
870
+ <div><?php esc_html_e( 'Users rank title', 'mycred' ); ?></div>
871
  </div>
872
  </div>
873
  <div class="row">
875
  <strong>%rank_image%</strong>
876
  </div>
877
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
878
+ <div><?php esc_html_e( 'Users rank image', 'mycred' ); ?></div>
879
  </div>
880
  </div>
881
  </div>
1225
  $this->emailnotices = mycred_apply_defaults( $this->default_prefs, $this->emailnotices );
1226
 
1227
  ?>
1228
+ <h4><span class="dashicons dashicons-admin-plugins static"></span><?php esc_html_e( 'Email Notices', 'mycred' ); ?></h4>
1229
  <div class="body" style="display:none;">
1230
 
1231
  <div class="row">
1232
  <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
1233
+ <h3><?php esc_html_e( 'Format', 'mycred' ); ?></h3>
1234
  <div class="form-group">
1235
  <div class="radio">
1236
+ <label for="<?php echo $this->field_id( array( 'use_html' => 'no' ) ); ?>"><input type="radio" name="<?php echo $this->field_name( 'use_html' ); ?>" id="<?php echo $this->field_id( array( 'use_html' => 'no' ) ); ?>" <?php checked( $this->emailnotices['use_html'], 0 ); ?> value="0" /> <?php esc_html_e( 'Plain Text', 'mycred' ); ?></label>
1237
  </div>
1238
  <div class="radio">
1239
  <label for="<?php echo $this->field_id( array( 'use_html' => 'yes' ) ); ?>"><input type="radio" name="<?php echo $this->field_name( 'use_html' ); ?>" id="<?php echo $this->field_id( array( 'use_html' => 'yes' ) ); ?>" <?php checked( $this->emailnotices['use_html'], 1 ); ?> value="1" /> HTML</label>
1241
  </div>
1242
  </div>
1243
  <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
1244
+ <h3><?php esc_html_e( 'Schedule', 'mycred' ); ?></h3>
1245
  <div class="form-group">
1246
  <?php if ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) : ?>
1247
  <input type="hidden" name="<?php echo $this->field_name( 'send' ); ?>" value="" />
1248
+ <p class="form-control-static"><?php esc_html_e( 'WordPress Cron is disabled. Emails will be sent immediately.', 'mycred' ); ?></p>
1249
  <?php else : ?>
1250
  <div class="radio">
1251
+ <label for="<?php echo $this->field_id( 'send' ); ?>"><input type="radio" name="<?php echo $this->field_name( 'send' ); ?>" id="<?php echo $this->field_id( 'send' ); ?>" <?php checked( $this->emailnotices['send'], '' ); ?> value="" /> <?php esc_html_e( 'Send emails immediately', 'mycred' ); ?></label>
1252
  </div>
1253
  <div class="radio">
1254
+ <label for="<?php echo $this->field_id( 'send' ); ?>-hourly"><input type="radio" name="<?php echo $this->field_name( 'send' ); ?>" id="<?php echo $this->field_id( 'send' ); ?>-hourly" <?php checked( $this->emailnotices['send'], 'hourly' ); ?> value="hourly" /> <?php esc_html_e( 'Send emails once an hour', 'mycred' ); ?></label>
1255
  </div>
1256
  <div class="radio">
1257
+ <label for="<?php echo $this->field_id( 'send' ); ?>-daily"><input type="radio" name="<?php echo $this->field_name( 'send' ); ?>" id="<?php echo $this->field_id( 'send' ); ?>-daily" <?php checked( $this->emailnotices['send'], 'daily' ); ?> value="daily" /> <?php esc_html_e( 'Send emails once a day', 'mycred' ); ?></label>
1258
  </div>
1259
  <?php endif; ?>
1260
  </div>
1261
  </div>
1262
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
1263
+ <h3><?php esc_html_e( 'Advanced', 'mycred' ); ?></h3>
1264
  <div class="form-group">
1265
  <div class="checkbox">
1266
+ <label for="<?php echo $this->field_id( array( 'filter' => 'subject' ) ); ?>"><input type="checkbox" name="<?php echo $this->field_name( array( 'filter' => 'subject' ) ); ?>" id="<?php echo $this->field_id( array( 'filter' => 'subject' ) ); ?>" <?php checked( $this->emailnotices['filter']['subject'], 1 ); ?> value="1" /> <?php esc_html_e( 'Filter Email Subjects', 'mycred' ); ?></label>
1267
  </div>
1268
  <div class="checkbox">
1269
+ <label for="<?php echo $this->field_id( array( 'filter' => 'content' ) ); ?>"><input type="checkbox" name="<?php echo $this->field_name( array( 'filter' => 'content' ) ); ?>" id="<?php echo $this->field_id( array( 'filter' => 'content' ) ); ?>" <?php checked( $this->emailnotices['filter']['content'], 1 ); ?> value="1" /> <?php esc_html_e( 'Filter Email Body', 'mycred' ); ?></label>
1270
  </div>
1271
  </div>
1272
  </div>
1275
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
1276
  <div class="form-group">
1277
  <div class="checkbox">
1278
+ <label for="<?php echo $this->field_id( 'override' ); ?>"><input type="checkbox" name="<?php echo $this->field_name( 'override' ); ?>" id="<?php echo $this->field_id( 'override' ); ?>" <?php checked( $this->emailnotices['override'], 1 ); ?> value="1" /> <?php esc_html_e( 'SMTP Debug. Enable if you are experiencing issues with wp_mail() or if you use a SMTP plugin for emails.', 'mycred' ); ?></label>
1279
  </div>
1280
  </div>
1281
  </div>
1282
  </div>
1283
 
1284
+ <h3 style="margin-bottom: 0;"><?php esc_html_e( 'Available Shortcodes', 'mycred' ); ?></h3>
1285
  <div class="row">
1286
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
1287
  <p><a href="http://codex.mycred.me/shortcodes/mycred_email_subscriptions/" target="_blank">[mycred_email_subscriptions]</a></p>
1288
  </div>
1289
  </div>
1290
 
1291
+ <h3><?php esc_html_e( 'Defaults', 'mycred' ); ?></h3>
1292
  <div class="row">
1293
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
1294
  <div class="form-group">
1295
+ <label for="<?php echo $this->field_id( array( 'from' => 'name' ) ); ?>"><?php esc_html_e( 'Senders Name:', 'mycred' ); ?></label>
1296
  <input type="text" name="<?php echo $this->field_name( array( 'from' => 'name' ) ); ?>" id="<?php echo $this->field_id( array( 'from' => 'name' ) ); ?>" value="<?php echo esc_attr( $this->emailnotices['from']['name'] ); ?>" class="form-control" />
1297
  </div>
1298
  </div>
1299
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
1300
  <div class="form-group">
1301
+ <label for="<?php echo $this->field_id( array( 'from' => 'email' ) ); ?>"><?php esc_html_e( 'Senders Email:', 'mycred' ); ?></label>
1302
  <input type="text" name="<?php echo $this->field_name( array( 'from' => 'email' ) ); ?>" id="<?php echo $this->field_id( array( 'from' => 'email' ) ); ?>" value="<?php echo esc_attr( $this->emailnotices['from']['email'] ); ?>" class="form-control" />
1303
  </div>
1304
  </div>
1305
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
1306
  <div class="form-group">
1307
+ <label for="<?php echo $this->field_id( array( 'from' => 'reply_to' ) ); ?>"><?php esc_html_e( 'Reply-To:', 'mycred' ); ?></label>
1308
  <input type="text" name="<?php echo $this->field_name( array( 'from' => 'reply_to' ) ); ?>" id="<?php echo $this->field_id( array( 'from' => 'reply_to' ) ); ?>" value="<?php echo esc_attr( $this->emailnotices['from']['reply_to'] ); ?>" class="form-control" />
1309
  </div>
1310
  </div>
1312
  <div class="row">
1313
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
1314
  <div class="form-group">
1315
+ <label for="<?php echo $this->field_id( 'content' ); ?>"><?php esc_html_e( 'Default Email Content', 'mycred' ); ?></label>
1316
  <textarea rows="10" cols="50" name="<?php echo $this->field_name( 'content' ); ?>" id="<?php echo $this->field_id( 'content' ); ?>" class="form-control"><?php echo esc_attr( $this->emailnotices['content'] ); ?></textarea>
1317
+ <p><span class="description"><?php esc_html_e( 'Default email content.', 'mycred' ); ?></span></p>
1318
  </div>
1319
  </div>
1320
  </div>
1321
  <div class="row">
1322
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
1323
  <div class="form-group">
1324
+ <label for="<?php echo $this->field_id( 'styling' ); ?>"><?php esc_html_e( 'Default CSS Styling', 'mycred' ); ?></label>
1325
  <textarea rows="10" cols="50" name="<?php echo $this->field_name( 'styling' ); ?>" id="<?php echo $this->field_id( 'styling' ); ?>" class="form-control"><?php echo esc_attr( $this->emailnotices['styling'] ); ?></textarea>
1326
+ <p><span class="description"><?php esc_html_e( 'Default email CSS styling. Note that if you intend to send HTML emails, you should use inline CSS styling for best results.', 'mycred' ); ?></span></p>
1327
  </div>
1328
  </div>
1329
  </div>
addons/notifications/myCRED-addon-notifications.php CHANGED
@@ -71,7 +71,7 @@ if ( ! class_exists( 'myCRED_Notifications_Module' ) ) :
71
  foreach ( (array) $notices as $notice ) {
72
 
73
  $notice = str_replace( array( "\r", "\n", "\t" ), '', $notice );
74
- echo '<!-- Notice --><script type="text/javascript">(function(jQuery){jQuery.noticeAdd({ text: "' . $notice . '",stay: ' . $stay . '});})(jQuery);</script>';
75
 
76
  }
77
 
@@ -187,32 +187,32 @@ if ( ! class_exists( 'myCRED_Notifications_Module' ) ) :
187
  $prefs = $this->notifications;
188
 
189
  ?>
190
- <h4><span class="dashicons dashicons-admin-plugins static"></span><?php _e( 'Notifications', 'mycred' ); ?></h4>
191
  <div class="body" style="display:none;">
192
 
193
- <h3><?php _e( 'Setup', 'mycred' ); ?></h3>
194
  <div class="row">
195
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
196
  <div class="form-group">
197
- <label for="<?php echo $this->field_id( 'template' ); ?>"><?php _e( 'Template', 'mycred' ); ?></label>
198
- <input type="text" name="<?php echo $this->field_name( 'template' ); ?>" id="<?php echo $this->field_id( 'template' ); ?>" value="<?php echo esc_attr( $prefs['template'] ); ?>" class="form-control" />
199
- <p><span class="description"><?php _e( 'Use %entry% to show the log entry in the notice and %amount% for the amount.', 'mycred' ); ?></span> <a href="javascript:void(0);" id="retore-default-notice"><?php _e( 'Restore to default', 'mycred' ); ?></a></p>
200
  </div>
201
  </div>
202
  </div>
203
  <div class="row">
204
  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
205
  <div class="form-group">
206
- <label for="<?php echo $this->field_id( 'life' ); ?>"><?php _e( 'Transient Lifespan', 'mycred' ); ?></label>
207
- <input type="text" name="<?php echo $this->field_name( 'life' ); ?>" id="<?php echo $this->field_id( 'life' ); ?>" value="<?php echo absint( $prefs['life'] ); ?>" class="form-control" />
208
- <p><span class="description"><?php _e( 'The number of days a users notification is saved before being automatically deleted.', 'mycred' ); ?></span></p>
209
  </div>
210
  </div>
211
  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
212
  <div class="form-group">
213
- <label for="<?php echo $this->field_id( 'duration' ); ?>"><?php _e( 'Duration', 'mycred' ); ?></label>
214
- <input type="number" name="<?php echo $this->field_name( 'duration' ); ?>" id="<?php echo $this->field_id( 'duration' ); ?>" value="<?php echo absint( $prefs['duration'] ); ?>" class="form-control" min="0" max="60" />
215
- <p><span class="description"><?php _e( 'Number of seconds before a notice is automatically removed after being shown to user. Use zero to disable.', 'mycred' ); ?></span></p>
216
  </div>
217
  </div>
218
  </div>
@@ -220,7 +220,7 @@ if ( ! class_exists( 'myCRED_Notifications_Module' ) ) :
220
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
221
  <div class="form-group">
222
  <div class="checkbox">
223
- <label for="<?php echo $this->field_id( 'use_css' ); ?>"><input type="checkbox" name="<?php echo $this->field_name( 'use_css' ); ?>" id="<?php echo $this->field_id( 'use_css' ); ?>" <?php checked( $prefs['use_css'], 1 ); ?> value="1" /> <?php _e( 'Use the included CSS Styling for notifications.', 'mycred' ); ?></label>
224
  </div>
225
  </div>
226
  </div>
@@ -239,7 +239,7 @@ if ( ! class_exists( 'myCRED_Notifications_Module' ) ) :
239
  jQuery(function($) {
240
 
241
  $( '#retore-default-notice' ).click(function(){
242
- $( '#<?php echo $this->field_id( 'template' ); ?>' ).val( '<?php echo $this->default_prefs['template']; ?>' );
243
  });
244
 
245
  });
71
  foreach ( (array) $notices as $notice ) {
72
 
73
  $notice = str_replace( array( "\r", "\n", "\t" ), '', $notice );
74
+ echo '<!-- Notice --><script type="text/javascript">(function(jQuery){jQuery.noticeAdd({ text: "' . wp_kses_post( $notice ) . '",stay: ' . esc_js( $stay ) . '});})(jQuery);</script>';
75
 
76
  }
77
 
187
  $prefs = $this->notifications;
188
 
189
  ?>
190
+ <h4><span class="dashicons dashicons-admin-plugins static"></span><?php esc_html_e( 'Notifications', 'mycred' ); ?></h4>
191
  <div class="body" style="display:none;">
192
 
193
+ <h3><?php esc_html_e( 'Setup', 'mycred' ); ?></h3>
194
  <div class="row">
195
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
196
  <div class="form-group">
197
+ <label for="<?php echo esc_attr( $this->field_id( 'template' ) ); ?>"><?php esc_html_e( 'Template', 'mycred' ); ?></label>
198
+ <input type="text" name="<?php echo esc_attr( $this->field_name( 'template' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'template' ) ); ?>" value="<?php echo esc_attr( $prefs['template'] ); ?>" class="form-control" />
199
+ <p><span class="description"><?php esc_html_e( 'Use %entry% to show the log entry in the notice and %amount% for the amount.', 'mycred' ); ?></span> <a href="javascript:void(0);" id="retore-default-notice"><?php esc_html_e( 'Restore to default', 'mycred' ); ?></a></p>
200
  </div>
201
  </div>
202
  </div>
203
  <div class="row">
204
  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
205
  <div class="form-group">
206
+ <label for="<?php echo esc_attr( $this->field_id( 'life' ) ); ?>"><?php esc_html_e( 'Transient Lifespan', 'mycred' ); ?></label>
207
+ <input type="text" name="<?php echo esc_attr( $this->field_name( 'life' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'life' ) ); ?>" value="<?php echo absint( $prefs['life'] ); ?>" class="form-control" />
208
+ <p><span class="description"><?php esc_html_e( 'The number of days a users notification is saved before being automatically deleted.', 'mycred' ); ?></span></p>
209
  </div>
210
  </div>
211
  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
212
  <div class="form-group">
213
+ <label for="<?php echo esc_attr( $this->field_id( 'duration' ) ); ?>"><?php esc_html_e( 'Duration', 'mycred' ); ?></label>
214
+ <input type="number" name="<?php echo esc_attr( $this->field_name( 'duration' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'duration' ) ); ?>" value="<?php echo absint( $prefs['duration'] ); ?>" class="form-control" min="0" max="60" />
215
+ <p><span class="description"><?php esc_html_e( 'Number of seconds before a notice is automatically removed after being shown to user. Use zero to disable.', 'mycred' ); ?></span></p>
216
  </div>
217
  </div>
218
  </div>
220
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
221
  <div class="form-group">
222
  <div class="checkbox">
223
+ <label for="<?php echo esc_attr( $this->field_id( 'use_css' ) ); ?>"><input type="checkbox" name="<?php echo esc_attr( $this->field_name( 'use_css' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'use_css' ) ); ?>" <?php checked( $prefs['use_css'], 1 ); ?> value="1" /> <?php esc_html_e( 'Use the included CSS Styling for notifications.', 'mycred' ); ?></label>
224
  </div>
225
  </div>
226
  </div>
239
  jQuery(function($) {
240
 
241
  $( '#retore-default-notice' ).click(function(){
242
+ $( '#<?php echo esc_attr( $this->field_id( 'template' ) ); ?>' ).val( '<?php echo esc_attr( $this->default_prefs['template'] ); ?>' );
243
  });
244
 
245
  });
addons/ranks/myCRED-addon-ranks.php CHANGED
@@ -232,8 +232,8 @@ if ( ! class_exists( 'myCRED_Ranks_Module' ) ) :
232
  */
233
  public function register_ranks() {
234
 
235
- if ( isset( $_GET['ctype'] ) && array_key_exists( $_GET['ctype'], $this->point_types ) && isset( $_GET['post_type'] ) && $_GET['post_type'] == MYCRED_RANK_KEY )
236
- $name = sprintf( __( 'Ranks for %s', 'mycred' ), $this->point_types[ $_GET['ctype'] ] );
237
  else
238
  $name = __( 'Ranks', 'mycred' );
239
 
@@ -392,7 +392,7 @@ if ( ! class_exists( 'myCRED_Ranks_Module' ) ) :
392
  if ( $path == 'post-new.php?post_type=' . MYCRED_RANK_KEY ) {
393
 
394
  if ( isset( $_GET['ctype'] ) )
395
- return get_site_url( $blog_id, 'wp-admin/', 'admin' ) . 'post-new.php?post_type=' . MYCRED_RANK_KEY . '&ctype=' . ( ( isset( $_GET['ctype'] ) ) ? $_GET['ctype'] : MYCRED_DEFAULT_TYPE_KEY );
396
 
397
  elseif ( isset( $post->post_type ) && $post->post_type == MYCRED_RANK_KEY && mycred_get_post_meta( $post->ID, 'ctype', true ) != '' )
398
  return get_site_url( $blog_id, 'wp-admin/', 'admin' ) . 'post-new.php?post_type=' . MYCRED_RANK_KEY . '&ctype=' . mycred_get_post_meta( $post->ID, 'ctype', true );
@@ -452,12 +452,12 @@ if ( ! class_exists( 'myCRED_Ranks_Module' ) ) :
452
  }
453
 
454
  // When editing a rank, we need to indicate that we are under the appropriate point type menu
455
- elseif ( $pagenow == 'post.php' && isset( $_GET['post'] ) && mycred_get_post_type( $_GET['post'] ) == MYCRED_RANK_KEY ) {
456
 
457
  if ( isset( $_GET['ctype'] ) && $_GET['ctype'] != MYCRED_DEFAULT_TYPE_KEY )
458
  return MYCRED_SLUG . '_' . sanitize_key( $_GET['ctype'] );
459
 
460
- $point_type = mycred_get_post_meta( $_GET['post'], 'ctype', true );
461
  $point_type = sanitize_key( $point_type );
462
 
463
  if ( $point_type != MYCRED_DEFAULT_TYPE_KEY )
@@ -484,19 +484,19 @@ if ( ! class_exists( 'myCRED_Ranks_Module' ) ) :
484
  if ( ( $pagenow == 'edit.php' || $pagenow == 'post-new.php' ) && isset( $_GET['post_type'] ) && $_GET['post_type'] == MYCRED_RANK_KEY ) {
485
 
486
  if ( isset( $_GET['ctype'] ) )
487
- return 'edit.php?post_type=' . MYCRED_RANK_KEY . '&ctype=' . $_GET['ctype'];
488
 
489
  return 'edit.php?post_type=' . MYCRED_RANK_KEY . '&ctype=' . MYCRED_DEFAULT_TYPE_KEY;
490
 
491
  }
492
 
493
  // When editing a rank, we need to highlight the "Ranks" submenu to indicate where we are
494
- elseif ( $pagenow == 'post.php' && isset( $_GET['post'] ) && mycred_get_post_type( $_GET['post'] ) == MYCRED_RANK_KEY ) {
495
 
496
  if ( isset( $_GET['ctype'] ) )
497
- return 'edit.php?post_type=' . MYCRED_RANK_KEY . '&ctype=' . $_GET['ctype'];
498
 
499
- $point_type = mycred_get_post_meta( $_GET['post'], 'ctype', true );
500
  $point_type = sanitize_key( $point_type );
501
 
502
  if ( $point_type != MYCRED_DEFAULT_TYPE_KEY )
@@ -782,7 +782,7 @@ if ( ! class_exists( 'myCRED_Ranks_Module' ) ) :
782
 
783
  if ( $output == '' ) return;
784
 
785
- echo '<div id="mycred-my-ranks">' . apply_filters( 'mycred_bp_rank_in_header', $output, $user_id, $this ) . '</div>';
786
 
787
  }
788
 
@@ -836,9 +836,9 @@ if ( ! class_exists( 'myCRED_Ranks_Module' ) ) :
836
  <div class="bp-widget mycred-field">
837
  <table class="profile-fields">
838
  <tr id="mycred-users-rank">
839
- <td class="label"><?php if ( $count == 1 ) _e( 'Rank', 'mycred' ); else _e( 'Ranks', 'mycred' ); ?></td>
840
  <td class="data">
841
- <?php echo apply_filters( 'mycred_bp_rank_in_profile', $output, $user_id, $this ); ?>
842
 
843
  </td>
844
  </tr>
@@ -894,7 +894,7 @@ if ( ! class_exists( 'myCRED_Ranks_Module' ) ) :
894
 
895
  if ( $output == '' ) return;
896
 
897
- echo '<div id="mycred-my-ranks">' . apply_filters( 'mycred_bb_rank_in_reply', $output, $user_id, $this ) . '</div>';
898
 
899
  }
900
 
@@ -942,7 +942,7 @@ if ( ! class_exists( 'myCRED_Ranks_Module' ) ) :
942
 
943
  if ( $output == '' ) return;
944
 
945
- echo '<div id="mycred-my-ranks">' . apply_filters( 'mycred_bb_rank_in_profile', $output, $user_id, $this ) . '</div>';
946
 
947
  }
948
 
@@ -1013,7 +1013,7 @@ if ( ! class_exists( 'myCRED_Ranks_Module' ) ) :
1013
  }
1014
 
1015
  if ( ! mycred_have_ranks( $point_type ) ) {
1016
- echo '<div class="balance-desc current-rank"><em>' . __( 'No ranks exists.', 'mycred' ) . '</em></div>';
1017
  return;
1018
  }
1019
 
@@ -1026,25 +1026,32 @@ if ( ! class_exists( 'myCRED_Ranks_Module' ) ) :
1026
  if ( $this->is_manual_mode( $point_type ) && mycred_is_admin( NULL, $point_type ) ) {
1027
 
1028
  $ranks = mycred_get_ranks( 'publish', '-1', 'DESC', $point_type );
1029
- echo '<div class="balance-desc current-rank"><select name="rank-' . $point_type . '" id="mycred-rank">';
1030
 
1031
- echo '<option value=""';
1032
  if ( $users_rank === false )
1033
- echo ' selected="selected"';
1034
- echo '>' . __( 'No rank', 'mycred' ) . '</option>';
1035
 
1036
  foreach ( $ranks as $rank ) {
1037
- echo '<option value="' . $rank->post_id . '"';
1038
  if ( ! empty( $users_rank ) && $users_rank->post_id == $rank->post_id ) echo ' selected="selected"';
1039
- echo '>' . $rank->title . '</option>';
1040
  }
1041
 
1042
- echo '</select></div>';
1043
 
 
 
 
 
 
 
 
1044
  }
1045
  else {
1046
 
1047
- echo '<div class="balance-desc current-rank">' . sprintf( '<strong>%s:</strong> %s', __( 'Rank', 'mycred' ), $rank_title ) . '</div>';
1048
 
1049
  }
1050
 
@@ -1126,13 +1133,13 @@ if ( ! class_exists( 'myCRED_Ranks_Module' ) ) :
1126
 
1127
  wp_enqueue_style( 'mycred-admin' );
1128
 
1129
- if ( isset( $_GET['ctype'] ) && array_key_exists( $_GET['ctype'], $this->point_types ) ) :
1130
 
1131
  wp_localize_script(
1132
  'mycred-rank-tweaks',
1133
  'myCRED_Ranks',
1134
  array(
1135
- 'rank_ctype' => $_GET['ctype']
1136
  )
1137
  );
1138
  wp_enqueue_script( 'mycred-rank-tweaks' );
@@ -1207,7 +1214,7 @@ if ( ! class_exists( 'myCRED_Ranks_Module' ) ) :
1207
  }
1208
 
1209
  // Otherwise if ctype is set and it is a point type filter the results
1210
- elseif ( isset( $_GET['ctype'] ) && array_key_exists( $_GET['ctype'], $this->point_types ) ) {
1211
  $query->set( 'meta_query', array(
1212
  array(
1213
  'key' => 'ctype',
@@ -1226,11 +1233,11 @@ if ( ! class_exists( 'myCRED_Ranks_Module' ) ) :
1226
  if ( ! isset( $query->query['post_type'] ) || $query->query['post_type'] != MYCRED_RANK_KEY ) return;
1227
 
1228
  // If ctype is set, filter ranks according to it's value
1229
- if ( isset( $_GET['ctype'] ) && array_key_exists( $_GET['ctype'], $this->point_types ) ) {
1230
  $query->set( 'meta_query', array(
1231
  array(
1232
  'key' => 'ctype',
1233
- 'value' => $_GET['ctype'],
1234
  'compare' => '='
1235
  )
1236
  ) );
@@ -1287,9 +1294,9 @@ if ( ! class_exists( 'myCRED_Ranks_Module' ) ) :
1287
  if ( $column_name == 'mycred-rank-logo' ) {
1288
  $logo = mycred_get_rank_logo( $post_id, 'thumbnail' );
1289
  if ( empty( $logo ) )
1290
- echo __( 'No Logo Set', 'mycred' );
1291
  else
1292
- echo $logo;
1293
 
1294
  }
1295
 
@@ -1310,14 +1317,14 @@ if ( ! class_exists( 'myCRED_Ranks_Module' ) ) :
1310
  $max = __( 'Any Value', 'mycred' );
1311
 
1312
  $max = $mycred->template_tags_general( __( 'Maximum %plural%', 'mycred' ) ) . ': ' . $max;
1313
- echo $min . '<br />' . $max;
1314
 
1315
  }
1316
 
1317
  // Rank Users (user list)
1318
  elseif ( $column_name == 'mycred-rank-users' ) {
1319
 
1320
- echo mycred_count_users_with_rank( $post_id );
1321
 
1322
  }
1323
 
@@ -1325,9 +1332,9 @@ if ( ! class_exists( 'myCRED_Ranks_Module' ) ) :
1325
  if ( $column_name == 'mycred-rank-type' ) {
1326
 
1327
  if ( isset( $this->point_types[ $type ] ) )
1328
- echo $this->point_types[ $type ];
1329
  else
1330
- echo $this->core->plural();
1331
 
1332
  }
1333
 
@@ -1416,13 +1423,13 @@ if ( ! class_exists( 'myCRED_Ranks_Module' ) ) :
1416
  <div class="row">
1417
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1418
  <div class="form-group">
1419
- <label for="mycred-rank-min"><?php _e( 'Minimum Balance Requirement', 'mycred' ); ?></label>
1420
  <input type="text" name="mycred_rank[mycred_rank_min]" id="mycred-rank-min" class="form-control" value="<?php echo esc_attr( $rank->minimum ); ?>" />
1421
  </div>
1422
  </div>
1423
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1424
  <div class="form-group">
1425
- <label for="mycred-rank-max"><?php _e( 'Maximum Balance Requirement', 'mycred' ); ?></label>
1426
  <input type="text" name="mycred_rank[mycred_rank_max]" id="mycred-rank-max" class="form-control" value="<?php echo esc_attr( $rank->maximum ); ?>" />
1427
  </div>
1428
  </div>
@@ -1433,16 +1440,16 @@ if ( ! class_exists( 'myCRED_Ranks_Module' ) ) :
1433
  <?php if ( count( $this->point_types ) > 1 ) : ?>
1434
 
1435
  <div class="form-group">
1436
- <label for="mycred-rank-point-type"><?php _e( 'Point Type', 'mycred' ); ?></label>
1437
  <?php mycred_types_select_from_dropdown( 'mycred_rank[ctype]', 'mycred-rank-point-type', $type, false, ' class="form-control"' ); ?>
1438
  </div>
1439
 
1440
  <?php else : ?>
1441
 
1442
  <div class="form-group">
1443
- <label for="mycred-rank-point-type"><?php _e( 'Point Type', 'mycred' ); ?></label>
1444
- <p class="form-control-static"><?php echo $mycred->plural(); ?></p>
1445
- <input type="hidden" name="mycred_rank[ctype]" value="<?php echo MYCRED_DEFAULT_TYPE_KEY; ?>" />
1446
  </div>
1447
 
1448
  <?php endif; ?>
@@ -1464,7 +1471,7 @@ if ( ! class_exists( 'myCRED_Ranks_Module' ) ) :
1464
  if ( $rank->minimum == '' ) $rank->minimum = __( 'Not Set', 'mycred' );
1465
  if ( $rank->maximum == '' ) $rank->maximum = __( 'Not Set', 'mycred' );
1466
 
1467
- echo '<li><strong>' . $rank->title . '</strong> ' . $rank->minimum . ' - ' . $rank->maximum . '</li>';
1468
 
1469
  }
1470
  echo '</ul>';
@@ -1472,7 +1479,7 @@ if ( ! class_exists( 'myCRED_Ranks_Module' ) ) :
1472
  }
1473
  else {
1474
 
1475
- echo '<p>' . __( 'No ranks found', 'mycred' ) . '.</p>';
1476
 
1477
  }
1478
 
@@ -1494,7 +1501,7 @@ if ( ! class_exists( 'myCRED_Ranks_Module' ) ) :
1494
  // Make sure fields exists
1495
  if ( $post === NULL || ! $this->core->user_is_point_editor() || ! isset( $_POST['mycred_rank'] ) ) return;
1496
 
1497
- $point_type = sanitize_key( $_POST['mycred_rank']['ctype'] );
1498
  if ( ! array_key_exists( $point_type, $this->point_types ) )
1499
  $point_type = MYCRED_DEFAULT_TYPE_KEY;
1500
 
@@ -1502,7 +1509,7 @@ if ( ! class_exists( 'myCRED_Ranks_Module' ) ) :
1502
 
1503
  $type_object = new myCRED_Point_Type( $point_type );
1504
 
1505
- foreach ( $_POST['mycred_rank'] as $meta_key => $meta_value ) {
1506
 
1507
  if ( $meta_key == 'ctype' ) continue;
1508
 
@@ -1551,56 +1558,56 @@ if ( ! class_exists( 'myCRED_Ranks_Module' ) ) :
1551
  $box = ( ( $prefs['base'] == 'current' ) ? 'display: none;' : 'display: block;' );
1552
 
1553
  ?>
1554
- <h4><span class="dashicons dashicons-admin-plugins static"></span><?php _e( 'Ranks', 'mycred' ); ?></h4>
1555
  <div class="body" style="display:none;">
1556
 
1557
  <?php if ( $mycred->mycred_type == MYCRED_DEFAULT_TYPE_KEY ) : ?>
1558
 
1559
  <div class="row">
1560
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1561
- <h3><?php _e( 'Rank Features', 'mycred' ); ?></h3>
1562
  <div class="form-group">
1563
  <div class="checkbox">
1564
- <label><input type="checkbox" value="1" checked="checked" disabled="disabled" /> <?php _e( 'Title', 'mycred' ); ?></label>
1565
  </div>
1566
  <div class="checkbox">
1567
- <label><input type="checkbox" value="1" checked="checked" disabled="disabled" /> <?php echo $mycred->core->template_tags_general( __( '%plural% requirement', 'mycred' ) ); ?></label>
1568
  </div>
1569
  <div class="checkbox">
1570
- <label><input type="checkbox" value="1" checked="checked" disabled="disabled" /> <?php _e( 'Rank Logo', 'mycred' ); ?></label>
1571
  </div>
1572
  <div class="checkbox">
1573
- <label for="<?php echo $this->field_id( array( 'support' => 'content' ) ); ?>"><input type="checkbox" name="<?php echo $this->field_name( array( 'support' => 'content' ) ); ?>" id="<?php echo $this->field_id( array( 'support' => 'content' ) ); ?>" <?php checked( $prefs['support']['content'], 1 ); ?> value="1" /> <?php _e( 'Content', 'mycred' ); ?></label>
1574
  </div>
1575
  <div class="checkbox">
1576
- <label for="<?php echo $this->field_id( array( 'support' => 'excerpt' ) ); ?>"><input type="checkbox" name="<?php echo $this->field_name( array( 'support' => 'excerpt' ) ); ?>" id="<?php echo $this->field_id( array( 'support' => 'excerpt' ) ); ?>" <?php checked( $prefs['support']['excerpt'], 1 ); ?> value="1" /> <?php _e( 'Excerpt', 'mycred' ); ?></label>
1577
  </div>
1578
  <div class="checkbox">
1579
- <label for="<?php echo $this->field_id( array( 'support' => 'comments' ) ); ?>"><input type="checkbox" name="<?php echo $this->field_name( array( 'support' => 'comments' ) ); ?>" id="<?php echo $this->field_id( array( 'support' => 'comments' ) ); ?>" <?php checked( $prefs['support']['comments'], 1 ); ?> value="1" /> <?php _e( 'Comments', 'mycred' ); ?></label>
1580
  </div>
1581
  <div class="checkbox">
1582
- <label for="<?php echo $this->field_id( array( 'support' => 'page-attributes' ) ); ?>"><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( $prefs['support']['page-attributes'], 1 ); ?> value="1" /> <?php _e( 'Page Attributes', 'mycred' ); ?></label>
1583
  </div>
1584
  <div class="checkbox">
1585
- <label for="<?php echo $this->field_id( array( 'support' => 'custom-fields' ) ); ?>"><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( $prefs['support']['custom-fields'], 1 ); ?> value="1" /> <?php _e( 'Custom Fields', 'mycred' ); ?></label>
1586
  </div>
1587
  </div>
1588
  </div>
1589
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1590
- <h3><?php _e( 'Rank Post Type', 'mycred' ); ?></h3>
1591
  <div class="form-group">
1592
  <div class="checkbox">
1593
- <label for="<?php echo $this->field_id( 'public' ); ?>"><input type="checkbox" name="<?php echo $this->field_name( 'public' ); ?>" id="<?php echo $this->field_id( 'public' ); ?>" <?php checked( $prefs['public'], 1 ); ?> value="1" /> <?php _e( 'Make Ranks Public', 'mycred' ); ?></label>
1594
  </div>
1595
  </div>
1596
  <div class="form-group">
1597
- <label class="subheader" for="<?php echo $this->field_id( 'slug' ); ?>"><?php _e( 'Rank SLUG', 'mycred' ); ?></label>
1598
- <input type="text" name="<?php echo $this->field_name( 'slug' ); ?>" id="<?php echo $this->field_id( 'slug' ); ?>" value="<?php echo esc_attr( $prefs['slug'] ); ?>" class="form-control" />
1599
- <p><span class="description"><?php _e( 'If you have selected to make Ranks public, you can select what rank archive URL slug you want to use. Ignored if Ranks are not set to be public.', 'mycred' ); ?></span></p>
1600
  </div>
1601
  <div class="form-group">
1602
- <label for="<?php echo $this->field_id( 'order' ); ?>"><?php _e( 'Display Order', 'mycred' ); ?></label>
1603
- <select name="<?php echo $this->field_name( 'order' ); ?>" id="<?php echo $this->field_id( 'order' ); ?>" class="form-control">
1604
  <?php
1605
 
1606
  // Order added in 1.1.1
@@ -1608,65 +1615,68 @@ if ( ! class_exists( 'myCRED_Ranks_Module' ) ) :
1608
  'ASC' => __( 'Ascending - Lowest rank to highest', 'mycred' ),
1609
  'DESC' => __( 'Descending - Highest rank to lowest', 'mycred' )
1610
  );
1611
- foreach ( $options as $option_value => $option_label ) {
1612
- echo '<option value="' . $option_value . '"';
1613
- if ( $prefs['order'] == $option_value ) echo ' selected="selected"';
1614
- echo '>' . $option_label . '</option>';
 
 
 
1615
  }
1616
 
1617
  ?>
1618
 
1619
  </select>
1620
- <p><span class="description"><?php _e( 'Option to set in which order Ranks should be shown on the archive page.', 'mycred' ); ?></span></p>
1621
  </div>
1622
  </div>
1623
  </div>
1624
 
1625
  <?php endif; ?>
1626
 
1627
- <h3><?php _e( 'Rank Behaviour', 'mycred' ); ?></h3>
1628
  <div class="row">
1629
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
1630
  <div class="form-group">
1631
  <div class="radio">
1632
- <label for="<?php echo $this->field_id( array( 'base' => 'manual' ) ); ?>"><input type="radio" name="<?php echo $this->field_name( 'base' ); ?>" id="<?php echo $this->field_id( array( 'base' => 'manual' ) ); ?>"<?php checked( $prefs['base'], 'manual' ); ?> value="manual" /> <?php _e( 'Manual Mode', 'mycred' ); ?></label>
1633
  </div>
1634
- <p><span class="description"><?php _e( 'Ranks are assigned manually for each user.', 'mycred' ); ?></span></p>
1635
  </div>
1636
  </div>
1637
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
1638
  <div class="form-group">
1639
  <div class="radio">
1640
- <label for="<?php echo $this->field_id( array( 'base' => 'current' ) ); ?>"><input type="radio" name="<?php echo $this->field_name( 'base' ); ?>" id="<?php echo $this->field_id( array( 'base' => 'current' ) ); ?>"<?php checked( $prefs['base'], 'current' ); ?> value="current" /> <?php _e( 'Based on Current Balances', 'mycred' ); ?></label>
1641
  </div>
1642
- <p><span class="description"><?php _e( 'Users can be promoted or demoted depending on where their balance fits in amongst your ranks.', 'mycred' ); ?></span></p>
1643
  </div>
1644
  </div>
1645
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
1646
  <div class="form-group">
1647
  <div class="radio">
1648
- <label for="<?php echo $this->field_id( array( 'base' => 'total' ) ); ?>"><input type="radio" name="<?php echo $this->field_name( 'base' ); ?>" id="<?php echo $this->field_id( array( 'base' => 'total' ) ); ?>"<?php checked( $prefs['base'], 'total' ); ?> value="total" /> <?php _e( 'Based on Total Balances', 'mycred' ); ?></label>
1649
  </div>
1650
- <p><span class="description"><?php _e( 'Users can only be promoted and gain higher ranks even if their balance decreases.', 'mycred' ); ?></span></p>
1651
  </div>
1652
  </div>
1653
  </div>
1654
 
1655
- <div class="row" id="mycred-rank-based-on-wrapper" style="<?php echo $box; ?>">
1656
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
1657
- <h3><?php _e( 'Tools', 'mycred' ); ?></h3>
1658
- <p><span class="description"><?php _e( 'Use this button to calculate or recalculate each individual users total balance if you think your users total balances are incorrect, or if you switch from Ranks being based on users current balance to total balance.', 'mycred' ); ?></span></p>
1659
- <p><input type="button" name="mycred-update-totals" data-type="<?php echo $mycred->mycred_type; ?>" id="mycred-update-totals" value="<?php _e( 'Calculate Totals', 'mycred' ); ?>" class="button button-large button-<?php if ( $prefs['base'] == 'current' ) echo 'secondary'; else echo 'primary'; ?>"<?php if ( $prefs['base'] == 'current' ) echo ' disabled="disabled"'; ?> /></p>
1660
  </div>
1661
  </div>
1662
 
1663
- <h3><?php _e( 'Third-party Integrations', 'mycred' ); ?></h3>
1664
  <div class="row">
1665
  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
1666
  <div class="form-group">
1667
- <label for="<?php echo $this->field_id( 'bb_location' ); ?>">BuddyPress</label>
1668
  <?php if ( $buddypress ) : ?>
1669
- <select name="<?php echo $this->field_name( 'bb_location' ); ?>" id="<?php echo $this->field_id( 'bb_location' ); ?>" class="form-control">
1670
  <?php
1671
 
1672
  if ( ! array_key_exists( 'bb_location', $prefs ) )
@@ -1682,10 +1692,13 @@ if ( ! class_exists( 'myCRED_Ranks_Module' ) ) :
1682
  'both' => __( 'Include under the "Profile" tab and Profile Header.', 'mycred' )
1683
  );
1684
 
1685
- foreach ( $rank_locations as $value => $label ) {
1686
- echo '<option value="' . $value . '"';
1687
- if ( $prefs['bb_location'] == $value ) echo ' selected="selected"';
1688
- echo '>' . $label . '</option>';
 
 
 
1689
  }
1690
 
1691
  ?>
@@ -1693,21 +1706,21 @@ if ( ! class_exists( 'myCRED_Ranks_Module' ) ) :
1693
  </select>
1694
  </div>
1695
  <div class="form-group">
1696
- <label for="<?php echo $this->field_id( 'bb_template' ); ?>"><?php _e( 'Template', 'mycred' ); ?></label>
1697
- <textarea name="<?php echo $this->field_name( 'bb_template' ); ?>" id="<?php echo $this->field_id( 'bb_template' ); ?>" rows="5" cols="50" class="form-control"><?php echo esc_attr( $prefs['bb_template'] ); ?></textarea>
1698
- <p><span class="description"><?php _e( 'Template to use when showing a users Rank in BuddyPress. Use %rank_title% for the title and %rank_logo% to show the rank logo. HTML is allowed.', 'mycred' ); ?></span></p>
1699
  <?php else : ?>
1700
- <input type="hidden" name="<?php echo $this->field_name( 'bb_location' ); ?>" value="" />
1701
- <input type="hidden" name="<?php echo $this->field_name( 'bb_template' ); ?>" value="" />
1702
- <p><span class="description"><?php _e( 'Not installed', 'mycred' ); ?></span></p>
1703
  <?php endif; ?>
1704
  </div>
1705
  </div>
1706
  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
1707
  <div class="form-group">
1708
- <label for="<?php echo $this->field_id( 'bp_location' ); ?>">bbPress</label>
1709
  <?php if ( $bbpress ) : ?>
1710
- <select name="<?php echo $this->field_name( 'bp_location' ); ?>" id="<?php echo $this->field_id( 'bp_location' ); ?>" class="form-control">
1711
  <?php
1712
 
1713
  if ( ! array_key_exists( 'bp_location', $prefs ) )
@@ -1723,10 +1736,12 @@ if ( ! class_exists( 'myCRED_Ranks_Module' ) ) :
1723
  'both' => __( 'Include in Topic Replies and Profile', 'mycred' )
1724
  );
1725
 
1726
- foreach ( $rank_locations as $value => $label ) {
1727
- echo '<option value="' . $value . '"';
1728
- if ( $prefs['bp_location'] == $value ) echo ' selected="selected"';
1729
- echo '>' . $label . '</option>';
 
 
1730
  }
1731
 
1732
  ?>
@@ -1734,19 +1749,19 @@ if ( ! class_exists( 'myCRED_Ranks_Module' ) ) :
1734
  </select>
1735
  </div>
1736
  <div class="form-group">
1737
- <label for="<?php echo $this->field_id( 'bp_template' ); ?>"><?php _e( 'Template', 'mycred' ); ?></label>
1738
- <textarea name="<?php echo $this->field_name( 'bp_template' ); ?>" id="<?php echo $this->field_id( 'bp_template' ); ?>" rows="5" cols="50" class="form-control"><?php echo esc_attr( $prefs['bp_template'] ); ?></textarea>
1739
- <p><span class="description"><?php _e( 'Template to use when showing a users Rank in BuddyPress. Use %rank_title% for the title and %rank_logo% to show the rank logo. HTML is allowed.', 'mycred' ); ?></span></p>
1740
  <?php else : ?>
1741
- <input type="hidden" name="<?php echo $this->field_name( 'bp_location' ); ?>" value="" />
1742
- <input type="hidden" name="<?php echo $this->field_name( 'bp_template' ); ?>" value="" />
1743
- <p><span class="description"><?php _e( 'Not installed', 'mycred' ); ?></span></p>
1744
  <?php endif; ?>
1745
  </div>
1746
  </div>
1747
  </div>
1748
 
1749
- <h3 style="margin-bottom: 0;"><?php _e( 'Available Shortcodes', 'mycred' ); ?></h3>
1750
  <div class="row">
1751
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
1752
  <p><a href="http://codex.mycred.me/shortcodes/mycred_my_rank/" target="_blank">[mycred_my_rank]</a>, <a href="http://codex.mycred.me/shortcodes/mycred_my_ranks/" target="_blank">[mycred_my_ranks]</a>, <a href="http://codex.mycred.me/shortcodes/mycred_list_ranks/" target="_blank">[mycred_list_ranks]</a>, <a href="http://codex.mycred.me/shortcodes/mycred_users_of_all_ranks/" target="_blank">[mycred_users_of_all_ranks]</a>, <a href="http://codex.mycred.me/shortcodes/mycred_users_of_rank/" target="_blank">[mycred_users_of_rank]</a></p>
@@ -1762,11 +1777,11 @@ jQuery(function($){
1762
  type : "POST",
1763
  data : {
1764
  action : 'mycred-calc-totals',
1765
- token : '<?php echo wp_create_nonce( 'mycred-calc-totals' ); ?>',
1766
  ctype : pointtype
1767
  },
1768
  dataType : "JSON",
1769
- url : '<?php echo admin_url( 'admin-ajax.php' ); ?>',
1770
  beforeSend : function() {
1771
  button.attr( 'disabled', 'disabled' ).removeClass( 'button-primary' ).addClass( 'button-seconday' ).val( '<?php echo esc_js( esc_attr__( 'Processing...', 'mycred' ) ); ?>' );
1772
  },
@@ -1777,7 +1792,7 @@ jQuery(function($){
1777
 
1778
  };
1779
 
1780
- $( 'input[name="<?php echo $this->field_name( 'base' ); ?>"]' ).change(function(){
1781
 
1782
  var button = $( '#mycred-update-totals' );
1783
  var hiddenrow = $( '#mycred-rank-based-on-wrapper' );
@@ -1853,19 +1868,19 @@ jQuery(function($){
1853
  $rank_meta_key .= $mycred->mycred_type;
1854
 
1855
  ?>
1856
- <label class="subheader"><?php _e( 'Ranks', 'mycred' ); ?></label>
1857
  <ol id="myCRED-rank-actions" class="inline">
1858
  <li>
1859
- <label><?php _e( 'User Meta Key', 'mycred' ); ?></label>
1860
- <div class="h2"><input type="text" id="mycred-rank-post-type" disabled="disabled" value="<?php echo $rank_meta_key; ?>" class="readonly" /></div>
1861
  </li>
1862
  <li>
1863
- <label><?php _e( 'No. of ranks', 'mycred' ); ?></label>
1864
- <div class="h2"><input type="text" id="mycred-ranks-no-of-ranks" disabled="disabled" value="<?php echo $count; ?>" class="readonly short" /></div>
1865
  </li>
1866
  <li>
1867
- <label><?php _e( 'Actions', 'mycred' ); ?></label>
1868
- <div class="h2"><input type="button" id="mycred-manage-action-reset-ranks" data-type="<?php echo $mycred->mycred_type; ?>" value="<?php _e( 'Remove All Ranks', 'mycred' ); ?>" class="button button-large large <?php if ( $reset_block ) echo '" disabled="disabled'; else echo 'button-primary'; ?>" /><?php if ( ! $this->is_manual_mode( $mycred->mycred_type ) ) : ?> <input type="button" id="mycred-manage-action-assign-ranks" data-type="<?php echo $mycred->mycred_type; ?>" value="<?php _e( 'Assign Ranks to Users', 'mycred' ); ?>" class="button button-large large <?php if ( $reset_block ) echo '" disabled="disabled'; ?>" /></div><?php endif; ?>
1869
  </li>
1870
  </ol>
1871
  <?php
232
  */
233
  public function register_ranks() {
234
 
235
+ if ( isset( $_GET['ctype'] ) && array_key_exists( sanitize_text_field( wp_unslash( $_GET['ctype'] ) ), $this->point_types ) && isset( $_GET['post_type'] ) && $_GET['post_type'] == MYCRED_RANK_KEY )
236
+ $name = sprintf( __( 'Ranks for %s', 'mycred' ), $this->point_types[ sanitize_text_field( wp_unslash( $_GET['ctype'] ) ) ] );
237
  else
238
  $name = __( 'Ranks', 'mycred' );
239
 
392
  if ( $path == 'post-new.php?post_type=' . MYCRED_RANK_KEY ) {
393
 
394
  if ( isset( $_GET['ctype'] ) )
395
+ return get_site_url( $blog_id, 'wp-admin/', 'admin' ) . 'post-new.php?post_type=' . MYCRED_RANK_KEY . '&ctype=' . ( ( isset( $_GET['ctype'] ) ) ? sanitize_text_field( wp_unslash( $_GET['ctype'] ) ) : MYCRED_DEFAULT_TYPE_KEY );
396
 
397
  elseif ( isset( $post->post_type ) && $post->post_type == MYCRED_RANK_KEY && mycred_get_post_meta( $post->ID, 'ctype', true ) != '' )
398
  return get_site_url( $blog_id, 'wp-admin/', 'admin' ) . 'post-new.php?post_type=' . MYCRED_RANK_KEY . '&ctype=' . mycred_get_post_meta( $post->ID, 'ctype', true );
452
  }
453
 
454
  // When editing a rank, we need to indicate that we are under the appropriate point type menu
455
+ elseif ( $pagenow == 'post.php' && isset( $_GET['post'] ) && mycred_get_post_type( sanitize_text_field( wp_unslash( $_GET['post'] ) ) ) == MYCRED_RANK_KEY ) {
456
 
457
  if ( isset( $_GET['ctype'] ) && $_GET['ctype'] != MYCRED_DEFAULT_TYPE_KEY )
458
  return MYCRED_SLUG . '_' . sanitize_key( $_GET['ctype'] );
459
 
460
+ $point_type = mycred_get_post_meta( sanitize_text_field( wp_unslash( $_GET['post'] ) ), 'ctype', true );
461
  $point_type = sanitize_key( $point_type );
462
 
463
  if ( $point_type != MYCRED_DEFAULT_TYPE_KEY )
484
  if ( ( $pagenow == 'edit.php' || $pagenow == 'post-new.php' ) && isset( $_GET['post_type'] ) && $_GET['post_type'] == MYCRED_RANK_KEY ) {
485
 
486
  if ( isset( $_GET['ctype'] ) )
487
+ return 'edit.php?post_type=' . MYCRED_RANK_KEY . '&ctype=' . sanitize_text_field( wp_unslash( $_GET['ctype'] ) );
488
 
489
  return 'edit.php?post_type=' . MYCRED_RANK_KEY . '&ctype=' . MYCRED_DEFAULT_TYPE_KEY;
490
 
491
  }
492
 
493
  // When editing a rank, we need to highlight the "Ranks" submenu to indicate where we are
494
+ elseif ( $pagenow == 'post.php' && isset( $_GET['post'] ) && mycred_get_post_type( sanitize_text_field( wp_unslash( $_GET['post'] ) ) ) == MYCRED_RANK_KEY ) {
495
 
496
  if ( isset( $_GET['ctype'] ) )
497
+ return 'edit.php?post_type=' . MYCRED_RANK_KEY . '&ctype=' . sanitize_text_field( wp_unslash( $_GET['ctype'] ) );
498
 
499
+ $point_type = mycred_get_post_meta( sanitize_text_field( wp_unslash( $_GET['post'] ) ), 'ctype', true );
500
  $point_type = sanitize_key( $point_type );
501
 
502
  if ( $point_type != MYCRED_DEFAULT_TYPE_KEY )
782
 
783
  if ( $output == '' ) return;
784
 
785
+ echo wp_kses_post( '<div id="mycred-my-ranks">' . apply_filters( 'mycred_bp_rank_in_header', $output, $user_id, $this ) . '</div>' );
786
 
787
  }
788
 
836
  <div class="bp-widget mycred-field">
837
  <table class="profile-fields">
838
  <tr id="mycred-users-rank">
839
+ <td class="label"><?php if ( $count == 1 ) esc_html_e( 'Rank', 'mycred' ); else esc_html_e( 'Ranks', 'mycred' ); ?></td>
840
  <td class="data">
841
+ <?php echo wp_kses_post( apply_filters( 'mycred_bp_rank_in_profile', $output, $user_id, $this ) ); ?>
842
 
843
  </td>
844
  </tr>
894
 
895
  if ( $output == '' ) return;
896
 
897
+ echo wp_kses_post( '<div id="mycred-my-ranks">' . apply_filters( 'mycred_bb_rank_in_reply', $output, $user_id, $this ) . '</div>' );
898
 
899
  }
900
 
942
 
943
  if ( $output == '' ) return;
944
 
945
+ echo wp_kses_post( '<div id="mycred-my-ranks">' . apply_filters( 'mycred_bb_rank_in_profile', $output, $user_id, $this ) . '</div>' );
946
 
947
  }
948
 
1013
  }
1014
 
1015
  if ( ! mycred_have_ranks( $point_type ) ) {
1016
+ echo wp_kses_post( '<div class="balance-desc current-rank"><em>' . __( 'No ranks exists.', 'mycred' ) . '</em></div>' );
1017
  return;
1018
  }
1019
 
1026
  if ( $this->is_manual_mode( $point_type ) && mycred_is_admin( NULL, $point_type ) ) {
1027
 
1028
  $ranks = mycred_get_ranks( 'publish', '-1', 'DESC', $point_type );
1029
+ $rank_dropdown = '<div class="balance-desc current-rank"><select name="rank-' . $point_type . '" id="mycred-rank">';
1030
 
1031
+ $rank_dropdown .= '<option value=""';
1032
  if ( $users_rank === false )
1033
+ $rank_dropdown .= ' selected="selected"';
1034
+ $rank_dropdown .= '>' . __( 'No rank', 'mycred' ) . '</option>';
1035
 
1036
  foreach ( $ranks as $rank ) {
1037
+ $rank_dropdown .= '<option value="' . $rank->post_id . '"';
1038
  if ( ! empty( $users_rank ) && $users_rank->post_id == $rank->post_id ) echo ' selected="selected"';
1039
+ $rank_dropdown .= '>' . $rank->title . '</option>';
1040
  }
1041
 
1042
+ $rank_dropdown .= '</select></div>';
1043
 
1044
+ $allowed_html = array(
1045
+ 'div' => array(),
1046
+ 'select' => array(),
1047
+ 'option' => array()
1048
+ );
1049
+
1050
+ echo wp_kses( $rank_dropdown, $allowed_html );
1051
  }
1052
  else {
1053
 
1054
+ echo wp_kses_post( '<div class="balance-desc current-rank">' . sprintf( '<strong>%s:</strong> %s', __( 'Rank', 'mycred' ), $rank_title ) . '</div>' );
1055
 
1056
  }
1057
 
1133
 
1134
  wp_enqueue_style( 'mycred-admin' );
1135
 
1136
+ if ( isset( $_GET['ctype'] ) && array_key_exists( sanitize_text_field( wp_unslash( $_GET['ctype'] ) ), $this->point_types ) ) :
1137
 
1138
  wp_localize_script(
1139
  'mycred-rank-tweaks',
1140
  'myCRED_Ranks',
1141
  array(
1142
+ 'rank_ctype' => sanitize_text_field( wp_unslash( $_GET['ctype'] ) )
1143
  )
1144
  );
1145
  wp_enqueue_script( 'mycred-rank-tweaks' );
1214
  }
1215
 
1216
  // Otherwise if ctype is set and it is a point type filter the results
1217
+ elseif ( isset( $_GET['ctype'] ) && array_key_exists( sanitize_text_field( wp_unslash( $_GET['ctype'] ) ), $this->point_types ) ) {
1218
  $query->set( 'meta_query', array(
1219
  array(
1220
  'key' => 'ctype',
1233
  if ( ! isset( $query->query['post_type'] ) || $query->query['post_type'] != MYCRED_RANK_KEY ) return;
1234
 
1235
  // If ctype is set, filter ranks according to it's value
1236
+ if ( isset( $_GET['ctype'] ) && array_key_exists( sanitize_text_field( wp_unslash( $_GET['ctype'] ) ), $this->point_types ) ) {
1237
  $query->set( 'meta_query', array(
1238
  array(
1239
  'key' => 'ctype',
1240
+ 'value' => sanitize_text_field( wp_unslash( $_GET['ctype'] ) ),
1241
  'compare' => '='
1242
  )
1243
  ) );
1294
  if ( $column_name == 'mycred-rank-logo' ) {
1295
  $logo = mycred_get_rank_logo( $post_id, 'thumbnail' );
1296
  if ( empty( $logo ) )
1297
+ echo esc_html( __( 'No Logo Set', 'mycred' ) );
1298
  else
1299
+ echo wp_kses_post( $logo );
1300
 
1301
  }
1302
 
1317
  $max = __( 'Any Value', 'mycred' );
1318
 
1319
  $max = $mycred->template_tags_general( __( 'Maximum %plural%', 'mycred' ) ) . ': ' . $max;
1320
+ echo wp_kses_post( $min ) . '<br />' . wp_kses_post( $max );
1321
 
1322
  }
1323
 
1324
  // Rank Users (user list)
1325
  elseif ( $column_name == 'mycred-rank-users' ) {
1326
 
1327
+ echo esc_html( mycred_count_users_with_rank( $post_id ) );
1328
 
1329
  }
1330
 
1332
  if ( $column_name == 'mycred-rank-type' ) {
1333
 
1334
  if ( isset( $this->point_types[ $type ] ) )
1335
+ echo esc_html( $this->point_types[ $type ] );
1336
  else
1337
+ echo esc_html( $this->core->plural() );
1338
 
1339
  }
1340
 
1423
  <div class="row">
1424
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1425
  <div class="form-group">
1426
+ <label for="mycred-rank-min"><?php esc_html_e( 'Minimum Balance Requirement', 'mycred' ); ?></label>
1427
  <input type="text" name="mycred_rank[mycred_rank_min]" id="mycred-rank-min" class="form-control" value="<?php echo esc_attr( $rank->minimum ); ?>" />
1428
  </div>
1429
  </div>
1430
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1431
  <div class="form-group">
1432
+ <label for="mycred-rank-max"><?php esc_html_e( 'Maximum Balance Requirement', 'mycred' ); ?></label>
1433
  <input type="text" name="mycred_rank[mycred_rank_max]" id="mycred-rank-max" class="form-control" value="<?php echo esc_attr( $rank->maximum ); ?>" />
1434
  </div>
1435
  </div>
1440
  <?php if ( count( $this->point_types ) > 1 ) : ?>
1441
 
1442
  <div class="form-group">
1443
+ <label for="mycred-rank-point-type"><?php esc_html_e( 'Point Type', 'mycred' ); ?></label>
1444
  <?php mycred_types_select_from_dropdown( 'mycred_rank[ctype]', 'mycred-rank-point-type', $type, false, ' class="form-control"' ); ?>
1445
  </div>
1446
 
1447
  <?php else : ?>
1448
 
1449
  <div class="form-group">
1450
+ <label for="mycred-rank-point-type"><?php esc_html_e( 'Point Type', 'mycred' ); ?></label>
1451
+ <p class="form-control-static"><?php echo esc_html( $mycred->plural() ); ?></p>
1452
+ <input type="hidden" name="mycred_rank[ctype]" value="<?php echo esc_html( MYCRED_DEFAULT_TYPE_KEY ); ?>" />
1453
  </div>
1454
 
1455
  <?php endif; ?>
1471
  if ( $rank->minimum == '' ) $rank->minimum = __( 'Not Set', 'mycred' );
1472
  if ( $rank->maximum == '' ) $rank->maximum = __( 'Not Set', 'mycred' );
1473
 
1474
+ echo '<li><strong>' . esc_html( $rank->title ) . '</strong> ' . esc_html( $rank->minimum ) . ' - ' . esc_html( $rank->maximum ) . '</li>';
1475
 
1476
  }
1477
  echo '</ul>';
1479
  }
1480
  else {
1481
 
1482
+ echo wp_kses_post( '<p>' . __( 'No ranks found', 'mycred' ) . '.</p>' );
1483
 
1484
  }
1485
 
1501
  // Make sure fields exists
1502
  if ( $post === NULL || ! $this->core->user_is_point_editor() || ! isset( $_POST['mycred_rank'] ) ) return;
1503
 
1504
+ $point_type = ( !empty( $_POST['mycred_rank']['ctype'] ) ? sanitize_key( $_POST['mycred_rank']['ctype'] ) : '' );
1505
  if ( ! array_key_exists( $point_type, $this->point_types ) )
1506
  $point_type = MYCRED_DEFAULT_TYPE_KEY;
1507
 
1509
 
1510
  $type_object = new myCRED_Point_Type( $point_type );
1511
 
1512
+ foreach ( sanitize_text_field( wp_unslash( $_POST['mycred_rank'] ) ) as $meta_key => $meta_value ) {
1513
 
1514
  if ( $meta_key == 'ctype' ) continue;
1515
 
1558
  $box = ( ( $prefs['base'] == 'current' ) ? 'display: none;' : 'display: block;' );
1559
 
1560
  ?>
1561
+ <h4><span class="dashicons dashicons-admin-plugins static"></span><?php esc_html_e( 'Ranks', 'mycred' ); ?></h4>
1562
  <div class="body" style="display:none;">
1563
 
1564
  <?php if ( $mycred->mycred_type == MYCRED_DEFAULT_TYPE_KEY ) : ?>
1565
 
1566
  <div class="row">
1567
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1568
+ <h3><?php esc_html_e( 'Rank Features', 'mycred' ); ?></h3>
1569
  <div class="form-group">
1570
  <div class="checkbox">
1571
+ <label><input type="checkbox" value="1" checked="checked" disabled="disabled" /> <?php esc_html_e( 'Title', 'mycred' ); ?></label>
1572
  </div>
1573
  <div class="checkbox">
1574
+ <label><input type="checkbox" value="1" checked="checked" disabled="disabled" /> <?php echo esc_html( $mycred->core->template_tags_general( __( '%plural% requirement', 'mycred' ) ) ); ?></label>
1575
  </div>
1576
  <div class="checkbox">
1577
+ <label><input type="checkbox" value="1" checked="checked" disabled="disabled" /> <?php esc_html_e( 'Rank Logo', 'mycred' ); ?></label>
1578
  </div>
1579
  <div class="checkbox">
1580
+ <label for="<?php echo esc_attr( $this->field_id( array( 'support' => 'content' ) ) ); ?>"><input type="checkbox" name="<?php echo esc_attr( $this->field_name( array( 'support' => 'content' ) ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( 'support' => 'content' ) ) ); ?>" <?php checked( $prefs['support']['content'], 1 ); ?> value="1" /> <?php esc_html_e( 'Content', 'mycred' ); ?></label>
1581
  </div>
1582
  <div class="checkbox">
1583
+ <label for="<?php echo esc_attr( $this->field_id( array( 'support' => 'excerpt' ) ) ); ?>"><input type="checkbox" name="<?php echo esc_attr( $this->field_name( array( 'support' => 'excerpt' ) ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( 'support' => 'excerpt' ) ) ); ?>" <?php checked( $prefs['support']['excerpt'], 1 ); ?> value="1" /> <?php esc_html_e( 'Excerpt', 'mycred' ); ?></label>
1584
  </div>
1585
  <div class="checkbox">
1586
+ <label for="<?php echo esc_attr ($this->field_id( array( 'support' => 'comments' ) ) ); ?>"><input type="checkbox" name="<?php echo esc_attr( $this->field_name( array( 'support' => 'comments' ) ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( 'support' => 'comments' ) ) ); ?>" <?php checked( $prefs['support']['comments'], 1 ); ?> value="1" /> <?php esc_html_e( 'Comments', 'mycred' ); ?></label>
1587
  </div>
1588
  <div class="checkbox">
1589
+ <label for="<?php echo esc_attr( $this->field_id( array( 'support' => 'page-attributes' ) ) ); ?>"><input type="checkbox" name="<?php echo esc_attr( $this->field_name( array( 'support' => 'page-attributes' ) ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( 'support' => 'page-attributes' ) ) ); ?>" <?php checked( $prefs['support']['page-attributes'], 1 ); ?> value="1" /> <?php esc_html_e( 'Page Attributes', 'mycred' ); ?></label>
1590
  </div>
1591
  <div class="checkbox">
1592
+ <label for="<?php echo esc_attr( $this->field_id( array( 'support' => 'custom-fields' ) ) ); ?>"><input type="checkbox" name="<?php echo esc_attr( $this->field_name( array( 'support' => 'custom-fields' ) ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( 'support' => 'custom-fields' ) ) ); ?>" <?php checked( $prefs['support']['custom-fields'], 1 ); ?> value="1" /> <?php esc_html_e( 'Custom Fields', 'mycred' ); ?></label>
1593
  </div>
1594
  </div>
1595
  </div>
1596
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1597
+ <h3><?php esc_html_e( 'Rank Post Type', 'mycred' ); ?></h3>
1598
  <div class="form-group">
1599
  <div class="checkbox">
1600
+ <label for="<?php echo esc_attr( $this->field_id( 'public' ) ); ?>"><input type="checkbox" name="<?php echo esc_attr( $this->field_name( 'public' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'public' ) ); ?>" <?php checked( $prefs['public'], 1 ); ?> value="1" /> <?php esc_html_e( 'Make Ranks Public', 'mycred' ); ?></label>
1601
  </div>
1602
  </div>
1603
  <div class="form-group">
1604
+ <label class="subheader" for="<?php echo esc_attr( $this->field_id( 'slug' ) ); ?>"><?php esc_attr( 'Rank SLUG', 'mycred' ); ?></label>
1605
+ <input type="text" name="<?php echo esc_attr( $this->field_name( 'slug' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'slug' ) ); ?>" value="<?php echo esc_attr( $prefs['slug'] ); ?>" class="form-control" />
1606
+ <p><span class="description"><?php esc_html_e( 'If you have selected to make Ranks public, you can select what rank archive URL slug you want to use. Ignored if Ranks are not set to be public.', 'mycred' ); ?></span></p>
1607
  </div>
1608
  <div class="form-group">
1609
+ <label for="<?php echo esc_html( $this->field_id( 'order' ) ); ?>"><?php esc_html_e( 'Display Order', 'mycred' ); ?></label>
1610
+ <select name="<?php echo esc_html( $this->field_name( 'order' ) ); ?>" id="<?php echo esc_html( $this->field_id( 'order' ) ); ?>" class="form-control">
1611
  <?php
1612
 
1613
  // Order added in 1.1.1
1615
  'ASC' => __( 'Ascending - Lowest rank to highest', 'mycred' ),
1616
  'DESC' => __( 'Descending - Highest rank to lowest', 'mycred' )
1617
  );
1618
+ foreach ( $options as $option_value => $option_label ) { ?>
1619
+ <option value="<?php echo esc_attr( $option_value );?>"
1620
+ <?php
1621
+ if ( $prefs['order'] == $option_value ) echo ' selected="selected"';?>
1622
+ > <?php echo esc_html( $option_label ); ?>
1623
+ </option>
1624
+ <?php
1625
  }
1626
 
1627
  ?>
1628
 
1629
  </select>
1630
+ <p><span class="description"><?php esc_html_e( 'Option to set in which order Ranks should be shown on the archive page.', 'mycred' ); ?></span></p>
1631
  </div>
1632
  </div>
1633
  </div>
1634
 
1635
  <?php endif; ?>
1636
 
1637
+ <h3><?php esc_html_e( 'Rank Behaviour', 'mycred' ); ?></h3>
1638
  <div class="row">
1639
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
1640
  <div class="form-group">
1641
  <div class="radio">
1642
+ <label for="<?php echo esc_attr( $this->field_id( array( 'base' => 'manual' ) ) ); ?>"><input type="radio" name="<?php echo esc_attr( $this->field_name( 'base' ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( 'base' => 'manual' ) ) ); ?>"<?php checked( $prefs['base'], 'manual' ); ?> value="manual" /> <?php esc_html_e( 'Manual Mode', 'mycred' ); ?></label>
1643
  </div>
1644
+ <p><span class="description"><?php esc_html_e( 'Ranks are assigned manually for each user.', 'mycred' ); ?></span></p>
1645
  </div>
1646
  </div>
1647
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
1648
  <div class="form-group">
1649
  <div class="radio">
1650
+ <label for="<?php echo esc_attr( $this->field_id( array( 'base' => 'current' ) ) ); ?>"><input type="radio" name="<?php echo esc_attr( $this->field_name( 'base' ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( 'base' => 'current' ) ) ); ?>"<?php checked( $prefs['base'], 'current' ); ?> value="current" /> <?php esc_html_e( 'Based on Current Balances', 'mycred' ); ?></label>
1651
  </div>
1652
+ <p><span class="description"><?php esc_html_e( 'Users can be promoted or demoted depending on where their balance fits in amongst your ranks.', 'mycred' ); ?></span></p>
1653
  </div>
1654
  </div>
1655
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
1656
  <div class="form-group">
1657
  <div class="radio">
1658
+ <label for="<?php echo esc_attr( $this->field_id( array( 'base' => 'total' ) ) ); ?>"><input type="radio" name="<?php echo esc_attr( $this->field_name( 'base' ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( 'base' => 'total' ) ) ); ?>"<?php checked( $prefs['base'], 'total' ); ?> value="total" /> <?php esc_html_e( 'Based on Total Balances', 'mycred' ); ?></label>
1659
  </div>
1660
+ <p><span class="description"><?php esc_html_e( 'Users can only be promoted and gain higher ranks even if their balance decreases.', 'mycred' ); ?></span></p>
1661
  </div>
1662
  </div>
1663
  </div>
1664
 
1665
+ <div class="row" id="mycred-rank-based-on-wrapper" style="<?php echo esc_attr( $box ); ?>">
1666
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
1667
+ <h3><?php esc_html_e( 'Tools', 'mycred' ); ?></h3>
1668
+ <p><span class="description"><?php esc_html_e( 'Use this button to calculate or recalculate each individual users total balance if you think your users total balances are incorrect, or if you switch from Ranks being based on users current balance to total balance.', 'mycred' ); ?></span></p>
1669
+ <p><input type="button" name="mycred-update-totals" data-type="<?php echo esc_attr( $mycred->mycred_type ); ?>" id="mycred-update-totals" value="<?php esc_attr_e( 'Calculate Totals', 'mycred' ); ?>" class="button button-large button-<?php if ( $prefs['base'] == 'current' ) echo 'secondary'; else echo 'primary'; ?>"<?php if ( $prefs['base'] == 'current' ) echo ' disabled="disabled"'; ?> /></p>
1670
  </div>
1671
  </div>
1672
 
1673
+ <h3><?php esc_html_e( 'Third-party Integrations', 'mycred' ); ?></h3>
1674
  <div class="row">
1675
  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
1676
  <div class="form-group">
1677
+ <label for="<?php echo esc_attr( $this->field_id( 'bb_location' ) ); ?>">BuddyPress</label>
1678
  <?php if ( $buddypress ) : ?>
1679
+ <select name="<?php echo esc_attr( $this->field_name( 'bb_location' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'bb_location' ) ); ?>" class="form-control">
1680
  <?php
1681
 
1682
  if ( ! array_key_exists( 'bb_location', $prefs ) )
1692
  'both' => __( 'Include under the "Profile" tab and Profile Header.', 'mycred' )
1693
  );
1694
 
1695
+ foreach ( $rank_locations as $value => $label ) { ?>
1696
+ <option value="<?php echo esc_attr( $value ); ?>"
1697
+ <?php
1698
+ if ( $prefs['bb_location'] == $value ) echo ' selected="selected"';?>
1699
+ > <?php echo esc_html( $label ); ?>
1700
+ </option>
1701
+ <?php
1702
  }
1703
 
1704
  ?>
1706
  </select>
1707
  </div>
1708
  <div class="form-group">
1709
+ <label for="<?php echo esc_attr( $this->field_id( 'bb_template' ) ); ?>"><?php esc_html_e( 'Template', 'mycred' ); ?></label>
1710
+ <textarea name="<?php echo esc_attr( $this->field_name( 'bb_template' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'bb_template' ) ); ?>" rows="5" cols="50" class="form-control"><?php echo esc_attr( $prefs['bb_template'] ); ?></textarea>
1711
+ <p><span class="description"><?php esc_html_e( 'Template to use when showing a users Rank in BuddyPress. Use %rank_title% for the title and %rank_logo% to show the rank logo. HTML is allowed.', 'mycred' ); ?></span></p>
1712
  <?php else : ?>
1713
+ <input type="hidden" name="<?php echo esc_attr( $this->field_name( 'bb_location' ) ); ?>" value="" />
1714
+ <input type="hidden" name="<?php echo esc_attr( $this->field_name( 'bb_template' ) ); ?>" value="" />
1715
+ <p><span class="description"><?php esc_html_e( 'Not installed', 'mycred' ); ?></span></p>
1716
  <?php endif; ?>
1717
  </div>
1718
  </div>
1719
  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
1720
  <div class="form-group">
1721
+ <label for="<?php echo esc_attr( $this->field_id( 'bp_location' ) ); ?>">bbPress</label>
1722
  <?php if ( $bbpress ) : ?>
1723
+ <select name="<?php echo esc_attr( $this->field_name( 'bp_location' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'bp_location' ) ); ?>" class="form-control">
1724
  <?php
1725
 
1726
  if ( ! array_key_exists( 'bp_location', $prefs ) )
1736
  'both' => __( 'Include in Topic Replies and Profile', 'mycred' )
1737
  );
1738
 
1739
+ foreach ( $rank_locations as $value => $label ) { ?>
1740
+ <option value="<?php echo esc_attr( $value ); ?>"; <?php
1741
+ if ( $prefs['bp_location'] == $value ) echo ' selected="selected"'; ?>
1742
+ ><?php echo esc_html( $label ); ?>
1743
+ </option>
1744
+ <?php
1745
  }
1746
 
1747
  ?>
1749
  </select>
1750
  </div>
1751
  <div class="form-group">
1752
+ <label for="<?php echo esc_attr( $this->field_id( 'bp_template' ) ); ?>"><?php esc_html_e( 'Template', 'mycred' ); ?></label>
1753
+ <textarea name="<?php echo esc_attr( $this->field_name( 'bp_template' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'bp_template' ) ); ?>" rows="5" cols="50" class="form-control"><?php echo esc_attr( $prefs['bp_template'] ); ?></textarea>
1754
+ <p><span class="description"><?php esc_html_e( 'Template to use when showing a users Rank in BuddyPress. Use %rank_title% for the title and %rank_logo% to show the rank logo. HTML is allowed.', 'mycred' ); ?></span></p>
1755
  <?php else : ?>
1756
+ <input type="hidden" name="<?php echo esc_attr( $this->field_name( 'bp_location' ) ); ?>" value="" />
1757
+ <input type="hidden" name="<?php echo esc_attr( $this->field_name( 'bp_template' ) ); ?>" value="" />
1758
+ <p><span class="description"><?php esc_html_e( 'Not installed', 'mycred' ); ?></span></p>
1759
  <?php endif; ?>
1760
  </div>
1761
  </div>
1762
  </div>
1763
 
1764
+ <h3 style="margin-bottom: 0;"><?php esc_html_e( 'Available Shortcodes', 'mycred' ); ?></h3>
1765
  <div class="row">
1766
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
1767
  <p><a href="http://codex.mycred.me/shortcodes/mycred_my_rank/" target="_blank">[mycred_my_rank]</a>, <a href="http://codex.mycred.me/shortcodes/mycred_my_ranks/" target="_blank">[mycred_my_ranks]</a>, <a href="http://codex.mycred.me/shortcodes/mycred_list_ranks/" target="_blank">[mycred_list_ranks]</a>, <a href="http://codex.mycred.me/shortcodes/mycred_users_of_all_ranks/" target="_blank">[mycred_users_of_all_ranks]</a>, <a href="http://codex.mycred.me/shortcodes/mycred_users_of_rank/" target="_blank">[mycred_users_of_rank]</a></p>
1777
  type : "POST",
1778
  data : {
1779
  action : 'mycred-calc-totals',
1780
+ token : '<?php echo esc_html( wp_create_nonce( 'mycred-calc-totals' ) ); ?>',
1781
  ctype : pointtype
1782
  },
1783
  dataType : "JSON",
1784
+ url : '<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>',
1785
  beforeSend : function() {
1786
  button.attr( 'disabled', 'disabled' ).removeClass( 'button-primary' ).addClass( 'button-seconday' ).val( '<?php echo esc_js( esc_attr__( 'Processing...', 'mycred' ) ); ?>' );
1787
  },
1792
 
1793
  };
1794
 
1795
+ $( 'input[name="<?php echo esc_attr( $this->field_name( 'base' ) ); ?>"]' ).change(function(){
1796
 
1797
  var button = $( '#mycred-update-totals' );
1798
  var hiddenrow = $( '#mycred-rank-based-on-wrapper' );
1868
  $rank_meta_key .= $mycred->mycred_type;
1869
 
1870
  ?>
1871
+ <label class="subheader"><?php esc_html_e( 'Ranks', 'mycred' ); ?></label>
1872
  <ol id="myCRED-rank-actions" class="inline">
1873
  <li>
1874
+ <label><?php esc_html_e( 'User Meta Key', 'mycred' ); ?></label>
1875
+ <div class="h2"><input type="text" id="mycred-rank-post-type" disabled="disabled" value="<?php echo esc_attr( $rank_meta_key ); ?>" class="readonly" /></div>
1876
  </li>
1877
  <li>
1878
+ <label><?php esc_html_e( 'No. of ranks', 'mycred' ); ?></label>
1879
+ <div class="h2"><input type="text" id="mycred-ranks-no-of-ranks" disabled="disabled" value="<?php echo esc_attr( $count ); ?>" class="readonly short" /></div>
1880
  </li>
1881
  <li>
1882
+ <label><?php esc_html_e( 'Actions', 'mycred' ); ?></label>
1883
+ <div class="h2"><input type="button" id="mycred-manage-action-reset-ranks" data-type="<?php echo esc_attr( $mycred->mycred_type ); ?>" value="<?php esc_attr_e( 'Remove All Ranks', 'mycred' ); ?>" class="button button-large large <?php if ( $reset_block ) echo '" disabled="disabled'; else echo 'button-primary'; ?>" /><?php if ( ! $this->is_manual_mode( esc_html( $mycred->mycred_type ) ) ) : ?> <input type="button" id="mycred-manage-action-assign-ranks" data-type="<?php echo esc_attr( $mycred->mycred_type ); ?>" value="<?php esc_attr_e( 'Assign Ranks to Users', 'mycred' ); ?>" class="button button-large large <?php if ( $reset_block ) echo '" disabled="disabled'; ?>" /></div><?php endif; ?>
1884
  </li>
1885
  </ol>
1886
  <?php
addons/sell-content/includes/mycred-sell-shortcodes.php CHANGED
@@ -217,7 +217,7 @@ if ( ! function_exists( 'mycred_render_sell_history' ) ) :
217
  <?php
218
 
219
  foreach ( $columns as $column_id => $column_label )
220
- echo '<th class="mycred-sell-' . $column_id . ' ' . $column_id . '">' . $column_label . '</th>';
221
 
222
  ?>
223
  </thead>
@@ -239,13 +239,13 @@ if ( ! function_exists( 'mycred_render_sell_history' ) ) :
239
 
240
 
241
  if ( $column_id == 'col-date' )
242
- echo '<td class="' . $column_id . '">'.date( $date_format, $entry->time ).'</td>';
243
 
244
  elseif ( $column_id == 'col-title' )
245
- echo '<td class="' . $column_id . '"><a href="' . mycred_get_permalink( $entry->ref_id ) . '">' . mycred_get_the_title( $entry->ref_id ) . '</a></td>';
246
 
247
  elseif ( $column_id == 'col-amount' )
248
- echo '<td class="' . $column_id . '">' . $mycred->format_creds( abs( $entry->creds ) ) . '</td>';
249
 
250
  elseif ( $column_id == 'col-expires' ) {
251
 
@@ -270,7 +270,7 @@ if ( ! function_exists( 'mycred_render_sell_history' ) ) :
270
 
271
  }
272
 
273
- echo '<td class="' . $column_id . '">' . $expires . '</td>';
274
 
275
  }
276
  else {
@@ -288,7 +288,7 @@ if ( ! function_exists( 'mycred_render_sell_history' ) ) :
288
  }
289
  else {
290
 
291
- echo '<tr><td class="no-results" colspan="' . count( $columns ) . '">' . $nothing . '</td></tr>';
292
 
293
  }
294
 
217
  <?php
218
 
219
  foreach ( $columns as $column_id => $column_label )
220
+ echo '<th class="mycred-sell-' . esc_attr( $column_id ) . ' ' . esc_attr( $column_id ) . '">' . esc_html( $column_label ) . '</th>';
221
 
222
  ?>
223
  </thead>
239
 
240
 
241
  if ( $column_id == 'col-date' )
242
+ echo '<td class="' . esc_attr( $column_id ) . '">'. esc_html( date( $date_format, $entry->time ) ).'</td>';
243
 
244
  elseif ( $column_id == 'col-title' )
245
+ echo '<td class="' . esc_attr( $column_id ) . '"><a href="' . esc_attr( mycred_get_permalink( $entry->ref_id ) ) . '">' . esc_html( mycred_get_the_title( $entry->ref_id ) ) . '</a></td>';
246
 
247
  elseif ( $column_id == 'col-amount' )
248
+ echo '<td class="' . esc_attr( $column_id ) . '">' . esc_attr( $mycred->format_creds( abs( $entry->creds ) ) ) . '</td>';
249
 
250
  elseif ( $column_id == 'col-expires' ) {
251
 
270
 
271
  }
272
 
273
+ echo '<td class="' . esc_attr( $column_id ) . '">' . esc_html( $expires ) . '</td>';
274
 
275
  }
276
  else {
288
  }
289
  else {
290
 
291
+ echo '<tr><td class="no-results" colspan="' . count( $columns ) . '">' . esc_html( $nothing ) . '</td></tr>';
292
 
293
  }
294
 
addons/sell-content/myCRED-addon-sell-content.php CHANGED
@@ -241,10 +241,10 @@ if ( ! class_exists( 'myCRED_Sell_Content_Module' ) ) :
241
 
242
  if ( is_user_logged_in() && ! mycred_is_admin() ) {
243
 
244
- if ( isset( $_POST['action'] ) && $_POST['action'] == 'mycred-buy-content' && isset( $_POST['postid'] ) && isset( $_POST['token'] ) && wp_verify_nonce( $_POST['token'], 'mycred-buy-this-content' ) ) {
245
 
246
  $post_id = absint( $_POST['postid'] );
247
- $point_type = sanitize_key( $_POST['ctype'] );
248
  $buying_cred = $this->sell_content['type'];
249
  $point_types = mycred_get_types( true );
250
  global $mycred_types;
@@ -516,8 +516,7 @@ if ( ! class_exists( 'myCRED_Sell_Content_Module' ) ) :
516
 
517
  public function bbp_template_before_single() {
518
 
519
- echo $this->bbp_content;
520
-
521
  }
522
 
523
  public function bbp_remove_breadcrumb( $is_front ) {
@@ -602,13 +601,13 @@ if ( ! class_exists( 'myCRED_Sell_Content_Module' ) ) :
602
  if ( empty( $available_options ) ) return;
603
 
604
  ?>
605
- <p class="mycred-p"><?php _e( 'Users profit share when their content is purchased.', 'mycred' ); ?></p>
606
  <table class="form-table mycred-inline-table">
607
  <tr>
608
- <th scope="row"><?php _e( 'Profit Share', 'mycred' ); ?></th>
609
  <td>
610
  <fieldset id="mycred-badge-list" class="badge-list">
611
- <legend class="screen-reader-text"><span><?php _e( 'Profit Share', 'mycred' ); ?></span></legend>
612
  <?php
613
 
614
  foreach ( $available_options as $point_type => $data ) {
@@ -618,10 +617,10 @@ if ( ! class_exists( 'myCRED_Sell_Content_Module' ) ) :
618
 
619
  ?>
620
  <div class="mycred-wrapper buycred-wrapper disabled-option color-option">
621
- <div><?php printf( _x( '%s Profit Share', 'Points Name', 'mycred' ), $data['name'] ); ?></div>
622
  <div class="balance-row">
623
- <div class="balance-view"><?php _e( 'Disabled', 'mycred' ); ?></div>
624
- <div class="balance-desc"><em><?php _e( 'Not accepted as payment.', 'mycred' ); ?></em></div>
625
  </div>
626
  </div>
627
  <?php
@@ -633,10 +632,10 @@ if ( ! class_exists( 'myCRED_Sell_Content_Module' ) ) :
633
 
634
  ?>
635
  <div class="mycred-wrapper buycred-wrapper disabled-option color-option">
636
- <div><?php printf( _x( '%s Profit Share', 'Points Name', 'mycred' ), $data['name'] ); ?></div>
637
  <div class="balance-row">
638
- <div class="balance-view"><?php _e( 'Excluded', 'mycred' ); ?></div>
639
- <div class="balance-desc"><em><?php printf( _x( 'User can not pay using %s', 'Points Name', 'mycred' ), $data['name'] ); ?></em></div>
640
  </div>
641
  </div>
642
  <?php
@@ -648,10 +647,10 @@ if ( ! class_exists( 'myCRED_Sell_Content_Module' ) ) :
648
 
649
  ?>
650
  <div class="mycred-wrapper buycred-wrapper color-option selected">
651
- <div><?php printf( _x( '%s Profit Share', 'Buying Points', 'mycred' ), $data['name'] ); ?></div>
652
  <div class="balance-row">
653
- <div class="balance-view"><input type="text" size="8" name="mycred_sell_this[<?php echo $point_type; ?>]" class="half" placeholder="<?php echo esc_attr( $data['default'] ); ?>" value="<?php if ( $data['override'] ) echo esc_attr( $data['custom'] ); ?>" /> %</div>
654
- <div class="balance-desc"><em><?php _e( 'Leave empty to use the default.', 'mycred' ); ?></em></div>
655
  </div>
656
  </div>
657
  <?php
@@ -682,7 +681,7 @@ if ( ! class_exists( 'myCRED_Sell_Content_Module' ) ) :
682
 
683
  if ( isset( $_POST['mycred_sell_this'] ) && ! empty( $_POST['mycred_sell_this'] ) ) {
684
 
685
- foreach ( $_POST['mycred_sell_this'] as $point_type => $share ) {
686
 
687
  $share = sanitize_text_field( $share );
688
 
@@ -732,11 +731,11 @@ if ( ! class_exists( 'myCRED_Sell_Content_Module' ) ) :
732
  $point_types = mycred_get_types( true );
733
 
734
  ?>
735
- <h4><span class="dashicons dashicons-admin-plugins static"></span><?php _e( 'Sell Content', 'mycred' ); ?></h4>
736
  <div class="body" style="display:none;">
737
 
738
- <h3><?php _e( 'Post Types', 'mycred' ); ?></h3>
739
- <p><?php _e( 'Which post type(s) content field do you want to sell access to?', 'mycred' ); ?></p>
740
  <div id="mycred-sell-this-post-type-filter">
741
  <?php
742
 
@@ -755,15 +754,15 @@ if ( ! class_exists( 'myCRED_Sell_Content_Module' ) ) :
755
  <div class="row">
756
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
757
  <div class="checkbox">
758
- <label for="<?php echo $this->field_id( array( 'post_types' => $post_type ) ); ?>"><input type="checkbox" name="<?php echo $this->field_name( array( 'post_types' => $post_type ) ); ?>"<?php echo $selected; ?> id="<?php echo $this->field_id( array( 'post_types' => $post_type ) ); ?>" class="mycred-check-count" data-type="<?php echo $post_type; ?>" value="<?php echo $post_type; ?>" /> <?php echo esc_attr( $post_type_label ); ?></label>
759
  </div>
760
  </div>
761
  <div class="col-lg-9 col-md-9 col-sm-12 col-xs-12">
762
- <div id="<?php echo $this->field_id( array( 'post_types' => $post_type ) ); ?>-wrap" style="display: <?php echo $show_options; ?>;">
763
  <div class="row">
764
  <div class="col-lg-5 col-md-5 col-sm-6 col-xs-12">
765
  <div class="form-group">
766
- <select name="<?php echo $this->field_name( array( 'filters' => $post_type ) ); ?>[by]" class="form-control toggle-filter-menu" data-type="<?php echo $post_type; ?>">
767
  <?php
768
 
769
  $settings = array( 'by' => 'all', 'list' => '' );
@@ -772,24 +771,23 @@ if ( ! class_exists( 'myCRED_Sell_Content_Module' ) ) :
772
 
773
  $options = mycred_get_post_type_options( $post_type );
774
  if ( ! empty( $options ) ) {
775
- foreach ( $options as $value => $option ) {
776
-
777
- echo '<option value="' . $value . '"';
778
  if ( $value == $settings['by'] ) echo ' selected="selected"';
779
- if ( $option['data'] != '' ) echo ' data-place="' . $option['data'] . '"';
780
- echo '>' . $option['label'] . '</option>';
781
-
782
  }
783
  }
784
-
785
  ?>
786
  </select>
787
  </div>
788
  </div>
789
  <div class="col-lg-7 col-md-7 col-sm-6 col-xs-12">
790
- <div id="post-type-filter-<?php echo $post_type; ?>" style="display: <?php if ( ! in_array( $settings['by'], array( 'all', 'manual' ) ) ) echo 'block'; else echo 'none'; ?>;">
791
  <div class="form-group">
792
- <input type="text" name="<?php echo $this->field_name( array( 'filters' => $post_type ) ); ?>[list]" value="<?php echo esc_attr( $settings['list'] ); ?>" placeholder="<?php if ( array_key_exists( $settings['by'], $options ) ) echo esc_attr( $options[ $settings['by'] ]['data'] ); ?>" class="form-control" />
793
  </div>
794
  </div>
795
  </div>
@@ -805,8 +803,8 @@ if ( ! class_exists( 'myCRED_Sell_Content_Module' ) ) :
805
  ?>
806
  </div>
807
 
808
- <h3><?php _e( 'Point Types', 'mycred' ); ?></h3>
809
- <p><?php _e( 'Which point type(s) can be used as payment for accessing content?', 'mycred' ); ?></p>
810
  <div class="row">
811
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
812
  <?php
@@ -823,7 +821,7 @@ if ( ! class_exists( 'myCRED_Sell_Content_Module' ) ) :
823
 
824
  ?>
825
  <div class="form-group">
826
- <label for="<?php echo $this->field_id( array( 'type' => $point_type ) ); ?>"><input type="checkbox" name="<?php echo $this->field_name( array( 'type' => $point_type ) ); ?>"<?php echo $selected; ?> id="<?php echo $this->field_id( array( 'type' => $point_type ) ); ?>" class="mycred-check-count" data-type="<?php echo $point_type; ?>" value="<?php echo $point_type; ?>" /> <?php echo esc_attr( $point_type_label ); ?></label>
827
  </div>
828
  <?php
829
 
@@ -862,67 +860,67 @@ if ( ! class_exists( 'myCRED_Sell_Content_Module' ) ) :
862
  $expiration_label = apply_filters( 'mycred_sell_exp_title', __( 'Hour(s)', 'mycred' ), $point_type );
863
 
864
  ?>
865
- <div id="mycred-sell-<?php echo $point_type; ?>-wrap" style="display: <?php echo $selected; ?>;">
866
- <h3><?php printf( __( '%s Setup', 'mycred' ), $point_type_label ); ?></h3>
867
  <div class="row">
868
  <div class="col-lg-3 col-md-3 col-sm-3 col-xs-12">
869
  <div class="form-group">
870
- <label for="<?php echo $this->field_id( array( 'post_type_setup' => $point_type . '-status' ) ); ?>"><?php _e( 'Default Status', 'mycred' ); ?></label>
871
- <select name="<?php echo $this->field_name( array( 'post_type_setup' => $point_type ) ); ?>[status]" id="<?php echo $this->field_id( array( 'post_type_setup' => $point_type . '-status' ) ); ?>" class="form-control">
872
- <?php echo $this->enabled_options( $type_setup['status'] ); ?>
873
  </select>
874
  </div>
875
  </div>
876
  <div class="col-lg-3 col-md-3 col-sm-3 col-xs-12">
877
  <div class="form-group">
878
- <label for="<?php echo $this->field_id( array( 'post_type_setup' => $point_type . '-price' ) ); ?>"><?php _e( 'Default Price', 'mycred' ); ?></label>
879
- <input type="text" name="<?php echo $this->field_name( array( 'post_type_setup' => $point_type ) ); ?>[price]" id="<?php echo $this->field_id( array( 'post_type_setup' => $point_type . '-price' ) ); ?>" class="form-control" value="<?php echo esc_attr( $type_setup['price'] ); ?>" />
880
  </div>
881
  </div>
882
  <div class="col-lg-3 col-md-3 col-sm-3 col-xs-12">
883
  <div class="form-group">
884
- <label for="<?php echo $this->field_id( array( 'post_type_setup' => $point_type . '-expire' ) ); ?>"><?php _e( 'Expiration', 'mycred' ); ?></label>
885
- <input type="text" name="<?php echo $this->field_name( array( 'post_type_setup' => $point_type ) ); ?>[expire]" id="<?php echo $this->field_id( array( 'post_type_setup' => $point_type . '-expire' ) ); ?>" class="form-control" value="<?php echo esc_attr( $type_setup['expire'] ); ?>" />
886
- <p><span class="description"><?php printf( __( 'Option to automatically expire purchases after certain number of %s. Use zero to disable.', 'mycred' ), $expiration_label ); ?></span></p>
887
  </div>
888
  </div>
889
  <div class="col-lg-3 col-md-3 col-sm-3 col-xs-12">
890
  <div class="form-group">
891
- <label for="<?php echo $this->field_id( array( 'post_type_setup' => $point_type . '-profit-share' ) ); ?>"><?php _e( 'Profit Share', 'mycred' ); ?></label>
892
- <input type="text" name="<?php echo $this->field_name( array( 'post_type_setup' => $point_type ) ); ?>[profit_share]" id="<?php echo $this->field_id( array( 'post_type_setup' => $point_type . '-profit-share' ) ); ?>" class="form-control" value="<?php echo esc_attr( $type_setup['profit_share'] ); ?>" />
893
- <p><span class="description"><?php printf( __( 'Option to pay a percentage of each sale with the content author.', 'mycred' ), $expiration_label ); ?></span></p>
894
  </div>
895
  </div>
896
  </div>
897
  <div class="row">
898
  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
899
  <div class="form-group">
900
- <label for="<?php echo $this->field_id( array( 'post_type_setup' => $point_type . '-button' ) ); ?>"><?php _e( 'Button Label', 'mycred' ); ?></label>
901
- <input type="text" name="<?php echo $this->field_name( array( 'post_type_setup' => $point_type ) ); ?>[button_label]" id="<?php echo $this->field_id( array( 'post_type_setup' => $point_type . '-button' ) ); ?>" class="form-control" placeholder="<?php _e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $type_setup['button_label'] ); ?>" />
902
- <p><span class="description"><?php echo $this->core->available_template_tags( array(), '%price%' ); ?></span></p>
903
  </div>
904
  </div>
905
  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
906
  <div class="form-group">
907
- <label for="<?php echo $this->field_id( array( 'post_type_setup' => $point_type . '-css' ) ); ?>"><?php _e( 'Button CSS Classes', 'mycred' ); ?></label>
908
- <input type="text" name="<?php echo $this->field_name( array( 'post_type_setup' => $point_type ) ); ?>[button_classes]" id="<?php echo $this->field_id( array( 'post_type_setup' => $point_type . '-css' ) ); ?>" class="form-control" value="<?php echo esc_attr( $type_setup['button_classes'] ); ?>" />
909
  </div>
910
  </div>
911
  </div>
912
- <h3><?php _e( 'Log Templates', 'mycred' ); ?></h3>
913
  <div class="row">
914
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
915
  <div class="form-group">
916
- <label for="<?php echo $this->field_id( array( 'post_type_setup' => $point_type . '-log-pay' ) ); ?>"><?php _e( 'Payment log entry template', 'mycred' ); ?></label>
917
- <input type="text" name="<?php echo $this->field_name( array( 'post_type_setup' => $point_type ) ); ?>[log_payment]" id="<?php echo $this->field_id( array( 'post_type_setup' => $point_type . '-log-pay' ) ); ?>" class="form-control" placeholder="<?php _e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $type_setup['log_payment'] ); ?>" />
918
- <p><span class="description"><?php echo $this->core->available_template_tags( array( 'general', 'post' ) ); ?></span></p>
919
  </div>
920
  </div>
921
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
922
  <div class="form-group">
923
- <label for="<?php echo $this->field_id( array( 'post_type_setup' => $point_type . '-log-share' ) ); ?>"><?php _e( 'Profit Share payout log entry template', 'mycred' ); ?></label>
924
- <input type="text" name="<?php echo $this->field_name( array( 'post_type_setup' => $point_type ) ); ?>[log_sale]" id="<?php echo $this->field_id( array( 'post_type_setup' => $point_type . '-log-share' ) ); ?>" class="form-control" placeholder="<?php _e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $type_setup['log_sale'] ); ?>" />
925
- <p><span class="description"><?php echo $this->core->available_template_tags( array( 'general', 'post' ) ); ?></span></p>
926
  </div>
927
  </div>
928
  </div>
@@ -934,26 +932,26 @@ if ( ! class_exists( 'myCRED_Sell_Content_Module' ) ) :
934
 
935
  ?>
936
 
937
- <h3><?php _e( 'Transactions', 'mycred' ); ?></h3>
938
  <div class="row">
939
  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
940
  <div class="checkbox">
941
- <label for="<?php echo $this->field_id( 'reload' ); ?>"><input type="checkbox" name="<?php echo $this->field_name( 'reload' ); ?>" id="<?php echo $this->field_id( 'reload' ); ?>" <?php checked( $this->sell_content['reload'], 1 ); ?> value="1" /> <?php _e( 'Reload page after successful payments.', 'mycred' ); ?></label>
942
  </div>
943
  </div>
944
  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
945
  <div class="form-group">
946
- <label for="<?php echo $this->field_id( 'working' ); ?>"><?php _e( 'Button Label', 'mycred' ); ?></label>
947
- <input type="text" name="<?php echo $this->field_name( 'working' ); ?>" id="<?php echo $this->field_id( 'working' ); ?>" class="form-control" placeholder="<?php _e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $this->sell_content['working'] ); ?>" />
948
- <p><span class="description"><?php _e( 'Option to show a custom button label while the payment is being processed. HTML is allowed.', 'mycred' ); ?></span></p>
949
  </div>
950
  </div>
951
  </div>
952
 
953
  <div class="row">
954
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
955
- <h3><?php _e( 'Purchase Template', 'mycred' ); ?></h3>
956
- <p><span class="description"><?php _e( 'The content will be replaced with this template when viewed by a user that has not paid for the content but can afford to pay.', 'mycred' ); ?></span></p>
957
  <?php
958
 
959
  wp_editor( $this->sell_content['templates']['members'], $this->field_id( array( 'templates' => 'members' ) ), array(
@@ -961,7 +959,7 @@ if ( ! class_exists( 'myCRED_Sell_Content_Module' ) ) :
961
  'textarea_rows' => 10
962
  ) );
963
 
964
- echo '<p>' . $this->core->available_template_tags( array( 'post' ), '%buy_button%' ) . '</p>';
965
 
966
  ?>
967
  </div>
@@ -969,8 +967,8 @@ if ( ! class_exists( 'myCRED_Sell_Content_Module' ) ) :
969
 
970
  <div class="row">
971
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
972
- <h3><?php _e( 'Insufficient Funds Template', 'mycred' ); ?></h3>
973
- <p><span class="description"><?php _e( 'The content will be replaced with this template when viewed by a user that has not paid for the content and can not afford to pay.', 'mycred' ); ?></span></p>
974
  <?php
975
 
976
  wp_editor( $this->sell_content['templates']['cantafford'], $this->field_id( array( 'templates' => 'cantafford' ) ), array(
@@ -978,7 +976,7 @@ if ( ! class_exists( 'myCRED_Sell_Content_Module' ) ) :
978
  'textarea_rows' => 10
979
  ) );
980
 
981
- echo '<p>' . $this->core->available_template_tags( array( 'post' ), '%price%' ) . '</p>';
982
 
983
  ?>
984
  </div>
@@ -986,8 +984,8 @@ if ( ! class_exists( 'myCRED_Sell_Content_Module' ) ) :
986
 
987
  <div class="row">
988
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
989
- <h3><?php _e( 'Visitors Template', 'mycred' ); ?></h3>
990
- <p><span class="description"><?php _e( 'The content will be replaced with this template when viewed by someone who is not logged in on your website.', 'mycred' ); ?></span></p>
991
  <?php
992
 
993
  wp_editor( $this->sell_content['templates']['visitors'], $this->field_id( array( 'templates' => 'visitors' ) ), array(
@@ -995,7 +993,7 @@ if ( ! class_exists( 'myCRED_Sell_Content_Module' ) ) :
995
  'textarea_rows' => 10
996
  ) );
997
 
998
- echo '<p>' . $this->core->available_template_tags( array( 'post' ) ) . '</p>';
999
 
1000
  ?>
1001
  </div>
@@ -1003,7 +1001,7 @@ if ( ! class_exists( 'myCRED_Sell_Content_Module' ) ) :
1003
 
1004
  <div class="row">
1005
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
1006
- <h3><?php _e( 'Sales Count', 'mycred' ); ?></h3>
1007
  <button class="button button-primary" id="update-sales-count"><span class="dashicons dashicons-update mycred-update-sells-count" style="-webkit-animation: spin 2s linear infinite;animation: spin 2s linear infinite;display: none;vertical-align: middle;"></span>Update Sales Count</button>
1008
  </div>
1009
  </div>
@@ -1264,7 +1262,7 @@ if ( ! class_exists( 'myCRED_Sell_Content_Module' ) ) :
1264
  #mycred-sell-content-types .point-type-setup:last-child .cover { border-bottom: none; }
1265
  </style>
1266
  <div id="mycred-sell-content-types" class="container-fluid">
1267
- <input type="hidden" name="mycred-sell-this-setup-token" value="<?php echo wp_create_nonce( 'mycred-sell-this-content' ); ?>" />
1268
  <?php
1269
 
1270
  if ( ! empty( $settings['type'] ) ) {
@@ -1299,22 +1297,22 @@ if ( ! class_exists( 'myCRED_Sell_Content_Module' ) ) :
1299
  <div class="row row-narrow">
1300
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
1301
  <div class="form-group slim">
1302
- <label for="mycred-sell-this-<?php echo $point_type; ?>-status" class="slim"><input type="checkbox" name="mycred_sell_this[<?php echo $point_type; ?>][status]" id="mycred-sell-this-<?php echo $point_type; ?>-status"<?php if ( $sale_setup['status'] === 'enabled' ) echo ' checked="checked"'; ?> value="enabled" class="toggle-setup" data-type="<?php echo $point_type; ?>" /> <?php printf( __( 'Sell using %s', 'Point types name', 'mycred' ), $mycred->plural() ); ?></label>
1303
  </div>
1304
  </div>
1305
  </div>
1306
  <div class="cover">
1307
- <div class="row row-narrow padded-row mycred-sell-setup-container" id="mycred-sell-content-<?php echo $point_type; ?>-wrap" style="display: <?php if ( $sale_setup['status'] === 'enabled' ) echo 'block'; else echo 'none'; ?>;">
1308
  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
1309
  <div class="form-group slim">
1310
- <label for="mycred-sell-this-<?php echo $point_type; ?>-price"><?php _e( 'Price', 'mycred' ); ?></label>
1311
- <input type="text" name="mycred_sell_this[<?php echo $point_type; ?>][price]" id="mycred-sell-this-<?php echo $point_type; ?>-price" class="form-control" value="<?php echo esc_attr( $sale_setup['price'] ); ?>" />
1312
  </div>
1313
  </div>
1314
  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
1315
  <div class="form-group slim">
1316
- <label for="mycred-sell-this-<?php echo $point_type; ?>-expire"><?php _e( 'Expiration', 'mycred' ); ?></label>
1317
- <input type="text" name="mycred_sell_this[<?php echo $point_type; ?>][expire]" id="mycred-sell-this-<?php echo $point_type; ?>-expire" class="form-control" value="<?php echo absint( $sale_setup['expire'] ); ?>" />
1318
  </div>
1319
  </div>
1320
  </div>
@@ -1358,7 +1356,7 @@ if ( ! class_exists( 'myCRED_Sell_Content_Module' ) ) :
1358
  if ( ! isset( $_POST['mycred_sell_this'] ) || ! is_array( $_POST['mycred_sell_this'] ) || empty( $_POST['mycred_sell_this'] ) ) return;
1359
 
1360
  // Verify nonce
1361
- if ( isset( $_POST['mycred-sell-this-setup-token'] ) && wp_verify_nonce( $_POST['mycred-sell-this-setup-token'], 'mycred-sell-this-content' ) ) {
1362
 
1363
  $settings = mycred_sell_content_settings();
1364
 
@@ -1374,7 +1372,7 @@ if ( ! class_exists( 'myCRED_Sell_Content_Module' ) ) :
1374
  'status' => 'disabled',
1375
  'price' => 0,
1376
  'expire' => 0
1377
- ), $_POST['mycred_sell_this'][ $point_type ] );
1378
 
1379
  if ( $submission['status'] == '' ) $submission['status'] = 'disabled';
1380
 
241
 
242
  if ( is_user_logged_in() && ! mycred_is_admin() ) {
243
 
244
+ if ( isset( $_POST['action'] ) && sanitize_text_field( wp_unslash( $_POST['action'] ) ) == 'mycred-buy-content' && isset( $_POST['postid'] ) && isset( $_POST['token'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['token'] ) ), 'mycred-buy-this-content' ) ) {
245
 
246
  $post_id = absint( $_POST['postid'] );
247
+ $point_type = ( !empty( $_POST['ctype'] ) ? sanitize_key( $_POST['ctype'] ) : '' );
248
  $buying_cred = $this->sell_content['type'];
249
  $point_types = mycred_get_types( true );
250
  global $mycred_types;
516
 
517
  public function bbp_template_before_single() {
518
 
519
+ echo wp_kses_post( $this->bbp_content );
 
520
  }
521
 
522
  public function bbp_remove_breadcrumb( $is_front ) {
601
  if ( empty( $available_options ) ) return;
602
 
603
  ?>
604
+ <p class="mycred-p"><?php esc_html_e( 'Users profit share when their content is purchased.', 'mycred' ); ?></p>
605
  <table class="form-table mycred-inline-table">
606
  <tr>
607
+ <th scope="row"><?php esc_html_e( 'Profit Share', 'mycred' ); ?></th>
608
  <td>
609
  <fieldset id="mycred-badge-list" class="badge-list">
610
+ <legend class="screen-reader-text"><span><?php esc_html_e( 'Profit Share', 'mycred' ); ?></span></legend>
611
  <?php
612
 
613
  foreach ( $available_options as $point_type => $data ) {
617
 
618
  ?>
619
  <div class="mycred-wrapper buycred-wrapper disabled-option color-option">
620
+ <div><?php printf( esc_html( _x( '%s Profit Share', 'Points Name', 'mycred' ), $data['name'] ) ); ?></div>
621
  <div class="balance-row">
622
+ <div class="balance-view"><?php esc_html_e( 'Disabled', 'mycred' ); ?></div>
623
+ <div class="balance-desc"><em><?php esc_html_e( 'Not accepted as payment.', 'mycred' ); ?></em></div>
624
  </div>
625
  </div>
626
  <?php
632
 
633
  ?>
634
  <div class="mycred-wrapper buycred-wrapper disabled-option color-option">
635
+ <div><?php printf( esc_html( _x( '%s Profit Share', 'Points Name', 'mycred' ), $data['name'] ) ); ?></div>
636
  <div class="balance-row">
637
+ <div class="balance-view"><?php esc_html_e( 'Excluded', 'mycred' ); ?></div>
638
+ <div class="balance-desc"><em><?php printf( esc_html( _x( 'User can not pay using %s', 'Points Name', 'mycred' ), $data['name'] ) ); ?></em></div>
639
  </div>
640
  </div>
641
  <?php
647
 
648
  ?>
649
  <div class="mycred-wrapper buycred-wrapper color-option selected">
650
+ <div><?php printf( esc_html( _x( '%s Profit Share', 'Buying Points', 'mycred' ), $data['name'] ) ); ?></div>
651
  <div class="balance-row">
652
+ <div class="balance-view"><input type="text" size="8" name="mycred_sell_this[<?php echo esc_attr( $point_type ); ?>]" class="half" placeholder="<?php echo esc_attr( $data['default'] ); ?>" value="<?php if ( $data['override'] ) echo esc_attr( $data['custom'] ); ?>" /> %</div>
653
+ <div class="balance-desc"><em><?php esc_html_e( 'Leave empty to use the default.', 'mycred' ); ?></em></div>
654
  </div>
655
  </div>
656
  <?php
681
 
682
  if ( isset( $_POST['mycred_sell_this'] ) && ! empty( $_POST['mycred_sell_this'] ) ) {
683
 
684
+ foreach ( sanitize_text_field( wp_unslash( $_POST['mycred_sell_this'] ) ) as $point_type => $share ) {
685
 
686
  $share = sanitize_text_field( $share );
687
 
731
  $point_types = mycred_get_types( true );
732
 
733
  ?>
734
+ <h4><span class="dashicons dashicons-admin-plugins static"></span><?php esc_html_e( 'Sell Content', 'mycred' ); ?></h4>
735
  <div class="body" style="display:none;">
736
 
737
+ <h3><?php esc_html_e( 'Post Types', 'mycred' ); ?></h3>
738
+ <p><?php esc_html_e( 'Which post type(s) content field do you want to sell access to?', 'mycred' ); ?></p>
739
  <div id="mycred-sell-this-post-type-filter">
740
  <?php
741
 
754
  <div class="row">
755
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
756
  <div class="checkbox">
757
+ <label for="<?php echo esc_attr( $this->field_id( array( 'post_types' => $post_type ) ) ); ?>"><input type="checkbox" name="<?php echo esc_attr( $this->field_name( array( 'post_types' => $post_type ) ) ); ?>"<?php echo esc_attr( $selected ); ?> id="<?php echo esc_attr( $this->field_id( array( 'post_types' => $post_type ) ) ); ?>" class="mycred-check-count" data-type="<?php echo esc_attr( $post_type ); ?>" value="<?php echo esc_attr( $post_type ); ?>" /> <?php echo esc_attr( $post_type_label ); ?></label>
758
  </div>
759
  </div>
760
  <div class="col-lg-9 col-md-9 col-sm-12 col-xs-12">
761
+ <div id="<?php echo esc_attr( $this->field_id( array( 'post_types' => $post_type ) ) ); ?>-wrap" style="display: <?php echo esc_attr( $show_options ); ?>;">
762
  <div class="row">
763
  <div class="col-lg-5 col-md-5 col-sm-6 col-xs-12">
764
  <div class="form-group">
765
+ <select name="<?php echo esc_attr( $this->field_name( array( 'filters' => $post_type ) ) ); ?>[by]" class="form-control toggle-filter-menu" data-type="<?php echo esc_attr( $post_type ); ?>">
766
  <?php
767
 
768
  $settings = array( 'by' => 'all', 'list' => '' );
771
 
772
  $options = mycred_get_post_type_options( $post_type );
773
  if ( ! empty( $options ) ) {
774
+ foreach ( $options as $value => $option ) { ?>
775
+ <option value="<?php echo esc_attr( $value ); ?>"
776
+ <?php
777
  if ( $value == $settings['by'] ) echo ' selected="selected"';
778
+ if ( $option['data'] != '' ) echo ' data-place="' . esc_attr( $option['data'] ) . '"';?>
779
+ > <?php echo esc_html( $option['label'] );?> </option>
780
+ <?php
781
  }
782
  }
 
783
  ?>
784
  </select>
785
  </div>
786
  </div>
787
  <div class="col-lg-7 col-md-7 col-sm-6 col-xs-12">
788
+ <div id="post-type-filter-<?php echo esc_attr( $post_type ); ?>" style="display: <?php if ( ! in_array( $settings['by'], array( 'all', 'manual' ) ) ) echo 'block'; else echo 'none'; ?>;">
789
  <div class="form-group">
790
+ <input type="text" name="<?php echo esc_attr( $this->field_name( array( 'filters' => $post_type ) ) ); ?>[list]" value="<?php echo esc_attr( $settings['list'] ); ?>" placeholder="<?php if ( array_key_exists( $settings['by'], $options ) ) echo esc_attr( $options[ $settings['by'] ]['data'] ); ?>" class="form-control" />
791
  </div>
792
  </div>
793
  </div>
803
  ?>
804
  </div>
805
 
806
+ <h3><?php esc_html_e( 'Point Types', 'mycred' ); ?></h3>
807
+ <p><?php esc_html_e( 'Which point type(s) can be used as payment for accessing content?', 'mycred' ); ?></p>
808
  <div class="row">
809
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
810
  <?php
821
 
822
  ?>
823
  <div class="form-group">
824
+ <label for="<?php echo esc_attr( $this->field_id( array( 'type' => $point_type ) ) ); ?>"><input type="checkbox" name="<?php echo esc_attr( $this->field_name( array( 'type' => $point_type ) ) ); ?>"<?php echo esc_attr( $selected ); ?> id="<?php echo esc_attr( $this->field_id( array( 'type' => $point_type ) ) ); ?>" class="mycred-check-count" data-type="<?php echo esc_attr( $point_type ); ?>" value="<?php echo esc_attr( $point_type ); ?>" /> <?php echo esc_attr( $point_type_label ); ?></label>
825
  </div>
826
  <?php
827
 
860
  $expiration_label = apply_filters( 'mycred_sell_exp_title', __( 'Hour(s)', 'mycred' ), $point_type );
861
 
862
  ?>
863
+ <div id="mycred-sell-<?php echo esc_attr( $point_type ); ?>-wrap" style="display: <?php echo esc_attr( $selected ); ?>;">
864
+ <h3><?php printf( esc_html( __( '%s Setup', 'mycred' ), $point_type_label ) ); ?></h3>
865
  <div class="row">
866
  <div class="col-lg-3 col-md-3 col-sm-3 col-xs-12">
867
  <div class="form-group">
868
+ <label for="<?php echo esc_attr( $this->field_id( array( 'post_type_setup' => $point_type . '-status' ) ) ); ?>"><?php esc_html_e( 'Default Status', 'mycred' ); ?></label>
869
+ <select name="<?php echo esc_attr( $this->field_name( array( 'post_type_setup' => $point_type ) ) ); ?>[status]" id="<?php echo esc_attr( $this->field_id( array( 'post_type_setup' => $point_type . '-status' ) ) ); ?>" class="form-control">
870
+ <?php echo esc_attr( $this->enabled_options( $type_setup['status'] ) ); ?>
871
  </select>
872
  </div>
873
  </div>
874
  <div class="col-lg-3 col-md-3 col-sm-3 col-xs-12">
875
  <div class="form-group">
876
+ <label for="<?php echo esc_attr( $this->field_id( array( 'post_type_setup' => $point_type . '-price' ) ) ); ?>"><?php esc_html_e( 'Default Price', 'mycred' ); ?></label>
877
+ <input type="text" name="<?php echo esc_attr( $this->field_name( array( 'post_type_setup' => $point_type ) ) ); ?>[price]" id="<?php echo esc_attr( $this->field_id( array( 'post_type_setup' => $point_type . '-price' ) ) ); ?>" class="form-control" value="<?php echo esc_attr( $type_setup['price'] ); ?>" />
878
  </div>
879
  </div>
880
  <div class="col-lg-3 col-md-3 col-sm-3 col-xs-12">
881
  <div class="form-group">
882
+ <label for="<?php echo esc_attr( $this->field_id( array( 'post_type_setup' => $point_type . '-expire' ) ) ); ?>"><?php esc_html_e( 'Expiration', 'mycred' ); ?></label>
883
+ <input type="text" name="<?php echo esc_attr( $this->field_name( array( 'post_type_setup' => $point_type ) ) ); ?>[expire]" id="<?php echo esc_attr( $this->field_id( array( 'post_type_setup' => $point_type . '-expire' ) ) ); ?>" class="form-control" value="<?php echo esc_attr( $type_setup['expire'] ); ?>" />
884
+ <p><span class="description"><?php printf( esc_html( __( 'Option to automatically expire purchases after certain number of %s. Use zero to disable.', 'mycred' ), $expiration_label ) ); ?></span></p>
885
  </div>
886
  </div>
887
  <div class="col-lg-3 col-md-3 col-sm-3 col-xs-12">
888
  <div class="form-group">
889
+ <label for="<?php echo esc_attr( $this->field_id( array( 'post_type_setup' => $point_type . '-profit-share' ) ) ); ?>"><?php esc_html_e( 'Profit Share', 'mycred' ); ?></label>
890
+ <input type="text" name="<?php echo esc_attr( $this->field_name( array( 'post_type_setup' => $point_type ) ) ); ?>[profit_share]" id="<?php echo esc_attr( $this->field_id( array( 'post_type_setup' => $point_type . '-profit-share' ) ) ); ?>" class="form-control" value="<?php echo esc_attr( $type_setup['profit_share'] ); ?>" />
891
+ <p><span class="description"><?php printf( esc_html( __( 'Option to pay a percentage of each sale with the content author.', 'mycred' ), $expiration_label ) ); ?></span></p>
892
  </div>
893
  </div>
894
  </div>
895
  <div class="row">
896
  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
897
  <div class="form-group">
898
+ <label for="<?php echo esc_attr( $this->field_id( array( 'post_type_setup' => $point_type . '-button' ) ) ); ?>"><?php esc_html_e( 'Button Label', 'mycred' ); ?></label>
899
+ <input type="text" name="<?php echo esc_attr( $this->field_name( array( 'post_type_setup' => $point_type ) ) ); ?>[button_label]" id="<?php echo esc_attr( $this->field_id( array( 'post_type_setup' => $point_type . '-button' ) ) ); ?>" class="form-control" placeholder="<?php esc_attr_e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $type_setup['button_label'] ); ?>" />
900
+ <p><span class="description"><?php echo esc_html( $this->core->available_template_tags( array(), '%price%' ) ); ?></span></p>
901
  </div>
902
  </div>
903
  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
904
  <div class="form-group">
905
+ <label for="<?php echo esc_attr( $this->field_id( array( 'post_type_setup' => $point_type . '-css' ) ) ); ?>"><?php esc_html_e( 'Button CSS Classes', 'mycred' ); ?></label>
906
+ <input type="text" name="<?php echo esc_attr( $this->field_name( array( 'post_type_setup' => $point_type ) ) ); ?>[button_classes]" id="<?php echo esc_attr( $this->field_id( array( 'post_type_setup' => $point_type . '-css' ) ) ); ?>" class="form-control" value="<?php echo esc_attr( $type_setup['button_classes'] ); ?>" />
907
  </div>
908
  </div>
909
  </div>
910
+ <h3><?php esc_html_e( 'Log Templates', 'mycred' ); ?></h3>
911
  <div class="row">
912
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
913
  <div class="form-group">
914
+ <label for="<?php echo esc_attr( $this->field_id( array( 'post_type_setup' => $point_type . '-log-pay' ) ) ); ?>"><?php esc_html_e( 'Payment log entry template', 'mycred' ); ?></label>
915
+ <input type="text" name="<?php echo esc_attr( $this->field_name( array( 'post_type_setup' => $point_type ) ) ); ?>[log_payment]" id="<?php echo esc_attr( $this->field_id( array( 'post_type_setup' => $point_type . '-log-pay' ) ) ); ?>" class="form-control" placeholder="<?php esc_attr_e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $type_setup['log_payment'] ); ?>" />
916
+ <p><span class="description"><?php echo esc_html( $this->core->available_template_tags( array( 'general', 'post' ) ) ); ?></span></p>
917
  </div>
918
  </div>
919
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
920
  <div class="form-group">
921
+ <label for="<?php echo esc_attr( $this->field_id( array( 'post_type_setup' => $point_type . '-log-share' ) ) ); ?>"><?php esc_html_e( 'Profit Share payout log entry template', 'mycred' ); ?></label>
922
+ <input type="text" name="<?php echo esc_attr( $this->field_name( array( 'post_type_setup' => $point_type ) ) ); ?>[log_sale]" id="<?php echo esc_attr( $this->field_id( array( 'post_type_setup' => $point_type . '-log-share' ) ) ); ?>" class="form-control" placeholder="<?php esc_attr_e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $type_setup['log_sale'] ); ?>" />
923
+ <p><span class="description"><?php echo esc_html( $this->core->available_template_tags( array( 'general', 'post' ) ) ); ?></span></p>
924
  </div>
925
  </div>
926
  </div>
932
 
933
  ?>
934
 
935
+ <h3><?php esc_html_e( 'Transactions', 'mycred' ); ?></h3>
936
  <div class="row">
937
  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
938
  <div class="checkbox">
939
+ <label for="<?php echo esc_attr( $this->field_id( 'reload' ) ); ?>"><input type="checkbox" name="<?php echo esc_attr( $this->field_name( 'reload' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'reload' ) ); ?>" <?php esc_attr( checked( $this->sell_content['reload'], 1 ) ); ?> value="1" /> <?php esc_html_e( 'Reload page after successful payments.', 'mycred' ); ?></label>
940
  </div>
941
  </div>
942
  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
943
  <div class="form-group">
944
+ <label for="<?php echo esc_attr( $this->field_id( 'working' ) ); ?>"><?php esc_html_e( 'Button Label', 'mycred' ); ?></label>
945
+ <input type="text" name="<?php echo esc_attr( $this->field_name( 'working' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'working' ) ); ?>" class="form-control" placeholder="<?php esc_attr_e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $this->sell_content['working'] ); ?>" />
946
+ <p><span class="description"><?php esc_html_e( 'Option to show a custom button label while the payment is being processed. HTML is allowed.', 'mycred' ); ?></span></p>
947
  </div>
948
  </div>
949
  </div>
950
 
951
  <div class="row">
952
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
953
+ <h3><?php esc_html_e( 'Purchase Template', 'mycred' ); ?></h3>
954
+ <p><span class="description"><?php esc_html_e( 'The content will be replaced with this template when viewed by a user that has not paid for the content but can afford to pay.', 'mycred' ); ?></span></p>
955
  <?php
956
 
957
  wp_editor( $this->sell_content['templates']['members'], $this->field_id( array( 'templates' => 'members' ) ), array(
959
  'textarea_rows' => 10
960
  ) );
961
 
962
+ echo '<p>' . esc_html( $this->core->available_template_tags( array( 'post' ), '%buy_button%' ) ) . '</p>';
963
 
964
  ?>
965
  </div>
967
 
968
  <div class="row">
969
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
970
+ <h3><?php esc_html_e( 'Insufficient Funds Template', 'mycred' ); ?></h3>
971
+ <p><span class="description"><?php esc_html_e( 'The content will be replaced with this template when viewed by a user that has not paid for the content and can not afford to pay.', 'mycred' ); ?></span></p>
972
  <?php
973
 
974
  wp_editor( $this->sell_content['templates']['cantafford'], $this->field_id( array( 'templates' => 'cantafford' ) ), array(
976
  'textarea_rows' => 10
977
  ) );
978
 
979
+ echo '<p>' . esc_html( $this->core->available_template_tags( array( 'post' ), '%price%' ) ) . '</p>';
980
 
981
  ?>
982
  </div>
984
 
985
  <div class="row">
986
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
987
+ <h3><?php esc_html_e( 'Visitors Template', 'mycred' ); ?></h3>
988
+ <p><span class="description"><?php esc_html_e( 'The content will be replaced with this template when viewed by someone who is not logged in on your website.', 'mycred' ); ?></span></p>
989
  <?php
990
 
991
  wp_editor( $this->sell_content['templates']['visitors'], $this->field_id( array( 'templates' => 'visitors' ) ), array(
993
  'textarea_rows' => 10
994
  ) );
995
 
996
+ echo '<p>' . esc_html( $this->core->available_template_tags( array( 'post' ) ) ) . '</p>';
997
 
998
  ?>
999
  </div>
1001
 
1002
  <div class="row">
1003
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
1004
+ <h3><?php esc_html_e( 'Sales Count', 'mycred' ); ?></h3>
1005
  <button class="button button-primary" id="update-sales-count"><span class="dashicons dashicons-update mycred-update-sells-count" style="-webkit-animation: spin 2s linear infinite;animation: spin 2s linear infinite;display: none;vertical-align: middle;"></span>Update Sales Count</button>
1006
  </div>
1007
  </div>
1262
  #mycred-sell-content-types .point-type-setup:last-child .cover { border-bottom: none; }
1263
  </style>
1264
  <div id="mycred-sell-content-types" class="container-fluid">
1265
+ <input type="hidden" name="mycred-sell-this-setup-token" value="<?php echo esc_html( wp_create_nonce( 'mycred-sell-this-content' ) ); ?>" />
1266
  <?php
1267
 
1268
  if ( ! empty( $settings['type'] ) ) {
1297
  <div class="row row-narrow">
1298
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
1299
  <div class="form-group slim">
1300
+ <label for="mycred-sell-this-<?php echo esc_attr( $point_type ); ?>-status" class="slim"><input type="checkbox" name="mycred_sell_this[<?php echo esc_attr( $point_type ); ?>][status]" id="mycred-sell-this-<?php echo esc_attr( $point_type ); ?>-status"<?php if ( $sale_setup['status'] === 'enabled' ) echo ' checked="checked"'; ?> value="enabled" class="toggle-setup" data-type="<?php echo esc_attr( $point_type ); ?>" /> <?php printf( esc_html( __( 'Sell using %s', 'Point types name', 'mycred' ), $mycred->plural() ) ); ?></label>
1301
  </div>
1302
  </div>
1303
  </div>
1304
  <div class="cover">
1305
+ <div class="row row-narrow padded-row mycred-sell-setup-container" id="mycred-sell-content-<?php echo esc_attr( $point_type ); ?>-wrap" style="display: <?php if ( $sale_setup['status'] === 'enabled' ) echo 'block'; else echo 'none'; ?>;">
1306
  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
1307
  <div class="form-group slim">
1308
+ <label for="mycred-sell-this-<?php echo esc_attr( $point_type ); ?>-price"><?php esc_html_e( 'Price', 'mycred' ); ?></label>
1309
+ <input type="text" name="mycred_sell_this[<?php echo esc_attr( $point_type ); ?>][price]" id="mycred-sell-this-<?php echo esc_attr( $point_type ); ?>-price" class="form-control" value="<?php echo esc_attr( $sale_setup['price'] ); ?>" />
1310
  </div>
1311
  </div>
1312
  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
1313
  <div class="form-group slim">
1314
+ <label for="mycred-sell-this-<?php echo esc_attr( $point_type ); ?>-expire"><?php esc_html_e( 'Expiration', 'mycred' ); ?></label>
1315
+ <input type="text" name="mycred_sell_this[<?php echo esc_attr( $point_type ); ?>][expire]" id="mycred-sell-this-<?php echo esc_attr( $point_type ); ?>-expire" class="form-control" value="<?php echo absint( $sale_setup['expire'] ); ?>" />
1316
  </div>
1317
  </div>
1318
  </div>
1356
  if ( ! isset( $_POST['mycred_sell_this'] ) || ! is_array( $_POST['mycred_sell_this'] ) || empty( $_POST['mycred_sell_this'] ) ) return;
1357
 
1358
  // Verify nonce
1359
+ if ( isset( $_POST['mycred-sell-this-setup-token'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['mycred-sell-this-setup-token'] ) ), 'mycred-sell-this-content' ) ) {
1360
 
1361
  $settings = mycred_sell_content_settings();
1362
 
1372
  'status' => 'disabled',
1373
  'price' => 0,
1374
  'expire' => 0
1375
+ ), sanitize_text_field( wp_unslash( $_POST['mycred_sell_this'][ $point_type ] ) ) );
1376
 
1377
  if ( $submission['status'] == '' ) $submission['status'] = 'disabled';
1378
 
addons/stats/includes/mycred-stats-object.php CHANGED
@@ -405,7 +405,7 @@ if ( ! class_exists( 'myCRED_Chart' ) ) :
405
 
406
  $element_id = $this->generate_element_id();
407
  $element_style = $this->get_canvas_styling();
408
- $output = '<div class="chart-container ' . MYCRED_SLUG . '-chart-container"><canvas class="' . MYCRED_SLUG . '-chart-canvas" ' . $element_style . ' id="' . $element_id . '"></canvas></div>';
409
 
410
  $mycred_charts[ $element_id ] = $chart;
411
 
405
 
406
  $element_id = $this->generate_element_id();
407
  $element_style = $this->get_canvas_styling();
408
+ $output = '<div class="chart-container ' . MYCRED_SLUG . '-chart-container"><canvas class="' . MYCRED_SLUG . '-chart-canvas" ' . $element_style . ' id="' . $element_id . '" height="'. $this->args['height'] . ' "></canvas></div>';
409
 
410
  $mycred_charts[ $element_id ] = $chart;
411
 
addons/stats/myCRED-addon-stats.php CHANGED
@@ -351,18 +351,18 @@ jQuery(function($){
351
  if ( empty( $prefs['color_negative'] ) ) $prefs['color_negative'] = $colors['negative'];
352
 
353
  ?>
354
- <h4><span class="dashicons dashicons-admin-plugins static"></span><?php _e( 'Statistics', 'mycred' ); ?></h4>
355
  <div class="body" style="display:none;">
356
 
357
  <div class="row">
358
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
359
 
360
- <h3><?php _e( 'Statistics Color', 'mycred' ); ?></h3>
361
  <div class="row">
362
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
363
 
364
  <div class="form-group">
365
- <label for="<?php echo $this->field_id( 'color_positive' ); ?>"><?php _e( 'Positive Values', 'mycred' ); ?></label>
366
  <input type="text" name="<?php echo $this->field_name( 'color_positive' ); ?>" id="<?php echo $this->field_id( 'color_positive' ); ?>" value="<?php echo esc_attr( $prefs['color_positive'] ); ?>" class="form-control <?php if ( MYCRED_STATS_COLOR_TYPE == 'hex' ) echo ' wp-color-picker-field" data-default-color="#dedede'; ?>" />
367
  </div>
368
 
@@ -370,7 +370,7 @@ jQuery(function($){
370
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
371
 
372
  <div class="form-group">
373
- <label for="<?php echo $this->field_id( 'color_negative' ); ?>"><?php _e( 'Negative Values', 'mycred' ); ?></label>
374
  <input type="text" name="<?php echo $this->field_name( 'color_negative' ); ?>" id="<?php echo $this->field_id( 'color_negative' ); ?>" value="<?php echo esc_attr( $prefs['color_negative'] ); ?>" class="form-control <?php if ( MYCRED_STATS_COLOR_TYPE == 'hex' ) echo ' wp-color-picker-field" data-default-color="#dedede'; ?>" />
375
  </div>
376
 
@@ -388,14 +388,14 @@ jQuery(function($){
388
 
389
  ?>
390
 
391
- <h3><?php _e( 'Optimization', 'mycred' ); ?></h3>
392
- <p><span class="description"><?php _e( 'Disabling these features can improve render time of your charts, especially if you are showing a large number of charts on a single page. You can also select to disable these features when using the chart shortcodes.', 'mycred' ); ?></span></p>
393
  <div class="row">
394
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
395
 
396
  <div class="form-group">
397
  <div class="checkbox">
398
- <label for="<?php echo $this->field_id( 'animate' ); ?>"><input type="checkbox" name="<?php echo $this->field_name( 'animate' ); ?>" id="<?php echo $this->field_id( 'animate' ); ?>"<?php checked( $prefs['animate'], 1 ); ?> value="1" /> <?php _e( 'Animate Charts', 'mycred' ); ?></label>
399
  </div>
400
  </div>
401
 
@@ -404,7 +404,7 @@ jQuery(function($){
404
 
405
  <div class="form-group">
406
  <div class="checkbox">
407
- <label for="<?php echo $this->field_id( 'bezier' ); ?>"><input type="checkbox" name="<?php echo $this->field_name( 'bezier' ); ?>" id="<?php echo $this->field_id( 'bezier' ); ?>"<?php checked( $prefs['bezier'], 1 ); ?> value="1" /> <?php _e( 'Use Bezier Curves', 'mycred' ); ?></label>
408
  </div>
409
  </div>
410
 
@@ -412,7 +412,7 @@ jQuery(function($){
412
  </div>
413
 
414
  <div class="form-group">
415
- <label for="<?php echo $this->field_id( 'caching' ); ?>"><?php _e( 'Caching', 'mycred' ); ?></label>
416
  <select name="<?php echo $this->field_name( 'caching' ); ?>" id="<?php echo $this->field_id( 'caching' ); ?>" class="form-control">
417
  <?php
418
 
351
  if ( empty( $prefs['color_negative'] ) ) $prefs['color_negative'] = $colors['negative'];
352
 
353
  ?>
354
+ <h4><span class="dashicons dashicons-admin-plugins static"></span><?php esc_html_e( 'Statistics', 'mycred' ); ?></h4>
355
  <div class="body" style="display:none;">
356
 
357
  <div class="row">
358
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
359
 
360
+ <h3><?php esc_html_e( 'Statistics Color', 'mycred' ); ?></h3>
361
  <div class="row">
362
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
363
 
364
  <div class="form-group">
365
+ <label for="<?php echo $this->field_id( 'color_positive' ); ?>"><?php esc_html_e( 'Positive Values', 'mycred' ); ?></label>
366
  <input type="text" name="<?php echo $this->field_name( 'color_positive' ); ?>" id="<?php echo $this->field_id( 'color_positive' ); ?>" value="<?php echo esc_attr( $prefs['color_positive'] ); ?>" class="form-control <?php if ( MYCRED_STATS_COLOR_TYPE == 'hex' ) echo ' wp-color-picker-field" data-default-color="#dedede'; ?>" />
367
  </div>
368
 
370
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
371
 
372
  <div class="form-group">
373
+ <label for="<?php echo $this->field_id( 'color_negative' ); ?>"><?php esc_html_e( 'Negative Values', 'mycred' ); ?></label>
374
  <input type="text" name="<?php echo $this->field_name( 'color_negative' ); ?>" id="<?php echo $this->field_id( 'color_negative' ); ?>" value="<?php echo esc_attr( $prefs['color_negative'] ); ?>" class="form-control <?php if ( MYCRED_STATS_COLOR_TYPE == 'hex' ) echo ' wp-color-picker-field" data-default-color="#dedede'; ?>" />
375
  </div>
376
 
388
 
389
  ?>
390
 
391
+ <h3><?php esc_html_e( 'Optimization', 'mycred' ); ?></h3>
392
+ <p><span class="description"><?php esc_html_e( 'Disabling these features can improve render time of your charts, especially if you are showing a large number of charts on a single page. You can also select to disable these features when using the chart shortcodes.', 'mycred' ); ?></span></p>
393
  <div class="row">
394
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
395
 
396
  <div class="form-group">
397
  <div class="checkbox">
398
+ <label for="<?php echo $this->field_id( 'animate' ); ?>"><input type="checkbox" name="<?php echo $this->field_name( 'animate' ); ?>" id="<?php echo $this->field_id( 'animate' ); ?>"<?php checked( $prefs['animate'], 1 ); ?> value="1" /> <?php esc_html_e( 'Animate Charts', 'mycred' ); ?></label>
399
  </div>
400
  </div>
401
 
404
 
405
  <div class="form-group">
406
  <div class="checkbox">
407
+ <label for="<?php echo $this->field_id( 'bezier' ); ?>"><input type="checkbox" name="<?php echo $this->field_name( 'bezier' ); ?>" id="<?php echo $this->field_id( 'bezier' ); ?>"<?php checked( $prefs['bezier'], 1 ); ?> value="1" /> <?php esc_html_e( 'Use Bezier Curves', 'mycred' ); ?></label>
408
  </div>
409
  </div>
410
 
412
  </div>
413
 
414
  <div class="form-group">
415
+ <label for="<?php echo $this->field_id( 'caching' ); ?>"><?php esc_html_e( 'Caching', 'mycred' ); ?></label>
416
  <select name="<?php echo $this->field_name( 'caching' ); ?>" id="<?php echo $this->field_id( 'caching' ); ?>" class="form-control">
417
  <?php
418
 
addons/stats/widgets/mycred-stats-widget-circulation.php CHANGED
@@ -186,21 +186,21 @@ if ( ! class_exists( 'myCRED_Stats_Widget_Circulation' ) ) :
186
  <thead>
187
  <tr>
188
  <th class="rowtitle"></th>
189
- <th class="doublecell" colspan="2"><?php _e( 'Today', 'mycred' ); ?></th>
190
- <th class="doublecell" colspan="2"><?php _e( 'This Week', 'mycred' ); ?></th>
191
- <th class="doublecell" colspan="2"><?php _e( 'This Month', 'mycred' ); ?></th>
192
- <th class="doublecell" colspan="2"><?php _e( 'This Year', 'mycred' ); ?></th>
193
  </tr>
194
  <tr class="subheader">
195
  <th class="rowtitle"></th>
196
- <th class="cell"><?php _e( 'Gained', 'mycred' ); ?></th>
197
- <th class="cell"><?php _e( 'Lost', 'mycred' ); ?></th>
198
- <th class="cell"><?php _e( 'Gained', 'mycred' ); ?></th>
199
- <th class="cell"><?php _e( 'Lost', 'mycred' ); ?></th>
200
- <th class="cell"><?php _e( 'Gained', 'mycred' ); ?></th>
201
- <th class="cell"><?php _e( 'Lost', 'mycred' ); ?></th>
202
- <th class="cell"><?php _e( 'Gained', 'mycred' ); ?></th>
203
- <th class="cell last"><?php _e( 'Lost', 'mycred' ); ?></th>
204
  </tr>
205
  </thead>
206
  <tbody>
@@ -316,21 +316,21 @@ jQuery(function($) {
316
  <thead>
317
  <tr>
318
  <th class="rowtitle"></th>
319
- <th class="doublecell" colspan="2"><?php _e( 'Today', 'mycred' ); ?></th>
320
- <th class="doublecell" colspan="2"><?php _e( 'This Week', 'mycred' ); ?></th>
321
- <th class="doublecell" colspan="2"><?php _e( 'This Month', 'mycred' ); ?></th>
322
- <th class="doublecell" colspan="2"><?php _e( 'This Year', 'mycred' ); ?></th>
323
  </tr>
324
  <tr class="subheader">
325
  <th class="rowtitle"></th>
326
- <th class="cell"><?php _e( 'Gained', 'mycred' ); ?></th>
327
- <th class="cell"><?php _e( 'Lost', 'mycred' ); ?></th>
328
- <th class="cell"><?php _e( 'Gained', 'mycred' ); ?></th>
329
- <th class="cell"><?php _e( 'Lost', 'mycred' ); ?></th>
330
- <th class="cell"><?php _e( 'Gained', 'mycred' ); ?></th>
331
- <th class="cell"><?php _e( 'Lost', 'mycred' ); ?></th>
332
- <th class="cell"><?php _e( 'Gained', 'mycred' ); ?></th>
333
- <th class="cell last"><?php _e( 'Lost', 'mycred' ); ?></th>
334
  </tr>
335
  </thead>
336
  <tbody>
186
  <thead>
187
  <tr>
188
  <th class="rowtitle"></th>
189
+ <th class="doublecell" colspan="2"><?php esc_html_e( 'Today', 'mycred' ); ?></th>
190
+ <th class="doublecell" colspan="2"><?php esc_html_e( 'This Week', 'mycred' ); ?></th>
191
+ <th class="doublecell" colspan="2"><?php esc_html_e( 'This Month', 'mycred' ); ?></th>
192
+ <th class="doublecell" colspan="2"><?php esc_html_e( 'This Year', 'mycred' ); ?></th>
193
  </tr>
194
  <tr class="subheader">
195
  <th class="rowtitle"></th>
196
+ <th class="cell"><?php esc_html_e( 'Gained', 'mycred' ); ?></th>
197
+ <th class="cell"><?php esc_html_e( 'Lost', 'mycred' ); ?></th>
198
+ <th class="cell"><?php esc_html_e( 'Gained', 'mycred' ); ?></th>
199
+ <th class="cell"><?php esc_html_e( 'Lost', 'mycred' ); ?></th>
200
+ <th class="cell"><?php esc_html_e( 'Gained', 'mycred' ); ?></th>
201
+ <th class="cell"><?php esc_html_e( 'Lost', 'mycred' ); ?></th>
202
+ <th class="cell"><?php esc_html_e( 'Gained', 'mycred' ); ?></th>
203
+ <th class="cell last"><?php esc_html_e( 'Lost', 'mycred' ); ?></th>
204
  </tr>
205
  </thead>
206
  <tbody>
316
  <thead>
317
  <tr>
318
  <th class="rowtitle"></th>
319
+ <th class="doublecell" colspan="2"><?php esc_html_e( 'Today', 'mycred' ); ?></th>
320
+ <th class="doublecell" colspan="2"><?php esc_html_e( 'This Week', 'mycred' ); ?></th>
321
+ <th class="doublecell" colspan="2"><?php esc_html_e( 'This Month', 'mycred' ); ?></th>
322
+ <th class="doublecell" colspan="2"><?php esc_html_e( 'This Year', 'mycred' ); ?></th>
323
  </tr>
324
  <tr class="subheader">
325
  <th class="rowtitle"></th>
326
+ <th class="cell"><?php esc_html_e( 'Gained', 'mycred' ); ?></th>
327
+ <th class="cell"><?php esc_html_e( 'Lost', 'mycred' ); ?></th>
328
+ <th class="cell"><?php esc_html_e( 'Gained', 'mycred' ); ?></th>
329
+ <th class="cell"><?php esc_html_e( 'Lost', 'mycred' ); ?></th>
330
+ <th class="cell"><?php esc_html_e( 'Gained', 'mycred' ); ?></th>
331
+ <th class="cell"><?php esc_html_e( 'Lost', 'mycred' ); ?></th>
332
+ <th class="cell"><?php esc_html_e( 'Gained', 'mycred' ); ?></th>
333
+ <th class="cell last"><?php esc_html_e( 'Lost', 'mycred' ); ?></th>
334
  </tr>
335
  </thead>
336
  <tbody>
addons/stats/widgets/mycred-stats-widget-daily-gains.php CHANGED
@@ -124,7 +124,7 @@ if ( ! class_exists( 'myCRED_Stats_Widget_Daily_Gains' ) ) :
124
 
125
  ?>
126
  <div id="" class="clear clearfix">
127
- <h1><?php _e( 'Gains in the last 10 days', 'mycred' ); ?></h1>
128
  <p><span class="description"><?php echo $label; ?></span></p>
129
  <?php
130
 
@@ -148,7 +148,7 @@ if ( ! class_exists( 'myCRED_Stats_Widget_Daily_Gains' ) ) :
148
  ?>
149
  <li>
150
  <strong style="color:<?php echo $this->colors[ $item->type ]['positive']; ?>;"><?php echo $label; ?></strong>
151
- <span class="view"><a href="<?php echo esc_url( $url ); ?>"><?php _e( 'View', 'mycred' ); ?></a></span>
152
  <ul>
153
  <li><?php echo number_format( $item->total, 0, '.', ' ' ); ?></li>
154
  <li><?php echo $item->count; ?></li>
124
 
125
  ?>
126
  <div id="" class="clear clearfix">
127
+ <h1><?php esc_html_e( 'Gains in the last 10 days', 'mycred' ); ?></h1>
128
  <p><span class="description"><?php echo $label; ?></span></p>
129
  <?php
130
 
148
  ?>
149
  <li>
150
  <strong style="color:<?php echo $this->colors[ $item->type ]['positive']; ?>;"><?php echo $label; ?></strong>
151
+ <span class="view"><a href="<?php echo esc_url( $url ); ?>"><?php esc_html_e( 'View', 'mycred' ); ?></a></span>
152
  <ul>
153
  <li><?php echo number_format( $item->total, 0, '.', ' ' ); ?></li>
154
  <li><?php echo $item->count; ?></li>
addons/stats/widgets/mycred-stats-widget-daily-loses.php CHANGED
@@ -124,7 +124,7 @@ if ( ! class_exists( 'myCRED_Stats_Widget_Daily_Loses' ) ) :
124
 
125
  ?>
126
  <div id="" class="clear clearfix">
127
- <h1><?php _e( 'Loses in the last 10 days', 'mycred' ); ?></h1>
128
  <p><span class="description"><?php echo $lose_label; ?></span></p>
129
  <?php
130
 
@@ -148,7 +148,7 @@ if ( ! class_exists( 'myCRED_Stats_Widget_Daily_Loses' ) ) :
148
  ?>
149
  <li>
150
  <strong style="color:<?php echo $this->colors[ $item->type ]['negative']; ?>;"><?php echo $label; ?></strong>
151
- <span class="view"><a href="<?php echo esc_url( $url ); ?>"><?php _e( 'View', 'mycred' ); ?></a></span>
152
  <ul>
153
  <li><?php echo number_format( $item->total, 0, '.', ' ' ); ?></li>
154
  <li><?php echo $item->count; ?></li>
124
 
125
  ?>
126
  <div id="" class="clear clearfix">
127
+ <h1><?php esc_html_e( 'Loses in the last 10 days', 'mycred' ); ?></h1>
128
  <p><span class="description"><?php echo $lose_label; ?></span></p>
129
  <?php
130
 
148
  ?>
149
  <li>
150
  <strong style="color:<?php echo $this->colors[ $item->type ]['negative']; ?>;"><?php echo $label; ?></strong>
151
+ <span class="view"><a href="<?php echo esc_url( $url ); ?>"><?php esc_html_e( 'View', 'mycred' ); ?></a></span>
152
  <ul>
153
  <li><?php echo number_format( $item->total, 0, '.', ' ' ); ?></li>
154
  <li><?php echo $item->count; ?></li>
addons/transfer/includes/mycred-transfer-widgets.php CHANGED
@@ -88,42 +88,42 @@ if ( ! class_exists( 'myCRED_Widget_Transfer' ) ) :
88
  ?>
89
  <!-- Widget Options -->
90
  <p class="myCRED-widget-field">
91
- <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php _e( 'Title', 'mycred' ); ?>:</label>
92
- <input id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" placeholder="<?php _e( 'optional', 'mycred' ); ?>" value="<?php echo esc_attr( $title ); ?>" class="widefat" />
93
  </p>
94
  <p class="myCRED-widget-field">
95
- <label for="<?php echo esc_attr( $this->get_field_id( 'show_balance' ) ); ?>"><input type="checkbox" name="<?php echo esc_attr( $this->get_field_name( 'show_balance' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'show_balance' ) ); ?>" value="1"<?php checked( $show_balance, true ); ?> class="checkbox" /> <?php _e( 'Show users balance', 'mycred' ); ?></label>
96
  </p>
97
  <p class="myCRED-widget-field">
98
- <label for="<?php echo esc_attr( $this->get_field_id( 'show_limit' ) ); ?>"><input type="checkbox" name="<?php echo esc_attr( $this->get_field_name( 'show_limit' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'show_limit' ) ); ?>" value="1"<?php checked( $show_balance, true ); ?> class="checkbox" /> <?php _e( 'Show users limit', 'mycred' ); ?></label>
99
  </p>
100
  <p class="myCRED-widget-field">
101
- <label for="<?php echo esc_attr( $this->get_field_id( 'button' ) ); ?>"><?php _e( 'Button Label', 'mycred' ); ?>:</label>
102
- <input id="<?php echo esc_attr( $this->get_field_id( 'button' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'button' ) ); ?>" type="text" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $button ); ?>" class="widefat" />
103
  </p>
104
  <p class="myCRED-widget-field">
105
- <label for="<?php echo esc_attr( $this->get_field_id( 'amount' ) ); ?>"><?php _e( 'Amount', 'mycred' ); ?>:</label>
106
- <input id="<?php echo esc_attr( $this->get_field_id( 'amount' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'amount' ) ); ?>" type="text" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $amount ); ?>" class="widefat" />
107
  </p>
108
  <p class="myCRED-widget-field">
109
- <label for="<?php echo esc_attr( $this->get_field_id( 'reference' ) ); ?>"><?php _e( 'Reference', 'mycred' ); ?>:</label>
110
- <input id="<?php echo esc_attr( $this->get_field_id( 'reference' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'reference' ) ); ?>" type="text" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $reference ); ?>" class="widefat" />
111
  </p>
112
  <p class="myCRED-widget-field">
113
- <label for="<?php echo esc_attr( $this->get_field_id( 'pay_to' ) ); ?>"><?php _e( 'Recipient', 'mycred' ); ?>:</label>
114
- <input id="<?php echo esc_attr( $this->get_field_id( 'pay_to' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'pay_to' ) ); ?>" type="text" placeholder="<?php _e( 'optional', 'mycred' ); ?>" value="<?php echo esc_attr( $recipient ); ?>" class="widefat" />
115
  </p>
116
  <p class="myCRED-widget-field">
117
- <label for="<?php echo esc_attr( $this->get_field_id( 'placeholder' ) ); ?>"><?php _e( 'Recipient Placeholder', 'mycred' ); ?>:</label>
118
- <input id="<?php echo esc_attr( $this->get_field_id( 'placeholder' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'placeholder' ) ); ?>" type="text" placeholder="<?php _e( 'optional', 'mycred' ); ?>" value="<?php echo esc_attr( $placeholder ); ?>" class="widefat" />
119
  </p>
120
  <p class="myCRED-widget-field">
121
- <label for="<?php echo esc_attr( $this->get_field_id( 'types' ) ); ?>"><?php _e( 'Point Types', 'mycred' ); ?>:</label>
122
- <input id="<?php echo esc_attr( $this->get_field_id( 'types' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'types' ) ); ?>" type="text" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $point_types ); ?>" class="widefat" />
123
  </p>
124
  <p class="myCRED-widget-field">
125
- <label for="<?php echo esc_attr( $this->get_field_id( 'excluded' ) ); ?>"><?php _e( 'Message for Excluded Users', 'mycred' ); ?>:</label>
126
- <input id="<?php echo esc_attr( $this->get_field_id( 'excluded' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'excluded' ) ); ?>" placeholder="<?php _e( 'optional', 'mycred' ); ?>" type="text" value="<?php echo esc_attr( $excluded ); ?>" class="widefat" />
127
  </p>
128
  <?php
129
 
88
  ?>
89
  <!-- Widget Options -->
90
  <p class="myCRED-widget-field">
91
+ <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php esc_html_e( 'Title', 'mycred' ); ?>:</label>
92
+ <input id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" placeholder="<?php esc_attr_e( 'optional', 'mycred' ); ?>" value="<?php echo esc_attr( $title ); ?>" class="widefat" />
93
  </p>
94
  <p class="myCRED-widget-field">
95
+ <label for="<?php echo esc_attr( $this->get_field_id( 'show_balance' ) ); ?>"><input type="checkbox" name="<?php echo esc_attr( $this->get_field_name( 'show_balance' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'show_balance' ) ); ?>" value="1"<?php checked( $show_balance, true ); ?> class="checkbox" /> <?php esc_html_e( 'Show users balance', 'mycred' ); ?></label>
96
  </p>
97
  <p class="myCRED-widget-field">
98
+ <label for="<?php echo esc_attr( $this->get_field_id( 'show_limit' ) ); ?>"><input type="checkbox" name="<?php echo esc_attr( $this->get_field_name( 'show_limit' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'show_limit' ) ); ?>" value="1"<?php checked( $show_balance, true ); ?> class="checkbox" /> <?php esc_html_e( 'Show users limit', 'mycred' ); ?></label>
99
  </p>
100
  <p class="myCRED-widget-field">
101
+ <label for="<?php echo esc_attr( $this->get_field_id( 'button' ) ); ?>"><?php esc_html_e( 'Button Label', 'mycred' ); ?>:</label>
102
+ <input id="<?php echo esc_attr( $this->get_field_id( 'button' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'button' ) ); ?>" type="text" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $button ); ?>" class="widefat" />
103
  </p>
104
  <p class="myCRED-widget-field">
105
+ <label for="<?php echo esc_attr( $this->get_field_id( 'amount' ) ); ?>"><?php esc_html_e( 'Amount', 'mycred' ); ?>:</label>
106
+ <input id="<?php echo esc_attr( $this->get_field_id( 'amount' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'amount' ) ); ?>" type="text" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $amount ); ?>" class="widefat" />
107
  </p>
108
  <p class="myCRED-widget-field">
109
+ <label for="<?php echo esc_attr( $this->get_field_id( 'reference' ) ); ?>"><?php esc_html_e( 'Reference', 'mycred' ); ?>:</label>
110
+ <input id="<?php echo esc_attr( $this->get_field_id( 'reference' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'reference' ) ); ?>" type="text" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $reference ); ?>" class="widefat" />
111
  </p>
112
  <p class="myCRED-widget-field">
113
+ <label for="<?php echo esc_attr( $this->get_field_id( 'pay_to' ) ); ?>"><?php esc_html_e( 'Recipient', 'mycred' ); ?>:</label>
114
+ <input id="<?php echo esc_attr( $this->get_field_id( 'pay_to' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'pay_to' ) ); ?>" type="text" placeholder="<?php esc_attr_e( 'optional', 'mycred' ); ?>" value="<?php echo esc_attr( $recipient ); ?>" class="widefat" />
115
  </p>
116
  <p class="myCRED-widget-field">
117
+ <label for="<?php echo esc_attr( $this->get_field_id( 'placeholder' ) ); ?>"><?php esc_html_e( 'Recipient Placeholder', 'mycred' ); ?>:</label>
118
+ <input id="<?php echo esc_attr( $this->get_field_id( 'placeholder' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'placeholder' ) ); ?>" type="text" placeholder="<?php esc_attr_e( 'optional', 'mycred' ); ?>" value="<?php echo esc_attr( $placeholder ); ?>" class="widefat" />
119
  </p>
120
  <p class="myCRED-widget-field">
121
+ <label for="<?php echo esc_attr( $this->get_field_id( 'types' ) ); ?>"><?php esc_html_e( 'Point Types', 'mycred' ); ?>:</label>
122
+ <input id="<?php echo esc_attr( $this->get_field_id( 'types' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'types' ) ); ?>" type="text" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $point_types ); ?>" class="widefat" />
123
  </p>
124
  <p class="myCRED-widget-field">
125
+ <label for="<?php echo esc_attr( $this->get_field_id( 'excluded' ) ); ?>"><?php esc_html_e( 'Message for Excluded Users', 'mycred' ); ?>:</label>
126
+ <input id="<?php echo esc_attr( $this->get_field_id( 'excluded' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'excluded' ) ); ?>" placeholder="<?php esc_attr_e( 'optional', 'mycred' ); ?>" type="text" value="<?php echo esc_attr( $excluded ); ?>" class="widefat" />
127
  </p>
128
  <?php
129
 
addons/transfer/myCRED-addon-transfer.php CHANGED
@@ -262,14 +262,14 @@ if ( ! class_exists( 'myCRED_Transfer_Module' ) ) :
262
  $settings['types'] = $this->default_prefs['types'];
263
 
264
  ?>
265
- <h4><span class="dashicons dashicons-admin-plugins static"></span><?php _e( 'Transfers', 'mycred' ); ?></h4>
266
  <div class="body" style="display:none;">
267
 
268
- <h3><?php _e( 'Features', 'mycred' ); ?></h3>
269
  <div class="row">
270
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
271
  <div class="form-group">
272
- <label for="mycred-transfer-type"><?php _e( 'Point Types', 'mycred' ); ?></label>
273
 
274
  <?php if ( count( $this->point_types ) > 1 ) : ?>
275
 
@@ -286,7 +286,7 @@ if ( ! class_exists( 'myCRED_Transfer_Module' ) ) :
286
  </div>
287
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
288
  <div class="form-group">
289
- <label for="<?php echo $this->field_id( 'reload' ); ?>"><?php _e( 'Reload', 'mycred' ); ?></label>
290
  <select name="<?php echo $this->field_name( 'reload' ); ?>" id="<?php echo $this->field_id( 'reload' ); ?>" class="form-control">
291
  <?php
292
 
@@ -296,19 +296,19 @@ if ( ! class_exists( 'myCRED_Transfer_Module' ) ) :
296
 
297
  ?>
298
  </select>
299
- <p><span class="description"><?php _e( 'Should the page reload once a transfer has been completed?', 'mycred' ); ?></span></p>
300
  </div>
301
  </div>
302
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
303
  <div class="form-group">
304
- <label for="<?php echo $this->field_id( 'message' ); ?>"><?php _e( 'Message Length', 'mycred' ); ?></label>
305
  <input type="text" name="<?php echo $this->field_name( 'message' ); ?>" id="<?php echo $this->field_id( 'message' ); ?>" class="form-control" value="<?php echo absint( $settings['message'] ); ?>" />
306
- <p><span class="description"><?php _e( 'The maximum length of messages users can attach to a transfer. Use zero to disable.', 'mycred' ); ?></span></p>
307
  </div>
308
  </div>
309
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
310
  <div class="form-group">
311
- <label for="<?php echo $this->field_id( 'autofill' ); ?>"><?php _e( 'Autofill Recipient', 'mycred' ); ?></label>
312
  <select name="<?php echo $this->field_name( 'autofill' ); ?>" id="<?php echo $this->field_id( 'autofill' ); ?>" class="form-control">
313
  <?php
314
 
@@ -320,14 +320,14 @@ if ( ! class_exists( 'myCRED_Transfer_Module' ) ) :
320
 
321
  ?>
322
  </select>
323
- <p><span class="description"><?php _e( 'Select what user details recipients should be autofilled by.', 'mycred' ); ?></span></p>
324
  </div>
325
  </div>
326
  </div>
327
  <div class="row">
328
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
329
  <div class="form-group">
330
- <label for="<?php echo $this->field_id( array( 'limit' => 'none' ) ); ?>"><?php _e( 'Limits', 'mycred' ); ?></label>
331
  <?php
332
 
333
  // Loop though limits
@@ -346,58 +346,58 @@ if ( ! class_exists( 'myCRED_Transfer_Module' ) ) :
346
  </div>
347
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
348
  <div class="form-group">
349
- <label for="<?php echo $this->field_id( array( 'limit' => 'amount' ) ); ?>"><?php _e( 'Limit Amount', 'mycred' ); ?></label>
350
  <input type="text" name="<?php echo $this->field_name( array( 'limit' => 'amount' ) ); ?>" id="<?php echo $this->field_id( array( 'limit' => 'amount' ) ); ?>" class="form-control" value="<?php echo $this->core->number( $settings['limit']['amount'] ); ?>" />
351
  </div>
352
  </div>
353
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
354
  <div class="form-group">
355
- <label for="<?php echo $this->field_id( array( 'templates' => 'button' ) ); ?>"><?php _e( 'Default Button Label', 'mycred' ); ?></label>
356
  <input type="text" name="<?php echo $this->field_name( array( 'templates' => 'button' ) ); ?>" id="<?php echo $this->field_id( array( 'templates' => 'button' ) ); ?>" class="form-control" value="<?php echo esc_attr( $settings['templates']['button'] ); ?>" />
357
- <p><span class="description"><?php _e( 'The default transfer button label. You can override this in the shortcode or widget if needed.', 'mycred' ); ?></span></p>
358
  </div>
359
  </div>
360
  </div>
361
 
362
- <h3><?php _e( 'Log Templates', 'mycred' ); ?></h3>
363
  <div class="row">
364
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
365
  <div class="form-group">
366
- <label for="<?php echo $this->field_id( array( 'logs' => 'sending' ) ); ?>"><?php _e( 'Log template for sending', 'mycred' ); ?></label>
367
  <input type="text" name="<?php echo $this->field_name( array( 'logs' => 'sending' ) ); ?>" id="<?php echo $this->field_id( array( 'logs' => 'sending' ) ); ?>" class="form-control" value="<?php echo esc_attr( $settings['logs']['sending'] ); ?>" />
368
  <p><span class="description"><?php echo $this->core->available_template_tags( array( 'general', 'user' ), '%transfer_message%' ); ?></span></p>
369
  </div>
370
  </div>
371
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
372
  <div class="form-group">
373
- <label for="<?php echo $this->field_id( array( 'logs' => 'receiving' ) ); ?>"><?php _e( 'Log template for receiving', 'mycred' ); ?></label>
374
  <input type="text" name="<?php echo $this->field_name( array( 'logs' => 'receiving' ) ); ?>" id="<?php echo $this->field_id( array( 'logs' => 'receiving' ) ); ?>" class="form-control" value="<?php echo esc_attr( $settings['logs']['receiving'] ); ?>" />
375
  <p><span class="description"><?php echo $this->core->available_template_tags( array( 'general', 'user' ), '%transfer_message%' ); ?></span></p>
376
  </div>
377
  </div>
378
  </div>
379
 
380
- <h3><?php _e( 'Warning Messages', 'mycred' ); ?></h3>
381
  <div class="row">
382
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
383
  <div class="form-group">
384
- <label for="<?php echo $this->field_id( array( 'errors' => 'low' ) ); ?>"><?php _e( 'Insufficient Funds Warning', 'mycred' ); ?></label>
385
  <input type="text" name="<?php echo $this->field_name( array( 'errors' => 'low' ) ); ?>" id="<?php echo $this->field_id( array( 'errors' => 'low' ) ); ?>" value="<?php echo esc_attr( $settings['errors']['low'] ); ?>" class="form-control" />
386
- <p><span class="description"><?php _e( 'Message to show the user if they try to send more then they can afford.', 'mycred' ); ?></span></p>
387
  </div>
388
  </div>
389
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
390
  <div class="form-group">
391
- <label for="mycred-transfer-log-receiving"><?php _e( 'Limit Reached Warning', 'mycred' ); ?></label>
392
  <input type="text" name="<?php echo $this->field_name( array( 'errors' => 'over' ) ); ?>" id="<?php echo $this->field_id( array( 'errors' => 'over' ) ); ?>" value="<?php echo esc_attr( $settings['errors']['over'] ); ?>" class="form-control" />
393
- <p><span class="description"><?php _e( 'Message to show the user once they reach their transfer limit. Ignored if no limits are enforced.', 'mycred' ); ?></span></p>
394
  </div>
395
  </div>
396
  </div>
397
  <div class="row">
398
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
399
- <h3><?php _e( 'Visitors Template', 'mycred' ); ?></h3>
400
- <p><span class="description"><?php _e( 'The template to use when the transfer shortcode or widget is viewed by someone who is not logged in.', 'mycred' ); ?></span></p>
401
  <?php
402
 
403
  wp_editor( $settings['templates']['login'], $this->field_id( array( 'templates' => 'login' ) ), array(
@@ -410,8 +410,8 @@ if ( ! class_exists( 'myCRED_Transfer_Module' ) ) :
410
  </div>
411
  <div class="row">
412
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
413
- <h3><?php _e( 'Limit Template', 'mycred' ); ?></h3>
414
- <p><span class="description"><?php _e( 'The template to use if you select to show the transfer limit in the transfer shortcode or widget. Ignored if there is no limit enforced.', 'mycred' ); ?></span></p>
415
  <?php
416
 
417
  wp_editor( $settings['templates']['limit'], $this->field_id( array( 'templates' => 'limit' ) ), array(
@@ -426,8 +426,8 @@ if ( ! class_exists( 'myCRED_Transfer_Module' ) ) :
426
  </div>
427
  <div class="row">
428
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
429
- <h3><?php _e( 'Balance Template', 'mycred' ); ?></h3>
430
- <p><span class="description"><?php _e( 'The template to use if you select to show the users balance in the transfer shortcode or widget. Ignored if balances are not shown.', 'mycred' ); ?></span></p>
431
  <?php
432
 
433
  wp_editor( $settings['templates']['balance'], $this->field_id( array( 'templates' => 'balance' ) ), array(
262
  $settings['types'] = $this->default_prefs['types'];
263
 
264
  ?>
265
+ <h4><span class="dashicons dashicons-admin-plugins static"></span><?php esc_html_e( 'Transfers', 'mycred' ); ?></h4>
266
  <div class="body" style="display:none;">
267
 
268
+ <h3><?php esc_html_e( 'Features', 'mycred' ); ?></h3>
269
  <div class="row">
270
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
271
  <div class="form-group">
272
+ <label for="mycred-transfer-type"><?php esc_html_e( 'Point Types', 'mycred' ); ?></label>
273
 
274
  <?php if ( count( $this->point_types ) > 1 ) : ?>
275
 
286
  </div>
287
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
288
  <div class="form-group">
289
+ <label for="<?php echo $this->field_id( 'reload' ); ?>"><?php esc_html_e( 'Reload', 'mycred' ); ?></label>
290
  <select name="<?php echo $this->field_name( 'reload' ); ?>" id="<?php echo $this->field_id( 'reload' ); ?>" class="form-control">
291
  <?php
292
 
296
 
297
  ?>
298
  </select>
299
+ <p><span class="description"><?php esc_html_e( 'Should the page reload once a transfer has been completed?', 'mycred' ); ?></span></p>
300
  </div>
301
  </div>
302
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
303
  <div class="form-group">
304
+ <label for="<?php echo $this->field_id( 'message' ); ?>"><?php esc_html_e( 'Message Length', 'mycred' ); ?></label>
305
  <input type="text" name="<?php echo $this->field_name( 'message' ); ?>" id="<?php echo $this->field_id( 'message' ); ?>" class="form-control" value="<?php echo absint( $settings['message'] ); ?>" />
306
+ <p><span class="description"><?php esc_html_e( 'The maximum length of messages users can attach to a transfer. Use zero to disable.', 'mycred' ); ?></span></p>
307
  </div>
308
  </div>
309
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
310
  <div class="form-group">
311
+ <label for="<?php echo $this->field_id( 'autofill' ); ?>"><?php esc_html_e( 'Autofill Recipient', 'mycred' ); ?></label>
312
  <select name="<?php echo $this->field_name( 'autofill' ); ?>" id="<?php echo $this->field_id( 'autofill' ); ?>" class="form-control">
313
  <?php
314
 
320
 
321
  ?>
322
  </select>
323
+ <p><span class="description"><?php esc_html_e( 'Select what user details recipients should be autofilled by.', 'mycred' ); ?></span></p>
324
  </div>
325
  </div>
326
  </div>
327
  <div class="row">
328
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
329
  <div class="form-group">
330
+ <label for="<?php echo $this->field_id( array( 'limit' => 'none' ) ); ?>"><?php esc_html_e( 'Limits', 'mycred' ); ?></label>
331
  <?php
332
 
333
  // Loop though limits
346
  </div>
347
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
348
  <div class="form-group">
349
+ <label for="<?php echo $this->field_id( array( 'limit' => 'amount' ) ); ?>"><?php esc_html_e( 'Limit Amount', 'mycred' ); ?></label>
350
  <input type="text" name="<?php echo $this->field_name( array( 'limit' => 'amount' ) ); ?>" id="<?php echo $this->field_id( array( 'limit' => 'amount' ) ); ?>" class="form-control" value="<?php echo $this->core->number( $settings['limit']['amount'] ); ?>" />
351
  </div>
352
  </div>
353
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
354
  <div class="form-group">
355
+ <label for="<?php echo $this->field_id( array( 'templates' => 'button' ) ); ?>"><?php esc_html_e( 'Default Button Label', 'mycred' ); ?></label>
356
  <input type="text" name="<?php echo $this->field_name( array( 'templates' => 'button' ) ); ?>" id="<?php echo $this->field_id( array( 'templates' => 'button' ) ); ?>" class="form-control" value="<?php echo esc_attr( $settings['templates']['button'] ); ?>" />
357
+ <p><span class="description"><?php esc_html_e( 'The default transfer button label. You can override this in the shortcode or widget if needed.', 'mycred' ); ?></span></p>
358
  </div>
359
  </div>
360
  </div>
361
 
362
+ <h3><?php esc_html_e( 'Log Templates', 'mycred' ); ?></h3>
363
  <div class="row">
364
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
365
  <div class="form-group">
366
+ <label for="<?php echo $this->field_id( array( 'logs' => 'sending' ) ); ?>"><?php esc_html_e( 'Log template for sending', 'mycred' ); ?></label>
367
  <input type="text" name="<?php echo $this->field_name( array( 'logs' => 'sending' ) ); ?>" id="<?php echo $this->field_id( array( 'logs' => 'sending' ) ); ?>" class="form-control" value="<?php echo esc_attr( $settings['logs']['sending'] ); ?>" />
368
  <p><span class="description"><?php echo $this->core->available_template_tags( array( 'general', 'user' ), '%transfer_message%' ); ?></span></p>
369
  </div>
370
  </div>
371
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
372
  <div class="form-group">
373
+ <label for="<?php echo $this->field_id( array( 'logs' => 'receiving' ) ); ?>"><?php esc_html_e( 'Log template for receiving', 'mycred' ); ?></label>
374
  <input type="text" name="<?php echo $this->field_name( array( 'logs' => 'receiving' ) ); ?>" id="<?php echo $this->field_id( array( 'logs' => 'receiving' ) ); ?>" class="form-control" value="<?php echo esc_attr( $settings['logs']['receiving'] ); ?>" />
375
  <p><span class="description"><?php echo $this->core->available_template_tags( array( 'general', 'user' ), '%transfer_message%' ); ?></span></p>
376
  </div>
377
  </div>
378
  </div>
379
 
380
+ <h3><?php esc_html_e( 'Warning Messages', 'mycred' ); ?></h3>
381
  <div class="row">
382
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
383
  <div class="form-group">
384
+ <label for="<?php echo $this->field_id( array( 'errors' => 'low' ) ); ?>"><?php esc_html_e( 'Insufficient Funds Warning', 'mycred' ); ?></label>
385
  <input type="text" name="<?php echo $this->field_name( array( 'errors' => 'low' ) ); ?>" id="<?php echo $this->field_id( array( 'errors' => 'low' ) ); ?>" value="<?php echo esc_attr( $settings['errors']['low'] ); ?>" class="form-control" />
386
+ <p><span class="description"><?php esc_html_e( 'Message to show the user if they try to send more then they can afford.', 'mycred' ); ?></span></p>
387
  </div>
388
  </div>
389
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
390
  <div class="form-group">
391
+ <label for="mycred-transfer-log-receiving"><?php esc_html_e( 'Limit Reached Warning', 'mycred' ); ?></label>
392
  <input type="text" name="<?php echo $this->field_name( array( 'errors' => 'over' ) ); ?>" id="<?php echo $this->field_id( array( 'errors' => 'over' ) ); ?>" value="<?php echo esc_attr( $settings['errors']['over'] ); ?>" class="form-control" />
393
+ <p><span class="description"><?php esc_html_e( 'Message to show the user once they reach their transfer limit. Ignored if no limits are enforced.', 'mycred' ); ?></span></p>
394
  </div>
395
  </div>
396
  </div>
397
  <div class="row">
398
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
399
+ <h3><?php esc_html_e( 'Visitors Template', 'mycred' ); ?></h3>
400
+ <p><span class="description"><?php esc_html_e( 'The template to use when the transfer shortcode or widget is viewed by someone who is not logged in.', 'mycred' ); ?></span></p>
401
  <?php
402
 
403
  wp_editor( $settings['templates']['login'], $this->field_id( array( 'templates' => 'login' ) ), array(
410
  </div>
411
  <div class="row">
412
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
413
+ <h3><?php esc_html_e( 'Limit Template', 'mycred' ); ?></h3>
414
+ <p><span class="description"><?php esc_html_e( 'The template to use if you select to show the transfer limit in the transfer shortcode or widget. Ignored if there is no limit enforced.', 'mycred' ); ?></span></p>
415
  <?php
416
 
417
  wp_editor( $settings['templates']['limit'], $this->field_id( array( 'templates' => 'limit' ) ), array(
426
  </div>
427
  <div class="row">
428
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
429
+ <h3><?php esc_html_e( 'Balance Template', 'mycred' ); ?></h3>
430
+ <p><span class="description"><?php esc_html_e( 'The template to use if you select to show the users balance in the transfer shortcode or widget. Ignored if balances are not shown.', 'mycred' ); ?></span></p>
431
  <?php
432
 
433
  wp_editor( $settings['templates']['balance'], $this->field_id( array( 'templates' => 'balance' ) ), array(
freemius/includes/sdk/Exceptions/ArgumentNotExistException.php CHANGED
@@ -1,13 +1,13 @@
1
- <?php
2
- if ( ! defined( 'ABSPATH' ) ) {
3
- exit;
4
- }
5
-
6
- if ( ! class_exists( 'Freemius_InvalidArgumentException' ) ) {
7
- exit;
8
- }
9
-
10
- if ( ! class_exists( 'Freemius_ArgumentNotExistException' ) ) {
11
- class Freemius_ArgumentNotExistException extends Freemius_InvalidArgumentException {
12
- }
13
- }
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ }
5
+
6
+ if ( ! class_exists( 'Freemius_InvalidArgumentException' ) ) {
7
+ exit;
8
+ }
9
+
10
+ if ( ! class_exists( 'Freemius_ArgumentNotExistException' ) ) {
11
+ class Freemius_ArgumentNotExistException extends Freemius_InvalidArgumentException {
12
+ }
13
+ }
freemius/includes/sdk/Exceptions/EmptyArgumentException.php CHANGED
@@ -1,13 +1,13 @@
1
- <?php
2
- if ( ! defined( 'ABSPATH' ) ) {
3
- exit;
4
- }
5
-
6
- if ( ! class_exists( 'Freemius_InvalidArgumentException' ) ) {
7
- exit;
8
- }
9
-
10
- if ( ! class_exists( 'Freemius_EmptyArgumentException' ) ) {
11
- class Freemius_EmptyArgumentException extends Freemius_InvalidArgumentException {
12
- }
13
- }
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ }
5
+
6
+ if ( ! class_exists( 'Freemius_InvalidArgumentException' ) ) {
7
+ exit;
8
+ }
9
+
10
+ if ( ! class_exists( 'Freemius_EmptyArgumentException' ) ) {
11
+ class Freemius_EmptyArgumentException extends Freemius_InvalidArgumentException {
12
+ }
13
+ }
includes/classes/class.query-log.php CHANGED
@@ -1156,7 +1156,7 @@ if ( ! class_exists( 'myCRED_Query_Log' ) ) :
1156
 
1157
  ?>
1158
  </select>
1159
- <input type="submit" class="button action" id="doaction" value="<?php _e( 'Apply', 'mycred' ); ?>" />
1160
  </div>
1161
  <?php
1162
 
@@ -1260,7 +1260,7 @@ if ( ! class_exists( 'myCRED_Query_Log' ) ) :
1260
  if ( ! $this->render_mode ) return;
1261
 
1262
  ?>
1263
- <h2 class="screen-reader-text sr-only"><?php _e( 'Log entries navigation', 'mycred' ); ?></h2>
1264
  <div class="tablenav-pages<?php if ( $this->max_num_pages == 1 ) echo ' one-page'; ?>">
1265
 
1266
  <?php $this->pagination( $location, $id ); ?>
@@ -1806,7 +1806,7 @@ if ( ! class_exists( 'myCRED_Query_Log' ) ) :
1806
  }
1807
 
1808
  ?>
1809
- <p><span class="description"><?php _e( 'Log entries are exported to a CSV file and depending on the number of entries selected, the process may take a few seconds.', 'mycred' ); ?></span></p>
1810
  <?php
1811
 
1812
  }
@@ -1846,9 +1846,9 @@ jQuery(function($) {
1846
 
1847
  ?>
1848
  <p class="search-box">
1849
- <label class="screen-reader-text"><?php _e( 'Search Log', 'mycred' ); ?>:</label>
1850
- <input type="search" name="s" value="<?php echo esc_attr( $serarch_string ); ?>" placeholder="<?php _e( 'search log entries', 'mycred' ); ?>" />
1851
- <input type="submit" id="search-submit" class="button button-medium button-secondary" value="<?php _e( 'Search Log', 'mycred' ); ?>" />
1852
  </p>
1853
  <?php
1854
 
1156
 
1157
  ?>
1158
  </select>
1159
+ <input type="submit" class="button action" id="doaction" value="<?php esc_html_e( 'Apply', 'mycred' ); ?>" />
1160
  </div>
1161
  <?php
1162
 
1260
  if ( ! $this->render_mode ) return;
1261
 
1262
  ?>
1263
+ <h2 class="screen-reader-text sr-only"><?php esc_html_e( 'Log entries navigation', 'mycred' ); ?></h2>
1264
  <div class="tablenav-pages<?php if ( $this->max_num_pages == 1 ) echo ' one-page'; ?>">
1265
 
1266
  <?php $this->pagination( $location, $id ); ?>
1806
  }
1807
 
1808
  ?>
1809
+ <p><span class="description"><?php esc_html_e( 'Log entries are exported to a CSV file and depending on the number of entries selected, the process may take a few seconds.', 'mycred' ); ?></span></p>
1810
  <?php
1811
 
1812
  }
1846
 
1847
  ?>
1848
  <p class="search-box">
1849
+ <label class="screen-reader-text"><?php esc_html_e( 'Search Log', 'mycred' ); ?>:</label>
1850
+ <input type="search" name="s" value="<?php echo esc_attr( $serarch_string ); ?>" placeholder="<?php esc_attr_e( 'search log entries', 'mycred' ); ?>" />
1851
+ <input type="submit" id="search-submit" class="button button-medium button-secondary" value="<?php esc_attr_e( 'Search Log', 'mycred' ); ?>" />
1852
  </p>
1853
  <?php
1854
 
includes/hooks/external/mycred-hook-affiliatewp.php CHANGED
@@ -287,37 +287,37 @@ function mycred_load_affiliatewp_hook() {
287
 
288
  ?>
289
  <div class="hook-instance">
290
- <h3><?php _e( 'Affiliate Signup', 'mycred' ); ?></h3>
291
  <div class="row">
292
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
293
  <div class="form-group">
294
- <label for="<?php echo $this->field_id( array( 'signup', 'creds' ) ); ?>"><?php _e( 'Amount', 'mycred' ); ?></label>
295
- <input type="text" name="<?php echo $this->field_name( array( 'signup', 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'signup', 'creds' ) ); ?>" value="<?php echo $this->core->number( $prefs['signup']['creds'] ); ?>" class="form-control" />
296
- <span class="description"><?php _e( 'Use zero to disable.', 'mycred' ); ?></span>
297
  </div>
298
  </div>
299
  <div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
300
  <div class="form-group">
301
- <label for="<?php echo $this->field_id( array( 'signup', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
302
- <input type="text" name="<?php echo $this->field_name( array( 'signup', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'signup', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['signup']['log'] ); ?>" class="form-control" />
303
- <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
304
  </div>
305
  </div>
306
  </div>
307
  </div>
308
  <div class="hook-instance">
309
- <h3><?php _e( 'Referring Visitors', 'mycred' ); ?></h3>
310
  <div class="row">
311
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
312
  <div class="form-group">
313
- <label for="<?php echo $this->field_id( array( 'visits', 'creds' ) ); ?>"><?php _e( 'Amount', 'mycred' ); ?></label>
314
- <input type="text" name="<?php echo $this->field_name( array( 'visits', 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'visits', 'creds' ) ); ?>" value="<?php echo $this->core->number( $prefs['visits']['creds'] ); ?>" class="form-control" />
315
- <span class="description"><?php _e( 'Use zero to disable.', 'mycred' ); ?></span>
316
  </div>
317
  </div>
318
  <div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
319
  <div class="form-group">
320
- <label for="<?php echo $this->field_id( array( 'visits', 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
321
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'visits', 'limit' ) ), $this->field_id( array( 'visits', 'limit' ) ), $prefs['visits']['limit'] ); ?>
322
  </div>
323
  </div>
@@ -325,60 +325,60 @@ function mycred_load_affiliatewp_hook() {
325
  <div class="row">
326
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
327
  <div class="form-group">
328
- <label for="<?php echo $this->field_id( array( 'visits', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
329
- <input type="text" name="<?php echo $this->field_name( array( 'visits', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'visits', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['visits']['log'] ); ?>" class="form-control" />
330
- <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
331
  </div>
332
  </div>
333
  </div>
334
  </div>
335
  <div class="hook-instance">
336
- <h3><?php _e( 'Referring Sales', 'mycred' ); ?></h3>
337
  <div class="row">
338
  <div class="col-lg-4 col-md-12 col-sm-12 col-xs-12">
339
  <div class="form-group">
340
  <div class="radio">
341
- <label for="<?php echo $this->field_id( array( 'referrals', 'pay-amount' ) ); ?>"><input type="radio" name="<?php echo $this->field_name( array( 'referrals', 'pay' ) ); ?>" id="<?php echo $this->field_id( array( 'referrals', 'pay-amount' ) ); ?>"<?php checked( $this->prefs['referrals']['pay'], 'creds' ); ?> value="creds" /> <?php _e( 'Pay a set amount', 'mycred' ); ?></label>
342
  </div>
343
- <label for="<?php echo $this->field_id( array( 'referrals', 'creds' ) ); ?>"><?php _e( 'Amount', 'mycred' ); ?></label>
344
- <input type="text" name="<?php echo $this->field_name( array( 'referrals', 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'referrals', 'creds' ) ); ?>" class="form-control" value="<?php echo $this->core->number( $prefs['referrals']['creds'] ); ?>" />
345
- <span class="description"><?php _e( 'All referrals will pay the same amount.', 'mycred' ); ?></span>
346
  </div>
347
  </div>
348
  <div class="col-lg-4 col-md-12 col-sm-12 col-xs-12">
349
  <div class="form-group">
350
  <div class="radio">
351
- <label for="<?php echo $this->field_id( array( 'referrals', 'pay-store' ) ); ?>"><input type="radio" name="<?php echo $this->field_name( array( 'referrals', 'pay' ) ); ?>" id="<?php echo $this->field_id( array( 'referrals', 'pay-store' ) ); ?>"<?php checked( $this->prefs['referrals']['pay'], 'currency' ); ?> value="currency" /> <?php _e( 'Pay the referral amount', 'mycred' ); ?></label>
352
  </div>
353
- <label for="<?php echo $this->field_id( array( 'referrals', 'currency' ) ); ?>"><?php _e( 'Points Currency Code', 'mycred' ); ?></label>
354
- <input type="text" name="<?php echo $this->field_name( array( 'referrals', 'currency' ) ); ?>" id="<?php echo $this->field_id( array( 'referrals', 'currency' ) ); ?>" class="form-control" value="<?php echo esc_attr( $prefs['referrals']['currency'] ); ?>" />
355
- <span class="description"><?php _e( 'Requires AffiliateWP and your store to use points as currency.', 'mycred' ); ?></span>
356
  </div>
357
  </div>
358
  <div class="col-lg-4 col-md-12 col-sm-12 col-xs-12">
359
  <div class="form-group">
360
  <div class="radio">
361
- <label for="<?php echo $this->field_id( array( 'referrals', 'pay-ex' ) ); ?>"><input type="radio" name="<?php echo $this->field_name( array( 'referrals', 'pay' ) ); ?>"<?php if ( array_key_exists( $this->currency, $this->point_types ) ) echo ' readonly="readonly"'; ?> id="<?php echo $this->field_id( array( 'referrals', 'pay-ex' ) ); ?>"<?php checked( $this->prefs['referrals']['pay'], 'exchange' ); ?> value="exchange" /> <?php _e( 'Apply an exchange rate', 'mycred' ); ?></label>
362
  </div>
363
- <label for="<?php echo $this->field_id( array( 'referrals', 'exchange' ) ); ?>"><?php _e( 'Exchange Rate', 'mycred' ); ?></label>
364
- <input type="text" name="<?php echo $this->field_name( array( 'referrals', 'exchange' ) ); ?>" id="<?php echo $this->field_id( array( 'referrals', 'exchange' ) ); ?>" class="form-control"<?php if ( array_key_exists( $this->currency, $this->point_types ) ) echo ' readonly="readonly"'; ?> value="<?php echo esc_attr( $prefs['referrals']['exchange'] ); ?>" />
365
- <span class="description"><?php if ( ! array_key_exists( $this->currency, $this->point_types ) ) printf( __( 'How much is 1 %s worth in %s', 'mycred' ), $this->core->plural(), $this->currency ); else _e( 'Disabled', 'mycred' ); ?></span>
366
  </div>
367
  </div>
368
  </div>
369
  <div class="row">
370
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
371
  <div class="form-group">
372
- <label for="<?php echo $this->field_id( array( 'referrals', 'log' ) ); ?>"><?php _e( 'Log template - Payout', 'mycred' ); ?></label>
373
- <input type="text" name="<?php echo $this->field_name( array( 'referrals', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'referrals', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['referrals']['log'] ); ?>" class="form-control" />
374
- <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
375
  </div>
376
  </div>
377
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
378
  <div class="form-group">
379
- <label for="<?php echo $this->field_id( array( 'referrals', 'remove_log' ) ); ?>"><?php _e( 'Log template - Refund', 'mycred' ); ?></label>
380
- <input type="text" name="<?php echo $this->field_name( array( 'referrals', 'remove_log' ) ); ?>" id="<?php echo $this->field_id( array( 'referrals', 'remove_log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['referrals']['remove_log'] ); ?>" class="form-control" />
381
- <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
382
  </div>
383
  </div>
384
  </div>
287
 
288
  ?>
289
  <div class="hook-instance">
290
+ <h3><?php esc_html_e( 'Affiliate Signup', 'mycred' ); ?></h3>
291
  <div class="row">
292
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
293
  <div class="form-group">
294
+ <label for="<?php echo esc_attr( $this->field_id( array( 'signup', 'creds' ) ) ); ?>"><?php esc_html_e( 'Amount', 'mycred' ); ?></label>
295
+ <input type="text" name="<?php echo esc_attr( $this->field_name( array( 'signup', 'creds' ) ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( 'signup', 'creds' ) ) ); ?>" value="<?php echo esc_attr( $this->core->number( $prefs['signup']['creds'] ) ); ?>" class="form-control" />
296
+ <span class="description"><?php esc_html_e( 'Use zero to disable.', 'mycred' ); ?></span>
297
  </div>
298
  </div>
299
  <div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
300
  <div class="form-group">
301
+ <label for="<?php echo esc_attr( $this->field_id( array( 'signup', 'log' ) ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
302
+ <input type="text" name="<?php echo esc_attr( $this->field_name( array( 'signup', 'log' ) ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( 'signup', 'log' ) ) ); ?>" placeholder="<?php esc_html_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( esc_attr( $prefs['signup']['log'] ) ); ?>" class="form-control" />
303
+ <span class="description"><?php echo wp_kses_post( $this->available_template_tags( array( 'general', 'post' ) ) ); ?></span>
304
  </div>
305
  </div>
306
  </div>
307
  </div>
308
  <div class="hook-instance">
309
+ <h3><?php esc_html_e( 'Referring Visitors', 'mycred' ); ?></h3>
310
  <div class="row">
311
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
312
  <div class="form-group">
313
+ <label for="<?php echo esc_attr( $this->field_id( array( 'visits', 'creds' ) ) ); ?>"><?php esc_html_e( 'Amount', 'mycred' ); ?></label>
314
+ <input type="text" name="<?php echo esc_attr( $this->field_name( array( 'visits', 'creds' ) ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( 'visits', 'creds' ) ) ); ?>" value="<?php echo esc_attr( $this->core->number( $prefs['visits']['creds'] ) ); ?>" class="form-control" />
315
+ <span class="description"><?php esc_html_e( 'Use zero to disable.', 'mycred' ); ?></span>
316
  </div>
317
  </div>
318
  <div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
319
  <div class="form-group">
320
+ <label for="<?php echo esc_attr( $this->field_id( array( 'visits', 'limit' ) ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
321
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'visits', 'limit' ) ), $this->field_id( array( 'visits', 'limit' ) ), $prefs['visits']['limit'] ); ?>
322
  </div>
323
  </div>
325
  <div class="row">
326
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
327
  <div class="form-group">
328
+ <label for="<?php echo esc_attr( $this->field_id( array( 'visits', 'log' ) ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
329
+ <input type="text" name="<?php echo esc_attr( $this->field_name( array( 'visits', 'log' ) ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( 'visits', 'log' ) ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['visits']['log'] ); ?>" class="form-control" />
330
+ <span class="description"><?php echo wp_kses_post( $this->available_template_tags( array( 'general', 'post' ) ) ); ?></span>
331
  </div>
332
  </div>
333
  </div>
334
  </div>
335
  <div class="hook-instance">
336
+ <h3><?php esc_html_e( 'Referring Sales', 'mycred' ); ?></h3>
337
  <div class="row">
338
  <div class="col-lg-4 col-md-12 col-sm-12 col-xs-12">
339
  <div class="form-group">
340
  <div class="radio">
341
+ <label for="<?php echo esc_attr( $this->field_id( array( 'referrals', 'pay-amount' ) ) ); ?>"><input type="radio" name="<?php echo esc_attr( $this->field_name( array( 'referrals', 'pay' ) ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( 'referrals', 'pay-amount' ) ) ); ?>"<?php checked( $this->prefs['referrals']['pay'], 'creds' ); ?> value="creds" /> <?php esc_html_e( 'Pay a set amount', 'mycred' ); ?></label>
342
  </div>
343
+ <label for="<?php echo esc_attr( $this->field_id( array( 'referrals', 'creds' ) ) ); ?>"><?php esc_html_e( 'Amount', 'mycred' ); ?></label>
344
+ <input type="text" name="<?php echo esc_attr( $this->field_name( array( 'referrals', 'creds' ) ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( 'referrals', 'creds' ) ) ); ?>" class="form-control" value="<?php echo esc_attr( $this->core->number( $prefs['referrals']['creds'] ) ); ?>" />
345
+ <span class="description"><?php esc_html_e( 'All referrals will pay the same amount.', 'mycred' ); ?></span>
346
  </div>
347
  </div>
348
  <div class="col-lg-4 col-md-12 col-sm-12 col-xs-12">
349
  <div class="form-group">
350
  <div class="radio">
351
+ <label for="<?php echo esc_attr( $this->field_id( array( 'referrals', 'pay-store' ) ) ); ?>"><input type="radio" name="<?php echo esc_attr( $this->field_name( array( 'referrals', 'pay' ) ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( 'referrals', 'pay-store' ) ) ); ?>"<?php checked( $this->prefs['referrals']['pay'], 'currency' ); ?> value="currency" /> <?php esc_html_e( 'Pay the referral amount', 'mycred' ); ?></label>
352
  </div>
353
+ <label for="<?php echo esc_attr( $this->field_id( array( 'referrals', 'currency' ) ) ); ?>"><?php esc_html_e( 'Points Currency Code', 'mycred' ); ?></label>
354
+ <input type="text" name="<?php echo esc_attr( $this->field_name( array( 'referrals', 'currency' ) ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( 'referrals', 'currency' ) ) ); ?>" class="form-control" value="<?php echo esc_attr( $prefs['referrals']['currency'] ); ?>" />
355
+ <span class="description"><?php esc_html_e( 'Requires AffiliateWP and your store to use points as currency.', 'mycred' ); ?></span>
356
  </div>
357
  </div>
358
  <div class="col-lg-4 col-md-12 col-sm-12 col-xs-12">
359
  <div class="form-group">
360
  <div class="radio">
361
+ <label for="<?php echo esc_attr( $this->field_id( array( 'referrals', 'pay-ex' ) ) ); ?>"><input type="radio" name="<?php echo esc_attr( $this->field_name( array( 'referrals', 'pay' ) ) ); ?>"<?php if ( array_key_exists( $this->currency, $this->point_types ) ) echo ' readonly="readonly"'; ?> id="<?php echo esc_attr( $this->field_id( array( 'referrals', 'pay-ex' ) ) ); ?>"<?php checked( $this->prefs['referrals']['pay'], 'exchange' ); ?> value="exchange" /> <?php esc_html_e( 'Apply an exchange rate', 'mycred' ); ?></label>
362
  </div>
363
+ <label for="<?php echo esc_attr( $this->field_id( array( 'referrals', 'exchange' ) ) ); ?>"><?php esc_html_e( 'Exchange Rate', 'mycred' ); ?></label>
364
+ <input type="text" name="<?php echo esc_attr( $this->field_name( array( 'referrals', 'exchange' ) ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( 'referrals', 'exchange' ) ) ); ?>" class="form-control"<?php if ( array_key_exists( $this->currency, $this->point_types ) ) echo ' readonly="readonly"'; ?> value="<?php echo esc_attr( $prefs['referrals']['exchange'] ); ?>" />
365
+ <span class="description"><?php if ( ! array_key_exists( $this->currency, $this->point_types ) ) printf( __( 'How much is 1 %s worth in %s', 'mycred' ), $this->core->plural(), $this->currency ); else esc_html_e( 'Disabled', 'mycred' ); ?></span>
366
  </div>
367
  </div>
368
  </div>
369
  <div class="row">
370
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
371
  <div class="form-group">
372
+ <label for="<?php echo esc_attr( $this->field_id( array( 'referrals', 'log' ) ) ); ?>"><?php esc_html_e( 'Log template - Payout', 'mycred' ); ?></label>
373
+ <input type="text" name="<?php echo esc_attr( $this->field_name( array( 'referrals', 'log' ) ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( 'referrals', 'log' ) ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['referrals']['log'] ); ?>" class="form-control" />
374
+ <span class="description"><?php echo wp_kses_post( $this->available_template_tags( array( 'general', 'post' ) ) ); ?></span>
375
  </div>
376
  </div>
377
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
378
  <div class="form-group">
379
+ <label for="<?php echo esc_attr( $this->field_id( array( 'referrals', 'remove_log' ) ) ); ?>"><?php esc_html_e( 'Log template - Refund', 'mycred' ); ?></label>
380
+ <input type="text" name="<?php echo esc_attr( $this->field_name( array( 'referrals', 'remove_log' ) ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( 'referrals', 'remove_log' ) ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['referrals']['remove_log'] ); ?>" class="form-control" />
381
+ <span class="description"><?php echo wp_kses_post( $this->available_template_tags( array( 'general', 'post' ) ) ); ?></span>
382
  </div>
383
  </div>
384
  </div>
includes/hooks/external/mycred-hook-badgeOS.php CHANGED
@@ -121,7 +121,7 @@ function mycred_load_badgeos_hook() {
121
  if ( ! $this->is_main_type )
122
  $page = MYCRED_SLUG . '_' . $this->mycred_type . '-hooks';
123
 
124
- echo '<p>' . sprintf( __( 'Please setup your <a href="%s">default settings</a> before using this feature.', 'mycred' ), admin_url( 'admin.php?page=' . $page ) ) . '</p>';
125
  return;
126
 
127
  }
@@ -137,14 +137,14 @@ function mycred_load_badgeos_hook() {
137
  ?>
138
  <p><strong><?php echo $this->core->template_tags_general( __( '%plural% to Award', 'mycred' ) ); ?></strong></p>
139
  <p>
140
- <label class="screen-reader-text" for="mycred-values-<?php echo $this->mycred_type; ?>-creds"><?php echo $this->core->template_tags_general( __( '%plural% to Award', 'mycred' ) ); ?></label>
141
- <input type="text" name="<?php echo $post_key; ?>[creds]" id="mycred-values-<?php echo $this->mycred_type; ?>-creds" value="<?php echo $this->core->number( $achievement_data['creds'] ); ?>" size="8" />
142
- <span class="description"><?php _e( 'Use zero to disable', 'mycred' ); ?></span>
143
  </p>
144
- <p><strong><?php _e( 'Log Template', 'mycred' ); ?></strong></p>
145
  <p>
146
- <label class="screen-reader-text" for="mycred-values-<?php echo $this->mycred_type; ?>-log"><?php _e( 'Log Template', 'mycred' ); ?></label>
147
- <input type="text" name="<?php echo $post_key; ?>[log]" id="mycred-values-<?php echo $this->mycred_type; ?>-log" value="<?php echo esc_attr( $achievement_data['log'] ); ?>" style="width:99%;" />
148
  </p>
149
  <?php
150
 
@@ -152,10 +152,10 @@ function mycred_load_badgeos_hook() {
152
  if ( $this->prefs[ $post->post_type ]['deduct'] == 1 ) {
153
 
154
  ?>
155
- <p><strong><?php _e( 'Deduction Log Template', 'mycred' ); ?></strong></p>
156
  <p>
157
- <label class="screen-reader-text" for="mycred-values-<?php echo $this->mycred_type; ?>-log"><?php _e( 'Log Template', 'mycred' ); ?></label>
158
- <input type="text" name="<?php echo $post_key; ?>[deduct_log]" id="mycred-values-deduct-<?php echo $this->mycred_type; ?>-log" value="<?php echo esc_attr( $achievement_data['deduct_log'] ); ?>" style="width:99%;" />
159
  </p>
160
  <?php
161
 
@@ -314,19 +314,19 @@ function mycred_load_badgeos_hook() {
314
 
315
  ?>
316
  <div class="hook-instance">
317
- <h3><?php printf( __( 'Earning: %s', 'mycred' ), $post_type_object->labels->singular_name ); ?></h3>
318
  <div class="row">
319
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
320
  <div class="form-group">
321
- <label for="<?php echo $this->field_id( array( $post_type, 'creds' ) ); ?>"><?php echo $this->core->plural(); ?></label>
322
- <input type="text" name="<?php echo $this->field_name( array( $post_type, 'creds' ) ); ?>" id="<?php echo $this->field_id( array( $post_type, 'creds' ) ); ?>" value="<?php echo $this->core->number( $prefs[ $post_type ]['creds'] ); ?>" class="form-control" />
323
  </div>
324
  </div>
325
  <div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
326
  <div class="form-group">
327
- <label for="<?php echo $this->field_id( array( $post_type, 'log' ) ); ?>"><?php _e( 'Log Template', 'mycred' ); ?></label>
328
- <input type="text" name="<?php echo $this->field_name( array( $post_type, 'log' ) ); ?>" id="<?php echo $this->field_id( array( $post_type, 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs[ $post_type ]['log'] ); ?>" class="form-control" />
329
- <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
330
  </div>
331
  </div>
332
  </div>
@@ -336,15 +336,15 @@ function mycred_load_badgeos_hook() {
336
  <div class="row">
337
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
338
  <div class="form-group">
339
- <label for="<?php echo $this->field_id( array( $post_type, 'deduct' ) ); ?>"><?php echo $this->core->plural(); ?></label>
340
- <input type="text" name="<?php echo $this->field_name( array( $post_type, 'deduct' ) ); ?>" id="<?php echo $this->field_id( array( $post_type, 'deduct' ) ); ?>" value="<?php echo $this->core->number( $prefs[ $post_type ]['deduct'] ); ?>" class="form-control" />
341
  </div>
342
  </div>
343
  <div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
344
  <div class="form-group">
345
- <label for="<?php echo $this->field_id( array( $post_type, 'deduct_log' ) ); ?>"><?php _e( 'Log Template', 'mycred' ); ?></label>
346
- <input type="text" name="<?php echo $this->field_name( array( $post_type, 'deduct_log' ) ); ?>" id="<?php echo $this->field_id( array( $post_type, 'deduct_log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs[ $post_type ]['deduct_log'] ); ?>" class="form-control" />
347
- <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
348
  </div>
349
  </div>
350
  </div>
121
  if ( ! $this->is_main_type )
122
  $page = MYCRED_SLUG . '_' . $this->mycred_type . '-hooks';
123
 
124
+ echo '<p>' . sprintf( esc_html__( 'Please setup your <a href="%s">default settings</a> before using this feature.', 'mycred' ), admin_url( 'admin.php?page=' . $page ) ) . '</p>';
125
  return;
126
 
127
  }
137
  ?>
138
  <p><strong><?php echo $this->core->template_tags_general( __( '%plural% to Award', 'mycred' ) ); ?></strong></p>
139
  <p>
140
+ <label class="screen-reader-text" for="mycred-values-<?php echo esc_attr( $this->mycred_type ); ?>-creds"><?php echo $this->core->template_tags_general( __( '%plural% to Award', 'mycred' ) ); ?></label>
141
+ <input type="text" name="<?php echo esc_attr( $post_key ); ?>[creds]" id="mycred-values-<?php echo esc_attr( $this->mycred_type ); ?>-creds" value="<?php echo esc_attr( $this->core->number( $achievement_data['creds'] ) ); ?>" size="8" />
142
+ <span class="description"><?php esc_html_e( 'Use zero to disable', 'mycred' ); ?></span>
143
  </p>
144
+ <p><strong><?php esc_html_e( 'Log Template', 'mycred' ); ?></strong></p>
145
  <p>
146
+ <label class="screen-reader-text" for="mycred-values-<?php echo esc_attr( $this->mycred_type ); ?>-log"><?php esc_html_e( 'Log Template', 'mycred' ); ?></label>
147
+ <input type="text" name="<?php echo esc_attr( $post_key ); ?>[log]" id="mycred-values-<?php echo esc_attr( $this->mycred_type ); ?>-log" value="<?php echo esc_attr( $achievement_data['log'] ); ?>" style="width:99%;" />
148
  </p>
149
  <?php
150
 
152
  if ( $this->prefs[ $post->post_type ]['deduct'] == 1 ) {
153
 
154
  ?>
155
+ <p><strong><?php esc_html_e( 'Deduction Log Template', 'mycred' ); ?></strong></p>
156
  <p>
157
+ <label class="screen-reader-text" for="mycred-values-<?php echo esc_attr( $this->mycred_type ); ?>-log"><?php esc_html_e( 'Log Template', 'mycred' ); ?></label>
158
+ <input type="text" name="<?php echo esc_attr( $post_key ); ?>[deduct_log]" id="mycred-values-deduct-<?php echo esc_attr( $this->mycred_type ); ?>-log" value="<?php echo esc_attr( $achievement_data['deduct_log'] ); ?>" style="width:99%;" />
159
  </p>
160
  <?php
161
 
314
 
315
  ?>
316
  <div class="hook-instance">
317
+ <h3><?php printf( esc_html__( 'Earning: %s', 'mycred' ), $post_type_object->labels->singular_name ); ?></h3>
318
  <div class="row">
319
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
320
  <div class="form-group">
321
+ <label for="<?php echo esc_attr( $this->field_id( array( $post_type, 'creds' ) ) ); ?>"><?php echo esc_html( $this->core->plural() ); ?></label>
322
+ <input type="text" name="<?php echo esc_attr( $this->field_name( array( $post_type, 'creds' ) ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( $post_type, 'creds' ) ) ); ?>" value="<?php echo esc_attr( $this->core->number( $prefs[ $post_type ]['creds'] ) ); ?>" class="form-control" />
323
  </div>
324
  </div>
325
  <div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
326
  <div class="form-group">
327
+ <label for="<?php echo esc_attr( $this->field_id( array( $post_type, 'log' ) ) ); ?>"><?php esc_html_e( 'Log Template', 'mycred' ); ?></label>
328
+ <input type="text" name="<?php echo esc_attr( $this->field_name( array( $post_type, 'log' ) ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( $post_type, 'log' ) ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs[ $post_type ]['log'] ); ?>" class="form-control" />
329
+ <span class="description"><?php echo wp_kses_post( $this->available_template_tags( array( 'general', 'post' ) ) ); ?></span>
330
  </div>
331
  </div>
332
  </div>
336
  <div class="row">
337
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
338
  <div class="form-group">
339
+ <label for="<?php echo esc_attr( $this->field_id( array( $post_type, 'deduct' ) ) ); ?>"><?php echo esc_html( $this->core->plural() ); ?></label>
340
+ <input type="text" name="<?php echo esc_attr( $this->field_name( array( $post_type, 'deduct' ) ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( $post_type, 'deduct' ) ) ); ?>" value="<?php echo esc_attr( $this->core->number( $prefs[ $post_type ]['deduct'] ) ); ?>" class="form-control" />
341
  </div>
342
  </div>
343
  <div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
344
  <div class="form-group">
345
+ <label for="<?php echo esc_attr( $this->field_id( array( $post_type, 'deduct_log' ) ) ); ?>"><?php esc_html_e( 'Log Template', 'mycred' ); ?></label>
346
+ <input type="text" name="<?php echo esc_attr( $this->field_name( array( $post_type, 'deduct_log' ) ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( $post_type, 'deduct_log' ) ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs[ $post_type ]['deduct_log'] ); ?>" class="form-control" />
347
+ <span class="description"><?php echo wp_kses_post( $this->available_template_tags( array( 'general', 'post' ) ) ); ?></span>
348
  </div>
349
  </div>
350
  </div>
includes/hooks/external/mycred-hook-bbPress.php CHANGED
@@ -430,67 +430,67 @@ function mycred_load_bbpress_hook() {
430
 
431
  ?>
432
  <div class="hook-instance">
433
- <h3><?php _e( 'New Forums', 'mycred' ); ?></h3>
434
  <div class="row">
435
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
436
  <div class="form-group">
437
- <label for="<?php echo $this->field_id( array( 'new_forum', 'creds' ) ); ?>"><?php echo $this->core->plural(); ?></label>
438
- <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->number( $prefs['new_forum']['creds'] ); ?>" class="form-control" />
439
  </div>
440
  </div>
441
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
442
  <div class="form-group">
443
- <label for="<?php echo $this->field_id( array( 'new_forum', 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
444
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'new_forum', 'limit' ) ), $this->field_id( array( 'new_forum', 'limit' ) ), $prefs['new_forum']['limit'] ); ?>
445
  </div>
446
  </div>
447
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
448
  <div class="form-group">
449
- <label for="<?php echo $this->field_id( array( 'new_forum', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
450
- <input type="text" name="<?php echo $this->field_name( array( 'new_forum', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'new_forum', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['new_forum']['log'] ); ?>" class="form-control" />
451
- <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
452
  </div>
453
  </div>
454
  </div>
455
  </div>
456
  <div class="hook-instance">
457
- <h3><?php _e( 'Deleting Forums', 'mycred' ); ?></h3>
458
  <div class="row">
459
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
460
  <div class="form-group">
461
- <label for="<?php echo $this->field_id( array( 'delete_forum', 'creds' ) ); ?>"><?php echo $this->core->plural(); ?></label>
462
- <input type="text" name="<?php echo $this->field_name( array( 'delete_forum', 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'delete_forum', 'creds' ) ); ?>" value="<?php echo $this->core->number( $prefs['delete_forum']['creds'] ); ?>" class="form-control" />
463
  </div>
464
  </div>
465
  <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12">
466
  <div class="form-group">
467
- <label for="<?php echo $this->field_id( array( 'delete_forum', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
468
- <input type="text" name="<?php echo $this->field_name( array( 'delete_forum', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'delete_forum', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['delete_forum']['log'] ); ?>" class="form-control" />
469
- <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
470
  </div>
471
  </div>
472
  </div>
473
  </div>
474
  <div class="hook-instance">
475
- <h3><?php _e( 'New Topic', 'mycred' ); ?></h3>
476
  <div class="row">
477
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
478
  <div class="form-group">
479
- <label for="<?php echo $this->field_id( array( 'new_topic', 'creds' ) ); ?>"><?php echo $this->core->plural(); ?></label>
480
- <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->number( $prefs['new_topic']['creds'] ); ?>" class="form-control" />
481
  </div>
482
  </div>
483
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
484
  <div class="form-group">
485
- <label for="<?php echo $this->field_id( array( 'new_topic', 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
486
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'new_topic', 'limit' ) ), $this->field_id( array( 'new_topic', 'limit' ) ), $prefs['new_topic']['limit'] ); ?>
487
  </div>
488
  </div>
489
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
490
  <div class="form-group">
491
- <label for="<?php echo $this->field_id( array( 'new_topic', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
492
- <input type="text" name="<?php echo $this->field_name( array( 'new_topic', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'new_topic', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['new_topic']['log'] ); ?>" class="form-control" />
493
- <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
494
  </div>
495
  </div>
496
  </div>
@@ -498,74 +498,74 @@ function mycred_load_bbpress_hook() {
498
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
499
  <div class="form-group">
500
  <div class="radio">
501
- <label for="<?php echo $this->field_id( array( 'new_topic' => 'author' ) ); ?>"><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" /> <?php echo $this->core->template_tags_general( __( 'Forum authors can receive %_plural% for creating new topics.', 'mycred' ) ); ?></label>
502
  </div>
503
  </div>
504
  </div>
505
  </div>
506
  </div>
507
  <div class="hook-instance">
508
- <h3><?php _e( 'Deleted Topic', 'mycred' ); ?></h3>
509
  <div class="row">
510
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
511
  <div class="form-group">
512
- <label for="<?php echo $this->field_id( array( 'delete_topic', 'creds' ) ); ?>"><?php echo $this->core->plural(); ?></label>
513
- <input type="text" name="<?php echo $this->field_name( array( 'delete_topic', 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'delete_topic', 'creds' ) ); ?>" value="<?php echo $this->core->number( $prefs['delete_topic']['creds'] ); ?>" class="form-control" />
514
  </div>
515
  </div>
516
  <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12">
517
  <div class="form-group">
518
- <label for="<?php echo $this->field_id( array( 'delete_topic', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
519
- <input type="text" name="<?php echo $this->field_name( array( 'delete_topic', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'delete_topic', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['delete_topic']['log'] ); ?>" class="form-control" />
520
- <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
521
  </div>
522
  </div>
523
  </div>
524
  </div>
525
  <div class="hook-instance">
526
- <h3><?php _e( 'Adding Topic to Favorites', 'mycred' ); ?></h3>
527
  <div class="row">
528
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
529
  <div class="form-group">
530
- <label for="<?php echo $this->field_id( array( 'fav_topic', 'creds' ) ); ?>"><?php echo $this->core->plural(); ?></label>
531
- <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->number( $prefs['fav_topic']['creds'] ); ?>" class="form-control" />
532
  </div>
533
  </div>
534
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
535
  <div class="form-group">
536
- <label for="<?php echo $this->field_id( array( 'fav_topic', 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
537
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'fav_topic', 'limit' ) ), $this->field_id( array( 'fav_topic', 'limit' ) ), $prefs['fav_topic']['limit'] ); ?>
538
  </div>
539
  </div>
540
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
541
  <div class="form-group">
542
- <label for="<?php echo $this->field_id( array( 'fav_topic', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
543
- <input type="text" name="<?php echo $this->field_name( array( 'fav_topic', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'fav_topic', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['fav_topic']['log'] ); ?>" class="form-control" />
544
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
545
  </div>
546
  </div>
547
  </div>
548
  </div>
549
  <div class="hook-instance">
550
- <h3><?php _e( 'Forum Reply', 'mycred' ); ?></h3>
551
  <div class="row">
552
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
553
  <div class="form-group">
554
- <label for="<?php echo $this->field_id( array( 'new_reply', 'creds' ) ); ?>"><?php echo $this->core->plural(); ?></label>
555
- <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->number( $prefs['new_reply']['creds'] ); ?>" class="form-control" />
556
  </div>
557
  </div>
558
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
559
  <div class="form-group">
560
- <label for="<?php echo $this->field_id( array( 'new_reply', 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
561
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'new_reply', 'limit' ) ), $this->field_id( array( 'new_reply', 'limit' ) ), $prefs['new_reply']['limit'] ); ?>
562
  </div>
563
  </div>
564
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
565
  <div class="form-group">
566
- <label for="<?php echo $this->field_id( array( 'new_reply', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
567
- <input type="text" name="<?php echo $this->field_name( array( 'new_reply', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'new_reply', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['new_reply']['log'] ); ?>" class="form-control" />
568
- <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
569
  </div>
570
  </div>
571
  </div>
@@ -580,7 +580,7 @@ function mycred_load_bbpress_hook() {
580
  </div>
581
  </div>
582
  <div class="hook-instance">
583
- <h3><?php _e( 'Deleted Reply', 'mycred' ); ?></h3>
584
  <div class="row">
585
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
586
  <div class="form-group">
@@ -590,8 +590,8 @@ function mycred_load_bbpress_hook() {
590
  </div>
591
  <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12">
592
  <div class="form-group">
593
- <label for="<?php echo $this->field_id( array( 'delete_reply', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
594
- <input type="text" name="<?php echo $this->field_name( array( 'delete_reply', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'delete_reply', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['delete_reply']['log'] ); ?>" class="form-control" />
595
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
596
  </div>
597
  </div>
430
 
431
  ?>
432
  <div class="hook-instance">
433
+ <h3><?php esc_html_e( 'New Forums', 'mycred' ); ?></h3>
434
  <div class="row">
435
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
436
  <div class="form-group">
437
+ <label for="<?php echo esc_attr( $this->field_id( array( 'new_forum', 'creds' ) ) ); ?>"><?php echo esc_html( $this->core->plural() ); ?></label>
438
+ <input type="text" name="<?php echo esc_attr( $this->field_name( array( 'new_forum', 'creds' ) ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( 'new_forum', 'creds' ) ) ); ?>" value="<?php echo esc_attr( $this->core->number( $prefs['new_forum']['creds'] ) ); ?>" class="form-control" />
439
  </div>
440
  </div>
441
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
442
  <div class="form-group">
443
+ <label for="<?php echo esc_attr( $this->field_id( array( 'new_forum', 'limit' ) ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
444
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'new_forum', 'limit' ) ), $this->field_id( array( 'new_forum', 'limit' ) ), $prefs['new_forum']['limit'] ); ?>
445
  </div>
446
  </div>
447
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
448
  <div class="form-group">
449
+ <label for="<?php echo esc_attr( $this->field_id( array( 'new_forum', 'log' ) ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
450
+ <input type="text" name="<?php echo esc_attr( $this->field_name( array( 'new_forum', 'log' ) ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( 'new_forum', 'log' ) ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['new_forum']['log'] ); ?>" class="form-control" />
451
+ <span class="description"><?php echo wp_kses_post( $this->available_template_tags( array( 'general' ) ) ); ?></span>
452
  </div>
453
  </div>
454
  </div>
455
  </div>
456
  <div class="hook-instance">
457
+ <h3><?php esc_html_e( 'Deleting Forums', 'mycred' ); ?></h3>
458
  <div class="row">
459
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
460
  <div class="form-group">
461
+ <label for="<?php echo esc_attr( $this->field_id( array( 'delete_forum', 'creds' ) ) ); ?>"><?php echo esc_html( $this->core->plural() ); ?></label>
462
+ <input type="text" name="<?php echo esc_attr( $this->field_name( array( 'delete_forum', 'creds' ) ) ); ?>" id="<?php echo $this->field_id( array( 'delete_forum', 'creds' ) ); ?>" value="<?php echo esc_attr( $this->core->number( $prefs['delete_forum']['creds'] ) ); ?>" class="form-control" />
463
  </div>
464
  </div>
465
  <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12">
466
  <div class="form-group">
467
+ <label for="<?php echo esc_attr( $this->field_id( array( 'delete_forum', 'log' ) ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
468
+ <input type="text" name="<?php echo esc_attr( $this->field_name( array( 'delete_forum', 'log' ) ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( 'delete_forum', 'log' ) ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['delete_forum']['log'] ); ?>" class="form-control" />
469
+ <span class="description"><?php echo wp_kses_post( $this->available_template_tags( array( 'general' ) ) ); ?></span>
470
  </div>
471
  </div>
472
  </div>
473
  </div>
474
  <div class="hook-instance">
475
+ <h3><?php esc_html_e( 'New Topic', 'mycred' ); ?></h3>
476
  <div class="row">
477
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
478
  <div class="form-group">
479
+ <label for="<?php echo esc_attr( $this->field_id( array( 'new_topic', 'creds' ) ) ); ?>"><?php echo esc_html( $this->core->plural() ); ?></label>
480
+ <input type="text" name="<?php echo esc_attr( $this->field_name( array( 'new_topic', 'creds' ) ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( 'new_topic', 'creds' ) ) ); ?>" value="<?php echo esc_attr( $this->core->number( $prefs['new_topic']['creds'] ) ); ?>" class="form-control" />
481
  </div>
482
  </div>
483
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
484
  <div class="form-group">
485
+ <label for="<?php echo esc_attr( $this->field_id( array( 'new_topic', 'limit' ) ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
486
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'new_topic', 'limit' ) ), $this->field_id( array( 'new_topic', 'limit' ) ), $prefs['new_topic']['limit'] ); ?>
487
  </div>
488
  </div>
489
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
490
  <div class="form-group">
491
+ <label for="<?php echo esc_attr( $this->field_id( array( 'new_topic', 'log' ) ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
492
+ <input type="text" name="<?php echo esc_attr( $this->field_name( array( 'new_topic', 'log' ) ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( 'new_topic', 'log' ) ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['new_topic']['log'] ); ?>" class="form-control" />
493
+ <span class="description"><?php echo wp_kses_post( $this->available_template_tags( array( 'general' ) ) ); ?></span>
494
  </div>
495
  </div>
496
  </div>
498
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
499
  <div class="form-group">
500
  <div class="radio">
501
+ <label for="<?php echo esc_attr( $this->field_id( array( 'new_topic' => 'author' ) ) ); ?>"><input type="checkbox" name="<?php echo esc_attr( $this->field_name( array( 'new_topic' => 'author' ) ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( 'new_topic' => 'author' ) ) ); ?>" <?php checked( $prefs['new_topic']['author'], 1 ); ?> value="1" /> <?php echo $this->core->template_tags_general( __( 'Forum authors can receive %_plural% for creating new topics.', 'mycred' ) ); ?></label>
502
  </div>
503
  </div>
504
  </div>
505
  </div>
506
  </div>
507
  <div class="hook-instance">
508
+ <h3><?php esc_html_e( 'Deleted Topic', 'mycred' ); ?></h3>
509
  <div class="row">
510
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
511
  <div class="form-group">
512
+ <label for="<?php echo esc_attr( $this->field_id( array( 'delete_topic', 'creds' ) ) ); ?>"><?php echo esc_html( $this->core->plural() ); ?></label>
513
+ <input type="text" name="<?php echo esc_attr( $this->field_name( array( 'delete_topic', 'creds' ) ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( 'delete_topic', 'creds' ) ) ); ?>" value="<?php echo esc_attr( $this->core->number( $prefs['delete_topic']['creds'] ) ); ?>" class="form-control" />
514
  </div>
515
  </div>
516
  <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12">
517
  <div class="form-group">
518
+ <label for="<?php echo esc_attr( $this->field_id( array( 'delete_topic', 'log' ) ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
519
+ <input type="text" name="<?php echo esc_attr( $this->field_name( array( 'delete_topic', 'log' ) ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( 'delete_topic', 'log' ) ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['delete_topic']['log'] ); ?>" class="form-control" />
520
+ <span class="description"><?php echo wp_kses_post( $this->available_template_tags( array( 'general' ) ) ); ?></span>
521
  </div>
522
  </div>
523
  </div>
524
  </div>
525
  <div class="hook-instance">
526
+ <h3><?php esc_html_e( 'Adding Topic to Favorites', 'mycred' ); ?></h3>
527
  <div class="row">
528
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
529
  <div class="form-group">
530
+ <label for="<?php echo esc_attr( $this->field_id( array( 'fav_topic', 'creds' ) ) ); ?>"><?php echo esc_attr( $this->core->plural() ); ?></label>
531
+ <input type="text" name="<?php echo esc_attr( $this->field_name( array( 'fav_topic', 'creds' ) ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( 'fav_topic', 'creds' ) ) ); ?>" value="<?php echo esc_attr( $this->core->number( $prefs['fav_topic']['creds'] ) ); ?>" class="form-control" />
532
  </div>
533
  </div>
534
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
535
  <div class="form-group">
536
+ <label for="<?php echo esc_attr( $this->field_id( array( 'fav_topic', 'limit' ) ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
537
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'fav_topic', 'limit' ) ), $this->field_id( array( 'fav_topic', 'limit' ) ), $prefs['fav_topic']['limit'] ); ?>
538
  </div>
539
  </div>
540
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
541
  <div class="form-group">
542
+ <label for="<?php echo esc_attr( $this->field_id( array( 'fav_topic', 'log' ) ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
543
+ <input type="text" name="<?php echo esc_attr( $this->field_name( array( 'fav_topic', 'log' ) ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( 'fav_topic', 'log' ) ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['fav_topic']['log'] ); ?>" class="form-control" />
544
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
545
  </div>
546
  </div>
547
  </div>
548
  </div>
549
  <div class="hook-instance">
550
+ <h3><?php esc_html_e( 'Forum Reply', 'mycred' ); ?></h3>
551
  <div class="row">
552
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
553
  <div class="form-group">
554
+ <label for="<?php echo esc_attr( $this->field_id( array( 'new_reply', 'creds' ) ) ); ?>"><?php echo esc_html( $this->core->plural() ); ?></label>
555
+ <input type="text" name="<?php echo esc_attr( $this->field_name( array( 'new_reply', 'creds' ) ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( 'new_reply', 'creds' ) ) ); ?>" value="<?php echo esc_attr( $this->core->number( $prefs['new_reply']['creds'] ) ); ?>" class="form-control" />
556
  </div>
557
  </div>
558
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
559
  <div class="form-group">
560
+ <label for="<?php echo esc_attr( $this->field_id( array( 'new_reply', 'limit' ) ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
561
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'new_reply', 'limit' ) ), $this->field_id( array( 'new_reply', 'limit' ) ), $prefs['new_reply']['limit'] ); ?>
562
  </div>
563
  </div>
564
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
565
  <div class="form-group">
566
+ <label for="<?php echo esc_attr( $this->field_id( array( 'new_reply', 'log' ) ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
567
+ <input type="text" name="<?php echo esc_attr( $this->field_name( array( 'new_reply', 'log' ) ) ); ?>" id="<?php echo esc_attr( $this->field_id( array( 'new_reply', 'log' ) ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['new_reply']['log'] ); ?>" class="form-control" />
568
+ <span class="description"><?php echo wp_kses_post( $this->available_template_tags( array( 'general' ) ) ); ?></span>
569
  </div>
570
  </div>
571
  </div>
580
  </div>
581
  </div>
582
  <div class="hook-instance">
583
+ <h3><?php esc_html_e( 'Deleted Reply', 'mycred' ); ?></h3>
584
  <div class="row">
585
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
586
  <div class="form-group">
590
  </div>
591
  <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12">
592
  <div class="form-group">
593
+ <label for="<?php echo $this->field_id( array( 'delete_reply', 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
594
+ <input type="text" name="<?php echo $this->field_name( array( 'delete_reply', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'delete_reply', 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['delete_reply']['log'] ); ?>" class="form-control" />
595
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
596
  </div>
597
  </div>
includes/hooks/external/mycred-hook-buddypress-media.php CHANGED
@@ -287,7 +287,7 @@ function mycred_load_buddypress_media_hook() {
287
 
288
  ?>
289
  <div class="hook-instance">
290
- <h3><?php _e( 'Photo Upload', 'mycred' ); ?></h3>
291
  <div class="row">
292
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
293
  <div class="form-group">
@@ -297,21 +297,21 @@ function mycred_load_buddypress_media_hook() {
297
  </div>
298
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
299
  <div class="form-group">
300
- <label for="<?php echo $this->field_id( array( 'new_media', 'photo_limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
301
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'new_media', 'photo_limit' ) ), $this->field_id( array( 'new_media', 'photo_limit' ) ), $prefs['new_media']['photo_limit'] ); ?>
302
  </div>
303
  </div>
304
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
305
  <div class="form-group">
306
- <label for="<?php echo $this->field_id( array( 'new_media', 'photo_log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
307
- <input type="text" name="<?php echo $this->field_name( array( 'new_media', 'photo_log' ) ); ?>" id="<?php echo $this->field_id( array( 'new_media', 'photo_log' ) ); ?>"<?php echo $photos; ?> placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['new_media']['photo_log'] ); ?>" class="form-control" />
308
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
309
  </div>
310
  </div>
311
  </div>
312
  </div>
313
  <div class="hook-instance">
314
- <h3><?php _e( 'Video Upload', 'mycred' ); ?></h3>
315
  <div class="row">
316
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
317
  <div class="form-group">
@@ -321,21 +321,21 @@ function mycred_load_buddypress_media_hook() {
321
  </div>
322
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
323
  <div class="form-group">
324
- <label for="<?php echo $this->field_id( array( 'new_media', 'video_limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
325
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'new_media', 'video_limit' ) ), $this->field_id( array( 'new_media', 'video_limit' ) ), $prefs['new_media']['video_limit'] ); ?>
326
  </div>
327
  </div>
328
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
329
  <div class="form-group">
330
- <label for="<?php echo $this->field_id( array( 'new_media', 'video_log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
331
- <input type="text" name="<?php echo $this->field_name( array( 'new_media', 'video_log' ) ); ?>" id="<?php echo $this->field_id( array( 'new_media', 'video_log' ) ); ?>"<?php echo $photos; ?> placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['new_media']['video_log'] ); ?>" class="form-control" />
332
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
333
  </div>
334
  </div>
335
  </div>
336
  </div>
337
  <div class="hook-instance">
338
- <h3><?php _e( 'Music Upload', 'mycred' ); ?></h3>
339
  <div class="row">
340
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
341
  <div class="form-group">
@@ -345,21 +345,21 @@ function mycred_load_buddypress_media_hook() {
345
  </div>
346
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
347
  <div class="form-group">
348
- <label for="<?php echo $this->field_id( array( 'new_media', 'music_limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
349
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'new_media', 'music_limit' ) ), $this->field_id( array( 'new_media', 'music_limit' ) ), $prefs['new_media']['music_limit'] ); ?>
350
  </div>
351
  </div>
352
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
353
  <div class="form-group">
354
- <label for="<?php echo $this->field_id( array( 'new_media', 'music_log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
355
- <input type="text" name="<?php echo $this->field_name( array( 'new_media', 'music_log' ) ); ?>" id="<?php echo $this->field_id( array( 'new_media', 'music_log' ) ); ?>"<?php echo $photos; ?> placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['new_media']['music_log'] ); ?>" class="form-control" />
356
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
357
  </div>
358
  </div>
359
  </div>
360
  </div>
361
  <div class="hook-instance">
362
- <h3><?php _e( 'Photo Deletion', 'mycred' ); ?></h3>
363
  <div class="row">
364
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
365
  <div class="form-group">
@@ -369,15 +369,15 @@ function mycred_load_buddypress_media_hook() {
369
  </div>
370
  <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12">
371
  <div class="form-group">
372
- <label for="<?php echo $this->field_id( array( 'delete_media', 'photo_log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
373
- <input type="text" name="<?php echo $this->field_name( array( 'delete_media', 'photo_log' ) ); ?>" id="<?php echo $this->field_id( array( 'delete_media', 'photo_log' ) ); ?>"<?php echo $photos; ?> placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['delete_media']['photo_log'] ); ?>" class="form-control" />
374
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
375
  </div>
376
  </div>
377
  </div>
378
  </div>
379
  <div class="hook-instance">
380
- <h3><?php _e( 'Video Deletion', 'mycred' ); ?></h3>
381
  <div class="row">
382
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
383
  <div class="form-group">
@@ -387,15 +387,15 @@ function mycred_load_buddypress_media_hook() {
387
  </div>
388
  <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12">
389
  <div class="form-group">
390
- <label for="<?php echo $this->field_id( array( 'delete_media', 'video_log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
391
- <input type="text" name="<?php echo $this->field_name( array( 'delete_media', 'video_log' ) ); ?>" id="<?php echo $this->field_id( array( 'delete_media', 'video_log' ) ); ?>"<?php echo $photos; ?> placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['delete_media']['video_log'] ); ?>" class="form-control" />
392
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
393
  </div>
394
  </div>
395
  </div>
396
  </div>
397
  <div class="hook-instance">
398
- <h3><?php _e( 'Music Deletion', 'mycred' ); ?></h3>
399
  <div class="row">
400
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
401
  <div class="form-group">
@@ -405,8 +405,8 @@ function mycred_load_buddypress_media_hook() {
405
  </div>
406
  <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12">
407
  <div class="form-group">
408
- <label for="<?php echo $this->field_id( array( 'delete_media', 'music_log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
409
- <input type="text" name="<?php echo $this->field_name( array( 'delete_media', 'music_log' ) ); ?>" id="<?php echo $this->field_id( array( 'delete_media', 'music_log' ) ); ?>"<?php echo $photos; ?> placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['delete_media']['music_log'] ); ?>" class="form-control" />
410
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
411
  </div>
412
  </div>
287
 
288
  ?>
289
  <div class="hook-instance">
290
+ <h3><?php esc_html_e( 'Photo Upload', 'mycred' ); ?></h3>
291
  <div class="row">
292
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
293
  <div class="form-group">
297
  </div>
298
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
299
  <div class="form-group">
300
+ <label for="<?php echo $this->field_id( array( 'new_media', 'photo_limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
301
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'new_media', 'photo_limit' ) ), $this->field_id( array( 'new_media', 'photo_limit' ) ), $prefs['new_media']['photo_limit'] ); ?>
302
  </div>
303
  </div>
304
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
305
  <div class="form-group">
306
+ <label for="<?php echo $this->field_id( array( 'new_media', 'photo_log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
307
+ <input type="text" name="<?php echo $this->field_name( array( 'new_media', 'photo_log' ) ); ?>" id="<?php echo $this->field_id( array( 'new_media', 'photo_log' ) ); ?>"<?php echo $photos; ?> placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['new_media']['photo_log'] ); ?>" class="form-control" />
308
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
309
  </div>
310
  </div>
311
  </div>
312
  </div>
313
  <div class="hook-instance">
314
+ <h3><?php esc_html_e( 'Video Upload', 'mycred' ); ?></h3>
315
  <div class="row">
316
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
317
  <div class="form-group">
321
  </div>
322
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
323
  <div class="form-group">
324
+ <label for="<?php echo $this->field_id( array( 'new_media', 'video_limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
325
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'new_media', 'video_limit' ) ), $this->field_id( array( 'new_media', 'video_limit' ) ), $prefs['new_media']['video_limit'] ); ?>
326
  </div>
327
  </div>
328
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
329
  <div class="form-group">
330
+ <label for="<?php echo $this->field_id( array( 'new_media', 'video_log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
331
+ <input type="text" name="<?php echo $this->field_name( array( 'new_media', 'video_log' ) ); ?>" id="<?php echo $this->field_id( array( 'new_media', 'video_log' ) ); ?>"<?php echo $photos; ?> placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['new_media']['video_log'] ); ?>" class="form-control" />
332
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
333
  </div>
334
  </div>
335
  </div>
336
  </div>
337
  <div class="hook-instance">
338
+ <h3><?php esc_html_e( 'Music Upload', 'mycred' ); ?></h3>
339
  <div class="row">
340
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
341
  <div class="form-group">
345
  </div>
346
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
347
  <div class="form-group">
348
+ <label for="<?php echo $this->field_id( array( 'new_media', 'music_limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
349
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'new_media', 'music_limit' ) ), $this->field_id( array( 'new_media', 'music_limit' ) ), $prefs['new_media']['music_limit'] ); ?>
350
  </div>
351
  </div>
352
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
353
  <div class="form-group">
354
+ <label for="<?php echo $this->field_id( array( 'new_media', 'music_log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
355
+ <input type="text" name="<?php echo $this->field_name( array( 'new_media', 'music_log' ) ); ?>" id="<?php echo $this->field_id( array( 'new_media', 'music_log' ) ); ?>"<?php echo $photos; ?> placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['new_media']['music_log'] ); ?>" class="form-control" />
356
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
357
  </div>
358
  </div>
359
  </div>
360
  </div>
361
  <div class="hook-instance">
362
+ <h3><?php esc_html_e( 'Photo Deletion', 'mycred' ); ?></h3>
363
  <div class="row">
364
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
365
  <div class="form-group">
369
  </div>
370
  <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12">
371
  <div class="form-group">
372
+ <label for="<?php echo $this->field_id( array( 'delete_media', 'photo_log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
373
+ <input type="text" name="<?php echo $this->field_name( array( 'delete_media', 'photo_log' ) ); ?>" id="<?php echo $this->field_id( array( 'delete_media', 'photo_log' ) ); ?>"<?php echo $photos; ?> placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['delete_media']['photo_log'] ); ?>" class="form-control" />
374
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
375
  </div>
376
  </div>
377
  </div>
378
  </div>
379
  <div class="hook-instance">
380
+ <h3><?php esc_html_e( 'Video Deletion', 'mycred' ); ?></h3>
381
  <div class="row">
382
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
383
  <div class="form-group">
387
  </div>
388
  <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12">
389
  <div class="form-group">
390
+ <label for="<?php echo $this->field_id( array( 'delete_media', 'video_log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
391
+ <input type="text" name="<?php echo $this->field_name( array( 'delete_media', 'video_log' ) ); ?>" id="<?php echo $this->field_id( array( 'delete_media', 'video_log' ) ); ?>"<?php echo $photos; ?> placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['delete_media']['video_log'] ); ?>" class="form-control" />
392
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
393
  </div>
394
  </div>
395
  </div>
396
  </div>
397
  <div class="hook-instance">
398
+ <h3><?php esc_html_e( 'Music Deletion', 'mycred' ); ?></h3>
399
  <div class="row">
400
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
401
  <div class="form-group">
405
  </div>
406
  <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12">
407
  <div class="form-group">
408
+ <label for="<?php echo $this->field_id( array( 'delete_media', 'music_log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
409
+ <input type="text" name="<?php echo $this->field_name( array( 'delete_media', 'music_log' ) ); ?>" id="<?php echo $this->field_id( array( 'delete_media', 'music_log' ) ); ?>"<?php echo $photos; ?> placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['delete_media']['music_log'] ); ?>" class="form-control" />
410
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
411
  </div>
412
  </div>
includes/hooks/external/mycred-hook-buddypress.php CHANGED
@@ -619,7 +619,7 @@ function mycred_load_buddypress_profile_hook() {
619
 
620
  ?>
621
  <div class="hook-instance">
622
- <h3><?php _e( 'New Profile Activity', 'mycred' ); ?></h3>
623
  <div class="row">
624
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
625
  <div class="form-group">
@@ -629,21 +629,21 @@ function mycred_load_buddypress_profile_hook() {
629
  </div>
630
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
631
  <div class="form-group">
632
- <label for="<?php echo $this->field_id( array( 'update', 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
633
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'update', 'limit' ) ), $this->field_id( array( 'update', 'limit' ) ), $prefs['update']['limit'] ); ?>
634
  </div>
635
  </div>
636
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
637
  <div class="form-group">
638
- <label for="<?php echo $this->field_id( array( 'update', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
639
- <input type="text" name="<?php echo $this->field_name( array( 'update', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'update', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['update']['log'] ); ?>" class="form-control" />
640
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
641
  </div>
642
  </div>
643
  </div>
644
  </div>
645
  <div class="hook-instance">
646
- <h3><?php _e( 'Deleted Profile Activity', 'mycred' ); ?></h3>
647
  <div class="row">
648
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
649
  <div class="form-group">
@@ -653,21 +653,21 @@ function mycred_load_buddypress_profile_hook() {
653
  </div>
654
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
655
  <div class="form-group">
656
- <label for="<?php echo $this->field_id( array( 'removed_update', 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
657
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'removed_update', 'limit' ) ), $this->field_id( array( 'removed_update', 'limit' ) ), $prefs['removed_update']['limit'] ); ?>
658
  </div>
659
  </div>
660
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
661
  <div class="form-group">
662
- <label for="<?php echo $this->field_id( array( 'removed_update', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
663
- <input type="text" name="<?php echo $this->field_name( array( 'removed_update', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'removed_update', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['removed_update']['log'] ); ?>" class="form-control" />
664
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
665
  </div>
666
  </div>
667
  </div>
668
  </div>
669
  <div class="hook-instance">
670
- <h3><?php _e( 'New Profile Avatar Upload', 'mycred' ); ?></h3>
671
  <div class="row">
672
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
673
  <div class="form-group">
@@ -677,21 +677,21 @@ function mycred_load_buddypress_profile_hook() {
677
  </div>
678
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
679
  <div class="form-group">
680
- <label for="<?php echo $this->field_id( array( 'avatar', 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
681
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'avatar', 'limit' ) ), $this->field_id( array( 'avatar', 'limit' ) ), $prefs['avatar']['limit'] ); ?>
682
  </div>
683
  </div>
684
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
685
  <div class="form-group">
686
- <label for="<?php echo $this->field_id( array( 'avatar', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
687
- <input type="text" name="<?php echo $this->field_name( array( 'avatar', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'avatar', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['avatar']['log'] ); ?>" class="form-control" />
688
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
689
  </div>
690
  </div>
691
  </div>
692
  </div>
693
  <div class="hook-instance">
694
- <h3><?php _e( 'New Profile Cover Upload', 'mycred' ); ?></h3>
695
  <div class="row">
696
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
697
  <div class="form-group">
@@ -701,21 +701,21 @@ function mycred_load_buddypress_profile_hook() {
701
  </div>
702
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
703
  <div class="form-group">
704
- <label for="<?php echo $this->field_id( array( 'cover', 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
705
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'cover', 'limit' ) ), $this->field_id( array( 'cover', 'limit' ) ), $prefs['cover']['limit'] ); ?>
706
  </div>
707
  </div>
708
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
709
  <div class="form-group">
710
- <label for="<?php echo $this->field_id( array( 'cover', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
711
- <input type="text" name="<?php echo $this->field_name( array( 'cover', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'cover', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['cover']['log'] ); ?>" class="form-control" />
712
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
713
  </div>
714
  </div>
715
  </div>
716
  </div>
717
  <div class="hook-instance">
718
- <h3><?php _e( 'New Friendships', 'mycred' ); ?></h3>
719
  <div class="row">
720
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
721
  <div class="form-group">
@@ -725,14 +725,14 @@ function mycred_load_buddypress_profile_hook() {
725
  </div>
726
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
727
  <div class="form-group">
728
- <label for="<?php echo $this->field_id( array( 'new_friend', 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
729
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'new_friend', 'limit' ) ), $this->field_id( array( 'new_friend', 'limit' ) ), $prefs['new_friend']['limit'] ); ?>
730
  </div>
731
  </div>
732
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
733
  <div class="form-group">
734
- <label for="<?php echo $this->field_id( array( 'new_friend', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
735
- <input type="text" name="<?php echo $this->field_name( array( 'new_friend', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'new_friend', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['new_friend']['log'] ); ?>" class="form-control" />
736
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
737
  </div>
738
  </div>
@@ -748,7 +748,7 @@ function mycred_load_buddypress_profile_hook() {
748
  </div>
749
  </div>
750
  <div class="hook-instance">
751
- <h3><?php _e( 'Ending Friendships', 'mycred' ); ?></h3>
752
  <div class="row">
753
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
754
  <div class="form-group">
@@ -758,15 +758,15 @@ function mycred_load_buddypress_profile_hook() {
758
  </div>
759
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
760
  <div class="form-group">
761
- <label for="<?php echo $this->field_id( array( 'leave_friend', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
762
- <input type="text" name="<?php echo $this->field_name( array( 'leave_friend', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'leave_friend', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['leave_friend']['log'] ); ?>" class="form-control" />
763
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
764
  </div>
765
  </div>
766
  </div>
767
  </div>
768
  <div class="hook-instance">
769
- <h3><?php _e( 'New Comment', 'mycred' ); ?></h3>
770
  <div class="row">
771
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
772
  <div class="form-group">
@@ -776,21 +776,21 @@ function mycred_load_buddypress_profile_hook() {
776
  </div>
777
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
778
  <div class="form-group">
779
- <label for="<?php echo $this->field_id( array( 'new_comment', 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
780
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'new_comment', 'limit' ) ), $this->field_id( array( 'new_comment', 'limit' ) ), $prefs['new_comment']['limit'] ); ?>
781
  </div>
782
  </div>
783
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
784
  <div class="form-group">
785
- <label for="<?php echo $this->field_id( array( 'new_comment', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
786
- <input type="text" name="<?php echo $this->field_name( array( 'new_comment', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'new_comment', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['new_comment']['log'] ); ?>" class="form-control" />
787
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
788
  </div>
789
  </div>
790
  </div>
791
  </div>
792
  <div class="hook-instance">
793
- <h3><?php _e( 'Deleted Comment', 'mycred' ); ?></h3>
794
  <div class="row">
795
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
796
  <div class="form-group">
@@ -800,15 +800,15 @@ function mycred_load_buddypress_profile_hook() {
800
  </div>
801
  <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12">
802
  <div class="form-group">
803
- <label for="<?php echo $this->field_id( array( 'delete_comment', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
804
- <input type="text" name="<?php echo $this->field_name( array( 'delete_comment', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'delete_comment', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['delete_comment']['log'] ); ?>" class="form-control" />
805
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
806
  </div>
807
  </div>
808
  </div>
809
  </div>
810
  <div class="hook-instance">
811
- <h3><?php _e( 'Favorite Activity', 'mycred' ); ?></h3>
812
  <div class="row">
813
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
814
  <div class="form-group">
@@ -818,21 +818,21 @@ function mycred_load_buddypress_profile_hook() {
818
  </div>
819
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
820
  <div class="form-group">
821
- <label for="<?php echo $this->field_id( array( 'add_favorite', 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
822
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'add_favorite', 'limit' ) ), $this->field_id( array( 'add_favorite', 'limit' ) ), $prefs['add_favorite']['limit'] ); ?>
823
  </div>
824
  </div>
825
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
826
  <div class="form-group">
827
- <label for="<?php echo $this->field_id( array( 'add_favorite', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
828
- <input type="text" name="<?php echo $this->field_name( array( 'add_favorite', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'add_favorite', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['add_favorite']['log'] ); ?>" class="form-control" />
829
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
830
  </div>
831
  </div>
832
  </div>
833
  </div>
834
  <div class="hook-instance">
835
- <h3><?php _e( 'Removing Favorite Activity', 'mycred' ); ?></h3>
836
  <div class="row">
837
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
838
  <div class="form-group">
@@ -842,15 +842,15 @@ function mycred_load_buddypress_profile_hook() {
842
  </div>
843
  <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12">
844
  <div class="form-group">
845
- <label for="<?php echo $this->field_id( array( 'remove_favorite', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
846
- <input type="text" name="<?php echo $this->field_name( array( 'remove_favorite', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'remove_favorite', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['remove_favorite']['log'] ); ?>" class="form-control" />
847
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
848
  </div>
849
  </div>
850
  </div>
851
  </div>
852
  <div class="hook-instance">
853
- <h3><?php _e( 'New Private Message', 'mycred' ); ?></h3>
854
  <div class="row">
855
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
856
  <div class="form-group">
@@ -860,21 +860,21 @@ function mycred_load_buddypress_profile_hook() {
860
  </div>
861
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
862
  <div class="form-group">
863
- <label for="<?php echo $this->field_id( array( 'message', 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
864
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'message', 'limit' ) ), $this->field_id( array( 'message', 'limit' ) ), $prefs['message']['limit'] ); ?>
865
  </div>
866
  </div>
867
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
868
  <div class="form-group">
869
- <label for="<?php echo $this->field_id( array( 'message', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
870
- <input type="text" name="<?php echo $this->field_name( array( 'message', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'message', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['message']['log'] ); ?>" class="form-control" />
871
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
872
  </div>
873
  </div>
874
  </div>
875
  </div>
876
  <div class="hook-instance">
877
- <h3><?php _e( 'Sending Gift', 'mycred' ); ?></h3>
878
  <div class="row">
879
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
880
  <div class="form-group">
@@ -884,14 +884,14 @@ function mycred_load_buddypress_profile_hook() {
884
  </div>
885
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
886
  <div class="form-group">
887
- <label for="<?php echo $this->field_id( array( 'send_gift', 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
888
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'send_gift', 'limit' ) ), $this->field_id( array( 'send_gift', 'limit' ) ), $prefs['send_gift']['limit'] ); ?>
889
  </div>
890
  </div>
891
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
892
  <div class="form-group">
893
- <label for="<?php echo $this->field_id( array( 'send_gift', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
894
- <input type="text" name="<?php echo $this->field_name( array( 'send_gift', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'send_gift', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['send_gift']['log'] ); ?>" class="form-control" />
895
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
896
  </div>
897
  </div>
@@ -1508,7 +1508,7 @@ function mycred_load_buddypress_groups_hook() {
1508
 
1509
  ?>
1510
  <div class="hook-instance">
1511
- <h3><?php _e( 'Group Creation', 'mycred' ); ?></h3>
1512
  <div class="row">
1513
  <div class="col-lg-3 col-md-6 col-sm-12 col-xs-12">
1514
  <div class="form-group">
@@ -1519,22 +1519,22 @@ function mycred_load_buddypress_groups_hook() {
1519
  </div>
1520
  <div class="col-lg-3 col-md-6 col-sm-12 col-xs-12">
1521
  <div class="form-group">
1522
- <label for="<?php echo $this->field_id( array( 'create', 'min' ) ); ?>"><?php _e( 'No. of Members', 'mycred' ); ?></label>
1523
  <input type="text" name="<?php echo $this->field_name( array( 'create', 'min' ) ); ?>" id="<?php echo $this->field_id( array( 'create', 'min' ) ); ?>" value="<?php echo esc_attr( $prefs['create']['min'] ); ?>" class="form-control" />
1524
  <span class="description"><?php echo $this->core->template_tags_general( __( 'The number of members a group must gain before awarding %_plural%. Use zero to award as soon as the group is created.', 'mycred' ) ); ?></span>
1525
  </div>
1526
  </div>
1527
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1528
  <div class="form-group">
1529
- <label for="<?php echo $this->field_id( array( 'create', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
1530
- <input type="text" name="<?php echo $this->field_name( array( 'create', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'create', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['create']['log'] ); ?>" class="form-control" />
1531
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
1532
  </div>
1533
  </div>
1534
  </div>
1535
  </div>
1536
  <div class="hook-instance">
1537
- <h3><?php _e( 'Group Deletions', 'mycred' ); ?></h3>
1538
  <div class="row">
1539
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
1540
  <div class="form-group">
@@ -1544,15 +1544,15 @@ function mycred_load_buddypress_groups_hook() {
1544
  </div>
1545
  <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12">
1546
  <div class="form-group">
1547
- <label for="<?php echo $this->field_id( array( 'delete', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
1548
- <input type="text" name="<?php echo $this->field_name( array( 'delete', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'delete', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['delete']['log'] ); ?>" class="form-control" />
1549
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
1550
  </div>
1551
  </div>
1552
  </div>
1553
  </div>
1554
  <div class="hook-instance">
1555
- <h3><?php _e( 'New Group Avatar Upload', 'mycred' ); ?></h3>
1556
  <div class="row">
1557
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
1558
  <div class="form-group">
@@ -1562,21 +1562,21 @@ function mycred_load_buddypress_groups_hook() {
1562
  </div>
1563
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
1564
  <div class="form-group">
1565
- <label for="<?php echo $this->field_id( array( 'avatar', 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
1566
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'avatar', 'limit' ) ), $this->field_id( array( 'avatar', 'limit' ) ), $prefs['avatar']['limit'] ); ?>
1567
  </div>
1568
  </div>
1569
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1570
  <div class="form-group">
1571
- <label for="<?php echo $this->field_id( array( 'avatar', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
1572
- <input type="text" name="<?php echo $this->field_name( array( 'avatar', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'avatar', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['avatar']['log'] ); ?>" class="form-control" />
1573
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
1574
  </div>
1575
  </div>
1576
  </div>
1577
  </div>
1578
  <div class="hook-instance">
1579
- <h3><?php _e( 'New Group Cover Upload', 'mycred' ); ?></h3>
1580
  <div class="row">
1581
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
1582
  <div class="form-group">
@@ -1586,21 +1586,21 @@ function mycred_load_buddypress_groups_hook() {
1586
  </div>
1587
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
1588
  <div class="form-group">
1589
- <label for="<?php echo $this->field_id( array( 'cover', 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
1590
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'cover', 'limit' ) ), $this->field_id( array( 'cover', 'limit' ) ), $prefs['cover']['limit'] ); ?>
1591
  </div>
1592
  </div>
1593
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1594
  <div class="form-group">
1595
- <label for="<?php echo $this->field_id( array( 'cover', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
1596
- <input type="text" name="<?php echo $this->field_name( array( 'cover', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'cover', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['cover']['log'] ); ?>" class="form-control" />
1597
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
1598
  </div>
1599
  </div>
1600
  </div>
1601
  </div>
1602
  <div class="hook-instance">
1603
- <h3><?php _e( 'New Forum Topics', 'mycred' ); ?></h3>
1604
  <div class="row">
1605
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
1606
  <div class="form-group">
@@ -1610,21 +1610,21 @@ function mycred_load_buddypress_groups_hook() {
1610
  </div>
1611
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
1612
  <div class="form-group">
1613
- <label for="<?php echo $this->field_id( array( 'new_topic', 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
1614
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'new_topic', 'limit' ) ), $this->field_id( array( 'new_topic', 'limit' ) ), $prefs['new_topic']['limit'] ); ?>
1615
  </div>
1616
  </div>
1617
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1618
  <div class="form-group">
1619
- <label for="<?php echo $this->field_id( array( 'new_topic', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
1620
- <input type="text" name="<?php echo $this->field_name( array( 'new_topic', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'new_topic', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['new_topic']['log'] ); ?>" class="form-control" />
1621
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
1622
  </div>
1623
  </div>
1624
  </div>
1625
  </div>
1626
  <div class="hook-instance">
1627
- <h3><?php _e( 'Editing Forum Topics', 'mycred' ); ?></h3>
1628
  <div class="row">
1629
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
1630
  <div class="form-group">
@@ -1634,21 +1634,21 @@ function mycred_load_buddypress_groups_hook() {
1634
  </div>
1635
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
1636
  <div class="form-group">
1637
- <label for="<?php echo $this->field_id( array( 'edit_topic', 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
1638
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'edit_topic', 'limit' ) ), $this->field_id( array( 'edit_topic', 'limit' ) ), $prefs['edit_topic']['limit'] ); ?>
1639
  </div>
1640
  </div>
1641
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1642
  <div class="form-group">
1643
- <label for="<?php echo $this->field_id( array( 'edit_topic', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
1644
- <input type="text" name="<?php echo $this->field_name( array( 'edit_topic', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'edit_topic', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['edit_topic']['log'] ); ?>" class="form-control" />
1645
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
1646
  </div>
1647
  </div>
1648
  </div>
1649
  </div>
1650
  <div class="hook-instance">
1651
- <h3><?php _e( 'New Forum Posts', 'mycred' ); ?></h3>
1652
  <div class="row">
1653
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
1654
  <div class="form-group">
@@ -1658,21 +1658,21 @@ function mycred_load_buddypress_groups_hook() {
1658
  </div>
1659
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
1660
  <div class="form-group">
1661
- <label for="<?php echo $this->field_id( array( 'new_post', 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
1662
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'new_post', 'limit' ) ), $this->field_id( array( 'new_post', 'limit' ) ), $prefs['new_post']['limit'] ); ?>
1663
  </div>
1664
  </div>
1665
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1666
  <div class="form-group">
1667
- <label for="<?php echo $this->field_id( array( 'new_post', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
1668
- <input type="text" name="<?php echo $this->field_name( array( 'new_post', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'new_post', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['new_post']['log'] ); ?>" class="form-control" />
1669
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
1670
  </div>
1671
  </div>
1672
  </div>
1673
  </div>
1674
  <div class="hook-instance">
1675
- <h3><?php _e( 'Editing Forum Posts', 'mycred' ); ?></h3>
1676
  <div class="row">
1677
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
1678
  <div class="form-group">
@@ -1682,21 +1682,21 @@ function mycred_load_buddypress_groups_hook() {
1682
  </div>
1683
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
1684
  <div class="form-group">
1685
- <label for="<?php echo $this->field_id( array( 'edit_post', 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
1686
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'edit_post', 'limit' ) ), $this->field_id( array( 'edit_post', 'limit' ) ), $prefs['edit_post']['limit'] ); ?>
1687
  </div>
1688
  </div>
1689
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1690
  <div class="form-group">
1691
- <label for="<?php echo $this->field_id( array( 'edit_post', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
1692
- <input type="text" name="<?php echo $this->field_name( array( 'edit_post', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'edit_post', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['edit_post']['log'] ); ?>" class="form-control" />
1693
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
1694
  </div>
1695
  </div>
1696
  </div>
1697
  </div>
1698
  <div class="hook-instance">
1699
- <h3><?php _e( 'Joining Groups', 'mycred' ); ?></h3>
1700
  <div class="row">
1701
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
1702
  <div class="form-group">
@@ -1706,21 +1706,21 @@ function mycred_load_buddypress_groups_hook() {
1706
  </div>
1707
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
1708
  <div class="form-group">
1709
- <label for="<?php echo $this->field_id( array( 'join', 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
1710
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'join', 'limit' ) ), $this->field_id( array( 'join', 'limit' ) ), $prefs['join']['limit'] ); ?>
1711
  </div>
1712
  </div>
1713
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1714
  <div class="form-group">
1715
- <label for="<?php echo $this->field_id( array( 'join', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
1716
- <input type="text" name="<?php echo $this->field_name( array( 'join', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'join', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['join']['log'] ); ?>" class="form-control" />
1717
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
1718
  </div>
1719
  </div>
1720
  </div>
1721
  </div>
1722
  <div class="hook-instance">
1723
- <h3><?php _e( 'Leaving Groups', 'mycred' ); ?></h3>
1724
  <div class="row">
1725
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
1726
  <div class="form-group">
@@ -1730,15 +1730,15 @@ function mycred_load_buddypress_groups_hook() {
1730
  </div>
1731
  <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12">
1732
  <div class="form-group">
1733
- <label for="<?php echo $this->field_id( array( 'leave', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
1734
- <input type="text" name="<?php echo $this->field_name( array( 'leave', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'leave', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['leave']['log'] ); ?>" class="form-control" />
1735
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
1736
  </div>
1737
  </div>
1738
  </div>
1739
  </div>
1740
  <div class="hook-instance">
1741
- <h3><?php _e( 'New Group Post', 'mycred' ); ?></h3>
1742
  <div class="row">
1743
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
1744
  <div class="form-group">
@@ -1748,14 +1748,14 @@ function mycred_load_buddypress_groups_hook() {
1748
  </div>
1749
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
1750
  <div class="form-group">
1751
- <label for="<?php echo $this->field_id( array( 'comments', 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
1752
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'comments', 'limit' ) ), $this->field_id( array( 'comments', 'limit' ) ), $prefs['comments']['limit'] ); ?>
1753
  </div>
1754
  </div>
1755
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1756
  <div class="form-group">
1757
- <label for="<?php echo $this->field_id( array( 'comments', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
1758
- <input type="text" name="<?php echo $this->field_name( array( 'comments', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'comments', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['comments']['log'] ); ?>" class="form-control" />
1759
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
1760
  </div>
1761
  </div>
619
 
620
  ?>
621
  <div class="hook-instance">
622
+ <h3><?php esc_html_e( 'New Profile Activity', 'mycred' ); ?></h3>
623
  <div class="row">
624
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
625
  <div class="form-group">
629
  </div>
630
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
631
  <div class="form-group">
632
+ <label for="<?php echo $this->field_id( array( 'update', 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
633
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'update', 'limit' ) ), $this->field_id( array( 'update', 'limit' ) ), $prefs['update']['limit'] ); ?>
634
  </div>
635
  </div>
636
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
637
  <div class="form-group">
638
+ <label for="<?php echo $this->field_id( array( 'update', 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
639
+ <input type="text" name="<?php echo $this->field_name( array( 'update', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'update', 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['update']['log'] ); ?>" class="form-control" />
640
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
641
  </div>
642
  </div>
643
  </div>
644
  </div>
645
  <div class="hook-instance">
646
+ <h3><?php esc_html_e( 'Deleted Profile Activity', 'mycred' ); ?></h3>
647
  <div class="row">
648
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
649
  <div class="form-group">
653
  </div>
654
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
655
  <div class="form-group">
656
+ <label for="<?php echo $this->field_id( array( 'removed_update', 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
657
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'removed_update', 'limit' ) ), $this->field_id( array( 'removed_update', 'limit' ) ), $prefs['removed_update']['limit'] ); ?>
658
  </div>
659
  </div>
660
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
661
  <div class="form-group">
662
+ <label for="<?php echo $this->field_id( array( 'removed_update', 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
663
+ <input type="text" name="<?php echo $this->field_name( array( 'removed_update', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'removed_update', 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['removed_update']['log'] ); ?>" class="form-control" />
664
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
665
  </div>
666
  </div>
667
  </div>
668
  </div>
669
  <div class="hook-instance">
670
+ <h3><?php esc_html_e( 'New Profile Avatar Upload', 'mycred' ); ?></h3>
671
  <div class="row">
672
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
673
  <div class="form-group">
677
  </div>
678
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
679
  <div class="form-group">
680
+ <label for="<?php echo $this->field_id( array( 'avatar', 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
681
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'avatar', 'limit' ) ), $this->field_id( array( 'avatar', 'limit' ) ), $prefs['avatar']['limit'] ); ?>
682
  </div>
683
  </div>
684
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
685
  <div class="form-group">
686
+ <label for="<?php echo $this->field_id( array( 'avatar', 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
687
+ <input type="text" name="<?php echo $this->field_name( array( 'avatar', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'avatar', 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['avatar']['log'] ); ?>" class="form-control" />
688
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
689
  </div>
690
  </div>
691
  </div>
692
  </div>
693
  <div class="hook-instance">
694
+ <h3><?php esc_html_e( 'New Profile Cover Upload', 'mycred' ); ?></h3>
695
  <div class="row">
696
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
697
  <div class="form-group">
701
  </div>
702
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
703
  <div class="form-group">
704
+ <label for="<?php echo $this->field_id( array( 'cover', 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
705
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'cover', 'limit' ) ), $this->field_id( array( 'cover', 'limit' ) ), $prefs['cover']['limit'] ); ?>
706
  </div>
707
  </div>
708
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
709
  <div class="form-group">
710
+ <label for="<?php echo $this->field_id( array( 'cover', 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
711
+ <input type="text" name="<?php echo $this->field_name( array( 'cover', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'cover', 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['cover']['log'] ); ?>" class="form-control" />
712
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
713
  </div>
714
  </div>
715
  </div>
716
  </div>
717
  <div class="hook-instance">
718
+ <h3><?php esc_html_e( 'New Friendships', 'mycred' ); ?></h3>
719
  <div class="row">
720
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
721
  <div class="form-group">
725
  </div>
726
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
727
  <div class="form-group">
728
+ <label for="<?php echo $this->field_id( array( 'new_friend', 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
729
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'new_friend', 'limit' ) ), $this->field_id( array( 'new_friend', 'limit' ) ), $prefs['new_friend']['limit'] ); ?>
730
  </div>
731
  </div>
732
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
733
  <div class="form-group">
734
+ <label for="<?php echo $this->field_id( array( 'new_friend', 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
735
+ <input type="text" name="<?php echo $this->field_name( array( 'new_friend', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'new_friend', 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['new_friend']['log'] ); ?>" class="form-control" />
736
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
737
  </div>
738
  </div>
748
  </div>
749
  </div>
750
  <div class="hook-instance">
751
+ <h3><?php esc_html_e( 'Ending Friendships', 'mycred' ); ?></h3>
752
  <div class="row">
753
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
754
  <div class="form-group">
758
  </div>
759
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
760
  <div class="form-group">
761
+ <label for="<?php echo $this->field_id( array( 'leave_friend', 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
762
+ <input type="text" name="<?php echo $this->field_name( array( 'leave_friend', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'leave_friend', 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['leave_friend']['log'] ); ?>" class="form-control" />
763
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
764
  </div>
765
  </div>
766
  </div>
767
  </div>
768
  <div class="hook-instance">
769
+ <h3><?php esc_html_e( 'New Comment', 'mycred' ); ?></h3>
770
  <div class="row">
771
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
772
  <div class="form-group">
776
  </div>
777
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
778
  <div class="form-group">
779
+ <label for="<?php echo $this->field_id( array( 'new_comment', 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
780
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'new_comment', 'limit' ) ), $this->field_id( array( 'new_comment', 'limit' ) ), $prefs['new_comment']['limit'] ); ?>
781
  </div>
782
  </div>
783
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
784
  <div class="form-group">
785
+ <label for="<?php echo $this->field_id( array( 'new_comment', 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
786
+ <input type="text" name="<?php echo $this->field_name( array( 'new_comment', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'new_comment', 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['new_comment']['log'] ); ?>" class="form-control" />
787
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
788
  </div>
789
  </div>
790
  </div>
791
  </div>
792
  <div class="hook-instance">
793
+ <h3><?php esc_html_e( 'Deleted Comment', 'mycred' ); ?></h3>
794
  <div class="row">
795
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
796
  <div class="form-group">
800
  </div>
801
  <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12">
802
  <div class="form-group">
803
+ <label for="<?php echo $this->field_id( array( 'delete_comment', 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
804
+ <input type="text" name="<?php echo $this->field_name( array( 'delete_comment', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'delete_comment', 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['delete_comment']['log'] ); ?>" class="form-control" />
805
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
806
  </div>
807
  </div>
808
  </div>
809
  </div>
810
  <div class="hook-instance">
811
+ <h3><?php esc_html_e( 'Favorite Activity', 'mycred' ); ?></h3>
812
  <div class="row">
813
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
814
  <div class="form-group">
818
  </div>
819
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
820
  <div class="form-group">
821
+ <label for="<?php echo $this->field_id( array( 'add_favorite', 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
822
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'add_favorite', 'limit' ) ), $this->field_id( array( 'add_favorite', 'limit' ) ), $prefs['add_favorite']['limit'] ); ?>
823
  </div>
824
  </div>
825
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
826
  <div class="form-group">
827
+ <label for="<?php echo $this->field_id( array( 'add_favorite', 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
828
+ <input type="text" name="<?php echo $this->field_name( array( 'add_favorite', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'add_favorite', 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['add_favorite']['log'] ); ?>" class="form-control" />
829
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
830
  </div>
831
  </div>
832
  </div>
833
  </div>
834
  <div class="hook-instance">
835
+ <h3><?php esc_html_e( 'Removing Favorite Activity', 'mycred' ); ?></h3>
836
  <div class="row">
837
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
838
  <div class="form-group">
842
  </div>
843
  <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12">
844
  <div class="form-group">
845
+ <label for="<?php echo $this->field_id( array( 'remove_favorite', 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
846
+ <input type="text" name="<?php echo $this->field_name( array( 'remove_favorite', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'remove_favorite', 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['remove_favorite']['log'] ); ?>" class="form-control" />
847
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
848
  </div>
849
  </div>
850
  </div>
851
  </div>
852
  <div class="hook-instance">
853
+ <h3><?php esc_html_e( 'New Private Message', 'mycred' ); ?></h3>
854
  <div class="row">
855
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
856
  <div class="form-group">
860
  </div>
861
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
862
  <div class="form-group">
863
+ <label for="<?php echo $this->field_id( array( 'message', 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
864
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'message', 'limit' ) ), $this->field_id( array( 'message', 'limit' ) ), $prefs['message']['limit'] ); ?>
865
  </div>
866
  </div>
867
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
868
  <div class="form-group">
869
+ <label for="<?php echo $this->field_id( array( 'message', 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
870
+ <input type="text" name="<?php echo $this->field_name( array( 'message', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'message', 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['message']['log'] ); ?>" class="form-control" />
871
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
872
  </div>
873
  </div>
874
  </div>
875
  </div>
876
  <div class="hook-instance">
877
+ <h3><?php esc_html_e( 'Sending Gift', 'mycred' ); ?></h3>
878
  <div class="row">
879
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
880
  <div class="form-group">
884
  </div>
885
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
886
  <div class="form-group">
887
+ <label for="<?php echo $this->field_id( array( 'send_gift', 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
888
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'send_gift', 'limit' ) ), $this->field_id( array( 'send_gift', 'limit' ) ), $prefs['send_gift']['limit'] ); ?>
889
  </div>
890
  </div>
891
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
892
  <div class="form-group">
893
+ <label for="<?php echo $this->field_id( array( 'send_gift', 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
894
+ <input type="text" name="<?php echo $this->field_name( array( 'send_gift', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'send_gift', 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['send_gift']['log'] ); ?>" class="form-control" />
895
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
896
  </div>
897
  </div>
1508
 
1509
  ?>
1510
  <div class="hook-instance">
1511
+ <h3><?php esc_html_e( 'Group Creation', 'mycred' ); ?></h3>
1512
  <div class="row">
1513
  <div class="col-lg-3 col-md-6 col-sm-12 col-xs-12">
1514
  <div class="form-group">
1519
  </div>
1520
  <div class="col-lg-3 col-md-6 col-sm-12 col-xs-12">
1521
  <div class="form-group">
1522
+ <label for="<?php echo $this->field_id( array( 'create', 'min' ) ); ?>"><?php esc_html_e( 'No. of Members', 'mycred' ); ?></label>
1523
  <input type="text" name="<?php echo $this->field_name( array( 'create', 'min' ) ); ?>" id="<?php echo $this->field_id( array( 'create', 'min' ) ); ?>" value="<?php echo esc_attr( $prefs['create']['min'] ); ?>" class="form-control" />
1524
  <span class="description"><?php echo $this->core->template_tags_general( __( 'The number of members a group must gain before awarding %_plural%. Use zero to award as soon as the group is created.', 'mycred' ) ); ?></span>
1525
  </div>
1526
  </div>
1527
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1528
  <div class="form-group">
1529
+ <label for="<?php echo $this->field_id( array( 'create', 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
1530
+ <input type="text" name="<?php echo $this->field_name( array( 'create', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'create', 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['create']['log'] ); ?>" class="form-control" />
1531
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
1532
  </div>
1533
  </div>
1534
  </div>
1535
  </div>
1536
  <div class="hook-instance">
1537
+ <h3><?php esc_html_e( 'Group Deletions', 'mycred' ); ?></h3>
1538
  <div class="row">
1539
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
1540
  <div class="form-group">
1544
  </div>
1545
  <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12">
1546
  <div class="form-group">
1547
+ <label for="<?php echo $this->field_id( array( 'delete', 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
1548
+ <input type="text" name="<?php echo $this->field_name( array( 'delete', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'delete', 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['delete']['log'] ); ?>" class="form-control" />
1549
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
1550
  </div>
1551
  </div>
1552
  </div>
1553
  </div>
1554
  <div class="hook-instance">
1555
+ <h3><?php esc_html_e( 'New Group Avatar Upload', 'mycred' ); ?></h3>
1556
  <div class="row">
1557
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
1558
  <div class="form-group">
1562
  </div>
1563
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
1564
  <div class="form-group">
1565
+ <label for="<?php echo $this->field_id( array( 'avatar', 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
1566
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'avatar', 'limit' ) ), $this->field_id( array( 'avatar', 'limit' ) ), $prefs['avatar']['limit'] ); ?>
1567
  </div>
1568
  </div>
1569
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1570
  <div class="form-group">
1571
+ <label for="<?php echo $this->field_id( array( 'avatar', 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
1572
+ <input type="text" name="<?php echo $this->field_name( array( 'avatar', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'avatar', 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['avatar']['log'] ); ?>" class="form-control" />
1573
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
1574
  </div>
1575
  </div>
1576
  </div>
1577
  </div>
1578
  <div class="hook-instance">
1579
+ <h3><?php esc_html_e( 'New Group Cover Upload', 'mycred' ); ?></h3>
1580
  <div class="row">
1581
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
1582
  <div class="form-group">
1586
  </div>
1587
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
1588
  <div class="form-group">
1589
+ <label for="<?php echo $this->field_id( array( 'cover', 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
1590
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'cover', 'limit' ) ), $this->field_id( array( 'cover', 'limit' ) ), $prefs['cover']['limit'] ); ?>
1591
  </div>
1592
  </div>
1593
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1594
  <div class="form-group">
1595
+ <label for="<?php echo $this->field_id( array( 'cover', 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
1596
+ <input type="text" name="<?php echo $this->field_name( array( 'cover', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'cover', 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['cover']['log'] ); ?>" class="form-control" />
1597
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
1598
  </div>
1599
  </div>
1600
  </div>
1601
  </div>
1602
  <div class="hook-instance">
1603
+ <h3><?php esc_html_e( 'New Forum Topics', 'mycred' ); ?></h3>
1604
  <div class="row">
1605
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
1606
  <div class="form-group">
1610
  </div>
1611
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
1612
  <div class="form-group">
1613
+ <label for="<?php echo $this->field_id( array( 'new_topic', 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
1614
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'new_topic', 'limit' ) ), $this->field_id( array( 'new_topic', 'limit' ) ), $prefs['new_topic']['limit'] ); ?>
1615
  </div>
1616
  </div>
1617
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1618
  <div class="form-group">
1619
+ <label for="<?php echo $this->field_id( array( 'new_topic', 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
1620
+ <input type="text" name="<?php echo $this->field_name( array( 'new_topic', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'new_topic', 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['new_topic']['log'] ); ?>" class="form-control" />
1621
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
1622
  </div>
1623
  </div>
1624
  </div>
1625
  </div>
1626
  <div class="hook-instance">
1627
+ <h3><?php esc_html_e( 'Editing Forum Topics', 'mycred' ); ?></h3>
1628
  <div class="row">
1629
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
1630
  <div class="form-group">
1634
  </div>
1635
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
1636
  <div class="form-group">
1637
+ <label for="<?php echo $this->field_id( array( 'edit_topic', 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
1638
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'edit_topic', 'limit' ) ), $this->field_id( array( 'edit_topic', 'limit' ) ), $prefs['edit_topic']['limit'] ); ?>
1639
  </div>
1640
  </div>
1641
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1642
  <div class="form-group">
1643
+ <label for="<?php echo $this->field_id( array( 'edit_topic', 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
1644
+ <input type="text" name="<?php echo $this->field_name( array( 'edit_topic', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'edit_topic', 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['edit_topic']['log'] ); ?>" class="form-control" />
1645
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
1646
  </div>
1647
  </div>
1648
  </div>
1649
  </div>
1650
  <div class="hook-instance">
1651
+ <h3><?php esc_html_e( 'New Forum Posts', 'mycred' ); ?></h3>
1652
  <div class="row">
1653
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
1654
  <div class="form-group">
1658
  </div>
1659
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
1660
  <div class="form-group">
1661
+ <label for="<?php echo $this->field_id( array( 'new_post', 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
1662
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'new_post', 'limit' ) ), $this->field_id( array( 'new_post', 'limit' ) ), $prefs['new_post']['limit'] ); ?>
1663
  </div>
1664
  </div>
1665
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1666
  <div class="form-group">
1667
+ <label for="<?php echo $this->field_id( array( 'new_post', 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
1668
+ <input type="text" name="<?php echo $this->field_name( array( 'new_post', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'new_post', 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['new_post']['log'] ); ?>" class="form-control" />
1669
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
1670
  </div>
1671
  </div>
1672
  </div>
1673
  </div>
1674
  <div class="hook-instance">
1675
+ <h3><?php esc_html_e( 'Editing Forum Posts', 'mycred' ); ?></h3>
1676
  <div class="row">
1677
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
1678
  <div class="form-group">
1682
  </div>
1683
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
1684
  <div class="form-group">
1685
+ <label for="<?php echo $this->field_id( array( 'edit_post', 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
1686
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'edit_post', 'limit' ) ), $this->field_id( array( 'edit_post', 'limit' ) ), $prefs['edit_post']['limit'] ); ?>
1687
  </div>
1688
  </div>
1689
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1690
  <div class="form-group">
1691
+ <label for="<?php echo $this->field_id( array( 'edit_post', 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
1692
+ <input type="text" name="<?php echo $this->field_name( array( 'edit_post', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'edit_post', 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['edit_post']['log'] ); ?>" class="form-control" />
1693
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
1694
  </div>
1695
  </div>
1696
  </div>
1697
  </div>
1698
  <div class="hook-instance">
1699
+ <h3><?php esc_html_e( 'Joining Groups', 'mycred' ); ?></h3>
1700
  <div class="row">
1701
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
1702
  <div class="form-group">
1706
  </div>
1707
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
1708
  <div class="form-group">
1709
+ <label for="<?php echo $this->field_id( array( 'join', 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
1710
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'join', 'limit' ) ), $this->field_id( array( 'join', 'limit' ) ), $prefs['join']['limit'] ); ?>
1711
  </div>
1712
  </div>
1713
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1714
  <div class="form-group">
1715
+ <label for="<?php echo $this->field_id( array( 'join', 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
1716
+ <input type="text" name="<?php echo $this->field_name( array( 'join', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'join', 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['join']['log'] ); ?>" class="form-control" />
1717
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
1718
  </div>
1719
  </div>
1720
  </div>
1721
  </div>
1722
  <div class="hook-instance">
1723
+ <h3><?php esc_html_e( 'Leaving Groups', 'mycred' ); ?></h3>
1724
  <div class="row">
1725
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
1726
  <div class="form-group">
1730
  </div>
1731
  <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12">
1732
  <div class="form-group">
1733
+ <label for="<?php echo $this->field_id( array( 'leave', 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
1734
+ <input type="text" name="<?php echo $this->field_name( array( 'leave', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'leave', 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['leave']['log'] ); ?>" class="form-control" />
1735
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
1736
  </div>
1737
  </div>
1738
  </div>
1739
  </div>
1740
  <div class="hook-instance">
1741
+ <h3><?php esc_html_e( 'New Group Post', 'mycred' ); ?></h3>
1742
  <div class="row">
1743
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
1744
  <div class="form-group">
1748
  </div>
1749
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
1750
  <div class="form-group">
1751
+ <label for="<?php echo $this->field_id( array( 'comments', 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
1752
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'comments', 'limit' ) ), $this->field_id( array( 'comments', 'limit' ) ), $prefs['comments']['limit'] ); ?>
1753
  </div>
1754
  </div>
1755
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
1756
  <div class="form-group">
1757
+ <label for="<?php echo $this->field_id( array( 'comments', 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
1758
+ <input type="text" name="<?php echo $this->field_name( array( 'comments', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'comments', 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['comments']['log'] ); ?>" class="form-control" />
1759
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
1760
  </div>
1761
  </div>
includes/hooks/external/mycred-hook-contact-form7.php CHANGED
@@ -170,14 +170,14 @@ function mycred_load_contact_form_seven_hook() {
170
  </div>
171
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
172
  <div class="form-group">
173
- <label for="<?php echo $this->field_id( array( $form_id, 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
174
  <?php echo $this->hook_limit_setting( $this->field_name( array( $form_id, 'limit' ) ), $this->field_id( array( $form_id, 'limit' ) ), $prefs[ $form_id ]['limit'] ); ?>
175
  </div>
176
  </div>
177
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
178
  <div class="form-group">
179
- <label for="<?php echo $this->field_id( array( $form_id, 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
180
- <input type="text" name="<?php echo $this->field_name( array( $form_id, 'log' ) ); ?>" id="<?php echo $this->field_id( array( $form_id, 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs[ $form_id ]['log'] ); ?>" class="form-control" />
181
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
182
  </div>
183
  </div>
170
  </div>
171
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
172
  <div class="form-group">
173
+ <label for="<?php echo $this->field_id( array( $form_id, 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
174
  <?php echo $this->hook_limit_setting( $this->field_name( array( $form_id, 'limit' ) ), $this->field_id( array( $form_id, 'limit' ) ), $prefs[ $form_id ]['limit'] ); ?>
175
  </div>
176
  </div>
177
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
178
  <div class="form-group">
179
+ <label for="<?php echo $this->field_id( array( $form_id, 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
180
+ <input type="text" name="<?php echo $this->field_name( array( $form_id, 'log' ) ); ?>" id="<?php echo $this->field_id( array( $form_id, 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs[ $form_id ]['log'] ); ?>" class="form-control" />
181
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
182
  </div>
183
  </div>
includes/hooks/external/mycred-hook-events-manager-light.php CHANGED
@@ -198,7 +198,7 @@ function mycred_load_events_manager_light_hook() {
198
 
199
  ?>
200
  <div class="hook-instance">
201
- <h3><?php _e( 'Attending Event', 'mycred' ); ?></h3>
202
  <div class="row">
203
  <div class="col-lg-2 col-md-6 col-sm-6 col-xs-12">
204
  <div class="form-group">
@@ -208,21 +208,21 @@ function mycred_load_events_manager_light_hook() {
208
  </div>
209
  <div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
210
  <div class="form-group">
211
- <label for="<?php echo $this->field_id( array( 'attend' => 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
212
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'attend' => 'limit' ) ), $this->field_id( array( 'attend' => 'limit' ) ), $prefs['attend']['limit'] ); ?>
213
  </div>
214
  </div>
215
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
216
  <div class="form-group">
217
- <label for="<?php echo $this->field_id( array( 'attend' => 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
218
- <input type="text" name="<?php echo $this->field_name( array( 'attend' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'attend' => 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['attend']['log'] ); ?>" class="form-control" />
219
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
220
  </div>
221
  </div>
222
  </div>
223
  </div>
224
  <div class="hook-instance">
225
- <h3><?php _e( 'Cancelling Attendance', 'mycred' ); ?></h3>
226
  <div class="row">
227
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
228
  <div class="form-group">
@@ -232,8 +232,8 @@ function mycred_load_events_manager_light_hook() {
232
  </div>
233
  <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12">
234
  <div class="form-group">
235
- <label for="<?php echo $this->field_id( array( 'cancel' => 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
236
- <input type="text" name="<?php echo $this->field_name( array( 'cancel' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'cancel' => 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['cancel']['log'] ); ?>" class="form-control" />
237
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
238
  </div>
239
  </div>
198
 
199
  ?>
200
  <div class="hook-instance">
201
+ <h3><?php esc_html_e( 'Attending Event', 'mycred' ); ?></h3>
202
  <div class="row">
203
  <div class="col-lg-2 col-md-6 col-sm-6 col-xs-12">
204
  <div class="form-group">
208
  </div>
209
  <div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
210
  <div class="form-group">
211
+ <label for="<?php echo $this->field_id( array( 'attend' => 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
212
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'attend' => 'limit' ) ), $this->field_id( array( 'attend' => 'limit' ) ), $prefs['attend']['limit'] ); ?>
213
  </div>
214
  </div>
215
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
216
  <div class="form-group">
217
+ <label for="<?php echo $this->field_id( array( 'attend' => 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
218
+ <input type="text" name="<?php echo $this->field_name( array( 'attend' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'attend' => 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['attend']['log'] ); ?>" class="form-control" />
219
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
220
  </div>
221
  </div>
222
  </div>
223
  </div>
224
  <div class="hook-instance">
225
+ <h3><?php esc_html_e( 'Cancelling Attendance', 'mycred' ); ?></h3>
226
  <div class="row">
227
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
228
  <div class="form-group">
232
  </div>
233
  <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12">
234
  <div class="form-group">
235
+ <label for="<?php echo $this->field_id( array( 'cancel' => 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
236
+ <input type="text" name="<?php echo $this->field_name( array( 'cancel' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'cancel' => 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['cancel']['log'] ); ?>" class="form-control" />
237
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
238
  </div>
239
  </div>
includes/hooks/external/mycred-hook-gravityforms.php CHANGED
@@ -163,14 +163,14 @@ function mycred_load_gravity_forms_hook() {
163
  </div>
164
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
165
  <div class="form-group">
166
- <label for="<?php echo $this->field_id( array( $form->id, 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
167
  <?php echo $this->hook_limit_setting( $this->field_name( array( $form->id, 'limit' ) ), $this->field_id( array( $form->id, 'limit' ) ), $prefs[ $form->id ]['limit'] ); ?>
168
  </div>
169
  </div>
170
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
171
  <div class="form-group">
172
- <label for="<?php echo $this->field_id( array( $form->id, 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
173
- <input type="text" name="<?php echo $this->field_name( array( $form->id, 'log' ) ); ?>" id="<?php echo $this->field_id( array( $form->id, 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs[ $form->id ]['log'] ); ?>" class="form-control" />
174
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
175
  </div>
176
  </div>
163
  </div>
164
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
165
  <div class="form-group">
166
+ <label for="<?php echo $this->field_id( array( $form->id, 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
167
  <?php echo $this->hook_limit_setting( $this->field_name( array( $form->id, 'limit' ) ), $this->field_id( array( $form->id, 'limit' ) ), $prefs[ $form->id ]['limit'] ); ?>
168
  </div>
169
  </div>
170
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
171
  <div class="form-group">
172
+ <label for="<?php echo $this->field_id( array( $form->id, 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
173
+ <input type="text" name="<?php echo $this->field_name( array( $form->id, 'log' ) ); ?>" id="<?php echo $this->field_id( array( $form->id, 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs[ $form->id ]['log'] ); ?>" class="form-control" />
174
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
175
  </div>
176
  </div>
includes/hooks/external/mycred-hook-invite-anyone.php CHANGED
@@ -202,7 +202,7 @@ function mycred_load_invite_anyone_hook() {
202
 
203
  ?>
204
  <div class="hook-instance">
205
- <h3><?php _e( 'Sending Invites', 'mycred' ); ?></h3>
206
  <div class="row">
207
  <div class="col-lg-2 col-md-6 col-sm-6 col-xs-12">
208
  <div class="form-group">
@@ -212,21 +212,21 @@ function mycred_load_invite_anyone_hook() {
212
  </div>
213
  <div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
214
  <div class="form-group">
215
- <label for="<?php echo $this->field_id( array( 'send_invite' => 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
216
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'send_invite' => 'limit' ) ), $this->field_id( array( 'send_invite' => 'limit' ) ), $prefs['send_invite']['limit'] ); ?>
217
  </div>
218
  </div>
219
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
220
  <div class="form-group">
221
- <label for="<?php echo $this->field_id( array( 'send_invite' => 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
222
- <input type="text" name="<?php echo $this->field_name( array( 'send_invite' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'send_invite' => 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['send_invite']['log'] ); ?>" class="form-control" />
223
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
224
  </div>
225
  </div>
226
  </div>
227
  </div>
228
  <div class="hook-instance">
229
- <h3><?php _e( 'Accepted Invites', 'mycred' ); ?></h3>
230
  <div class="row">
231
  <div class="col-lg-2 col-md-6 col-sm-6 col-xs-12">
232
  <div class="form-group">
@@ -236,14 +236,14 @@ function mycred_load_invite_anyone_hook() {
236
  </div>
237
  <div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
238
  <div class="form-group">
239
- <label for="<?php echo $this->field_id( array( 'accept_invite' => 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
240
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'accept_invite' => 'limit' ) ), $this->field_id( array( 'accept_invite' => 'limit' ) ), $prefs['accept_invite']['limit'] ); ?>
241
  </div>
242
  </div>
243
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
244
  <div class="form-group">
245
- <label for="<?php echo $this->field_id( array( 'accept_invite' => 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
246
- <input type="text" name="<?php echo $this->field_name( array( 'accept_invite' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'accept_invite' => 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['accept_invite']['log'] ); ?>" class="form-control" />
247
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
248
  </div>
249
  </div>
202
 
203
  ?>
204
  <div class="hook-instance">
205
+ <h3><?php esc_html_e( 'Sending Invites', 'mycred' ); ?></h3>
206
  <div class="row">
207
  <div class="col-lg-2 col-md-6 col-sm-6 col-xs-12">
208
  <div class="form-group">
212
  </div>
213
  <div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
214
  <div class="form-group">
215
+ <label for="<?php echo $this->field_id( array( 'send_invite' => 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
216
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'send_invite' => 'limit' ) ), $this->field_id( array( 'send_invite' => 'limit' ) ), $prefs['send_invite']['limit'] ); ?>
217
  </div>
218
  </div>
219
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
220
  <div class="form-group">
221
+ <label for="<?php echo $this->field_id( array( 'send_invite' => 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
222
+ <input type="text" name="<?php echo $this->field_name( array( 'send_invite' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'send_invite' => 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['send_invite']['log'] ); ?>" class="form-control" />
223
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
224
  </div>
225
  </div>
226
  </div>
227
  </div>
228
  <div class="hook-instance">
229
+ <h3><?php esc_html_e( 'Accepted Invites', 'mycred' ); ?></h3>
230
  <div class="row">
231
  <div class="col-lg-2 col-md-6 col-sm-6 col-xs-12">
232
  <div class="form-group">
236
  </div>
237
  <div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
238
  <div class="form-group">
239
+ <label for="<?php echo $this->field_id( array( 'accept_invite' => 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
240
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'accept_invite' => 'limit' ) ), $this->field_id( array( 'accept_invite' => 'limit' ) ), $prefs['accept_invite']['limit'] ); ?>
241
  </div>
242
  </div>
243
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
244
  <div class="form-group">
245
+ <label for="<?php echo $this->field_id( array( 'accept_invite' => 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
246
+ <input type="text" name="<?php echo $this->field_name( array( 'accept_invite' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'accept_invite' => 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['accept_invite']['log'] ); ?>" class="form-control" />
247
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
248
  </div>
249
  </div>
includes/hooks/external/mycred-hook-jetpack.php CHANGED
@@ -536,7 +536,7 @@ function mycred_load_jetpack_hook() {
536
 
537
  ?>
538
  <div class="hook-instance">
539
- <h3><?php _e( 'Site Subscriptions', 'mycred' ); ?></h3>
540
  <div class="row">
541
  <div class="col-lg-2 col-md-6 col-sm-6 col-xs-12">
542
  <div class="form-group">
@@ -546,15 +546,15 @@ function mycred_load_jetpack_hook() {
546
  </div>
547
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
548
  <div class="form-group">
549
- <label for="<?php echo $this->field_id( array( 'subscribe_site' => 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
550
- <input type="text" name="<?php echo $this->field_name( array( 'subscribe_site' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'subscribe_site' => 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['subscribe_site']['log'] ); ?>" class="form-control" />
551
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
552
  </div>
553
  </div>
554
  </div>
555
  </div>
556
  <div class="hook-instance">
557
- <h3><?php _e( 'Comment Subscriptions', 'mycred' ); ?></h3>
558
  <div class="row">
559
  <div class="col-lg-2 col-md-6 col-sm-6 col-xs-12">
560
  <div class="form-group">
@@ -564,8 +564,8 @@ function mycred_load_jetpack_hook() {
564
  </div>
565
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
566
  <div class="form-group">
567
- <label for="<?php echo $this->field_id( array( 'subscribe_comment' => 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
568
- <input type="text" name="<?php echo $this->field_name( array( 'subscribe_comment' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'subscribe_comment' => 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['subscribe_comment']['log'] ); ?>" class="form-control" />
569
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
570
  </div>
571
  </div>
536
 
537
  ?>
538
  <div class="hook-instance">
539
+ <h3><?php esc_html_e( 'Site Subscriptions', 'mycred' ); ?></h3>
540
  <div class="row">
541
  <div class="col-lg-2 col-md-6 col-sm-6 col-xs-12">
542
  <div class="form-group">
546
  </div>
547
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
548
  <div class="form-group">
549
+ <label for="<?php echo $this->field_id( array( 'subscribe_site' => 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
550
+ <input type="text" name="<?php echo $this->field_name( array( 'subscribe_site' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'subscribe_site' => 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['subscribe_site']['log'] ); ?>" class="form-control" />
551
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
552
  </div>
553
  </div>
554
  </div>
555
  </div>
556
  <div class="hook-instance">
557
+ <h3><?php esc_html_e( 'Comment Subscriptions', 'mycred' ); ?></h3>
558
  <div class="row">
559
  <div class="col-lg-2 col-md-6 col-sm-6 col-xs-12">
560
  <div class="form-group">
564
  </div>
565
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
566
  <div class="form-group">
567
+ <label for="<?php echo $this->field_id( array( 'subscribe_comment' => 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
568
+ <input type="text" name="<?php echo $this->field_name( array( 'subscribe_comment' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'subscribe_comment' => 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['subscribe_comment']['log'] ); ?>" class="form-control" />
569
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
570
  </div>
571
  </div>
includes/hooks/external/mycred-hook-simplepress.php CHANGED
@@ -288,7 +288,7 @@ function mycred_load_simplepress_hook() {
288
 
289
  ?>
290
  <div class="hook-instance">
291
- <h3><?php _e( 'New Topic', 'mycred' ); ?></h3>
292
  <div class="row">
293
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
294
  <div class="form-group">
@@ -298,21 +298,21 @@ function mycred_load_simplepress_hook() {
298
  </div>
299
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
300
  <div class="form-group">
301
- <label for="<?php echo $this->field_id( array( 'new_topic', 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
302
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'new_topic', 'limit' ) ), $this->field_id( array( 'new_topic', 'limit' ) ), $prefs['new_topic']['limit'] ); ?>
303
  </div>
304
  </div>
305
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
306
  <div class="form-group">
307
- <label for="<?php echo $this->field_id( array( 'new_topic', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
308
- <input type="text" name="<?php echo $this->field_name( array( 'new_topic', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'new_topic', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['new_topic']['log'] ); ?>" class="form-control" />
309
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ), '%topic_name%' ); ?></span>
310
  </div>
311
  </div>
312
  </div>
313
  </div>
314
  <div class="hook-instance">
315
- <h3><?php _e( 'Deleted Topic', 'mycred' ); ?></h3>
316
  <div class="row">
317
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
318
  <div class="form-group">
@@ -322,15 +322,15 @@ function mycred_load_simplepress_hook() {
322
  </div>
323
  <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12">
324
  <div class="form-group">
325
- <label for="<?php echo $this->field_id( array( 'delete_topic', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
326
- <input type="text" name="<?php echo $this->field_name( array( 'delete_topic', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'delete_topic', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['delete_topic']['log'] ); ?>" class="form-control" />
327
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
328
  </div>
329
  </div>
330
  </div>
331
  </div>
332
  <div class="hook-instance">
333
- <h3><?php _e( 'New Topic Post', 'mycred' ); ?></h3>
334
  <div class="row">
335
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
336
  <div class="form-group">
@@ -340,14 +340,14 @@ function mycred_load_simplepress_hook() {
340
  </div>
341
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
342
  <div class="form-group">
343
- <label for="<?php echo $this->field_id( array( 'new_post', 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
344
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'new_post', 'limit' ) ), $this->field_id( array( 'new_post', 'limit' ) ), $prefs['new_post']['limit'] ); ?>
345
  </div>
346
  </div>
347
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
348
  <div class="form-group">
349
- <label for="<?php echo $this->field_id( array( 'new_post', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
350
- <input type="text" name="<?php echo $this->field_name( array( 'new_post', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'new_post', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['new_post']['log'] ); ?>" class="form-control" />
351
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
352
  </div>
353
  </div>
@@ -363,7 +363,7 @@ function mycred_load_simplepress_hook() {
363
  </div>
364
  </div>
365
  <div class="hook-instance">
366
- <h3><?php _e( 'Deleted Topic Post', 'mycred' ); ?></h3>
367
  <div class="row">
368
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
369
  <div class="form-group">
@@ -373,8 +373,8 @@ function mycred_load_simplepress_hook() {
373
  </div>
374
  <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12">
375
  <div class="form-group">
376
- <label for="<?php echo $this->field_id( array( 'delete_post', 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
377
- <input type="text" name="<?php echo $this->field_name( array( 'delete_post', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'delete_post', 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['delete_post']['log'] ); ?>" class="form-control" />
378
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
379
  </div>
380
  </div>
288
 
289
  ?>
290
  <div class="hook-instance">
291
+ <h3><?php esc_html_e( 'New Topic', 'mycred' ); ?></h3>
292
  <div class="row">
293
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
294
  <div class="form-group">
298
  </div>
299
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
300
  <div class="form-group">
301
+ <label for="<?php echo $this->field_id( array( 'new_topic', 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
302
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'new_topic', 'limit' ) ), $this->field_id( array( 'new_topic', 'limit' ) ), $prefs['new_topic']['limit'] ); ?>
303
  </div>
304
  </div>
305
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
306
  <div class="form-group">
307
+ <label for="<?php echo $this->field_id( array( 'new_topic', 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
308
+ <input type="text" name="<?php echo $this->field_name( array( 'new_topic', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'new_topic', 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['new_topic']['log'] ); ?>" class="form-control" />
309
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ), '%topic_name%' ); ?></span>
310
  </div>
311
  </div>
312
  </div>
313
  </div>
314
  <div class="hook-instance">
315
+ <h3><?php esc_html_e( 'Deleted Topic', 'mycred' ); ?></h3>
316
  <div class="row">
317
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
318
  <div class="form-group">
322
  </div>
323
  <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12">
324
  <div class="form-group">
325
+ <label for="<?php echo $this->field_id( array( 'delete_topic', 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
326
+ <input type="text" name="<?php echo $this->field_name( array( 'delete_topic', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'delete_topic', 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['delete_topic']['log'] ); ?>" class="form-control" />
327
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
328
  </div>
329
  </div>
330
  </div>
331
  </div>
332
  <div class="hook-instance">
333
+ <h3><?php esc_html_e( 'New Topic Post', 'mycred' ); ?></h3>
334
  <div class="row">
335
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
336
  <div class="form-group">
340
  </div>
341
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
342
  <div class="form-group">
343
+ <label for="<?php echo $this->field_id( array( 'new_post', 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
344
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'new_post', 'limit' ) ), $this->field_id( array( 'new_post', 'limit' ) ), $prefs['new_post']['limit'] ); ?>
345
  </div>
346
  </div>
347
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
348
  <div class="form-group">
349
+ <label for="<?php echo $this->field_id( array( 'new_post', 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
350
+ <input type="text" name="<?php echo $this->field_name( array( 'new_post', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'new_post', 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['new_post']['log'] ); ?>" class="form-control" />
351
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
352
  </div>
353
  </div>
363
  </div>
364
  </div>
365
  <div class="hook-instance">
366
+ <h3><?php esc_html_e( 'Deleted Topic Post', 'mycred' ); ?></h3>
367
  <div class="row">
368
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
369
  <div class="form-group">
373
  </div>
374
  <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12">
375
  <div class="form-group">
376
+ <label for="<?php echo $this->field_id( array( 'delete_post', 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
377
+ <input type="text" name="<?php echo $this->field_name( array( 'delete_post', 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'delete_post', 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['delete_post']['log'] ); ?>" class="form-control" />
378
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
379
  </div>
380
  </div>
includes/hooks/external/mycred-hook-woocommerce.php CHANGED
@@ -173,7 +173,7 @@ if ( ! function_exists( 'mycred_woo_add_product_variation_detail' ) ) :
173
  ?>
174
  <div class="box">
175
  <label for="<?php echo $id; ?>"><?php echo $mycred->template_tags_general( __( 'Reward with %plural%', 'mycred' ) ); ?></label>
176
- <input type="text" name="_mycred_reward[<?php echo $variation->ID; ?>][<?php echo $point_type; ?>]" id="<?php echo $id; ?>" class="input-text" placeholder="<?php _e( 'Leave empty for no rewards', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs[ $point_type ] ); ?>" />
177
  </div>
178
  <?php
179
 
@@ -566,14 +566,14 @@ function mycred_load_woocommerce_hook() {
566
  </div>
567
  <div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
568
  <div class="form-group">
569
- <label for="<?php echo $this->field_id( 'limit' ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
570
  <?php echo $this->hook_limit_setting( $this->field_name( 'limit' ), $this->field_id( 'limit' ), $prefs['limit'] ); ?>
571
  </div>
572
  </div>
573
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
574
  <div class="form-group">
575
- <label for="<?php echo $this->field_id( 'log' ); ?>"><?php _e( 'Log Template', 'mycred' ); ?></label>
576
- <input type="text" name="<?php echo $this->field_name( 'log' ); ?>" id="<?php echo $this->field_id( 'log' ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['log'] ); ?>" class="form-control" />
577
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
578
  </div>
579
  </div>
173
  ?>
174
  <div class="box">
175
  <label for="<?php echo $id; ?>"><?php echo $mycred->template_tags_general( __( 'Reward with %plural%', 'mycred' ) ); ?></label>
176
+ <input type="text" name="_mycred_reward[<?php echo $variation->ID; ?>][<?php echo $point_type; ?>]" id="<?php echo $id; ?>" class="input-text" placeholder="<?php esc_attr_e( 'Leave empty for no rewards', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs[ $point_type ] ); ?>" />
177
  </div>
178
  <?php
179
 
566
  </div>
567
  <div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
568
  <div class="form-group">
569
+ <label for="<?php echo $this->field_id( 'limit' ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
570
  <?php echo $this->hook_limit_setting( $this->field_name( 'limit' ), $this->field_id( 'limit' ), $prefs['limit'] ); ?>
571
  </div>
572
  </div>
573
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
574
  <div class="form-group">
575
+ <label for="<?php echo $this->field_id( 'log' ); ?>"><?php esc_html_e( 'Log Template', 'mycred' ); ?></label>
576
+ <input type="text" name="<?php echo $this->field_name( 'log' ); ?>" id="<?php echo $this->field_id( 'log' ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['log'] ); ?>" class="form-control" />
577
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
578
  </div>
579
  </div>
includes/hooks/external/mycred-hook-wp-favorite-posts.php CHANGED
@@ -215,29 +215,29 @@ function mycred_load_wp_favorite_posts_hook() {
215
 
216
  ?>
217
  <div class="hook-instance">
218
- <h3><?php _e( 'Adding Content to Favorites', 'mycred' ); ?></h3>
219
  <div class="row">
220
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
221
  <div class="form-group">
222
- <label for="<?php echo $this->field_id( array( 'add' => 'creds' ) ); ?>"><?php _e( 'Member', 'mycred' ); ?></label>
223
  <input type="text" name="<?php echo $this->field_name( array( 'add' => 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'add' => 'creds' ) ); ?>" value="<?php echo $this->core->number( $prefs['add']['creds'] ); ?>" class="form-control" />
224
  </div>
225
  </div>
226
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
227
  <div class="form-group">
228
- <label for="<?php echo $this->field_id( array( 'add', 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
229
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'add', 'limit' ) ), $this->field_id( array( 'add', 'limit' ) ), $prefs['add']['limit'] ); ?>
230
  </div>
231
  </div>
232
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
233
  <div class="form-group">
234
- <label for="<?php echo $this->field_id( array( 'added' => 'creds' ) ); ?>"><?php _e( 'Content Author', 'mycred' ); ?></label>
235
  <input type="text" name="<?php echo $this->field_name( array( 'added' => 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'added' => 'creds' ) ); ?>" value="<?php echo $this->core->number( $prefs['added']['creds'] ); ?>" class="form-control" />
236
  </div>
237
  </div>
238
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
239
  <div class="form-group">
240
- <label for="<?php echo $this->field_id( array( 'added', 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
241
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'added', 'limit' ) ), $this->field_id( array( 'added', 'limit' ) ), $prefs['added']['limit'] ); ?>
242
  </div>
243
  </div>
@@ -245,33 +245,33 @@ function mycred_load_wp_favorite_posts_hook() {
245
  <div class="row">
246
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
247
  <div class="form-group">
248
- <label for="<?php echo $this->field_id( array( 'add' => 'log' ) ); ?>"><?php _e( 'Member Log Template', 'mycred' ); ?></label>
249
- <input type="text" name="<?php echo $this->field_name( array( 'add' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'add' => 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['add']['log'] ); ?>" class="form-control" />
250
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
251
  </div>
252
  </div>
253
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
254
  <div class="form-group">
255
- <label for="<?php echo $this->field_id( array( 'added' => 'log' ) ); ?>"><?php _e( 'Content Author Log Template', 'mycred' ); ?></label>
256
- <input type="text" name="<?php echo $this->field_name( array( 'added' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'added' => 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['added']['log'] ); ?>" class="form-control" />
257
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
258
  </div>
259
  </div>
260
  </div>
261
  </div>
262
  <div class="hook-instance">
263
- <h3><?php _e( 'Removing Content from Favorites', 'mycred' ); ?></h3>
264
  <div class="row">
265
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
266
  <div class="form-group">
267
- <label for="<?php echo $this->field_id( array( 'remove' => 'creds' ) ); ?>"><?php _e( 'Member', 'mycred' ); ?></label>
268
  <input type="text" name="<?php echo $this->field_name( array( 'remove' => 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'remove' => 'creds' ) ); ?>" value="<?php echo $this->core->number( $prefs['remove']['creds'] ); ?>" class="form-control" />
269
  </div>
270
  </div>
271
  <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12">
272
  <div class="form-group">
273
- <label for="<?php echo $this->field_id( array( 'remove' => 'log' ) ); ?>"><?php _e( 'Log Template', 'mycred' ); ?></label>
274
- <input type="text" name="<?php echo $this->field_name( array( 'remove' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'remove' => 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['remove']['log'] ); ?>" class="form-control" />
275
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
276
  </div>
277
  </div>
@@ -279,14 +279,14 @@ function mycred_load_wp_favorite_posts_hook() {
279
  <div class="row">
280
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
281
  <div class="form-group">
282
- <label for="<?php echo $this->field_id( array( 'removed' => 'creds' ) ); ?>"><?php _e( 'Content Author', 'mycred' ); ?></label>
283
  <input type="text" name="<?php echo $this->field_name( array( 'removed' => 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'removed' => 'creds' ) ); ?>" value="<?php echo $this->core->number( $prefs['removed']['creds'] ); ?>" class="form-control" />
284
  </div>
285
  </div>
286
  <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12">
287
  <div class="form-group">
288
- <label for="<?php echo $this->field_id( array( 'removed' => 'log' ) ); ?>"><?php _e( 'Log Template', 'mycred' ); ?></label>
289
- <input type="text" name="<?php echo $this->field_name( array( 'removed' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'removed' => 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['removed']['log'] ); ?>" class="form-control" />
290
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
291
  </div>
292
  </div>
215
 
216
  ?>
217
  <div class="hook-instance">
218
+ <h3><?php esc_html_e( 'Adding Content to Favorites', 'mycred' ); ?></h3>
219
  <div class="row">
220
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
221
  <div class="form-group">
222
+ <label for="<?php echo $this->field_id( array( 'add' => 'creds' ) ); ?>"><?php esc_html_e( 'Member', 'mycred' ); ?></label>
223
  <input type="text" name="<?php echo $this->field_name( array( 'add' => 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'add' => 'creds' ) ); ?>" value="<?php echo $this->core->number( $prefs['add']['creds'] ); ?>" class="form-control" />
224
  </div>
225
  </div>
226
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
227
  <div class="form-group">
228
+ <label for="<?php echo $this->field_id( array( 'add', 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
229
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'add', 'limit' ) ), $this->field_id( array( 'add', 'limit' ) ), $prefs['add']['limit'] ); ?>
230
  </div>
231
  </div>
232
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
233
  <div class="form-group">
234
+ <label for="<?php echo $this->field_id( array( 'added' => 'creds' ) ); ?>"><?php esc_html_e( 'Content Author', 'mycred' ); ?></label>
235
  <input type="text" name="<?php echo $this->field_name( array( 'added' => 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'added' => 'creds' ) ); ?>" value="<?php echo $this->core->number( $prefs['added']['creds'] ); ?>" class="form-control" />
236
  </div>
237
  </div>
238
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
239
  <div class="form-group">
240
+ <label for="<?php echo $this->field_id( array( 'added', 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
241
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'added', 'limit' ) ), $this->field_id( array( 'added', 'limit' ) ), $prefs['added']['limit'] ); ?>
242
  </div>
243
  </div>
245
  <div class="row">
246
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
247
  <div class="form-group">
248
+ <label for="<?php echo $this->field_id( array( 'add' => 'log' ) ); ?>"><?php esc_html_e( 'Member Log Template', 'mycred' ); ?></label>
249
+ <input type="text" name="<?php echo $this->field_name( array( 'add' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'add' => 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['add']['log'] ); ?>" class="form-control" />
250
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
251
  </div>
252
  </div>
253
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
254
  <div class="form-group">
255
+ <label for="<?php echo $this->field_id( array( 'added' => 'log' ) ); ?>"><?php esc_html_e( 'Content Author Log Template', 'mycred' ); ?></label>
256
+ <input type="text" name="<?php echo $this->field_name( array( 'added' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'added' => 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['added']['log'] ); ?>" class="form-control" />
257
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
258
  </div>
259
  </div>
260
  </div>
261
  </div>
262
  <div class="hook-instance">
263
+ <h3><?php esc_html_e( 'Removing Content from Favorites', 'mycred' ); ?></h3>
264
  <div class="row">
265
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
266
  <div class="form-group">
267
+ <label for="<?php echo $this->field_id( array( 'remove' => 'creds' ) ); ?>"><?php esc_html_e( 'Member', 'mycred' ); ?></label>
268
  <input type="text" name="<?php echo $this->field_name( array( 'remove' => 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'remove' => 'creds' ) ); ?>" value="<?php echo $this->core->number( $prefs['remove']['creds'] ); ?>" class="form-control" />
269
  </div>
270
  </div>
271
  <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12">
272
  <div class="form-group">
273
+ <label for="<?php echo $this->field_id( array( 'remove' => 'log' ) ); ?>"><?php esc_html_e( 'Log Template', 'mycred' ); ?></label>
274
+ <input type="text" name="<?php echo $this->field_name( array( 'remove' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'remove' => 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['remove']['log'] ); ?>" class="form-control" />
275
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
276
  </div>
277
  </div>
279
  <div class="row">
280
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
281
  <div class="form-group">
282
+ <label for="<?php echo $this->field_id( array( 'removed' => 'creds' ) ); ?>"><?php esc_html_e( 'Content Author', 'mycred' ); ?></label>
283
  <input type="text" name="<?php echo $this->field_name( array( 'removed' => 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'removed' => 'creds' ) ); ?>" value="<?php echo $this->core->number( $prefs['removed']['creds'] ); ?>" class="form-control" />
284
  </div>
285
  </div>
286
  <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12">
287
  <div class="form-group">
288
+ <label for="<?php echo $this->field_id( array( 'removed' => 'log' ) ); ?>"><?php esc_html_e( 'Log Template', 'mycred' ); ?></label>
289
+ <input type="text" name="<?php echo $this->field_name( array( 'removed' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'removed' => 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['removed']['log'] ); ?>" class="form-control" />
290
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
291
  </div>
292
  </div>
includes/hooks/external/mycred-hook-wp-polls.php CHANGED
@@ -174,8 +174,8 @@ function mycred_load_wp_polls_hook() {
174
  </div>
175
  <div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
176
  <div class="form-group">
177
- <label for="<?php echo $this->field_id( 'log' ); ?>"><?php _e( 'Log Template', 'mycred' ); ?></label>
178
- <input type="text" name="<?php echo $this->field_name( 'log' ); ?>" id="<?php echo $this->field_id( 'log' ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['log'] ); ?>" class="form-control" />
179
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
180
  </div>
181
  </div>
174
  </div>
175
  <div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
176
  <div class="form-group">
177
+ <label for="<?php echo $this->field_id( 'log' ); ?>"><?php esc_html_e( 'Log Template', 'mycred' ); ?></label>
178
+ <input type="text" name="<?php echo $this->field_name( 'log' ); ?>" id="<?php echo $this->field_id( 'log' ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['log'] ); ?>" class="form-control" />
179
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
180
  </div>
181
  </div>
includes/hooks/external/mycred-hook-wp-postratings.php CHANGED
@@ -158,29 +158,29 @@ function mycred_load_wp_postratings_hook() {
158
 
159
  ?>
160
  <div class="hook-instance">
161
- <h3><?php _e( 'Content Rating', 'mycred' ); ?></h3>
162
  <div class="row">
163
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
164
  <div class="form-group">
165
- <label for="<?php echo $this->field_id( array( 'rating' => 'creds' ) ); ?>"><?php _e( 'Member', 'mycred' ); ?></label>
166
  <input type="text" name="<?php echo $this->field_name( array( 'rating' => 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'rating' => 'creds' ) ); ?>" value="<?php echo $this->core->number( $prefs['rating']['creds'] ); ?>" class="form-control" />
167
  </div>
168
  </div>
169
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
170
  <div class="form-group">
171
- <label for="<?php echo $this->field_id( array( 'rating', 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
172
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'rating', 'limit' ) ), $this->field_id( array( 'rating', 'limit' ) ), $prefs['rating']['limit'] ); ?>
173
  </div>
174
  </div>
175
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
176
  <div class="form-group">
177
- <label for="<?php echo $this->field_id( array( 'rated' => 'creds' ) ); ?>"><?php _e( 'Content Author', 'mycred' ); ?></label>
178
  <input type="text" name="<?php echo $this->field_name( array( 'rated' => 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'rated' => 'creds' ) ); ?>" value="<?php echo $this->core->number( $prefs['rated']['creds'] ); ?>" class="form-control" />
179
  </div>
180
  </div>
181
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
182
  <div class="form-group">
183
- <label for="<?php echo $this->field_id( array( 'rated', 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
184
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'rated', 'limit' ) ), $this->field_id( array( 'rated', 'limit' ) ), $prefs['rated']['limit'] ); ?>
185
  </div>
186
  </div>
@@ -189,14 +189,14 @@ function mycred_load_wp_postratings_hook() {
189
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
190
  <div class="form-group">
191
  <div class="checkbox">
192
- <label for="<?php echo $this->field_id( array( 'rating', 'value' ) ); ?>"><input type="checkbox" name="<?php echo $this->field_name( array( 'rating', 'value' ) ); ?>" id="<?php echo $this->field_id( array( 'rating', 'value' ) ); ?>" <?php checked( $prefs['rating']['value'], 1 ); ?> value="1" /> <?php _e( 'Use the Rating Value instead of the amount set here.', 'mycred' ); ?></label>
193
  </div>
194
  </div>
195
  </div>
196
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
197
  <div class="form-group">
198
  <div class="checkbox">
199
- <label for="<?php echo $this->field_id( array( 'rated', 'value' ) ); ?>"><input type="checkbox" name="<?php echo $this->field_name( array( 'rated', 'value' ) ); ?>" id="<?php echo $this->field_id( array( 'rated', 'value' ) ); ?>" <?php checked( $prefs['rated']['value'], 1 ); ?> value="1" /> <?php _e( 'Use the Rating Value instead of the amount set here.', 'mycred' ); ?></label>
200
  </div>
201
  </div>
202
  </div>
@@ -204,15 +204,15 @@ function mycred_load_wp_postratings_hook() {
204
  <div class="row">
205
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
206
  <div class="form-group">
207
- <label for="<?php echo $this->field_id( array( 'rating' => 'log' ) ); ?>"><?php _e( 'Member Log Template', 'mycred' ); ?></label>
208
- <input type="text" name="<?php echo $this->field_name( array( 'rating' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'rating' => 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['rating']['log'] ); ?>" class="form-control" />
209
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
210
  </div>
211
  </div>
212
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
213
  <div class="form-group">
214
- <label for="<?php echo $this->field_id( array( 'rated' => 'log' ) ); ?>"><?php _e( 'Content Author Log Template', 'mycred' ); ?></label>
215
- <input type="text" name="<?php echo $this->field_name( array( 'rated' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'rated' => 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['rated']['log'] ); ?>" class="form-control" />
216
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
217
  </div>
218
  </div>
158
 
159
  ?>
160
  <div class="hook-instance">
161
+ <h3><?php esc_html_e( 'Content Rating', 'mycred' ); ?></h3>
162
  <div class="row">
163
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
164
  <div class="form-group">
165
+ <label for="<?php echo $this->field_id( array( 'rating' => 'creds' ) ); ?>"><?php esc_html_e( 'Member', 'mycred' ); ?></label>
166
  <input type="text" name="<?php echo $this->field_name( array( 'rating' => 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'rating' => 'creds' ) ); ?>" value="<?php echo $this->core->number( $prefs['rating']['creds'] ); ?>" class="form-control" />
167
  </div>
168
  </div>
169
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
170
  <div class="form-group">
171
+ <label for="<?php echo $this->field_id( array( 'rating', 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
172
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'rating', 'limit' ) ), $this->field_id( array( 'rating', 'limit' ) ), $prefs['rating']['limit'] ); ?>
173
  </div>
174
  </div>
175
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
176
  <div class="form-group">
177
+ <label for="<?php echo $this->field_id( array( 'rated' => 'creds' ) ); ?>"><?php esc_html_e( 'Content Author', 'mycred' ); ?></label>
178
  <input type="text" name="<?php echo $this->field_name( array( 'rated' => 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'rated' => 'creds' ) ); ?>" value="<?php echo $this->core->number( $prefs['rated']['creds'] ); ?>" class="form-control" />
179
  </div>
180
  </div>
181
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
182
  <div class="form-group">
183
+ <label for="<?php echo $this->field_id( array( 'rated', 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
184
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'rated', 'limit' ) ), $this->field_id( array( 'rated', 'limit' ) ), $prefs['rated']['limit'] ); ?>
185
  </div>
186
  </div>
189
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
190
  <div class="form-group">
191
  <div class="checkbox">
192
+ <label for="<?php echo $this->field_id( array( 'rating', 'value' ) ); ?>"><input type="checkbox" name="<?php echo $this->field_name( array( 'rating', 'value' ) ); ?>" id="<?php echo $this->field_id( array( 'rating', 'value' ) ); ?>" <?php checked( $prefs['rating']['value'], 1 ); ?> value="1" /> <?php esc_html_e( 'Use the Rating Value instead of the amount set here.', 'mycred' ); ?></label>
193
  </div>
194
  </div>
195
  </div>
196
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
197
  <div class="form-group">
198
  <div class="checkbox">
199
+ <label for="<?php echo $this->field_id( array( 'rated', 'value' ) ); ?>"><input type="checkbox" name="<?php echo $this->field_name( array( 'rated', 'value' ) ); ?>" id="<?php echo $this->field_id( array( 'rated', 'value' ) ); ?>" <?php checked( $prefs['rated']['value'], 1 ); ?> value="1" /> <?php esc_html_e( 'Use the Rating Value instead of the amount set here.', 'mycred' ); ?></label>
200
  </div>
201
  </div>
202
  </div>
204
  <div class="row">
205
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
206
  <div class="form-group">
207
+ <label for="<?php echo $this->field_id( array( 'rating' => 'log' ) ); ?>"><?php esc_html_e( 'Member Log Template', 'mycred' ); ?></label>
208
+ <input type="text" name="<?php echo $this->field_name( array( 'rating' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'rating' => 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['rating']['log'] ); ?>" class="form-control" />
209
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
210
  </div>
211
  </div>
212
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
213
  <div class="form-group">
214
+ <label for="<?php echo $this->field_id( array( 'rated' => 'log' ) ); ?>"><?php esc_html_e( 'Content Author Log Template', 'mycred' ); ?></label>
215
+ <input type="text" name="<?php echo $this->field_name( array( 'rated' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'rated' => 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['rated']['log'] ); ?>" class="form-control" />
216
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
217
  </div>
218
  </div>
includes/hooks/mycred-hook-anniversary.php CHANGED
@@ -104,15 +104,15 @@ if ( ! class_exists( 'myCRED_Hook_Anniversary' ) ) :
104
  <div class="row">
105
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
106
  <div class="form-group">
107
- <label for="<?php echo $this->field_id( 'creds' ); ?>"><?php echo $this->core->plural(); ?></label>
108
- <input type="text" name="<?php echo $this->field_name( 'creds' ); ?>" id="<?php echo $this->field_id( 'creds' ); ?>" value="<?php echo $this->core->number( $prefs['creds'] ); ?>" class="form-control" />
109
  </div>
110
  </div>
111
  <div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
112
  <div class="form-group">
113
- <label for="<?php echo $this->field_id( 'log' ); ?>"><?php _e( 'Log Template', 'mycred' ); ?></label>
114
- <input type="text" name="<?php echo $this->field_name( 'log' ); ?>" id="<?php echo $this->field_id( 'log' ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['log'] ); ?>" class="form-control" />
115
- <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
116
  </div>
117
  </div>
118
  </div>
104
  <div class="row">
105
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
106
  <div class="form-group">
107
+ <label for="<?php echo esc_attr( $this->field_id( 'creds' ) ); ?>"><?php echo esc_html( $this->core->plural() ); ?></label>
108
+ <input type="text" name="<?php echo esc_attr( $this->field_name( 'creds' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'creds' ) ); ?>" value="<?php echo $this->core->number( $prefs['creds'] ); ?>" class="form-control" />
109
  </div>
110
  </div>
111
  <div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
112
  <div class="form-group">
113
+ <label for="<?php echo esc_attr( $this->field_id( 'log' ) ); ?>"><?php esc_html_e( 'Log Template', 'mycred' ); ?></label>
114
+ <input type="text" name="<?php echo esc_attr( $this->field_name( 'log' ) ); ?>" id="<?php echo esc_attr( $this->field_id( 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['log'] ); ?>" class="form-control" />
115
+ <span class="description"><?php echo wp_kses_post( $this->available_template_tags( array( 'general' ) ) ); ?></span>
116
  </div>
117
  </div>
118
  </div>
includes/hooks/mycred-hook-comments.php CHANGED
@@ -364,26 +364,26 @@ if ( ! class_exists( 'myCRED_Hook_Comments' ) ) :
364
 
365
  ?>
366
  <div class="hook-instance">
367
- <h3><?php _e( 'Approved Comments', 'mycred' ); ?></h3>
368
  <div class="row">
369
  <div class="col-lg-3 col-md-6 col-sm-6 col-xs-12">
370
  <div class="form-group">
371
- <label for="<?php echo $this->field_id( array( 'approved' => 'creds' ) ); ?>"><?php _e( 'Member', 'mycred' ); ?></label>
372
  <input type="text" name="<?php echo $this->field_name( array( 'approved' => 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'approved' => 'creds' ) ); ?>" value="<?php echo $this->core->number( $prefs['approved']['creds'] ); ?>" class="form-control" />
373
- <span class="description"><?php _e( 'Use zero to disable.', 'mycred' ); ?></span>
374
  </div>
375
  </div>
376
  <div class="col-lg-3 col-md-6 col-sm-6 col-xs-12">
377
  <div class="form-group">
378
- <label for="<?php echo $this->field_id( array( 'approved' => 'author' ) ); ?>"><?php _e( 'Content Author', 'mycred' ); ?></label>
379
  <input type="text" name="<?php echo $this->field_name( array( 'approved' => 'author' ) ); ?>" id="<?php echo $this->field_id( array( 'approved' => 'author' ) ); ?>" value="<?php echo $this->core->number( $prefs['approved']['author'] ); ?>" class="form-control" />
380
- <span class="description"><?php _e( 'Use zero to disable.', 'mycred' ); ?></span>
381
  </div>
382
  </div>
383
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
384
  <div class="form-group">
385
- <label for="<?php echo $this->field_id( array( 'approved' => 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
386
- <input type="text" name="<?php echo $this->field_name( array( 'approved' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'approved' => 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['approved']['log'] ); ?>" class="form-control" />
387
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'comment' ) ); ?></span>
388
  </div>
389
  </div>
@@ -400,14 +400,14 @@ if ( ! class_exists( 'myCRED_Hook_Comments' ) ) :
400
  <div class="row">
401
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
402
  <div class="form-group">
403
- <label for="<?php echo $this->field_id( array( 'limits' => 'per_post' ) ); ?>"><?php _e( 'Limit per post', 'mycred' ); ?></label>
404
  <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 esc_attr( $prefs['limits']['per_post'] ); ?>" class="form-control" />
405
  <span class="description"><?php echo $this->core->template_tags_general( __( 'The number of comments per post that grants %_plural% to the comment author. Use zero for unlimited.', 'mycred' ) ); ?></span>
406
  </div>
407
  </div>
408
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
409
  <div class="form-group">
410
- <label for="<?php echo $this->field_id( array( 'limits' => 'per_day' ) ); ?>"><?php _e( 'Limit per day', 'mycred' ); ?></label>
411
  <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']; ?>" class="form-control" />
412
  <span class="description"><?php echo $this->core->template_tags_general( __( 'Number of comments per day that grants %_plural%. Use zero for unlimited.', 'mycred' ) ); ?></span>
413
  </div>
@@ -415,52 +415,52 @@ if ( ! class_exists( 'myCRED_Hook_Comments' ) ) :
415
  </div>
416
  </div>
417
  <div class="hook-instance">
418
- <h3><?php _e( 'SPAM Comments', 'mycred' ); ?></h3>
419
  <div class="row">
420
  <div class="col-lg-3 col-md-6 col-sm-6 col-xs-12">
421
  <div class="form-group">
422
- <label for="<?php echo $this->field_id( array( 'spam' => 'creds' ) ); ?>"><?php _e( 'Member', 'mycred' ); ?></label>
423
  <input type="text" name="<?php echo $this->field_name( array( 'spam' => 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'spam' => 'creds' ) ); ?>" value="<?php echo $this->core->number( $prefs['spam']['creds'] ); ?>" class="form-control" />
424
- <span class="description"><?php _e( 'Use zero to disable.', 'mycred' ); ?></span>
425
  </div>
426
  </div>
427
  <div class="col-lg-3 col-md-6 col-sm-6 col-xs-12">
428
  <div class="form-group">
429
- <label for="<?php echo $this->field_id( array( 'spam' => 'author' ) ); ?>"><?php _e( 'Content Author', 'mycred' ); ?></label>
430
  <input type="text" name="<?php echo $this->field_name( array( 'spam' => 'author' ) ); ?>" id="<?php echo $this->field_id( array( 'spam' => 'author' ) ); ?>" value="<?php echo $this->core->number( $prefs['spam']['author'] ); ?>" class="form-control" />
431
- <span class="description"><?php _e( 'Use zero to disable.', 'mycred' ); ?></span>
432
  </div>
433
  </div>
434
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
435
  <div class="form-group">
436
- <label for="<?php echo $this->field_id( array( 'spam' => 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
437
- <input type="text" name="<?php echo $this->field_name( array( 'spam' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'spam' => 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['spam']['log'] ); ?>" class="form-control" />
438
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'comment' ) ); ?></span>
439
  </div>
440
  </div>
441
  </div>
442
  </div>
443
  <div class="hook-instance">
444
- <h3><?php _e( 'Trashed Comments', 'mycred' ); ?></h3>
445
  <div class="row">
446
  <div class="col-lg-3 col-md-6 col-sm-6 col-xs-12">
447
  <div class="form-group">
448
- <label for="<?php echo $this->field_id( array( 'trash' => 'creds' ) ); ?>"><?php _e( 'Member', 'mycred' ); ?></label>
449
  <input type="text" name="<?php echo $this->field_name( array( 'trash' => 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'trash' => 'creds' ) ); ?>" value="<?php echo $this->core->number( $prefs['trash']['creds'] ); ?>" class="form-control" />
450
- <span class="description"><?php _e( 'Use zero to disable.', 'mycred' ); ?></span>
451
  </div>
452
  </div>
453
  <div class="col-lg-3 col-md-6 col-sm-6 col-xs-12">
454
  <div class="form-group">
455
- <label for="<?php echo $this->field_id( array( 'trash' => 'author' ) ); ?>"><?php _e( 'Content Author', 'mycred' ); ?></label>
456
  <input type="text" name="<?php echo $this->field_name( array( 'trash' => 'author' ) ); ?>" id="<?php echo $this->field_id( array( 'trash' => 'author' ) ); ?>" value="<?php echo $this->core->number( $prefs['trash']['author'] ); ?>" class="form-control" />
457
- <span class="description"><?php _e( 'Use zero to disable.', 'mycred' ); ?></span>
458
  </div>
459
  </div>
460
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
461
  <div class="form-group">
462
- <label for="<?php echo $this->field_id( array( 'trash' => 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
463
- <input type="text" name="<?php echo $this->field_name( array( 'trash' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'trash' => 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['trash']['log'] ); ?>" class="form-control" />
464
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'comment' ) ); ?></span>
465
  </div>
466
  </div>
364
 
365
  ?>
366
  <div class="hook-instance">
367
+ <h3><?php esc_html_e( 'Approved Comments', 'mycred' ); ?></h3>
368
  <div class="row">
369
  <div class="col-lg-3 col-md-6 col-sm-6 col-xs-12">
370
  <div class="form-group">
371
+ <label for="<?php echo $this->field_id( array( 'approved' => 'creds' ) ); ?>"><?php esc_html_e( 'Member', 'mycred' ); ?></label>
372
  <input type="text" name="<?php echo $this->field_name( array( 'approved' => 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'approved' => 'creds' ) ); ?>" value="<?php echo $this->core->number( $prefs['approved']['creds'] ); ?>" class="form-control" />
373
+ <span class="description"><?php esc_html_e( 'Use zero to disable.', 'mycred' ); ?></span>
374
  </div>
375
  </div>
376
  <div class="col-lg-3 col-md-6 col-sm-6 col-xs-12">
377
  <div class="form-group">
378
+ <label for="<?php echo $this->field_id( array( 'approved' => 'author' ) ); ?>"><?php esc_html_e( 'Content Author', 'mycred' ); ?></label>
379
  <input type="text" name="<?php echo $this->field_name( array( 'approved' => 'author' ) ); ?>" id="<?php echo $this->field_id( array( 'approved' => 'author' ) ); ?>" value="<?php echo $this->core->number( $prefs['approved']['author'] ); ?>" class="form-control" />
380
+ <span class="description"><?php esc_html_e( 'Use zero to disable.', 'mycred' ); ?></span>
381
  </div>
382
  </div>
383
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
384
  <div class="form-group">
385
+ <label for="<?php echo $this->field_id( array( 'approved' => 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
386
+ <input type="text" name="<?php echo $this->field_name( array( 'approved' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'approved' => 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['approved']['log'] ); ?>" class="form-control" />
387
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'comment' ) ); ?></span>
388
  </div>
389
  </div>
400
  <div class="row">
401
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
402
  <div class="form-group">
403
+ <label for="<?php echo $this->field_id( array( 'limits' => 'per_post' ) ); ?>"><?php esc_html_e( 'Limit per post', 'mycred' ); ?></label>
404
  <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 esc_attr( $prefs['limits']['per_post'] ); ?>" class="form-control" />
405
  <span class="description"><?php echo $this->core->template_tags_general( __( 'The number of comments per post that grants %_plural% to the comment author. Use zero for unlimited.', 'mycred' ) ); ?></span>
406
  </div>
407
  </div>
408
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
409
  <div class="form-group">
410
+ <label for="<?php echo $this->field_id( array( 'limits' => 'per_day' ) ); ?>"><?php esc_html_e( 'Limit per day', 'mycred' ); ?></label>
411
  <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']; ?>" class="form-control" />
412
  <span class="description"><?php echo $this->core->template_tags_general( __( 'Number of comments per day that grants %_plural%. Use zero for unlimited.', 'mycred' ) ); ?></span>
413
  </div>
415
  </div>
416
  </div>
417
  <div class="hook-instance">
418
+ <h3><?php esc_html_e( 'SPAM Comments', 'mycred' ); ?></h3>
419
  <div class="row">
420
  <div class="col-lg-3 col-md-6 col-sm-6 col-xs-12">
421
  <div class="form-group">
422
+ <label for="<?php echo $this->field_id( array( 'spam' => 'creds' ) ); ?>"><?php esc_html_e( 'Member', 'mycred' ); ?></label>
423
  <input type="text" name="<?php echo $this->field_name( array( 'spam' => 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'spam' => 'creds' ) ); ?>" value="<?php echo $this->core->number( $prefs['spam']['creds'] ); ?>" class="form-control" />
424
+ <span class="description"><?php esc_html_e( 'Use zero to disable.', 'mycred' ); ?></span>
425
  </div>
426
  </div>
427
  <div class="col-lg-3 col-md-6 col-sm-6 col-xs-12">
428
  <div class="form-group">
429
+ <label for="<?php echo $this->field_id( array( 'spam' => 'author' ) ); ?>"><?php esc_html_e( 'Content Author', 'mycred' ); ?></label>
430
  <input type="text" name="<?php echo $this->field_name( array( 'spam' => 'author' ) ); ?>" id="<?php echo $this->field_id( array( 'spam' => 'author' ) ); ?>" value="<?php echo $this->core->number( $prefs['spam']['author'] ); ?>" class="form-control" />
431
+ <span class="description"><?php esc_html_e( 'Use zero to disable.', 'mycred' ); ?></span>
432
  </div>
433
  </div>
434
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
435
  <div class="form-group">
436
+ <label for="<?php echo $this->field_id( array( 'spam' => 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
437
+ <input type="text" name="<?php echo $this->field_name( array( 'spam' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'spam' => 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['spam']['log'] ); ?>" class="form-control" />
438
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'comment' ) ); ?></span>
439
  </div>
440
  </div>
441
  </div>
442
  </div>
443
  <div class="hook-instance">
444
+ <h3><?php esc_html_e( 'Trashed Comments', 'mycred' ); ?></h3>
445
  <div class="row">
446
  <div class="col-lg-3 col-md-6 col-sm-6 col-xs-12">
447
  <div class="form-group">
448
+ <label for="<?php echo $this->field_id( array( 'trash' => 'creds' ) ); ?>"><?php esc_html_e( 'Member', 'mycred' ); ?></label>
449
  <input type="text" name="<?php echo $this->field_name( array( 'trash' => 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'trash' => 'creds' ) ); ?>" value="<?php echo $this->core->number( $prefs['trash']['creds'] ); ?>" class="form-control" />
450
+ <span class="description"><?php esc_html_e( 'Use zero to disable.', 'mycred' ); ?></span>
451
  </div>
452
  </div>
453
  <div class="col-lg-3 col-md-6 col-sm-6 col-xs-12">
454
  <div class="form-group">
455
+ <label for="<?php echo $this->field_id( array( 'trash' => 'author' ) ); ?>"><?php esc_html_e( 'Content Author', 'mycred' ); ?></label>
456
  <input type="text" name="<?php echo $this->field_name( array( 'trash' => 'author' ) ); ?>" id="<?php echo $this->field_id( array( 'trash' => 'author' ) ); ?>" value="<?php echo $this->core->number( $prefs['trash']['author'] ); ?>" class="form-control" />
457
+ <span class="description"><?php esc_html_e( 'Use zero to disable.', 'mycred' ); ?></span>
458
  </div>
459
  </div>
460
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
461
  <div class="form-group">
462
+ <label for="<?php echo $this->field_id( array( 'trash' => 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
463
+ <input type="text" name="<?php echo $this->field_name( array( 'trash' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'trash' => 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['trash']['log'] ); ?>" class="form-control" />
464
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'comment' ) ); ?></span>
465
  </div>
466
  </div>
includes/hooks/mycred-hook-delete-content.php CHANGED
@@ -104,7 +104,7 @@ if ( ! class_exists( 'myCRED_Hook_Delete_Content' ) ) :
104
 
105
  ?>
106
  <div class="hook-instance">
107
- <h3><?php _e( 'Trashing Posts', 'mycred' ); ?></h3>
108
  <div class="row">
109
  <div class="col-lg-2 col-md-6 col-sm-6 col-xs-12">
110
  <div class="form-group">
@@ -114,21 +114,21 @@ if ( ! class_exists( 'myCRED_Hook_Delete_Content' ) ) :
114
  </div>
115
  <div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
116
  <div class="form-group">
117
- <label for="<?php echo $this->field_id( array( 'post' => 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
118
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'post' => 'limit' ) ), $this->field_id( array( 'post' => 'limit' ) ), $prefs['post']['limit'] ); ?>
119
  </div>
120
  </div>
121
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
122
  <div class="form-group">
123
- <label for="<?php echo $this->field_id( array( 'post' => 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
124
- <input type="text" name="<?php echo $this->field_name( array( 'post' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'post' => 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['post']['log'] ); ?>" class="form-control" />
125
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
126
  </div>
127
  </div>
128
  </div>
129
  </div>
130
  <div class="hook-instance">
131
- <h3><?php _e( 'Trashing Pages', 'mycred' ); ?></h3>
132
  <div class="row">
133
  <div class="col-lg-2 col-md-6 col-sm-6 col-xs-12">
134
  <div class="form-group">
@@ -138,14 +138,14 @@ if ( ! class_exists( 'myCRED_Hook_Delete_Content' ) ) :
138
  </div>
139
  <div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
140
  <div class="form-group">
141
- <label for="<?php echo $this->field_id( array( 'page' => 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
142
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'page' => 'limit' ) ), $this->field_id( array( 'page' => 'limit' ) ), $prefs['page']['limit'] ); ?>
143
  </div>
144
  </div>
145
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
146
  <div class="form-group">
147
- <label for="<?php echo $this->field_id( array( 'page' => 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
148
- <input type="text" name="<?php echo $this->field_name( array( 'page' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'page' => 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['page']['log'] ); ?>" class="form-control" />
149
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
150
  </div>
151
  </div>
@@ -194,14 +194,14 @@ if ( ! class_exists( 'myCRED_Hook_Delete_Content' ) ) :
194
  </div>
195
  <div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
196
  <div class="form-group">
197
- <label for="<?php echo $this->field_id( array( $post_type->name => 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
198
  <?php echo $this->hook_limit_setting( $this->field_name( array( $post_type->name => 'limit' ) ), $this->field_id( array( $post_type->name => 'limit' ) ), $_limit ); ?>
199
  </div>
200
  </div>
201
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
202
  <div class="form-group">
203
- <label for="<?php echo $this->field_id( array( $post_type->name => 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
204
- <input type="text" name="<?php echo $this->field_name( array( $post_type->name => 'log' ) ); ?>" id="<?php echo $this->field_id( array( $post_type->name => 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $_log ); ?>" class="form-control" />
205
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
206
  </div>
207
  </div>
104
 
105
  ?>
106
  <div class="hook-instance">
107
+ <h3><?php esc_html_e( 'Trashing Posts', 'mycred' ); ?></h3>
108
  <div class="row">
109
  <div class="col-lg-2 col-md-6 col-sm-6 col-xs-12">
110
  <div class="form-group">
114
  </div>
115
  <div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
116
  <div class="form-group">
117
+ <label for="<?php echo $this->field_id( array( 'post' => 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
118
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'post' => 'limit' ) ), $this->field_id( array( 'post' => 'limit' ) ), $prefs['post']['limit'] ); ?>
119
  </div>
120
  </div>
121
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
122
  <div class="form-group">
123
+ <label for="<?php echo $this->field_id( array( 'post' => 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
124
+ <input type="text" name="<?php echo $this->field_name( array( 'post' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'post' => 'log' ) ); ?>" placeholder="<?php esc_html_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['post']['log'] ); ?>" class="form-control" />
125
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
126
  </div>
127
  </div>
128
  </div>
129
  </div>
130
  <div class="hook-instance">
131
+ <h3><?php esc_html_e( 'Trashing Pages', 'mycred' ); ?></h3>
132
  <div class="row">
133
  <div class="col-lg-2 col-md-6 col-sm-6 col-xs-12">
134
  <div class="form-group">
138
  </div>
139
  <div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
140
  <div class="form-group">
141
+ <label for="<?php echo $this->field_id( array( 'page' => 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
142
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'page' => 'limit' ) ), $this->field_id( array( 'page' => 'limit' ) ), $prefs['page']['limit'] ); ?>
143
  </div>
144
  </div>
145
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
146
  <div class="form-group">
147
+ <label for="<?php echo $this->field_id( array( 'page' => 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
148
+ <input type="text" name="<?php echo $this->field_name( array( 'page' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'page' => 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['page']['log'] ); ?>" class="form-control" />
149
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
150
  </div>
151
  </div>
194
  </div>
195
  <div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
196
  <div class="form-group">
197
+ <label for="<?php echo $this->field_id( array( $post_type->name => 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
198
  <?php echo $this->hook_limit_setting( $this->field_name( array( $post_type->name => 'limit' ) ), $this->field_id( array( $post_type->name => 'limit' ) ), $_limit ); ?>
199
  </div>
200
  </div>
201
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
202
  <div class="form-group">
203
+ <label for="<?php echo $this->field_id( array( $post_type->name => 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
204
+ <input type="text" name="<?php echo $this->field_name( array( $post_type->name => 'log' ) ); ?>" id="<?php echo $this->field_id( array( $post_type->name => 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $_log ); ?>" class="form-control" />
205
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
206
  </div>
207
  </div>
includes/hooks/mycred-hook-link-clicks.php CHANGED
@@ -281,8 +281,8 @@ if ( ! class_exists( 'myCRED_Hook_Click_Links' ) ) :
281
  </div>
282
  <div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
283
  <div class="form-group">
284
- <label for="<?php echo $this->field_id( 'log' ); ?>"><?php _e( 'Log Template', 'mycred' ); ?></label>
285
- <input type="text" name="<?php echo $this->field_name( 'log' ); ?>" id="<?php echo $this->field_id( 'log' ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['log'] ); ?>" class="form-control" />
286
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'user' ), '%url%, %title% or %id%' ); ?></span>
287
  </div>
288
  </div>
@@ -290,7 +290,7 @@ if ( ! class_exists( 'myCRED_Hook_Click_Links' ) ) :
290
  <div class="row">
291
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
292
  <div class="form-group">
293
- <label for=""><?php _e( 'Limits', 'mycred' ); ?></label>
294
  <?php
295
 
296
  add_filter( 'mycred_hook_impose_limits', array( $this, 'custom_limit' ) );
@@ -301,7 +301,7 @@ if ( ! class_exists( 'myCRED_Hook_Click_Links' ) ) :
301
  </div>
302
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
303
  <div class="form-group">
304
- <label><?php _e( 'Available Shortcode', 'mycred' ); ?></label>
305
  <p class="form-control-static"><a href="http://codex.mycred.me/shortcodes/mycred_link/" target="_blank">[mycred_link]</a></p>
306
  </div>
307
  </div>
281
  </div>
282
  <div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
283
  <div class="form-group">
284
+ <label for="<?php echo $this->field_id( 'log' ); ?>"><?php esc_html_e( 'Log Template', 'mycred' ); ?></label>
285
+ <input type="text" name="<?php echo $this->field_name( 'log' ); ?>" id="<?php echo $this->field_id( 'log' ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['log'] ); ?>" class="form-control" />
286
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'user' ), '%url%, %title% or %id%' ); ?></span>
287
  </div>
288
  </div>
290
  <div class="row">
291
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
292
  <div class="form-group">
293
+ <label for=""><?php esc_html_e( 'Limits', 'mycred' ); ?></label>
294
  <?php
295
 
296
  add_filter( 'mycred_hook_impose_limits', array( $this, 'custom_limit' ) );
301
  </div>
302
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
303
  <div class="form-group">
304
+ <label><?php esc_html_e( 'Available Shortcode', 'mycred' ); ?></label>
305
  <p class="form-control-static"><a href="http://codex.mycred.me/shortcodes/mycred_link/" target="_blank">[mycred_link]</a></p>
306
  </div>
307
  </div>
includes/hooks/mycred-hook-logins.php CHANGED
@@ -132,14 +132,14 @@ if ( ! class_exists( 'myCRED_Hook_Logging_In' ) ) :
132
  </div>
133
  <div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
134
  <div class="form-group">
135
- <label for="<?php echo $this->field_id( 'limit' ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
136
  <?php echo $this->hook_limit_setting( $this->field_name( 'limit' ), $this->field_id( 'limit' ), $prefs['limit'] ); ?>
137
  </div>
138
  </div>
139
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
140
  <div class="form-group">
141
- <label for="<?php echo $this->field_id( 'log' ); ?>"><?php _e( 'Log Template', 'mycred' ); ?></label>
142
- <input type="text" name="<?php echo $this->field_name( 'log' ); ?>" id="<?php echo $this->field_id( 'log' ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['log'] ); ?>" class="form-control" />
143
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
144
  </div>
145
  </div>
132
  </div>
133
  <div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
134
  <div class="form-group">
135
+ <label for="<?php echo $this->field_id( 'limit' ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
136
  <?php echo $this->hook_limit_setting( $this->field_name( 'limit' ), $this->field_id( 'limit' ), $prefs['limit'] ); ?>
137
  </div>
138
  </div>
139
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
140
  <div class="form-group">
141
+ <label for="<?php echo $this->field_id( 'log' ); ?>"><?php esc_html_e( 'Log Template', 'mycred' ); ?></label>
142
+ <input type="text" name="<?php echo $this->field_name( 'log' ); ?>" id="<?php echo $this->field_id( 'log' ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['log'] ); ?>" class="form-control" />
143
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
144
  </div>
145
  </div>
includes/hooks/mycred-hook-publishing-content.php CHANGED
@@ -106,7 +106,7 @@ if ( ! class_exists( 'myCRED_Hook_Publishing_Content' ) ) :
106
 
107
  ?>
108
  <div class="hook-instance">
109
- <h3><?php _e( 'Publishing Posts', 'mycred' ); ?></h3>
110
  <div class="row">
111
  <div class="col-lg-2 col-md-6 col-sm-6 col-xs-12">
112
  <div class="form-group">
@@ -116,21 +116,21 @@ if ( ! class_exists( 'myCRED_Hook_Publishing_Content' ) ) :
116
  </div>
117
  <div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
118
  <div class="form-group">
119
- <label for="<?php echo $this->field_id( array( 'post' => 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
120
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'post' => 'limit' ) ), $this->field_id( array( 'post' => 'limit' ) ), $prefs['post']['limit'] ); ?>
121
  </div>
122
  </div>
123
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
124
  <div class="form-group">
125
- <label for="<?php echo $this->field_id( array( 'post' => 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
126
- <input type="text" name="<?php echo $this->field_name( array( 'post' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'post' => 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['post']['log'] ); ?>" class="form-control" />
127
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
128
  </div>
129
  </div>
130
  </div>
131
  </div>
132
  <div class="hook-instance">
133
- <h3><?php _e( 'Publishing Pages', 'mycred' ); ?></h3>
134
  <div class="row">
135
  <div class="col-lg-2 col-md-6 col-sm-6 col-xs-12">
136
  <div class="form-group">
@@ -140,14 +140,14 @@ if ( ! class_exists( 'myCRED_Hook_Publishing_Content' ) ) :
140
  </div>
141
  <div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
142
  <div class="form-group">
143
- <label for="<?php echo $this->field_id( array( 'page' => 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
144
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'page' => 'limit' ) ), $this->field_id( array( 'page' => 'limit' ) ), $prefs['page']['limit'] ); ?>
145
  </div>
146
  </div>
147
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
148
  <div class="form-group">
149
- <label for="<?php echo $this->field_id( array( 'page' => 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
150
- <input type="text" name="<?php echo $this->field_name( array( 'page' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'page' => 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['page']['log'] ); ?>" class="form-control" />
151
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
152
  </div>
153
  </div>
@@ -196,14 +196,14 @@ if ( ! class_exists( 'myCRED_Hook_Publishing_Content' ) ) :
196
  </div>
197
  <div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
198
  <div class="form-group">
199
- <label for="<?php echo $this->field_id( array( $post_type->name => 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
200
  <?php echo $this->hook_limit_setting( $this->field_name( array( $post_type->name => 'limit' ) ), $this->field_id( array( $post_type->name => 'limit' ) ), $_limit ); ?>
201
  </div>
202
  </div>
203
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
204
  <div class="form-group">
205
- <label for="<?php echo $this->field_id( array( $post_type->name => 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
206
- <input type="text" name="<?php echo $this->field_name( array( $post_type->name => 'log' ) ); ?>" id="<?php echo $this->field_id( array( $post_type->name => 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $_log ); ?>" class="form-control" />
207
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
208
  </div>
209
  </div>
106
 
107
  ?>
108
  <div class="hook-instance">
109
+ <h3><?php esc_html_e( 'Publishing Posts', 'mycred' ); ?></h3>
110
  <div class="row">
111
  <div class="col-lg-2 col-md-6 col-sm-6 col-xs-12">
112
  <div class="form-group">
116
  </div>
117
  <div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
118
  <div class="form-group">
119
+ <label for="<?php echo $this->field_id( array( 'post' => 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
120
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'post' => 'limit' ) ), $this->field_id( array( 'post' => 'limit' ) ), $prefs['post']['limit'] ); ?>
121
  </div>
122
  </div>
123
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
124
  <div class="form-group">
125
+ <label for="<?php echo $this->field_id( array( 'post' => 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
126
+ <input type="text" name="<?php echo $this->field_name( array( 'post' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'post' => 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['post']['log'] ); ?>" class="form-control" />
127
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
128
  </div>
129
  </div>
130
  </div>
131
  </div>
132
  <div class="hook-instance">
133
+ <h3><?php esc_html_e( 'Publishing Pages', 'mycred' ); ?></h3>
134
  <div class="row">
135
  <div class="col-lg-2 col-md-6 col-sm-6 col-xs-12">
136
  <div class="form-group">
140
  </div>
141
  <div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
142
  <div class="form-group">
143
+ <label for="<?php echo $this->field_id( array( 'page' => 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
144
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'page' => 'limit' ) ), $this->field_id( array( 'page' => 'limit' ) ), $prefs['page']['limit'] ); ?>
145
  </div>
146
  </div>
147
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
148
  <div class="form-group">
149
+ <label for="<?php echo $this->field_id( array( 'page' => 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
150
+ <input type="text" name="<?php echo $this->field_name( array( 'page' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'page' => 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['page']['log'] ); ?>" class="form-control" />
151
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
152
  </div>
153
  </div>
196
  </div>
197
  <div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
198
  <div class="form-group">
199
+ <label for="<?php echo $this->field_id( array( $post_type->name => 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
200
  <?php echo $this->hook_limit_setting( $this->field_name( array( $post_type->name => 'limit' ) ), $this->field_id( array( $post_type->name => 'limit' ) ), $_limit ); ?>
201
  </div>
202
  </div>
203
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
204
  <div class="form-group">
205
+ <label for="<?php echo $this->field_id( array( $post_type->name => 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
206
+ <input type="text" name="<?php echo $this->field_name( array( $post_type->name => 'log' ) ); ?>" id="<?php echo $this->field_id( array( $post_type->name => 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $_log ); ?>" class="form-control" />
207
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
208
  </div>
209
  </div>
includes/hooks/mycred-hook-referrals.php CHANGED
@@ -162,6 +162,7 @@ if ( ! class_exists( 'myCRED_Hook_Affiliate' ) ) :
162
  * Returns the current users affiliate ID. Returns an empty
163
  * string if the user is not logged in.
164
  * @since 1.4
 
165
  * @version 1.1
166
  */
167
  public function shortcode_affiliate_id( $content, $atts ) {
@@ -182,6 +183,8 @@ if ( ! class_exists( 'myCRED_Hook_Affiliate' ) ) :
182
 
183
  }
184
 
 
 
185
  return apply_filters( 'mycred_affiliate_id', $ref_id, $atts, $this );
186
 
187
  }
@@ -594,7 +597,7 @@ if ( ! class_exists( 'myCRED_Hook_Affiliate' ) ) :
594
 
595
  ?>
596
  <div class="hook-instance">
597
- <h3><?php _e( 'Referring Visitors', 'mycred' ); ?></h3>
598
  <div class="row">
599
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
600
  <div class="form-group">
@@ -604,13 +607,13 @@ if ( ! class_exists( 'myCRED_Hook_Affiliate' ) ) :
604
  </div>
605
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
606
  <div class="form-group">
607
- <label for="<?php echo $this->field_id( array( 'visit', 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
608
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'visit', 'limit' ) ), $this->field_id( array( 'visit', 'limit' ) ), $prefs['visit']['limit'] ); ?>
609
  </div>
610
  </div>
611
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
612
  <div class="form-group">
613
- <label for="<?php echo $this->field_id( array( 'visit' => 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
614
  <input type="text" name="<?php echo $this->field_name( array( 'visit' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'visit' => 'log' ) ); ?>" value="<?php echo esc_attr( $prefs['visit']['log'] ); ?>" class="form-control" />
615
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
616
  </div>
@@ -618,7 +621,7 @@ if ( ! class_exists( 'myCRED_Hook_Affiliate' ) ) :
618
  </div>
619
  </div>
620
  <div class="hook-instance">
621
- <h3><?php _e( 'Referring Signups', 'mycred' ); ?></h3>
622
 
623
  <?php if ( get_option( 'users_can_register' ) ) : ?>
624
 
@@ -631,13 +634,13 @@ if ( ! class_exists( 'myCRED_Hook_Affiliate' ) ) :
631
  </div>
632
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
633
  <div class="form-group">
634
- <label for="<?php echo $this->field_id( array( 'signup', 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
635
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'signup', 'limit' ) ), $this->field_id( array( 'signup', 'limit' ) ), $prefs['signup']['limit'] ); ?>
636
  </div>
637
  </div>
638
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
639
  <div class="form-group">
640
- <label for="<?php echo $this->field_id( array( 'signup' => 'log' ) ); ?>"><?php _e( 'Log template', 'mycred' ); ?></label>
641
  <input type="text" name="<?php echo $this->field_name( array( 'signup' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'signup' => 'log' ) ); ?>" value="<?php echo esc_attr( $prefs['signup']['log'] ); ?>" class="form-control" />
642
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ), '%user_name%' ); ?></span>
643
  </div>
@@ -661,17 +664,17 @@ if ( ! class_exists( 'myCRED_Hook_Affiliate' ) ) :
661
 
662
  </div>
663
  <div class="hook-instance">
664
- <h3><?php _e( 'Referral Links', 'mycred' ); ?></h3>
665
  <div class="row">
666
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
667
  <div class="form-group">
668
- <label for="<?php echo $this->field_id( array( 'setup' => 'links' ) ); ?>-numeric"><input type="radio" name="<?php echo $this->field_name( array( 'setup' => 'links' ) ); ?>" id="<?php echo $this->field_id( array( 'setup' => 'links' ) ); ?>-numeric" <?php checked( $prefs['setup']['links'], 'numeric' ); ?> value="numeric" /> <?php _e( 'Assign numeric referral IDs to each user.', 'mycred' ); ?></label>
669
  <span class="description"><?php printf( '%s: %s', __( 'Example', 'mycred' ), esc_url( add_query_arg( array( $this->ref_key => 1 ), home_url( '/' ) ) ) ); ?></span>
670
  </div>
671
  </div>
672
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
673
  <div class="form-group">
674
- <label for="<?php echo $this->field_id( array( 'setup' => 'links' ) ); ?>-username"><input type="radio" name="<?php echo $this->field_name( array( 'setup' => 'links' ) ); ?>" id="<?php echo $this->field_id( array( 'setup' => 'links' ) ); ?>-username" <?php checked( $prefs['setup']['links'], 'username' ); ?> value="username" /> <?php _e( 'Assign usernames as IDs for each user.', 'mycred' ); ?></label>
675
  <span class="description"><?php printf( '%s: %s', __( 'Example', 'mycred' ), esc_url( add_query_arg( array( $this->ref_key => 'john+doe' ), home_url( '/' ) ) ) ); ?></span>
676
  </div>
677
  </div>
@@ -679,14 +682,14 @@ if ( ! class_exists( 'myCRED_Hook_Affiliate' ) ) :
679
  <div class="row">
680
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
681
  <div class="form-group">
682
- <label for="<?php echo $this->field_id( array( 'setup' => 'IP' ) ); ?>"><?php _e( 'IP Limit', 'mycred' ); ?></label>
683
  <input type="text" name="<?php echo $this->field_name( array( 'setup' => 'IP' ) ); ?>" id="<?php echo $this->field_id( array( 'setup' => 'IP' ) ); ?>" value="<?php echo absint( $prefs['setup']['IP'] ); ?>" class="form-control" />
684
  <span class="description"><?php echo $this->core->template_tags_general( __( 'The number of times each IP address grants %_plural%. Use zero for unlimited.', 'mycred' ) ); ?></span>
685
  </div>
686
  </div>
687
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
688
  <div class="form-group">
689
- <label><?php _e( 'Available Shortcodes', 'mycred' ); ?></label>
690
  <p class="form-control-static"><a href="http://codex.mycred.me/shortcodes/mycred_affiliate_link/" target="_blank">[mycred_affiliate_link]</a>, <a href="http://codex.mycred.me/shortcodes/mycred_affiliate_id/" target="_blank">[mycred_affiliate_id]</a></p>
691
  </div>
692
  </div>
@@ -695,12 +698,12 @@ if ( ! class_exists( 'myCRED_Hook_Affiliate' ) ) :
695
 
696
  <?php if ( function_exists( 'bp_is_active' ) && bp_is_active( 'xprofile' ) ) : ?>
697
  <div class="hook-instance">
698
- <h3><?php _e( 'BuddyPress Profile', 'mycred' ); ?></h3>
699
  <div class="row">
700
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
701
  <div class="form-group">
702
  <div class="checkbox">
703
- <label for="<?php echo $this->field_id( array( 'buddypress' => 'profile' ) ); ?>"><input type="checkbox" name="<?php echo $this->field_name( array( 'buddypress' => 'profile' ) ); ?>" id="<?php echo $this->field_id( array( 'buddypress' => 'profile' ) ); ?>"<?php checked( $prefs['buddypress']['profile'], 1 ); ?> value="1" /> <?php _e( 'Insert referral link in users profiles', 'mycred' ); ?></label>
704
  </div>
705
  </div>
706
  </div>
@@ -708,24 +711,24 @@ if ( ! class_exists( 'myCRED_Hook_Affiliate' ) ) :
708
  <div class="row">
709
  <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12">
710
  <div class="form-group">
711
- <label><?php _e( 'Title', 'mycred' ); ?></label><br />
712
  <input type="text" name="<?php echo $this->field_name( array( 'buddypress' => 'title' ) ); ?>" id="<?php echo $this->field_id( array( 'buddypress' => 'title' ) ); ?>" value="<?php echo esc_attr( $prefs['buddypress']['title'] ); ?>" class="form-control" />
713
- <span class="description"><?php _e( 'Leave empty to hide.', 'mycred' ); ?></span>
714
  </div>
715
  </div>
716
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
717
  <div class="form-group">
718
- <label><?php _e( 'Profile Positioning', 'mycred' ); ?></label><br />
719
  <input type="text" name="<?php echo $this->field_name( array( 'buddypress' => 'priority' ) ); ?>" id="<?php echo $this->field_id( array( 'buddypress' => 'priority' ) ); ?>" value="<?php echo absint( $prefs['buddypress']['priority'] ); ?>" class="form-control" />
720
- <span class="description"><?php _e( 'You can move around the referral link on your users profile by changing the position. Increase to move up, decrease to move down.', 'mycred' ); ?></span>
721
  </div>
722
  </div>
723
  </div>
724
  <div class="row">
725
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
726
  <div class="form-group">
727
- <label for="<?php echo $this->field_id( array( 'buddypress' => 'desc' ) ); ?>"><?php _e( 'Description', 'mycred' ); ?></label>
728
- <span class="description"><?php _e( 'Optional description to insert under the link.', 'mycred' ); ?></span>
729
  <textarea name="<?php echo $this->field_name( array( 'buddypress' => 'desc' ) ); ?>" id="<?php echo $this->field_id( array( 'buddypress' => 'desc' ) ); ?>" class="form-control" rows="5" cols="30"><?php echo esc_attr( $prefs['buddypress']['desc'] ); ?></textarea>
730
  </div>
731
  </div>
162
  * Returns the current users affiliate ID. Returns an empty
163
  * string if the user is not logged in.
164
  * @since 1.4
165
+ * @since 2.4.5 added @filter `mycred_affiliate_user_id`
166
  * @version 1.1
167
  */
168
  public function shortcode_affiliate_id( $content, $atts ) {
183
 
184
  }
185
 
186
+ $ref_id = apply_filters( 'mycred_affiliate_user_id', $user_id );
187
+
188
  return apply_filters( 'mycred_affiliate_id', $ref_id, $atts, $this );
189
 
190
  }
597
 
598
  ?>
599
  <div class="hook-instance">
600
+ <h3><?php esc_html_e( 'Referring Visitors', 'mycred' ); ?></h3>
601
  <div class="row">
602
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
603
  <div class="form-group">
607
  </div>
608
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
609
  <div class="form-group">
610
+ <label for="<?php echo $this->field_id( array( 'visit', 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
611
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'visit', 'limit' ) ), $this->field_id( array( 'visit', 'limit' ) ), $prefs['visit']['limit'] ); ?>
612
  </div>
613
  </div>
614
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
615
  <div class="form-group">
616
+ <label for="<?php echo $this->field_id( array( 'visit' => 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
617
  <input type="text" name="<?php echo $this->field_name( array( 'visit' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'visit' => 'log' ) ); ?>" value="<?php echo esc_attr( $prefs['visit']['log'] ); ?>" class="form-control" />
618
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
619
  </div>
621
  </div>
622
  </div>
623
  <div class="hook-instance">
624
+ <h3><?php esc_html_e( 'Referring Signups', 'mycred' ); ?></h3>
625
 
626
  <?php if ( get_option( 'users_can_register' ) ) : ?>
627
 
634
  </div>
635
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
636
  <div class="form-group">
637
+ <label for="<?php echo $this->field_id( array( 'signup', 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
638
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'signup', 'limit' ) ), $this->field_id( array( 'signup', 'limit' ) ), $prefs['signup']['limit'] ); ?>
639
  </div>
640
  </div>
641
  <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
642
  <div class="form-group">
643
+ <label for="<?php echo $this->field_id( array( 'signup' => 'log' ) ); ?>"><?php esc_html_e( 'Log template', 'mycred' ); ?></label>
644
  <input type="text" name="<?php echo $this->field_name( array( 'signup' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'signup' => 'log' ) ); ?>" value="<?php echo esc_attr( $prefs['signup']['log'] ); ?>" class="form-control" />
645
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ), '%user_name%' ); ?></span>
646
  </div>
664
 
665
  </div>
666
  <div class="hook-instance">
667
+ <h3><?php esc_html_e( 'Referral Links', 'mycred' ); ?></h3>
668
  <div class="row">
669
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
670
  <div class="form-group">
671
+ <label for="<?php echo $this->field_id( array( 'setup' => 'links' ) ); ?>-numeric"><input type="radio" name="<?php echo $this->field_name( array( 'setup' => 'links' ) ); ?>" id="<?php echo $this->field_id( array( 'setup' => 'links' ) ); ?>-numeric" <?php checked( $prefs['setup']['links'], 'numeric' ); ?> value="numeric" /> <?php esc_html_e( 'Assign numeric referral IDs to each user.', 'mycred' ); ?></label>
672
  <span class="description"><?php printf( '%s: %s', __( 'Example', 'mycred' ), esc_url( add_query_arg( array( $this->ref_key => 1 ), home_url( '/' ) ) ) ); ?></span>
673
  </div>
674
  </div>
675
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
676
  <div class="form-group">
677
+ <label for="<?php echo $this->field_id( array( 'setup' => 'links' ) ); ?>-username"><input type="radio" name="<?php echo $this->field_name( array( 'setup' => 'links' ) ); ?>" id="<?php echo $this->field_id( array( 'setup' => 'links' ) ); ?>-username" <?php checked( $prefs['setup']['links'], 'username' ); ?> value="username" /> <?php esc_html_e( 'Assign usernames as IDs for each user.', 'mycred' ); ?></label>
678
  <span class="description"><?php printf( '%s: %s', __( 'Example', 'mycred' ), esc_url( add_query_arg( array( $this->ref_key => 'john+doe' ), home_url( '/' ) ) ) ); ?></span>
679
  </div>
680
  </div>
682
  <div class="row">
683
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
684
  <div class="form-group">
685
+ <label for="<?php echo $this->field_id( array( 'setup' => 'IP' ) ); ?>"><?php esc_html_e( 'IP Limit', 'mycred' ); ?></label>
686
  <input type="text" name="<?php echo $this->field_name( array( 'setup' => 'IP' ) ); ?>" id="<?php echo $this->field_id( array( 'setup' => 'IP' ) ); ?>" value="<?php echo absint( $prefs['setup']['IP'] ); ?>" class="form-control" />
687
  <span class="description"><?php echo $this->core->template_tags_general( __( 'The number of times each IP address grants %_plural%. Use zero for unlimited.', 'mycred' ) ); ?></span>
688
  </div>
689
  </div>
690
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
691
  <div class="form-group">
692
+ <label><?php esc_html_e( 'Available Shortcodes', 'mycred' ); ?></label>
693
  <p class="form-control-static"><a href="http://codex.mycred.me/shortcodes/mycred_affiliate_link/" target="_blank">[mycred_affiliate_link]</a>, <a href="http://codex.mycred.me/shortcodes/mycred_affiliate_id/" target="_blank">[mycred_affiliate_id]</a></p>
694
  </div>
695
  </div>
698
 
699
  <?php if ( function_exists( 'bp_is_active' ) && bp_is_active( 'xprofile' ) ) : ?>
700
  <div class="hook-instance">
701
+ <h3><?php esc_html_e( 'BuddyPress Profile', 'mycred' ); ?></h3>
702
  <div class="row">
703
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
704
  <div class="form-group">
705
  <div class="checkbox">
706
+ <label for="<?php echo $this->field_id( array( 'buddypress' => 'profile' ) ); ?>"><input type="checkbox" name="<?php echo $this->field_name( array( 'buddypress' => 'profile' ) ); ?>" id="<?php echo $this->field_id( array( 'buddypress' => 'profile' ) ); ?>"<?php checked( $prefs['buddypress']['profile'], 1 ); ?> value="1" /> <?php esc_html_e( 'Insert referral link in users profiles', 'mycred' ); ?></label>
707
  </div>
708
  </div>
709
  </div>
711
  <div class="row">
712
  <div class="col-lg-8 col-md-6 col-sm-12 col-xs-12">
713
  <div class="form-group">
714
+ <label><?php esc_html_e( 'Title', 'mycred' ); ?></label><br />
715
  <input type="text" name="<?php echo $this->field_name( array( 'buddypress' => 'title' ) ); ?>" id="<?php echo $this->field_id( array( 'buddypress' => 'title' ) ); ?>" value="<?php echo esc_attr( $prefs['buddypress']['title'] ); ?>" class="form-control" />
716
+ <span class="description"><?php esc_html_e( 'Leave empty to hide.', 'mycred' ); ?></span>
717
  </div>
718
  </div>
719
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
720
  <div class="form-group">
721
+ <label><?php esc_html_e( 'Profile Positioning', 'mycred' ); ?></label><br />
722
  <input type="text" name="<?php echo $this->field_name( array( 'buddypress' => 'priority' ) ); ?>" id="<?php echo $this->field_id( array( 'buddypress' => 'priority' ) ); ?>" value="<?php echo absint( $prefs['buddypress']['priority'] ); ?>" class="form-control" />
723
+ <span class="description"><?php esc_html_e( 'You can move around the referral link on your users profile by changing the position. Increase to move up, decrease to move down.', 'mycred' ); ?></span>
724
  </div>
725
  </div>
726
  </div>
727
  <div class="row">
728
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
729
  <div class="form-group">
730
+ <label for="<?php echo $this->field_id( array( 'buddypress' => 'desc' ) ); ?>"><?php esc_html_e( 'Description', 'mycred' ); ?></label>
731
+ <span class="description"><?php esc_html_e( 'Optional description to insert under the link.', 'mycred' ); ?></span>
732
  <textarea name="<?php echo $this->field_name( array( 'buddypress' => 'desc' ) ); ?>" id="<?php echo $this->field_id( array( 'buddypress' => 'desc' ) ); ?>" class="form-control" rows="5" cols="30"><?php echo esc_attr( $prefs['buddypress']['desc'] ); ?></textarea>
733
  </div>
734
  </div>
includes/hooks/mycred-hook-registrations.php CHANGED
@@ -83,8 +83,8 @@ if ( ! class_exists( 'myCRED_Hook_Registration' ) ) :
83
  </div>
84
  <div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
85
  <div class="form-group">
86
- <label for="<?php echo $this->field_id( 'log' ); ?>"><?php _e( 'Log Template', 'mycred' ); ?></label>
87
- <input type="text" name="<?php echo $this->field_name( 'log' ); ?>" id="<?php echo $this->field_id( 'log' ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['log'] ); ?>" class="form-control" />
88
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'user' ) ); ?></span>
89
  </div>
90
  </div>
83
  </div>
84
  <div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
85
  <div class="form-group">
86
+ <label for="<?php echo $this->field_id( 'log' ); ?>"><?php esc_html_e( 'Log Template', 'mycred' ); ?></label>
87
+ <input type="text" name="<?php echo $this->field_name( 'log' ); ?>" id="<?php echo $this->field_id( 'log' ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['log'] ); ?>" class="form-control" />
88
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'user' ) ); ?></span>
89
  </div>
90
  </div>
includes/hooks/mycred-hook-site-visits.php CHANGED
@@ -98,8 +98,8 @@ if ( ! class_exists( 'myCRED_Hook_Site_Visits' ) ) :
98
  </div>
99
  <div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
100
  <div class="form-group">
101
- <label for="<?php echo $this->field_id( 'log' ); ?>"><?php _e( 'Log Template', 'mycred' ); ?></label>
102
- <input type="text" name="<?php echo $this->field_name( 'log' ); ?>" id="<?php echo $this->field_id( 'log' ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['log'] ); ?>" class="form-control" />
103
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
104
  </div>
105
  </div>
98
  </div>
99
  <div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
100
  <div class="form-group">
101
+ <label for="<?php echo $this->field_id( 'log' ); ?>"><?php esc_html_e( 'Log Template', 'mycred' ); ?></label>
102
+ <input type="text" name="<?php echo $this->field_name( 'log' ); ?>" id="<?php echo $this->field_id( 'log' ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['log'] ); ?>" class="form-control" />
103
  <span class="description"><?php echo $this->available_template_tags( array( 'general' ) ); ?></span>
104
  </div>
105
  </div>
includes/hooks/mycred-hook-view-content.php CHANGED
@@ -143,29 +143,29 @@ if ( ! class_exists( 'myCRED_Hook_View_Contents' ) ) :
143
 
144
  ?>
145
  <div class="hook-instance">
146
- <h3><?php _e( 'Viewing Posts', 'mycred' ); ?></h3>
147
  <div class="row">
148
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
149
  <div class="form-group">
150
- <label for="<?php echo $this->field_id( array( 'post' => 'creds' ) ); ?>"><?php _e( 'Member', 'mycred' ); ?></label>
151
  <input type="text" name="<?php echo $this->field_name( array( 'post' => 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'post' => 'creds' ) ); ?>" value="<?php echo $this->core->number( $prefs['post']['creds'] ); ?>" class="form-control" />
152
  </div>
153
  </div>
154
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
155
  <div class="form-group">
156
- <label for="<?php echo $this->field_id( array( 'post', 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
157
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'post', 'limit' ) ), $this->field_id( array( 'post', 'limit' ) ), $prefs['post']['limit'] ); ?>
158
  </div>
159
  </div>
160
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
161
  <div class="form-group">
162
- <label for="<?php echo $this->field_id( array( 'post' => 'acreds' ) ); ?>"><?php _e( 'Content Author', 'mycred' ); ?></label>
163
  <input type="text" name="<?php echo $this->field_name( array( 'post' => 'acreds' ) ); ?>" id="<?php echo $this->field_id( array( 'post' => 'acreds' ) ); ?>" value="<?php echo $this->core->number( $prefs['post']['acreds'] ); ?>" class="form-control" />
164
  </div>
165
  </div>
166
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
167
  <div class="form-group">
168
- <label for="<?php echo $this->field_id( array( 'post', 'alimit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
169
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'post', 'alimit' ) ), $this->field_id( array( 'post', 'alimit' ) ), $prefs['post']['alimit'] ); ?>
170
  </div>
171
  </div>
@@ -173,44 +173,44 @@ if ( ! class_exists( 'myCRED_Hook_View_Contents' ) ) :
173
  <div class="row">
174
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
175
  <div class="form-group">
176
- <label for="<?php echo $this->field_id( array( 'post' => 'log' ) ); ?>"><?php _e( 'Member Log Template', 'mycred' ); ?></label>
177
- <input type="text" name="<?php echo $this->field_name( array( 'post' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'post' => 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['post']['log'] ); ?>" class="form-control" />
178
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
179
  </div>
180
  </div>
181
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
182
  <div class="form-group">
183
- <label for="<?php echo $this->field_id( array( 'post' => 'alog' ) ); ?>"><?php _e( 'Content Author Log Template', 'mycred' ); ?></label>
184
- <input type="text" name="<?php echo $this->field_name( array( 'post' => 'alog' ) ); ?>" id="<?php echo $this->field_id( array( 'post' => 'alog' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['post']['alog'] ); ?>" class="form-control" />
185
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
186
  </div>
187
  </div>
188
  </div>
189
  </div>
190
  <div class="hook-instance">
191
- <h3><?php _e( 'Viewing Pages', 'mycred' ); ?></h3>
192
  <div class="row">
193
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
194
  <div class="form-group">
195
- <label for="<?php echo $this->field_id( array( 'page' => 'creds' ) ); ?>"><?php _e( 'Member', 'mycred' ); ?></label>
196
  <input type="text" name="<?php echo $this->field_name( array( 'page' => 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'page' => 'creds' ) ); ?>" value="<?php echo $this->core->number( $prefs['page']['creds'] ); ?>" class="form-control" />
197
  </div>
198
  </div>
199
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
200
  <div class="form-group">
201
- <label for="<?php echo $this->field_id( array( 'page', 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
202
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'page', 'limit' ) ), $this->field_id( array( 'page', 'limit' ) ), $prefs['page']['limit'] ); ?>
203
  </div>
204
  </div>
205
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
206
  <div class="form-group">
207
- <label for="<?php echo $this->field_id( array( 'page' => 'acreds' ) ); ?>"><?php _e( 'Content Author', 'mycred' ); ?></label>
208
  <input type="text" name="<?php echo $this->field_name( array( 'page' => 'acreds' ) ); ?>" id="<?php echo $this->field_id( array( 'page' => 'acreds' ) ); ?>" value="<?php echo $this->core->number( $prefs['page']['acreds'] ); ?>" class="form-control" />
209
  </div>
210
  </div>
211
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
212
  <div class="form-group">
213
- <label for="<?php echo $this->field_id( array( 'page', 'alimit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
214
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'page', 'alimit' ) ), $this->field_id( array( 'page', 'alimit' ) ), $prefs['page']['alimit'] ); ?>
215
  </div>
216
  </div>
@@ -218,15 +218,15 @@ if ( ! class_exists( 'myCRED_Hook_View_Contents' ) ) :
218
  <div class="row">
219
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
220
  <div class="form-group">
221
- <label for="<?php echo $this->field_id( array( 'page' => 'log' ) ); ?>"><?php _e( 'Member Log Template', 'mycred' ); ?></label>
222
- <input type="text" name="<?php echo $this->field_name( array( 'page' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'page' => 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['page']['log'] ); ?>" class="form-control" />
223
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
224
  </div>
225
  </div>
226
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
227
  <div class="form-group">
228
- <label for="<?php echo $this->field_id( array( 'page' => 'alog' ) ); ?>"><?php _e( 'Content Author Log Template', 'mycred' ); ?></label>
229
- <input type="text" name="<?php echo $this->field_name( array( 'page' => 'alog' ) ); ?>" id="<?php echo $this->field_id( array( 'page' => 'alog' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['page']['alog'] ); ?>" class="form-control" />
230
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
231
  </div>
232
  </div>
@@ -283,25 +283,25 @@ if ( ! class_exists( 'myCRED_Hook_View_Contents' ) ) :
283
  <div class="row">
284
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
285
  <div class="form-group">
286
- <label for="<?php echo $this->field_id( array( $post_type->name => 'creds' ) ); ?>"><?php _e( 'Member', 'mycred' ); ?></label>
287
  <input type="text" name="<?php echo $this->field_name( array( $post_type->name => 'creds' ) ); ?>" id="<?php echo $this->field_id( array( $post_type->name => 'creds' ) ); ?>" value="<?php echo $this->core->number( $_creds ); ?>" class="form-control" />
288
  </div>
289
  </div>
290
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
291
  <div class="form-group">
292
- <label for="<?php echo $this->field_id( array( $post_type->name, 'limit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
293
  <?php echo $this->hook_limit_setting( $this->field_name( array( $post_type->name, 'limit' ) ), $this->field_id( array( $post_type->name, 'limit' ) ), $limit ); ?>
294
  </div>
295
  </div>
296
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
297
  <div class="form-group">
298
- <label for="<?php echo $this->field_id( array( $post_type->name => 'acreds' ) ); ?>"><?php _e( 'Content Author', 'mycred' ); ?></label>
299
  <input type="text" name="<?php echo $this->field_name( array( $post_type->name => 'acreds' ) ); ?>" id="<?php echo $this->field_id( array( $post_type->name => 'acreds' ) ); ?>" value="<?php echo $this->core->number( $_acreds ); ?>" class="form-control" />
300
  </div>
301
  </div>
302
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
303
  <div class="form-group">
304
- <label for="<?php echo $this->field_id( array( $post_type->name, 'alimit' ) ); ?>"><?php _e( 'Limit', 'mycred' ); ?></label>
305
  <?php echo $this->hook_limit_setting( $this->field_name( array( $post_type->name, 'alimit' ) ), $this->field_id( array( $post_type->name, 'alimit' ) ), $alimit ); ?>
306
  </div>
307
  </div>
@@ -309,15 +309,15 @@ if ( ! class_exists( 'myCRED_Hook_View_Contents' ) ) :
309
  <div class="row">
310
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
311
  <div class="form-group">
312
- <label for="<?php echo $this->field_id( array( $post_type->name => 'log' ) ); ?>"><?php _e( 'Member', 'mycred' ); ?></label>
313
- <input type="text" name="<?php echo $this->field_name( array( $post_type->name => 'log' ) ); ?>" id="<?php echo $this->field_id( array( $post_type->name => 'log' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $_log ); ?>" class="form-control" />
314
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
315
  </div>
316
  </div>
317
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
318
  <div class="form-group">
319
- <label for="<?php echo $this->field_id( array( $post_type->name => 'alog' ) ); ?>"><?php _e( 'Content Author', 'mycred' ); ?></label>
320
- <input type="text" name="<?php echo $this->field_name( array( $post_type->name => 'alog' ) ); ?>" id="<?php echo $this->field_id( array( $post_type->name => 'alog' ) ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $_alog ); ?>" class="form-control" />
321
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
322
  </div>
323
  </div>
143
 
144
  ?>
145
  <div class="hook-instance">
146
+ <h3><?php esc_html_e( 'Viewing Posts', 'mycred' ); ?></h3>
147
  <div class="row">
148
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
149
  <div class="form-group">
150
+ <label for="<?php echo $this->field_id( array( 'post' => 'creds' ) ); ?>"><?php esc_html_e( 'Member', 'mycred' ); ?></label>
151
  <input type="text" name="<?php echo $this->field_name( array( 'post' => 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'post' => 'creds' ) ); ?>" value="<?php echo $this->core->number( $prefs['post']['creds'] ); ?>" class="form-control" />
152
  </div>
153
  </div>
154
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
155
  <div class="form-group">
156
+ <label for="<?php echo $this->field_id( array( 'post', 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
157
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'post', 'limit' ) ), $this->field_id( array( 'post', 'limit' ) ), $prefs['post']['limit'] ); ?>
158
  </div>
159
  </div>
160
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
161
  <div class="form-group">
162
+ <label for="<?php echo $this->field_id( array( 'post' => 'acreds' ) ); ?>"><?php esc_html_e( 'Content Author', 'mycred' ); ?></label>
163
  <input type="text" name="<?php echo $this->field_name( array( 'post' => 'acreds' ) ); ?>" id="<?php echo $this->field_id( array( 'post' => 'acreds' ) ); ?>" value="<?php echo $this->core->number( $prefs['post']['acreds'] ); ?>" class="form-control" />
164
  </div>
165
  </div>
166
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
167
  <div class="form-group">
168
+ <label for="<?php echo $this->field_id( array( 'post', 'alimit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
169
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'post', 'alimit' ) ), $this->field_id( array( 'post', 'alimit' ) ), $prefs['post']['alimit'] ); ?>
170
  </div>
171
  </div>
173
  <div class="row">
174
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
175
  <div class="form-group">
176
+ <label for="<?php echo $this->field_id( array( 'post' => 'log' ) ); ?>"><?php esc_html_e( 'Member Log Template', 'mycred' ); ?></label>
177
+ <input type="text" name="<?php echo $this->field_name( array( 'post' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'post' => 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['post']['log'] ); ?>" class="form-control" />
178
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
179
  </div>
180
  </div>
181
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
182
  <div class="form-group">
183
+ <label for="<?php echo $this->field_id( array( 'post' => 'alog' ) ); ?>"><?php esc_html_e( 'Content Author Log Template', 'mycred' ); ?></label>
184
+ <input type="text" name="<?php echo $this->field_name( array( 'post' => 'alog' ) ); ?>" id="<?php echo $this->field_id( array( 'post' => 'alog' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['post']['alog'] ); ?>" class="form-control" />
185
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
186
  </div>
187
  </div>
188
  </div>
189
  </div>
190
  <div class="hook-instance">
191
+ <h3><?php esc_html_e( 'Viewing Pages', 'mycred' ); ?></h3>
192
  <div class="row">
193
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
194
  <div class="form-group">
195
+ <label for="<?php echo $this->field_id( array( 'page' => 'creds' ) ); ?>"><?php esc_html_e( 'Member', 'mycred' ); ?></label>
196
  <input type="text" name="<?php echo $this->field_name( array( 'page' => 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'page' => 'creds' ) ); ?>" value="<?php echo $this->core->number( $prefs['page']['creds'] ); ?>" class="form-control" />
197
  </div>
198
  </div>
199
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
200
  <div class="form-group">
201
+ <label for="<?php echo $this->field_id( array( 'page', 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
202
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'page', 'limit' ) ), $this->field_id( array( 'page', 'limit' ) ), $prefs['page']['limit'] ); ?>
203
  </div>
204
  </div>
205
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
206
  <div class="form-group">
207
+ <label for="<?php echo $this->field_id( array( 'page' => 'acreds' ) ); ?>"><?php esc_html_e( 'Content Author', 'mycred' ); ?></label>
208
  <input type="text" name="<?php echo $this->field_name( array( 'page' => 'acreds' ) ); ?>" id="<?php echo $this->field_id( array( 'page' => 'acreds' ) ); ?>" value="<?php echo $this->core->number( $prefs['page']['acreds'] ); ?>" class="form-control" />
209
  </div>
210
  </div>
211
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
212
  <div class="form-group">
213
+ <label for="<?php echo $this->field_id( array( 'page', 'alimit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
214
  <?php echo $this->hook_limit_setting( $this->field_name( array( 'page', 'alimit' ) ), $this->field_id( array( 'page', 'alimit' ) ), $prefs['page']['alimit'] ); ?>
215
  </div>
216
  </div>
218
  <div class="row">
219
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
220
  <div class="form-group">
221
+ <label for="<?php echo $this->field_id( array( 'page' => 'log' ) ); ?>"><?php esc_html_e( 'Member Log Template', 'mycred' ); ?></label>
222
+ <input type="text" name="<?php echo $this->field_name( array( 'page' => 'log' ) ); ?>" id="<?php echo $this->field_id( array( 'page' => 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['page']['log'] ); ?>" class="form-control" />
223
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
224
  </div>
225
  </div>
226
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
227
  <div class="form-group">
228
+ <label for="<?php echo $this->field_id( array( 'page' => 'alog' ) ); ?>"><?php esc_html_e( 'Content Author Log Template', 'mycred' ); ?></label>
229
+ <input type="text" name="<?php echo $this->field_name( array( 'page' => 'alog' ) ); ?>" id="<?php echo $this->field_id( array( 'page' => 'alog' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['page']['alog'] ); ?>" class="form-control" />
230
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
231
  </div>
232
  </div>
283
  <div class="row">
284
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
285
  <div class="form-group">
286
+ <label for="<?php echo $this->field_id( array( $post_type->name => 'creds' ) ); ?>"><?php esc_html_e( 'Member', 'mycred' ); ?></label>
287
  <input type="text" name="<?php echo $this->field_name( array( $post_type->name => 'creds' ) ); ?>" id="<?php echo $this->field_id( array( $post_type->name => 'creds' ) ); ?>" value="<?php echo $this->core->number( $_creds ); ?>" class="form-control" />
288
  </div>
289
  </div>
290
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
291
  <div class="form-group">
292
+ <label for="<?php echo $this->field_id( array( $post_type->name, 'limit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
293
  <?php echo $this->hook_limit_setting( $this->field_name( array( $post_type->name, 'limit' ) ), $this->field_id( array( $post_type->name, 'limit' ) ), $limit ); ?>
294
  </div>
295
  </div>
296
  <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
297
  <div class="form-group">
298
+ <label for="<?php echo $this->field_id( array( $post_type->name => 'acreds' ) ); ?>"><?php esc_html_e( 'Content Author', 'mycred' ); ?></label>
299
  <input type="text" name="<?php echo $this->field_name( array( $post_type->name => 'acreds' ) ); ?>" id="<?php echo $this->field_id( array( $post_type->name => 'acreds' ) ); ?>" value="<?php echo $this->core->number( $_acreds ); ?>" class="form-control" />
300
  </div>
301
  </div>
302
  <div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
303
  <div class="form-group">
304
+ <label for="<?php echo $this->field_id( array( $post_type->name, 'alimit' ) ); ?>"><?php esc_html_e( 'Limit', 'mycred' ); ?></label>
305
  <?php echo $this->hook_limit_setting( $this->field_name( array( $post_type->name, 'alimit' ) ), $this->field_id( array( $post_type->name, 'alimit' ) ), $alimit ); ?>
306
  </div>
307
  </div>
309
  <div class="row">
310
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
311
  <div class="form-group">
312
+ <label for="<?php echo $this->field_id( array( $post_type->name => 'log' ) ); ?>"><?php esc_html_e( 'Member', 'mycred' ); ?></label>
313
+ <input type="text" name="<?php echo $this->field_name( array( $post_type->name => 'log' ) ); ?>" id="<?php echo $this->field_id( array( $post_type->name => 'log' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $_log ); ?>" class="form-control" />
314
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
315
  </div>
316
  </div>
317
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
318
  <div class="form-group">
319
+ <label for="<?php echo $this->field_id( array( $post_type->name => 'alog' ) ); ?>"><?php esc_html_e( 'Content Author', 'mycred' ); ?></label>
320
+ <input type="text" name="<?php echo $this->field_name( array( $post_type->name => 'alog' ) ); ?>" id="<?php echo $this->field_id( array( $post_type->name => 'alog' ) ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $_alog ); ?>" class="form-control" />
321
  <span class="description"><?php echo $this->available_template_tags( array( 'general', 'post' ) ); ?></span>
322
  </div>
323
  </div>
includes/hooks/mycred-hook-watching-video.php CHANGED
@@ -327,20 +327,20 @@ if ( ! class_exists( 'myCRED_Hook_Video_Views' ) ) :
327
  </div>
328
  <div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
329
  <div class="form-group">
330
- <label for="<?php echo $this->field_id( 'log' ); ?>"><?php _e( 'Log Template', 'mycred' ); ?></label>
331
- <input type="text" name="<?php echo $this->field_name( 'log' ); ?>" id="<?php echo $this->field_id( 'log' ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['log'] ); ?>" class="form-control" />
332
  </div>
333
  </div>
334
  </div>
335
  <div class="row">
336
  <div class="col-lg-7 col-md-6 col-sm-12 col-xs-12">
337
  <div class="form-group">
338
- <label for="<?php echo $this->field_id( array( 'logic' => 'play' ) ); ?>"><?php _e( 'Award Logic', 'mycred' ); ?></label>
339
  <div class="checkbox">
340
- <label for="<?php echo $this->field_id( array( 'logic' => 'play' ) ); ?>"><input type="radio" name="<?php echo $this->field_name( 'logic' ); ?>" id="<?php echo $this->field_id( array( 'logic' => 'play' ) ); ?>"<?php checked( $prefs['logic'], 'play' ); ?> value="play" class="toggle-hook-option" /> <?php _e( 'Play - As soon as video starts playing.', 'mycred' ); ?></label>
341
  </div>
342
  <div class="checkbox">
343
- <label for="<?php echo $this->field_id( array( 'logic' => 'full' ) ); ?>"><input type="radio" name="<?php echo $this->field_name( 'logic' ); ?>" id="<?php echo $this->field_id( array( 'logic' => 'full' ) ); ?>"<?php checked( $prefs['logic'], 'full' ); ?> value="full" class="toggle-hook-option" /> <?php _e( 'Full - First when the entire video has played.', 'mycred' ); ?></label>
344
  </div>
345
  <div class="checkbox">
346
  <label for="<?php echo $this->field_id( array( 'logic' => 'interval' ) ); ?>"><input type="radio" name="<?php echo $this->field_name( 'logic' ); ?>" id="<?php echo $this->field_id( array( 'logic' => 'interval' ) ); ?>"<?php checked( $prefs['logic'], 'interval' ); ?> value="interval" class="toggle-hook-option" /> <?php echo $this->core->template_tags_general( __( 'Interval - For each x number of seconds watched.', 'mycred' ) ); ?></label>
@@ -350,16 +350,16 @@ if ( ! class_exists( 'myCRED_Hook_Video_Views' ) ) :
350
  <div class="col-lg-5 col-md-6 col-sm-12 col-xs-12">
351
  <div id="<?php echo $this->field_id( array( 'logic-option-interval' ) ); ?>"<?php if ( $prefs['logic'] != 'interval' ) echo ' style="display: none;"';?>>
352
  <div class="form-group">
353
- <label for="<?php echo $this->field_id( 'interval' ); ?>"><?php _e( 'Intervals', 'mycred' ); ?></label>
354
- <input type="text" name="<?php echo $this->field_name( 'interval' ); ?>" id="<?php echo $this->field_id( 'interval' ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['interval'] ); ?>" class="form-control" />
355
  <span class="description"><?php printf( __( 'The number of seconds a user must watch in order to get %s.', 'mycred' ), $this->core->plural() ); ?></span>
356
  </div>
357
  </div>
358
  <div id="<?php echo $this->field_id( array( 'logic-option-full' ) ); ?>"<?php if ( $prefs['logic'] != 'full' ) echo ' style="display: none;"';?>>
359
  <div class="form-group">
360
- <label for="<?php echo $this->field_id( 'leniency' ); ?>"><?php _e( 'Leniency', 'mycred' ); ?></label>
361
- <input type="text" name="<?php echo $this->field_name( 'leniency' ); ?>" id="<?php echo $this->field_id( 'leniency' ); ?>" placeholder="<?php _e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['leniency'] ); ?>" class="form-control" />
362
- <span class="description"><?php _e( 'Do not set this value to zero! A lot of thing can happen while a user watches a movie and sometimes a few seconds can drop of the counter due to buffering or play back errors.', 'mycred' ); ?></span>
363
  </div>
364
  </div>
365
  </div>
@@ -367,7 +367,7 @@ if ( ! class_exists( 'myCRED_Hook_Video_Views' ) ) :
367
  <div class="row">
368
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
369
  <div class="form-group">
370
- <label><?php _e( 'Available Shortcode', 'mycred' ); ?></label>
371
  <p class="form-control-static"><a href="http://codex.mycred.me/shortcodes/mycred_video/" target="_blank">[mycred_video]</a></p>
372
  </div>
373
  </div>
327
  </div>
328
  <div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
329
  <div class="form-group">
330
+ <label for="<?php echo $this->field_id( 'log' ); ?>"><?php esc_html_e( 'Log Template', 'mycred' ); ?></label>
331
+ <input type="text" name="<?php echo $this->field_name( 'log' ); ?>" id="<?php echo $this->field_id( 'log' ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['log'] ); ?>" class="form-control" />
332
  </div>
333
  </div>
334
  </div>
335
  <div class="row">
336
  <div class="col-lg-7 col-md-6 col-sm-12 col-xs-12">
337
  <div class="form-group">
338
+ <label for="<?php echo $this->field_id( array( 'logic' => 'play' ) ); ?>"><?php esc_html_e( 'Award Logic', 'mycred' ); ?></label>
339
  <div class="checkbox">
340
+ <label for="<?php echo $this->field_id( array( 'logic' => 'play' ) ); ?>"><input type="radio" name="<?php echo $this->field_name( 'logic' ); ?>" id="<?php echo $this->field_id( array( 'logic' => 'play' ) ); ?>"<?php checked( $prefs['logic'], 'play' ); ?> value="play" class="toggle-hook-option" /> <?php esc_html_e( 'Play - As soon as video starts playing.', 'mycred' ); ?></label>
341
  </div>
342
  <div class="checkbox">
343
+ <label for="<?php echo $this->field_id( array( 'logic' => 'full' ) ); ?>"><input type="radio" name="<?php echo $this->field_name( 'logic' ); ?>" id="<?php echo $this->field_id( array( 'logic' => 'full' ) ); ?>"<?php checked( $prefs['logic'], 'full' ); ?> value="full" class="toggle-hook-option" /> <?php esc_html_e( 'Full - First when the entire video has played.', 'mycred' ); ?></label>
344
  </div>
345
  <div class="checkbox">
346
  <label for="<?php echo $this->field_id( array( 'logic' => 'interval' ) ); ?>"><input type="radio" name="<?php echo $this->field_name( 'logic' ); ?>" id="<?php echo $this->field_id( array( 'logic' => 'interval' ) ); ?>"<?php checked( $prefs['logic'], 'interval' ); ?> value="interval" class="toggle-hook-option" /> <?php echo $this->core->template_tags_general( __( 'Interval - For each x number of seconds watched.', 'mycred' ) ); ?></label>
350
  <div class="col-lg-5 col-md-6 col-sm-12 col-xs-12">
351
  <div id="<?php echo $this->field_id( array( 'logic-option-interval' ) ); ?>"<?php if ( $prefs['logic'] != 'interval' ) echo ' style="display: none;"';?>>
352
  <div class="form-group">
353
+ <label for="<?php echo $this->field_id( 'interval' ); ?>"><?php esc_html_e( 'Intervals', 'mycred' ); ?></label>
354
+ <input type="text" name="<?php echo $this->field_name( 'interval' ); ?>" id="<?php echo $this->field_id( 'interval' ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['interval'] ); ?>" class="form-control" />
355
  <span class="description"><?php printf( __( 'The number of seconds a user must watch in order to get %s.', 'mycred' ), $this->core->plural() ); ?></span>
356
  </div>
357
  </div>
358
  <div id="<?php echo $this->field_id( array( 'logic-option-full' ) ); ?>"<?php if ( $prefs['logic'] != 'full' ) echo ' style="display: none;"';?>>
359
  <div class="form-group">
360
+ <label for="<?php echo $this->field_id( 'leniency' ); ?>"><?php esc_html_e( 'Leniency', 'mycred' ); ?></label>
361
+ <input type="text" name="<?php echo $this->field_name( 'leniency' ); ?>" id="<?php echo $this->field_id( 'leniency' ); ?>" placeholder="<?php esc_attr_e( 'required', 'mycred' ); ?>" value="<?php echo esc_attr( $prefs['leniency'] ); ?>" class="form-control" />
362
+ <span class="description"><?php esc_html_e( 'Do not set this value to zero! A lot of thing can happen while a user watches a movie and sometimes a few seconds can drop of the counter due to buffering or play back errors.', 'mycred' ); ?></span>
363
  </div>
364
  </div>
365
  </div>
367
  <div class="row">
368
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
369
  <div class="form-group">
370
+ <label><?php esc_html_e( 'Available Shortcode', 'mycred' ); ?></label>
371
  <p class="form-control-static"><a href="http://codex.mycred.me/shortcodes/mycred_video/" target="_blank">[mycred_video]</a></p>
372
  </div>
373
  </div>
includes/importers/mycred-balances.php CHANGED
@@ -285,7 +285,7 @@ if ( ! class_exists( 'myCRED_Importer_Balances' ) ) :
285
  <tbody>
286
  <tr>
287
  <th>
288
- <label for="upload"><?php _e( 'Choose a file from your computer:', 'mycred' ); ?></label>
289
  </th>
290
  <td>
291
  <input type="file" id="upload" name="import" size="25" />
@@ -296,7 +296,7 @@ if ( ! class_exists( 'myCRED_Importer_Balances' ) ) :
296
  </tr>
297
  <tr>
298
  <th>
299
- <label for="file_url"><?php _e( 'OR enter path to file:', 'mycred' ); ?></label>
300
  </th>
301
  <td>
302
  <?php echo ABSPATH . ' '; ?><input type="text" id="file_url" name="file_url" size="25" />
@@ -304,7 +304,7 @@ if ( ! class_exists( 'myCRED_Importer_Balances' ) ) :
304
  </tr>
305
  <tr>
306
  <th>
307
- <label for="delimiter"><?php _e( 'Delimiter', 'mycred' ); ?></label>
308
  </th>
309
  <td>
310
  <input type="text" name="delimiter" id="delimiter" placeholder="," size="2" />
@@ -312,19 +312,19 @@ if ( ! class_exists( 'myCRED_Importer_Balances' ) ) :
312
  </tr>
313
  <tr>
314
  <th>
315
- <label><?php _e( 'Method', 'mycred' ); ?></label>
316
  </th>
317
  <td>
318
  <select name="method">
319
- <option value=""><?php _e( 'Replace current balances with the amount in this CSV file', 'mycred' ); ?></option>
320
- <option value="add"><?php _e( 'Adjust current balances according to the amount in this CSV file', 'mycred' ); ?></option>
321
  </select>
322
  </td>
323
  </tr>
324
  </tbody>
325
  </table>
326
  <p class="submit">
327
- <input type="submit" class="button button-primary" value="<?php _e( 'Import', 'mycred' ); ?>" />
328
  </p>
329
  </form>
330
  <?php
285
  <tbody>
286
  <tr>
287
  <th>
288
+ <label for="upload"><?php esc_html_e( 'Choose a file from your computer:', 'mycred' ); ?></label>
289
  </th>
290
  <td>
291
  <input type="file" id="upload" name="import" size="25" />
296
  </tr>
297
  <tr>
298
  <th>
299
+ <label for="file_url"><?php esc_html_e( 'OR enter path to file:', 'mycred' ); ?></label>
300
  </th>
301
  <td>
302
  <?php echo ABSPATH . ' '; ?><input type="text" id="file_url" name="file_url" size="25" />
304
  </tr>
305
  <tr>
306
  <th>
307
+ <label for="delimiter"><?php esc_html_e( 'Delimiter', 'mycred' ); ?></label>
308
  </th>
309
  <td>
310
  <input type="text" name="delimiter" id="delimiter" placeholder="," size="2" />
312
  </tr>
313
  <tr>
314
  <th>
315
+ <label><?php esc_html_e( 'Method', 'mycred' ); ?></label>
316
  </th>
317
  <td>
318
  <select name="method">
319
+ <option value=""><?php esc_html_e( 'Replace current balances with the amount in this CSV file', 'mycred' ); ?></option>
320
+ <option value="add"><?php esc_html_e( 'Adjust current balances according to the amount in this CSV file', 'mycred' ); ?></option>
321
  </select>
322
  </td>
323
  </tr>
324
  </tbody>
325
  </table>
326
  <p class="submit">
327
+ <input type="submit" class="button button-primary" value="<?php esc_attr_e( 'Import', 'mycred' ); ?>" />
328
  </p>
329
  </form>
330
  <?php
includes/importers/mycred-cubepoints.php CHANGED
@@ -407,20 +407,20 @@ if ( ! class_exists( 'myCRED_Importer_CubePoints' ) ) :
407
  <tbody>
408
  <tr>
409
  <th>
410
- <label for="import-action"><?php _e( 'Import', 'mycred' ); ?></label>
411
  </th>
412
  <td>
413
  <select name="action" id="import-action">
414
- <option value=""><?php _e( 'Select what to import', 'mycred' ); ?></option>
415
- <option value="log"><?php _e( 'Log Entries Only', 'mycred' ); ?></option>
416
- <option value="balance"><?php _e( 'CubePoints Balances Only', 'mycred' ); ?></option>
417
- <option value="both"><?php _e( 'Log Entries and Balances', 'mycred' ); ?></option>
418
  </select>
419
  </td>
420
  </tr>
421
  <tr>
422
  <th>
423
- <label for="mycred-type"><?php _e( 'Point Type', 'mycred' ); ?></label>
424
  </th>
425
  <td>
426
 
@@ -431,7 +431,7 @@ if ( ! class_exists( 'myCRED_Importer_CubePoints' ) ) :
431
  </tbody>
432
  </table>
433
  <p class="submit">
434
- <input type="submit" class="button button-primary" value="<?php _e( 'Import', 'mycred' ); ?>" />
435
  </p>
436
  </form>
437
  <?php
407
  <tbody>
408
  <tr>
409
  <th>
410
+ <label for="import-action"><?php esc_html_e( 'Import', 'mycred' ); ?></label>
411
  </th>
412
  <td>
413
  <select name="action" id="import-action">
414
+ <option value=""><?php esc_html_e( 'Select what to import', 'mycred' ); ?></option>
415
+ <option value="log"><?php esc_html_e( 'Log Entries Only', 'mycred' ); ?></option>
416
+ <option value="balance"><?php esc_html_e( 'CubePoints Balances Only', 'mycred' ); ?></option>
417
+ <option value="both"><?php esc_html_e( 'Log Entries and Balances', 'mycred' ); ?></option>
418
  </select>
419
  </td>
420
  </tr>
421
  <tr>
422
  <th>
423
+ <label for="mycred-type"><?php esc_html_e( 'Point Type', 'mycred' ); ?></label>
424
  </th>
425
  <td>
426
 
431
  </tbody>
432
  </table>
433
  <p class="submit">
434
+ <input type="submit" class="button button-primary" value="<?php esc_attr_e( 'Import', 'mycred' ); ?>" />
435
  </p>
436
  </form>
437
  <?php
includes/importers/mycred-log-entries.php CHANGED
@@ -281,7 +281,7 @@ if ( ! class_exists( 'myCRED_Importer_Log_Entires' ) ) :
281
  <tbody>
282
  <tr>
283
  <th>
284
- <label for="upload"><?php _e( 'Choose a file from your computer:', 'mycred' ); ?></label>
285
  </th>
286
  <td>
287
  <input type="file" id="upload" name="import" size="25" />
@@ -292,7 +292,7 @@ if ( ! class_exists( 'myCRED_Importer_Log_Entires' ) ) :
292
  </tr>
293
  <tr>
294
  <th>
295
- <label for="file_url"><?php _e( 'OR enter path to file:', 'mycred' ); ?></label>
296
  </th>
297
  <td>
298
  <?php echo ABSPATH . ' '; ?><input type="text" id="file_url" name="file_url" size="25" />
@@ -300,7 +300,7 @@ if ( ! class_exists( 'myCRED_Importer_Log_Entires' ) ) :
300
  </tr>
301
  <tr>
302
  <th>
303
- <label for="delimiter"><?php _e( 'Delimiter', 'mycred' ); ?></label>
304
  </th>
305
  <td>
306
  <input type="text" name="delimiter" id="delimiter" placeholder="," size="2" />
@@ -309,7 +309,7 @@ if ( ! class_exists( 'myCRED_Importer_Log_Entires' ) ) :
309
  </tbody>
310
  </table>
311
  <p class="submit">
312
- <input type="submit" class="button button-primary" value="<?php _e( 'Import', 'mycred' ); ?>" />
313
  </p>
314
  </form>
315
  <?php
281
  <tbody>
282
  <tr>
283
  <th>
284
+ <label for="upload"><?php esc_html_e( 'Choose a file from your computer:', 'mycred' ); ?></label>
285
  </th>
286
  <td>
287
  <input type="file" id="upload" name="import" size="25" />
292
  </tr>
293
  <tr>
294
  <th>
295
+ <label for="file_url"><?php esc_html_e( 'OR enter path to file:', 'mycred' ); ?></label>
296
  </th>
297
  <td>
298
  <?php echo ABSPATH . ' '; ?><input type="text" id="file_url" name="file_url" size="25" />
300
  </tr>
301
  <tr>
302
  <th>
303
+ <label for="delimiter"><?php esc_html_e( 'Delimiter', 'mycred' ); ?></label>
304
  </th>
305
  <td>
306
  <input type="text" name="delimiter" id="delimiter" placeholder="," size="2" />
309
  </tbody>
310
  </table>
311
  <p class="submit">
312
+ <input type="submit" class="button button-primary" value="<?php esc_attr_e( 'Import', 'mycred' ); ?>" />
313
  </p>
314
  </form>
315
  <?php
includes/mycred-overview.php CHANGED
@@ -115,14 +115,14 @@ div.overview-module-wrap div.mycred-type .overview .section strong { padding: 0
115
 
116
  <?php do_action( 'mycred_overview_total_' . $point_type, $point_type, $total, $data ); ?>
117
 
118
- <a href="<?php echo $url; ?>" title="<?php _e( 'Total amount in circulation', 'mycred' ); ?>"><?php echo $mycred->format_creds( $total ); ?></a>
119
 
120
  </div>
121
  <div class="overview clear">
122
  <div class="section border" style="width: 50%;">
123
  <p>
124
 
125
- <strong style="color:green;"><?php _e( 'Awarded', 'mycred' ); ?>:</strong>
126
 
127
  <?php do_action( 'mycred_overview_awarded_' . $point_type, $point_type, $total, $data ); ?>
128
 
@@ -133,7 +133,7 @@ div.overview-module-wrap div.mycred-type .overview .section strong { padding: 0
133
  <div class="section border" style="width: 50%; margin-left: -1px;">
134
  <p>
135
 
136
- <strong style="color:red;"><?php _e( 'Deducted', 'mycred' ); ?>:</strong>
137
 
138
  <?php do_action( 'mycred_overview_deducted_' . $point_type, $point_type, $total, $data ); ?>
139
 
115
 
116
  <?php do_action( 'mycred_overview_total_' . $point_type, $point_type, $total, $data ); ?>
117
 
118
+ <a href="<?php echo $url; ?>" title="<?php esc_attr_e( 'Total amount in circulation', 'mycred' ); ?>"><?php echo $mycred->format_creds( $total ); ?></a>
119
 
120
  </div>
121
  <div class="overview clear">
122
  <div class="section border" style="width: 50%;">
123
  <p>
124
 
125
+ <strong style="color:green;"><?php esc_html_e( 'Awarded', 'mycred' ); ?>:</strong>
126
 
127
  <?php do_action( 'mycred_overview_awarded_' . $point_type, $point_type, $total, $data ); ?>
128
 
133
  <div class="section border" style="width: 50%; margin-left: -1px;">
134
  <p>
135
 
136
+ <strong style="color:red;"><?php esc_html_e( 'Deducted', 'mycred' ); ?>:</strong>
137
 
138
  <?php do_action( 'mycred_overview_deducted_' . $point_type, $point_type, $total, $data ); ?>
139
 
includes/mycred-remote.php CHANGED
@@ -583,7 +583,7 @@ if ( ! function_exists( 'mycred_remote_activate_row' ) ) :
583
  $disabled_message = __( 'Click Update Settings to load the Remote API settings.', 'mycred' );
584
 
585
  ?>
586
- <label class="subheader" for=""><?php _e( 'Allow Remote Access', 'mycred' ); ?></label>
587
  <ol id="myCRED-actions-cred">
588
  <li>
589
  <input type="checkbox" name="mycred_pref_core[allow_remote]" id="myCRED-General-remote"<?php if ( $settings['enabled'] ) echo ' checked="checked"'; echo $block; ?> value="1" /> <?php if ( ! empty( $disabled_message ) ) { ?><span class="description"><?php echo $disabled_message; ?></span><?php } ?></li>
@@ -608,36 +608,36 @@ if ( ! function_exists( 'mycred_remote_settings_page' ) ) :
608
  $key_length = strlen( $settings['key'] );
609
 
610
  ?>
611
- <h4><span class="dashicons dashicons-cloud <?php if ( empty( $settings['key'] ) ) echo 'static'; else echo 'active'; ?>"></span><?php _e( 'Remote Access', 'mycred' ); ?></h4>
612
  <div class="body" style="display:none;">
613
- <label class="subheader"><?php _e( 'API Key', 'mycred' ); ?></label>
614
  <ol id="myCRED-remote-api-key" class="inline">
615
  <li>
616
- <label><?php _e( 'Key', 'mycred' ); ?></label>
617
- <div class="h2"><input type="text" name="mycred_pref_core[remote][key]" id="myCRED-remote-key" value="<?php echo esc_attr( $settings['key'] ); ?>" style="width:90%;" placeholder="<?php _e( '16, 24 or 32 characters', 'mycred' ); ?>" /></div>
618
- <span class="description"><?php _e( 'Required for this feature to work!<br />Minimum 12 characters.', 'mycred' ); ?></span>
619
  </li>
620
  <li>
621
- <label><?php _e( 'Key Length', 'mycred' ); ?></label>
622
  <div class="h2" style="line-height: 30px; color:<?php if ( $key_length == 0 ) echo 'gray'; elseif ( $key_length >= 12 ) echo 'green'; ?>">(<span id="mycred-length-counter"><?php echo $key_length; ?></span>)</span></div>
623
  </li>
624
  <li>
625
  <label>&nbsp;</label><br />
626
- <input type="button" id="mycred-generate-api-key" value="<?php _e( 'Generate New Key', 'mycred' ); ?>" class="button button-large button-primary" />
627
  </li>
628
- <li class="block"><p><strong><?php _e( 'Warning!', 'mycred' ); ?></strong> <?php echo $mycred_general->core->template_tags_general( __( 'Keep this key safe! Those you share this key with will be able to remotely deduct / add / transfer %plural%!', 'mycred' ) ); ?></p></li>
629
  </ol>
630
- <label class="subheader"><?php _e( 'Incoming URI', 'mycred' ); ?></label>
631
  <ol id="myCRED-remote-api-uri">
632
  <li>
633
  <div class="h2"><?php echo site_url() . '/'; ?> <input type="text" name="mycred_pref_core[remote][uri]" id="myCRED-remote-uri" value="<?php echo esc_attr( $settings['uri'] ); ?>" /> /</div>
634
- <span class="description"><?php _e( 'The incoming call address. Remote calls made to any other URL will be ignored.', 'mycred' ); ?></span>
635
  </li>
636
  </ol>
637
- <label class="subheader" for=""><?php _e( 'Debug Mode', 'mycred' ); ?></label>
638
  <ol id="myCRED-remote-api-debug-mode">
639
  <li>
640
- <input type="checkbox" name="mycred_pref_core[remote][debug]" id="myCRED-remote-debug-mode"<?php if ( $settings['debug'] ) echo ' checked="checked"'; ?> value="1" /> <span class="description"><?php _e( 'Remember to disable when not used to prevent mischievous calls from learning about your setup!', 'mycred' ); ?></span></li>
641
  </ol>
642
 
643
  <?php do_action( 'mycred_after_remote_prefs', $mycred_general ); ?>
583
  $disabled_message = __( 'Click Update Settings to load the Remote API settings.', 'mycred' );
584
 
585
  ?>
586
+ <label class="subheader" for=""><?php esc_html_e( 'Allow Remote Access', 'mycred' ); ?></label>
587
  <ol id="myCRED-actions-cred">
588
  <li>
589
  <input type="checkbox" name="mycred_pref_core[allow_remote]" id="myCRED-General-remote"<?php if ( $settings['enabled'] ) echo ' checked="checked"'; echo $block; ?> value="1" /> <?php if ( ! empty( $disabled_message ) ) { ?><span class="description"><?php echo $disabled_message; ?></span><?php } ?></li>
608
  $key_length = strlen( $settings['key'] );
609
 
610
  ?>
611
+ <h4><span class="dashicons dashicons-cloud <?php if ( empty( $settings['key'] ) ) echo 'static'; else echo 'active'; ?>"></span><?php esc_html_e( 'Remote Access', 'mycred' ); ?></h4>
612
  <div class="body" style="display:none;">
613
+ <label class="subheader"><?php esc_html_e( 'API Key', 'mycred' ); ?></label>
614
  <ol id="myCRED-remote-api-key" class="inline">
615
  <li>
616
+ <label><?php esc_html_e( 'Key', 'mycred' ); ?></label>
617
+ <div class="h2"><input type="text" name="mycred_pref_core[remote][key]" id="myCRED-remote-key" value="<?php echo esc_attr( $settings['key'] ); ?>" style="width:90%;" placeholder="<?php esc_attr_e( '16, 24 or 32 characters', 'mycred' ); ?>" /></div>
618
+ <span class="description"><?php esc_html_e( 'Required for this feature to work!<br />Minimum 12 characters.', 'mycred' ); ?></span>
619
  </li>
620
  <li>
621
+ <label><?php esc_html_e( 'Key Length', 'mycred' ); ?></label>
622
  <div class="h2" style="line-height: 30px; color:<?php if ( $key_length == 0 ) echo 'gray'; elseif ( $key_length >= 12 ) echo 'green'; ?>">(<span id="mycred-length-counter"><?php echo $key_length; ?></span>)</span></div>
623
  </li>
624
  <li>
625
  <label>&nbsp;</label><br />
626
+ <input type="button" id="mycred-generate-api-key" value="<?php esc_attr_e( 'Generate New Key', 'mycred' ); ?>" class="button button-large button-primary" />
627
  </li>
628
+ <li class="block"><p><strong><?php esc_html_e( 'Warning!', 'mycred' ); ?></strong> <?php echo $mycred_general->core->template_tags_general( __( 'Keep this key safe! Those you share this key with will be able to remotely deduct / add / transfer %plural%!', 'mycred' ) ); ?></p></li>
629
  </ol>
630
+ <label class="subheader"><?php esc_html_e( 'Incoming URI', 'mycred' ); ?></label>
631
  <ol id="myCRED-remote-api-uri">
632
  <li>
633
  <div class="h2"><?php echo site_url() . '/'; ?> <input type="text" name="mycred_pref_core[remote][uri]" id="myCRED-remote-uri" value="<?php echo esc_attr( $settings['uri'] ); ?>" /> /</div>
634
+ <span class="description"><?php esc_html_e( 'The incoming call address. Remote calls made to any other URL will be ignored.', 'mycred' ); ?></span>
635
  </li>
636
  </ol>
637
+ <label class="subheader" for=""><?php esc_html_e( 'Debug Mode', 'mycred' ); ?></label>
638
  <ol id="myCRED-remote-api-debug-mode">
639
  <li>
640
+ <input type="checkbox" name="mycred_pref_core[remote][debug]" id="myCRED-remote-debug-mode"<?php if ( $settings['debug'] ) echo ' checked="checked"'; ?> value="1" /> <span class="description"><?php esc_html_e( 'Remember to disable when not used to prevent mischievous calls from learning about your setup!', 'mycred' ); ?></span></li>
641
  </ol>
642
 
643
  <?php do_action( 'mycred_after_remote_prefs', $mycred_general ); ?>
includes/mycred-tools-bulk-assign.php CHANGED
@@ -103,7 +103,7 @@ class myCRED_Tools_Bulk_Assign extends myCRED_Tools
103
  <table width="" class="mycred-tools-ba-award-table" cellpadding="10">
104
  <thead>
105
  <tr>
106
- <td><label for=""><?php _e( 'Select Type', 'mycred' ) ?></label></td>
107
  <td><?php echo mycred_create_select2( $award_type, $award_args ); ?></td>
108
  </tr>
109
  </thead>
@@ -111,7 +111,7 @@ class myCRED_Tools_Bulk_Assign extends myCRED_Tools
111
  <tbody class="bulk-award-point">
112
 
113
  <tr>
114
- <td><label for=""><?php _e( 'Points to Award/ Revoke', 'mycred' ) ?></label></td>
115
  <td>
116
  <input type="number" name="bulk_award_point">
117
  </td>
@@ -121,21 +121,21 @@ class myCRED_Tools_Bulk_Assign extends myCRED_Tools
121
  <td class="tb-zero-padding"></td>
122
  <td class="tb-zero-padding">
123
  <p><i>
124
- <?php _e( 'Either set points are Positive to award or in Negative to deduct.', 'mycred' ); ?>
125
  </i></p>
126
  <p><i>
127
- <?php _e( 'eg. 10 or -100 ', 'mycred' ); ?>
128
  </i></p>
129
  </td>
130
  </tr>
131
 
132
  <tr>
133
- <td><label for=""><?php _e( 'Select Point Type', 'mycred' ) ?></label></td>
134
  <td><?php echo mycred_create_select2( $point_types, $pt_args ); ?></td>
135
  </tr>
136
 
137
  <tr>
138
- <td><label for=""><?php _e( 'Enable to Log Entry', 'mycred' ) ?></label></td>
139
  <td>
140
  <label class="mycred-switch1">
141
  <input type="checkbox" value="1" class="log-entry">
@@ -148,17 +148,17 @@ class myCRED_Tools_Bulk_Assign extends myCRED_Tools
148
  <td class="tb-zero-padding"></td>
149
  <td class="tb-zero-padding">
150
  <p><i>
151
- <?php _e( 'Check if you want to create log of this entry.', 'mycred' ) ?>
152
  </i></p>
153
  </td>
154
  </tr>
155
 
156
  <tr class="log-entry-row">
157
- <td><label for=""><?php _e( 'Log Entry', 'mycred' ) ?></label></td>
158
  <td>
159
  <input type="text" name="log_entry_text">
160
  <p><i>
161
- <?php _e( 'Enter Text for log entry.', 'mycred' ) ?>
162
  </i></p>
163
  </td>
164
  </tr>
@@ -168,14 +168,14 @@ class myCRED_Tools_Bulk_Assign extends myCRED_Tools
168
 
169
  <tbody class="bulk-award-badge" style="display: none;">
170
  <tr>
171
- <td><label for=""><?php _e( 'Select Badge(s)', 'mycred' ) ?></label></td>
172
  <td><?php echo mycred_create_select2( $badges, $badges_args ); ?></td>
173
  </tr>
174
  </tbody>
175
 
176
  <tbody class="bulk-award-rank" style="display: none;">
177
  <tr>
178
- <td><label for=""><?php _e( 'Select Rank', 'mycred' ) ?></label></td>
179
  <td>
180
  <?php echo mycred_create_select2( $ranks, $ranks_args ); ?>
181
  </td>
103
  <table width="" class="mycred-tools-ba-award-table" cellpadding="10">
104
  <thead>
105
  <tr>
106
+ <td><label for=""><?php esc_html_e( 'Select Type', 'mycred' ) ?></label></td>
107
  <td><?php echo mycred_create_select2( $award_type, $award_args ); ?></td>
108
  </tr>
109
  </thead>
111
  <tbody class="bulk-award-point">
112
 
113
  <tr>
114
+ <td><label for=""><?php esc_html_e( 'Points to Award/ Revoke', 'mycred' ) ?></label></td>
115
  <td>
116
  <input type="number" name="bulk_award_point">
117
  </td>
121
  <td class="tb-zero-padding"></td>
122
  <td class="tb-zero-padding">
123
  <p><i>
124
+ <?php esc_html_e( 'Either set points are Positive to award or in Negative to deduct.', 'mycred' ); ?>
125
  </i></p>
126
  <p><i>
127
+ <?php esc_html_e( 'eg. 10 or -100 ', 'mycred' ); ?>
128
  </i></p>
129
  </td>
130
  </tr>
131
 
132
  <tr>
133
+ <td><label for=""><?php esc_html_e( 'Select Point Type', 'mycred' ) ?></label></td>
134
  <td><?php echo mycred_create_select2( $point_types, $pt_args ); ?></td>
135
  </tr>
136
 
137
  <tr>
138
+ <td><label for=""><?php esc_html_e( 'Enable to Log Entry', 'mycred' ) ?></label></td>
139
  <td>
140
  <label class="mycred-switch1">
141
  <input type="checkbox" value="1" class="log-entry">
148
  <td class="tb-zero-padding"></td>
149
  <td class="tb-zero-padding">
150
  <p><i>
151
+ <?php esc_html_e( 'Check if you want to create log of this entry.', 'mycred' ) ?>
152
  </i></p>
153
  </td>
154
  </tr>
155
 
156
  <tr class="log-entry-row">
157
+ <td><label for=""><?php esc_html_e( 'Log Entry', 'mycred' ) ?></label></td>
158
  <td>
159
  <input type="text" name="log_entry_text">
160
  <p><i>
161
+ <?php esc_html_e( 'Enter Text for log entry.', 'mycred' ) ?>
162
  </i></p>
163
  </td>
164
  </tr>
168
 
169
  <tbody class="bulk-award-badge" style="display: none;">
170
  <tr>
171
+ <td><label for=""><?php esc_html_e( 'Select Badge(s)', 'mycred' ) ?></label></td>
172
  <td><?php echo mycred_create_select2( $badges, $badges_args ); ?></td>
173
  </tr>
174
  </tbody>
175
 
176
  <tbody class="bulk-award-rank" style="display: none;">
177
  <tr>
178
+ <td><label for=""><?php esc_html_e( 'Select Rank', 'mycred' ) ?></label></td>
179
  <td>
180
  <?php echo mycred_create_select2( $ranks, $ranks_args ); ?>
181
  </td>
includes/mycred-tools-import-export.php CHANGED
@@ -26,7 +26,7 @@ class myCRED_Tools_Import_Export extends myCRED_Setup_Import_Export
26
  ?>
27
 
28
  <div class="subsubsub">
29
- <a href="<?php echo $points; ?>" class="<?php echo ( isset( $_GET['mycred-tools'] ) && $_GET['mycred-tools'] == 'points' ) ? 'current' : ''; ?>"><?php _e( 'Points','mycred' ); ?></a>
30
  <?php
31
  if( class_exists( 'myCRED_Badge' ) )
32
  {
@@ -41,7 +41,7 @@ class myCRED_Tools_Import_Export extends myCRED_Setup_Import_Export
41
  }
42
  ?>
43
 
44
- | <a href="<?php echo $setup; ?>" class="<?php echo ( isset( $_GET['mycred-tools'] ) && $_GET['mycred-tools'] == 'setup' ) ? 'current' : ''; ?>"><?php _e( 'Setup','mycred' ); ?></a>
45
 
46
  <input type="hidden" class="request-tab" value="<?php echo $_GET['mycred-tools'] ?>" />
47
  </div>
@@ -91,15 +91,15 @@ class myCRED_Tools_Import_Export extends myCRED_Setup_Import_Export
91
 
92
  ?>
93
  <div class="mycred-tools-import-export">
94
- <h3><?php _e( 'User Points','mycred' ); ?></h3>
95
  <table>
96
  <tr>
97
- <td><h4><?php _e( 'CSV File','mycred' ); ?></h4></td>
98
  <td>
99
  <form method="post" enctype="multipart/form-data">
100
  <input type="file" id="import-file" name="file" accept=".csv" />
101
  <button class="button button-primary", id="import">
102
- <span class="dashicons dashicons-database-import v-align-middle"></span> <?php _e( 'Import User Points','mycred' ); ?>
103
  </button>
104
  </form>
105
  </td>
@@ -110,52 +110,52 @@ class myCRED_Tools_Import_Export extends myCRED_Setup_Import_Export
110
  </td>
111
  <td>
112
  <button class="button button-secondary" id="download-raw-template-csv">
113
- <span class="dashicons dashicons-download v-align-middle"></span> <?php _e( 'Download Raw Template','mycred' ); ?>
114
  </button>
115
 
116
  <button class="button button-secondary" id="download-formatted-template-csv">
117
- <span class="dashicons dashicons-download v-align-middle"></span> <?php _e( 'Download Formatted Template','mycred' ); ?>
118
  </button>
119
  </td>
120
  </tr>
121
  <tr>
122
  <td>
123
- <i><?php _e( 'Only raw format can be Import.', 'mycred' ) ?></i>
124
  </td>
125
  </tr>
126
  </table>
127
- <h1><?php _e( 'Export','mycred' ); ?></h1>
128
- <h3><?php _e( 'User Points','mycred' ); ?></h3>
129
  <table>
130
  <tr>
131
  <td>
132
- <?php _e( 'Select Point Types to be Exported','mycred' ); ?>
133
  </td>
134
  <td>
135
  <button class="button button-secondary" id="select-all-pt">
136
- <span class="dashicons dashicons-download v-align-middle"></span> <?php _e( 'Select/ Deselect All','mycred' ); ?>
137
  </button>
138
  </td>
139
  </tr>
140
  </table>
141
 
142
  <div class="mycred-container">
143
- <label><?php _e( 'Select Point Types','mycred' ); ?></label>
144
  <?php echo mycred_create_select2( $pt_options, $pr_attr ) ?>
145
  </div>
146
 
147
  <div class="mycred-container">
148
- <label><?php _e( 'User Field in Exported File', 'mycred' ); ?></label>
149
  <?php echo mycred_create_select2( $uf_options, $uf_attr ) ?>
150
  </div>
151
 
152
  <div class="mycred-container">
153
  <button class="button button-primary" id="export-raw">
154
- <span class="dashicons dashicons-database-export v-align-middle"></span> <?php _e( 'Export Raw', 'mycred' ); ?>
155
  </button>
156
 
157
  <button class="button button-primary" id="export-formatted">
158
- <span class="dashicons dashicons-database-export v-align-middle"></span> <?php _e( 'Export Formatted', 'mycred' ); ?>
159
  </button>
160
  </div>
161
  </div>
@@ -208,16 +208,16 @@ class myCRED_Tools_Import_Export extends myCRED_Setup_Import_Export
208
 
209
  ?>
210
  <div class="mycred-tools-import-export">
211
- <h3><?php _e( 'User Badges','mycred' ); ?></h3>
212
  <table>
213
  <tr>
214
- <td><h4><?php _e( 'CSV File','mycred' ); ?></h4></td>
215
  <td>
216
  <form method="post" enctype="multipart/form-data">
217
  <input type="file" id="import-file" name="file" accept=".csv" />
218
  <?php echo mycred_create_select2( $type_options, $type_attr ) ?>
219
  <button class="button button-primary", id="import">
220
- <span class="dashicons dashicons-database-import v-align-middle"></span> <?php _e( 'Import User Badges','mycred' ); ?>
221
  </button>
222
  </form>
223
  </td>
@@ -228,49 +228,49 @@ class myCRED_Tools_Import_Export extends myCRED_Setup_Import_Export
228
  </td>
229
  <td>
230
  <button class="button button-secondary" id="download-raw-template-csv">
231
- <span class="dashicons dashicons-download v-align-middle"></span> <?php _e( 'Download Raw Template','mycred' ); ?>
232
  </button>
233
  </td>
234
  </tr>
235
  <tr>
236
  <td>
237
- <i><?php _e( 'Only raw format can be Import.', 'mycred' ) ?></i>
238
  </td>
239
  </tr>
240
  </table>
241
- <h1><?php _e( 'Export','mycred' ); ?></h1>
242
- <h3><?php _e( 'User Badges','mycred' ); ?></h3>
243
  <table>
244
  <tr>
245
  <td>
246
- <?php _e( 'Select Badges to be Exported','mycred' ); ?>
247
  </td>
248
  <td>
249
  <button class="button button-secondary" id="select-all-pt">
250
- <span class="dashicons dashicons-download v-align-middle"></span> <?php _e( 'Select/ Deselect All','mycred' ); ?>
251
  </button>
252
  </td>
253
  </tr>
254
  </table>
255
 
256
  <div class="mycred-container">
257
- <label><?php _e( 'Select Badges','mycred' ); ?></label>
258
  <?php echo mycred_create_select2( $badges_options, $badges_attr ) ?>
259
  </div>
260
 
261
  <div class="mycred-container">
262
- <label><?php _e( 'User Field in Exported File', 'mycred' ); ?></label>
263
  <?php echo mycred_create_select2( $uf_options, $uf_attr ) ?>
264
  </div>
265
 
266
  <div class="mycred-container">
267
- <label><?php _e( 'Badge Fields in Exported File', 'mycred' ); ?></label>
268
  <?php echo mycred_create_select2( $badges_fields_options, $badges_fields_attr ) ?>
269
  </div>
270
 
271
  <div class="mycred-container">
272
  <button class="button button-primary" id="export-raw">
273
- <span class="dashicons dashicons-database-export v-align-middle"></span> <?php _e( 'Export Raw', 'mycred' ); ?>
274
  </button>
275
  </div>
276
  </div>
@@ -328,16 +328,16 @@ class myCRED_Tools_Import_Export extends myCRED_Setup_Import_Export
328
 
329
  ?>
330
  <div class="mycred-tools-import-export">
331
- <h3><?php _e( 'User Ranks','mycred' ); ?></h3>
332
  <table>
333
  <tr>
334
- <td><h4><?php _e( 'CSV File','mycred' ); ?></h4></td>
335
  <td>
336
  <form method="post" enctype="multipart/form-data">
337
  <input type="file" id="import-file" name="file" accept=".csv" />
338
  <?php echo mycred_create_select2( $type_options, $type_attr ) ?>
339
  <button class="button button-primary", id="import">
340
- <span class="dashicons dashicons-database-import v-align-middle"></span> <?php _e( 'Import User Ranks','mycred' ); ?>
341
  </button>
342
  </form>
343
  </td>
@@ -348,49 +348,49 @@ class myCRED_Tools_Import_Export extends myCRED_Setup_Import_Export
348
  </td>
349
  <td>
350
  <button class="button button-secondary" id="download-raw-template-csv">
351
- <span class="dashicons dashicons-download v-align-middle"></span> <?php _e( 'Download Raw Template','mycred' ); ?>
352
  </button>
353
  </td>
354
  </tr>
355
  <tr>
356
  <td>
357
- <i><?php _e( 'Make sure Ranks\' Behaviour is set to Manual Mode, Only Raw format can be Import.', 'mycred' ) ?></i>
358
  </td>
359
  </tr>
360
  </table>
361
- <h1><?php _e( 'Export','mycred' ); ?></h1>
362
- <h3><?php _e( 'User Ranks','mycred' ); ?></h3>
363
  <table>
364
  <tr>
365
  <td>
366
- <?php _e( 'Select Ranks to be Exported','mycred' ); ?>
367
  </td>
368
  <td>
369
  <button class="button button-secondary" id="select-all-pt">
370
- <span class="dashicons dashicons-download v-align-middle"></span> <?php _e( 'Select/ Deselect All','mycred' ); ?>
371
  </button>
372
  </td>
373
  </tr>
374
  </table>
375
 
376
  <div class="mycred-container">
377
- <label><?php _e( 'Select Ranks','mycred' ); ?></label>
378
  <?php echo mycred_create_select2( $ranks_options, $ranks_attr ) ?>
379
  </div>
380
 
381
  <div class="mycred-container">
382
- <label><?php _e( 'User Field in Exported File', 'mycred' ); ?></label>
383
  <?php echo mycred_create_select2( $uf_options, $uf_attr ) ?>
384
  </div>
385
 
386
  <div class="mycred-container">
387
- <label><?php _e( 'Rank Fields in Exported File', 'mycred' ); ?></label>
388
  <?php echo mycred_create_select2( $ranks_fields_options, $ranks_fields_attr ) ?>
389
  </div>
390
 
391
  <div class="mycred-container">
392
  <button class="button button-primary" id="export-raw">
393
- <span class="dashicons dashicons-database-export v-align-middle"></span> <?php _e( 'Export Raw', 'mycred' ); ?>
394
  </button>
395
  </div>
396
  </div>
26
  ?>
27
 
28
  <div class="subsubsub">
29
+ <a href="<?php echo $points; ?>" class="<?php echo ( isset( $_GET['mycred-tools'] ) && $_GET['mycred-tools'] == 'points' ) ? 'current' : ''; ?>"><?php esc_html_e( 'Points','mycred' ); ?></a>
30
  <?php
31
  if( class_exists( 'myCRED_Badge' ) )
32
  {
41
  }
42
  ?>
43
 
44
+ | <a href="<?php echo $setup; ?>" class="<?php echo ( isset( $_GET['mycred-tools'] ) && $_GET['mycred-tools'] == 'setup' ) ? 'current' : ''; ?>"><?php esc_html_e( 'Setup','mycred' ); ?></a>
45
 
46
  <input type="hidden" class="request-tab" value="<?php echo $_GET['mycred-tools'] ?>" />
47
  </div>
91
 
92
  ?>
93
  <div class="mycred-tools-import-export">
94
+ <h3><?php esc_html_e( 'User Points','mycred' ); ?></h3>
95
  <table>
96
  <tr>
97
+ <td><h4><?php esc_html_e( 'CSV File','mycred' ); ?></h4></td>
98
  <td>
99
  <form method="post" enctype="multipart/form-data">
100
  <input type="file" id="import-file" name="file" accept=".csv" />
101
  <button class="button button-primary", id="import">
102
+ <span class="dashicons dashicons-database-import v-align-middle"></span> <?php esc_html_e( 'Import User Points','mycred' ); ?>
103
  </button>
104
  </form>
105
  </td>
110
  </td>
111
  <td>
112
  <button class="button button-secondary" id="download-raw-template-csv">
113
+ <span class="dashicons dashicons-download v-align-middle"></span> <?php esc_html_e( 'Download Raw Template','mycred' ); ?>
114
  </button>
115
 
116
  <button class="button button-secondary" id="download-formatted-template-csv">
117
+ <span class="dashicons dashicons-download v-align-middle"></span> <?php esc_html_e( 'Download Formatted Template','mycred' ); ?>
118
  </button>
119
  </td>
120
  </tr>
121
  <tr>
122
  <td>
123
+ <i><?php esc_html_e( 'Only raw format can be Import.', 'mycred' ) ?></i>
124
  </td>
125
  </tr>
126
  </table>
127
+ <h1><?php esc_html_e( 'Export','mycred' ); ?></h1>
128
+ <h3><?php esc_html_e( 'User Points','mycred' ); ?></h3>
129
  <table>
130
  <tr>
131
  <td>
132
+ <?php esc_html_e( 'Select Point Types to be Exported','mycred' ); ?>
133
  </td>
134
  <td>
135
  <button class="button button-secondary" id="select-all-pt">
136
+ <span class="dashicons dashicons-download v-align-middle"></span> <?php esc_html_e( 'Select/ Deselect All','mycred' ); ?>
137
  </button>
138
  </td>
139
  </tr>
140
  </table>
141
 
142
  <div class="mycred-container">
143
+ <label><?php esc_html_e( 'Select Point Types','mycred' ); ?></label>
144
  <?php echo mycred_create_select2( $pt_options, $pr_attr ) ?>
145
  </div>
146
 
147
  <div class="mycred-container">
148
+ <label><?php esc_html_e( 'User Field in Exported File', 'mycred' ); ?></label>
149
  <?php echo mycred_create_select2( $uf_options, $uf_attr ) ?>
150
  </div>
151
 
152
  <div class="mycred-container">
153
  <button class="button button-primary" id="export-raw">
154
+ <span class="dashicons dashicons-database-export v-align-middle"></span> <?php esc_html_e( 'Export Raw', 'mycred' ); ?>
155
  </button>
156
 
157
  <button class="button button-primary" id="export-formatted">
158
+ <span class="dashicons dashicons-database-export v-align-middle"></span> <?php esc_html_e( 'Export Formatted', 'mycred' ); ?>
159
  </button>
160
  </div>
161
  </div>
208
 
209
  ?>
210
  <div class="mycred-tools-import-export">
211
+ <h3><?php esc_html_e( 'User Badges','mycred' ); ?></h3>
212
  <table>
213
  <tr>
214
+ <td><h4><?php esc_html_e( 'CSV File','mycred' ); ?></h4></td>
215
  <td>
216
  <form method="post" enctype="multipart/form-data">
217
  <input type="file" id="import-file" name="file" accept=".csv" />
218
  <?php echo mycred_create_select2( $type_options, $type_attr ) ?>
219
  <button class="button button-primary", id="import">
220
+ <span class="dashicons dashicons-database-import v-align-middle"></span> <?php esc_html_e( 'Import User Badges','mycred' ); ?>
221
  </button>
222
  </form>
223
  </td>
228
  </td>
229
  <td>
230
  <button class="button button-secondary" id="download-raw-template-csv">
231
+ <span class="dashicons dashicons-download v-align-middle"></span> <?php esc_html_e( 'Download Raw Template','mycred' ); ?>
232
  </button>
233
  </td>
234
  </tr>
235
  <tr>
236
  <td>
237
+ <i><?php esc_html_e( 'Only raw format can be Import.', 'mycred' ) ?></i>
238
  </td>
239
  </tr>
240
  </table>
241
+ <h1><?php esc_html_e( 'Export','mycred' ); ?></h1>
242
+ <h3><?php esc_html_e( 'User Badges','mycred' ); ?></h3>
243
  <table>
244
  <tr>
245
  <td>
246
+ <?php esc_html_e( 'Select Badges to be Exported','mycred' ); ?>
247
  </td>
248
  <td>
249
  <button class="button button-secondary" id="select-all-pt">
250
+ <span class="dashicons dashicons-download v-align-middle"></span> <?php esc_html_e( 'Select/ Deselect All','mycred' ); ?>
251
  </button>
252
  </td>
253
  </tr>
254
  </table>
255
 
256
  <div class="mycred-container">
257
+ <label><?php esc_html_e( 'Select Badges','mycred' ); ?></label>
258
  <?php echo mycred_create_select2( $badges_options, $badges_attr ) ?>
259
  </div>
260
 
261
  <div class="mycred-container">
262
+ <label><?php esc_html_e( 'User Field in Exported File', 'mycred' ); ?></label>
263
  <?php echo mycred_create_select2( $uf_options, $uf_attr ) ?>
264
  </div>
265
 
266
  <div class="mycred-container">
267
+ <label><?php esc_html_e( 'Badge Fields in Exported File', 'mycred' ); ?></label>
268
  <?php echo mycred_create_select2( $badges_fields_options, $badges_fields_attr ) ?>
269
  </div>
270
 
271
  <div class="mycred-container">
272
  <button class="button button-primary" id="export-raw">
273
+ <span class="dashicons dashicons-database-export v-align-middle"></span> <?php esc_html_e( 'Export Raw', 'mycred' ); ?>
274
  </button>
275
  </div>
276
  </div>
328
 
329
  ?>
330
  <div class="mycred-tools-import-export">
331
+ <h3><?php esc_html_e( 'User Ranks','mycred' ); ?></h3>
332
  <table>
333
  <tr>
334
+ <td><h4><?php esc_html_e( 'CSV File','mycred' ); ?></h4></td>
335
  <td>
336
  <form method="post" enctype="multipart/form-data">
337
  <input type="file" id="import-file" name="file" accept=".csv" />
338
  <?php echo mycred_create_select2( $type_options, $type_attr ) ?>
339
  <button class="button button-primary", id="import">
340
+ <span class="dashicons dashicons-database-import v-align-middle"></span> <?php esc_html_e( 'Import User Ranks','mycred' ); ?>
341
  </button>
342
  </form>
343
  </td>
348
  </td>
349
  <td>
350
  <button class="button button-secondary" id="download-raw-template-csv">
351
+ <span class="dashicons dashicons-download v-align-middle"></span> <?php esc_html_e( 'Download Raw Template','mycred' ); ?>
352
  </button>
353
  </td>
354
  </tr>
355
  <tr>
356
  <td>
357
+ <i><?php esc_html_e( 'Make sure Ranks\' Behaviour is set to Manual Mode, Only Raw format can be Import.', 'mycred' ) ?></i>
358
  </td>
359
  </tr>
360
  </table>
361
+ <h1><?php esc_html_e( 'Export','mycred' ); ?></h1>
362
+ <h3><?php esc_html_e( 'User Ranks','mycred' ); ?></h3>
363
  <table>
364
  <tr>
365
  <td>
366
+ <?php esc_html_e( 'Select Ranks to be Exported','mycred' ); ?>
367
  </td>
368
  <td>
369
  <button class="button button-secondary" id="select-all-pt">
370
+ <span class="dashicons dashicons-download v-align-middle"></span> <?php esc_html_e( 'Select/ Deselect All','mycred' ); ?>
371
  </button>
372
  </td>
373
  </tr>
374
  </table>
375
 
376
  <div class="mycred-container">
377
+ <label><?php esc_html_e( 'Select Ranks','mycred' ); ?></label>
378
  <?php echo mycred_create_select2( $ranks_options, $ranks_attr ) ?>
379
  </div>
380
 
381
  <div class="mycred-container">
382
+ <label><?php esc_html_e( 'User Field in Exported File', 'mycred' ); ?></label>
383
  <?php echo mycred_create_select2( $uf_options, $uf_attr ) ?>
384
  </div>
385
 
386
  <div class="mycred-container">
387
+ <label><?php esc_html_e( 'Rank Fields in Exported File', 'mycred' ); ?></label>
388
  <?php echo mycred_create_select2( $ranks_fields_options, $ranks_fields_attr ) ?>
389
  </div>
390
 
391
  <div class="mycred-container">
392
  <button class="button button-primary" id="export-raw">
393
+ <span class="dashicons dashicons-database-export v-align-middle"></span> <?php esc_html_e( 'Export Raw', 'mycred' ); ?>
394
  </button>
395
  </div>
396
  </div>
includes/mycred-tools-setup-import-export.php CHANGED
@@ -15,7 +15,7 @@ class myCRED_Setup_Import_Export
15
  ?>
16
  <input type="hidden" class="request-tab" value="<?php if( isset( $_GET['mycred-tools'] ) ) echo $_GET['mycred-tools'] ?>" />
17
  <form action="" enctype="multipart/form-data" class="mycred-tools-setup">
18
- <h3><?php _e( 'Setup', 'mycred' ); ?></h3>
19
  <?php
20
  if( !empty( $this->mycred_tools_import_export->core_point_types ) )
21
  {
@@ -164,18 +164,18 @@ class myCRED_Setup_Import_Export
164
  </ul>
165
 
166
  <button class="button button-primary" id="export-raw">
167
- <span class="dashicons dashicons-database-export v-align-middle"></span> <?php _e( 'Export Setup', 'mycred' ); ?>
168
  </button>
169
  </form>
170
 
171
  <form action="" enctype="multipart/form-data" class="mycred-tools-setup-import">
172
- <h3><?php _e( 'Import', 'mycred' ); ?></h3>
173
  <input type="file" id="import-file" name="file" accept=".json" />
174
  <button class="button button-primary", id="import">
175
- <span class="dashicons dashicons-database-import v-align-middle"></span> <?php _e( 'Import Setup','mycred' ); ?>
176
  </button>
177
  <p><i>
178
- <?php _e( 'Accepts JSON format.', 'mycred' ); ?>
179
  </i></p>
180
  </form>
181
  <div style="clear: both;"></div>
15
  ?>
16
  <input type="hidden" class="request-tab" value="<?php if( isset( $_GET['mycred-tools'] ) ) echo $_GET['mycred-tools'] ?>" />
17
  <form action="" enctype="multipart/form-data" class="mycred-tools-setup">
18
+ <h3><?php esc_html_e( 'Setup', 'mycred' ); ?></h3>
19
  <?php
20
  if( !empty( $this->mycred_tools_import_export->core_point_types ) )
21
  {
164
  </ul>
165
 
166
  <button class="button button-primary" id="export-raw">
167
+ <span class="dashicons dashicons-database-export v-align-middle"></span> <?php esc_html_e( 'Export Setup', 'mycred' ); ?>
168
  </button>
169
  </form>
170
 
171
  <form action="" enctype="multipart/form-data" class="mycred-tools-setup-import">
172
+ <h3><?php esc_html_e( 'Import', 'mycred' ); ?></h3>
173
  <input type="file" id="import-file" name="file" accept=".json" />
174
  <button class="button button-primary", id="import">
175
+ <span class="dashicons dashicons-database-import v-align-middle"></span> <?php esc_html_e( 'Import Setup','mycred' ); ?>
176
  </button>
177
  <p><i>
178
+ <?php esc_html_e( 'Accepts JSON format.', 'mycred' ); ?>
179
  </i></p>
180
  </form>
181
  <div style="clear: both;"></div>
includes/shortcodes/mycred_exchange.php CHANGED
@@ -66,13 +66,13 @@ if ( ! function_exists( 'mycred_render_shortcode_exchange' ) ) :
66
  </div>
67
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12 mycred-exchange-current-amount">
68
  <div class="form-group">
69
- <label for="mycred-exchange-amount"><?php _e( 'Amount', 'mycred' ); ?></label>
70
  <input type="text" size="20" placeholder="<?php printf( __( 'Minimum %s', 'mycred' ), $mycred_from->format_creds( $min ) ); ?>" value="" class="form-control" id="mycred-exchange-amount" name="mycred_exchange[amount]" />
71
  </div>
72
  </div>
73
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12 mycred-exchange-current-rate">
74
  <div class="form-group">
75
- <label><?php _e( 'Exchange Rate', 'mycred' ); ?></label>
76
  <p class="form-control-static"><?php printf( __( '1 %s = <span class="rate">%s</span> %s', 'mycred' ), $mycred_from->singular(), $rate, ( ( $rate == 1 ) ? $mycred_to->singular() : $mycred_to->plural() ) ); ?></p>
77
  </div>
78
  </div>
66
  </div>
67
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12 mycred-exchange-current-amount">
68
  <div class="form-group">
69
+ <label for="mycred-exchange-amount"><?php esc_html_e( 'Amount', 'mycred' ); ?></label>
70
  <input type="text" size="20" placeholder="<?php printf( __( 'Minimum %s', 'mycred' ), $mycred_from->format_creds( $min ) ); ?>" value="" class="form-control" id="mycred-exchange-amount" name="mycred_exchange[amount]" />
71
  </div>
72
  </div>
73
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12 mycred-exchange-current-rate">
74
  <div class="form-group">
75
+ <label><?php esc_html_e( 'Exchange Rate', 'mycred' ); ?></label>
76
  <p class="form-control-static"><?php printf( __( '1 %s = <span class="rate">%s</span> %s', 'mycred' ), $mycred_from->singular(), $rate, ( ( $rate == 1 ) ? $mycred_to->singular() : $mycred_to->plural() ) ); ?></p>
77
  </div>
78
  </div>
includes/shortcodes/mycred_hook_table.php CHANGED
@@ -80,9 +80,9 @@ if ( ! function_exists( 'mycred_render_shortcode_hook_table' ) ) :
80
  <table class="table mycred-hook-table hook-table-<?php echo $id; ?>">
81
  <thead>
82
  <tr>
83
- <th class="column-instance" style="width: 60%;"><?php _e( 'Instance', 'mycred' ); ?></th>
84
- <th class="column-amount" style="width: 20%;"><?php _e( 'Amount', 'mycred' ); ?></th>
85
- <th class="column-limit" style="width: 20%;"><?php _e( 'Limit', 'mycred' ); ?></th>
86
  </tr>
87
  </thead>
88
  <tbody>
80
  <table class="table mycred-hook-table hook-table-<?php echo $id; ?>">
81
  <thead>
82
  <tr>
83
+ <th class="column-instance" style="width: 60%;"><?php esc_html_e( 'Instance', 'mycred' ); ?></th>
84
+ <th class="column-amount" style="width: 20%;"><?php esc_html_e( 'Amount', 'mycred' ); ?></th>
85
+ <th class="column-limit" style="width: 20%;"><?php esc_html_e( 'Limit', 'mycred' ); ?></th>
86
  </tr>
87
  </thead>
88
  <tbody>
includes/shortcodes/mycred_show_if.php CHANGED
@@ -33,6 +33,12 @@ if ( ! function_exists( 'mycred_render_shortcode_show_if' ) ) :
33
 
34
  // Get the user ID
35
  $user_id = mycred_get_user_id( $user_id );
 
 
 
 
 
 
36
 
37
  // You can only use AND or OR for comparisons
38
  if ( ! in_array( $comp, array( 'AND', 'OR' ) ) )
33
 
34
  // Get the user ID
35
  $user_id = mycred_get_user_id( $user_id );
36
+
37
+ if ( is_user_logged_in() && $user_id == get_current_user_id() )
38
+ return $content;
39
+
40
+ if ( ! is_user_logged_in() && $user_id == 'current' )
41
+ return $content;
42
 
43
  // You can only use AND or OR for comparisons
44
  if ( ! in_array( $comp, array( 'AND', 'OR' ) ) )
includes/widgets/mycred-widget-balance.php CHANGED
@@ -173,14 +173,14 @@ div.mycred-hidden.ex-field { display: block; }
173
 
174
  <!-- Widget Options -->
175
  <p class="myCRED-widget-field">
176
- <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php _e( 'Title', 'mycred' ); ?>:</label>
177
  <input id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" class="widefat" />
178
  </p>
179
 
180
  <!-- Point Type -->
181
  <?php if ( count( $mycred_types ) > 1 ) : ?>
182
  <p class="myCRED-widget-field">
183
- <label for="<?php echo esc_attr( $this->get_field_id( 'type' ) ); ?>"><?php _e( 'Point Type', 'mycred' ); ?>:</label>
184
  <?php mycred_types_select_from_dropdown( $this->get_field_name( 'type' ), $this->get_field_id( 'type' ), $type ); ?>
185
  </p>
186
  <?php else : ?>
@@ -189,26 +189,26 @@ div.mycred-hidden.ex-field { display: block; }
189
 
190
  <!-- Balance layout -->
191
  <p class="myCRED-widget-field">
192
- <label for="<?php echo esc_attr( $this->get_field_id( 'cred_format' ) ); ?>"><?php _e( 'Balance Layout', 'mycred' ); ?>:</label>
193
  <textarea name="<?php echo esc_attr( $this->get_field_name( 'cred_format' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'cred_format' ) ); ?>" rows="3" cols="20" class="widefat"><?php echo esc_attr( $cred_format ); ?></textarea>
194
  <small><?php echo $mycred->available_template_tags( array( 'general', 'amount', 'user' ) ); ?></small>
195
  </p>
196
  <?php if ( MYCRED_ENABLE_LOGGING ) : ?>
197
  <!-- History -->
198
  <p class="myCRED-widget-field">
199
- <label for="<?php echo esc_attr( $this->get_field_id( 'show_history' ) ); ?>"><input type="checkbox" name="<?php echo esc_attr( $this->get_field_name( 'show_history' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'show_history' ) ); ?>" value="1"<?php checked( $show_history, 1 ); ?> class="checkbox" /> <?php _e( 'Include history', 'mycred' ); ?></label>
200
  </p>
201
  <div id="<?php echo esc_attr( $this->get_field_id( 'show_history' ) ); ?>-details" class="mycred-hidden<?php if ( $show_history == 1 ) echo ' ex-field'; ?>">
202
  <p class="myCRED-widget-field">
203
- <label for="<?php echo esc_attr( $this->get_field_id( 'history_title' ) ); ?>"><?php _e( 'History Title', 'mycred' ); ?>:</label>
204
  <input id="<?php echo esc_attr( $this->get_field_id( 'history_title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'history_title' ) ); ?>" type="text" value="<?php echo esc_attr( $history_title ); ?>" class="widefat" />
205
  </p>
206
  <p class="myCRED-widget-field">
207
- <label for="<?php echo esc_attr( $this->get_field_id( 'number' ) ); ?>"><?php _e( 'Number of entires', 'mycred' ); ?>:</label>
208
  <input id="<?php echo esc_attr( $this->get_field_id( 'number' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'number' ) ); ?>" type="text" value="<?php echo absint( $history_length ); ?>" size="3" class="widefat" /><br />
209
  </p>
210
  <p class="myCRED-widget-field">
211
- <label for="<?php echo esc_attr( $this->get_field_id( 'history_format' ) ); ?>"><?php _e( 'Row layout', 'mycred' ); ?>:</label>
212
  <textarea name="<?php echo esc_attr( $this->get_field_name( 'history_format' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'history_format' ) ); ?>" rows="3" cols="20" class="widefat"><?php echo esc_attr( $history_entry ); ?></textarea>
213
  <small><?php echo $mycred->available_template_tags( array( 'general', 'widget' ) ); ?></small>
214
  </p>
@@ -221,11 +221,11 @@ div.mycred-hidden.ex-field { display: block; }
221
  <?php endif; ?>
222
  <!-- Show to Visitors -->
223
  <p class="myCRED-widget-field">
224
- <label for="<?php echo esc_attr( $this->get_field_id( 'show_visitors' ) ); ?>"><input type="checkbox" name="<?php echo esc_attr( $this->get_field_name( 'show_visitors' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'show_visitors' ) ); ?>" value="1"<?php checked( $show_visitors, 1 ); ?> class="checkbox" /> <?php _e( 'Show message when not logged in', 'mycred' ); ?></label>
225
  </p>
226
  <div id="<?php echo esc_attr( $this->get_field_id( 'show_visitors' ) ); ?>-details" class="mycred-hidden<?php if ( $show_visitors == 1 ) echo ' ex-field'; ?>">
227
  <p class="myCRED-widget-field">
228
- <label for="<?php echo esc_attr( $this->get_field_id( 'message' ) ); ?>"><?php _e( 'Message', 'mycred' ); ?>:</label>
229
  <textarea name="<?php echo esc_attr( $this->get_field_name( 'message' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'message' ) ); ?>" rows="3" cols="20" class="widefat"><?php echo esc_attr( $message ); ?></textarea>
230
  <small><?php echo $mycred->available_template_tags( array( 'general', 'amount' ) ); ?></small>
231
  </p>
173
 
174
  <!-- Widget Options -->
175
  <p class="myCRED-widget-field">
176
+ <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php esc_html_e( 'Title', 'mycred' ); ?>:</label>
177
  <input id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" class="widefat" />
178
  </p>
179
 
180
  <!-- Point Type -->
181
  <?php if ( count( $mycred_types ) > 1 ) : ?>
182
  <p class="myCRED-widget-field">
183
+ <label for="<?php echo esc_attr( $this->get_field_id( 'type' ) ); ?>"><?php esc_html_e( 'Point Type', 'mycred' ); ?>:</label>
184
  <?php mycred_types_select_from_dropdown( $this->get_field_name( 'type' ), $this->get_field_id( 'type' ), $type ); ?>
185
  </p>
186
  <?php else : ?>
189
 
190
  <!-- Balance layout -->
191
  <p class="myCRED-widget-field">
192
+ <label for="<?php echo esc_attr( $this->get_field_id( 'cred_format' ) ); ?>"><?php esc_html_e( 'Balance Layout', 'mycred' ); ?>:</label>
193
  <textarea name="<?php echo esc_attr( $this->get_field_name( 'cred_format' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'cred_format' ) ); ?>" rows="3" cols="20" class="widefat"><?php echo esc_attr( $cred_format ); ?></textarea>
194
  <small><?php echo $mycred->available_template_tags( array( 'general', 'amount', 'user' ) ); ?></small>
195
  </p>
196
  <?php if ( MYCRED_ENABLE_LOGGING ) : ?>
197
  <!-- History -->
198
  <p class="myCRED-widget-field">
199
+ <label for="<?php echo esc_attr( $this->get_field_id( 'show_history' ) ); ?>"><input type="checkbox" name="<?php echo esc_attr( $this->get_field_name( 'show_history' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'show_history' ) ); ?>" value="1"<?php checked( $show_history, 1 ); ?> class="checkbox" /> <?php esc_html_e( 'Include history', 'mycred' ); ?></label>
200
  </p>
201
  <div id="<?php echo esc_attr( $this->get_field_id( 'show_history' ) ); ?>-details" class="mycred-hidden<?php if ( $show_history == 1 ) echo ' ex-field'; ?>">
202
  <p class="myCRED-widget-field">
203
+ <label for="<?php echo esc_attr( $this->get_field_id( 'history_title' ) ); ?>"><?php esc_html_e( 'History Title', 'mycred' ); ?>:</label>
204
  <input id="<?php echo esc_attr( $this->get_field_id( 'history_title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'history_title' ) ); ?>" type="text" value="<?php echo esc_attr( $history_title ); ?>" class="widefat" />
205
  </p>
206
  <p class="myCRED-widget-field">
207
+ <label for="<?php echo esc_attr( $this->get_field_id( 'number' ) ); ?>"><?php esc_html_e( 'Number of entires', 'mycred' ); ?>:</label>
208
  <input id="<?php echo esc_attr( $this->get_field_id( 'number' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'number' ) ); ?>" type="text" value="<?php echo absint( $history_length ); ?>" size="3" class="widefat" /><br />
209
  </p>
210
  <p class="myCRED-widget-field">
211
+ <label for="<?php echo esc_attr( $this->get_field_id( 'history_format' ) ); ?>"><?php esc_html_e( 'Row layout', 'mycred' ); ?>:</label>
212
  <textarea name="<?php echo esc_attr( $this->get_field_name( 'history_format' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'history_format' ) ); ?>" rows="3" cols="20" class="widefat"><?php echo esc_attr( $history_entry ); ?></textarea>
213
  <small><?php echo $mycred->available_template_tags( array( 'general', 'widget' ) ); ?></small>
214
  </p>
221
  <?php endif; ?>
222
  <!-- Show to Visitors -->
223
  <p class="myCRED-widget-field">
224
+ <label for="<?php echo esc_attr( $this->get_field_id( 'show_visitors' ) ); ?>"><input type="checkbox" name="<?php echo esc_attr( $this->get_field_name( 'show_visitors' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'show_visitors' ) ); ?>" value="1"<?php checked( $show_visitors, 1 ); ?> class="checkbox" /> <?php esc_html_e( 'Show message when not logged in', 'mycred' ); ?></label>
225
  </p>
226
  <div id="<?php echo esc_attr( $this->get_field_id( 'show_visitors' ) ); ?>-details" class="mycred-hidden<?php if ( $show_visitors == 1 ) echo ' ex-field'; ?>">
227
  <p class="myCRED-widget-field">
228
+ <label for="<?php echo esc_attr( $this->get_field_id( 'message' ) ); ?>"><?php esc_html_e( 'Message', 'mycred' ); ?>:</label>
229
  <textarea name="<?php echo esc_attr( $this->get_field_name( 'message' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'message' ) ); ?>" rows="3" cols="20" class="widefat"><?php echo esc_attr( $message ); ?></textarea>
230
  <small><?php echo $mycred->available_template_tags( array( 'general', 'amount' ) ); ?></small>
231
  </p>
includes/widgets/mycred-widget-leaderboard.php CHANGED
@@ -147,13 +147,13 @@ if ( ! class_exists( 'myCRED_Widget_Leaderboard' ) ) :
147
 
148
  ?>
149
  <p class="myCRED-widget-field">
150
- <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php _e( 'Title', 'mycred' ); ?>:</label>
151
  <input id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" class="widefat" />
152
  </p>
153
 
154
  <?php if ( count( $mycred_types ) > 1 ) : ?>
155
  <p class="myCRED-widget-field">
156
- <label for="<?php echo esc_attr( $this->get_field_id( 'type' ) ); ?>"><?php _e( 'Point Type', 'mycred' ); ?>:</label>
157
  <?php mycred_types_select_from_dropdown( $this->get_field_name( 'type' ), $this->get_field_id( 'type' ), $type ); ?>
158
  </p>
159
  <?php else : ?>
@@ -161,33 +161,33 @@ if ( ! class_exists( 'myCRED_Widget_Leaderboard' ) ) :
161
  <?php endif; ?>
162
 
163
  <p class="myCRED-widget-field">
164
- <label for="<?php echo esc_attr( $this->get_field_id( 'based_on' ) ); ?>"><?php _e( 'Based On', 'mycred' ); ?>:</label>
165
  <input id="<?php echo esc_attr( $this->get_field_id( 'based_on' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'based_on' ) ); ?>" type="text" value="<?php echo esc_attr( $based_on ); ?>" class="widefat" />
166
- <small><?php _e( 'Use "balance" to base the leaderboard on your users current balances or use a specific reference.', 'mycred' ); ?> <a href="http://codex.mycred.me/chapter-vi/log-references/" target="_blank"><?php _e( 'Reference Guide', 'mycred' ); ?></a></small>
167
  </p>
168
 
169
  <p class="myCRED-widget-field">
170
- <label for="<?php echo esc_attr( $this->get_field_id( 'total' ) ); ?>"><?php _e( 'Total', 'mycred' ); ?>:</label>
171
  <input id="<?php echo esc_attr( $this->get_field_id( 'total' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'total' ) ); ?>" type="text" value="<?php echo esc_attr( $total ); ?>" class="widefat" />
172
- <small><?php _e( 'When showing a leaderboard based on balances, you can select to use users total balance (1) instead of their current balance (0).', 'mycred' ); ?> </small>
173
  </p>
174
 
175
  <p class="myCRED-widget-field">
176
- <label for="<?php echo esc_attr( $this->get_field_id( 'wrap' ) ); ?>"><?php _e( 'Wrap', 'mycred' ); ?>:</label>
177
  <input id="<?php echo esc_attr( $this->get_field_id( 'wrap' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'wrap' ) ); ?>" type="text" value="<?php echo esc_attr( $wrap ); ?>" class="widefat" />
178
- <small><?php _e( 'The wrapping element to use for the list. By default the leaderboard renders an organized list (ol) and each item uses a list element (li).', 'mycred' ); ?> </small>
179
  </p>
180
 
181
  <p class="myCRED-widget-field">
182
- <label for="<?php echo esc_attr( $this->get_field_id( 'nothing' ) ); ?>"><?php _e( 'Nothing', 'mycred' ); ?>:</label>
183
  <input id="<?php echo esc_attr( $this->get_field_id( 'nothing' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'nothing' ) ); ?>" type="text" value="<?php echo esc_attr( $nothing ); ?>" class="widefat" />
184
- <small><?php _e( 'The message to show users when the leaderboard is empty.', 'mycred' ); ?></small>
185
  </p>
186
 
187
  <p class="myCRED-widget-field">
188
- <label for="<?php echo esc_attr( $this->get_field_id( 'exclude_zero' ) ); ?>"><?php _e( 'Exclude Zero', 'mycred' ); ?>:</label>
189
  <input id="<?php echo esc_attr( $this->get_field_id( 'exclude_zero' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'exclude_zero' ) ); ?>" type="text" value="<?php echo esc_attr( $exclude_zero ); ?>" class="widefat" />
190
- <small><?php _e( 'Option to filter out users with zero balances / results. Use 1 to enable and 0 to disable.', 'mycred' ); ?> </small>
191
  </p>
192
 
193
  <p class="myCRED-widget-field">
@@ -198,24 +198,24 @@ if ( ! class_exists( 'myCRED_Widget_Leaderboard' ) ) :
198
 
199
 
200
 
201
- <?php _e( 'Visible to non-members', 'mycred' ); ?></label>
202
  </p>
203
  <p class="myCRED-widget-field">
204
- <label for="<?php echo esc_attr( $this->get_field_id( 'number' ) ); ?>"><?php _e( 'Number of users', 'mycred' ); ?>:</label>
205
  <input id="<?php echo esc_attr( $this->get_field_id( 'number' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'number' ) ); ?>" type="text" value="<?php echo absint( $number ); ?>" size="3" class="widefat" />
206
  </p>
207
  <p class="myCRED-widget-field">
208
- <label for="<?php echo esc_attr( $this->get_field_id( 'row_layout' ) ); ?>"><?php _e( 'Row layout', 'mycred' ); ?>:</label>
209
  <textarea name="<?php echo esc_attr( $this->get_field_name( 'row_layout' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'row_layout' ) ); ?>" rows="3" cols="20" class="widefat"><?php echo esc_attr( $row_layout ); ?></textarea>
210
  <small><?php echo $mycred->available_template_tags( array( 'general', 'balance' ) ); ?></small>
211
  </p>
212
  <p class="myCRED-widget-field">
213
- <label for="<?php echo esc_attr( $this->get_field_id( 'offset' ) ); ?>"><?php _e( 'Offset', 'mycred' ); ?>:</label>
214
  <input id="<?php echo esc_attr( $this->get_field_id( 'offset' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'offset' ) ); ?>" type="text" value="<?php echo absint( $offset ); ?>" size="3" class="widefat" />
215
- <small><?php _e( 'Optional offset of order. Use zero to return the first in the list.', 'mycred' ); ?></small>
216
  </p>
217
  <p class="myCRED-widget-field">
218
- <label for="<?php echo esc_attr( $this->get_field_id( 'order' ) ); ?>"><?php _e( 'Order', 'mycred' ); ?>:</label>
219
  <select name="<?php echo esc_attr( $this->get_field_name( 'order' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'order' ) ); ?>">
220
  <?php
221
 
@@ -239,18 +239,18 @@ if ( ! class_exists( 'myCRED_Widget_Leaderboard' ) ) :
239
 
240
 
241
 
242
- <?php _e( 'Append current users position', 'mycred' ); ?></label><br />
243
- <small><?php _e( 'If the current user is not in this leaderboard, you can select to append them at the end with their current position.', 'mycred' ); ?></small>
244
  </p>
245
  <p class="myCRED-widget-field">
246
- <label for="<?php echo esc_attr( $this->get_field_id( 'timeframe' ) ); ?>"><?php _e( 'Timeframe', 'mycred' ); ?>:</label>
247
  <input id="<?php echo esc_attr( $this->get_field_id( 'timeframe' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'timeframe' ) ); ?>" type="text" value="<?php echo esc_attr( $timeframe ); ?>" size="3" class="widefat" />
248
- <small><?php _e( 'Option to limit the leaderboard based on a specific timeframe. Leave empty if not used.', 'mycred' ); ?></small>
249
  </p>
250
  <p class="myCRED-widget-field">
251
- <label for="<?php echo esc_attr( $this->get_field_id( 'exclude' ) ); ?>"><?php _e( 'Exclude Users', 'mycred' ); ?>:</label>
252
  <input id="<?php echo esc_attr( $this->get_field_id( 'exclude' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'exclude' ) ); ?>" type="text" value="<?php echo esc_attr( $exclude ); ?>" size="3" class="widefat" />
253
- <small><?php _e( 'Option to exclude users from leaderboard based on a specific role or id. Leave empty if not used. Use comma seperated values for Role or ID', 'mycred' ); ?></small>
254
  </p>
255
  <?php
256
 
147
 
148
  ?>
149
  <p class="myCRED-widget-field">
150
+ <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php esc_html_e( 'Title', 'mycred' ); ?>:</label>
151
  <input id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" class="widefat" />
152
  </p>
153
 
154
  <?php if ( count( $mycred_types ) > 1 ) : ?>
155
  <p class="myCRED-widget-field">
156
+ <label for="<?php echo esc_attr( $this->get_field_id( 'type' ) ); ?>"><?php esc_html_e( 'Point Type', 'mycred' ); ?>:</label>
157
  <?php mycred_types_select_from_dropdown( $this->get_field_name( 'type' ), $this->get_field_id( 'type' ), $type ); ?>
158
  </p>
159
  <?php else : ?>
161
  <?php endif; ?>
162
 
163
  <p class="myCRED-widget-field">
164
+ <label for="<?php echo esc_attr( $this->get_field_id( 'based_on' ) ); ?>"><?php esc_html_e( 'Based On', 'mycred' ); ?>:</label>
165
  <input id="<?php echo esc_attr( $this->get_field_id( 'based_on' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'based_on' ) ); ?>" type="text" value="<?php echo esc_attr( $based_on ); ?>" class="widefat" />
166
+ <small><?php esc_html_e( 'Use "balance" to base the leaderboard on your users current balances or use a specific reference.', 'mycred' ); ?> <a href="http://codex.mycred.me/chapter-vi/log-references/" target="_blank"><?php esc_html_e( 'Reference Guide', 'mycred' ); ?></a></small>
167
  </p>
168
 
169
  <p class="myCRED-widget-field">
170
+ <label for="<?php echo esc_attr( $this->get_field_id( 'total' ) ); ?>"><?php esc_html_e( 'Total', 'mycred' ); ?>:</label>
171
  <input id="<?php echo esc_attr( $this->get_field_id( 'total' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'total' ) ); ?>" type="text" value="<?php echo esc_attr( $total ); ?>" class="widefat" />
172
+ <small><?php esc_html_e( 'When showing a leaderboard based on balances, you can select to use users total balance (1) instead of their current balance (0).', 'mycred' ); ?> </small>
173
  </p>
174
 
175
  <p class="myCRED-widget-field">
176
+ <label for="<?php echo esc_attr( $this->get_field_id( 'wrap' ) ); ?>"><?php esc_html_e( 'Wrap', 'mycred' ); ?>:</label>
177
  <input id="<?php echo esc_attr( $this->get_field_id( 'wrap' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'wrap' ) ); ?>" type="text" value="<?php echo esc_attr( $wrap ); ?>" class="widefat" />
178
+ <small><?php esc_html_e( 'The wrapping element to use for the list. By default the leaderboard renders an organized list (ol) and each item uses a list element (li).', 'mycred' ); ?> </small>
179
  </p>
180
 
181
  <p class="myCRED-widget-field">
182
+ <label for="<?php echo esc_attr( $this->get_field_id( 'nothing' ) ); ?>"><?php esc_html_e( 'Nothing', 'mycred' ); ?>:</label>
183
  <input id="<?php echo esc_attr( $this->get_field_id( 'nothing' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'nothing' ) ); ?>" type="text" value="<?php echo esc_attr( $nothing ); ?>" class="widefat" />
184
+ <small><?php esc_html_e( 'The message to show users when the leaderboard is empty.', 'mycred' ); ?></small>
185
  </p>
186
 
187
  <p class="myCRED-widget-field">
188
+ <label for="<?php echo esc_attr( $this->get_field_id( 'exclude_zero' ) ); ?>"><?php esc_html_e( 'Exclude Zero', 'mycred' ); ?>:</label>
189
  <input id="<?php echo esc_attr( $this->get_field_id( 'exclude_zero' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'exclude_zero' ) ); ?>" type="text" value="<?php echo esc_attr( $exclude_zero ); ?>" class="widefat" />
190
+ <small><?php esc_html_e( 'Option to filter out users with zero balances / results. Use 1 to enable and 0 to disable.', 'mycred' ); ?> </small>
191
  </p>
192
 
193
  <p class="myCRED-widget-field">
198
 
199
 
200
 
201
+ <?php esc_html_e( 'Visible to non-members', 'mycred' ); ?></label>
202
  </p>
203
  <p class="myCRED-widget-field">
204
+ <label for="<?php echo esc_attr( $this->get_field_id( 'number' ) ); ?>"><?php esc_html_e( 'Number of users', 'mycred' ); ?>:</label>
205
  <input id="<?php echo esc_attr( $this->get_field_id( 'number' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'number' ) ); ?>" type="text" value="<?php echo absint( $number ); ?>" size="3" class="widefat" />
206
  </p>
207
  <p class="myCRED-widget-field">
208
+ <label for="<?php echo esc_attr( $this->get_field_id( 'row_layout' ) ); ?>"><?php esc_html_e( 'Row layout', 'mycred' ); ?>:</label>
209
  <textarea name="<?php echo esc_attr( $this->get_field_name( 'row_layout' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'row_layout' ) ); ?>" rows="3" cols="20" class="widefat"><?php echo esc_attr( $row_layout ); ?></textarea>
210
  <small><?php echo $mycred->available_template_tags( array( 'general', 'balance' ) ); ?></small>
211
  </p>
212
  <p class="myCRED-widget-field">
213
+ <label for="<?php echo esc_attr( $this->get_field_id( 'offset' ) ); ?>"><?php esc_html_e( 'Offset', 'mycred' ); ?>:</label>
214
  <input id="<?php echo esc_attr( $this->get_field_id( 'offset' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'offset' ) ); ?>" type="text" value="<?php echo absint( $offset ); ?>" size="3" class="widefat" />
215
+ <small><?php esc_html_e( 'Optional offset of order. Use zero to return the first in the list.', 'mycred' ); ?></small>
216
  </p>
217
  <p class="myCRED-widget-field">
218
+ <label for="<?php echo esc_attr( $this->get_field_id( 'order' ) ); ?>"><?php esc_html_e( 'Order', 'mycred' ); ?>:</label>
219
  <select name="<?php echo esc_attr( $this->get_field_name( 'order' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'order' ) ); ?>">
220
  <?php
221
 
239
 
240
 
241
 
242
+ <?php esc_html_e( 'Append current users position', 'mycred' ); ?></label><br />
243
+ <small><?php esc_html_e( 'If the current user is not in this leaderboard, you can select to append them at the end with their current position.', 'mycred' ); ?></small>
244
  </p>
245
  <p class="myCRED-widget-field">
246
+ <label for="<?php echo esc_attr( $this->get_field_id( 'timeframe' ) ); ?>"><?php esc_html_e( 'Timeframe', 'mycred' ); ?>:</label>
247
  <input id="<?php echo esc_attr( $this->get_field_id( 'timeframe' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'timeframe' ) ); ?>" type="text" value="<?php echo esc_attr( $timeframe ); ?>" size="3" class="widefat" />
248
+ <small><?php esc_html_e( 'Option to limit the leaderboard based on a specific timeframe. Leave empty if not used.', 'mycred' ); ?></small>
249
  </p>
250
  <p class="myCRED-widget-field">
251
+ <label for="<?php echo esc_attr( $this->get_field_id( 'exclude' ) ); ?>"><?php esc_html_e( 'Exclude Users', 'mycred' ); ?>:</label>
252
  <input id="<?php echo esc_attr( $this->get_field_id( 'exclude' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'exclude' ) ); ?>" type="text" value="<?php echo esc_attr( $exclude ); ?>" size="3" class="widefat" />
253
+ <small><?php esc_html_e( 'Option to exclude users from leaderboard based on a specific role or id. Leave empty if not used. Use comma seperated values for Role or ID', 'mycred' ); ?></small>
254
  </p>
255
  <?php
256
 
includes/widgets/mycred-widget-wallet.php CHANGED
@@ -114,30 +114,30 @@ if ( ! class_exists( 'myCRED_Widget_Wallet' ) ) :
114
  ?>
115
  <!-- Widget Options -->
116
  <p class="myCRED-widget-field">
117
- <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php _e( 'Title', 'mycred' ); ?>:</label>
118
  <input id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" class="widefat" />
119
  </p>
120
 
121
  <!-- Point Type -->
122
  <p class="myCRED-widget-field">
123
- <label for="<?php echo esc_attr( $this->get_field_id( 'types' ) ); ?>"><?php _e( 'Point Types', 'mycred' ); ?>:</label><br />
124
  <?php mycred_types_select_from_checkboxes( $this->get_field_name( 'types' ) . '[]', $this->get_field_id( 'types' ), $types ); ?>
125
  </p>
126
 
127
  <!-- Row layout -->
128
  <p class="myCRED-widget-field">
129
- <label for="<?php echo esc_attr( $this->get_field_id( 'row' ) ); ?>"><?php _e( 'Row Layout', 'mycred' ); ?>:</label>
130
  <textarea name="<?php echo esc_attr( $this->get_field_name( 'row' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'row' ) ); ?>" rows="3" cols="20" class="widefat"><?php echo esc_attr( $row_template ); ?></textarea>
131
  <small><?php echo $mycred->available_template_tags( array( 'general', 'amount' ) ); ?></small>
132
  </p>
133
 
134
  <!-- Show to Visitors -->
135
  <p class="myCRED-widget-field">
136
- <label for="<?php echo esc_attr( $this->get_field_id( 'show_visitors' ) ); ?>"><input type="checkbox" name="<?php echo esc_attr( $this->get_field_name( 'show_visitors' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'show_visitors' ) ); ?>" value="1"<?php checked( $show_visitors, 1 ); ?> class="checkbox" /> <?php _e( 'Show message when not logged in', 'mycred' ); ?></label>
137
  </p>
138
  <div id="<?php echo esc_attr( $this->get_field_id( 'show_visitors' ) ); ?>-details" class="mycred-hidden<?php if ( $show_visitors == 1 ) echo ' ex-field'; ?>">
139
  <p class="myCRED-widget-field">
140
- <label for="<?php echo esc_attr( $this->get_field_id( 'message' ) ); ?>"><?php _e( 'Message', 'mycred' ); ?>:</label>
141
  <textarea name="<?php echo esc_attr( $this->get_field_name( 'message' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'message' ) ); ?>" rows="3" cols="20" class="widefat"><?php echo esc_attr( $message ); ?></textarea>
142
  <small><?php echo $mycred->available_template_tags( array( 'general', 'amount' ) ); ?></small>
143
  </p>
114
  ?>
115
  <!-- Widget Options -->
116
  <p class="myCRED-widget-field">
117
+ <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php esc_html_e( 'Title', 'mycred' ); ?>:</label>
118
  <input id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" class="widefat" />
119
  </p>
120
 
121
  <!-- Point Type -->
122
  <p class="myCRED-widget-field">
123
+ <label for="<?php echo esc_attr( $this->get_field_id( 'types' ) ); ?>"><?php esc_html_e( 'Point Types', 'mycred' ); ?>:</label><br />
124
  <?php mycred_types_select_from_checkboxes( $this->get_field_name( 'types' ) . '[]', $this->get_field_id( 'types' ), $types ); ?>
125
  </p>
126
 
127
  <!-- Row layout -->
128
  <p class="myCRED-widget-field">
129
+ <label for="<?php echo esc_attr( $this->get_field_id( 'row' ) ); ?>"><?php esc_html_e( 'Row Layout', 'mycred' ); ?>:</label>
130
  <textarea name="<?php echo esc_attr( $this->get_field_name( 'row' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'row' ) ); ?>" rows="3" cols="20" class="widefat"><?php echo esc_attr( $row_template ); ?></textarea>
131
  <small><?php echo $mycred->available_template_tags( array( 'general', 'amount' ) ); ?></small>
132
  </p>
133
 
134
  <!-- Show to Visitors -->
135
  <p class="myCRED-widget-field">
136
+ <label for="<?php echo esc_attr( $this->get_field_id( 'show_visitors' ) ); ?>"><input type="checkbox" name="<?php echo esc_attr( $this->get_field_name( 'show_visitors' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'show_visitors' ) ); ?>" value="1"<?php checked( $show_visitors, 1 ); ?> class="checkbox" /> <?php esc_html_e( 'Show message when not logged in', 'mycred' ); ?></label>
137
  </p>
138
  <div id="<?php echo esc_attr( $this->get_field_id( 'show_visitors' ) ); ?>-details" class="mycred-hidden<?php if ( $show_visitors == 1 ) echo ' ex-field'; ?>">
139
  <p class="myCRED-widget-field">
140
+ <label for="<?php echo esc_attr( $this->get_field_id( 'message' ) ); ?>"><?php esc_html_e( 'Message', 'mycred' ); ?>:</label>
141
  <textarea name="<?php echo esc_attr( $this->get_field_name( 'message' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'message' ) ); ?>" rows="3" cols="20" class="widefat"><?php echo esc_attr( $message ); ?></textarea>
142
  <small><?php echo $mycred->available_template_tags( array( 'general', 'amount' ) ); ?></small>
143
  </p>
membership/mycred-connect-membership.php CHANGED
@@ -278,7 +278,7 @@ if ( ! class_exists( 'myCRED_Connect_Membership' ) ) :
278
  <div class="wrap">
279
  <div class="mmc_welcome">
280
  <div class="mmc_welcome_content">
281
- <div class="mmc_title"><?php _e( 'Welcome to myCred Premium Club', 'mycred' ); ?></div>
282
  <form action="#" method="post">
283
  <?php
284
  if(mycred_is_valid_license_key( $membership_key )) {
@@ -292,9 +292,9 @@ if ( ! class_exists( 'myCRED_Connect_Membership' ) ) :
292
 
293
  ?>
294
 
295
- <input type="text" name="mmc_lincense_key" class="mmc_lincense_key" placeholder="<?php _e( 'Add Your License key', 'mycred' ); ?>" value="<?php echo $membership_key?>">
296
  <input type="submit" class="mmc_save_license button-primary" value="Save"/>
297
- <div class="mmc_license_link"><a href="https://mycred.me/redirect-to-membership/" target="_blank"><span class="dashicons dashicons-editor-help"></span><?php _e('Click here to get your License Key','mycred') ?></a>
298
  </div>
299
  <div class="mmc_license_link">
300
 
278
  <div class="wrap">
279
  <div class="mmc_welcome">
280
  <div class="mmc_welcome_content">
281
+ <div class="mmc_title"><?php esc_html_e( 'Welcome to myCred Premium Club', 'mycred' ); ?></div>
282
  <form action="#" method="post">
283
  <?php
284
  if(mycred_is_valid_license_key( $membership_key )) {
292
 
293
  ?>
294
 
295
+ <input type="text" name="mmc_lincense_key" class="mmc_lincense_key" placeholder="<?php esc_attr_e( 'Add Your License key', 'mycred' ); ?>" value="<?php echo $membership_key?>">
296
  <input type="submit" class="mmc_save_license button-primary" value="Save"/>
297
+ <div class="mmc_license_link"><a href="https://mycred.me/redirect-to-membership/" target="_blank"><span class="dashicons dashicons-editor-help"></span><?php esc_html_e('Click here to get your License Key','mycred') ?></a>
298
  </div>
299
  <div class="mmc_license_link">
300
 
modules/mycred-module-addons.php CHANGED
@@ -495,7 +495,7 @@ $premium_addons_url = get_mycred_addon_page_url('premium_addons');
495
  <div class="wrap" id="myCRED-wrap">
496
  <div class="mycred-addon-outer">
497
  <div class="myCRED-addon-heading">
498
- <h1><?php _e( 'Add-ons', 'mycred' ); if ( MYCRED_DEFAULT_LABEL === 'myCRED' ) : ?> <a href="http://codex.mycred.me/chapter-iii/" class="page-title-action" target="_blank"><?php _e( 'Documentation', 'mycred' ); ?></a><?php endif; ?></h1>
499
  </div>
500
  <?php
501
  if( !isset( $_GET['mycred_addons'] ) ){ ?>
@@ -505,7 +505,7 @@ $premium_addons_url = get_mycred_addon_page_url('premium_addons');
505
  <input type="checkbox" name="mycred-addons-checkbox" id="mycred-addons-checkbox" <?php echo $this->check_all_addons() ? 'checked' : ''; ?> >
506
  <span class="slider round"></span>
507
  </label>
508
- <p class="mycred-activate"><?php _e( 'Activate/Deactivate All Add-ons', 'mycred' ); ?> </p>
509
  </div>
510
  <?php } ?>
511
 
@@ -715,7 +715,7 @@ else
715
 
716
  <?php endif; ?>
717
 
718
- <a class="more-details" id="<?php echo $aria_action; ?>" href="<?php echo $data['addon_url']; ?>" target="_blank"><?php _e( 'Documentation', 'mycred' ); ?></a>
719
 
720
  <div class="theme-id-container">
721
 
495
  <div class="wrap" id="myCRED-wrap">
496
  <div class="mycred-addon-outer">
497
  <div class="myCRED-addon-heading">
498
+ <h1><?php esc_html_e( 'Add-ons', 'mycred' ); if ( MYCRED_DEFAULT_LABEL === 'myCRED' ) : ?> <a href="http://codex.mycred.me/chapter-iii/" class="page-title-action" target="_blank"><?php esc_html_e( 'Documentation', 'mycred' ); ?></a><?php endif; ?></h1>
499
  </div>
500
  <?php
501
  if( !isset( $_GET['mycred_addons'] ) ){ ?>
505
  <input type="checkbox" name="mycred-addons-checkbox" id="mycred-addons-checkbox" <?php echo $this->check_all_addons() ? 'checked' : ''; ?> >
506
  <span class="slider round"></span>
507
  </label>
508
+ <p class="mycred-activate"><?php esc_html_e( 'Activate/Deactivate All Add-ons', 'mycred' ); ?> </p>
509
  </div>
510
  <?php } ?>
511
 
715
 
716
  <?php endif; ?>
717
 
718
+ <a class="more-details" id="<?php echo $aria_action; ?>" href="<?php echo $data['addon_url']; ?>" target="_blank"><?php esc_html_e( 'Documentation', 'mycred' ); ?></a>
719
 
720
  <div class="theme-id-container">
721
 
modules/mycred-module-buddypress.php CHANGED
@@ -361,7 +361,7 @@ if ( ! class_exists( 'myCRED_BuddyPress_Module' ) ) :
361
  if ( count( $mycred_types ) > 1 ) :
362
 
363
  ?>
364
- <form action="" id="mycred-sort-cred-history-form" method="get"><label><?php _e( 'Show:', 'mycred' ); ?></label> <?php mycred_types_select_from_dropdown( 'show-ctype', 'mycred-select-type', $type ); ?> <input type="submit" class="btn btn-large btn-primary button button-large button-primary" value="<?php _e( 'Go', 'mycred' ); ?>" /></form>
365
  <?php
366
 
367
  endif;
@@ -462,7 +462,7 @@ if ( ! class_exists( 'myCRED_BuddyPress_Module' ) ) :
462
  </div>
463
  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
464
  <div class="form-group">
465
- <label for="<?php echo $this->field_id( 'balance_template' ); ?>"><?php _e( 'Template', 'mycred' ); ?></label>
466
  <input type="text" name="<?php echo $this->field_name( 'balance_template' ); ?>" id="<?php echo $this->field_id( 'balance_template' ); ?>" value="<?php echo esc_attr( $settings['balance_template'] ); ?>" class="form-control" />
467
  <p><span class="description"><?php echo $this->core->available_template_tags( array( 'general', 'balance' ) ); ?></span></p>
468
  </div>
@@ -491,16 +491,16 @@ if ( ! class_exists( 'myCRED_BuddyPress_Module' ) ) :
491
  </div>
492
  <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
493
  <div class="form-group">
494
- <label for="<?php echo $this->field_id( array( 'history_menu_title' => 'me' ) ); ?>"><?php _e( 'Menu Title', 'mycred' ); ?></label>
495
  <input type="text" name="<?php echo $this->field_name( array( 'history_menu_title' => 'me' ) ); ?>" id="<?php echo $this->field_id( array( 'history_menu_title' => 'me' ) ); ?>" value="<?php echo esc_attr( $settings['history_menu_title']['me'] ); ?>" class="form-control" />
496
- <p><span class="description"><?php _e( 'Title shown to me', 'mycred' ); ?></span></p>
497
  </div>
498
  </div>
499
  <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
500
  <div class="form-group">
501
  <label>&nbsp;</label>
502
  <input type="text" name="<?php echo $this->field_name( array( 'history_menu_title' => 'others' ) ); ?>" id="<?php echo $this->field_id( array( 'history_menu_title' => 'others' ) ); ?>" value="<?php echo esc_attr( $settings['history_menu_title']['others'] ); ?>" class="form-control" />
503
- <p><span class="description"><?php _e( 'Title shown to others. Use %s to show the first name.', 'mycred' ); ?></span></p>
504
  </div>
505
  </div>
506
  </div>
@@ -508,21 +508,21 @@ if ( ! class_exists( 'myCRED_BuddyPress_Module' ) ) :
508
  <div class="row">
509
  <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
510
  <div class="form-group">
511
- <label for="<?php echo $this->field_id( 'history_menu_pos' ); ?>"><?php _e( 'Menu Position', 'mycred' ); ?></label>
512
  <input type="text" name="<?php echo $this->field_name( 'history_menu_pos' ); ?>" id="<?php echo $this->field_id( 'history_menu_pos' ); ?>" value="<?php echo esc_attr( $settings['history_menu_pos'] ); ?>" class="form-control" />
513
  <p><span class="description"><?php printf( '%s %s', __( 'Current menu positions:', 'mycred' ), implode( ', ', $bp_nav_positions ) ); ?></span></p>
514
  </div>
515
  </div>
516
  <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
517
  <div class="form-group">
518
- <label for="<?php echo $this->field_id( 'history_url' ); ?>"><?php _e( 'History URL slug', 'mycred' ); ?></label>
519
  <input type="text" name="<?php echo $this->field_name( 'history_url' ); ?>" id="<?php echo $this->field_id( 'history_url' ); ?>" value="<?php echo esc_attr( $settings['history_url'] ); ?>" class="form-control" />
520
- <p><span class="description"><?php _e( 'The history page slug. Must be URL friendly.', 'mycred' ); ?></span></p>
521
  </div>
522
  </div>
523
  <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
524
  <div class="form-group">
525
- <label for="<?php echo $this->field_id( 'history_num' ); ?>"><?php _e( 'Number of history entries to show', 'mycred' ); ?></label>
526
  <input type="text" name="<?php echo $this->field_name( 'history_num' ); ?>" id="<?php echo $this->field_id( 'history_num' ); ?>" value="<?php echo esc_attr( $settings['history_num'] ); ?>" class="form-control" />
527
  </div>
528
  </div>
361
  if ( count( $mycred_types ) > 1 ) :
362
 
363
  ?>
364
+ <form action="" id="mycred-sort-cred-history-form" method="get"><label><?php esc_html_e( 'Show:', 'mycred' ); ?></label> <?php mycred_types_select_from_dropdown( 'show-ctype', 'mycred-select-type', $type ); ?> <input type="submit" class="btn btn-large btn-primary button button-large button-primary" value="<?php esc_attr_e( 'Go', 'mycred' ); ?>" /></form>
365
  <?php
366
 
367
  endif;
462
  </div>
463
  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
464
  <div class="form-group">
465
+ <label for="<?php echo $this->field_id( 'balance_template' ); ?>"><?php esc_html_e( 'Template', 'mycred' ); ?></label>
466
  <input type="text" name="<?php echo $this->field_name( 'balance_template' ); ?>" id="<?php echo $this->field_id( 'balance_template' ); ?>" value="<?php echo esc_attr( $settings['balance_template'] ); ?>" class="form-control" />
467
  <p><span class="description"><?php echo $this->core->available_template_tags( array( 'general', 'balance' ) ); ?></span></p>
468
  </div>
491
  </div>
492
  <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
493
  <div class="form-group">
494
+ <label for="<?php echo $this->field_id( array( 'history_menu_title' => 'me' ) ); ?>"><?php esc_html_e( 'Menu Title', 'mycred' ); ?></label>
495
  <input type="text" name="<?php echo $this->field_name( array( 'history_menu_title' => 'me' ) ); ?>" id="<?php echo $this->field_id( array( 'history_menu_title' => 'me' ) ); ?>" value="<?php echo esc_attr( $settings['history_menu_title']['me'] ); ?>" class="form-control" />
496
+ <p><span class="description"><?php esc_html_e( 'Title shown to me', 'mycred' ); ?></span></p>
497
  </div>
498
  </div>
499
  <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
500
  <div class="form-group">
501
  <label>&nbsp;</label>
502
  <input type="text" name="<?php echo $this->field_name( array( 'history_menu_title' => 'others' ) ); ?>" id="<?php echo $this->field_id( array( 'history_menu_title' => 'others' ) ); ?>" value="<?php echo esc_attr( $settings['history_menu_title']['others'] ); ?>" class="form-control" />
503
+ <p><span class="description"><?php esc_html_e( 'Title shown to others. Use %s to show the first name.', 'mycred' ); ?></span></p>
504
  </div>
505
  </div>
506
  </div>
508
  <div class="row">
509
  <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
510
  <div class="form-group">
511
+ <label for="<?php echo $this->field_id( 'history_menu_pos' ); ?>"><?php esc_html_e( 'Menu Position', 'mycred' ); ?></label>
512
  <input type="text" name="<?php echo $this->field_name( 'history_menu_pos' ); ?>" id="<?php echo $this->field_id( 'history_menu_pos' ); ?>" value="<?php echo esc_attr( $settings['history_menu_pos'] ); ?>" class="form-control" />
513
  <p><span class="description"><?php printf( '%s %s', __( 'Current menu positions:', 'mycred' ), implode( ', ', $bp_nav_positions ) ); ?></span></p>
514
  </div>
515
  </div>
516
  <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
517
  <div class="form-group">
518
+ <label for="<?php echo $this->field_id( 'history_url' ); ?>"><?php esc_html_e( 'History URL slug', 'mycred' ); ?></label>
519
  <input type="text" name="<?php echo $this->field_name( 'history_url' ); ?>" id="<?php echo $this->field_id( 'history_url' ); ?>" value="<?php echo esc_attr( $settings['history_url'] ); ?>" class="form-control" />
520
+ <p><span class="description"><?php esc_html_e( 'The history page slug. Must be URL friendly.', 'mycred' ); ?></span></p>
521
  </div>
522
  </div>
523
  <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
524
  <div class="form-group">
525
+ <label for="<?php echo $this->field_id( 'history_num' ); ?>"><?php esc_html_e( 'Number of history entries to show', 'mycred' ); ?></label>
526
  <input type="text" name="<?php echo $this->field_name( 'history_num' ); ?>" id="<?php echo $this->field_id( 'history_num' ); ?>" value="<?php echo esc_attr( $settings['history_num'] ); ?>" class="form-control" />
527
  </div>
528
  </div>
modules/mycred-module-caching.php CHANGED
@@ -250,54 +250,54 @@ if ( ! class_exists( 'myCRED_Caching_Module' ) ) :
250
  public function after_general_settings( $mycred = NULL ) {
251
 
252
  ?>
253
- <h4 <?php echo get_current_screen()->base != 'toplevel_page_mycred-main' ? '' : 'style="display:none"';?>><span class="dashicons dashicons-admin-tools static"></span><?php _e( 'Optimization', 'mycred' ); ?></h4>
254
  <div class="body" style="display:none;">
255
 
256
  <?php if ( $this->mycred_type == MYCRED_DEFAULT_TYPE_KEY ) : ?>
257
  <div class="row">
258
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
259
  <div class="form-group">
260
- <label><?php _e( 'History', 'mycred' ); ?></label>
261
  <div class="radio">
262
- <label for="<?php echo $this->field_id( 'caching-off' ); ?>"><input type="radio" name="<?php echo $this->field_name( array( 'caching', 'history' ) ); ?>" id="<?php echo $this->field_id( 'caching-off' ); ?>"<?php checked( $this->caching['history'], 'off' ); ?> value="off" /> <?php _e( 'No caching', 'mycred' ); ?></label>
263
  </div>
264
  <div class="radio">
265
- <label for="<?php echo $this->field_id( 'caching-event' ); ?>"><input type="radio" name="<?php echo $this->field_name( array( 'caching', 'history' ) ); ?>" id="<?php echo $this->field_id( 'caching-event' ); ?>"<?php checked( $this->caching['history'], 'event' ); ?> value="event" /> <?php _e( 'Clear cache each time a users balance changes', 'mycred' ); ?></label>
266
  </div>
267
  <div class="radio">
268
- <label for="<?php echo $this->field_id( 'caching-day' ); ?>"><input type="radio" name="<?php echo $this->field_name( array( 'caching', 'history' ) ); ?>" id="<?php echo $this->field_id( 'caching-day' ); ?>"<?php checked( $this->caching['history'], 'day' ); ?> value="day" /> <?php _e( 'Clear cache once a day', 'mycred' ); ?></label>
269
  </div>
270
  <div class="radio">
271
- <label for="<?php echo $this->field_id( 'caching-manual' ); ?>"><input type="radio" name="<?php echo $this->field_name( array( 'caching', 'history' ) ); ?>" id="<?php echo $this->field_id( 'caching-manual' ); ?>"<?php checked( $this->caching['history'], 'manual' ); ?> value="manual" /> <?php _e( 'Clear cache manually', 'mycred' ); ?></label>
272
  </div>
273
  <hr />
274
- <button type="button" data-cache="history" data-type="<?php echo esc_attr( $this->mycred_type ); ?>" class="button clear-type-cache-button"<?php if ( $this->caching['history'] == 'off' ) echo ' disabled="disabled"'; ?> id=""><?php _e( 'Clear Cache Now', 'mycred' ); ?></button>
275
  </div>
276
  </div>
277
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
278
  <div class="form-group">
279
- <label><?php _e( 'Leaderboards', 'mycred' ); ?></label>
280
  <div class="radio">
281
- <label for="<?php echo $this->field_id( 'leaderboard-caching-off' ); ?>"><input type="radio" name="<?php echo $this->field_name( array( 'caching', 'leaderboards' ) ); ?>" id="<?php echo $this->field_id( 'leaderboard-caching-off' ); ?>"<?php checked( $this->caching['leaderboards'], 'off' ); ?> value="off" /> <?php _e( 'No caching', 'mycred' ); ?></label>
282
  </div>
283
  <div class="radio">
284
- <label for="<?php echo $this->field_id( 'leaderboard-caching-event' ); ?>"><input type="radio" name="<?php echo $this->field_name( array( 'caching', 'leaderboards' ) ); ?>" id="<?php echo $this->field_id( 'leaderboard-caching-event' ); ?>"<?php checked( $this->caching['leaderboards'], 'event' ); ?> value="event" /> <?php _e( 'Clear cache each time a users balance changes', 'mycred' ); ?></label>
285
  </div>
286
  <div class="radio">
287
- <label for="<?php echo $this->field_id( 'leaderboard-caching-day' ); ?>"><input type="radio" name="<?php echo $this->field_name( array( 'caching', 'leaderboards' ) ); ?>" id="<?php echo $this->field_id( 'leaderboard-caching-day' ); ?>"<?php checked( $this->caching['leaderboards'], 'day' ); ?> value="day" /> <?php _e( 'Clear cache once a day', 'mycred' ); ?></label>
288
  </div>
289
  <div class="radio">
290
- <label for="<?php echo $this->field_id( 'leaderboard-caching-manual' ); ?>"><input type="radio" name="<?php echo $this->field_name( array( 'caching', 'leaderboards' ) ); ?>" id="<?php echo $this->field_id( 'leaderboard-caching-manual' ); ?>"<?php checked( $this->caching['leaderboards'], 'manual' ); ?> value="manual" /> <?php _e( 'Clear cache manually', 'mycred' ); ?></label>
291
  </div>
292
  <hr />
293
- <button type="button" data-cache="leaderboards" data-type="<?php echo esc_attr( $this->mycred_type ); ?>" class="button clear-type-cache-button"<?php if ( $this->caching['leaderboards'] == 'off' ) echo ' disabled="disabled"'; ?> id=""><?php _e( 'Clear Cache Now', 'mycred' ); ?></button>
294
  </div>
295
  </div>
296
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
297
  <div class="form-group">
298
- <label for="<?php echo $this->field_id( 'auto-delete' ); ?>"><?php _e( 'Auto Delete Log Entries', 'mycred' ); ?></label>
299
  <?php if ( ! MYCRED_ENABLE_LOGGING ) : ?>
300
- <p><span class="description"><?php _e( 'Log disabled', 'mycred' ); ?></span></p>
301
  <?php else : ?>
302
  <input type="text" name="<?php echo $this->field_name( array( 'caching', 'autodelete' ) ); ?>" id="<?php echo $this->field_id( 'auto-delete' ); ?>" value="<?php echo esc_attr( $this->caching['autodelete'] ); ?>" placeholder="days" class="form-control" />
303
  <p><span class="description"><?php printf( _x( "Option to automatically delete log entries after certain number of days. Please read the %s before using this feature as it's use has consequences! Use zero to disable.", 'documentation', 'mycred' ), sprintf( '<a href="http://codex.mycred.me/chapter-i/caching/" target="_blank">%s</a>', __( 'documentation', 'mycred' ) ) ); ?></span></p>
@@ -309,9 +309,9 @@ if ( ! class_exists( 'myCRED_Caching_Module' ) ) :
309
  <div class="row">
310
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
311
  <div class="form-group">
312
- <label for="<?php echo $this->field_id( 'auto-delete' ); ?>"><?php _e( 'Auto Delete Log Entries', 'mycred' ); ?></label>
313
  <?php if ( ! MYCRED_ENABLE_LOGGING ) : ?>
314
- <p><span class="description"><?php _e( 'Log disabled', 'mycred' ); ?></span></p>
315
  <?php else : ?>
316
  <input type="text" name="<?php echo $this->field_name( array( 'caching', 'autodelete' ) ); ?>" id="<?php echo $this->field_id( 'auto-delete' ); ?>" value="<?php echo esc_attr( $this->caching['autodelete'] ); ?>" placeholder="days" class="form-control" />
317
  <p><span class="description"><?php printf( _x( "Option to automatically delete log entries after certain number of days. Please read the %s before using this feature as it's use has consequences! Use zero to disable.", 'documentation', 'mycred' ), sprintf( '<a href="http://codex.mycred.me/chapter-i/caching/" target="_blank">%s</a>', __( 'documentation', 'mycred' ) ) ); ?></span></p>
250
  public function after_general_settings( $mycred = NULL ) {
251
 
252
  ?>
253
+ <h4 <?php echo get_current_screen()->base != 'toplevel_page_mycred-main' ? '' : 'style="display:none"';?>><span class="dashicons dashicons-admin-tools static"></span><?php esc_html_e( 'Optimization', 'mycred' ); ?></h4>
254
  <div class="body" style="display:none;">
255
 
256
  <?php if ( $this->mycred_type == MYCRED_DEFAULT_TYPE_KEY ) : ?>
257
  <div class="row">
258
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
259
  <div class="form-group">
260
+ <label><?php esc_html_e( 'History', 'mycred' ); ?></label>
261
  <div class="radio">
262
+ <label for="<?php echo $this->field_id( 'caching-off' ); ?>"><input type="radio" name="<?php echo $this->field_name( array( 'caching', 'history' ) ); ?>" id="<?php echo $this->field_id( 'caching-off' ); ?>"<?php checked( $this->caching['history'], 'off' ); ?> value="off" /> <?php esc_html_e( 'No caching', 'mycred' ); ?></label>
263
  </div>
264
  <div class="radio">
265
+ <label for="<?php echo $this->field_id( 'caching-event' ); ?>"><input type="radio" name="<?php echo $this->field_name( array( 'caching', 'history' ) ); ?>" id="<?php echo $this->field_id( 'caching-event' ); ?>"<?php checked( $this->caching['history'], 'event' ); ?> value="event" /> <?php esc_html_e( 'Clear cache each time a users balance changes', 'mycred' ); ?></label>
266
  </div>
267
  <div class="radio">
268
+ <label for="<?php echo $this->field_id( 'caching-day' ); ?>"><input type="radio" name="<?php echo $this->field_name( array( 'caching', 'history' ) ); ?>" id="<?php echo $this->field_id( 'caching-day' ); ?>"<?php checked( $this->caching['history'], 'day' ); ?> value="day" /> <?php esc_html_e( 'Clear cache once a day', 'mycred' ); ?></label>
269
  </div>
270
  <div class="radio">
271
+ <label for="<?php echo $this->field_id( 'caching-manual' ); ?>"><input type="radio" name="<?php echo $this->field_name( array( 'caching', 'history' ) ); ?>" id="<?php echo $this->field_id( 'caching-manual' ); ?>"<?php checked( $this->caching['history'], 'manual' ); ?> value="manual" /> <?php esc_html_e( 'Clear cache manually', 'mycred' ); ?></label>
272
  </div>
273
  <hr />
274
+ <button type="button" data-cache="history" data-type="<?php echo esc_attr( $this->mycred_type ); ?>" class="button clear-type-cache-button"<?php if ( $this->caching['history'] == 'off' ) echo ' disabled="disabled"'; ?> id=""><?php esc_html_e( 'Clear Cache Now', 'mycred' ); ?></button>
275
  </div>
276
  </div>
277
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
278
  <div class="form-group">
279
+ <label><?php esc_html_e( 'Leaderboards', 'mycred' ); ?></label>
280
  <div class="radio">
281
+ <label for="<?php echo $this->field_id( 'leaderboard-caching-off' ); ?>"><input type="radio" name="<?php echo $this->field_name( array( 'caching', 'leaderboards' ) ); ?>" id="<?php echo $this->field_id( 'leaderboard-caching-off' ); ?>"<?php checked( $this->caching['leaderboards'], 'off' ); ?> value="off" /> <?php esc_html_e( 'No caching', 'mycred' ); ?></label>
282
  </div>
283
  <div class="radio">
284
+ <label for="<?php echo $this->field_id( 'leaderboard-caching-event' ); ?>"><input type="radio" name="<?php echo $this->field_name( array( 'caching', 'leaderboards' ) ); ?>" id="<?php echo $this->field_id( 'leaderboard-caching-event' ); ?>"<?php checked( $this->caching['leaderboards'], 'event' ); ?> value="event" /> <?php esc_html_e( 'Clear cache each time a users balance changes', 'mycred' ); ?></label>
285
  </div>
286
  <div class="radio">
287
+ <label for="<?php echo $this->field_id( 'leaderboard-caching-day' ); ?>"><input type="radio" name="<?php echo $this->field_name( array( 'caching', 'leaderboards' ) ); ?>" id="<?php echo $this->field_id( 'leaderboard-caching-day' ); ?>"<?php checked( $this->caching['leaderboards'], 'day' ); ?> value="day" /> <?php esc_html_e( 'Clear cache once a day', 'mycred' ); ?></label>
288
  </div>
289
  <div class="radio">
290
+ <label for="<?php echo $this->field_id( 'leaderboard-caching-manual' ); ?>"><input type="radio" name="<?php echo $this->field_name( array( 'caching', 'leaderboards' ) ); ?>" id="<?php echo $this->field_id( 'leaderboard-caching-manual' ); ?>"<?php checked( $this->caching['leaderboards'], 'manual' ); ?> value="manual" /> <?php esc_html_e( 'Clear cache manually', 'mycred' ); ?></label>
291
  </div>
292
  <hr />
293
+ <button type="button" data-cache="leaderboards" data-type="<?php echo esc_attr( $this->mycred_type ); ?>" class="button clear-type-cache-button"<?php if ( $this->caching['leaderboards'] == 'off' ) echo ' disabled="disabled"'; ?> id=""><?php esc_html_e( 'Clear Cache Now', 'mycred' ); ?></button>
294
  </div>
295
  </div>
296
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
297
  <div class="form-group">
298
+ <label for="<?php echo $this->field_id( 'auto-delete' ); ?>"><?php esc_html_e( 'Auto Delete Log Entries', 'mycred' ); ?></label>
299
  <?php if ( ! MYCRED_ENABLE_LOGGING ) : ?>
300
+ <p><span class="description"><?php esc_html_e( 'Log disabled', 'mycred' ); ?></span></p>
301
  <?php else : ?>
302
  <input type="text" name="<?php echo $this->field_name( array( 'caching', 'autodelete' ) ); ?>" id="<?php echo $this->field_id( 'auto-delete' ); ?>" value="<?php echo esc_attr( $this->caching['autodelete'] ); ?>" placeholder="days" class="form-control" />
303
  <p><span class="description"><?php printf( _x( "Option to automatically delete log entries after certain number of days. Please read the %s before using this feature as it's use has consequences! Use zero to disable.", 'documentation', 'mycred' ), sprintf( '<a href="http://codex.mycred.me/chapter-i/caching/" target="_blank">%s</a>', __( 'documentation', 'mycred' ) ) ); ?></span></p>
309
  <div class="row">
310
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
311
  <div class="form-group">
312
+ <label for="<?php echo $this->field_id( 'auto-delete' ); ?>"><?php esc_html_e( 'Auto Delete Log Entries', 'mycred' ); ?></label>
313
  <?php if ( ! MYCRED_ENABLE_LOGGING ) : ?>
314
+ <p><span class="description"><?php esc_html_e( 'Log disabled', 'mycred' ); ?></span></p>
315
  <?php else : ?>
316
  <input type="text" name="<?php echo $this->field_name( array( 'caching', 'autodelete' ) ); ?>" id="<?php echo $this->field_id( 'auto-delete' ); ?>" value="<?php echo esc_attr( $this->caching['autodelete'] ); ?>" placeholder="days" class="form-control" />
317
  <p><span class="description"><?php printf( _x( "Option to automatically delete log entries after certain number of days. Please read the %s before using this feature as it's use has consequences! Use zero to disable.", 'documentation', 'mycred' ), sprintf( '<a href="http://codex.mycred.me/chapter-i/caching/" target="_blank">%s</a>', __( 'documentation', 'mycred' ) ) ); ?></span></p>
modules/mycred-module-export.php CHANGED
@@ -289,7 +289,7 @@ if ( ! class_exists( 'myCRED_Export_Module' ) ) :
289
 
290
  ?>
291
  <div style="display:none;" class="clear" id="export-log-history">
292
- <strong><?php _e( 'Export', 'mycred' ); ?>:</strong>
293
  <div>
294
  <?php
295
 
@@ -311,7 +311,7 @@ if ( ! class_exists( 'myCRED_Export_Module' ) ) :
311
 
312
  ?>
313
  </div>
314
- <p><span class="description"><?php _e( 'Log entries are exported to a CSV file and depending on the number of entries selected, the process may take a few seconds.', 'mycred' ); ?></span></p>
315
  </div>
316
  <script type="text/javascript">
317
  jQuery(function($) {
@@ -339,7 +339,7 @@ jQuery(function($) {
339
 
340
  ?>
341
  <div style="display:none;" class="clear" id="export-log-history">
342
- <strong><?php _e( 'Export', 'mycred' ); ?>:</strong>
343
  <div>
344
  <?php
345
 
@@ -358,7 +358,7 @@ jQuery(function($) {
358
 
359
  ?>
360
  </div>
361
- <p><span class="description"><?php _e( 'Log entries are exported to a CSV file and depending on the number of entries selected, the process may take a few seconds.', 'mycred' ); ?></span></p>
362
  </div>
363
  <script type="text/javascript">
364
  jQuery(function($) {
@@ -386,13 +386,13 @@ jQuery(function($) {
386
  $export_formats = mycred_get_export_formats();
387
  $export_formats['both'] = __( 'Make both format options available.', 'mycred' );
388
  ?>
389
- <h4><span class="dashicons dashicons-admin-plugins static"></span><?php _e( 'Exports', 'mycred' ); ?></h4>
390
  <div class="body" style="display: none;">
391
 
392
  <div class="row">
393
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
394
  <div class="form-group">
395
- <label class="mycred-export-prefs-front-end"><?php _e( 'Front End Exports', 'mycred' ); ?></label>
396
  <select name="mycred_pref_core[export][front]" id="mycred-export-prefs-front-end" class="form-control">
397
  <?php
398
 
@@ -408,7 +408,7 @@ jQuery(function($) {
408
  </div>
409
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
410
  <div class="form-group">
411
- <label for="mycred-export-prefs-front-end-format"><?php _e( 'Export Format', 'mycred' ); ?></label>
412
  <select name="mycred_pref_core[export][front_format]" id="mycred-export-prefs-front-end-format" class="form-control">
413
  <?php
414
 
@@ -424,7 +424,7 @@ jQuery(function($) {
424
  </div>
425
  <div class="col-lg-5 col-md-5 col-sm-12 col-xs-12">
426
  <div class="form-group">
427
- <label for="mycred-export-prefs-front-end-name"><?php _e( 'File Name', 'mycred' ); ?></label>
428
  <input type="text" class="form-control" name="mycred_pref_core[export][front_name]" id="mycred-export-prefs-front-end-name" value="<?php echo esc_attr( $this->export['front_name'] ); ?>" />
429
  <p><span class="description"><?php echo '<code>%point_type%</code> = ' . __( 'Point Type', 'mycred' ) . ', <code>%username%</code> = ' . __( 'Username', 'mycred' ); ?></span></p>
430
  </div>
@@ -440,7 +440,7 @@ jQuery(function($) {
440
  <div class="row">
441
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
442
  <div class="form-group">
443
- <label class="mycred-export-prefs-admin-end"><?php _e( 'Back End Exports', 'mycred' ); ?></label>
444
  <select name="mycred_pref_core[export][admin]" id="mycred-export-prefs-admin-end" class="form-control">
445
  <?php
446
 
@@ -456,7 +456,7 @@ jQuery(function($) {
456
  </div>
457
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
458
  <div class="form-group">
459
- <label for="mycred-export-prefs-admin-end-format"><?php _e( 'Export Format', 'mycred' ); ?></label>
460
  <select name="mycred_pref_core[export][admin_format]" id="mycred-export-prefs-admin-end-format" class="form-control">
461
  <?php
462
 
@@ -472,7 +472,7 @@ jQuery(function($) {
472
  </div>
473
  <div class="col-lg-5 col-md-5 col-sm-12 col-xs-12">
474
  <div class="form-group">
475
- <label for="mycred-export-prefs-admin-end-name"><?php _e( 'File Name', 'mycred' ); ?></label>
476
  <input type="text" class="form-control" name="mycred_pref_core[export][admin_name]" id="mycred-export-prefs-admin-end-name" value="<?php echo esc_attr( $this->export['admin_name'] ); ?>" />
477
  <p><span class="description"><?php echo '<code>%point_type%</code> = ' . __( 'Point Type', 'mycred' ) . ', <code>%username%</code> = ' . __( 'Username', 'mycred' ); ?></span></p>
478
  </div>
@@ -481,7 +481,7 @@ jQuery(function($) {
481
 
482
  <div class="row">
483
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
484
- <p><span class="description"><?php _e( 'Raw format should be used when you intend to use the export tool to backup or import entries in another installation. Formatted exports reflect what users see in their history archive.', 'mycred' ); ?></span></p>
485
  </div>
486
  </div>
487
 
289
 
290
  ?>
291
  <div style="display:none;" class="clear" id="export-log-history">
292
+ <strong><?php esc_html_e( 'Export', 'mycred' ); ?>:</strong>
293
  <div>
294
  <?php
295
 
311
 
312
  ?>
313
  </div>
314
+ <p><span class="description"><?php esc_html_e( 'Log entries are exported to a CSV file and depending on the number of entries selected, the process may take a few seconds.', 'mycred' ); ?></span></p>
315
  </div>
316
  <script type="text/javascript">
317
  jQuery(function($) {
339
 
340
  ?>
341
  <div style="display:none;" class="clear" id="export-log-history">
342
+ <strong><?php esc_html_e( 'Export', 'mycred' ); ?>:</strong>
343
  <div>
344
  <?php
345
 
358
 
359
  ?>
360
  </div>
361
+ <p><span class="description"><?php esc_html_e( 'Log entries are exported to a CSV file and depending on the number of entries selected, the process may take a few seconds.', 'mycred' ); ?></span></p>
362
  </div>
363
  <script type="text/javascript">
364
  jQuery(function($) {
386
  $export_formats = mycred_get_export_formats();
387
  $export_formats['both'] = __( 'Make both format options available.', 'mycred' );
388
  ?>
389
+ <h4><span class="dashicons dashicons-admin-plugins static"></span><?php esc_html_e( 'Exports', 'mycred' ); ?></h4>
390
  <div class="body" style="display: none;">
391
 
392
  <div class="row">
393
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
394
  <div class="form-group">
395
+ <label class="mycred-export-prefs-front-end"><?php esc_html_e( 'Front End Exports', 'mycred' ); ?></label>
396
  <select name="mycred_pref_core[export][front]" id="mycred-export-prefs-front-end" class="form-control">
397
  <?php
398
 
408
  </div>
409
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
410
  <div class="form-group">
411
+ <label for="mycred-export-prefs-front-end-format"><?php esc_html_e( 'Export Format', 'mycred' ); ?></label>
412
  <select name="mycred_pref_core[export][front_format]" id="mycred-export-prefs-front-end-format" class="form-control">
413
  <?php
414
 
424
  </div>
425
  <div class="col-lg-5 col-md-5 col-sm-12 col-xs-12">
426
  <div class="form-group">
427
+ <label for="mycred-export-prefs-front-end-name"><?php esc_html_e( 'File Name', 'mycred' ); ?></label>
428
  <input type="text" class="form-control" name="mycred_pref_core[export][front_name]" id="mycred-export-prefs-front-end-name" value="<?php echo esc_attr( $this->export['front_name'] ); ?>" />
429
  <p><span class="description"><?php echo '<code>%point_type%</code> = ' . __( 'Point Type', 'mycred' ) . ', <code>%username%</code> = ' . __( 'Username', 'mycred' ); ?></span></p>
430
  </div>
440
  <div class="row">
441
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
442
  <div class="form-group">
443
+ <label class="mycred-export-prefs-admin-end"><?php esc_html_e( 'Back End Exports', 'mycred' ); ?></label>
444
  <select name="mycred_pref_core[export][admin]" id="mycred-export-prefs-admin-end" class="form-control">
445
  <?php
446
 
456
  </div>
457
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
458
  <div class="form-group">
459
+ <label for="mycred-export-prefs-admin-end-format"><?php esc_html_e( 'Export Format', 'mycred' ); ?></label>
460
  <select name="mycred_pref_core[export][admin_format]" id="mycred-export-prefs-admin-end-format" class="form-control">
461
  <?php
462
 
472
  </div>
473
  <div class="col-lg-5 col-md-5 col-sm-12 col-xs-12">
474
  <div class="form-group">
475
+ <label for="mycred-export-prefs-admin-end-name"><?php esc_html_e( 'File Name', 'mycred' ); ?></label>
476
  <input type="text" class="form-control" name="mycred_pref_core[export][admin_name]" id="mycred-export-prefs-admin-end-name" value="<?php echo esc_attr( $this->export['admin_name'] ); ?>" />
477
  <p><span class="description"><?php echo '<code>%point_type%</code> = ' . __( 'Point Type', 'mycred' ) . ', <code>%username%</code> = ' . __( 'Username', 'mycred' ); ?></span></p>
478
  </div>
481
 
482
  <div class="row">
483
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
484
+ <p><span class="description"><?php esc_html_e( 'Raw format should be used when you intend to use the export tool to backup or import entries in another installation. Formatted exports reflect what users see in their history archive.', 'mycred' ); ?></span></p>
485
  </div>
486
  </div>
487
 
modules/mycred-module-hooks.php CHANGED
@@ -293,17 +293,17 @@ if ( ! class_exists( 'myCRED_Hooks_Module' ) ) :
293
  .form .radio { margin-bottom: 12px; }
294
  </style>
295
  <div class="wrap" id="myCRED-wrap">
296
- <h1><?php _e( 'Hooks', 'mycred' ); if ( MYCRED_DEFAULT_LABEL === 'myCRED' ) : ?> <a href="http://codex.mycred.me/chapter-ii/setup-hooks/" class="page-title-action" target="_blank"><?php _e( 'Documentation', 'mycred' ); ?></a><?php endif; ?></h1>
297
  <div class="widget-liquid-left">
298
  <div id="widgets-left">
299
  <div id="available-widgets" class="widgets-holder-wrap">
300
  <div class="sidebar-name">
301
  <div class="sidebar-name-arrow"><br /></div>
302
- <h2><?php _e( 'Available Hooks' ); ?> <span id="removing-widget"><?php _ex( 'Deactivate', 'removing-widget' ); ?> <span></span></span></h2>
303
  </div>
304
  <div class="widget-holder">
305
  <div class="sidebar-description">
306
- <p class="description"><?php _e( 'To activate a hook drag it to a sidebar or click on it. To deactivate a hook and delete its settings, drag it back.' ); ?></p>
307
  </div>
308
  <div id="widget-list">
309
  <?php
@@ -339,10 +339,10 @@ if ( ! class_exists( 'myCRED_Hooks_Module' ) ) :
339
  <input type="hidden" name="add_new" class="add_new" value="single" />
340
  <div class="widget-control-actions">
341
  <div class="alignleft">
342
- <a class="widget-control-remove" href="#remove"><?php _e( 'Delete', 'mycred' ); ?></a> | <a class="widget-control-close" href="#close"><?php _e( 'Close', 'mycred' ); ?></a><?php if ( MYCRED_DEFAULT_LABEL === 'myCRED' && array_key_exists( 'documentation', $data ) && ! empty( $data['documentation'] ) ) : ?> | <a class="hook-documentation" href="<?php echo esc_url( $data['documentation'] ); ?>" target="_blank">Hook Documentation</a><?php endif; ?>
343
  </div>
344
  <div class="alignright">
345
- <input type="submit" name="savewidget" id="widget-mycred-hook-<?php echo $key; ?>-__i__-savewidget" class="button button-primary widget-control-save right" value="<?php _e( 'Save', 'mycred' ); ?>" />
346
  <span class="spinner"></span>
347
  </div>
348
  <br class="clear" />
@@ -379,8 +379,8 @@ if ( ! class_exists( 'myCRED_Hooks_Module' ) ) :
379
  <div class="widgets-chooser">
380
  <ul class="widgets-chooser-sidebars"></ul>
381
  <div class="widgets-chooser-actions">
382
- <button class="button-secondary"><?php _e( 'Cancel', 'mycred' ); ?></button>
383
- <button class="button-primary"><?php _e( 'Add Hook', 'mycred' ); ?></button>
384
  </div>
385
  </div>
386
 
@@ -419,10 +419,10 @@ jQuery(function($) {
419
  <div id="sidebar-active" class="widgets-sortables ui-droppable ui-sortable">
420
  <div class="sidebar-name">
421
  <div class="sidebar-name-arrow"><br /></div>
422
- <h2><?php _e( 'Active Hooks', 'mycred' ); ?></h2>
423
  </div>
424
  <div class="sidebar-description">
425
- <p class="description"><?php _e( 'The following hooks are used for all users.', 'mycred' ); ?></p>
426
  </div>
427
  <?php
428
 
@@ -457,10 +457,10 @@ jQuery(function($) {
457
  <input type="hidden" name="add_new" class="add_new" value="single" />
458
  <div class="widget-control-actions">
459
  <div class="alignleft">
460
- <a class="widget-control-remove" href="#remove"><?php _e( 'Delete', 'mycred' ); ?></a> | <a class="widget-control-close" href="#close"><?php _e( 'Close', 'mycred' ); ?></a><?php if ( MYCRED_DEFAULT_LABEL === 'myCRED' && array_key_exists( 'documentation', $data ) && ! empty( $data['documentation'] ) ) : ?> | <a class="hook-documentation" href="<?php echo esc_url( $data['documentation'] ); ?>" target="_blank">Hook Documentation</a><?php endif; ?>
461
  </div>
462
  <div class="alignright">
463
- <input type="submit" name="savewidget" id="widget-mycred-hook-<?php echo $key; ?>-__i__-savewidget" class="button button-primary widget-control-save right" value="<?php _e( 'Save', 'mycred' ); ?>" />
464
  <span class="spinner"></span>
465
  </div>
466
  <br class="clear" />
@@ -499,7 +499,8 @@ jQuery(function($) {
499
  * AJAX: Save Hook Activations
500
  * Either saves the hook order (no use) or saves hooks being activated or deactivated.
501
  * @since 1.7
502
- * @version 1.0.1
 
503
  */
504
  public function ajax_hook_activation() {
505
 
@@ -557,11 +558,13 @@ jQuery(function($) {
557
  $option_id = $option_id . '_' . $ctype;
558
  }
559
 
 
 
560
  // Update our settings to activate the hook(s)
561
  mycred_update_option( $option_id, array(
562
- 'active' => $this->active,
563
  'installed' => $installed,
564
- 'hook_prefs' => $this->hook_prefs
565
  ) );
566
 
567
  }
293
  .form .radio { margin-bottom: 12px; }
294
  </style>
295
  <div class="wrap" id="myCRED-wrap">
296
+ <h1><?php esc_html_e( 'Hooks', 'mycred' ); if ( MYCRED_DEFAULT_LABEL === 'myCRED' ) : ?> <a href="http://codex.mycred.me/chapter-ii/setup-hooks/" class="page-title-action" target="_blank"><?php esc_html_e( 'Documentation', 'mycred' ); ?></a><?php endif; ?></h1>
297
  <div class="widget-liquid-left">
298
  <div id="widgets-left">
299
  <div id="available-widgets" class="widgets-holder-wrap">
300
  <div class="sidebar-name">
301
  <div class="sidebar-name-arrow"><br /></div>
302
+ <h2><?php esc_html_e( 'Available Hooks' ); ?> <span id="removing-widget"><?php esc_html_x( 'Deactivate', 'removing-widget' ); ?> <span></span></span></h2>
303
  </div>
304
  <div class="widget-holder">
305
  <div class="sidebar-description">
306
+ <p class="description"><?php esc_html_e( 'To activate a hook drag it to a sidebar or click on it. To deactivate a hook and delete its settings, drag it back.' ); ?></p>
307
  </div>
308
  <div id="widget-list">
309
  <?php
339
  <input type="hidden" name="add_new" class="add_new" value="single" />
340
  <div class="widget-control-actions">
341
  <div class="alignleft">
342
+ <a class="widget-control-remove" href="#remove"><?php esc_html_e( 'Delete', 'mycred' ); ?></a> | <a class="widget-control-close" href="#close"><?php esc_html_e( 'Close', 'mycred' ); ?></a><?php if ( MYCRED_DEFAULT_LABEL === 'myCRED' && array_key_exists( 'documentation', $data ) && ! empty( $data['documentation'] ) ) : ?> | <a class="hook-documentation" href="<?php echo esc_url( $data['documentation'] ); ?>" target="_blank">Hook Documentation</a><?php endif; ?>
343
  </div>
344
  <div class="alignright">
345
+ <input type="submit" name="savewidget" id="widget-mycred-hook-<?php echo $key; ?>-__i__-savewidget" class="button button-primary widget-control-save right" value="<?php esc_attr_e( 'Save', 'mycred' ); ?>" />
346
  <span class="spinner"></span>
347
  </div>
348
  <br class="clear" />
379
  <div class="widgets-chooser">
380
  <ul class="widgets-chooser-sidebars"></ul>
381
  <div class="widgets-chooser-actions">
382
+ <button class="button-secondary"><?php esc_html_e( 'Cancel', 'mycred' ); ?></button>
383
+ <button class="button-primary"><?php esc_html_e( 'Add Hook', 'mycred' ); ?></button>
384
  </div>
385
  </div>
386
 
419
  <div id="sidebar-active" class="widgets-sortables ui-droppable ui-sortable">
420
  <div class="sidebar-name">
421
  <div class="sidebar-name-arrow"><br /></div>
422
+ <h2><?php esc_html_e( 'Active Hooks', 'mycred' ); ?></h2>
423
  </div>
424
  <div class="sidebar-description">
425
+ <p class="description"><?php esc_html_e( 'The following hooks are used for all users.', 'mycred' ); ?></p>
426
  </div>
427
  <?php
428
 
457
  <input type="hidden" name="add_new" class="add_new" value="single" />
458
  <div class="widget-control-actions">
459
  <div class="alignleft">
460
+ <a class="widget-control-remove" href="#remove"><?php esc_html_e( 'Delete', 'mycred' ); ?></a> | <a class="widget-control-close" href="#close"><?php esc_html_e( 'Close', 'mycred' ); ?></a><?php if ( MYCRED_DEFAULT_LABEL === 'myCRED' && array_key_exists( 'documentation', $data ) && ! empty( $data['documentation'] ) ) : ?> | <a class="hook-documentation" href="<?php echo esc_url( $data['documentation'] ); ?>" target="_blank">Hook Documentation</a><?php endif; ?>
461
  </div>
462
  <div class="alignright">
463
+ <input type="submit" name="savewidget" id="widget-mycred-hook-<?php echo $key; ?>-__i__-savewidget" class="button button-primary widget-control-save right" value="<?php esc_attr_e( 'Save', 'mycred' ); ?>" />
464
  <span class="spinner"></span>
465
  </div>
466
  <br class="clear" />
499
  * AJAX: Save Hook Activations
500
  * Either saves the hook order (no use) or saves hooks being activated or deactivated.
501
  * @since 1.7
502
+ * @since 2.4.5 @filter added `mycred_before_hooks_activation_save`
503
+ * @version 1.0.2
504
  */
505
  public function ajax_hook_activation() {
506
 
558
  $option_id = $option_id . '_' . $ctype;
559
  }
560
 
561
+ $hooks_update = apply_filters( 'mycred_before_hooks_activation_save', $this, $option_id );
562
+
563
  // Update our settings to activate the hook(s)
564
  mycred_update_option( $option_id, array(
565
+ 'active' => $hooks_update->active,
566
  'installed' => $installed,
567
+ 'hook_prefs' => $hooks_update->hook_prefs
568
  ) );
569
 
570
  }
modules/mycred-module-log.php CHANGED
@@ -635,7 +635,7 @@ if ( ! class_exists( 'myCRED_Log_Module' ) ) :
635
 
636
  ?>
637
  <div class="wrap" id="myCRED-wrap">
638
- <h1><?php _e( 'Log', 'mycred' ); if ( MYCRED_DEFAULT_LABEL === 'myCRED' ) : ?> <a href="http://codex.mycred.me/chapter-i/the-log/" class="page-title-action" target="_blank"><?php _e( 'Documentation', 'mycred' ); ?></a><?php endif; ?></h1>
639
  <?php
640
 
641
  // This requirement is only checked on activation. If the library is disabled
@@ -979,11 +979,11 @@ if ( ! class_exists( 'myCRED_Log_Module' ) ) :
979
 
980
  <div class="row">
981
  <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
982
- <label><?php _e( 'User', 'mycred' ); ?></label>
983
  <div id="mycred-user-to-show"></div>
984
  </div>
985
  <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
986
- <label><?php _e( 'Date', 'mycred' ); ?></label>
987
  <div id="mycred-date-to-show"></div>
988
  </div>
989
  <div class="col-lg-2 col-md-2 col-sm-4 col-xs-12">
@@ -991,18 +991,18 @@ if ( ! class_exists( 'myCRED_Log_Module' ) ) :
991
  <input type="text" name="mycred_manage_log[creds]" id="mycred-creds-to-show" class="form-control" placeholder="" value="" />
992
  </div>
993
  <div class="col-lg-4 col-md-4 col-sm-8 col-xs-12">
994
- <label><?php _e( 'Reference', 'mycred' ); ?></label>
995
  <select name="mycred_manage_log[ref]" id="mycred-referece-to-show"></select>
996
  </div>
997
  </div>
998
 
999
  <div class="row">
1000
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" id="mycred-old-entry-to-show-wrapper">
1001
- <label><?php _e( 'Original Entry', 'mycred' ); ?></label>
1002
  <div id="mycred-old-entry-to-show"></div>
1003
  </div>
1004
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" id="mycred-new-entry-to-show-wrapper">
1005
- <label><?php _e( 'Log Entry', 'mycred' ); ?></label>
1006
  <input type="text" name="mycred_manage_log[entry]" id="mycred-new-entry-to-show" class="form-control" placeholder="" value="" />
1007
  <span class="description" id="available-template-tags" style="display:none;"></span>
1008
  </div>
@@ -1010,12 +1010,12 @@ if ( ! class_exists( 'myCRED_Log_Module' ) ) :
1010
 
1011
  <div class="row last">
1012
  <div class="col-lg-2 col-md-3 col-sm-12 col-xs-12 text-center">
1013
- <a href="javascript:void(0);" class="button button-primary button-large mycred-delete-row" id="mycred-delete-entry-in-editor" data-id=""><?php _e( 'Delete Entry', 'mycred' ); ?></a>
1014
  </div>
1015
  <div class="col-lg-1 col-md-1 col-sm-1 col-xs-12"><span id="mycred-editor-indicator" class="spinner"></span></div>
1016
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" id="mycred-editor-results"></div>
1017
  <div class="col-lg-3 col-md-2 col-sm-11 col-xs-12 text-right">
1018
- <input type="submit" id="mycred-editor-submit" class="button button-secondary button-large" value="<?php _e( 'Update Entry', 'mycred' ); ?>" />
1019
  </div>
1020
  </div>
1021
  </form>
635
 
636
  ?>
637
  <div class="wrap" id="myCRED-wrap">
638
+ <h1><?php esc_html_e( 'Log', 'mycred' ); if ( MYCRED_DEFAULT_LABEL === 'myCRED' ) : ?> <a href="http://codex.mycred.me/chapter-i/the-log/" class="page-title-action" target="_blank"><?php esc_html_e( 'Documentation', 'mycred' ); ?></a><?php endif; ?></h1>
639
  <?php
640
 
641
  // This requirement is only checked on activation. If the library is disabled
979
 
980
  <div class="row">
981
  <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
982
+ <label><?php esc_html_e( 'User', 'mycred' ); ?></label>
983
  <div id="mycred-user-to-show"></div>
984
  </div>
985
  <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
986
+ <label><?php esc_html_e( 'Date', 'mycred' ); ?></label>
987
  <div id="mycred-date-to-show"></div>
988
  </div>
989
  <div class="col-lg-2 col-md-2 col-sm-4 col-xs-12">
991
  <input type="text" name="mycred_manage_log[creds]" id="mycred-creds-to-show" class="form-control" placeholder="" value="" />
992
  </div>
993
  <div class="col-lg-4 col-md-4 col-sm-8 col-xs-12">
994
+ <label><?php esc_html_e( 'Reference', 'mycred' ); ?></label>
995
  <select name="mycred_manage_log[ref]" id="mycred-referece-to-show"></select>
996
  </div>
997
  </div>
998
 
999
  <div class="row">
1000
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" id="mycred-old-entry-to-show-wrapper">
1001
+ <label><?php esc_html_e( 'Original Entry', 'mycred' ); ?></label>
1002
  <div id="mycred-old-entry-to-show"></div>
1003
  </div>
1004
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" id="mycred-new-entry-to-show-wrapper">
1005
+ <label><?php esc_html_e( 'Log Entry', 'mycred' ); ?></label>
1006
  <input type="text" name="mycred_manage_log[entry]" id="mycred-new-entry-to-show" class="form-control" placeholder="" value="" />
1007
  <span class="description" id="available-template-tags" style="display:none;"></span>
1008
  </div>
1010
 
1011
  <div class="row last">
1012
  <div class="col-lg-2 col-md-3 col-sm-12 col-xs-12 text-center">
1013
+ <a href="javascript:void(0);" class="button button-primary button-large mycred-delete-row" id="mycred-delete-entry-in-editor" data-id=""><?php esc_html_e( 'Delete Entry', 'mycred' ); ?></a>
1014
  </div>
1015
  <div class="col-lg-1 col-md-1 col-sm-1 col-xs-12"><span id="mycred-editor-indicator" class="spinner"></span></div>
1016
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" id="mycred-editor-results"></div>
1017
  <div class="col-lg-3 col-md-2 col-sm-11 col-xs-12 text-right">
1018
+ <input type="submit" id="mycred-editor-submit" class="button button-secondary button-large" value="<?php esc_attr_e( 'Update Entry', 'mycred' ); ?>" />
1019
  </div>
1020
  </div>
1021
  </form>
modules/mycred-module-management.php CHANGED
@@ -222,7 +222,7 @@ if ( ! class_exists( 'myCRED_Management_Module' ) ) :
222
  ?>
223
  <div class="row last">
224
  <div class="col-xs-12">
225
- <p><?php _e( 'No recent activity found.', 'mycred' ); ?></p>
226
  </div>
227
  </div>
228
  <?php
@@ -233,10 +233,10 @@ if ( ! class_exists( 'myCRED_Management_Module' ) ) :
233
 
234
  ?>
235
  <div class="row ledger header">
236
- <div class="col-xs-4"><strong><?php _e( 'Date', 'mycred' ); ?></strong></div>
237
- <div class="col-xs-4"><strong><?php _e( 'Time', 'mycred' ); ?></strong></div>
238
- <div class="col-xs-4"><strong><?php _e( 'Reference', 'mycred' ); ?></strong></div>
239
- <div class="col-xs-12"><strong><?php _e( 'Entry', 'mycred' ); ?></strong></div>
240
  </div>
241
  <?php
242
 
@@ -278,7 +278,7 @@ if ( ! class_exists( 'myCRED_Management_Module' ) ) :
278
  ?>
279
  <div class="row ledger">
280
  <div class="col-xs-12">
281
- <div style="text-align:center; padding: 12px 0;"><a href="<?php echo esc_url( admin_url( 'admin.php?page=' . $page . '&user=' . $user_id ) ); ?>" style="width: auto !important;" class="button button-large button-secondary"><?php _e( 'View complete history', 'mycred' ); ?></a></div>
282
  </div>
283
  </div>
284
  <?php
@@ -555,10 +555,10 @@ if ( ! class_exists( 'myCRED_Management_Module' ) ) :
555
  <div id="mycred-edit-user-wrapper">
556
  <table class="form-table mycred-inline-table">
557
  <tr>
558
- <th scope="row"><?php _e( 'Balances', 'mycred' ); ?></th>
559
  <td>
560
  <fieldset id="mycred-badge-list" class="badge-list">
561
- <legend class="screen-reader-text"><span><?php _e( 'Balance', 'mycred' ); ?></span></legend>
562
  <?php
563
 
564
  // Loop through each point type
@@ -571,7 +571,7 @@ if ( ! class_exists( 'myCRED_Management_Module' ) ) :
571
  <div class="mycred-wrapper balance-wrapper disabled-option color-option">
572
  <div><?php echo $data['name']; ?></div>
573
  <div class="balance-row">
574
- <div class="balance-view"><?php _e( 'Excluded', 'mycred' ); ?></div>
575
  <div class="balance-edit">&nbsp;</div>
576
  </div>
577
  <?php
@@ -583,7 +583,7 @@ if ( ! class_exists( 'myCRED_Management_Module' ) ) :
583
 
584
  ?>
585
  <div class="mycred-wrapper balance-wrapper color-option selected">
586
- <?php if ( $data['can_edit'] ) : ?><div class="toggle-mycred-balance-editor"><a href="javascript:void(0);" data-type="<?php echo $point_type; ?>" data-view="<?php _e( 'Edit', 'mycred' ); ?>" data-edit="<?php _e( 'Cancel', 'mycred' ); ?>"><?php _e( 'Edit', 'mycred' ); ?></a></div><?php endif; ?>
587
  <div><?php echo $data['name']; ?></div>
588
  <div class="balance-row" id="mycred-balance-<?php echo $point_type; ?>">
589
  <div class="balance-view"><?php echo $data['formatted']; ?></div>
@@ -741,25 +741,25 @@ jQuery(function($){
741
  <div class="row">
742
  <div class="col-sm-2 col-xs-6">
743
  <div class="form-group">
744
- <label><?php _e( 'ID', 'mycred' ); ?></label>
745
  <div id="mycred-userid-to-show">&nbsp;</div>
746
  </div>
747
  </div>
748
  <div class="col-sm-4 col-xs-6">
749
  <div class="form-group">
750
- <label><?php _e( 'Username', 'mycred' ); ?></label>
751
  <div id="mycred-username-to-show">&nbsp;</div>
752
  </div>
753
  </div>
754
  <div class="col-sm-3 col-xs-6">
755
  <div class="form-group">
756
- <label><?php _e( 'Current Balance', 'mycred' ); ?></label>
757
  <div id="mycred-current-to-show">&nbsp;</div>
758
  </div>
759
  </div>
760
  <div class="col-sm-3 col-xs-6">
761
  <div class="form-group">
762
- <label><?php _e( 'Total Balance', 'mycred' ); ?></label>
763
  <div id="mycred-total-to-show">&nbsp;</div>
764
  </div>
765
  </div>
@@ -768,14 +768,14 @@ jQuery(function($){
768
  <div class="row">
769
  <div class="col-sm-2 col-xs-12">
770
  <div class="form-group">
771
- <label><?php _e( 'Amount', 'mycred' ); ?></label>
772
  <input type="text" name="mycred_manage_balance[amount]" id="mycred-editor-amount" size="8" placeholder="0" value="" />
773
- <span class="description"><?php _e( 'A positive or negative value', 'mycred' ); ?>.</span>
774
  </div>
775
  </div>
776
  <div class="col-sm-5 col-xs-12">
777
  <div class="form-group">
778
- <label><?php _e( 'Reference', 'mycred' ); ?></label>
779
  <select name="mycred_manage_balance[ref]" id="mycred-editor-reference">
780
  <?php
781
 
@@ -791,23 +791,23 @@ jQuery(function($){
791
  </select>
792
  </div>
793
  <div id="mycred-custom-reference-wrapper" style="display: none;">
794
- <input type="text" name="mycred_manage_balance[custom]" id="mycred-editor-custom-reference" placeholder="<?php _e( 'lowercase without empty spaces', 'mycred' ); ?>" class="regular-text" value="" />
795
  </div>
796
  </div>
797
  <div class="col-sm-5 col-xs-12">
798
  <div class="form-group">
799
- <label><?php _e( 'Log Entry', 'mycred' ); ?></label>
800
- <input type="text" name="mycred_manage_balance[entry]" id="mycred-editor-entry" placeholder="<?php _e( 'optional', 'mycred' ); ?>" class="regular-text" value="" />
801
  <span class="description"><?php echo $mycred->available_template_tags( array( 'general', 'amount' ) ); ?></span>
802
  </div>
803
  </div>
804
  </div>
805
 
806
  <div class="row last">
807
- <div class="col-sm-2 col-xs-3"><input type="submit" id="mycred-editor-submit" class="button button-primary button-large" value="<?php _e( 'Update', 'mycred' ); ?>" /></div>
808
  <div class="col-sm-1 col-xs-1"><span id="mycred-editor-indicator" class="spinner"></span></div>
809
  <div class="col-sm-6 col-xs-4" id="mycred-editor-results"></div>
810
- <div class="col-sm-3 col-xs-4 text-right"><button type="button" class="button button-secondary button-large" id="load-users-mycred-history"><?php _e( 'Recent Activity', 'mycred' ); ?></button></div>
811
  </div>
812
  </form>
813
 
222
  ?>
223
  <div class="row last">
224
  <div class="col-xs-12">
225
+ <p><?php esc_html_e( 'No recent activity found.', 'mycred' ); ?></p>
226
  </div>
227
  </div>
228
  <?php
233
 
234
  ?>
235
  <div class="row ledger header">
236
+ <div class="col-xs-4"><strong><?php esc_html_e( 'Date', 'mycred' ); ?></strong></div>
237
+ <div class="col-xs-4"><strong><?php esc_html_e( 'Time', 'mycred' ); ?></strong></div>
238
+ <div class="col-xs-4"><strong><?php esc_html_e( 'Reference', 'mycred' ); ?></strong></div>
239
+ <div class="col-xs-12"><strong><?php esc_html_e( 'Entry', 'mycred' ); ?></strong></div>
240
  </div>
241
  <?php
242
 
278
  ?>
279
  <div class="row ledger">
280
  <div class="col-xs-12">
281
+ <div style="text-align:center; padding: 12px 0;"><a href="<?php echo esc_url( admin_url( 'admin.php?page=' . $page . '&user=' . $user_id ) ); ?>" style="width: auto !important;" class="button button-large button-secondary"><?php esc_html_e( 'View complete history', 'mycred' ); ?></a></div>
282
  </div>
283
  </div>
284
  <?php
555
  <div id="mycred-edit-user-wrapper">
556
  <table class="form-table mycred-inline-table">
557
  <tr>
558
+ <th scope="row"><?php esc_html_e( 'Balances', 'mycred' ); ?></th>
559
  <td>
560
  <fieldset id="mycred-badge-list" class="badge-list">
561
+ <legend class="screen-reader-text"><span><?php esc_html_e( 'Balance', 'mycred' ); ?></span></legend>
562
  <?php
563
 
564
  // Loop through each point type
571
  <div class="mycred-wrapper balance-wrapper disabled-option color-option">
572
  <div><?php echo $data['name']; ?></div>
573
  <div class="balance-row">
574
+ <div class="balance-view"><?php esc_html_e( 'Excluded', 'mycred' ); ?></div>
575
  <div class="balance-edit">&nbsp;</div>
576
  </div>
577
  <?php
583
 
584
  ?>
585
  <div class="mycred-wrapper balance-wrapper color-option selected">
586
+ <?php if ( $data['can_edit'] ) : ?><div class="toggle-mycred-balance-editor"><a href="javascript:void(0);" data-type="<?php echo $point_type; ?>" data-view="<?php esc_attr_e( 'Edit', 'mycred' ); ?>" data-edit="<?php esc_attr_e( 'Cancel', 'mycred' ); ?>"><?php esc_html_e( 'Edit', 'mycred' ); ?></a></div><?php endif; ?>
587
  <div><?php echo $data['name']; ?></div>
588
  <div class="balance-row" id="mycred-balance-<?php echo $point_type; ?>">
589
  <div class="balance-view"><?php echo $data['formatted']; ?></div>
741
  <div class="row">
742
  <div class="col-sm-2 col-xs-6">
743
  <div class="form-group">
744
+ <label><?php esc_html_e( 'ID', 'mycred' ); ?></label>
745
  <div id="mycred-userid-to-show">&nbsp;</div>
746
  </div>
747
  </div>
748
  <div class="col-sm-4 col-xs-6">
749
  <div class="form-group">
750
+ <label><?php esc_html_e( 'Username', 'mycred' ); ?></label>
751
  <div id="mycred-username-to-show">&nbsp;</div>
752
  </div>
753
  </div>
754
  <div class="col-sm-3 col-xs-6">
755
  <div class="form-group">
756
+ <label><?php esc_html_e( 'Current Balance', 'mycred' ); ?></label>
757
  <div id="mycred-current-to-show">&nbsp;</div>
758
  </div>
759
  </div>
760
  <div class="col-sm-3 col-xs-6">
761
  <div class="form-group">
762
+ <label><?php esc_html_e( 'Total Balance', 'mycred' ); ?></label>
763
  <div id="mycred-total-to-show">&nbsp;</div>
764
  </div>
765
  </div>
768
  <div class="row">
769
  <div class="col-sm-2 col-xs-12">
770
  <div class="form-group">
771
+ <label><?php esc_html_e( 'Amount', 'mycred' ); ?></label>
772
  <input type="text" name="mycred_manage_balance[amount]" id="mycred-editor-amount" size="8" placeholder="0" value="" />
773
+ <span class="description"><?php esc_html_e( 'A positive or negative value', 'mycred' ); ?>.</span>
774
  </div>
775
  </div>
776
  <div class="col-sm-5 col-xs-12">
777
  <div class="form-group">
778
+ <label><?php esc_html_e( 'Reference', 'mycred' ); ?></label>
779
  <select name="mycred_manage_balance[ref]" id="mycred-editor-reference">
780
  <?php
781
 
791
  </select>
792
  </div>
793
  <div id="mycred-custom-reference-wrapper" style="display: none;">
794
+ <input type="text" name="mycred_manage_balance[custom]" id="mycred-editor-custom-reference" placeholder="<?php esc_attr_e( 'lowercase without empty spaces', 'mycred' ); ?>" class="regular-text" value="" />
795
  </div>
796
  </div>
797
  <div class="col-sm-5 col-xs-12">
798
  <div class="form-group">
799
+ <label><?php esc_html_e( 'Log Entry', 'mycred' ); ?></label>
800
+ <input type="text" name="mycred_manage_balance[entry]" id="mycred-editor-entry" placeholder="<?php esc_attr_e( 'optional', 'mycred' ); ?>" class="regular-text" value="" />
801
  <span class="description"><?php echo $mycred->available_template_tags( array( 'general', 'amount' ) ); ?></span>
802
  </div>
803
  </div>
804
  </div>
805
 
806
  <div class="row last">
807
+ <div class="col-sm-2 col-xs-3"><input type="submit" id="mycred-editor-submit" class="button button-primary button-large" value="<?php esc_attr_e( 'Update', 'mycred' ); ?>" /></div>
808
  <div class="col-sm-1 col-xs-1"><span id="mycred-editor-indicator" class="spinner"></span></div>
809
  <div class="col-sm-6 col-xs-4" id="mycred-editor-results"></div>
810
+ <div class="col-sm-3 col-xs-4 text-right"><button type="button" class="button button-secondary button-large" id="load-users-mycred-history"><?php esc_html_e( 'Recent Activity', 'mycred' ); ?></button></div>
811
  </div>
812
  </form>
813
 
modules/mycred-module-network.php CHANGED
@@ -215,8 +215,8 @@ if ( ! class_exists( 'myCRED_Network_Module' ) ) :
215
  <!-- myCRED Accordion Styling -->
216
  <style type="text/css">
217
  h4:before { float:right; padding-right: 12px; font-size: 14px; font-weight: normal; color: silver; }
218
- h4.ui-accordion-header.ui-state-active:before { content: "<?php _e( 'click to close', 'mycred' ); ?>"; }
219
- h4.ui-accordion-header:before { content: "<?php _e( 'click to open', 'mycred' ); ?>"; }
220
  </style>
221
  <?php
222
 
@@ -238,13 +238,13 @@ h4.ui-accordion-header:before { content: "<?php _e( 'click to open', 'mycred' );
238
 
239
  ?>
240
  <div class="wrap mycred-metabox" id="myCRED-wrap">
241
- <h1><?php printf( __( '%s Network', 'mycred' ), $name ); ?><?php if ( MYCRED_DEFAULT_LABEL === 'myCRED' ) : ?> <a href="http://codex.mycred.me/chapter-i/multisites/" class="page-title-action" target="_blank"><?php _e( 'Documentation', 'mycred' ); ?></a><?php endif; ?></h1>
242
  <?php
243
 
244
  if ( wp_is_large_network() ) {
245
 
246
  ?>
247
- <p><?php _e( 'I am sorry but your network is too big to use these features.', 'mycred' ); ?></p>
248
  <?php
249
 
250
  }
@@ -267,49 +267,49 @@ h4.ui-accordion-header:before { content: "<?php _e( 'click to open', 'mycred' );
267
 
268
  <div class="list-items expandable-li" id="accordion">
269
 
270
- <h4><span class="dashicons dashicons-admin-settings static"></span><label><?php _e( 'Settings', 'mycred' ); ?></label></h4>
271
  <div class="body" style="display: none;">
272
 
273
  <div class="row">
274
  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
275
- <h3><?php _e( 'Master Template', 'mycred' ); ?></h3>
276
- <p><a href="http://codex.mycred.me/chapter-i/multisites/master-template/" target="_blank"><?php _e( 'Documentation', 'mycred' ); ?></a></p>
277
  <div class="row">
278
  <div class="col-xs-6">
279
  <div class="form-group">
280
- <label for="mycred-network-overwrite-enabled"><input type="radio" name="mycred_network[master]" id="mycred-network-overwrite-enabled" <?php checked( (int) $this->settings['master'], 1 ); ?> value="1" /> <?php _e( 'Enabled', 'mycred' ); ?></label>
281
  </div>
282
  </div>
283
  <div class="col-xs-6">
284
  <div class="form-group">
285
- <label for="mycred-network-overwrite-disabled"><input type="radio" name="mycred_network[master]" id="mycred-network-overwrite-disabled" <?php checked( (int) $this->settings['master'], 0 ); ?> value="0" /> <?php _e( 'Disabled', 'mycred' ); ?></label>
286
  </div>
287
  </div>
288
  </div>
289
  </div>
290
  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
291
- <h3><?php _e( 'Central Logging', 'mycred' ); ?></h3>
292
- <p><a href="http://codex.mycred.me/chapter-i/multisites/central-logging/" target="_blank"><?php _e( 'Documentation', 'mycred' ); ?></a></p>
293
  <div class="row">
294
  <div class="col-xs-6">
295
  <div class="form-group">
296
- <label for="mycred-network-overwrite-log-enabled"><input type="radio" name="mycred_network[central]" id="mycred-network-overwrite-log-enabled" <?php checked( (int) $this->settings['central'], 1 ); ?> value="1" /> <?php _e( 'Enabled', 'mycred' ); ?></label>
297
  </div>
298
  </div>
299
  <div class="col-xs-6">
300
  <div class="form-group">
301
- <label for="mycred-network-overwrite-log-disabled"><input type="radio" name="mycred_network[central]" id="mycred-network-overwrite-log-disabled" <?php checked( (int) $this->settings['central'], 0 ); ?> value="0" /> <?php _e( 'Disabled', 'mycred' ); ?></label>
302
  </div>
303
  </div>
304
  </div>
305
  </div>
306
  </div>
307
 
308
- <h3><?php _e( 'Site Block', 'mycred' ); ?></h3>
309
  <div class="row">
310
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
311
  <div class="form-group">
312
- <label for="mycred-network-block"><?php _e( 'Blog IDs', 'mycred' ); ?></label>
313
  <input type="text" name="mycred_network[block]" id="mycred-network-block" value="<?php echo esc_attr( $this->settings['block'] ); ?>" class="form-control" />
314
  <p><span class="description"><?php printf( __( 'Comma separated list of blog ids where %s is to be disabled.', 'mycred' ), $name ); ?></span></p>
315
  </div>
215
  <!-- myCRED Accordion Styling -->
216
  <style type="text/css">
217
  h4:before { float:right; padding-right: 12px; font-size: 14px; font-weight: normal; color: silver; }
218
+ h4.ui-accordion-header.ui-state-active:before { content: "<?php esc_attr_e( 'click to close', 'mycred' ); ?>"; }
219
+ h4.ui-accordion-header:before { content: "<?php esc_attr_e( 'click to open', 'mycred' ); ?>"; }
220
  </style>
221
  <?php
222
 
238
 
239
  ?>
240
  <div class="wrap mycred-metabox" id="myCRED-wrap">
241
+ <h1><?php printf( __( '%s Network', 'mycred' ), $name ); ?><?php if ( MYCRED_DEFAULT_LABEL === 'myCRED' ) : ?> <a href="http://codex.mycred.me/chapter-i/multisites/" class="page-title-action" target="_blank"><?php esc_html_e( 'Documentation', 'mycred' ); ?></a><?php endif; ?></h1>
242
  <?php
243
 
244
  if ( wp_is_large_network() ) {
245
 
246
  ?>
247
+ <p><?php esc_html_e( 'I am sorry but your network is too big to use these features.', 'mycred' ); ?></p>
248
  <?php
249
 
250
  }
267
 
268
  <div class="list-items expandable-li" id="accordion">
269
 
270
+ <h4><span class="dashicons dashicons-admin-settings static"></span><label><?php esc_html_e( 'Settings', 'mycred' ); ?></label></h4>
271
  <div class="body" style="display: none;">
272
 
273
  <div class="row">
274
  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
275
+ <h3><?php esc_html_e( 'Master Template', 'mycred' ); ?></h3>
276
+ <p><a href="http://codex.mycred.me/chapter-i/multisites/master-template/" target="_blank"><?php esc_html_e( 'Documentation', 'mycred' ); ?></a></p>
277
  <div class="row">
278
  <div class="col-xs-6">
279
  <div class="form-group">
280
+ <label for="mycred-network-overwrite-enabled"><input type="radio" name="mycred_network[master]" id="mycred-network-overwrite-enabled" <?php checked( (int) $this->settings['master'], 1 ); ?> value="1" /> <?php esc_html_e( 'Enabled', 'mycred' ); ?></label>
281
  </div>
282
  </div>
283
  <div class="col-xs-6">
284
  <div class="form-group">
285
+ <label for="mycred-network-overwrite-disabled"><input type="radio" name="mycred_network[master]" id="mycred-network-overwrite-disabled" <?php checked( (int) $this->settings['master'], 0 ); ?> value="0" /> <?php esc_html_e( 'Disabled', 'mycred' ); ?></label>
286
  </div>
287
  </div>
288
  </div>
289
  </div>
290
  <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
291
+ <h3><?php esc_html_e( 'Central Logging', 'mycred' ); ?></h3>
292
+ <p><a href="http://codex.mycred.me/chapter-i/multisites/central-logging/" target="_blank"><?php esc_html_e( 'Documentation', 'mycred' ); ?></a></p>
293
  <div class="row">
294
  <div class="col-xs-6">
295
  <div class="form-group">
296
+ <label for="mycred-network-overwrite-log-enabled"><input type="radio" name="mycred_network[central]" id="mycred-network-overwrite-log-enabled" <?php checked( (int) $this->settings['central'], 1 ); ?> value="1" /> <?php esc_html_e( 'Enabled', 'mycred' ); ?></label>
297
  </div>
298
  </div>
299
  <div class="col-xs-6">
300
  <div class="form-group">
301
+ <label for="mycred-network-overwrite-log-disabled"><input type="radio" name="mycred_network[central]" id="mycred-network-overwrite-log-disabled" <?php checked( (int) $this->settings['central'], 0 ); ?> value="0" /> <?php esc_html_e( 'Disabled', 'mycred' ); ?></label>
302
  </div>
303
  </div>
304
  </div>
305
  </div>
306
  </div>
307
 
308
+ <h3><?php esc_html_e( 'Site Block', 'mycred' ); ?></h3>
309
  <div class="row">
310
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
311
  <div class="form-group">
312
+ <label for="mycred-network-block"><?php esc_html_e( 'Blog IDs', 'mycred' ); ?></label>
313
  <input type="text" name="mycred_network[block]" id="mycred-network-block" value="<?php echo esc_attr( $this->settings['block'] ); ?>" class="form-control" />
314
  <p><span class="description"><?php printf( __( 'Comma separated list of blog ids where %s is to be disabled.', 'mycred' ), $name ); ?></span></p>
315
  </div>
modules/mycred-module-settings.php CHANGED
@@ -505,7 +505,7 @@ if ( ! class_exists( 'myCRED_Settings_Module' ) ) :
505
  if ( $this->is_main_type ) {
506
 
507
  ?>
508
- <div><input type="number" min="0" max="20" id="mycred-adjust-decimal-places" class="form-control" value="<?php echo esc_attr( $this->core->format['decimals'] ); ?>" data-org="<?php echo $this->core->format['decimals']; ?>" size="8" /> <input type="button" style="display:none;" id="mycred-update-log-decimals" class="button button-primary button-large" value="<?php _e( 'Update Database', 'mycred' ); ?>" /></div>
509
  <?php
510
 
511
  }
@@ -516,7 +516,7 @@ if ( ! class_exists( 'myCRED_Settings_Module' ) ) :
516
  if ( $default->format['decimals'] == 0 ) {
517
 
518
  ?>
519
- <div><?php _e( 'No decimals', 'mycred' ); ?></div>
520
  <?php
521
 
522
  }
@@ -598,7 +598,7 @@ if ( ! class_exists( 'myCRED_Settings_Module' ) ) :
598
 
599
  ?>
600
  <div class="wrap mycred-metabox" id="myCRED-wrap">
601
- <h1><?php _e( 'Settings', 'mycred' ); if ( MYCRED_DEFAULT_LABEL === 'myCRED' ) : ?> <a href="http://codex.mycred.me/" target="_blank" class="page-title-action"><?php _e( 'Documentation', 'mycred' ); ?></a><?php endif; ?></h1>
602
 
603
  <?php $this->update_notice(); ?>
604
 
@@ -611,40 +611,40 @@ if ( ! class_exists( 'myCRED_Settings_Module' ) ) :
611
  <?php settings_fields( $this->settings_name ); ?>
612
 
613
  <div class="list-items expandable-li" id="accordion">
614
- <h4 <?php echo !$main_screen ? '' : 'style="display:none"';?>><span class="dashicons dashicons-admin-settings static"></span><label><?php _e( 'Core Settings', 'mycred' ); ?></label></h4>
615
  <div class="body" style="display:none;">
616
 
617
  <div class="row">
618
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
619
- <h3><?php _e( 'Labels', 'mycred' ); ?></h3>
620
  <div class="row">
621
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
622
  <div class="form-group">
623
- <label for="<?php echo $this->field_id( array( 'name' => 'singular' ) ); ?>"><?php _e( 'Singular', 'mycred' ); ?></label>
624
- <input type="text" name="<?php echo $this->field_name( array( 'name' => 'singular' ) ); ?>" id="<?php echo $this->field_id( array( 'name' => 'singular' ) ); ?>" class="form-control" placeholder="<?php _e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $this->core->name['singular'] ); ?>" />
625
  </div>
626
  </div>
627
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
628
  <div class="form-group">
629
- <label for="<?php echo $this->field_id( array( 'name' => 'plural' ) ); ?>"><?php _e( 'Plural', 'mycred' ); ?></label>
630
- <input type="text" name="<?php echo $this->field_name( array( 'name' => 'plural' ) ); ?>" id="<?php echo $this->field_id( array( 'name' => 'plural' ) ); ?>" class="form-control" placeholder="<?php _e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $this->core->name['plural'] ); ?>" />
631
  </div>
632
  </div>
633
  </div>
634
- <p><span class="description"><?php _e( 'These labels are used throughout the admin area and when presenting points to your users.', 'mycred' ); ?></span></p>
635
  </div>
636
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
637
- <h3><?php _e( 'Format', 'mycred' ); ?></h3>
638
  <div class="row">
639
  <div class="col-lg-2 col-md-2 col-sm-12 col-xs-12">
640
  <div class="form-group">
641
- <label for="<?php echo $this->field_id( 'before' ); ?>"><?php _e( 'Prefix', 'mycred' ); ?></label>
642
  <input type="text" name="<?php echo $this->field_name( 'before' ); ?>" id="<?php echo $this->field_id( 'before' ); ?>" class="form-control" value="<?php echo esc_attr( $this->core->before ); ?>" />
643
  </div>
644
  </div>
645
  <div class="col-lg-5 col-md-5 col-sm-12 col-xs-12">
646
  <div class="form-group">
647
- <label for="<?php echo $this->field_id( array( 'format' => 'separators' ) ); ?>-thousand"><?php _e( 'Separators', 'mycred' ); ?></label>
648
  <div class="form-inline">
649
  <label>1</label> <input type="text" name="<?php echo $this->field_name( array( 'format' => 'separators' ) ); ?>[thousand]" id="<?php echo $this->field_id( array( 'format' => 'separators' ) ); ?>-thousand" placeholder="," class="form-control" size="2" value="<?php echo esc_attr( $this->core->format['separators']['thousand'] ); ?>" /> <label>000</label> <input type="text" name="<?php echo $this->field_name( array( 'format' => 'separators' ) ); ?>[decimal]" id="<?php echo $this->field_id( array( 'format' => 'separators' ) ); ?>-decimal" placeholder="." class="form-control" size="2" value="<?php echo esc_attr( $this->core->format['separators']['decimal'] ); ?>" /> <label>00</label>
650
  </div>
@@ -652,67 +652,67 @@ if ( ! class_exists( 'myCRED_Settings_Module' ) ) :
652
  </div>
653
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
654
  <div class="form-group">
655
- <label for=""><?php _e( 'Decimals', 'mycred' ); ?></label>
656
  <?php $this->adjust_decimal_places(); ?>
657
  </div>
658
  </div>
659
  <div class="col-lg-2 col-md-2 col-sm-12 col-xs-12">
660
  <div class="form-group">
661
- <label for="<?php echo $this->field_id( 'after' ); ?>"><?php _e( 'Suffix', 'mycred' ); ?></label>
662
  <input type="text" name="<?php echo $this->field_name( 'after' ); ?>" id="<?php echo $this->field_id( 'after' ); ?>" class="form-control" value="<?php echo esc_attr( $this->core->after ); ?>" />
663
  </div>
664
  </div>
665
  </div>
666
- <p><span class="description"><?php _e( 'Set decimals to zero if you prefer to use whole numbers.', 'mycred' ); ?></span></p>
667
  <?php if ( $this->is_main_type ) : ?>
668
- <p><strong><?php _e( 'Tip', 'mycred' ); ?>:</strong> <?php _e( 'As this is your main point type, the value you select here will be the largest number of decimals your installation will support.', 'mycred' ); ?></span></p>
669
  <?php endif; ?>
670
  </div>
671
  </div>
672
 
673
  <div class="row">
674
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
675
- <h3><?php _e( 'Security', 'mycred' ); ?></h3>
676
  <div class="row">
677
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
678
  <div class="form-group">
679
- <label for="<?php echo $this->field_id( array( 'caps' => 'creds' ) ); ?>"><?php _e( 'Point Editors', 'mycred' ); ?></label>
680
- <input type="text" name="<?php echo $this->field_name( array( 'caps' => 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'caps' => 'creds' ) ); ?>" class="form-control" placeholder="<?php _e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $this->core->caps['creds'] ); ?>" />
681
- <p><span class="description"><?php _e( 'The capability of users who can edit balances.', 'mycred' ); ?></span></p>
682
  </div>
683
  </div>
684
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
685
  <div class="form-group">
686
- <label for="<?php echo $this->field_id( array( 'caps' => 'plugin' ) ); ?>"><?php _e( 'Point Administrators', 'mycred' ); ?></label>
687
- <input type="text" name="<?php echo $this->field_name( array( 'caps' => 'plugin' ) ); ?>" id="<?php echo $this->field_id( array( 'caps' => 'plugin' ) ); ?>" class="form-control" placeholder="<?php _e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $this->core->caps['plugin'] ); ?>" />
688
- <p><span class="description"><?php _e( 'The capability of users who can edit settings.', 'mycred' ); ?></span></p>
689
  </div>
690
  </div>
691
  <div class="col-lg-2 col-md-2 col-sm-12 col-xs-12">
692
  <div class="form-group">
693
  <?php if ( ! isset( $this->core->max ) ) $this->core->max(); ?>
694
- <label for="<?php echo $this->field_id( 'max' ); ?>"><?php _e( 'Max. Amount', 'mycred' ); ?></label>
695
  <input type="text" name="<?php echo $this->field_name( 'max' ); ?>" id="<?php echo $this->field_id( 'max' ); ?>" class="form-control" value="<?php echo esc_attr( $this->core->max ); ?>" />
696
- <p><span class="description"><?php _e( 'The maximum amount allowed to be paid out in a single instance.', 'mycred' ); ?></span></p>
697
  </div>
698
  </div>
699
  <div class="col-lg-2 col-md-2 col-sm-12 col-xs-12">
700
  <div class="form-group">
701
- <label for="<?php echo $excluded_ids_args['id']; ?>"><?php _e( 'Exclude Users', 'mycred' ); ?></label>
702
  <?php echo mycred_create_select2( $all_users, $excluded_ids_args, $excluded_ids ); ?>
703
  </div>
704
  <div class="form-group">
705
  <div class="checkbox">
706
- <label for="<?php echo $this->field_id( array( 'exclude' => 'cred_editors' ) ); ?>"><input type="checkbox" name="<?php echo $this->field_name( array( 'exclude' => 'cred_editors' ) ); ?>" id="<?php echo $this->field_id( array( 'exclude' => 'cred_editors' ) ); ?>"<?php checked( $this->core->exclude['cred_editors'], 1 ); ?> value="1" /> <?php _e( 'Exclude point editors', 'mycred' ); ?></label>
707
  </div>
708
  <div class="checkbox">
709
- <label for="<?php echo $this->field_id( array( 'exclude' => 'plugin_editors' ) ); ?>"><input type="checkbox" name="<?php echo $this->field_name( array( 'exclude' => 'plugin_editors' ) ); ?>" id="<?php echo $this->field_id( array( 'exclude' => 'plugin_editors' ) ); ?>"<?php checked( $this->core->exclude['plugin_editors'], 1 ); ?> value="1" /> <?php _e( 'Exclude point administrators', 'mycred' ); ?></label>
710
  </div>
711
  </div>
712
  </div>
713
  <div class="col-lg-2 col-md-2 col-sm-12 col-xs-12">
714
  <div class="form-group">
715
- <label for="<?php echo $roles_args['id']; ?>"><?php _e( 'Exclude by User Role', 'mycred' ); ?></label>
716
  <?php echo mycred_create_select2( $roles, $roles_args, $excluded_roles ); ?>
717
  </div>
718
  </div>
@@ -726,7 +726,7 @@ if ( ! class_exists( 'myCRED_Settings_Module' ) ) :
726
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
727
  <div id="mycred-image-setup" class="default-image-wrapper">
728
 
729
- <h3><?php _e( 'Point Type Image', 'mycred' ); ?></h3>
730
 
731
 
732
  <div class="point-type-image">
@@ -754,16 +754,16 @@ if ( ! class_exists( 'myCRED_Settings_Module' ) ) :
754
  ?>
755
  </div>
756
  <div class="point-image-buttons">
757
- <button type="button" class="button button-secondary" id="point-type-change-default-image"><?php _e( 'Change Image', 'mycred' ) ?></button>
758
  </div>
759
  </div>
760
  </div>
761
  </div>
762
 
763
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
764
- <h3><?php _e( 'Other Settings', 'mycred' ); ?></h3>
765
  <div class="form-group">
766
- <label for="<?php echo $this->field_id( 'delete_user' ); ?>"><input type="checkbox" name="<?php echo $this->field_name( 'delete_user' ); ?>" id="<?php echo $this->field_id( 'delete_user' ); ?>" <?php checked( $delete_user, 1 ); ?> value="1" /> <?php _e( 'Delete log entries when user is deleted.', 'mycred' ); ?></label>
767
  </div>
768
  </div>
769
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
@@ -782,7 +782,7 @@ if ( ! class_exists( 'myCRED_Settings_Module' ) ) :
782
  $reset_block = true;
783
 
784
  ?>
785
- <h4 <?php echo !$main_screen ? '' : 'style="display:none"';?>><span class="dashicons dashicons-dashboard static"></span><label><?php _e( 'Management', 'mycred' ); ?></label></h4>
786
  <div class="body" style="display:none;">
787
 
788
  <div class="row">
@@ -794,16 +794,16 @@ if ( ! class_exists( 'myCRED_Settings_Module' ) ) :
794
  </div>
795
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
796
  <div class="form-group">
797
- <label><?php _e( 'Entries', 'mycred' ); ?></label>
798
  <h1><?php echo $total_rows; ?></h1>
799
  </div>
800
  </div>
801
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
802
  <div class="form-group">
803
- <label><?php _e( 'Actions', 'mycred' ); ?></label>
804
  <div>
805
  <?php if ( ( ! mycred_centralize_log() ) || ( mycred_centralize_log() && $GLOBALS['blog_id'] == 1 ) ) : ?>
806
- <button type="button" id="mycred-manage-action-empty-log" data-type="<?php echo $this->mycred_type; ?>" class="button button-large large <?php if ( $total_rows == 0 ) echo '"disabled="disabled'; else echo 'button-primary'; ?>"><?php _e( 'Empty Log', 'mycred' ); ?></button>
807
  <?php endif; ?>
808
  </div>
809
  </div>
@@ -813,22 +813,22 @@ if ( ! class_exists( 'myCRED_Settings_Module' ) ) :
813
  <div class="row">
814
  <div class="col-lg-5 col-md-5 col-sm-12 col-xs-12">
815
  <div class="form-group">
816
- <label><?php _e( 'Balance Meta Key', 'mycred' ); ?></label>
817
  <h1><?php echo $this->core->cred_id; ?></h1>
818
  </div>
819
  </div>
820
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
821
  <div class="form-group">
822
- <label><?php _e( 'Users', 'mycred' ); ?></label>
823
  <h1><?php echo $this->core->count_members(); ?></h1>
824
  </div>
825
  </div>
826
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
827
  <div class="form-group">
828
- <label><?php _e( 'Actions', 'mycred' ); ?></label>
829
  <div>
830
- <button type="button" id="mycred-manage-action-reset-accounts" data-type="<?php echo $this->mycred_type; ?>" class="button button-large large <?php if ( $reset_block ) echo '" disabled="disabled'; else echo 'button-primary'; ?>"><?php _e( 'Set all to zero', 'mycred' ); ?></button>
831
- <button type="button" id="mycred-export-users-points" data-type="<?php echo $this->mycred_type; ?>" class="button button-large large"><?php _e( 'Export Balances', 'mycred' ); ?></button>
832
  </div>
833
  </div>
834
  </div>
@@ -845,7 +845,7 @@ if ( ! class_exists( 'myCRED_Settings_Module' ) ) :
845
  if ( $main_screen ) :
846
 
847
  ?>
848
- <h4><span class="dashicons dashicons-star-filled static"></span><label><?php _e( 'Point Types', 'mycred' ); ?></label></h4>
849
  <div class="body" style="display:none;">
850
  <?php
851
 
@@ -859,20 +859,20 @@ if ( ! class_exists( 'myCRED_Settings_Module' ) ) :
859
  <div class="row">
860
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
861
  <div class="form-group">
862
- <label><?php _e( 'Meta Key', 'mycred' ); ?></label>
863
  <input type="text" disabled="disabled" class="form-control" value="<?php echo esc_attr( $type ); ?>" class="readonly" />
864
  </div>
865
  </div>
866
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
867
  <div class="form-group">
868
- <label><?php _e( 'Label', 'mycred' ); ?></label>
869
  <input type="text" disabled="disabled" class="form-control" value="<?php echo strip_tags( $label ); ?>" class="readonly" />
870
  </div>
871
  </div>
872
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
873
  <div class="form-group">
874
  <label>&nbsp;</label>
875
- <label><input type="checkbox" disabled="disabled" class="disabled" value="<?php echo esc_attr( $type ); ?>" /> <?php _e( 'Delete', 'mycred' ); ?></label>
876
  </div>
877
  </div>
878
  </div>
@@ -885,20 +885,20 @@ if ( ! class_exists( 'myCRED_Settings_Module' ) ) :
885
  <div class="row">
886
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
887
  <div class="form-group">
888
- <label><?php _e( 'Meta Key', 'mycred' ); ?></label>
889
  <input type="text" name="mycred_pref_core[types][<?php echo esc_attr( $type ); ?>][key]" value="<?php echo esc_attr( $type ); ?>" class="form-control" />
890
  </div>
891
  </div>
892
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
893
  <div class="form-group">
894
- <label><?php _e( 'Label', 'mycred' ); ?></label>
895
  <input type="text" name="mycred_pref_core[types][<?php echo esc_attr( $type ); ?>][label]" value="<?php echo strip_tags( $label ); ?>" class="form-control" />
896
  </div>
897
  </div>
898
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
899
  <div class="form-group">
900
  <label>&nbsp;</label>
901
- <label for="mycred-point-type-<?php echo esc_attr( $type ); ?>"><input type="checkbox" name="mycred_pref_core[delete_types][]" id="mycred-point-type-<?php echo esc_attr( $type ); ?>" value="<?php echo esc_attr( $type ); ?>" /> <?php _e( 'Delete', 'mycred' ); ?></label>
902
  </div>
903
  </div>
904
  </div>
@@ -911,29 +911,29 @@ if ( ! class_exists( 'myCRED_Settings_Module' ) ) :
911
  }
912
 
913
  ?>
914
- <h3><?php _e( 'Add New Type', 'mycred' ); ?></h3>
915
  <div class="row">
916
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
917
  <div class="form-group">
918
- <label for="mycred-new-ctype-key-value"><?php _e( 'Meta Key', 'mycred' ); ?></label>
919
- <input type="text" id="mycred-new-ctype-key-value" name="mycred_pref_core[types][new][key]" placeholder="<?php _e( 'Required', 'mycred' ); ?>" value="" class="form-control" />
920
  </div>
921
  </div>
922
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
923
  <div class="form-group">
924
- <label for="mycred-new-ctype-key-label"><?php _e( 'Singular', 'mycred' ); ?></label>
925
- <input type="text" id="mycred-new-ctype-key-singular" name="mycred_pref_core[types][new][singular]" placeholder="<?php _e( 'Required', 'mycred' ); ?>" value="" class="form-control" />
926
  </div>
927
  </div>
928
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
929
  <div class="form-group">
930
- <label for="mycred-new-ctype-key-label"><?php _e( 'Plural', 'mycred' ); ?></label>
931
- <input type="text" id="mycred-new-ctype-key-label" name="mycred_pref_core[types][new][label]" placeholder="<?php _e( 'Required', 'mycred' ); ?>" value="" class="form-control" />
932
  </div>
933
  </div>
934
  </div>
935
  <p id="mycred-ctype-warning">
936
- <strong><?php _e( 'Note This meta key must be in lowercase and only contain letters or underscore. All other characters will be deleted! make sure to add some unique prefix to this meta key to avoid any conflicts in database.', 'mycred' ); ?> <a href="https://codex.mycred.me/chapter-i/points/"><?php _e( 'Read More', 'mycred' )?></a></strong>
937
  </p>
938
  </div>
939
  <?php
@@ -965,7 +965,7 @@ if ( ! class_exists( 'myCRED_Settings_Module' ) ) :
965
  <div class="row">
966
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
967
  <div class="form-group">
968
- <label><?php _e( 'Identify users by', 'mycred' ); ?></label>
969
  <select id="mycred-export-identify-by" class="form-control">
970
  <?php
971
 
@@ -981,12 +981,12 @@ if ( ! class_exists( 'myCRED_Settings_Module' ) ) :
981
 
982
  ?>
983
  </select>
984
- <span class="description"><?php _e( 'Use ID if you intend to use this export as a backup of your current site while Email is recommended if you want to export to a different site.', 'mycred' ); ?></span>
985
  </div>
986
  </div>
987
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
988
  <div class="form-group">
989
- <label><?php _e( 'Import Log Entry', 'mycred' ); ?></label>
990
  <input type="text" id="mycred-export-log-template" value="" class="regular-text form-control" />
991
  <span class="description"><?php echo sprintf( __( 'Optional log entry to use if you intend to import this file in a different %s installation.', 'mycred' ), mycred_label() ); ?></span>
992
  </div>
@@ -995,7 +995,7 @@ if ( ! class_exists( 'myCRED_Settings_Module' ) ) :
995
 
996
  <div class="row last">
997
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 text-right">
998
- <input type="button" id="mycred-run-exporter" value="<?php _e( 'Export', 'mycred' ); ?>" data-type="<?php echo $this->mycred_type; ?>" class="button button-large button-primary" />
999
  </div>
1000
  </div>
1001
  </div>
505
  if ( $this->is_main_type ) {
506
 
507
  ?>
508
+ <div><input type="number" min="0" max="20" id="mycred-adjust-decimal-places" class="form-control" value="<?php echo esc_attr( $this->core->format['decimals'] ); ?>" data-org="<?php echo $this->core->format['decimals']; ?>" size="8" /> <input type="button" style="display:none;" id="mycred-update-log-decimals" class="button button-primary button-large" value="<?php esc_attr_e( 'Update Database', 'mycred' ); ?>" /></div>
509
  <?php
510
 
511
  }
516
  if ( $default->format['decimals'] == 0 ) {
517
 
518
  ?>
519
+ <div><?php esc_html_e( 'No decimals', 'mycred' ); ?></div>
520
  <?php
521
 
522
  }
598
 
599
  ?>
600
  <div class="wrap mycred-metabox" id="myCRED-wrap">
601
+ <h1><?php esc_html_e( 'Settings', 'mycred' ); if ( MYCRED_DEFAULT_LABEL === 'myCRED' ) : ?> <a href="http://codex.mycred.me/" target="_blank" class="page-title-action"><?php esc_html_e( 'Documentation', 'mycred' ); ?></a><?php endif; ?></h1>
602
 
603
  <?php $this->update_notice(); ?>
604
 
611
  <?php settings_fields( $this->settings_name ); ?>
612
 
613
  <div class="list-items expandable-li" id="accordion">
614
+ <h4 <?php echo !$main_screen ? '' : 'style="display:none"';?>><span class="dashicons dashicons-admin-settings static"></span><label><?php esc_html_e( 'Core Settings', 'mycred' ); ?></label></h4>
615
  <div class="body" style="display:none;">
616
 
617
  <div class="row">
618
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
619
+ <h3><?php esc_html_e( 'Labels', 'mycred' ); ?></h3>
620
  <div class="row">
621
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
622
  <div class="form-group">
623
+ <label for="<?php echo $this->field_id( array( 'name' => 'singular' ) ); ?>"><?php esc_html_e( 'Singular', 'mycred' ); ?></label>
624
+ <input type="text" name="<?php echo $this->field_name( array( 'name' => 'singular' ) ); ?>" id="<?php echo $this->field_id( array( 'name' => 'singular' ) ); ?>" class="form-control" placeholder="<?php esc_attr_e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $this->core->name['singular'] ); ?>" />
625
  </div>
626
  </div>
627
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
628
  <div class="form-group">
629
+ <label for="<?php echo $this->field_id( array( 'name' => 'plural' ) ); ?>"><?php esc_html_e( 'Plural', 'mycred' ); ?></label>
630
+ <input type="text" name="<?php echo $this->field_name( array( 'name' => 'plural' ) ); ?>" id="<?php echo $this->field_id( array( 'name' => 'plural' ) ); ?>" class="form-control" placeholder="<?php esc_attr_e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $this->core->name['plural'] ); ?>" />
631
  </div>
632
  </div>
633
  </div>
634
+ <p><span class="description"><?php esc_html_e( 'These labels are used throughout the admin area and when presenting points to your users.', 'mycred' ); ?></span></p>
635
  </div>
636
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
637
+ <h3><?php esc_html_e( 'Format', 'mycred' ); ?></h3>
638
  <div class="row">
639
  <div class="col-lg-2 col-md-2 col-sm-12 col-xs-12">
640
  <div class="form-group">
641
+ <label for="<?php echo $this->field_id( 'before' ); ?>"><?php esc_html_e( 'Prefix', 'mycred' ); ?></label>
642
  <input type="text" name="<?php echo $this->field_name( 'before' ); ?>" id="<?php echo $this->field_id( 'before' ); ?>" class="form-control" value="<?php echo esc_attr( $this->core->before ); ?>" />
643
  </div>
644
  </div>
645
  <div class="col-lg-5 col-md-5 col-sm-12 col-xs-12">
646
  <div class="form-group">
647
+ <label for="<?php echo $this->field_id( array( 'format' => 'separators' ) ); ?>-thousand"><?php esc_html_e( 'Separators', 'mycred' ); ?></label>
648
  <div class="form-inline">
649
  <label>1</label> <input type="text" name="<?php echo $this->field_name( array( 'format' => 'separators' ) ); ?>[thousand]" id="<?php echo $this->field_id( array( 'format' => 'separators' ) ); ?>-thousand" placeholder="," class="form-control" size="2" value="<?php echo esc_attr( $this->core->format['separators']['thousand'] ); ?>" /> <label>000</label> <input type="text" name="<?php echo $this->field_name( array( 'format' => 'separators' ) ); ?>[decimal]" id="<?php echo $this->field_id( array( 'format' => 'separators' ) ); ?>-decimal" placeholder="." class="form-control" size="2" value="<?php echo esc_attr( $this->core->format['separators']['decimal'] ); ?>" /> <label>00</label>
650
  </div>
652
  </div>
653
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
654
  <div class="form-group">
655
+ <label for=""><?php esc_html_e( 'Decimals', 'mycred' ); ?></label>
656
  <?php $this->adjust_decimal_places(); ?>
657
  </div>
658
  </div>
659
  <div class="col-lg-2 col-md-2 col-sm-12 col-xs-12">
660
  <div class="form-group">
661
+ <label for="<?php echo $this->field_id( 'after' ); ?>"><?php esc_html_e( 'Suffix', 'mycred' ); ?></label>
662
  <input type="text" name="<?php echo $this->field_name( 'after' ); ?>" id="<?php echo $this->field_id( 'after' ); ?>" class="form-control" value="<?php echo esc_attr( $this->core->after ); ?>" />
663
  </div>
664
  </div>
665
  </div>
666
+ <p><span class="description"><?php esc_html_e( 'Set decimals to zero if you prefer to use whole numbers.', 'mycred' ); ?></span></p>
667
  <?php if ( $this->is_main_type ) : ?>
668
+ <p><strong><?php esc_html_e( 'Tip', 'mycred' ); ?>:</strong> <?php esc_html_e( 'As this is your main point type, the value you select here will be the largest number of decimals your installation will support.', 'mycred' ); ?></span></p>
669
  <?php endif; ?>
670
  </div>
671
  </div>
672
 
673
  <div class="row">
674
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
675
+ <h3><?php esc_html_e( 'Security', 'mycred' ); ?></h3>
676
  <div class="row">
677
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
678
  <div class="form-group">
679
+ <label for="<?php echo $this->field_id( array( 'caps' => 'creds' ) ); ?>"><?php esc_html_e( 'Point Editors', 'mycred' ); ?></label>
680
+ <input type="text" name="<?php echo $this->field_name( array( 'caps' => 'creds' ) ); ?>" id="<?php echo $this->field_id( array( 'caps' => 'creds' ) ); ?>" class="form-control" placeholder="<?php esc_attr_e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $this->core->caps['creds'] ); ?>" />
681
+ <p><span class="description"><?php esc_html_e( 'The capability of users who can edit balances.', 'mycred' ); ?></span></p>
682
  </div>
683
  </div>
684
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
685
  <div class="form-group">
686
+ <label for="<?php echo $this->field_id( array( 'caps' => 'plugin' ) ); ?>"><?php esc_html_e( 'Point Administrators', 'mycred' ); ?></label>
687
+ <input type="text" name="<?php echo $this->field_name( array( 'caps' => 'plugin' ) ); ?>" id="<?php echo $this->field_id( array( 'caps' => 'plugin' ) ); ?>" class="form-control" placeholder="<?php esc_attr_e( 'Required', 'mycred' ); ?>" value="<?php echo esc_attr( $this->core->caps['plugin'] ); ?>" />
688
+ <p><span class="description"><?php esc_html_e( 'The capability of users who can edit settings.', 'mycred' ); ?></span></p>
689
  </div>
690
  </div>
691
  <div class="col-lg-2 col-md-2 col-sm-12 col-xs-12">
692
  <div class="form-group">
693
  <?php if ( ! isset( $this->core->max ) ) $this->core->max(); ?>
694
+ <label for="<?php echo $this->field_id( 'max' ); ?>"><?php esc_html_e( 'Max. Amount', 'mycred' ); ?></label>
695
  <input type="text" name="<?php echo $this->field_name( 'max' ); ?>" id="<?php echo $this->field_id( 'max' ); ?>" class="form-control" value="<?php echo esc_attr( $this->core->max ); ?>" />
696
+ <p><span class="description"><?php esc_html_e( 'The maximum amount allowed to be paid out in a single instance.', 'mycred' ); ?></span></p>
697
  </div>
698
  </div>
699
  <div class="col-lg-2 col-md-2 col-sm-12 col-xs-12">
700
  <div class="form-group">
701
+ <label for="<?php echo $excluded_ids_args['id']; ?>"><?php esc_html_e( 'Exclude Users', 'mycred' ); ?></label>
702
  <?php echo mycred_create_select2( $all_users, $excluded_ids_args, $excluded_ids ); ?>
703
  </div>
704
  <div class="form-group">
705
  <div class="checkbox">
706
+ <label for="<?php echo $this->field_id( array( 'exclude' => 'cred_editors' ) ); ?>"><input type="checkbox" name="<?php echo $this->field_name( array( 'exclude' => 'cred_editors' ) ); ?>" id="<?php echo $this->field_id( array( 'exclude' => 'cred_editors' ) ); ?>"<?php checked( $this->core->exclude['cred_editors'], 1 ); ?> value="1" /> <?php esc_html_e( 'Exclude point editors', 'mycred' ); ?></label>
707
  </div>
708
  <div class="checkbox">
709
+ <label for="<?php echo $this->field_id( array( 'exclude' => 'plugin_editors' ) ); ?>"><input type="checkbox" name="<?php echo $this->field_name( array( 'exclude' => 'plugin_editors' ) ); ?>" id="<?php echo $this->field_id( array( 'exclude' => 'plugin_editors' ) ); ?>"<?php checked( $this->core->exclude['plugin_editors'], 1 ); ?> value="1" /> <?php esc_html_e( 'Exclude point administrators', 'mycred' ); ?></label>
710
  </div>
711
  </div>
712
  </div>
713
  <div class="col-lg-2 col-md-2 col-sm-12 col-xs-12">
714
  <div class="form-group">
715
+ <label for="<?php echo $roles_args['id']; ?>"><?php esc_html_e( 'Exclude by User Role', 'mycred' ); ?></label>
716
  <?php echo mycred_create_select2( $roles, $roles_args, $excluded_roles ); ?>
717
  </div>
718
  </div>
726
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
727
  <div id="mycred-image-setup" class="default-image-wrapper">
728
 
729
+ <h3><?php esc_html_e( 'Point Type Image', 'mycred' ); ?></h3>
730
 
731
 
732
  <div class="point-type-image">
754
  ?>
755
  </div>
756
  <div class="point-image-buttons">
757
+ <button type="button" class="button button-secondary" id="point-type-change-default-image"><?php esc_html_e( 'Change Image', 'mycred' ) ?></button>
758
  </div>
759
  </div>
760
  </div>
761
  </div>
762
 
763
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
764
+ <h3><?php esc_html_e( 'Other Settings', 'mycred' ); ?></h3>
765
  <div class="form-group">
766
+ <label for="<?php echo $this->field_id( 'delete_user' ); ?>"><input type="checkbox" name="<?php echo $this->field_name( 'delete_user' ); ?>" id="<?php echo $this->field_id( 'delete_user' ); ?>" <?php checked( $delete_user, 1 ); ?> value="1" /> <?php esc_html_e( 'Delete log entries when user is deleted.', 'mycred' ); ?></label>
767
  </div>
768
  </div>
769
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
782
  $reset_block = true;
783
 
784
  ?>
785
+ <h4 <?php echo !$main_screen ? '' : 'style="display:none"';?>><span class="dashicons dashicons-dashboard static"></span><label><?php esc_html_e( 'Management', 'mycred' ); ?></label></h4>
786
  <div class="body" style="display:none;">
787
 
788
  <div class="row">
794
  </div>
795
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
796
  <div class="form-group">
797
+ <label><?php esc_html_e( 'Entries', 'mycred' ); ?></label>
798
  <h1><?php echo $total_rows; ?></h1>
799
  </div>
800
  </div>
801
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
802
  <div class="form-group">
803
+ <label><?php esc_html_e( 'Actions', 'mycred' ); ?></label>
804
  <div>
805
  <?php if ( ( ! mycred_centralize_log() ) || ( mycred_centralize_log() && $GLOBALS['blog_id'] == 1 ) ) : ?>
806
+ <button type="button" id="mycred-manage-action-empty-log" data-type="<?php echo $this->mycred_type; ?>" class="button button-large large <?php if ( $total_rows == 0 ) echo '"disabled="disabled'; else echo 'button-primary'; ?>"><?php esc_html_e( 'Empty Log', 'mycred' ); ?></button>
807
  <?php endif; ?>
808
  </div>
809
  </div>
813
  <div class="row">
814
  <div class="col-lg-5 col-md-5 col-sm-12 col-xs-12">
815
  <div class="form-group">
816
+ <label><?php esc_html_e( 'Balance Meta Key', 'mycred' ); ?></label>
817
  <h1><?php echo $this->core->cred_id; ?></h1>
818
  </div>
819
  </div>
820
  <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
821
  <div class="form-group">
822
+ <label><?php esc_html_e( 'Users', 'mycred' ); ?></label>
823
  <h1><?php echo $this->core->count_members(); ?></h1>
824
  </div>
825
  </div>
826
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
827
  <div class="form-group">
828
+ <label><?php esc_html_e( 'Actions', 'mycred' ); ?></label>
829
  <div>
830
+ <button type="button" id="mycred-manage-action-reset-accounts" data-type="<?php echo $this->mycred_type; ?>" class="button button-large large <?php if ( $reset_block ) echo '" disabled="disabled'; else echo 'button-primary'; ?>"><?php esc_html_e( 'Set all to zero', 'mycred' ); ?></button>
831
+ <button type="button" id="mycred-export-users-points" data-type="<?php echo $this->mycred_type; ?>" class="button button-large large"><?php esc_html_e( 'Export Balances', 'mycred' ); ?></button>
832
  </div>
833
  </div>
834
  </div>
845
  if ( $main_screen ) :
846
 
847
  ?>
848
+ <h4><span class="dashicons dashicons-star-filled static"></span><label><?php esc_html_e( 'Point Types', 'mycred' ); ?></label></h4>
849
  <div class="body" style="display:none;">
850
  <?php
851
 
859
  <div class="row">
860
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
861
  <div class="form-group">
862
+ <label><?php esc_html_e( 'Meta Key', 'mycred' ); ?></label>
863
  <input type="text" disabled="disabled" class="form-control" value="<?php echo esc_attr( $type ); ?>" class="readonly" />
864
  </div>
865
  </div>
866
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
867
  <div class="form-group">
868
+ <label><?php esc_html_e( 'Label', 'mycred' ); ?></label>
869
  <input type="text" disabled="disabled" class="form-control" value="<?php echo strip_tags( $label ); ?>" class="readonly" />
870
  </div>
871
  </div>
872
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
873
  <div class="form-group">
874
  <label>&nbsp;</label>
875
+ <label><input type="checkbox" disabled="disabled" class="disabled" value="<?php echo esc_attr( $type ); ?>" /> <?php esc_html_e( 'Delete', 'mycred' ); ?></label>
876
  </div>
877
  </div>
878
  </div>
885
  <div class="row">
886
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
887
  <div class="form-group">
888
+ <label><?php esc_html_e( 'Meta Key', 'mycred' ); ?></label>
889
  <input type="text" name="mycred_pref_core[types][<?php echo esc_attr( $type ); ?>][key]" value="<?php echo esc_attr( $type ); ?>" class="form-control" />
890
  </div>
891
  </div>
892
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
893
  <div class="form-group">
894
+ <label><?php esc_html_e( 'Label', 'mycred' ); ?></label>
895
  <input type="text" name="mycred_pref_core[types][<?php echo esc_attr( $type ); ?>][label]" value="<?php echo strip_tags( $label ); ?>" class="form-control" />
896
  </div>
897
  </div>
898
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
899
  <div class="form-group">
900
  <label>&nbsp;</label>
901
+ <label for="mycred-point-type-<?php echo esc_attr( $type ); ?>"><input type="checkbox" name="mycred_pref_core[delete_types][]" id="mycred-point-type-<?php echo esc_attr( $type ); ?>" value="<?php echo esc_attr( $type ); ?>" /> <?php esc_html_e( 'Delete', 'mycred' ); ?></label>
902
  </div>
903
  </div>
904
  </div>
911
  }
912
 
913
  ?>
914
+ <h3><?php esc_html_e( 'Add New Type', 'mycred' ); ?></h3>
915
  <div class="row">
916
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
917
  <div class="form-group">
918
+ <label for="mycred-new-ctype-key-value"><?php esc_html_e( 'Meta Key', 'mycred' ); ?></label>
919
+ <input type="text" id="mycred-new-ctype-key-value" name="mycred_pref_core[types][new][key]" placeholder="<?php esc_attr_e( 'Required', 'mycred' ); ?>" value="" class="form-control" />
920
  </div>
921
  </div>
922
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
923
  <div class="form-group">
924
+ <label for="mycred-new-ctype-key-label"><?php esc_html_e( 'Singular', 'mycred' ); ?></label>
925
+ <input type="text" id="mycred-new-ctype-key-singular" name="mycred_pref_core[types][new][singular]" placeholder="<?php esc_attr_e( 'Required', 'mycred' ); ?>" value="" class="form-control" />
926
  </div>
927
  </div>
928
  <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
929
  <div class="form-group">
930
+ <label for="mycred-new-ctype-key-label"><?php esc_html_e( 'Plural', 'mycred' ); ?></label>
931
+ <input type="text" id="mycred-new-ctype-key-label" name="mycred_pref_core[types][new][label]" placeholder="<?php esc_attr_e( 'Required', 'mycred' ); ?>" value="" class="form-control" />
932
  </div>
933
  </div>
934
  </div>
935
  <p id="mycred-ctype-warning">
936
+ <strong><?php esc_html_e( 'Note This meta key must be in lowercase and only contain letters or underscore. All other characters will be deleted! make sure to add some unique prefix to this meta key to avoid any conflicts in database.', 'mycred' ); ?> <a href="https://codex.mycred.me/chapter-i/points/"><?php esc_html_e( 'Read More', 'mycred' )?></a></strong>
937
  </p>
938
  </div>
939
  <?php
965
  <div class="row">
966
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
967
  <div class="form-group">
968
+ <label><?php esc_html_e( 'Identify users by', 'mycred' ); ?></label>
969
  <select id="mycred-export-identify-by" class="form-control">
970
  <?php
971
 
981
 
982
  ?>
983
  </select>
984
+ <span class="description"><?php esc_html_e( 'Use ID if you intend to use this export as a backup of your current site while Email is recommended if you want to export to a different site.', 'mycred' ); ?></span>
985
  </div>
986
  </div>
987
  <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
988
  <div class="form-group">
989
+ <label><?php esc_html_e( 'Import Log Entry', 'mycred' ); ?></label>
990
  <input type="text" id="mycred-export-log-template" value="" class="regular-text form-control" />
991
  <span class="description"><?php echo sprintf( __( 'Optional log entry to use if you intend to import this file in a different %s installation.', 'mycred' ), mycred_label() ); ?></span>
992
  </div>
995
 
996
  <div class="row last">
997
  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 text-right">
998
+ <input type="button" id="mycred-run-exporter" value="<?php esc_attr_e( 'Export', 'mycred' ); ?>" data-type="<?php echo $this->mycred_type; ?>" class="button button-large button-primary" />
999
  </div>
1000
  </div>
1001
  </div>
mycred.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: myCred
4
  * Plugin URI: https://mycred.me
5
  * Description: An adaptive points management system for WordPress powered websites.
6
- * Version: 2.4.4.4
7
  * Tags: point, credit, loyalty program, engagement, reward, woocommerce rewards
8
  * Author: myCred
9
  * Author URI: https://mycred.me
@@ -20,7 +20,7 @@ if ( ! class_exists( 'myCRED_Core' ) ) :
20
  final class myCRED_Core {
21
 
22
  // Plugin Version
23
- public $version = '2.4.4.4';
24
 
25
  // Instnace
26
  protected static $_instance = NULL;
@@ -54,14 +54,14 @@ if ( ! class_exists( 'myCRED_Core' ) ) :
54
  * @since 1.7
55
  * @version 1.0
56
  */
57
- public function __clone() { _doing_it_wrong( __FUNCTION__, 'Cheatin&#8217; huh?', '2.4.4.4' ); }
58
 
59
  /**
60
  * Not allowed
61
  * @since 1.7
62
  * @version 1.0
63
  */
64
- public function __wakeup() { _doing_it_wrong( __FUNCTION__, 'Cheatin&#8217; huh?', '2.4.4.4' ); }
65
 
66
  /**
67
  * Get
@@ -82,7 +82,7 @@ if ( ! class_exists( 'myCRED_Core' ) ) :
82
  if ( ! defined( $name ) )
83
  define( $name, $value );
84
  elseif ( ! $definable && defined( $name ) )
85
- _doing_it_wrong( 'myCRED_Core->define()', 'Could not define: ' . $name . ' as it is already defined somewhere else!', '2.4.4.4' );
86
  }
87
 
88
  /**
@@ -94,7 +94,7 @@ if ( ! class_exists( 'myCRED_Core' ) ) :
94
  if ( file_exists( $required_file ) )
95
  require_once $required_file;
96
  else
97
- _doing_it_wrong( 'myCRED_Core->file()', 'Requested file ' . $required_file . ' not found.', '2.4.4.4' );
98
  }
99
 
100
  /**
3
  * Plugin Name: myCred
4
  * Plugin URI: https://mycred.me
5
  * Description: An adaptive points management system for WordPress powered websites.
6
+ * Version: 2.4.5
7
  * Tags: point, credit, loyalty program, engagement, reward, woocommerce rewards
8
  * Author: myCred
9
  * Author URI: https://mycred.me
20
  final class myCRED_Core {
21
 
22
  // Plugin Version
23
+ public $version = '2.4.5';
24
 
25
  // Instnace
26
  protected static $_instance = NULL;
54
  * @since 1.7
55
  * @version 1.0
56
  */
57
+ public function __clone() { _doing_it_wrong( __FUNCTION__, 'Cheatin&#8217; huh?', '2.4.5' ); }
58
 
59
  /**
60
  * Not allowed
61
  * @since 1.7
62
  * @version 1.0
63
  */
64
+ public function __wakeup() { _doing_it_wrong( __FUNCTION__, 'Cheatin&#8217; huh?', '2.4.5' ); }
65
 
66
  /**
67
  * Get
82
  if ( ! defined( $name ) )
83
  define( $name, $value );
84
  elseif ( ! $definable && defined( $name ) )
85
+ _doing_it_wrong( 'myCRED_Core->define()', 'Could not define: ' . $name . ' as it is already defined somewhere else!', '2.4.5' );
86
  }
87
 
88
  /**
94
  if ( file_exists( $required_file ) )
95
  require_once $required_file;
96
  else
97
+ _doing_it_wrong( 'myCRED_Core->file()', 'Requested file ' . $required_file . ' not found.', '2.4.5' );
98
  }
99
 
100
  /**
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: mycred,wpexpertsio
3
  Tags: badges, gamification, loyalty, points, rewards
4
  Requires at least: 4.8
5
  Tested up to: 5.9.3
6
- Stable tag: 2.4.4.4
7
  Requires PHP: 7.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -303,6 +303,9 @@ You can find a list of [frequently asked questions](https://mycred.me/about/faq/
303
 
304
  == Upgrade Notice ==
305
 
 
 
 
306
  = 2.4.4.4 =
307
  Bug fixes.
308
 
@@ -372,6 +375,9 @@ The banking module have been replaced by Central deposite module, and interest r
372
 
373
  == Changelog ==
374
 
 
 
 
375
  = 2.4.4.4 =
376
  * **FIX** - Unable to assign/revoke badges manually, also some HTML elements were not rendered properly in the user edit window under the Badges section.
377
 
3
  Tags: badges, gamification, loyalty, points, rewards
4
  Requires at least: 4.8
5
  Tested up to: 5.9.3
6
+ Stable tag: 2.4.5
7
  Requires PHP: 7.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
303
 
304
  == Upgrade Notice ==
305
 
306
+ = 2.4.5 =
307
+ Code improvement.
308
+
309
  = 2.4.4.4 =
310
  Bug fixes.
311
 
375
 
376
  == Changelog ==
377
 
378
+ = 2.4.5 =
379
+ - **TWAEK** - Code improvement.
380
+
381
  = 2.4.4.4 =
382
  * **FIX** - Unable to assign/revoke badges manually, also some HTML elements were not rendered properly in the user edit window under the Badges section.
383