]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-mail.php
Wordpress 3.7
[autoinstalls/wordpress.git] / wp-mail.php
index 7fc3967b6a74ff7132f5849ce8942a8522435141..aab91837832e2059eefaec9bc7f8e97d938f75db 100644 (file)
@@ -10,6 +10,7 @@
 /** Make sure that the WordPress bootstrap has run before continuing. */
 require(dirname(__FILE__) . '/wp-load.php');
 
 /** Make sure that the WordPress bootstrap has run before continuing. */
 require(dirname(__FILE__) . '/wp-load.php');
 
+/** This filter is documented in wp-admin/options.php */
 if ( ! apply_filters( 'enable_post_by_email_configuration', true ) )
        wp_die( __( 'This action has been disabled by the administrator.' ) );
 
 if ( ! apply_filters( 'enable_post_by_email_configuration', true ) )
        wp_die( __( 'This action has been disabled by the administrator.' ) );
 
@@ -30,7 +31,7 @@ if ( $last_checked )
 
 set_transient('mailserver_last_checked', true, WP_MAIL_INTERVAL);
 
 
 set_transient('mailserver_last_checked', true, WP_MAIL_INTERVAL);
 
-$time_difference = get_option('gmt_offset') * 3600;
+$time_difference = get_option('gmt_offset') * HOUR_IN_SECONDS;
 
 $phone_delim = '::';
 
 
 $phone_delim = '::';
 
@@ -202,7 +203,7 @@ for ( $i = 1; $i <= $count; $i++ ) {
        $post_category = array(get_option('default_email_category'));
 
        $post_data = compact('post_content','post_title','post_date','post_date_gmt','post_author','post_category', 'post_status');
        $post_category = array(get_option('default_email_category'));
 
        $post_data = compact('post_content','post_title','post_date','post_date_gmt','post_author','post_category', 'post_status');
-       $post_data = add_magic_quotes($post_data);
+       $post_data = wp_slash($post_data);
 
        $post_ID = wp_insert_post($post_data);
        if ( is_wp_error( $post_ID ) )
 
        $post_ID = wp_insert_post($post_data);
        if ( is_wp_error( $post_ID ) )