Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/17/2014 01:49:22 AM (5 years ago)
Author:
boonebgorges
Message:

Improved inline documentation in bp-groups

See #5022

File:
1 edited

Legend:

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

    r8737 r9027  
    44 * BuddyPress Groups Screen Functions
    55 *
    6  * Screen functions are the controllers of BuddyPress. They will execute when their
    7  * specific URL is caught. They will first save or manipulate data using business
    8  * functions, then pass on the user to a template file.
     6 * Screen functions are the controllers of BuddyPress. They will execute when
     7 * their specific URL is caught. They will first save or manipulate data using
     8 * business functions, then pass on the user to a template file.
    99 *
    1010 * @package BuddyPress
     
    1515if ( !defined( 'ABSPATH' ) ) exit;
    1616
     17/**
     18 * Handle the display of the Groups directory index.
     19 */
    1720function groups_directory_groups_setup() {
    1821    if ( bp_is_groups_directory() ) {
     
    2629add_action( 'bp_screens', 'groups_directory_groups_setup', 2 );
    2730
     31/**
     32 * Handle the loading of the My Groups page.
     33 */
    2834function groups_screen_my_groups() {
    2935
     
    3339}
    3440
     41/**
     42 * Handle the loading of a user's Groups > Invites page.
     43 */
    3544function groups_screen_group_invites() {
    3645    $group_id = (int)bp_action_variable( 1 );
     
    8897}
    8998
     99/**
     100 * Handle the loading of a single group's page.
     101 */
    90102function groups_screen_group_home() {
    91103
     
    100112
    101113/**
    102  * This screen function handles actions related to group forums
    103  *
    104  * @package BuddyPress
     114 * This screen function handles actions related to group forums.
    105115 */
    106116function groups_screen_group_forum() {
     
    400410}
    401411
     412/**
     413 * Handle the display of a group's Members page.
     414 */
    402415function groups_screen_group_members() {
    403416
     
    414427}
    415428
     429/**
     430 * Handle the display of a group's Send Invites page.
     431 */
    416432function groups_screen_group_invite() {
    417433
     
    490506add_action( 'bp_screens', 'groups_remove_group_invite' );
    491507
     508/**
     509 * Handle the display of a group's Request Membership page.
     510 */
    492511function groups_screen_group_request_membership() {
    493512    global $bp;
     
    530549}
    531550
     551/**
     552 * Handle the display of a single group activity item.
     553 */
    532554function groups_screen_group_activity_permalink() {
    533555
     
    541563add_action( 'bp_screens', 'groups_screen_group_activity_permalink' );
    542564
     565/**
     566 * Handle the display of a group's Admin pages.
     567 */
    543568function groups_screen_group_admin() {
    544569    if ( !bp_is_groups_component() || !bp_is_current_action( 'admin' ) )
     
    551576}
    552577
     578/**
     579 * Handle the display of a group's admin/edit-details page.
     580 */
    553581function groups_screen_group_admin_edit_details() {
    554582
     
    586614add_action( 'bp_screens', 'groups_screen_group_admin_edit_details' );
    587615
     616/**
     617 * Handle the display of a group's admin/group-settings page.
     618 */
    588619function groups_screen_group_admin_settings() {
    589620
     
    629660add_action( 'bp_screens', 'groups_screen_group_admin_settings' );
    630661
     662/**
     663 * Handle the display of a group's Change Avatar page.
     664 */
    631665function groups_screen_group_admin_avatar() {
    632666
     
    706740/**
    707741 * This function handles actions related to member management on the group admin.
    708  *
    709  * @package BuddyPress
    710742 */
    711743function groups_screen_group_admin_manage_members() {
     
    825857add_action( 'bp_screens', 'groups_screen_group_admin_manage_members' );
    826858
     859/**
     860 * Handle the display of Admin > Membership Requests.
     861 */
    827862function groups_screen_group_admin_requests() {
    828863    $bp = buddypress();
     
    873908add_action( 'bp_screens', 'groups_screen_group_admin_requests' );
    874909
     910/**
     911 * Handle the display of the Delete Group page.
     912 */
    875913function groups_screen_group_admin_delete_group() {
    876914    global $bp;
     
    912950
    913951/**
    914  * Renders the group settings fields on the Notification Settings page
    915  *
    916  * @package BuddyPress
     952 * Render the group settings fields on the Notification Settings page.
    917953 */
    918954function groups_screen_notification_settings() {
     
    934970            <tr>
    935971                <th class="icon"></th>
    936                 <th class="title"><?php _ex( 'Groups', 'Group settings on notification settings page', 'buddypress' ) ?></th>               
     972                <th class="title"><?php _ex( 'Groups', 'Group settings on notification settings page', 'buddypress' ) ?></th>
    937973                <th class="yes"><?php _e( 'Yes', 'buddypress' ) ?></th>
    938974                <th class="no"><?php _e( 'No', 'buddypress' )?></th>
     
    9781014
    9791015/**
    980  * The main theme compat class for BuddyPress Groups
     1016 * The main theme compat class for BuddyPress Groups.
    9811017 *
    9821018 * This class sets up the necessary theme compatability actions to safely output
    9831019 * group template parts to the_title and the_content areas of a theme.
    9841020 *
    985  * @since BuddyPress (1.7)
     1021 * @since BuddyPress (1.7.0)
    9861022 */
    9871023class BP_Groups_Theme_Compat {
    9881024
    9891025    /**
    990      * Setup the groups component theme compatibility
    991      *
    992      * @since BuddyPress (1.7)
     1026     * Set up theme compatibility for the Groups component.
     1027     *
     1028     * @since BuddyPress (1.7.0)
    9931029     */
    9941030    public function __construct() {
     
    9991035     * Are we looking at something that needs group theme compatability?
    10001036     *
    1001      * @since BuddyPress (1.7)
     1037     * @since BuddyPress (1.7.0)
    10021038     */
    10031039    public function is_group() {
     
    10321068    }
    10331069
    1034     /** Directory *************************************************************/
     1070    /** Directory *********************************************************/
    10351071
    10361072    /**
    10371073     * Add template hierarchy to theme compat for the group directory page.
    10381074     *
    1039      * This is to mirror how WordPress has {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
    1040      *
    1041      * @since BuddyPress (1.8)
    1042      *
    1043      * @param string $templates The templates from bp_get_theme_compat_templates()
     1075     * This is to mirror how WordPress has
     1076     * {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
     1077     *
     1078     * @since BuddyPress (1.8.0)
     1079     *
     1080     * @param string $templates The templates from bp_get_theme_compat_templates().
    10441081     * @return array $templates Array of custom templates to look for.
    10451082     */
     
    10581095
    10591096    /**
    1060      * Update the global $post with directory data
    1061      *
    1062      * @since BuddyPress (1.7)
     1097     * Update the global $post with directory data.
     1098     *
     1099     * @since BuddyPress (1.7.0)
    10631100     */
    10641101    public function directory_dummy_post() {
     
    10801117
    10811118    /**
    1082      * Filter the_content with the groups index template part
    1083      *
    1084      * @since BuddyPress (1.7)
     1119     * Filter the_content with the groups index template part.
     1120     *
     1121     * @since BuddyPress (1.7.0)
    10851122     */
    10861123    public function directory_content() {
     
    10881125    }
    10891126
    1090     /** Create ****************************************************************/
     1127    /** Create ************************************************************/
    10911128
    10921129    /**
    10931130     * Add custom template hierarchy to theme compat for the group create page.
    10941131     *
    1095      * This is to mirror how WordPress has {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
    1096      *
    1097      * @since BuddyPress (1.8)
    1098      *
    1099      * @param string $templates The templates from bp_get_theme_compat_templates()
     1132     * This is to mirror how WordPress has
     1133     * {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
     1134     *
     1135     * @since BuddyPress (1.8.0)
     1136     *
     1137     * @param string $templates The templates from bp_get_theme_compat_templates().
    11001138     * @return array $templates Array of custom templates to look for.
    11011139     */
     
    11141152
    11151153    /**
    1116      * Update the global $post with create screen data
    1117      *
    1118      * @since BuddyPress (1.7)
     1154     * Update the global $post with create screen data.
     1155     *
     1156     * @since BuddyPress (1.7.0)
    11191157     */
    11201158    public function create_dummy_post() {
     
    11361174
    11371175    /**
    1138      * Filter the_content with the create screen template part
    1139      *
    1140      * @since BuddyPress (1.7)
     1176     * Filter the_content with the create screen template part.
     1177     *
     1178     * @since BuddyPress (1.7.0)
    11411179     */
    11421180    public function create_content() {
     
    11441182    }
    11451183
    1146     /** Single ****************************************************************/
     1184    /** Single ************************************************************/
    11471185
    11481186    /**
    11491187     * Add custom template hierarchy to theme compat for group pages.
    11501188     *
    1151      * This is to mirror how WordPress has {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
    1152      *
    1153      * @since BuddyPress (1.8)
    1154      *
    1155      * @param string $templates The templates from bp_get_theme_compat_templates()
     1189     * This is to mirror how WordPress has
     1190     * {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}.
     1191     *
     1192     * @since BuddyPress (1.8.0)
     1193     *
     1194     * @param string $templates The templates from bp_get_theme_compat_templates().
    11561195     * @return array $templates Array of custom templates to look for.
    11571196     */
     
    11771216
    11781217    /**
    1179      * Update the global $post with single group data
    1180      *
    1181      * @since BuddyPress (1.7)
     1218     * Update the global $post with single group data.
     1219     *
     1220     * @since BuddyPress (1.7.0)
    11821221     */
    11831222    public function single_dummy_post() {
     
    11961235
    11971236    /**
    1198      * Filter the_content with the single group template part
    1199      *
    1200      * @since BuddyPress (1.7)
     1237     * Filter the_content with the single group template part.
     1238     *
     1239     * @since BuddyPress (1.7.0)
    12011240     */
    12021241    public function single_content() {
Note: See TracChangeset for help on using the changeset viewer.