WordPress.org

Make WordPress Core

Changeset 15552


Ignore:
Timestamp:
08/31/2010 06:19:15 PM (8 years ago)
Author:
ryan
Message:

Pass more info to notification filters. Props mdawaffe. fixes #14743

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/ms-functions.php

    r15473 r15552  
    655655    $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );
    656656    $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
    657     $message = sprintf( apply_filters( 'wpmu_signup_blog_notification_email', __( "To activate your blog, please click the following link:\n\n%s\n\nAfter you activate, you will receive *another email* with your login.\n\nAfter you activate, you can visit your site here:\n\n%s" ) ), $activate_url, esc_url( "http://{$domain}{$path}" ), $key );
     657    $message = sprintf(
     658        apply_filters( 'wpmu_signup_blog_notification_email',
     659            __( "To activate your blog, please click the following link:\n\n%s\n\nAfter you activate, you will receive *another email* with your login.\n\nAfter you activate, you can visit your site here:\n\n%s" ),
     660            $domain, $path, $title, $user, $user_email, $key, $meta
     661        ),
     662        $activate_url,
     663        esc_url( "http://{$domain}{$path}" ),
     664        $key
     665    );
    658666    // TODO: Don't hard code activation link.
    659     $subject = sprintf( apply_filters( 'wpmu_signup_blog_notification_subject', __( '[%1$s] Activate %2$s' ) ), $from_name, esc_url( 'http://' . $domain . $path ) );
     667    $subject = sprintf(
     668        apply_filters( 'wpmu_signup_blog_notification_subject',
     669            __( '[%1$s] Activate %2$s' ),
     670            $domain, $path, $title, $user, $user_email, $key, $meta
     671        ),
     672        $from_name,
     673        esc_url( 'http://' . $domain . $path )
     674    );
    660675    wp_mail($user_email, $subject, $message, $message_headers);
    661676    return true;
     
    672687    $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );
    673688    $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
    674     $message = sprintf( apply_filters( 'wpmu_signup_user_notification_email', __( "To activate your user, please click the following link:\n\n%s\n\nAfter you activate, you will receive *another email* with your login.\n\n" ) ), site_url( "wp-activate.php?key=$key" ), $key );
     689    $message = sprintf(
     690        apply_filters( 'wpmu_signup_user_notification_email',
     691            __( "To activate your user, please click the following link:\n\n%s\n\nAfter you activate, you will receive *another email* with your login.\n\n" ),
     692            $user, $user_email, $key, $meta
     693        ),
     694        site_url( "wp-activate.php?key=$key" ),
     695        $key
     696    );
    675697    // TODO: Don't hard code activation link.
    676     $subject = sprintf( __( apply_filters( 'wpmu_signup_user_notification_subject', '[%1$s] Activate %2$s' ) ), $from_name, $user);
     698    $subject = sprintf(
     699        apply_filters( 'wpmu_signup_user_notification_subject',
     700            __( '[%1$s] Activate %2$s' ),
     701            $user, $user_email, $key, $meta
     702        ),
     703        $from_name,
     704        $user
     705    );
    677706    wp_mail($user_email, $subject, $message, $message_headers);
    678707    return true;
Note: See TracChangeset for help on using the changeset viewer.