Skip to:
Content

BuddyPress.org

Ticket #6070: 6070.01.patch

File 6070.01.patch, 2.0 KB (added by dcavins, 7 years ago)

Documents "access" and "show_tab" arguments for BP_Group_Extension::init().

  • src/bp-groups/bp-groups-classes.php

    diff --git src/bp-groups/bp-groups-classes.php src/bp-groups/bp-groups-classes.php
    index 08234f8..632d6c6 100644
    class BP_Groups_Member { 
    27922792 *   - 'template_file' The template file that will be used to load the content
    27932793 *     of your main extension tab. Defaults to 'groups/single/plugins.php'.
    27942794 *   - 'screens' A multi-dimensional array, described below
     2795 *       - 'access' Which users can visit the plugin's tab.
     2796 *       - 'show_tab' Which users can see the plugin's navigation tab.
    27952797 *
    27962798 * BP_Group_Extension uses the concept of "settings screens". There are three
    27972799 * contexts for settings screens:
    class BP_Group_Extension { 
    30823084         *       parent::init( $args );
    30833085         *   }
    30843086         *
    3085          * @since BuddyPress (1.8)
     3087         * @since BuddyPress (1.8.0)
     3088         * @since BuddyPress (2.1.0) Added 'access' and 'show_tab' arguments
     3089         *                to $args.
    30863090         * @param array $args {
    30873091         *     Array of initialization arguments.
    30883092         *     @type string $slug Unique, URL-safe identifier for your
    class BP_Group_Extension { 
    31093113         *     @type array $screens A multi-dimensional array of configuration
    31103114         *           information for the extension screens. See docblock of
    31113115         *           {@link BP_Group_Extension} for more details.
     3116         *     @type string $access Which users can visit the plugin's tab.
     3117         *                       Possible values: 'anyone', 'loggedin', 'member',
     3118         *               'mod', 'admin' or 'noone'
     3119         *                       ('member', 'mod', 'admin' refer to user's role in group.)
     3120         *                       Defaults to 'anyone' for public groups and 'member' for
     3121         *                       private groups.
     3122         *     @type string $show_tab Which users can see the plugin's navigation
     3123         *                       tab.
     3124         *                       Possible values: 'anyone', 'loggedin', 'member',
     3125         *               'mod', 'admin' or 'noone'
     3126         *                       ('member', 'mod', 'admin' refer to user's role in group.)
     3127         *                       Defaults to 'anyone' for public groups and 'member' for
     3128         *                       private groups.
    31123129         * }
    31133130         */
    31143131        public function init( $args = array() ) {