Version Description
- Fixed Bug #1 - Incorrect handling of $data variable causing a PHP Notice.
- Fixed Bug #2 - Incorrect reference to myCRED_Settings object in installer.
Download this release
Release Info
Developer | designbymerovingi |
Plugin | myCRED |
Version | 1.0.1 |
Comparing to | |
See all releases |
Code changes from version 1.0 to 1.0.1
- includes/mycred-functions.php +6 -6
- includes/mycred-install.php +6 -5
- mycred.php +2 -2
- readme.txt +5 -1
includes/mycred-functions.php
CHANGED
@@ -279,9 +279,9 @@ if ( !class_exists( 'myCRED_Settings' ) ) {
|
|
279 |
* @param $data (object) Log entry data object
|
280 |
* @return (string) parsed string
|
281 |
* @since 0.1
|
282 |
-
* @version 1.0
|
283 |
*/
|
284 |
-
public function template_tags_post( $content, $ref_id = NULL, $data ) {
|
285 |
if ( $ref_id === NULL ) return $content;
|
286 |
|
287 |
// Get Post Object
|
@@ -317,9 +317,9 @@ if ( !class_exists( 'myCRED_Settings' ) ) {
|
|
317 |
* @param $data (object) Log entry data object
|
318 |
* @return (string) parsed string
|
319 |
* @since 0.1
|
320 |
-
* @version 1.0
|
321 |
*/
|
322 |
-
public function template_tags_user( $content, $ref_id = NULL, $data ) {
|
323 |
if ( $ref_id === NULL ) return $content;
|
324 |
|
325 |
// Get User Object
|
@@ -363,9 +363,9 @@ if ( !class_exists( 'myCRED_Settings' ) ) {
|
|
363 |
* @param $data (object) Log entry data object
|
364 |
* @return (string) parsed string
|
365 |
* @since 0.1
|
366 |
-
* @version 1.0
|
367 |
*/
|
368 |
-
public function template_tags_comment( $content, $ref_id = NULL, $data ) {
|
369 |
if ( $ref_id === NULL ) return $content;
|
370 |
|
371 |
// Get Comment Object
|
279 |
* @param $data (object) Log entry data object
|
280 |
* @return (string) parsed string
|
281 |
* @since 0.1
|
282 |
+
* @version 1.0.1
|
283 |
*/
|
284 |
+
public function template_tags_post( $content, $ref_id = NULL, $data = '' ) {
|
285 |
if ( $ref_id === NULL ) return $content;
|
286 |
|
287 |
// Get Post Object
|
317 |
* @param $data (object) Log entry data object
|
318 |
* @return (string) parsed string
|
319 |
* @since 0.1
|
320 |
+
* @version 1.0.1
|
321 |
*/
|
322 |
+
public function template_tags_user( $content, $ref_id = NULL, $data = '' ) {
|
323 |
if ( $ref_id === NULL ) return $content;
|
324 |
|
325 |
// Get User Object
|
363 |
* @param $data (object) Log entry data object
|
364 |
* @return (string) parsed string
|
365 |
* @since 0.1
|
366 |
+
* @version 1.0.1
|
367 |
*/
|
368 |
+
public function template_tags_comment( $content, $ref_id = NULL, $data = '' ) {
|
369 |
if ( $ref_id === NULL ) return $content;
|
370 |
|
371 |
// Get Comment Object
|
includes/mycred-install.php
CHANGED
@@ -178,7 +178,7 @@ if ( !class_exists( 'myCRED_Setup' ) ) {
|
|
178 |
public $step;
|
179 |
public $status;
|
180 |
|
181 |
-
|
182 |
|
183 |
/**
|
184 |
* Construct
|
@@ -505,11 +505,12 @@ if ( !class_exists( 'myCRED_Setup' ) ) {
|
|
505 |
* the website.
|
506 |
*
|
507 |
* @since 0.1
|
508 |
-
* @version 1.0
|
509 |
*/
|
510 |
protected function setup_step2() {
|
511 |
if ( !$this->step ) return;
|
512 |
-
|
|
|
513 |
// Capabilities
|
514 |
$edit_plugin = ( isset( $_POST['myCRED-cap-plugin'] ) ) ? sanitize_text_field( $_POST['myCRED-cap-plugin'] ) : 'manage_options';
|
515 |
$edit_creds = ( isset( $_POST['myCRED-cap-creds'] ) ) ? sanitize_text_field( $_POST['myCRED-cap-creds'] ) : 'edit_users';
|
@@ -529,7 +530,7 @@ if ( !class_exists( 'myCRED_Setup' ) ) {
|
|
529 |
<h2><input type="text" name="myCRED-cap-plugin" id="myCRED-cap-plugin" value="<?php echo $edit_plugin; ?>" /></h2>
|
530 |
</li>
|
531 |
<li>
|
532 |
-
<label for="myCRED-cap-creds"><?php echo $
|
533 |
<h2><input type="text" name="myCRED-cap-creds" id="myCRED-cap-creds" value="<?php echo $edit_creds; ?>" /></h2>
|
534 |
</li>
|
535 |
</ol>
|
@@ -541,7 +542,7 @@ if ( !class_exists( 'myCRED_Setup' ) ) {
|
|
541 |
</li>
|
542 |
<li style="width: 100%;">
|
543 |
<input type="checkbox" name="myCRED-exclude-cred-editors" id="myCRED-exclude-caps"<?php checked( $exclude_cred_editors, 1 ); ?> value="1" class="checkbox" />
|
544 |
-
<label for="myCRED-exclude-caps"><?php echo $
|
545 |
</li>
|
546 |
<li>
|
547 |
<label for="myCRED-exclude-list"><?php _e( 'Exclude the following user IDs:', 'mycred' ); ?></label>
|
178 |
public $step;
|
179 |
public $status;
|
180 |
|
181 |
+
public $core;
|
182 |
|
183 |
/**
|
184 |
* Construct
|
505 |
* the website.
|
506 |
*
|
507 |
* @since 0.1
|
508 |
+
* @version 1.0.1
|
509 |
*/
|
510 |
protected function setup_step2() {
|
511 |
if ( !$this->step ) return;
|
512 |
+
$mycred = mycred_get_settings();
|
513 |
+
|
514 |
// Capabilities
|
515 |
$edit_plugin = ( isset( $_POST['myCRED-cap-plugin'] ) ) ? sanitize_text_field( $_POST['myCRED-cap-plugin'] ) : 'manage_options';
|
516 |
$edit_creds = ( isset( $_POST['myCRED-cap-creds'] ) ) ? sanitize_text_field( $_POST['myCRED-cap-creds'] ) : 'edit_users';
|
530 |
<h2><input type="text" name="myCRED-cap-plugin" id="myCRED-cap-plugin" value="<?php echo $edit_plugin; ?>" /></h2>
|
531 |
</li>
|
532 |
<li>
|
533 |
+
<label for="myCRED-cap-creds"><?php echo $mycred->template_tags_general( __( 'Edit Users %plural% Capability', 'mycred' ) ); ?></label>
|
534 |
<h2><input type="text" name="myCRED-cap-creds" id="myCRED-cap-creds" value="<?php echo $edit_creds; ?>" /></h2>
|
535 |
</li>
|
536 |
</ol>
|
542 |
</li>
|
543 |
<li style="width: 100%;">
|
544 |
<input type="checkbox" name="myCRED-exclude-cred-editors" id="myCRED-exclude-caps"<?php checked( $exclude_cred_editors, 1 ); ?> value="1" class="checkbox" />
|
545 |
+
<label for="myCRED-exclude-caps"><?php echo $mycred->template_tags_general( __( 'Exclude those who can "Edit Users %plural%".', 'mycred' ) ); ?></label>
|
546 |
</li>
|
547 |
<li>
|
548 |
<label for="myCRED-exclude-list"><?php _e( 'Exclude the following user IDs:', 'mycred' ); ?></label>
|
mycred.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: myCRED
|
4 |
Plugin URI: http://mycred.merovingi.com
|
5 |
Description: <strong>my</strong>CRED is an adaptive points management system for WordPress powered websites, giving you full control on how points are gained, used, traded, managed, logged or presented.
|
6 |
-
Version: 1.0
|
7 |
Tags: points, tokens, credit, management, reward, charge
|
8 |
Author: Gabriel S Merovingi
|
9 |
Author URI: http://www.merovingi.com
|
@@ -14,7 +14,7 @@ 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.1
|
7 |
Tags: points, tokens, credit, management, reward, charge
|
8 |
Author: Gabriel S Merovingi
|
9 |
Author URI: http://www.merovingi.com
|
14 |
License: GPLv2 or later
|
15 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
16 |
*/
|
17 |
+
define( 'myCRED_VERSION', '1.0.1' );
|
18 |
define( 'myCRED_SLUG', 'mycred' );
|
19 |
|
20 |
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,5 +108,9 @@ You can always disable parts of a hook by awarding zero points. Hooks that have
|
|
108 |
|
109 |
== Changelog ==
|
110 |
|
|
|
|
|
|
|
|
|
111 |
= 1.0 =
|
112 |
* Official release.
|
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.1
|
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.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.
|
114 |
+
|
115 |
= 1.0 =
|
116 |
* Official release.
|