Changeset 9271
- Timestamp:
- 12/24/2014 02:31:20 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-members/bp-members-screens.php
r9203 r9271 17 17 */ 18 18 function bp_members_screen_display_profile() { 19 20 /** 21 * Fires right before the loading of the Member profile screen template file. 22 * 23 * @since BuddyPress (1.5.0) 24 */ 19 25 do_action( 'bp_members_screen_display_profile' ); 26 27 /** 28 * Filters the template to load for the Member profile page screen. 29 * 30 * @since BuddyPress (1.5.0) 31 * 32 * @param string $template Path to the Member template to load. 33 */ 20 34 bp_core_load_template( apply_filters( 'bp_members_screen_display_profile', 'members/single/home' ) ); 21 35 } … … 28 42 bp_update_is_directory( true, 'members' ); 29 43 44 /** 45 * Fires right before the loading of the Member directory index screen template file. 46 * 47 * @since BuddyPress (1.5.0) 48 */ 30 49 do_action( 'bp_members_screen_index' ); 31 50 51 /** 52 * Filters the template to load for the Member directory page screen. 53 * 54 * @since BuddyPress (1.5.0) 55 * 56 * @param string $value Path to the member directory template to load. 57 */ 32 58 bp_core_load_template( apply_filters( 'bp_members_screen_index', 'members/index' ) ); 33 59 } … … 54 80 $redirect_to = bp_get_root_domain(); 55 81 82 /** 83 * Filters the URL to redirect logged in users to when visiting registration page. 84 * 85 * @since BuddyPress (1.5.1) 86 * 87 * @param string $redirect_to URL to redirect user to. 88 */ 56 89 bp_core_redirect( apply_filters( 'bp_loggedin_register_page_redirect_to', $redirect_to ) ); 57 90 … … 67 100 } elseif ( isset( $_POST['signup_submit'] ) && bp_verify_nonce_request( 'bp_new_signup' ) ) { 68 101 102 /** 103 * Fires before the validation of a new signup. 104 * 105 * @since BuddyPress (2.0.0) 106 */ 69 107 do_action( 'bp_signup_pre_validate' ); 70 108 … … 133 171 } 134 172 173 /** 174 * Fires after the validation of a new signup. 175 * 176 * @since BuddyPress (1.1.0) 177 */ 135 178 do_action( 'bp_signup_validate' ); 136 179 … … 140 183 // addslashes() and stripslashes() to avoid create_function() 141 184 // syntax errors when the $error_message contains quotes 185 186 /** 187 * Filters the error message in the loop. 188 * 189 * @since BuddyPress (1.5.0) 190 * 191 * @param string $value Error message wrapped in html. 192 */ 142 193 add_action( 'bp_' . $fieldname . '_errors', create_function( '', 'echo apply_filters(\'bp_members_signup_error_message\', "<div class=\"error\">" . stripslashes( \'' . addslashes( $error_message ) . '\' ) . "</div>" );' ) ); 143 194 } … … 186 237 $usermeta['public'] = ( isset( $_POST['signup_blog_privacy'] ) && 'public' == $_POST['signup_blog_privacy'] ) ? true : false; 187 238 239 /** 240 * Filters the user meta used for signup. 241 * 242 * @since BuddyPress (1.1.0) 243 * 244 * @param array $usermeta Array of user meta to add to signup. 245 */ 188 246 $usermeta = apply_filters( 'bp_signup_usermeta', $usermeta ); 189 247 … … 202 260 } 203 261 262 /** 263 * Fires after the completion of a new signup. 264 * 265 * @since BuddyPress (1.1.0) 266 */ 204 267 do_action( 'bp_complete_signup' ); 205 268 } … … 207 270 } 208 271 272 /** 273 * Fires right before the loading of the Member registration screen template file. 274 * 275 * @since BuddyPress (1.5.0) 276 */ 209 277 do_action( 'bp_core_screen_signup' ); 278 279 /** 280 * Filters the template to load for the Member registration page screen. 281 * 282 * @since BuddyPress (1.5.0) 283 * 284 * @param string $value Path to the Member registration template to load. 285 */ 210 286 bp_core_load_template( apply_filters( 'bp_core_template_register', array( 'register', 'registration/register' ) ) ); 211 287 } … … 229 305 } 230 306 307 /** 308 * Filters the URL to redirect logged in users to when visiting activation page. 309 * 310 * @since BuddyPress (1.9.0) 311 * 312 * @param string $redirect_to URL to redirect user to. 313 */ 231 314 bp_core_redirect( apply_filters( 'bp_loggedin_activate_page_redirect_to', $redirect_to ) ); 232 315 … … 244 327 // we've got a key; let's attempt to activate the signup 245 328 if ( ! empty( $key ) ) { 246 // Activate the signup 329 330 /** 331 * Filters the activation signup. 332 * 333 * @since BuddyPress (1.1.0) 334 * 335 * @param bool|int $value Value returned by activation. 336 * Integer on success, boolean on failure. 337 */ 247 338 $user = apply_filters( 'bp_core_activate_account', bp_core_activate_signup( $key ) ); 248 339 … … 265 356 } 266 357 358 /** 359 * Filters the template to load for the Member activation page screen. 360 * 361 * @since BuddyPress (1.1.1) 362 * 363 * @param string $value Path to the Member activation template to load. 364 */ 267 365 bp_core_load_template( apply_filters( 'bp_core_template_activate', array( 'activate', 'registration/activate' ) ) ); 268 366 } … … 305 403 bp_update_is_directory( true, 'members' ); 306 404 405 /** 406 * Fires if looking at Members directory when needing theme compat. 407 * 408 * @since BuddyPress (1.5.0) 409 */ 307 410 do_action( 'bp_members_screen_index' ); 308 411 … … 318 421 return; 319 422 423 /** 424 * Fires if looking at Members user page when needing theme compat. 425 * 426 * @since BuddyPress (1.5.0) 427 */ 320 428 do_action( 'bp_members_screen_display_profile' ); 321 429 … … 337 445 * @since BuddyPress (1.8.0) 338 446 * 339 * @param string $templates The templates from bp_get_theme_compat_templates(). 447 * @param array $templates The templates from bp_get_theme_compat_templates(). 448 * 340 449 * @return array $templates Array of custom templates to look for. 341 450 */ 342 451 public function directory_template_hierarchy( $templates = array() ) { 343 452 344 // Setup our templates based on priority 453 /** 454 * Filters the template hierarchy for theme compat and members directory page. 455 * 456 * @since BuddyPress (1.8.0) 457 * 458 * @param array $value Array of template paths to add to hierarchy. 459 */ 345 460 $new_templates = apply_filters( 'bp_template_hierarchy_members_directory', array( 346 461 'members/index-directory.php' … … 400 515 $user_nicename = buddypress()->displayed_user->userdata->user_nicename; 401 516 402 // Setup our templates based on priority 517 /** 518 * Filters the template hierarchy for theme compat and member pages. 519 * 520 * @since BuddyPress (1.8.0) 521 * 522 * @param array $value Array of template paths to add to hierarchy. 523 */ 403 524 $new_templates = apply_filters( 'bp_template_hierarchy_members_single_item', array( 404 525 'members/single/index-id-' . sanitize_file_name( bp_displayed_user_id() ) . '.php', … … 502 623 $component = sanitize_file_name( bp_current_component() ); 503 624 504 // Setup our templates based on priority 625 /** 626 * Filters the template hierarchy for theme compat and registration/activation pages. 627 * 628 * This filter is a variable filter that depends on the current component 629 * being used. 630 * 631 * @since BuddyPress (1.8.0) 632 * 633 * @param array $value Array of template paths to add to hierarchy. 634 */ 505 635 $new_templates = apply_filters( "bp_template_hierarchy_{$component}", array( 506 636 "members/index-{$component}.php"
Note: See TracChangeset
for help on using the changeset viewer.