Version Description
- Fixed Bug #5 - Missing general template tag parser in Sell Content form.
Download this release
Release Info
Developer | designbymerovingi |
Plugin | myCRED |
Version | 1.0.3 |
Comparing to | |
See all releases |
Code changes from version 1.0.2 to 1.0.3
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
|
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
|
addons/sell-content/myCRED-addon-sell-content.php
CHANGED
@@ -542,7 +542,7 @@ if ( !class_exists( 'myCRED_Sell_Content' ) ) {
|
|
542 |
*
|
543 |
* @returns (string) content
|
544 |
* @since 0.1
|
545 |
-
* @version 1.0
|
546 |
*/
|
547 |
public function the_content( $content ) {
|
548 |
global $mycred_content_purchase;
|
542 |
*
|
543 |
* @returns (string) content
|
544 |
* @since 0.1
|
545 |
+
* @version 1.0.1
|
546 |
*/
|
547 |
public function the_content( $content ) {
|
548 |
global $mycred_content_purchase;
|
includes/mycred-functions.php
CHANGED
@@ -262,9 +262,11 @@ if ( !class_exists( 'myCRED_Settings' ) ) {
|
|
262 |
* Amount Template Tags
|
263 |
* Replaces the amount template tags in a given string.
|
264 |
* @since 0.1
|
265 |
-
* @version 1.0
|
266 |
*/
|
267 |
-
public function template_tags_amount( $content, $amount ) {
|
|
|
|
|
268 |
$content = str_replace( '%cred_f%', $this->format_creds( $amount ), $content );
|
269 |
$content = str_replace( '%cred%', $amount, $content );
|
270 |
return $content;
|
@@ -279,7 +281,7 @@ 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;
|
@@ -292,6 +294,7 @@ if ( !class_exists( 'myCRED_Settings' ) ) {
|
|
292 |
|
293 |
// Let others play first
|
294 |
$content = apply_filters( 'mycred_parse_tags_post', $content, $data, $post );
|
|
|
295 |
|
296 |
// Replace template tags
|
297 |
$content = str_replace( '%post_title%', $post->post_title, $content );
|
@@ -317,7 +320,7 @@ 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;
|
@@ -330,6 +333,7 @@ if ( !class_exists( 'myCRED_Settings' ) ) {
|
|
330 |
|
331 |
// Let others play first
|
332 |
$content = apply_filters( 'mycred_parse_tags_user', $content, $data, $user );
|
|
|
333 |
|
334 |
// Replace template tags
|
335 |
$content = str_replace( '%user_id%', $user->ID, $content );
|
@@ -363,7 +367,7 @@ 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;
|
@@ -376,6 +380,7 @@ if ( !class_exists( 'myCRED_Settings' ) ) {
|
|
376 |
|
377 |
// Let others play first
|
378 |
$content = apply_filters( 'mycred_parse_tags_comment', $content, $data, $comment );
|
|
|
379 |
|
380 |
$content = str_replace( '%comment_id%', $comment->comment_ID, $content );
|
381 |
|
262 |
* Amount Template Tags
|
263 |
* Replaces the amount template tags in a given string.
|
264 |
* @since 0.1
|
265 |
+
* @version 1.0.1
|
266 |
*/
|
267 |
+
public function template_tags_amount( $content = '', $amount = 0 ) {
|
268 |
+
$content = apply_filters( 'mycred_parse_tags_amount', $content, $amount );
|
269 |
+
$content = $this->template_tags_general( $content );
|
270 |
$content = str_replace( '%cred_f%', $this->format_creds( $amount ), $content );
|
271 |
$content = str_replace( '%cred%', $amount, $content );
|
272 |
return $content;
|
281 |
* @param $data (object) Log entry data object
|
282 |
* @return (string) parsed string
|
283 |
* @since 0.1
|
284 |
+
* @version 1.0.2
|
285 |
*/
|
286 |
public function template_tags_post( $content, $ref_id = NULL, $data = '' ) {
|
287 |
if ( $ref_id === NULL ) return $content;
|
294 |
|
295 |
// Let others play first
|
296 |
$content = apply_filters( 'mycred_parse_tags_post', $content, $data, $post );
|
297 |
+
$content = $this->template_tags_general( $content );
|
298 |
|
299 |
// Replace template tags
|
300 |
$content = str_replace( '%post_title%', $post->post_title, $content );
|
320 |
* @param $data (object) Log entry data object
|
321 |
* @return (string) parsed string
|
322 |
* @since 0.1
|
323 |
+
* @version 1.0.2
|
324 |
*/
|
325 |
public function template_tags_user( $content, $ref_id = NULL, $data = '' ) {
|
326 |
if ( $ref_id === NULL ) return $content;
|
333 |
|
334 |
// Let others play first
|
335 |
$content = apply_filters( 'mycred_parse_tags_user', $content, $data, $user );
|
336 |
+
$content = $this->template_tags_general( $content );
|
337 |
|
338 |
// Replace template tags
|
339 |
$content = str_replace( '%user_id%', $user->ID, $content );
|
367 |
* @param $data (object) Log entry data object
|
368 |
* @return (string) parsed string
|
369 |
* @since 0.1
|
370 |
+
* @version 1.0.2
|
371 |
*/
|
372 |
public function template_tags_comment( $content, $ref_id = NULL, $data = '' ) {
|
373 |
if ( $ref_id === NULL ) return $content;
|
380 |
|
381 |
// Let others play first
|
382 |
$content = apply_filters( 'mycred_parse_tags_comment', $content, $data, $comment );
|
383 |
+
$content = $this->template_tags_general( $content );
|
384 |
|
385 |
$content = str_replace( '%comment_id%', $comment->comment_ID, $content );
|
386 |
|
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
|
@@ -13,7 +13,7 @@ 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.
|
17 |
define( 'myCRED_SLUG', 'mycred' );
|
18 |
|
19 |
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.3
|
7 |
Tags: points, tokens, credit, management, reward, charge
|
8 |
Author: Gabriel S Merovingi
|
9 |
Author URI: http://www.merovingi.com
|
13 |
License: GPLv2 or later
|
14 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
15 |
*/
|
16 |
+
define( 'myCRED_VERSION', '1.0.3' );
|
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,9 +108,12 @@ You can always disable parts of a hook by awarding zero points. Hooks that have
|
|
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.
|
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.3
|
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.3 =
|
112 |
+
* Fixed Bug #5 - Missing general template tag parser in Sell Content form.
|
113 |
+
|
114 |
= 1.0.2 =
|
115 |
+
* Fixed Bug #3 - Field name collision in myCRED_Module() class.
|
116 |
+
* Fixed Bug #4 - Missing text domain for core hook titles.
|
117 |
|
118 |
= 1.0.1 =
|
119 |
* Fixed Bug #1 - Incorrect handling of $data variable causing a PHP Notice.
|