Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/22/2012 07:08:52 AM (12 years ago)
Author:
johnjamesjacoby
Message:

Theme Compat:

  • Move 'bp_add_template_locations' filter from 'bp_get_template_part' to 'bp_locate_template'
  • Allows for easier template location across multiple theme configurations.
  • Revert part of r6394 in lieu of this method.
  • See #3741
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-filters.php

    r6434 r6439  
    6363
    6464// Run all template parts through additional template locations
    65 add_filter( 'bp_get_template_part', 'bp_add_template_locations' );
     65add_filter( 'bp_locate_template', 'bp_add_template_locations' );
    6666
    6767// Turn comments off for BuddyPress pages
     
    239239    return str_replace( 'PASSWORD', __( '[User Set]', 'buddypress' ), $welcome_email );
    240240}
    241 if ( !is_admin() && empty( $_GET['e'] ) )
    242     add_filter( 'update_welcome_user_email', 'bp_core_filter_user_welcome_email' );
     241add_filter( 'update_welcome_user_email', 'bp_core_filter_user_welcome_email' );
    243242
    244243/***
     
    264263    return str_replace( $password, __( '[User Set]', 'buddypress' ), $welcome_email );
    265264}
    266 if ( !is_admin() && empty( $_GET['e'] ) )
    267     add_filter( 'update_welcome_email', 'bp_core_filter_blog_welcome_email', 10, 4 );
     265add_filter( 'update_welcome_email', 'bp_core_filter_blog_welcome_email', 10, 4 );
    268266
    269267// Notify user of signup success.
     
    296294    return false;
    297295}
    298 if ( !is_admin() )
    299     add_filter( 'wpmu_signup_blog_notification', 'bp_core_activation_signup_blog_notification', 1, 7 );
     296add_filter( 'wpmu_signup_blog_notification', 'bp_core_activation_signup_blog_notification', 1, 7 );
    300297
    301298function bp_core_activation_signup_user_notification( $user, $user_email, $key, $meta ) {
     
    308305        $admin_email = 'support@' . $_SERVER['SERVER_NAME'];
    309306
    310     // If this is an admin generated activation, add a param to email the
    311     // user login details
    312     $email = is_admin() ? '&e=1' : '';
    313 
    314307    $from_name       = ( '' == get_site_option( 'site_name' ) ) ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );
    315308    $message_headers = "MIME-Version: 1.0\n" . "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option( 'blog_charset' ) . "\"\n";
    316     $message         = sprintf( __( "Thanks for registering! To complete the activation of your account please click the following link:\n\n%1\$s\n\n", 'buddypress' ), $activate_url . $email );
     309    $message         = sprintf( __( "Thanks for registering! To complete the activation of your account please click the following link:\n\n%1\$s\n\n", 'buddypress' ), $activate_url );
    317310    $subject         = '[' . $from_name . '] ' . __( 'Activate Your Account', 'buddypress' );
    318311
     
    329322    return false;
    330323}
    331 if ( !is_admin() || ( is_admin() && empty( $_POST['noconfirmation'] ) ) )
    332     add_filter( 'wpmu_signup_user_notification', 'bp_core_activation_signup_user_notification', 1, 4 );
     324add_filter( 'wpmu_signup_user_notification', 'bp_core_activation_signup_user_notification', 1, 4 );
    333325
    334326/**
Note: See TracChangeset for help on using the changeset viewer.