• Resolved tllllll

    (@corkscore)


    Hi there,

    I’ve just tried this code snippet as mentioned in http://editflow.org/extend/disable-auto-subscribing-users-for-notifications/ .

    // Do not auto-subscribe any user to receive notifications when saving a post or when adding an editorial comment
    add_filter( 'ef_notification_auto_subscribe_current_user', '__return false' );

    It’s supposed to disable auto-subscribe to notifications on save. However, when I test it out by creating a new post, it does not work as I expect.

    Every time I deselect the author’s name in the Notifications section of Edit Post, and click save, the page reloads with the name ticked again.

    Am I missing something?

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author cojennin

    (@comradefuzz)

    Think it should be __return_false instead of __return false? Missing an underscore between return and false, according to the docs.

    Let me know if that solves it!

    Thread Starter tllllll

    (@corkscore)

    Hi cojennin,

    I’m afraid that didn’t work. Every time I save a new post assigned to a particular an author – they are emailed even if they are not selected under “Notifications”.

    When the page is reloaded after saving, the author’s name appears ticked, even though I didn’t tick it.

    Also, if it is supposed to be __return_false, then there is a typo in Edit Flow docs .

    Any other ideas?

    Plugin Author cojennin

    (@comradefuzz)

    Also, if it is supposed to be __return_false, then there is a typo in Edit Flow docs .

    Good catch! Definitely looks wrong.

    Try adding the below filter:

    add_filter( 'ef_notification_auto_subscribe_post_author', '__return_false' );

    If you’re the post author you’ll be auto subscribed (the ef_notification_auto_subscribe_current_user filter is there to prevent everyone else from getting notifications), so that filter should prevent you from getting one as well.

    Let me know if that works!

    Side note: There is work being done on improving Edit Flow documentation, so if you’re interested in improved documentation please reach out! Would be great to have some more folks to help!

    Thread Starter tllllll

    (@corkscore)

    Excellent, that worked.

    In principle, I’d be happy to help with the documentation, but lack the time currently. Perhaps when I’m more free.

    On another note: Is there a way to show the author in the calendar view without clicking on each post?

    • This reply was modified 7 years, 6 months ago by tllllll.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Not working: Do not auto-subscribe any user to receive notifications’ is closed to new replies.