<?php

// Remove the «Private» label from the beginning of private posts' titles
add_filter('private_title_format', function($title) {
    return '%s';
});

// Hide frontend admin bar from regular users
add_filter('show_admin_bar', function($show_admin_bar) {
    return current_user_can('manage_options');
});

// In development, send all outbound e-mails from and to the blog's e-mail address
add_filter('wp_mail', function(array $params) {
    if (defined('WP_ENV') && WP_ENV === 'development') {
        $params['from'] = $params['to'] = get_bloginfo('admin_email');
    }

    return $params;
});

<?php

// Remove the «Private» label from the beginning of private posts' titles
add_filter('private_title_format', function($title) {
    return '%s';
});

// Hide frontend admin bar from regular users
add_filter('show_admin_bar', function($show_admin_bar) {
    return current_user_can('manage_options');
});

// In development, send all outbound e-mails from and to the blog's e-mail address
if (defined('WP_ENV') && WP_ENV === 'development') {
    $new_addr = get_bloginfo('admin_email');

    add_filter('wp_mail', function(array $params) use ($new_addr) {
        $params['to'] = $new_addr;

        return $params;
    });
    add_filter('wp_mail_from', function($to_addr) use ($new_addr) {
        return $new_addr;
    });
}

Correct buggy behavior for development proxy e-mail address filter
Correct buggy behavior for development proxy e-mail address filter
