WordPress.org

Forums

myCRED
[resolved] Notifications Error (2 posts)

  1. Gabriel
    Member
    Plugin Author

    Posted 1 year 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 1 year ago #

    Also on line 153 your code should be:

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • myCRED
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic