Make WordPress Core


Ignore:
Timestamp:
08/30/2006 09:46:31 PM (18 years ago)
Author:
ryan
Message:

Use get_option instead of get_settings. Just 'cause.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/pluggable.php

    r4133 r4144  
    164164        $headers = "MIME-Version: 1.0\n" .
    165165            "From: wordpress@" . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME'])) . "\n" .
    166             "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\n";
     166            "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
    167167    }
    168168
     
    222222        nocache_headers();
    223223
    224         wp_redirect(get_settings('siteurl') . '/wp-login.php?redirect_to=' . urlencode($_SERVER['REQUEST_URI']));
     224        wp_redirect(get_option('siteurl') . '/wp-login.php?redirect_to=' . urlencode($_SERVER['REQUEST_URI']));
    225225        exit();
    226226    }
     
    230230if ( !function_exists('check_admin_referer') ) :
    231231function check_admin_referer($action = -1) {
    232     $adminurl = strtolower(get_settings('siteurl')).'/wp-admin';
     232    $adminurl = strtolower(get_option('siteurl')).'/wp-admin';
    233233    $referer = strtolower(wp_get_referer());
    234234    if ( !wp_verify_nonce($_REQUEST['_wpnonce'], $action) &&
     
    338338    $comment_author_domain = gethostbyaddr($comment->comment_author_IP);
    339339
    340     $blogname = get_settings('blogname');
     340    $blogname = get_option('blogname');
    341341
    342342    if ( empty( $comment_type ) ) $comment_type = 'comment';
     
    367367    }
    368368    $notify_message .= get_permalink($comment->comment_post_ID) . "#comments\r\n\r\n";
    369     $notify_message .= sprintf( __('To delete this comment, visit: %s'), get_settings('siteurl').'/wp-admin/comment.php?action=confirmdeletecomment&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
    370     $notify_message .= sprintf( __('To mark this comment as spam, visit: %s'), get_settings('siteurl').'/wp-admin/comment.php?action=confirmdeletecomment&delete_type=spam&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
     369    $notify_message .= sprintf( __('To delete this comment, visit: %s'), get_option('siteurl').'/wp-admin/comment.php?action=confirmdeletecomment&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
     370    $notify_message .= sprintf( __('To mark this comment as spam, visit: %s'), get_option('siteurl').'/wp-admin/comment.php?action=confirmdeletecomment&delete_type=spam&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
    371371
    372372    $wp_email = 'wordpress@' . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME']));
     
    384384    $message_headers = "MIME-Version: 1.0\n"
    385385        . "$from\n"
    386         . "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\n";
     386        . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
    387387
    388388    if ( isset($reply_to) )
     
    408408    global $wpdb;
    409409
    410     if( get_settings( "moderation_notify" ) == 0 )
     410    if( get_option( "moderation_notify" ) == 0 )
    411411        return true;
    412412   
     
    424424    $notify_message .= sprintf( __('Whois  : http://ws.arin.net/cgi-bin/whois.pl?queryinput=%s'), $comment->comment_author_IP ) . "\r\n";
    425425    $notify_message .= __('Comment: ') . "\r\n" . $comment->comment_content . "\r\n\r\n";
    426     $notify_message .= sprintf( __('To approve this comment, visit: %s'),  get_settings('siteurl').'/wp-admin/comment.php?action=mailapprovecomment&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
    427     $notify_message .= sprintf( __('To delete this comment, visit: %s'), get_settings('siteurl').'/wp-admin/comment.php?action=confirmdeletecomment&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
    428     $notify_message .= sprintf( __('To mark this comment as spam, visit: %s'), get_settings('siteurl').'/wp-admin/comment.php?action=confirmdeletecomment&delete_type=spam&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
     426    $notify_message .= sprintf( __('To approve this comment, visit: %s'),  get_option('siteurl').'/wp-admin/comment.php?action=mailapprovecomment&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
     427    $notify_message .= sprintf( __('To delete this comment, visit: %s'), get_option('siteurl').'/wp-admin/comment.php?action=confirmdeletecomment&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
     428    $notify_message .= sprintf( __('To mark this comment as spam, visit: %s'), get_option('siteurl').'/wp-admin/comment.php?action=confirmdeletecomment&delete_type=spam&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n";
    429429    $notify_message .= sprintf( __('Currently %s comments are waiting for approval. Please visit the moderation panel:'), $comments_waiting ) . "\r\n";
    430     $notify_message .= get_settings('siteurl') . "/wp-admin/moderation.php\r\n";
    431 
    432     $subject = sprintf( __('[%1$s] Please moderate: "%2$s"'), get_settings('blogname'), $post->post_title );
    433     $admin_email = get_settings('admin_email');
     430    $notify_message .= get_option('siteurl') . "/wp-admin/moderation.php\r\n";
     431
     432    $subject = sprintf( __('[%1$s] Please moderate: "%2$s"'), get_option('blogname'), $post->post_title );
     433    $admin_email = get_option('admin_email');
    434434
    435435    $notify_message = apply_filters('comment_moderation_text', $notify_message, $comment_id);
     
    449449    $user_email = stripslashes($user->user_email);
    450450
    451     $message  = sprintf(__('New user registration on your blog %s:'), get_settings('blogname')) . "\r\n\r\n";
     451    $message  = sprintf(__('New user registration on your blog %s:'), get_option('blogname')) . "\r\n\r\n";
    452452    $message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n";
    453453    $message .= sprintf(__('E-mail: %s'), $user_email) . "\r\n";
    454454
    455     @wp_mail(get_settings('admin_email'), sprintf(__('[%s] New User Registration'), get_settings('blogname')), $message);
     455    @wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), get_option('blogname')), $message);
    456456
    457457    if ( empty($plaintext_pass) )
     
    460460    $message  = sprintf(__('Username: %s'), $user_login) . "\r\n";
    461461    $message .= sprintf(__('Password: %s'), $plaintext_pass) . "\r\n";
    462     $message .= get_settings('siteurl') . "/wp-login.php\r\n";
    463 
    464     wp_mail($user_email, sprintf(__('[%s] Your username and password'), get_settings('blogname')), $message);
     462    $message .= get_option('siteurl') . "/wp-login.php\r\n";
     463
     464    wp_mail($user_email, sprintf(__('[%s] Your username and password'), get_option('blogname')), $message);
    465465
    466466}
Note: See TracChangeset for help on using the changeset viewer.