• Resolved bmcconach

    (@bmcconach)


    Hi there,

    While the plugin has an option to enable notifications for fiends upon article publishes, unfortunately I don’t see a setting to hide the Admin publishes.

    I would love to be able to keep the notifications on so that friends can get notified when a new article is published, however I don’t want all of my admin activity (pages, posts) showing up as notifications.

    Is there a way I can continue allowing the notifications, while hiding admin activities?

    Thanks!

Viewing 1 replies (of 1 total)
  • Thread Starter bmcconach

    (@bmcconach)

    I was able to resolve this myself, albeit with a bit of hard coding:

    In social-articles-functions.php:

    Around Line 70, Find:

    if (empty($notification_already_sent) &&
                $savedPost->post_status == "publish" &&
                $savedPost->post_type == "post" &&
                !wp_is_post_revision($id)
            ):

    Add Below:

    $user = $savedPost->post_author;
            $disallowed_roles = array('editor', 'administrator'); // Set roles you don't want to show notifications for here
            if( !array_intersect($disallowed_roles, $user->roles ) ) {

    Around Line 112, Find:
    update_post_meta($id, 'notification_already_sent', true);
    Add Below:
    }

    This will prevent any user posts with the roles listed in $disallowed_roles from showing up in notifications for others.

Viewing 1 replies (of 1 total)
  • The topic ‘Hide Admin Post Activity’ is closed to new replies.