Skip to:
Content

BuddyPress.org

Changeset 9298


Ignore:
Timestamp:
01/06/2015 02:57:43 AM (12 years ago)
Author:
tw2113
Message:

Adds hooks documentation for bp-xprofile-admin.php.

See #5949.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/bp-xprofile-admin.php

    r9236 r9298  
    120120                                                                <?php endif; ?>
    121121
    122                                                                 <?php do_action( 'xprofile_admin_group_action', $group ); ?>
     122                                                                <?php
     123
     124                                                                /**
     125                                                                 * Fires at end of action buttons in xprofile management admin.
     126                                                                 *
     127                                                                 * @since BuddyPress (2.2.0)
     128                                                                 *
     129                                                                 * @param BP_XProfile_Group $group BP_XProfile_Group object
     130                                                                 *                                 for the current group.
     131                                                                 */
     132                                                                do_action( 'xprofile_admin_group_action', $group ); ?>
    123133
    124134                                                        </div>
     
    198208                                        bp_update_option( 'bp-xprofile-base-group-name', $group->name );
    199209
     210                                /**
     211                                 * Fires at the end of the group adding/saving process, if successful.
     212                                 *
     213                                 * @since BuddyPress (1.0.0)
     214                                 *
     215                                 * @param BP_XProfile_Group $group Current BP_XProfile_Group object.
     216                                 */
    200217                                do_action( 'xprofile_groups_saved_group', $group );
    201218                        }
     
    227244                $type    = 'success';
    228245
     246                /**
     247                 * Fires at the end of group deletion process, if successful.
     248                 *
     249                 * @since BuddyPress (1.0.0)
     250                 *
     251                 * @param BP_XProfile_Group $group Current BP_XProfile_Group object.
     252                 */
    229253                do_action( 'xprofile_groups_deleted_group', $group );
    230254        }
     
    288312                                unset( $_GET['mode'] );
    289313
     314                                /**
     315                                 * Fires at the end of the process to save a field for a user, if successful.
     316                                 *
     317                                 * @since BuddyPress (1.0.0)
     318                                 *
     319                                 * @param BP_XProfile_Field $field Current BP_XProfile_Field object.
     320                                 */
    290321                                do_action( 'xprofile_fields_saved_field', $field );
    291322
     
    304335 * Handles the deletion of a profile field (or field option)
    305336 *
    306  * @since BuddyPress (1.0)
     337 * @since BuddyPress (1.0.0)
    307338 * @global string $message The feedback message to show
    308339 * @global $type The type of feedback message to show
     
    326357                $type    = 'success';
    327358
     359                /**
     360                 * Fires at the end of the field deletion process, if successful.
     361                 *
     362                 * @since BuddyPress (1.0.0)
     363                 *
     364                 * @param BP_XProfile_Field $field Current BP_XProfile_Field object.
     365                 */
    328366                do_action( 'xprofile_fields_deleted_field', $field );
    329367        }
     
    387425                                <?php if ( ! $field->can_delete ) : ?> <?php _e( '(Primary)', 'buddypress' ); endif; ?>
    388426                                <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(Required)', 'buddypress' ) ?><?php endif; ?>
    389                                 <?php do_action( 'xprofile_admin_field_name_legend', $field ); ?>
     427                                <?php
     428
     429                                /**
     430                                 * Fires at end of legend above the name field in base xprofile group.
     431                                 *
     432                                 * @since BuddyPress (2.2.0)
     433                                 *
     434                                 * @param BP_XProfile_Field $field Current BP_XProfile_Field
     435                                 *                                 object being rendered.
     436                                 */
     437                                do_action( 'xprofile_admin_field_name_legend', $field ); ?>
    390438                        </span>
    391439                </legend>
     
    396444                                $field_type = bp_xprofile_create_field_type( $field->type );
    397445                                $field_type->admin_field_html();
    398 
    399446                        } else {
     447
     448                                /**
     449                                 * Fires after the input if the current field is not in default field types.
     450                                 *
     451                                 * @since BuddyPress (1.5.0)
     452                                 *
     453                                 * @param BP_XProfile_Field $field Current BP_XProfile_Field
     454                                 *                                 object being rendered.
     455                                 * @param int               $value Integer 1.
     456                                 */
    400457                                do_action( 'xprofile_admin_field', $field, 1 );
    401458                        }
     
    419476                                <?php endif; ?>
    420477
    421                                 <?php do_action( 'xprofile_admin_field_action', $field ); ?>
     478                                <?php
     479
     480                                /**
     481                                 * Fires at end of field management links in xprofile management admin.
     482                                 *
     483                                 * @since BuddyPress (2.2.0)
     484                                 *
     485                                 * @param BP_XProfile_Group $group BP_XProfile_Group object
     486                                 *                                 for the current group.
     487                                 */
     488                                do_action( 'xprofile_admin_field_action', $field ); ?>
    422489
    423490                        </div>
     
    695762                                        $errors = true;
    696763                                } else {
     764
     765                                        /**
     766                                         * Fires after the saving of each profile field, if successful.
     767                                         *
     768                                         * @since BuddyPress (1.1.0)
     769                                         *
     770                                         * @param int    $field_id ID of the field being updated.
     771                                         * @param string $value    Value that was saved to the field.
     772                                         */
    697773                                        do_action( 'xprofile_profile_field_data_updated', $field_id, $value );
    698774                                }
     
    703779                        }
    704780
     781                        /**
     782                         * Fires after all of the profile fields have been saved.
     783                         *
     784                         * @since BuddyPress (1.0.0)
     785                         *
     786                         * @param int   $user_id          ID of the user whose data is being saved.
     787                         * @param array $posted_field_ids IDs of the fields that were submitted.
     788                         * @param bool  $errors           Whether or not errors occurred during saving.
     789                         */
    705790                        do_action( 'xprofile_updated_profile', $user_id, $posted_field_ids, $errors );
    706791
     
    772857                                        <?php endif;
    773858
     859                                        /**
     860                                         * Fires before display of visibility form elements for profile metaboxes.
     861                                         *
     862                                         * @since BuddyPress (1.7.0)
     863                                         */
    774864                                        do_action( 'bp_custom_profile_edit_fields_pre_visibility' );
    775865
     
    801891                                        <?php endif; ?>
    802892
    803                                         <?php do_action( 'bp_custom_profile_edit_fields' ); ?>
     893                                        <?php
     894
     895                                        /**
     896                                         * Fires at end of custom profile field items on your xprofile screen tab.
     897                                         *
     898                                         * @since BuddyPress (1.1.0)
     899                                         */
     900                                        do_action( 'bp_custom_profile_edit_fields' ); ?>
    804901
    805902                                </div>
Note: See TracChangeset for help on using the changeset viewer.