Changeset 9664 for trunk/src/bp-core/bp-core-filters.php
- Timestamp:
- 03/31/2015 04:19:19 AM (12 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-core/bp-core-filters.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-filters.php
r9471 r9664 95 95 $pages[] = $bp->pages->forums->id; 96 96 97 /** 98 * Filters specific pages that shouldn't show up on page listings. 99 * 100 * @since BuddyPress (1.5.0) 101 * 102 * @param array $pages Array of pages to exclude. 103 */ 97 104 return apply_filters( 'bp_core_exclude_pages', $pages ); 98 105 } … … 235 242 */ 236 243 function bp_core_email_from_name_filter() { 244 245 /** 246 * Filters the "From" name in outgoing email to the site name. 247 * 248 * @since BuddyPress (1.2.0) 249 * 250 * @param string $value Value to set the "From" name to. 251 */ 237 252 return apply_filters( 'bp_core_email_from_name_filter', bp_get_option( 'blogname', 'WordPress' ) ); 238 253 } … … 301 316 } 302 317 303 // Allow plugins to allow or disallow redirects, as desired 318 /** 319 * Filters whether or not to redirect. 320 * 321 * Allows plugins to have finer grained control of redirect upon login. 322 * 323 * @since BuddyPress (1.6.0) 324 * 325 * @param bool $value Whether or not to redirect. 326 * @param string $redirect_to Sanitized URL to be redirected to. 327 * @param string $redirect_to_raw Unsanitized URL to be redirected to. 328 * @param WP_User $user The WP_User object corresponding to a 329 * successfully logged in user. 330 */ 304 331 $maybe_redirect = apply_filters( 'bp_core_login_redirect', false, $redirect_to, $redirect_to_raw, $user ); 305 332 if ( false !== $maybe_redirect ) { … … 318 345 } 319 346 347 /** 348 * Filters the URL to redirect users to upon successful login. 349 * 350 * @since BuddyPress (1.9.0) 351 * 352 * @param string $value URL to redirect to. 353 */ 320 354 return apply_filters( 'bp_core_login_redirect_to', bp_get_root_domain() ); 321 355 } … … 415 449 $subject = bp_get_email_subject( array( 'text' => sprintf( __( 'Activate %s', 'buddypress' ), 'http://' . $domain . $path ) ) ); 416 450 417 // Email filters 451 /** 452 * Filters the email that the notification is going to upon successful registration with blog. 453 * 454 * @since BuddyPress (1.2.0) 455 * 456 * @param string $user_email The user's email address. 457 * @param string $domain The new blog domain. 458 * @param string $path The new blog path. 459 * @param string $title The site title. 460 * @param string $user The user's login name. 461 * @param string $user_email The user's email address. 462 * @param string $key The activation key created in wpmu_signup_blog(). 463 * @param array $meta Array of meta values for the created site. 464 */ 418 465 $to = apply_filters( 'bp_core_activation_signup_blog_notification_to', $user_email, $domain, $path, $title, $user, $user_email, $key, $meta ); 466 467 /** 468 * Filters the subject that the notification uses upon successful registration with blog. 469 * 470 * @since BuddyPress (1.2.0) 471 * 472 * @param string $subject The subject to use. 473 * @param string $domain The new blog domain. 474 * @param string $path The new blog path. 475 * @param string $title The site title. 476 * @param string $user The user's login name. 477 * @param string $user_email The user's email address. 478 * @param string $key The activation key created in wpmu_signup_blog(). 479 * @param array $meta Array of meta values for the created site. 480 */ 419 481 $subject = apply_filters( 'bp_core_activation_signup_blog_notification_subject', $subject, $domain, $path, $title, $user, $user_email, $key, $meta ); 482 483 /** 484 * Filters the message that the notification uses upon successful registration with blog. 485 * 486 * @since BuddyPress (1.2.0) 487 * 488 * @param string $message The message to use. 489 * @param string $domain The new blog domain. 490 * @param string $path The new blog path. 491 * @param string $title The site title. 492 * @param string $user The user's login name. 493 * @param string $user_email The user's email address. 494 * @param string $key The activation key created in wpmu_signup_blog(). 495 * @param array $meta Array of meta values for the created site. 496 */ 420 497 $message = apply_filters( 'bp_core_activation_signup_blog_notification_message', $message, $domain, $path, $title, $user, $user_email, $key, $meta ); 421 498 … … 426 503 $admin_email = bp_get_option( 'admin_email' ); 427 504 505 /** 506 * Fires after the sending of the notification to new users for successful registration with blog. 507 * 508 * @since BuddyPress (1.5.0) 509 * 510 * @param string $admin_email Admin Email address for the site. 511 * @param string $subject Subject used in the notification email. 512 * @param string $message Message used in the notification email. 513 * @param string domain The new blog domain. 514 * @param string $path The new blog path. 515 * @param string $title The site title. 516 * @param string $user The user's login name. 517 * @param string $user_email The user's email address. 518 * @param string $key The activation key created in wpmu_signup_blog(). 519 * @param array $meta Array of meta values for the created site. 520 */ 428 521 do_action( 'bp_core_sent_blog_signup_email', $admin_email, $subject, $message, $domain, $path, $title, $user, $user_email, $key, $meta ); 429 522 … … 480 573 $subject = bp_get_email_subject( array( 'text' => __( 'Activate Your Account', 'buddypress' ) ) ); 481 574 482 // Email filters 575 /** 576 * Filters the email that the notification is going to upon successful registration without blog. 577 * 578 * @since BuddyPress (1.2.0) 579 * 580 * @param string $user_email The user's email address. 581 * @param string $user The user's login name. 582 * @param string $user_email The user's email address. 583 * @param string $key The activation key created in wpmu_signup_blog(). 584 * @param array $meta Array of meta values for the created site. 585 */ 483 586 $to = apply_filters( 'bp_core_activation_signup_user_notification_to', $user_email, $user, $user_email, $key, $meta ); 587 588 /** 589 * Filters the subject that the notification uses upon successful registration without blog. 590 * 591 * @since BuddyPress (1.2.0) 592 * 593 * @param string $subject The subject to use. 594 * @param string $user The user's login name. 595 * @param string $user_email The user's email address. 596 * @param string $key The activation key created in wpmu_signup_blog(). 597 * @param array $meta Array of meta values for the created site. 598 */ 484 599 $subject = apply_filters( 'bp_core_activation_signup_user_notification_subject', $subject, $user, $user_email, $key, $meta ); 600 601 /** 602 * Filters the message that the notification uses upon successful registration without blog. 603 * 604 * @since BuddyPress (1.2.0) 605 * 606 * @param string $message The message to use. 607 * @param string $user The user's login name. 608 * @param string $user_email The user's email address. 609 * @param string $key The activation key created in wpmu_signup_blog(). 610 * @param array $meta Array of meta values for the created site. 611 */ 485 612 $message = apply_filters( 'bp_core_activation_signup_user_notification_message', $message, $user, $user_email, $key, $meta ); 486 613 … … 491 618 $admin_email = bp_get_option( 'admin_email' ); 492 619 620 /** 621 * Fires after the sending of the notification to new users for successful registration without blog. 622 * 623 * @since BuddyPress (1.5.0) 624 * 625 * @param string $admin_email Admin Email address for the site. 626 * @param string $subject Subject used in the notification email. 627 * @param string $message Message used in the notification email. 628 * @param string $user The user's login name. 629 * @param string $user_email The user's email address. 630 * @param string $key The activation key created in wpmu_signup_blog(). 631 * @param array $meta Array of meta values for the created site. Default empty array. 632 */ 493 633 do_action( 'bp_core_sent_user_signup_email', $admin_email, $subject, $message, $user, $user_email, $key, $meta ); 494 634 … … 624 764 $title = preg_replace( '|<span>[0-9]+</span>|', '', $title ); 625 765 766 /** 767 * Filters the page title for BuddyPress pages. 768 * 769 * @since BuddyPress (1.5.0) 770 * 771 * @param string $value Determined title for the current BuddyPress page. 772 * @param string $sep Separator used for the BuddyPress page title. 773 * @param string $seplocation Location to place the separator value. 774 */ 626 775 return apply_filters( 'bp_modify_page_title', $title . ' ' . $sep . ' ', $title, $sep, $seplocation ); 627 776 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)