WordPress.org

Ready to get started?Download WordPress

Forums

myCRED
[resolved] Notifications Error (2 posts)

  1. Gabriel
    Member
    Plugin Author

    Posted 9 months ago #

    Issue:
    When using either ' or " in the message template, a notice will trigger an error and is not saved.

    Solution:
    Open the myCRED-addon-notifications.php file located in plugins/mycred/add-ons/notifications/ and make sure the following three lines are correct:

    On line 74 your code should be:

    foreach ( (array) $notices as $notice ) {

    On line 77 your code should be:

    echo '<script type="text/javascript">(function(jQuery){jQuery.noticeAdd({ text: "' . $notice . '",stay: ' . $stay . '});})(jQuery);</script>';

    And finally on 237 your code is:

    $notices[] = addslashes( $notice['message'] );

    http://wordpress.org/plugins/mycred/

  2. Gabriel
    Member
    Plugin Author

    Posted 9 months ago #

    Also on line 153 your code should be:

    add_filter( 'mycred_notifications', create_function( '$query', '$query[]=\'' . $notice . '\'; return $query;' ) );

Reply

You must log in to post.

About this Plugin

About this Topic