WordPress.org

Make WordPress Core

Ticket #8779: standardized_function_names.diff

File standardized_function_names.diff, 37.8 KB (added by filosofo, 7 years ago)
  • wp-includes/pluggable.php

     
    6969function wp_get_current_user() { 
    7070        global $current_user; 
    7171 
    72         get_currentuserinfo(); 
     72        get_current_user_info(); 
    7373 
    7474        return $current_user; 
    7575} 
    7676endif; 
    7777 
    78 if ( !function_exists('get_currentuserinfo') ) : 
     78if ( !function_exists('get_current_user_info') ) : 
    7979/** 
    8080 * Populate global variables with information about the currently logged in user. 
    8181 * 
     
    8383 * will be set to the logged in person. If no user is logged in, then it will 
    8484 * set the current user to 0, which is invalid and won't have any permissions. 
    8585 * 
    86  * @since 0.71 
     86 * @since 2.8 
    8787 * @uses $current_user Checks if the current user is set 
    8888 * @uses wp_validate_auth_cookie() Retrieves current logged in user. 
    8989 * 
    9090 * @return bool|null False on XMLRPC Request and invalid auth cookie. Null when current user set 
    9191 */ 
    92 function get_currentuserinfo() { 
     92function get_current_user_info() { 
    9393        global $current_user; 
    9494 
    9595        if ( defined('XMLRPC_REQUEST') && XMLRPC_REQUEST ) 
     
    109109} 
    110110endif; 
    111111 
    112 if ( !function_exists('get_userdata') ) : 
     112if ( !function_exists('get_user_data') ) : 
    113113/** 
    114114 * Retrieve user info by user ID. 
    115115 * 
    116  * @since 0.71 
     116 * @since 2.8 
    117117 * 
    118118 * @param int $user_id User ID 
    119119 * @return bool|object False on failure, User DB row object 
    120120 */ 
    121 function get_userdata( $user_id ) { 
     121function get_user_data( $user_id ) { 
    122122        global $wpdb; 
    123123 
    124124        $user_id = absint($user_id); 
     
    154154} 
    155155endif; 
    156156 
    157 if ( !function_exists('get_userdatabylogin') ) : 
     157if ( !function_exists('get_user_data_by_login') ) : 
    158158/** 
    159159 * Retrieve user info by login name. 
    160160 * 
    161  * @since 0.71 
     161 * @since 2.8 
    162162 * 
    163163 * @param string $user_login User's username 
    164164 * @return bool|object False on failure, User DB row object 
    165165 */ 
    166 function get_userdatabylogin($user_login) { 
     166function get_user_data_by_login($user_login) { 
    167167        global $wpdb; 
    168168        $user_login = sanitize_user( $user_login ); 
    169169 
     
    397397 
    398398        // If we don't have a charset from the input headers 
    399399        if ( !isset( $charset ) ) { 
    400                 $charset = get_bloginfo( 'charset' ); 
     400                $charset = get_blog_info( 'charset' ); 
    401401        } 
    402402 
    403403        // Set the content-type and charset 
     
    444444        if ( '' == $password ) 
    445445                return new WP_Error('empty_password', __('<strong>ERROR</strong>: The password field is empty.')); 
    446446 
    447         $user = get_userdatabylogin($username); 
     447        $user = get_user_data_by_login($username); 
    448448 
    449449        if ( !$user || ($user->user_login != $username) ) { 
    450450                do_action( 'wp_login_failed', $username ); 
     
    522522                return false; 
    523523        } 
    524524 
    525         $user = get_userdatabylogin($username); 
     525        $user = get_user_data_by_login($username); 
    526526        if ( ! $user ) { 
    527527                do_action('auth_cookie_bad_username', $cookie_elements); 
    528528                return false; 
     
    548548 * @return string Authentication cookie contents 
    549549 */ 
    550550function wp_generate_auth_cookie($user_id, $expiration, $scheme = 'auth') { 
    551         $user = get_userdata($user_id); 
     551        $user = get_user_data($user_id); 
    552552 
    553553        $key = wp_hash($user->user_login . '|' . $expiration, $scheme); 
    554554        $hash = hash_hmac('md5', $user->user_login . '|' . $expiration, $key); 
     
    935935function wp_notify_postauthor($comment_id, $comment_type='') { 
    936936        $comment = get_comment($comment_id); 
    937937        $post    = get_post($comment->comment_post_ID); 
    938         $user    = get_userdata( $post->post_author ); 
     938        $user    = get_user_data( $post->post_author ); 
    939939 
    940940        if ('' == $user->user_email) return false; // If there's no email to send the comment to 
    941941 
     
    15021502        $email = ''; 
    15031503        if ( is_numeric($id_or_email) ) { 
    15041504                $id = (int) $id_or_email; 
    1505                 $user = get_userdata($id); 
     1505                $user = get_user_data($id); 
    15061506                if ( $user ) 
    15071507                        $email = $user->user_email; 
    15081508        } elseif ( is_object($id_or_email) ) { 
     
    15111511 
    15121512                if ( !empty($id_or_email->user_id) ) { 
    15131513                        $id = (int) $id_or_email->user_id; 
    1514                         $user = get_userdata($id); 
     1514                        $user = get_user_data($id); 
    15151515                        if ( $user) 
    15161516                                $email = $user->user_email; 
    15171517                } elseif ( !empty($id_or_email->comment_author_email) ) { 
     
    15781578 */ 
    15791579function wp_setcookie($username, $password = '', $already_md5 = false, $home = '', $siteurl = '', $remember = false) { 
    15801580        _deprecated_function( __FUNCTION__, '2.5', 'wp_set_auth_cookie()' ); 
    1581         $user = get_userdatabylogin($username); 
     1581        $user = get_user_data_by_login($username); 
    15821582        wp_set_auth_cookie($user->ID, $remember); 
    15831583} 
    15841584endif; 
     
    17181718} 
    17191719endif; 
    17201720 
     1721if ( !function_exists('get_currentuserinfo') ) : 
     1722/** 
     1723 * Populate global variables with information about the currently logged in user. 
     1724 * 
     1725 * Will set the current user, if the current user is not set. The current user 
     1726 * will be set to the logged in person. If no user is logged in, then it will 
     1727 * set the current user to 0, which is invalid and won't have any permissions. 
     1728 * 
     1729 * @deprecated Use get_current_user_info() 
     1730 * @since 0.71 
     1731 * @uses $current_user Checks if the current user is set 
     1732 * @uses wp_validate_auth_cookie() Retrieves current logged in user. 
     1733 * 
     1734 * @return bool|null False on XMLRPC Request and invalid auth cookie. Null when current user set 
     1735 */ 
     1736function get_currentuserinfo() { 
     1737        _deprecated_function( __FUNCTION__, '2.8', 'get_current_user_info()' ); 
     1738        return get_current_user_info(); 
     1739} 
     1740endif; 
     1741 
     1742if ( !function_exists('get_userdatabylogin') ) : 
     1743/** 
     1744 * Retrieve user info by login name. 
     1745 * 
     1746 * @deprecated Use get_user_data_by_login() 
     1747 * @since 0.71 
     1748 * 
     1749 * @param string $user_login User's username 
     1750 * @return bool|object False on failure, User DB row object 
     1751 */ 
     1752function get_userdatabylogin($user_login = '') { 
     1753        _deprecated_function( __FUNCTION__, '2.8', 'get_user_data_by_login()' ); 
     1754        return get_user_data_by_login($user_login); 
     1755} 
     1756endif; 
     1757 
     1758if ( !function_exists('get_userdata') ) : 
     1759/** 
     1760 * Retrieve user info by user ID. 
     1761 * 
     1762 * @deprecated use get_user_data() 
     1763 * @since 0.71 
     1764 * 
     1765 * @param int $user_id User ID 
     1766 * @return bool|object False on failure, User DB row object 
     1767 */ 
     1768function get_userdata( $user_id = 0 ) { 
     1769        _deprecated_function( __FUNCTION__, '2.8', 'get_user_data()' ); 
     1770        return get_user_data($user_id); 
     1771} 
     1772endif; 
     1773 
    17211774?> 
  • wp-includes/feed.php

     
    1212/** 
    1313 * RSS container for the bloginfo function. 
    1414 * 
    15  * You can retrieve anything that you can using the get_bloginfo() function. 
     15 * You can retrieve anything that you can using the get_blog_info() function. 
    1616 * Everything will be stripped of tags and characters converted, when the values 
    1717 * are retrieved for use in the feeds. 
    1818 * 
    1919 * @package WordPress 
    2020 * @subpackage Feed 
    21  * @since 1.5.1 
    22  * @uses apply_filters() Calls 'get_bloginfo_rss' hook with two parameters. 
    23  * @see get_bloginfo() For the list of possible values to display. 
     21 * @since 2.8 
     22 * @uses apply_filters() Calls 'get_blog_info_rss' hook with two parameters. 
     23 * @see get_blog_info() For the list of possible values to display. 
    2424 * 
    25  * @param string $show See get_bloginfo() for possible values. 
     25 * @param string $show See get_blog_info() for possible values. 
    2626 * @return string 
    2727 */ 
    28 function get_bloginfo_rss($show = '') { 
    29         $info = strip_tags(get_bloginfo($show)); 
     28function get_blog_info_rss($show = '') { 
     29        $info = strip_tags(get_blog_info($show)); 
    3030        return apply_filters('get_bloginfo_rss', convert_chars($info), $show); 
    3131} 
    3232 
    3333/** 
    3434 * Display RSS container for the bloginfo function. 
    3535 * 
    36  * You can retrieve anything that you can using the get_bloginfo() function. 
     36 * You can retrieve anything that you can using the get_blog_info() function. 
    3737 * Everything will be stripped of tags and characters converted, when the values 
    3838 * are retrieved for use in the feeds. 
    3939 * 
     
    4141 * @subpackage Feed 
    4242 * @since 0.71 
    4343 * @uses apply_filters() Calls 'bloginfo_rss' hook with two parameters. 
    44  * @see get_bloginfo() For the list of possible values to display. 
     44 * @see get_blog_info() For the list of possible values to display. 
    4545 * 
    46  * @param string $show See get_bloginfo() for possible values. 
     46 * @param string $show See get_blog_info() for possible values. 
    4747 */ 
    4848function bloginfo_rss($show = '') { 
    49         echo apply_filters('bloginfo_rss', get_bloginfo_rss($show), $show); 
     49        echo apply_filters('bloginfo_rss', get_blog_info_rss($show), $show); 
    5050} 
    5151 
    5252/** 
     
    335335                if ( 'rdf' == $type ) 
    336336                        $the_list .= "\n\t\t<dc:subject><![CDATA[$cat_name]]></dc:subject>\n"; 
    337337                elseif ( 'atom' == $type ) 
    338                         $the_list .= sprintf( '<category scheme="%1$s" term="%2$s" />', attribute_escape( apply_filters( 'get_bloginfo_rss', get_bloginfo( 'url' ) ) ), attribute_escape( $cat_name ) ); 
     338                        $the_list .= sprintf( '<category scheme="%1$s" term="%2$s" />', attribute_escape( apply_filters( 'get_blog_info_rss', get_blog_info( 'url' ) ) ), attribute_escape( $cat_name ) ); 
    339339                else 
    340340                        $the_list .= "\n\t\t<category><![CDATA[" . html_entity_decode( $cat_name ) . "]]></category>\n"; 
    341341        } 
     
    367367 * @since 2.2.0 
    368368 */ 
    369369function html_type_rss() { 
    370         $type = get_bloginfo('html_type'); 
     370        $type = get_blog_info('html_type'); 
    371371        if (strpos($type, 'xhtml') !== false) 
    372372                $type = 'xhtml'; 
    373373        else 
  • wp-includes/script-loader.php

     
    3939                $guessurl = wp_guess_url(); 
    4040 
    4141        $scripts->base_url = $guessurl; 
    42         $scripts->default_version = get_bloginfo( 'version' ); 
     42        $scripts->default_version = get_blog_info( 'version' ); 
    4343 
    4444        $scripts->add( 'common', '/wp-admin/js/common.js', array('jquery', 'hoverIntent'), '20081226' ); 
    4545        $scripts->add( 'sack', '/wp-includes/js/tw-sack.js', false, '1.6.1' ); 
     
    312312        if ( ! $guessurl = site_url() ) 
    313313                $guessurl = wp_guess_url(); 
    314314        $styles->base_url = $guessurl; 
    315         $styles->default_version = get_bloginfo( 'version' ); 
    316         $styles->text_direction = 'rtl' == get_bloginfo( 'text_direction' ) ? 'rtl' : 'ltr'; 
     315        $styles->default_version = get_blog_info( 'version' ); 
     316        $styles->text_direction = 'rtl' == get_blog_info( 'text_direction' ) ? 'rtl' : 'ltr'; 
    317317 
    318318        $rtl_styles = array( 'global', 'colors', 'dashboard', 'ie', 'install', 'login', 'media', 'theme-editor', 'upload', 'widgets', 'press-this', 'plugin-install', 'farbtastic' ); 
    319319 
  • wp-includes/category-template.php

     
    502502 
    503503                if( !empty( $show_option_all ) ) 
    504504                        if ( 'list' == $style ) 
    505                                 $output .= '<li><a href="' .  get_bloginfo( 'url' )  . '">' . $show_option_all . '</a></li>'; 
     505                                $output .= '<li><a href="' .  get_blog_info( 'url' )  . '">' . $show_option_all . '</a></li>'; 
    506506                        else 
    507                                 $output .= '<a href="' .  get_bloginfo( 'url' )  . '">' . $show_option_all . '</a>'; 
     507                                $output .= '<a href="' .  get_blog_info( 'url' )  . '">' . $show_option_all . '</a>'; 
    508508 
    509509                if ( empty( $r['current_category'] ) && is_category() ) 
    510510                        $r['current_category'] = $wp_query->get_queried_object_id(); 
  • xmlrpc.php

     
    507507                        } 
    508508 
    509509                        // Get the author info. 
    510                         $author = get_userdata($page->post_author); 
     510                        $author = get_user_data($page->post_author); 
    511511 
    512512                        $page_template = get_post_meta( $page->ID, '_wp_page_template', true ); 
    513513                        if( empty( $page_template ) ) 
     
    16251625 
    16261626                do_action('xmlrpc_call', 'blogger.getUserInfo'); 
    16271627 
    1628                 $user_data = get_userdatabylogin($user_login); 
     1628                $user_data = get_user_data_by_login($user_login); 
    16291629 
    16301630                $struct = array( 
    16311631                        'nickname'  => $user_data->nickname, 
     
    25692569                        $link = post_permalink($postdata['ID']); 
    25702570 
    25712571                        // Get the author info. 
    2572                         $author = get_userdata($postdata['post_author']); 
     2572                        $author = get_user_data($postdata['post_author']); 
    25732573 
    25742574                        $allow_comments = ('open' == $postdata['comment_status']) ? 1 : 0; 
    25752575                        $allow_pings = ('open' == $postdata['ping_status']) ? 1 : 0; 
     
    26842684                        $link = post_permalink($entry['ID']); 
    26852685 
    26862686                        // Get the post author info. 
    2687                         $author = get_userdata($entry['post_author']); 
     2687                        $author = get_user_data($entry['post_author']); 
    26882688 
    26892689                        $allow_comments = ('open' == $entry['comment_status']) ? 1 : 0; 
    26902690                        $allow_pings = ('open' == $entry['ping_status']) ? 1 : 0; 
  • wp-content/themes/default/archive.php

     
    6060                } else if ( is_date() ) { // If this is a date archive 
    6161                        echo("<h2>Sorry, but there aren't any posts with this date.</h2>"); 
    6262                } else if ( is_author() ) { // If this is a category archive 
    63                         $userdata = get_userdatabylogin(get_query_var('author_name')); 
     63                        $userdata = get_user_data_by_login(get_query_var('author_name')); 
    6464                        printf("<h2 class='center'>Sorry, but there aren't any posts by %s yet.</h2>", $userdata->display_name); 
    6565                } else { 
    6666                        echo("<h2 class='center'>No posts found.</h2>"); 
  • wp-links-opml.php

     
    2929<?php the_generator( 'comment' ); ?> 
    3030<opml version="1.0"> 
    3131        <head> 
    32                 <title>Links for <?php echo attribute_escape(get_bloginfo('name', 'display').$cat_name); ?></title> 
     32                <title>Links for <?php echo attribute_escape(get_blog_info('name', 'display').$cat_name); ?></title> 
    3333                <dateCreated><?php echo gmdate("D, d M Y H:i:s"); ?> GMT</dateCreated> 
    3434        </head> 
    3535        <body> 
  • wp-rss2.php

     
    77 */ 
    88 
    99require( './wp-load.php' ); 
    10 wp_redirect( get_bloginfo( 'rss2_url' ), 301 ); 
     10wp_redirect( get_blog_info( 'rss2_url' ), 301 ); 
    1111 
    1212?> 
     13 No newline at end of file 
  • wp-commentsrss2.php

     
    77 */ 
    88 
    99require( './wp-load.php' ); 
    10 wp_redirect( get_bloginfo( 'comments_rss2_url' ), 301 ); 
     10wp_redirect( get_blog_info( 'comments_rss2_url' ), 301 ); 
    1111 
    1212?> 
     13 No newline at end of file 
  • wp-atom.php

     
    77 */ 
    88 
    99require( './wp-load.php' ); 
    10 wp_redirect( get_bloginfo( 'atom_url' ), 301 ); 
     10wp_redirect( get_blog_info( 'atom_url' ), 301 ); 
    1111 
    1212?> 
     13 No newline at end of file 
  • wp-admin/admin-ajax.php

     
    818818                if ( $last = wp_check_post_lock( $post->ID ) ) { 
    819819                        $do_autosave = $do_lock = false; 
    820820 
    821                         $last_user = get_userdata( $last ); 
     821                        $last_user = get_user_data( $last ); 
    822822                        $last_user_name = $last_user ? $last_user->display_name : __( 'Someone' ); 
    823823                        $data = new WP_Error( 'locked', sprintf( 
    824824                                $_POST['post_type'] == 'page' ? __( 'Autosave disabled: %s is currently editing this page.' ) : __( 'Autosave disabled: %s is currently editing this post.' ), 
     
    903903        } 
    904904        $current_user = wp_get_current_user(); 
    905905        if ( is_array($closed) ) 
    906                 update_usermeta($current_user->ID, 'closedpostboxes_'.$page, $closed); 
     906                update_user_meta($current_user->ID, 'closedpostboxes_'.$page, $closed); 
    907907        if ( is_array($hidden) ) 
    908                 update_usermeta($current_user->ID, 'meta-box-hidden_'.$page, $hidden); 
     908                update_user_meta($current_user->ID, 'meta-box-hidden_'.$page, $hidden); 
    909909break; 
    910910case 'hidden-columns' : 
    911911        check_ajax_referer( 'hiddencolumns', 'hiddencolumnsnonce' ); 
     
    917917        } 
    918918        $current_user = wp_get_current_user(); 
    919919        if ( is_array($hidden) ) 
    920                 update_usermeta($current_user->ID, "manage-$page-columns-hidden", $hidden); 
     920                update_user_meta($current_user->ID, "manage-$page-columns-hidden", $hidden); 
    921921break; 
    922922case 'get-permalink': 
    923923        check_ajax_referer( 'getpermalink', 'getpermalinknonce' ); 
     
    946946        } 
    947947 
    948948        if ( $last = wp_check_post_lock( $post_ID ) ) { 
    949                 $last_user = get_userdata( $last ); 
     949                $last_user = get_user_data( $last ); 
    950950                $last_user_name = $last_user ? $last_user->display_name : __( 'Someone' ); 
    951951                printf( $_POST['post_type'] == 'page' ? __( 'Saving is disabled: %s is currently editing this page.' ) : __( 'Saving is disabled: %s is currently editing this post.' ),        wp_specialchars( $last_user_name ) ); 
    952952                exit; 
  • wp-admin/includes/upgrade.php

     
    382382        } 
    383383 
    384384        // Get the GMT offset, we'll use that later on 
    385         $all_options = get_alloptions_110(); 
     385        $all_options = get_all_options_110(); 
    386386 
    387387        $time_difference = $all_options->time_difference; 
    388388 
     
    512512        $users = $wpdb->get_results("SELECT * FROM $wpdb->users"); 
    513513        foreach ( $users as $user ) : 
    514514                if ( !empty( $user->user_firstname ) ) 
    515                         update_usermeta( $user->ID, 'first_name', $wpdb->escape($user->user_firstname) ); 
     515                        update_user_meta( $user->ID, 'first_name', $wpdb->escape($user->user_firstname) ); 
    516516                if ( !empty( $user->user_lastname ) ) 
    517                         update_usermeta( $user->ID, 'last_name', $wpdb->escape($user->user_lastname) ); 
     517                        update_user_meta( $user->ID, 'last_name', $wpdb->escape($user->user_lastname) ); 
    518518                if ( !empty( $user->user_nickname ) ) 
    519                         update_usermeta( $user->ID, 'nickname', $wpdb->escape($user->user_nickname) ); 
     519                        update_user_meta( $user->ID, 'nickname', $wpdb->escape($user->user_nickname) ); 
    520520                if ( !empty( $user->user_level ) ) 
    521                         update_usermeta( $user->ID, $wpdb->prefix . 'user_level', $user->user_level ); 
     521                        update_user_meta( $user->ID, $wpdb->prefix . 'user_level', $user->user_level ); 
    522522                if ( !empty( $user->user_icq ) ) 
    523                         update_usermeta( $user->ID, 'icq', $wpdb->escape($user->user_icq) ); 
     523                        update_user_meta( $user->ID, 'icq', $wpdb->escape($user->user_icq) ); 
    524524                if ( !empty( $user->user_aim ) ) 
    525                         update_usermeta( $user->ID, 'aim', $wpdb->escape($user->user_aim) ); 
     525                        update_user_meta( $user->ID, 'aim', $wpdb->escape($user->user_aim) ); 
    526526                if ( !empty( $user->user_msn ) ) 
    527                         update_usermeta( $user->ID, 'msn', $wpdb->escape($user->user_msn) ); 
     527                        update_user_meta( $user->ID, 'msn', $wpdb->escape($user->user_msn) ); 
    528528                if ( !empty( $user->user_yim ) ) 
    529                         update_usermeta( $user->ID, 'yim', $wpdb->escape($user->user_icq) ); 
     529                        update_user_meta( $user->ID, 'yim', $wpdb->escape($user->user_icq) ); 
    530530                if ( !empty( $user->user_description ) ) 
    531                         update_usermeta( $user->ID, 'description', $wpdb->escape($user->user_description) ); 
     531                        update_user_meta( $user->ID, 'description', $wpdb->escape($user->user_description) ); 
    532532 
    533533                if ( isset( $user->user_idmode ) ): 
    534534                        $idmode = $user->user_idmode; 
     
    543543                endif; 
    544544 
    545545                // FIXME: RESET_CAPS is temporary code to reset roles and caps if flag is set. 
    546                 $caps = get_usermeta( $user->ID, $wpdb->prefix . 'capabilities'); 
     546                $caps = get_user_meta( $user->ID, $wpdb->prefix . 'capabilities'); 
    547547                if ( empty($caps) || defined('RESET_CAPS') ) { 
    548                         $level = get_usermeta($user->ID, $wpdb->prefix . 'user_level'); 
     548                        $level = get_user_meta($user->ID, $wpdb->prefix . 'user_level'); 
    549549                        $role = translate_level_to_role($level); 
    550                         update_usermeta( $user->ID, $wpdb->prefix . 'capabilities', array($role => true) ); 
     550                        update_user_meta( $user->ID, $wpdb->prefix . 'capabilities', array($role => true) ); 
    551551                } 
    552552 
    553553        endforeach; 
     
    10111011/** 
    10121012 * Retrieve all options as it was for 1.2. 
    10131013 * 
    1014  * @since 1.2.0 
     1014 * @since 2.8 
    10151015 * 
    10161016 * @return array List of options. 
    10171017 */ 
    1018 function get_alloptions_110() { 
     1018function get_all_options_110() { 
    10191019        global $wpdb; 
    10201020        if ($options = $wpdb->get_results("SELECT option_name, option_value FROM $wpdb->options")) { 
    10211021                foreach ($options as $option) { 
  • wp-admin/includes/template.php

     
    18041804                $short_url = substr( $short_url, 0, -1 ); 
    18051805        if ( strlen( $short_url ) > 35 ) 
    18061806                $short_url = substr( $short_url, 0, 32 ).'...'; 
    1807         $numposts = get_usernumposts( $user_object->ID ); 
     1807        $numposts = get_user_num_posts( $user_object->ID ); 
    18081808        $checkbox = ''; 
    18091809        // Check if the user for this row is editable  
    18101810        if ( current_user_can( 'edit_user', $user_object->ID ) ) { 
  • wp-admin/includes/user.php

     
    4848        if ( $user_id != 0 ) { 
    4949                $update = true; 
    5050                $user->ID = (int) $user_id; 
    51                 $userdata = get_userdata( $user_id ); 
     51                $userdata = get_user_data( $user_id ); 
    5252                $user->user_login = $wpdb->escape( $userdata->user_login ); 
    5353        } else { 
    5454                $update = false; 
  • wp-admin/includes/export.php

     
    122122        } 
    123123        // wp: the blog url 
    124124        else { 
    125                 return get_bloginfo_rss('url'); 
     125                return get_blog_info_rss('url'); 
    126126        } 
    127127} 
    128128 
     
    212212        echo $the_list; 
    213213} 
    214214 
    215 echo '<?xml version="1.0" encoding="' . get_bloginfo('charset') . '"?' . ">\n"; 
     215echo '<?xml version="1.0" encoding="' . get_blog_info('charset') . '"?' . ">\n"; 
    216216 
    217217?> 
    218218<!-- This is a WordPress eXtended RSS file generated by WordPress as an export of your blog. --> 
     
    244244        <title><?php bloginfo_rss('name'); ?></title> 
    245245        <link><?php bloginfo_rss('url') ?></link> 
    246246        <description><?php bloginfo_rss("description") ?></description> 
    247         <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></pubDate> 
     247        <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_last_post_modified('GMT'), false); ?></pubDate> 
    248248        <generator>http://wordpress.org/?v=<?php bloginfo_rss('version'); ?></generator> 
    249249        <language><?php echo get_option('rss_language'); ?></language> 
    250250        <wp:wxr_version><?php echo WXR_VERSION; ?></wp:wxr_version> 
  • wp-admin/post.php

     
    149149 
    150150        if ( current_user_can('edit_post', $post_ID) ) { 
    151151                if ( $last = wp_check_post_lock( $post->ID ) ) { 
    152                         $last_user = get_userdata( $last ); 
     152                        $last_user = get_user_data( $last ); 
    153153                        $last_user_name = $last_user ? $last_user->display_name : __('Somebody'); 
    154154                        $message = sprintf( __( 'Warning: %s is currently editing this post' ), wp_specialchars( $last_user_name ) ); 
    155155                        $message = str_replace( "'", "\'", "<div class='error'><p>$message</p></div>" ); 
  • wp-admin/edit-page-form.php

     
    458458<?php 
    459459        if ($post_ID) { 
    460460                if ( $last_id = get_post_meta($post_ID, '_edit_last', true) ) { 
    461                         $last_user = get_userdata($last_id); 
     461                        $last_user = get_user_data($last_id); 
    462462                        printf(__('Last edited by %1$s on %2$s at %3$s'), wp_specialchars( $last_user->display_name ), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); 
    463463                } else { 
    464464                        printf(__('Last edited on %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); 
  • wp-admin/gears-manifest.php

     
    5858/** 
    5959 * @ignore 
    6060 */ 
    61 function get_bloginfo() {} 
     61function get_blog_info() {} 
    6262 
    6363/** 
    6464 * @ignore 
  • wp-admin/import/dotclear.php

     
    339339                                $name = $wpdb->escape(csc ($name)); 
    340340                                $RealName = $wpdb->escape(csc ($user_pseudo)); 
    341341 
    342                                 if($uinfo = get_userdatabylogin($name)) 
     342                                if($uinfo = get_user_data_by_login($name)) 
    343343                                { 
    344344 
    345345                                        $ret_id = wp_insert_user(array( 
     
    376376                                else if(2  <= $wp_perms) { $user->set_role('contributor'); } 
    377377                                else                     { $user->set_role('subscriber'); } 
    378378 
    379                                 update_usermeta( $ret_id, 'wp_user_level', $wp_perms); 
    380                                 update_usermeta( $ret_id, 'rich_editing', 'false'); 
    381                                 update_usermeta( $ret_id, 'first_name', csc ($user_prenom)); 
    382                                 update_usermeta( $ret_id, 'last_name', csc ($user_nom)); 
     379                                update_user_meta( $ret_id, 'wp_user_level', $wp_perms); 
     380                                update_user_meta( $ret_id, 'rich_editing', 'false'); 
     381                                update_user_meta( $ret_id, 'first_name', csc ($user_prenom)); 
     382                                update_user_meta( $ret_id, 'last_name', csc ($user_nom)); 
    383383                        }// End foreach($users as $user) 
    384384 
    385385                        // Store id translation array for future use 
     
    417417                                $comment_status_map = array (0 => 'closed', 1 => 'open'); 
    418418 
    419419                                //Can we do this more efficiently? 
    420                                 $uinfo = ( get_userdatabylogin( $user_id ) ) ? get_userdatabylogin( $user_id ) : 1; 
     420                                $uinfo = ( get_user_data_by_login( $user_id ) ) ? get_user_data_by_login( $user_id ) : 1; 
    421421                                $authorid = ( is_object( $uinfo ) ) ? $uinfo->ID : $uinfo ; 
    422422 
    423423                                $Title = $wpdb->escape(csc ($post_titre)); 
  • wp-admin/import/textpattern.php

     
    228228                                $name = $wpdb->escape($name); 
    229229                                $RealName = $wpdb->escape($RealName); 
    230230 
    231                                 if($uinfo = get_userdatabylogin($name)) 
     231                                if($uinfo = get_user_data_by_login($name)) 
    232232                                { 
    233233 
    234234                                        $ret_id = wp_insert_user(array( 
     
    265265                                if('2'  == $transperms[$privs]) { $user->set_role('contributor'); } 
    266266                                if('0'  == $transperms[$privs]) { $user->set_role('subscriber'); } 
    267267 
    268                                 update_usermeta( $ret_id, 'wp_user_level', $transperms[$privs] ); 
    269                                 update_usermeta( $ret_id, 'rich_editing', 'false'); 
     268                                update_user_meta( $ret_id, 'wp_user_level', $transperms[$privs] ); 
     269                                update_user_meta( $ret_id, 'rich_editing', 'false'); 
    270270                        }// End foreach($users as $user) 
    271271 
    272272                        // Store id translation array for future use 
     
    303303                                $stattrans = array(1 => 'draft', 2 => 'private', 3 => 'draft', 4 => 'publish', 5 => 'publish'); 
    304304 
    305305                                //Can we do this more efficiently? 
    306                                 $uinfo = ( get_userdatabylogin( $AuthorID ) ) ? get_userdatabylogin( $AuthorID ) : 1; 
     306                                $uinfo = ( get_user_data_by_login( $AuthorID ) ) ? get_user_data_by_login( $AuthorID ) : 1; 
    307307                                $authorid = ( is_object( $uinfo ) ) ? $uinfo->ID : $uinfo ; 
    308308 
    309309                                $Title = $wpdb->escape($Title); 
     
    582582        { 
    583583                echo '<p>'.__('Welcome to WordPress.  We hope (and expect!) that you will find this platform incredibly rewarding!  As a new WordPress user coming from Textpattern, there are some things that we would like to point out.  Hopefully, they will help your transition go as smoothly as possible.').'</p>'; 
    584584                echo '<h3>'.__('Users').'</h3>'; 
    585                 echo '<p>'.sprintf(__('You have already setup WordPress and have been assigned an administrative login and password.  Forget it.  You didn&#8217;t have that login in Textpattern, why should you have it here?  Instead we have taken care to import all of your users into our system.  Unfortunately there is one downside.  Because both WordPress and Textpattern uses a strong encryption hash with passwords, it is impossible to decrypt it and we are forced to assign temporary passwords to all your users.  <strong>Every user has the same username, but their passwords are reset to password123.</strong>  So <a href="%1$s">Login</a> and change it.'), get_bloginfo( 'wpurl' ) . '/wp-login.php').'</p>'; 
     585                echo '<p>'.sprintf(__('You have already setup WordPress and have been assigned an administrative login and password.  Forget it.  You didn&#8217;t have that login in Textpattern, why should you have it here?  Instead we have taken care to import all of your users into our system.  Unfortunately there is one downside.  Because both WordPress and Textpattern uses a strong encryption hash with passwords, it is impossible to decrypt it and we are forced to assign temporary passwords to all your users.  <strong>Every user has the same username, but their passwords are reset to password123.</strong>  So <a href="%1$s">Login</a> and change it.'), get_blog_info( 'wpurl' ) . '/wp-login.php').'</p>'; 
    586586                echo '<h3>'.__('Preserving Authors').'</h3>'; 
    587587                echo '<p>'.__('Secondly, we have attempted to preserve post authors.  If you are the only author or contributor to your blog, then you are safe.  In most cases, we are successful in this preservation endeavor.  However, if we cannot ascertain the name of the writer due to discrepancies between database tables, we assign it to you, the administrative user.').'</p>'; 
    588588                echo '<h3>'.__('Textile').'</h3>'; 
     
    594594                echo '<li>'.__('<a href="http://wordpress.org/support/">The WordPress support forums</a>').'</li>'; 
    595595                echo '<li>'.__('<a href="http://codex.wordpress.org">The Codex (In other words, the WordPress Bible)</a>').'</li>'; 
    596596                echo '</ul>'; 
    597                 echo '<p>'.sprintf(__('That&#8217;s it! What are you waiting for? Go <a href="%1$s">login</a>!'), get_bloginfo( 'wpurl' ) . '/wp-login.php').'</p>'; 
     597                echo '<p>'.sprintf(__('That&#8217;s it! What are you waiting for? Go <a href="%1$s">login</a>!'), get_blog_info( 'wpurl' ) . '/wp-login.php').'</p>'; 
    598598        } 
    599599 
    600600        function db_form() 
  • wp-admin/import/wordpress.php

     
    168168 
    169169                        if ( !empty($_POST['user_select'][$i]) ) { 
    170170                                // an existing user was selected in the dropdown list 
    171                                 $user = get_userdata( intval($_POST['user_select'][$i]) ); 
     171                                $user = get_user_data( intval($_POST['user_select'][$i]) ); 
    172172                                if ( isset($user->ID) ) 
    173173                                        $this->author_ids[$in_author_name] = $user->ID; 
    174174                        } 
  • wp-admin/edit-form-advanced.php

     
    603603        if ( $post_ID ) { 
    604604                echo '<span id="last-edit">'; 
    605605                if ( $last_id = get_post_meta($post_ID, '_edit_last', true) ) { 
    606                         $last_user = get_userdata($last_id); 
     606                        $last_user = get_user_data($last_id); 
    607607                        printf(__('Last edited by %1$s on %2$s at %3$s'), wp_specialchars( $last_user->display_name ), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); 
    608608                } else { 
    609609                        printf(__('Last edited on %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified)); 
  • wp-admin/menu.php

     
    191191 
    192192unset($id); 
    193193 
    194 function add_cssclass($add, $class) { 
     194function add_css_class($add, $class) { 
    195195        $class = empty($class) ? $add : $class .= ' ' . $add; 
    196196        return $class; 
    197197} 
     
    205205                $i++; 
    206206 
    207207                if ( 0 == $order ) { // dashboard is always shown/single 
    208                         $menu[0][4] = add_cssclass('menu-top-first menu-top-last', $top[4]); 
     208                        $menu[0][4] = add_css_class('menu-top-first menu-top-last', $top[4]); 
    209209                        continue; 
    210210                } 
    211211 
     
    213213                        $first = true; 
    214214                        if ( $lastorder ) { 
    215215                                $c = $menu[$lastorder][4]; 
    216                                 $menu[$lastorder][4] = add_cssclass('menu-top-last', $c); 
     216                                $menu[$lastorder][4] = add_css_class('menu-top-last', $c); 
    217217                        } 
    218218                        continue; 
    219219                } 
    220220 
    221221                if ( $first ) { 
    222222                        $c = $menu[$order][4]; 
    223                         $menu[$order][4] = add_cssclass('menu-top-first', $c); 
     223                        $menu[$order][4] = add_css_class('menu-top-first', $c); 
    224224                        $first = false; 
    225225                } 
    226226 
    227227                if ( $mc == $i ) { // last item 
    228228                        $c = $menu[$order][4]; 
    229                         $menu[$order][4] = add_cssclass('menu-top-last', $c); 
     229                        $menu[$order][4] = add_css_class('menu-top-last', $c); 
    230230                } 
    231231 
    232232                $lastorder = $order; 
  • wp-admin/admin-header.php

     
    9191<div id="wpcontent"> 
    9292<div id="wphead"> 
    9393<?php 
    94 $blog_name = get_bloginfo('name', 'display'); 
     94$blog_name = get_blog_info('name', 'display'); 
    9595if ( '' == $blog_name ) { 
    9696        $blog_name = '&nbsp;'; 
    9797} else { 
     
    110110} 
    111111?> 
    112112 
    113 <img id="header-logo" src="../wp-includes/images/blank.gif" alt="" width="32" height="32" /> <h1 <?php echo $title_class ?>><a href="<?php echo trailingslashit( get_bloginfo('url') ); ?>" title="<?php _e('Visit site') ?>"><?php echo $blog_name ?> <span>&larr; <?php _e('Visit site') ?></span></a></h1> 
     113<img id="header-logo" src="../wp-includes/images/blank.gif" alt="" width="32" height="32" /> <h1 <?php echo $title_class ?>><a href="<?php echo trailingslashit( get_blog_info('url') ); ?>" title="<?php _e('Visit site') ?>"><?php echo $blog_name ?> <span>&larr; <?php _e('Visit site') ?></span></a></h1> 
    114114 
    115115<div id="wphead-info"> 
    116116<div id="user_info"> 
  • wp-admin/user-edit.php

     
    9797        } else { 
    9898                wp_die(__('Invalid user ID.')); 
    9999        } 
    100 } elseif ( !get_userdata($user_id) ) { 
     100} elseif ( !get_user_data($user_id) ) { 
    101101        wp_die( __('Invalid user ID.') ); 
    102102} 
    103103 
  • wp-admin/page.php

     
    114114 
    115115        if ( current_user_can('edit_page', $page_ID) ) { 
    116116                if ( $last = wp_check_post_lock( $post->ID ) ) { 
    117                         $last_user = get_userdata( $last ); 
     117                        $last_user = get_user_data( $last ); 
    118118                        $last_user_name = $last_user ? $last_user->display_name : __('Somebody'); 
    119119                        $message = sprintf( __( 'Warning: %s is currently editing this page' ), wp_specialchars( $last_user_name ) ); 
    120120                        $message = str_replace( "'", "\'", "<div class='error'><p>$message</p></div>" ); 
  • wp-admin/export.php

     
    4141<?php 
    4242$authors = $wpdb->get_col( "SELECT post_author FROM $wpdb->posts GROUP BY post_author" ); 
    4343foreach ( $authors as $id ) { 
    44         $o = get_userdata( $id ); 
     44        $o = get_user_data( $id ); 
    4545        echo "<option value='$o->ID'>$o->display_name</option>"; 
    4646} 
    4747?> 
  • wp-admin/edit-pages.php

     
    282282                // Make sure comments, post, and post_author are cached 
    283283                update_comment_cache($comments); 
    284284                $post = get_post($id); 
    285                 $authordata = get_userdata($post->post_author); 
     285                $authordata = get_user_data($post->post_author); 
    286286        ?> 
    287287 
    288288<br class="clear" /> 
  • wp-admin/themes.php

     
    3131<?php if ( ! validate_current_theme() ) : ?> 
    3232<div id="message1" class="updated fade"><p><?php _e('The active theme is broken.  Reverting to the default theme.'); ?></p></div> 
    3333<?php elseif ( isset($_GET['activated']) ) : ?> 
    34 <div id="message2" class="updated fade"><p><?php printf(__('New theme activated. <a href="%s">Visit site</a>'), get_bloginfo('url') . '/'); ?></p></div> 
     34<div id="message2" class="updated fade"><p><?php printf(__('New theme activated. <a href="%s">Visit site</a>'), get_blog_info('url') . '/'); ?></p></div> 
    3535<?php endif; ?> 
    3636 
    3737<?php 
  • wp-admin/categories.php

     
    4040        if ( !current_user_can('manage_categories') ) 
    4141                wp_die(__('Cheatin&#8217; uh?')); 
    4242 
    43         $cat_name = get_catname($cat_ID); 
     43        $cat_name = get_cat_name($cat_ID); 
    4444 
    4545        // Don't delete the default cats. 
    4646    if ( $cat_ID == get_option('default_category') ) 
     
    6060                wp_die( __('You are not allowed to delete categories.') ); 
    6161 
    6262        foreach ( (array) $_GET['delete'] as $cat_ID ) { 
    63                 $cat_name = get_catname($cat_ID); 
     63                $cat_name = get_cat_name($cat_ID); 
    6464 
    6565                // Don't delete the default cats. 
    6666                if ( $cat_ID == get_option('default_category') ) 
     
    233233</form> 
    234234 
    235235<div class="form-wrap"> 
    236 <p><?php printf(__('<strong>Note:</strong><br />Deleting a category does not delete the posts in that category. Instead, posts that were only assigned to the deleted category are set to the category <strong>%s</strong>.'), apply_filters('the_category', get_catname(get_option('default_category')))) ?></p> 
     236<p><?php printf(__('<strong>Note:</strong><br />Deleting a category does not delete the posts in that category. Instead, posts that were only assigned to the deleted category are set to the category <strong>%s</strong>.'), apply_filters('the_category', get_cat_name(get_option('default_category')))) ?></p> 
    237237<p><?php printf(__('Categories can be selectively converted to tags using the <a href="%s">category to tag converter</a>.'), 'admin.php?import=wp-cat2tag') ?></p> 
    238238</div> 
    239239 
  • wp-feed.php

     
    77 */ 
    88 
    99require( './wp-load.php' ); 
    10 wp_redirect( get_bloginfo( 'rss2_url' ), 301 ); 
     10wp_redirect( get_blog_info( 'rss2_url' ), 301 ); 
    1111 
    1212?> 
     13 No newline at end of file