From 9f1aa91f37a8284ebaec4148eb6a7a96116a1c4e Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 26 Jan 2010 20:53:59 +0000 Subject: [PATCH] Integrate maybe_cancel_post_by_email() into wp-mail.php. see #11644 git-svn-id: http://svn.automattic.com/wordpress/trunk@12855 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/ms-functions.php | 6 ------ wp-mail.php | 3 +++ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/wp-includes/ms-functions.php b/wp-includes/ms-functions.php index fa2eb81c4a..c7d9fecf76 100644 --- a/wp-includes/ms-functions.php +++ b/wp-includes/ms-functions.php @@ -2033,10 +2033,4 @@ function filter_SSL( $url) { return $url; } -function maybe_cancel_post_by_email() { - if ( !defined( 'POST_BY_EMAIL' ) || !POST_BY_EMAIL ) - die( __( 'This action has been disabled by the administrator' ) ); -} -add_action( 'wp-mail.php', 'maybe_cancel_post_by_email' ); - ?> diff --git a/wp-mail.php b/wp-mail.php index cbc4731590..40550c0cbd 100644 --- a/wp-mail.php +++ b/wp-mail.php @@ -10,6 +10,9 @@ /** Make sure that the WordPress bootstrap has run before continuing. */ require(dirname(__FILE__) . '/wp-load.php'); +if ( is_multisite() && ( !defined( 'POST_BY_EMAIL' ) || !POST_BY_EMAIL ) ) + die( __( 'This action has been disabled by the administrator' ) ); + /** Allow a plugin to do a complete takeover of Post by Email **/ do_action('wp-mail.php');