Integrate maybe_cancel_post_by_email() into wp-mail.php. see #11644
git-svn-id: https://develop.svn.wordpress.org/trunk@12855 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
4fa746310c
commit
ed156968a3
|
@ -2033,10 +2033,4 @@ function filter_SSL( $url) {
|
||||||
return $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' );
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -10,6 +10,9 @@
|
||||||
/** Make sure that the WordPress bootstrap has run before continuing. */
|
/** Make sure that the WordPress bootstrap has run before continuing. */
|
||||||
require(dirname(__FILE__) . '/wp-load.php');
|
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 **/
|
/** Allow a plugin to do a complete takeover of Post by Email **/
|
||||||
do_action('wp-mail.php');
|
do_action('wp-mail.php');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue