Version Description
- Fixed Bug #3 - Field name collision in myCRED_Module() class
- Fixed Bug #4 - Missing text domain for core hook titles
Download this release
Release Info
Developer | designbymerovingi |
Plugin | myCRED |
Version | 1.0.2 |
Comparing to | |
See all releases |
Code changes from version 1.0.1 to 1.0.2
- addons/buy-creds/myCRED-addon-buy-creds.php +14 -14
- modules/mycred-module-hooks.php +6 -6
- mycred.php +2 -3
- readme.txt +5 -1
addons/buy-creds/myCRED-addon-buy-creds.php
CHANGED
@@ -145,7 +145,7 @@ if ( !class_exists( 'myCRED_Buy_CREDs' ) ) {
|
|
145 |
/**
|
146 |
* Add to General Settings
|
147 |
* @since 0.1
|
148 |
-
* @version 1.0
|
149 |
*/
|
150 |
public function after_general_settings() {
|
151 |
// Since we are both registering our own settings and want to hook into
|
@@ -185,36 +185,36 @@ if ( !class_exists( 'myCRED_Buy_CREDs' ) ) {
|
|
185 |
<label class="subheader"><?php echo $this->core->template_tags_general( __( 'Minimum %plural%', 'mycred' ) ); ?></label>
|
186 |
<ol id="mycred-buy-creds-minimum-amount">
|
187 |
<li>
|
188 |
-
<div class="h2"><input type="text" name="
|
189 |
<span class="description"><?php echo $this->core->template_tags_general( __( 'Minimum amount of %plural% a user must purchase. Will default to 1.', 'mycred' ) ); ?></span>
|
190 |
</li>
|
191 |
</ol>
|
192 |
<label class="subheader" for="<?php echo $this->field_id( 'login' ); ?>"><?php _e( 'Login Template', 'mycred' ); ?></label>
|
193 |
<ol id="mycred-buy-creds-default-log">
|
194 |
<li>
|
195 |
-
<textarea rows="10" cols="50" name="
|
196 |
<span class="description"><?php _e( 'Content to show when a user is not logged in.', 'mycred' ); ?></span>
|
197 |
</li>
|
198 |
</ol>
|
199 |
<label class="subheader" for="<?php echo $this->field_id( 'log' ); ?>"><?php _e( 'Log Template', 'mycred' ); ?></label>
|
200 |
<ol id="mycred-buy-creds-default-log">
|
201 |
<li>
|
202 |
-
<div class="h2"><input type="text" name="
|
203 |
</li>
|
204 |
</ol>
|
205 |
<label class="subheader"><?php _e( 'Thank You Page', 'mycred' ); ?></label>
|
206 |
<ol id="mycred-buy-creds-thankyou-page">
|
207 |
<li class="option">
|
208 |
-
<input type="radio" name="
|
209 |
-
<div class="h2"><?php echo get_bloginfo( 'url' ) . '/'; ?> <input type="text" name="
|
210 |
</li>
|
211 |
<li class="empty"> </li>
|
212 |
<li class="option">
|
213 |
-
<input type="radio" name="
|
214 |
<?php
|
215 |
// Thank you page dropdown
|
216 |
$thankyou_args = array(
|
217 |
-
'name' =>
|
218 |
'id' => $this->field_id( array( 'thankyou' => 'page' ) ) . '-id',
|
219 |
'selected' => $buy_creds['thankyou']['page'],
|
220 |
'show_option_none' => __( 'Select', 'mycred' )
|
@@ -226,16 +226,16 @@ if ( !class_exists( 'myCRED_Buy_CREDs' ) ) {
|
|
226 |
<label class="subheader"><?php _e( 'Cancellation Page', 'mycred' ); ?></label>
|
227 |
<ol id="mycred-buy-creds-cancel-page">
|
228 |
<li class="option">
|
229 |
-
<input type="radio" name="
|
230 |
<div class="h2"><?php echo get_bloginfo( 'url' ) . '/'; ?> <input type="text" name="mycred_pref_core[buy_creds][cancelled][custom]" id="mycred-buy-creds-cancelled-custom-url" value="<?php echo $buy_creds['cancelled']['custom']; ?>" /></div>
|
231 |
</li>
|
232 |
<li class="empty"> </li>
|
233 |
<li class="option">
|
234 |
-
<input type="radio" name="
|
235 |
<?php
|
236 |
// Cancelled page dropdown
|
237 |
$cancelled_args = array(
|
238 |
-
'name' =>
|
239 |
'id' => $this->field_id( array( 'cancelled' => 'page' ) ) . '-id',
|
240 |
'selected' => $buy_creds['cancelled']['page'],
|
241 |
'show_option_none' => __( 'Select', 'mycred' )
|
@@ -246,12 +246,12 @@ if ( !class_exists( 'myCRED_Buy_CREDs' ) ) {
|
|
246 |
</ol>
|
247 |
<label class="subheader"><?php _e( 'Gifting', 'mycred' ); ?></label>
|
248 |
<ol id="mycred-buy-creds-gifting">
|
249 |
-
<li><input type="checkbox" name="
|
250 |
-
<li><input type="checkbox" name="
|
251 |
<li class="empty"> </li>
|
252 |
<li>
|
253 |
<label for="<?php echo $this->field_id( array( 'gifting' => 'log' ) ); ?>"><?php _e( 'Log Template', 'mycred' ); ?></label>
|
254 |
-
<div class="h2"><input type="text" name="
|
255 |
<div class="description"><?php _e( 'Available template tags: %singular%, %plural% and %display_name%' ); ?></div>
|
256 |
</li>
|
257 |
</ol>
|
145 |
/**
|
146 |
* Add to General Settings
|
147 |
* @since 0.1
|
148 |
+
* @version 1.0.1
|
149 |
*/
|
150 |
public function after_general_settings() {
|
151 |
// Since we are both registering our own settings and want to hook into
|
185 |
<label class="subheader"><?php echo $this->core->template_tags_general( __( 'Minimum %plural%', 'mycred' ) ); ?></label>
|
186 |
<ol id="mycred-buy-creds-minimum-amount">
|
187 |
<li>
|
188 |
+
<div class="h2"><input type="text" name="mycred_pref_core[buy_creds][minimum]" id="<?php echo $this->field_id( 'minimum' ); ?>" value="<?php echo $buy_creds['minimum']; ?>" size="5" /></div>
|
189 |
<span class="description"><?php echo $this->core->template_tags_general( __( 'Minimum amount of %plural% a user must purchase. Will default to 1.', 'mycred' ) ); ?></span>
|
190 |
</li>
|
191 |
</ol>
|
192 |
<label class="subheader" for="<?php echo $this->field_id( 'login' ); ?>"><?php _e( 'Login Template', 'mycred' ); ?></label>
|
193 |
<ol id="mycred-buy-creds-default-log">
|
194 |
<li>
|
195 |
+
<textarea rows="10" cols="50" name="mycred_pref_core[buy_creds][login]" id="<?php echo $this->field_id( 'login' ); ?>" class="large-text code"><?php echo $buy_creds['login']; ?></textarea>
|
196 |
<span class="description"><?php _e( 'Content to show when a user is not logged in.', 'mycred' ); ?></span>
|
197 |
</li>
|
198 |
</ol>
|
199 |
<label class="subheader" for="<?php echo $this->field_id( 'log' ); ?>"><?php _e( 'Log Template', 'mycred' ); ?></label>
|
200 |
<ol id="mycred-buy-creds-default-log">
|
201 |
<li>
|
202 |
+
<div class="h2"><input type="text" name="mycred_pref_core[buy_creds][log]" id="<?php echo $this->field_id( 'log' ); ?>" value="<?php echo $buy_creds['log']; ?>" class="long" /></div>
|
203 |
</li>
|
204 |
</ol>
|
205 |
<label class="subheader"><?php _e( 'Thank You Page', 'mycred' ); ?></label>
|
206 |
<ol id="mycred-buy-creds-thankyou-page">
|
207 |
<li class="option">
|
208 |
+
<input type="radio" name="mycred_pref_core[buy_creds][thankyou][use]" <?php checked( $thankyou_use, 'custom' ); ?> id="<?php echo $this->field_id( array( 'thankyou' => 'use' ) ); ?>-custom" value="custom" /> <label for="<?php echo $this->field_id( array( 'thankyou' => 'custom' ) ); ?>"><?php _e( 'Custom URL', 'mycred' ); ?></label><br />
|
209 |
+
<div class="h2"><?php echo get_bloginfo( 'url' ) . '/'; ?> <input type="text" name="mycred_pref_core[buy_creds][thankyou][custom]" id="<?php echo $this->field_id( array( 'thankyou' => 'custom' ) ); ?>" value="<?php echo $buy_creds['thankyou']['custom']; ?>" /></div>
|
210 |
</li>
|
211 |
<li class="empty"> </li>
|
212 |
<li class="option">
|
213 |
+
<input type="radio" name="mycred_pref_core[buy_creds][thankyou][use]" <?php checked( $thankyou_use, 'page' ); ?> id="<?php echo $this->field_id( array( 'thankyou' => 'use' ) ); ?>-page" value="page" /> <label for="mycred-buy-creds-thankyou-use-page"><?php _e( 'Page', 'mycred' ); ?></label><br />
|
214 |
<?php
|
215 |
// Thank you page dropdown
|
216 |
$thankyou_args = array(
|
217 |
+
'name' => 'mycred_pref_core[buy_creds][thankyou][page]',
|
218 |
'id' => $this->field_id( array( 'thankyou' => 'page' ) ) . '-id',
|
219 |
'selected' => $buy_creds['thankyou']['page'],
|
220 |
'show_option_none' => __( 'Select', 'mycred' )
|
226 |
<label class="subheader"><?php _e( 'Cancellation Page', 'mycred' ); ?></label>
|
227 |
<ol id="mycred-buy-creds-cancel-page">
|
228 |
<li class="option">
|
229 |
+
<input type="radio" name="mycred_pref_core[buy_creds][cancelled][use]" <?php checked( $cancelled_use, 'custom' ); ?> id="<?php echo $this->field_id( array( 'cancelled' => 'custom' ) ); ?>" value="custom" /> <label for="<?php echo $this->field_id( array( 'cancelled' => 'custom' ) ); ?>"><?php _e( 'Custom URL', 'mycred' ); ?></label><br />
|
230 |
<div class="h2"><?php echo get_bloginfo( 'url' ) . '/'; ?> <input type="text" name="mycred_pref_core[buy_creds][cancelled][custom]" id="mycred-buy-creds-cancelled-custom-url" value="<?php echo $buy_creds['cancelled']['custom']; ?>" /></div>
|
231 |
</li>
|
232 |
<li class="empty"> </li>
|
233 |
<li class="option">
|
234 |
+
<input type="radio" name="mycred_pref_core[buy_creds][cancelled][use]" <?php checked( $cancelled_use, 'page' ); ?> id="<?php echo $this->field_id( array( 'cancelled' => 'use' ) ); ?>-page" value="page" /> <label for="<?php echo $this->field_id( array( 'cancelled' => 'use' ) ); ?>-page"><?php _e( 'Page', 'mycred' ); ?></label><br />
|
235 |
<?php
|
236 |
// Cancelled page dropdown
|
237 |
$cancelled_args = array(
|
238 |
+
'name' => 'mycred_pref_core[buy_creds][cancelled][page]',
|
239 |
'id' => $this->field_id( array( 'cancelled' => 'page' ) ) . '-id',
|
240 |
'selected' => $buy_creds['cancelled']['page'],
|
241 |
'show_option_none' => __( 'Select', 'mycred' )
|
246 |
</ol>
|
247 |
<label class="subheader"><?php _e( 'Gifting', 'mycred' ); ?></label>
|
248 |
<ol id="mycred-buy-creds-gifting">
|
249 |
+
<li><input type="checkbox" name="mycred_pref_core[buy_creds][gifting][members]" id="<?php echo $this->field_id( array( 'gifting' => 'members' ) ); ?>"<?php checked( $buy_creds['gifting']['members'], 1 ); ?> value="1" /><label for="<?php echo $this->field_id( array( 'gifting' => 'members' ) ); ?>"><?php echo $this->core->template_tags_general( __( 'Allow users to buy %_plural% for other users.', 'mycred' ) ); ?></label></li>
|
250 |
+
<li><input type="checkbox" name="mycred_pref_core[buy_creds][gifting][authors]" id="<?php echo $this->field_id( array( 'gifting' => 'authors' ) ); ?>"<?php checked( $buy_creds['gifting']['authors'], 1 ); ?> value="1" /><label for="<?php echo $this->field_id( array( 'gifting' => 'authors' ) ); ?>"><?php echo $this->core->template_tags_general( __( 'Allow users to buy %_plural% for content authors.', 'mycred' ) ); ?></label></li>
|
251 |
<li class="empty"> </li>
|
252 |
<li>
|
253 |
<label for="<?php echo $this->field_id( array( 'gifting' => 'log' ) ); ?>"><?php _e( 'Log Template', 'mycred' ); ?></label>
|
254 |
+
<div class="h2"><input type="text" name="mycred_pref_core[buy_creds][gifting][log]" id="<?php echo $this->field_id( array( 'gifting' => 'log' ) ); ?>" value="<?php echo $buy_creds['gifting']['log']; ?>" class="long" /></div>
|
255 |
<div class="description"><?php _e( 'Available template tags: %singular%, %plural% and %display_name%' ); ?></div>
|
256 |
</li>
|
257 |
</ol>
|
modules/mycred-module-hooks.php
CHANGED
@@ -81,22 +81,22 @@ if ( !class_exists( 'myCRED_Hooks' ) ) {
|
|
81 |
public function get( $save = false ) {
|
82 |
// Defaults
|
83 |
$installed['registration'] = array(
|
84 |
-
'title' => __( '%plural% for registrations' ),
|
85 |
'description' => __( 'Award %_plural% for users joining your website.', 'mycred' ),
|
86 |
'callback' => array( 'myCRED_Hook_Registration' )
|
87 |
);
|
88 |
$installed['logging_in'] = array(
|
89 |
-
'title' => __( '%plural% for logins' ),
|
90 |
'description' => __( 'Award %_plural% for logging in to your website. You can also set an optional limit.', 'mycred' ),
|
91 |
'callback' => array( 'myCRED_Hook_Logging_In' )
|
92 |
);
|
93 |
$installed['publishing_content'] = array(
|
94 |
-
'title' => __( '%plural% for publishing content' ),
|
95 |
'description' => __( 'Award %_plural% for publishing content on your website. If your custom post type is not shown bellow, make sure it is set to "Public".', 'mycred' ),
|
96 |
'callback' => array( 'myCRED_Hook_Publishing_Content' )
|
97 |
);
|
98 |
$installed['comments'] = array(
|
99 |
-
'title' => __( '%plural% for comments' ),
|
100 |
'description' => __( 'Award %_plural% for making comments.', 'mycred' ),
|
101 |
'callback' => array( 'myCRED_Hook_Comments' )
|
102 |
);
|
@@ -104,7 +104,7 @@ if ( !class_exists( 'myCRED_Hooks' ) ) {
|
|
104 |
// Prep for Invite Anyone Plugin
|
105 |
if ( function_exists( 'invite_anyone_init' ) ) {
|
106 |
$installed['invite_anyone'] = array(
|
107 |
-
'title' => __( 'Invite Anyone Plugin' ),
|
108 |
'description' => __( 'Awards %_plural% for sending invitations and/or %_plural% if the invite is accepted.', 'mycred' ),
|
109 |
'callback' => array( 'myCRED_Invite_Anyone' )
|
110 |
);
|
@@ -113,7 +113,7 @@ if ( !class_exists( 'myCRED_Hooks' ) ) {
|
|
113 |
// Prep for Contact Form 7
|
114 |
if ( function_exists( 'wpcf7' ) ) {
|
115 |
$installed['contact_form7'] = array(
|
116 |
-
'title' => __( 'Contact Form 7 Form Submissions' ),
|
117 |
'description' => __( 'Awards %_plural% for successful form submissions (by logged in users).', 'mycred' ),
|
118 |
'callback' => array( 'myCRED_Contact_Form7' )
|
119 |
);
|
81 |
public function get( $save = false ) {
|
82 |
// Defaults
|
83 |
$installed['registration'] = array(
|
84 |
+
'title' => __( '%plural% for registrations', 'mycred' ),
|
85 |
'description' => __( 'Award %_plural% for users joining your website.', 'mycred' ),
|
86 |
'callback' => array( 'myCRED_Hook_Registration' )
|
87 |
);
|
88 |
$installed['logging_in'] = array(
|
89 |
+
'title' => __( '%plural% for logins', 'mycred' ),
|
90 |
'description' => __( 'Award %_plural% for logging in to your website. You can also set an optional limit.', 'mycred' ),
|
91 |
'callback' => array( 'myCRED_Hook_Logging_In' )
|
92 |
);
|
93 |
$installed['publishing_content'] = array(
|
94 |
+
'title' => __( '%plural% for publishing content', 'mycred' ),
|
95 |
'description' => __( 'Award %_plural% for publishing content on your website. If your custom post type is not shown bellow, make sure it is set to "Public".', 'mycred' ),
|
96 |
'callback' => array( 'myCRED_Hook_Publishing_Content' )
|
97 |
);
|
98 |
$installed['comments'] = array(
|
99 |
+
'title' => __( '%plural% for comments', 'mycred' ),
|
100 |
'description' => __( 'Award %_plural% for making comments.', 'mycred' ),
|
101 |
'callback' => array( 'myCRED_Hook_Comments' )
|
102 |
);
|
104 |
// Prep for Invite Anyone Plugin
|
105 |
if ( function_exists( 'invite_anyone_init' ) ) {
|
106 |
$installed['invite_anyone'] = array(
|
107 |
+
'title' => __( 'Invite Anyone Plugin', 'mycred' ),
|
108 |
'description' => __( 'Awards %_plural% for sending invitations and/or %_plural% if the invite is accepted.', 'mycred' ),
|
109 |
'callback' => array( 'myCRED_Invite_Anyone' )
|
110 |
);
|
113 |
// Prep for Contact Form 7
|
114 |
if ( function_exists( 'wpcf7' ) ) {
|
115 |
$installed['contact_form7'] = array(
|
116 |
+
'title' => __( 'Contact Form 7 Form Submissions', 'mycred' ),
|
117 |
'description' => __( 'Awards %_plural% for successful form submissions (by logged in users).', 'mycred' ),
|
118 |
'callback' => array( 'myCRED_Contact_Form7' )
|
119 |
);
|
mycred.php
CHANGED
@@ -3,18 +3,17 @@
|
|
3 |
Plugin Name: myCRED
|
4 |
Plugin URI: http://mycred.merovingi.com
|
5 |
Description: <strong>my</strong>CRED is an adaptive points management system for WordPress powered websites, giving you full control on how points are gained, used, traded, managed, logged or presented.
|
6 |
-
Version: 1.0.
|
7 |
Tags: points, tokens, credit, management, reward, charge
|
8 |
Author: Gabriel S Merovingi
|
9 |
Author URI: http://www.merovingi.com
|
10 |
Author Email: mycred@merovingi.com
|
11 |
Requires at least: WP 3.1
|
12 |
Tested up to: WP 3.5.1
|
13 |
-
Stable tag: 1.0
|
14 |
License: GPLv2 or later
|
15 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
16 |
*/
|
17 |
-
define( 'myCRED_VERSION', '1.0.
|
18 |
define( 'myCRED_SLUG', 'mycred' );
|
19 |
|
20 |
define( 'myCRED_THIS', __FILE__ );
|
3 |
Plugin Name: myCRED
|
4 |
Plugin URI: http://mycred.merovingi.com
|
5 |
Description: <strong>my</strong>CRED is an adaptive points management system for WordPress powered websites, giving you full control on how points are gained, used, traded, managed, logged or presented.
|
6 |
+
Version: 1.0.2
|
7 |
Tags: points, tokens, credit, management, reward, charge
|
8 |
Author: Gabriel S Merovingi
|
9 |
Author URI: http://www.merovingi.com
|
10 |
Author Email: mycred@merovingi.com
|
11 |
Requires at least: WP 3.1
|
12 |
Tested up to: WP 3.5.1
|
|
|
13 |
License: GPLv2 or later
|
14 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
15 |
*/
|
16 |
+
define( 'myCRED_VERSION', '1.0.2' );
|
17 |
define( 'myCRED_SLUG', 'mycred' );
|
18 |
|
19 |
define( 'myCRED_THIS', __FILE__ );
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate Link: http://mycred.merovingi.com/donate/
|
|
4 |
Tags:points, tokens, credit, management, reward, charge, community
|
5 |
Requires at least: 3.1
|
6 |
Tested up to: 3.5.1
|
7 |
-
Stable tag: 1.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -108,6 +108,10 @@ You can always disable parts of a hook by awarding zero points. Hooks that have
|
|
108 |
|
109 |
== Changelog ==
|
110 |
|
|
|
|
|
|
|
|
|
111 |
= 1.0.1 =
|
112 |
* Fixed Bug #1 - Incorrect handling of $data variable causing a PHP Notice.
|
113 |
* Fixed Bug #2 - Incorrect reference to myCRED_Settings object in installer.
|
4 |
Tags:points, tokens, credit, management, reward, charge, community
|
5 |
Requires at least: 3.1
|
6 |
Tested up to: 3.5.1
|
7 |
+
Stable tag: 1.0.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
108 |
|
109 |
== Changelog ==
|
110 |
|
111 |
+
= 1.0.2 =
|
112 |
+
* Fixed Bug #3 - Field name collision in myCRED_Module() class
|
113 |
+
* Fixed Bug #4 - Missing text domain for core hook titles
|
114 |
+
|
115 |
= 1.0.1 =
|
116 |
* Fixed Bug #1 - Incorrect handling of $data variable causing a PHP Notice.
|
117 |
* Fixed Bug #2 - Incorrect reference to myCRED_Settings object in installer.
|