• How do I simply get an array or returned list of all groups a page has associated with it? I need this to enable some includes magic in a template file that adds a stamp to the top of each page that displays which user groups have access to that page.

    In other words, if a page is restricted to groups A, B and E, how do I output “A, B, E” in my template file? I don’t think there’s a shortcode for this.

    Thank you – this plugin is 100 percent perfect for us, otherwise!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter dauidus

    (@dauidus)

    This is all I could find… in lib/access/class-groups-post-acess.php on line 644 – but echo get_read_group_ids() causes an error.

    /**
    645:      * Returns a list of group IDs that grant read access to the post.
    646:      *
    647:      * @param int $post_id
    648:      * @return array of int, group IDs
    649:      */
    650:     public static function get_read_group_ids( $post_id ) {
    651:         return get_post_meta( $post_id, self::POSTMETA_PREFIX . self::READ );
    652:     }
    Thread Starter dauidus

    (@dauidus)

    Sorry to bug… can you please point me in the right direction here? I’ve looked through the support forums here and haven’t seen any requests like this one.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Get list of all groups added to a post’ is closed to new replies.