Skip to:
Content

BuddyPress.org

Changeset 9451


Ignore:
Timestamp:
02/08/2015 11:09:16 PM (10 years ago)
Author:
tw2113
Message:

Adds hooks documentation to bp-groups-actions.php.

See #5943.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-actions.php

    r9351 r9451  
    192192            }
    193193
    194             // Set the invite status
    195             // Checked against a whitelist for security
     194            /**
     195             * Filters the allowed invite statuses.
     196             *
     197             * @since BuddyPress (1.5.0)
     198             *
     199             * @param array $value Array of statuses allowed.
     200             *                     Possible values are 'members,
     201             *                     'mods', and 'admins'.
     202             */
    196203            $allowed_invite_status = apply_filters( 'groups_allowed_invite_status', array( 'members', 'mods', 'admins' ) );
    197204            $invite_status         = !empty( $_POST['group-invite-status'] ) && in_array( $_POST['group-invite-status'], (array) $allowed_invite_status ) ? $_POST['group-invite-status'] : 'members';
     
    213220        }
    214221
     222        /**
     223         * Fires before finalization of group creation and cookies are set.
     224         *
     225         * This hook is a variable hook dependent on the current step
     226         * in the creation process.
     227         *
     228         * @since BuddyPress (1.1.0)
     229         */
    215230        do_action( 'groups_create_group_step_save_' . bp_get_groups_current_create_step() );
    216         do_action( 'groups_create_group_step_complete' ); // Mostly for clearing cache on a generic action name
     231
     232        /**
     233         * Fires after the group creation step is completed.
     234         *
     235         * Mostly for clearing cache on a generic action name.
     236         *
     237         * @since BuddyPress (1.1.0)
     238         */
     239        do_action( 'groups_create_group_step_complete' );
    217240
    218241        /**
     
    245268            ) );
    246269
     270            /**
     271             * Fires after the group has been successfully created.
     272             *
     273             * @since BuddyPress (1.1.0)
     274             *
     275             * @param int $new_group_id ID of the newly created group.
     276             */
    247277            do_action( 'groups_group_create_complete', $bp->groups->new_group_id );
    248278
     
    316346    }
    317347
     348    /**
     349     * Filters the template to load for the group creation screen.
     350     *
     351     * @since BuddyPress (1.0.0)
     352     *
     353     * @param string $value Path to the group creation template to load.
     354     */
    318355    bp_core_load_template( apply_filters( 'groups_template_create_group', 'groups/create' ) );
    319356}
     
    353390    }
    354391
     392    /**
     393     * Filters the template to load for the single group screen.
     394     *
     395     * @since BuddyPress (1.0.0)
     396     *
     397     * @param string $value Path to the single group template to load.
     398     */
    355399    bp_core_load_template( apply_filters( 'groups_template_group_home', 'groups/single/home' ) );
    356400}
     
    402446    }
    403447
     448    /** This filter is documented in bp-groups/bp-groups-actions.php */
    404449    bp_core_load_template( apply_filters( 'groups_template_group_home', 'groups/single/home' ) );
    405450}
Note: See TracChangeset for help on using the changeset viewer.