Changeset 9290
- Timestamp:
- 12/29/2014 10:28:28 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/bp-xprofile-screens.php
r9190 r9290 24 24 $new = isset( $_GET['new'] ) ? $_GET['new'] : ''; 25 25 26 /** 27 * Fires right before the loading of the XProfile screen template file. 28 * 29 * @since BuddyPress (1.0.0) 30 * 31 * @param string $new $_GET parameter holding the "new" parameter. 32 */ 26 33 do_action( 'xprofile_screen_display_profile', $new ); 34 35 /** 36 * Filters the template to load for the XProfile screen. 37 * 38 * @since BuddyPress (1.0.0) 39 * 40 * @param string $template Path to the XProfile template to load. 41 */ 27 42 bp_core_load_template( apply_filters( 'xprofile_template_display_profile', 'members/single/home' ) ); 28 43 } … … 132 147 $errors = true; 133 148 } else { 149 150 /** 151 * Fires on each iteration of an XProfile field being saved with no error. 152 * 153 * @since BuddyPress (1.1.0) 154 * 155 * @param int $field_id ID of the field that was saved. 156 * @param string $value Value that was saved to the field. 157 */ 134 158 do_action( 'xprofile_profile_field_data_updated', $field_id, $value ); 135 159 } 136 160 } 137 161 162 /** 163 * Fires after all XProfile fields have been saved for the current profile. 164 * 165 * @since BuddyPress (1.0.0) 166 * 167 * @param int $value Displayed user ID. 168 * @param array $posted_field_ids Array of field IDs that were edited. 169 * @param bool $errors Whether or not any errors occurred. 170 * @param array $old_values Array of original values before updated. 171 * @param array $new_values Array of newly saved values after update. 172 */ 138 173 do_action( 'xprofile_updated_profile', bp_displayed_user_id(), $posted_field_ids, $errors, $old_values, $new_values ); 139 174 … … 150 185 } 151 186 187 /** 188 * Fires right before the loading of the XProfile edit screen template file. 189 * 190 * @since BuddyPress (1.0.0) 191 */ 152 192 do_action( 'xprofile_screen_edit_profile' ); 193 194 /** 195 * Filters the template to load for the XProfile edit screen. 196 * 197 * @since BuddyPress (1.0.0) 198 * 199 * @param string $template Path to the XProfile edit template to load. 200 */ 153 201 bp_core_load_template( apply_filters( 'xprofile_template_edit_profile', 'members/single/home' ) ); 154 202 } … … 212 260 bp_core_add_message( __( 'There was a problem cropping your profile photo.', 'buddypress' ), 'error' ); 213 261 } else { 262 263 /** 264 * Fires right before the redirect, after processing a new avatar. 265 * 266 * @since BuddyPress (1.1.0) 267 */ 214 268 do_action( 'xprofile_avatar_uploaded' ); 215 269 bp_core_add_message( __( 'Your new profile photo was uploaded successfully.', 'buddypress' ) ); … … 218 272 } 219 273 274 /** 275 * Fires right before the loading of the XProfile change avatar screen template file. 276 * 277 * @since BuddyPress (1.0.0) 278 */ 220 279 do_action( 'xprofile_screen_change_avatar' ); 221 280 281 /** 282 * Filters the template to load for the XProfile change avatar screen. 283 * 284 * @since BuddyPress (1.0.0) 285 * 286 * @param string $template Path to the XProfile change avatar template to load. 287 */ 222 288 bp_core_load_template( apply_filters( 'xprofile_template_change_avatar', 'members/single/home' ) ); 223 289 } … … 236 302 } 237 303 238 // Load the template 304 /** 305 * Filters the template to load for the XProfile settings screen. 306 * 307 * @since BuddyPress (2.0.0) 308 * 309 * @param string $template Path to the XProfile change avatar template to load. 310 */ 239 311 bp_core_load_template( apply_filters( 'bp_settings_screen_xprofile', '/members/single/settings/profile' ) ); 240 312 }
Note: See TracChangeset
for help on using the changeset viewer.