Ticket #8779: standardized_function_names.2.diff
| File standardized_function_names.2.diff, 49.0 KB (added by , 17 years ago) |
|---|
-
wp-login.php
106 106 $errors->add('invalid_email', __('<strong>ERROR</strong>: There is no user registered with that email address.')); 107 107 } else { 108 108 $login = trim($_POST['user_login']); 109 $user_data = get_user databylogin($login);109 $user_data = get_user_data_by_login($login); 110 110 } 111 111 112 112 do_action('lostpassword_post'); … … 252 252 253 253 nocache_headers(); 254 254 255 header('Content-Type: '.get_blog info('html_type').'; charset='.get_bloginfo('charset'));255 header('Content-Type: '.get_blog_info('html_type').'; charset='.get_blog_info('charset')); 256 256 257 257 if ( defined('RELOCATE') ) { // Move flag is set 258 258 if ( isset( $_SERVER['PATH_INFO'] ) && ($_SERVER['PATH_INFO'] != $_SERVER['PHP_SELF']) ) … … 323 323 324 324 </div> 325 325 326 <p id="backtoblog"><a href="<?php bloginfo('url'); ?>/" title="<?php _e('Are you lost?') ?>"><?php printf(__('← Back to %s'), get_blog info('title', 'display' )); ?></a></p>326 <p id="backtoblog"><a href="<?php bloginfo('url'); ?>/" title="<?php _e('Are you lost?') ?>"><?php printf(__('← Back to %s'), get_blog_info('title', 'display' )); ?></a></p> 327 327 328 328 <script type="text/javascript"> 329 329 try{document.getElementById('user_login').focus();}catch(e){} … … 391 391 392 392 </div> 393 393 394 <p id="backtoblog"><a href="<?php bloginfo('url'); ?>/" title="<?php _e('Are you lost?') ?>"><?php printf(__('← Back to %s'), get_blog info('title', 'display' )); ?></a></p>394 <p id="backtoblog"><a href="<?php bloginfo('url'); ?>/" title="<?php _e('Are you lost?') ?>"><?php printf(__('← Back to %s'), get_blog_info('title', 'display' )); ?></a></p> 395 395 396 396 <script type="text/javascript"> 397 397 try{document.getElementById('user_login').focus();}catch(e){} … … 408 408 // If the user wants ssl but the session is not ssl, force a secure cookie. 409 409 if ( !empty($_POST['log']) && !force_ssl_admin() ) { 410 410 $user_name = sanitize_user($_POST['log']); 411 if ( $user = get_user databylogin($user_name) ) {411 if ( $user = get_user_data_by_login($user_name) ) { 412 412 if ( get_user_option('use_ssl', $user->ID) ) { 413 413 $secure_cookie = true; 414 414 force_ssl_admin(true); … … 494 494 495 495 </div> 496 496 497 <p id="backtoblog"><a href="<?php bloginfo('url'); ?>/" title="<?php _e('Are you lost?') ?>"><?php printf(__('← Back to %s'), get_blog info('title', 'display' )); ?></a></p>497 <p id="backtoblog"><a href="<?php bloginfo('url'); ?>/" title="<?php _e('Are you lost?') ?>"><?php printf(__('← Back to %s'), get_blog_info('title', 'display' )); ?></a></p> 498 498 499 499 <script type="text/javascript"> 500 500 <?php if ( $user_login ) { ?> -
wp-rdf.php
7 7 */ 8 8 9 9 require( './wp-load.php' ); 10 wp_redirect( get_blog info( 'rdf_url' ), 301 );10 wp_redirect( get_blog_info( 'rdf_url' ), 301 ); 11 11 12 12 ?> 13 No newline at end of file -
wp-app.php
245 245 function AtomServer() { 246 246 247 247 $this->script_name = array_pop(explode('/',$_SERVER['SCRIPT_NAME'])); 248 $this->app_base = get_blog info('url') . '/' . $this->script_name . '/';248 $this->app_base = get_blog_info('url') . '/' . $this->script_name . '/'; 249 249 if ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) { 250 250 $this->app_base = preg_replace( '/^http:\/\//', 'https://', $this->app_base ); 251 251 } … … 356 356 $accepted_media_types = $accepted_media_types . "<accept>" . $med . "</accept>"; 357 357 } 358 358 $atom_prefix="atom"; 359 $atom_blogname=get_blog info('name');359 $atom_blogname=get_blog_info('name'); 360 360 $service_doc = <<<EOD 361 361 <service xmlns="$this->ATOMPUB_NS" xmlns:$atom_prefix="$this->ATOM_NS"> 362 362 <workspace> … … 389 389 if( !current_user_can( 'edit_posts' ) ) 390 390 $this->auth_required( __( 'Sorry, you do not have the right to access this blog.' ) ); 391 391 392 $home = attribute_escape(get_blog info_rss('home'));392 $home = attribute_escape(get_blog_info_rss('home')); 393 393 394 394 $categories = ""; 395 395 $cats = get_categories("hierarchical=0&hide_empty=0"); … … 1092 1092 $self_page = $page > 1 ? $page : NULL; 1093 1093 ?><feed xmlns="<?php echo $this->ATOM_NS ?>" xmlns:app="<?php echo $this->ATOMPUB_NS ?>" xml:lang="<?php echo get_option('rss_language'); ?>"> 1094 1094 <id><?php $this->the_entries_url() ?></id> 1095 <updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_last postmodified('GMT')); ?></updated>1095 <updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_last_post_modified('GMT')); ?></updated> 1096 1096 <title type="text"><?php bloginfo_rss('name') ?></title> 1097 1097 <subtitle type="text"><?php bloginfo_rss("description") ?></subtitle> 1098 1098 <link rel="first" type="<?php echo $this->ATOM_CONTENT_TYPE ?>" href="<?php $this->the_entries_url() ?>" /> … … 1104 1104 <?php endif; ?> 1105 1105 <link rel="last" type="<?php echo $this->ATOM_CONTENT_TYPE ?>" href="<?php $this->the_entries_url($last_page) ?>" /> 1106 1106 <link rel="self" type="<?php echo $this->ATOM_CONTENT_TYPE ?>" href="<?php $this->the_entries_url($self_page) ?>" /> 1107 <rights type="text">Copyright <?php echo mysql2date('Y', get_last postdate('blog')); ?></rights>1107 <rights type="text">Copyright <?php echo mysql2date('Y', get_last_post_date('blog')); ?></rights> 1108 1108 <?php the_generator( 'atom' ); ?> 1109 1109 <?php if ( have_posts() ) { 1110 1110 while ( have_posts() ) { … … 1542 1542 $post = NULL; 1543 1543 break; 1544 1544 case $this->ENTRIES_PATH: 1545 $wp_last_modified = mysql2date('D, d M Y H:i:s', get_last postmodified('GMT'), 0).' GMT';1545 $wp_last_modified = mysql2date('D, d M Y H:i:s', get_last_post_modified('GMT'), 0).' GMT'; 1546 1546 break; 1547 1547 default: 1548 1548 return; -
wp-includes/feed-rss2.php
25 25 <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" /> 26 26 <link><?php bloginfo_rss('url') ?></link> 27 27 <description><?php bloginfo_rss("description") ?></description> 28 <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_last postmodified('GMT'), false); ?></pubDate>28 <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_last_post_modified('GMT'), false); ?></pubDate> 29 29 <?php the_generator( 'rss2' ); ?> 30 30 <language><?php echo get_option('rss_language'); ?></language> 31 31 <sy:updatePeriod><?php echo apply_filters( 'rss_update_period', 'hourly' ); ?></sy:updatePeriod> -
wp-includes/feed-atom.php
20 20 <title type="text"><?php bloginfo_rss('name'); wp_title_rss(); ?></title> 21 21 <subtitle type="text"><?php bloginfo_rss("description") ?></subtitle> 22 22 23 <updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_last postmodified('GMT')); ?></updated>23 <updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_last_post_modified('GMT')); ?></updated> 24 24 <?php the_generator( 'atom' ); ?> 25 25 26 26 <link rel="alternate" type="text/html" href="<?php bloginfo_rss('home') ?>" /> -
wp-includes/category.php
173 173 174 174 175 175 /** 176 * Retrieve the category name by the category ID.177 *178 * @since 0.71179 * @deprecated Use get_cat_name()180 * @see get_cat_name() get_catname() is deprecated in favor of get_cat_name().181 *182 * @param int $cat_ID Category ID183 * @return string category name184 */185 function get_catname( $cat_ID ) {186 return get_cat_name( $cat_ID );187 }188 189 190 /**191 176 * Retrieve the name of a category from its ID. 192 177 * 193 178 * @since 1.0.0 -
wp-includes/update.php
51 51 52 52 $options = array( 53 53 'timeout' => 3, 54 'user-agent' => 'WordPress/' . $wp_version . '; ' . get_blog info( 'url' )54 'user-agent' => 'WordPress/' . $wp_version . '; ' . get_blog_info( 'url' ) 55 55 ); 56 56 57 57 $response = wp_remote_get($url, $options); … … 152 152 $options = array( 153 153 'timeout' => 3, 154 154 'body' => array( 'plugins' => serialize( $to_send ) ), 155 'user-agent' => 'WordPress/' . $wp_version . '; ' . get_blog info( 'url' )155 'user-agent' => 'WordPress/' . $wp_version . '; ' . get_blog_info( 'url' ) 156 156 ); 157 157 158 158 $raw_response = wp_remote_post('http://api.wordpress.org/plugins/update-check/1.0/', $options); … … 225 225 $options = array( 226 226 'timeout' => 3, 227 227 'body' => array( 'themes' => serialize( $themes ) ), 228 'user-agent' => 'WordPress/' . $wp_version . '; ' . get_blog info( 'url' )228 'user-agent' => 'WordPress/' . $wp_version . '; ' . get_blog_info( 'url' ) 229 229 ); 230 230 231 231 $raw_response = wp_remote_post( 'http://api.wordpress.org/themes/update-check/1.0/', $options ); -
wp-includes/post.php
594 594 $meta_cache = wp_cache_get($post_id, 'post_meta'); 595 595 596 596 if ( !$meta_cache ) { 597 update_post meta_cache($post_id);597 update_post_meta_cache($post_id); 598 598 $meta_cache = wp_cache_get($post_id, 'post_meta'); 599 599 } 600 600 … … 699 699 $post_id = (int) $post_id; 700 700 701 701 if ( ! wp_cache_get($post_id, 'post_meta') ) 702 update_post meta_cache($post_id);702 update_post_meta_cache($post_id); 703 703 704 704 return wp_cache_get($post_id, 'post_meta'); 705 705 } … … 2183 2183 foreach ( $post_authors as $post_author ) { 2184 2184 //Do we have an author id or an author login? 2185 2185 if ( 0 == intval($post_author) ) { 2186 $post_author = get_user databylogin($post_author);2186 $post_author = get_user_data_by_login($post_author); 2187 2187 if ( empty($post_author) ) 2188 2188 continue; 2189 2189 if ( empty($post_author->ID) ) … … 2273 2273 * @return bool True on success, false on failure. 2274 2274 */ 2275 2275 function is_local_attachment($url) { 2276 if (strpos($url, get_blog info('url')) === false)2276 if (strpos($url, get_blog_info('url')) === false) 2277 2277 return false; 2278 if (strpos($url, get_blog info('url') . '/?attachment_id=') !== false)2278 if (strpos($url, get_blog_info('url') . '/?attachment_id=') !== false) 2279 2279 return true; 2280 2280 if ( $id = url_to_postid($url) ) { 2281 2281 $post = & get_post($id); … … 2874 2874 * server time. The 'blog' value is the date when the last post was posted. The 2875 2875 * 'gmt' is when the last post was posted in GMT formatted date. 2876 2876 * 2877 * @since 0.712877 * @since 2.8 2878 2878 * 2879 2879 * @uses $wpdb 2880 2880 * @uses $blog_id … … 2886 2886 * @param string $timezone The location to get the time. Can be 'gmt', 'blog', or 'server'. 2887 2887 * @return string The date of the last post. 2888 2888 */ 2889 function get_last postdate($timezone = 'server') {2889 function get_last_post_date($timezone = 'server') { 2890 2890 global $cache_lastpostdate, $wpdb, $blog_id; 2891 2891 $add_seconds_server = date('Z'); 2892 2892 if ( !isset($cache_lastpostdate[$blog_id][$timezone]) ) { … … 2915 2915 * server time. The 'blog' value is just when the last post was modified. The 2916 2916 * 'gmt' is when the last post was modified in GMT time. 2917 2917 * 2918 * @since 1.2.02918 * @since 2.8 2919 2919 * @uses $wpdb 2920 2920 * @uses $blog_id 2921 2921 * @uses apply_filters() Calls 'get_lastpostmodified' filter … … 2925 2925 * @param string $timezone The location to get the time. Can be 'gmt', 'blog', or 'server'. 2926 2926 * @return string The date the post was last modified. 2927 2927 */ 2928 function get_last postmodified($timezone = 'server') {2928 function get_last_post_modified($timezone = 'server') { 2929 2929 global $cache_lastpostmodified, $wpdb, $blog_id; 2930 2930 $add_seconds_server = date('Z'); 2931 2931 if ( !isset($cache_lastpostmodified[$blog_id][$timezone]) ) { … … 2940 2940 $lastpostmodified = $wpdb->get_var("SELECT DATE_ADD(post_modified_gmt, INTERVAL '$add_seconds_server' SECOND) FROM $wpdb->posts WHERE post_status = 'publish' ORDER BY post_modified_gmt DESC LIMIT 1"); 2941 2941 break; 2942 2942 } 2943 $lastpostdate = get_last postdate($timezone);2943 $lastpostdate = get_last_post_date($timezone); 2944 2944 if ( $lastpostdate > $lastpostmodified ) { 2945 2945 $lastpostmodified = $lastpostdate; 2946 2946 } … … 3055 3055 * @uses $wpdb 3056 3056 * @uses update_post_cache() 3057 3057 * @uses update_object_term_cache() 3058 * @uses update_post meta_cache()3058 * @uses update_post_meta_cache() 3059 3059 * 3060 3060 * @param array $posts Array of Post objects 3061 3061 */ … … 3073 3073 3074 3074 update_object_term_cache($post_ids, 'post'); 3075 3075 3076 update_post meta_cache($post_ids);3076 update_post_meta_cache($post_ids); 3077 3077 } 3078 3078 3079 3079 /** … … 3085 3085 * 3086 3086 * @package WordPress 3087 3087 * @subpackage Cache 3088 * @since 2. 1.03088 * @since 2.8 3089 3089 * 3090 3090 * @uses $wpdb 3091 3091 * 3092 3092 * @param array $post_ids List of post IDs. 3093 3093 * @return bool|array Returns false if there is nothing to update or an array of metadata. 3094 3094 */ 3095 function update_post meta_cache($post_ids) {3095 function update_post_meta_cache($post_ids) { 3096 3096 global $wpdb; 3097 3097 3098 3098 if ( empty( $post_ids ) ) -
wp-includes/js/tinymce/wp-mce-help.php
7 7 8 8 /** @ignore */ 9 9 require_once('../../../wp-load.php'); 10 header('Content-Type: text/html; charset=' . get_blog info('charset'));10 header('Content-Type: text/html; charset=' . get_blog_info('charset')); 11 11 ?> 12 12 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 13 13 <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>> … … 168 168 </head> 169 169 <body> 170 170 171 <div id="wphead"><h1><?php echo get_blog info('blogtitle'); ?></h1></div>171 <div id="wphead"><h1><?php echo get_blog_info('blogtitle'); ?></h1></div> 172 172 173 173 <ul id="tabs"> 174 174 <li><a id="tab1" href="javascript:flipTab(1)" title="<?php _e('Basics of Rich Editing') ?>" accesskey="1" tabindex="1" class="current"><?php _e('Basics') ?></a></li> … … 240 240 <h2><?php _e('About TinyMCE'); ?></h2> 241 241 242 242 <p><?php _e('Version:'); ?> <span id="version"></span> (<span id="date"></span>)</p> 243 <p><?php printf(__('TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under %sLGPL</a> by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.'), '<a href="'.get_blog info('url').'/wp-includes/js/tinymce/license.txt" target="_blank" title="'.__('GNU Library General Public Licence').'">') ?></p>243 <p><?php printf(__('TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under %sLGPL</a> by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.'), '<a href="'.get_blog_info('url').'/wp-includes/js/tinymce/license.txt" target="_blank" title="'.__('GNU Library General Public Licence').'">') ?></p> 244 244 <p><?php _e('Copyright © 2003-2007, <a href="http://www.moxiecode.com" target="_blank">Moxiecode Systems AB</a>, All rights reserved.') ?></p> 245 245 <p><?php _e('For more information about this software visit the <a href="http://tinymce.moxiecode.com" target="_blank">TinyMCE website</a>.') ?></p> 246 246 -
wp-includes/theme.php
1051 1051 * 1052 1052 * @return string 1053 1053 */ 1054 function get_header_text color() {1054 function get_header_text_color() { 1055 1055 return get_theme_mod('header_textcolor', HEADER_TEXTCOLOR); 1056 1056 } 1057 1057 … … 1061 1061 * @since 2.1.0 1062 1062 */ 1063 1063 function header_textcolor() { 1064 echo get_header_text color();1064 echo get_header_text_color(); 1065 1065 } 1066 1066 1067 1067 /** -
wp-includes/comment.php
263 263 /** 264 264 * The date the last comment was modified. 265 265 * 266 * @since 1.5.0266 * @since 2.8 267 267 * @uses $wpdb 268 268 * @global array $cache_lastcommentmodified 269 269 * … … 271 271 * or 'server' locations. 272 272 * @return string Last comment modified date. 273 273 */ 274 function get_last commentmodified($timezone = 'server') {274 function get_last_comment_modified($timezone = 'server') { 275 275 global $cache_lastcommentmodified, $wpdb; 276 276 277 277 if ( isset($cache_lastcommentmodified[$timezone]) ) … … 416 416 do_action( 'check_comment_flood', $comment_author_IP, $comment_author_email, $comment_date_gmt ); 417 417 418 418 if ( $user_id ) { 419 $userdata = get_user data($user_id);419 $userdata = get_user_data($user_id); 420 420 $user = new WP_User($user_id); 421 421 $post_author = $wpdb->get_var($wpdb->prepare("SELECT post_author FROM $wpdb->posts WHERE ID = %d LIMIT 1", $comment_post_ID)); 422 422 } … … 1527 1527 // when set to true, this outputs debug messages by itself 1528 1528 $client->debug = false; 1529 1529 $home = trailingslashit( get_option('home') ); 1530 if ( !$client->query('weblogUpdates.extendedPing', get_option('blogname'), $home, get_blog info('rss2_url') ) ) // then try a normal ping1530 if ( !$client->query('weblogUpdates.extendedPing', get_option('blogname'), $home, get_blog_info('rss2_url') ) ) // then try a normal ping 1531 1531 $client->query('weblogUpdates.ping', get_option('blogname'), $home); 1532 1532 } 1533 1533 -
wp-includes/feed-rss.php
16 16 <title><?php bloginfo_rss('name'); wp_title_rss(); ?></title> 17 17 <link><?php bloginfo_rss('url') ?></link> 18 18 <description><?php bloginfo_rss('description') ?></description> 19 <lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_last postmodified('GMT'), false); ?></lastBuildDate>19 <lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_last_post_modified('GMT'), false); ?></lastBuildDate> 20 20 <docs>http://backend.userland.com/rss092</docs> 21 21 <language><?php echo get_option('rss_language'); ?></language> 22 22 <?php do_action('rss_head'); ?> -
wp-includes/functions.php
207 207 /** 208 208 * Get the week start and end from the datetime or date string from mysql. 209 209 * 210 * @since 0.71210 * @since 2.8 211 211 * 212 212 * @param string $mysqlstring Date or datetime field type from mysql. 213 213 * @param int $start_of_week Optional. Start of the week as an integer. 214 214 * @return array Keys are 'start' and 'end'. 215 215 */ 216 function get_week startend( $mysqlstring, $start_of_week = '' ) {216 function get_week_start_end( $mysqlstring, $start_of_week = '' ) { 217 217 $my = substr( $mysqlstring, 0, 4 ); // Mysql string Year 218 218 $mm = substr( $mysqlstring, 8, 2 ); // Mysql string Month 219 219 $md = substr( $mysqlstring, 5, 2 ); // Mysql string day … … 428 428 * 429 429 * it is called. 430 430 * 431 * @since 1.0.0431 * @since 2.8 432 432 * @package WordPress 433 433 * @subpackage Option 434 434 * @uses apply_filters() Calls 'pre_option_$optionname' hook with option value as parameter. … … 436 436 * 437 437 * @return array List of all options. 438 438 */ 439 function get_all options() {439 function get_all_options() { 440 440 global $wpdb; 441 441 $show = $wpdb->hide_errors(); 442 442 if ( !$options = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options WHERE autoload = 'yes'" ) ) … … 457 457 /** 458 458 * Loads and caches all autoloaded options, if available or all options. 459 459 * 460 * This is different from get_all options(), in that this function will cache the460 * This is different from get_all_options(), in that this function will cache the 461 461 * options and will return the cached options when called again. 462 462 * 463 463 * @since 2.2.0 … … 788 788 if ( ! $user = wp_get_current_user() ) 789 789 return; 790 790 791 delete_user meta( $user->ID, 'user-settings' );791 delete_user_meta( $user->ID, 'user-settings' ); 792 792 setcookie('wp-settings-'.$user->ID, ' ', time() - 31536000, SITECOOKIEPATH); 793 793 } 794 794 … … 1417 1417 */ 1418 1418 function cache_javascript_headers() { 1419 1419 $expiresOffset = 864000; // 10 days 1420 header( "Content-Type: text/javascript; charset=" . get_blog info( 'charset' ) );1420 header( "Content-Type: text/javascript; charset=" . get_blog_info( 'charset' ) ); 1421 1421 header( "Vary: Accept-Encoding" ); // Handle proxies 1422 1422 header( "Expires: " . gmdate( "D, d M Y H:i:s", time() + $expiresOffset ) . " GMT" ); 1423 1423 } … … 2128 2128 $trans['update']['attachment'] = array( __( 'Your attempt to edit this attachment: "%s" has failed.' ), 'get_the_title' ); 2129 2129 2130 2130 $trans['add']['category'] = array( __( 'Your attempt to add this category has failed.' ), false ); 2131 $trans['delete']['category'] = array( __( 'Your attempt to delete this category: "%s" has failed.' ), 'get_cat name' );2132 $trans['update']['category'] = array( __( 'Your attempt to edit this category: "%s" has failed.' ), 'get_cat name' );2131 $trans['delete']['category'] = array( __( 'Your attempt to delete this category: "%s" has failed.' ), 'get_cat_name' ); 2132 $trans['update']['category'] = array( __( 'Your attempt to edit this category: "%s" has failed.' ), 'get_cat_name' ); 2133 2133 2134 2134 $trans['delete']['comment'] = array( __( 'Your attempt to delete this comment: "%s" has failed.' ), 'use_id' ); 2135 2135 $trans['unapprove']['comment'] = array( __( 'Your attempt to unapprove this comment: "%s" has failed.' ), 'use_id' ); … … 2168 2168 $trans['edit']['theme'] = array( __( 'Your attempt to edit this theme file: "%s" has failed.' ), 'use_id' ); 2169 2169 $trans['switch']['theme'] = array( __( 'Your attempt to switch to this theme: "%s" has failed.' ), 'use_id' ); 2170 2170 2171 $trans['log']['out'] = array( sprintf( __( 'You are attempting to log out of %s' ), get_blog info( 'sitename' ) ), false );2171 $trans['log']['out'] = array( sprintf( __( 'You are attempting to log out of %s' ), get_blog_info( 'sitename' ) ), false ); 2172 2172 2173 2173 if ( isset( $trans[$verb][$noun] ) ) { 2174 2174 if ( !empty( $trans[$verb][$noun][1] ) ) { … … 2254 2254 2255 2255 if ( defined( 'WP_SITEURL' ) && '' != WP_SITEURL ) 2256 2256 $admin_dir = WP_SITEURL . '/wp-admin/'; 2257 elseif ( function_exists( 'get_blog info' ) && '' != get_bloginfo( 'wpurl' ) )2258 $admin_dir = get_blog info( 'wpurl' ) . '/wp-admin/';2257 elseif ( function_exists( 'get_blog_info' ) && '' != get_blog_info( 'wpurl' ) ) 2258 $admin_dir = get_blog_info( 'wpurl' ) . '/wp-admin/'; 2259 2259 elseif ( strpos( $_SERVER['PHP_SELF'], 'wp-admin' ) !== false ) 2260 2260 $admin_dir = ''; 2261 2261 else -
wp-includes/registration.php
14 14 * @return null|int The user's ID on success, and null on failure. 15 15 */ 16 16 function username_exists( $username ) { 17 if ( $user = get_user databylogin( $username ) ) {17 if ( $user = get_user_data_by_login( $username ) ) { 18 18 return $user->ID; 19 19 } else { 20 20 return null; … … 109 109 if ( !empty($ID) ) { 110 110 $ID = (int) $ID; 111 111 $update = true; 112 $old_user_data = get_user data($ID);112 $old_user_data = get_user_data($ID); 113 113 } else { 114 114 $update = false; 115 115 // Hash the password … … 187 187 $user_id = (int) $wpdb->insert_id; 188 188 } 189 189 190 update_user meta( $user_id, 'first_name', $first_name);191 update_user meta( $user_id, 'last_name', $last_name);192 update_user meta( $user_id, 'nickname', $nickname );193 update_user meta( $user_id, 'description', $description );194 update_user meta( $user_id, 'jabber', $jabber );195 update_user meta( $user_id, 'aim', $aim );196 update_user meta( $user_id, 'yim', $yim );197 update_user meta( $user_id, 'rich_editing', $rich_editing);198 update_user meta( $user_id, 'comment_shortcuts', $comment_shortcuts);199 update_user meta( $user_id, 'admin_color', $admin_color);200 update_user meta( $user_id, 'use_ssl', $use_ssl);190 update_user_meta( $user_id, 'first_name', $first_name); 191 update_user_meta( $user_id, 'last_name', $last_name); 192 update_user_meta( $user_id, 'nickname', $nickname ); 193 update_user_meta( $user_id, 'description', $description ); 194 update_user_meta( $user_id, 'jabber', $jabber ); 195 update_user_meta( $user_id, 'aim', $aim ); 196 update_user_meta( $user_id, 'yim', $yim ); 197 update_user_meta( $user_id, 'rich_editing', $rich_editing); 198 update_user_meta( $user_id, 'comment_shortcuts', $comment_shortcuts); 199 update_user_meta( $user_id, 'admin_color', $admin_color); 200 update_user_meta( $user_id, 'use_ssl', $use_ssl); 201 201 202 202 if ( $update && isset($role) ) { 203 203 $user = new WP_User($user_id); … … 243 243 $ID = (int) $userdata['ID']; 244 244 245 245 // First, get all of the original fields 246 $user = get_user data($ID);246 $user = get_user_data($ID); 247 247 248 248 // Escape data pulled from DB. 249 249 $user = add_magic_quotes(get_object_vars($user)); -
wp-includes/comment-template.php
23 23 global $comment; 24 24 if ( empty($comment->comment_author) ) { 25 25 if (!empty($comment->user_id)){ 26 $user=get_user data($comment->user_id);26 $user=get_user_data($comment->user_id); 27 27 $author=$user->user_login; 28 28 } else { 29 29 $author = __('Anonymous'); … … 290 290 $classes[] = ( empty( $comment->comment_type ) ) ? 'comment' : $comment->comment_type; 291 291 292 292 // If the comment author has an id (registered), then print the log in name 293 if ( $comment->user_id > 0 && $user = get_user data($comment->user_id) ) {293 if ( $comment->user_id > 0 && $user = get_user_data($comment->user_id) ) { 294 294 // For all registered users, 'byuser' 295 295 $classes[] = 'byuser comment-author-' . $user->user_nicename; 296 296 // For comment authors who are the author of the post -
wp-includes/feed-rdf.php
23 23 <title><?php bloginfo_rss('name'); wp_title_rss(); ?></title> 24 24 <link><?php bloginfo_rss('url') ?></link> 25 25 <description><?php bloginfo_rss('description') ?></description> 26 <dc:date><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_last postmodified('GMT'), false); ?></dc:date>26 <dc:date><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_last_post_modified('GMT'), false); ?></dc:date> 27 27 <?php the_generator( 'rdf' ); ?> 28 28 <sy:updatePeriod>hourly</sy:updatePeriod> 29 29 <sy:updateFrequency>1</sy:updateFrequency> -
wp-includes/user.php
114 114 /** 115 115 * Number of posts user has written. 116 116 * 117 * @since 0.71117 * @since 2.8 118 118 * @uses $wpdb WordPress database object for queries. 119 119 * 120 120 * @param int $userid User ID. 121 121 * @return int Amount of posts user has written. 122 122 */ 123 function get_user numposts($userid) {123 function get_user_num_posts($userid) { 124 124 global $wpdb; 125 125 $userid = (int) $userid; 126 126 $count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = %d AND post_type = 'post' AND ", $userid) . get_private_posts_cap_sql('post')); … … 178 178 if ( empty($user) ) 179 179 $user = wp_get_current_user(); 180 180 else 181 $user = get_user data($user);181 $user = get_user_data($user); 182 182 183 183 if ( isset( $user->{$wpdb->prefix . $option} ) ) // Blog specific 184 184 $result = $user->{$wpdb->prefix . $option}; … … 212 212 global $wpdb; 213 213 if ( !$global ) 214 214 $option_name = $wpdb->prefix . $option_name; 215 return update_user meta( $user_id, $option_name, $newvalue );215 return update_user_meta( $user_id, $option_name, $newvalue ); 216 216 } 217 217 218 218 /** … … 243 243 /** 244 244 * Remove user meta data. 245 245 * 246 * @since 2. 0.0246 * @since 2.8 247 247 * @uses $wpdb WordPress database object for queries. 248 248 * 249 249 * @param int $user_id User ID. … … 251 251 * @param mixed $meta_value Metadata value. 252 252 * @return bool True deletion completed and false if user_id is not a number. 253 253 */ 254 function delete_user meta( $user_id, $meta_key, $meta_value = '' ) {254 function delete_user_meta( $user_id, $meta_key, $meta_value = '' ) { 255 255 global $wpdb; 256 256 if ( !is_numeric( $user_id ) ) 257 257 return false; … … 279 279 * one item to be returned, which be that single item type. If there is more 280 280 * than one metadata value, then it will be list of metadata values. 281 281 * 282 * @since 2. 0.0282 * @since 2.8 283 283 * @uses $wpdb WordPress database object for queries. 284 284 * 285 285 * @param int $user_id User ID 286 286 * @param string $meta_key Optional. Metadata key. 287 287 * @return mixed 288 288 */ 289 function get_user meta( $user_id, $meta_key = '') {289 function get_user_meta( $user_id, $meta_key = '') { 290 290 global $wpdb; 291 291 $user_id = (int) $user_id; 292 292 … … 329 329 * 330 330 * Will remove the metadata, if the meta value is empty. 331 331 * 332 * @since 2. 0.0332 * @since 2.8 333 333 * @uses $wpdb WordPress database object for queries 334 334 * 335 335 * @param int $user_id User ID … … 337 337 * @param mixed $meta_value Metadata value. 338 338 * @return bool True on successful update, false on failure. 339 339 */ 340 function update_user meta( $user_id, $meta_key, $meta_value ) {340 function update_user_meta( $user_id, $meta_key, $meta_value ) { 341 341 global $wpdb; 342 342 if ( !is_numeric( $user_id ) ) 343 343 return false; … … 349 349 $meta_value = maybe_serialize($meta_value); 350 350 351 351 if (empty($meta_value)) { 352 return delete_user meta($user_id, $meta_key);352 return delete_user_meta($user_id, $meta_key); 353 353 } 354 354 355 355 $cur = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s", $user_id, $meta_key) ); -
wp-includes/feed-atom-comments.php
18 18 if ( is_singular() ) 19 19 printf(ent2ncr(__('Comments on: %s')), get_the_title_rss()); 20 20 elseif ( is_search() ) 21 printf(ent2ncr(__('Comments for %1$s searching on %2$s')), get_blog info_rss( 'name' ), attribute_escape(get_search_query()));21 printf(ent2ncr(__('Comments for %1$s searching on %2$s')), get_blog_info_rss( 'name' ), attribute_escape(get_search_query())); 22 22 else 23 printf(ent2ncr(__('Comments for %s')), get_blog info_rss( 'name' ) . get_wp_title_rss());23 printf(ent2ncr(__('Comments for %s')), get_blog_info_rss( 'name' ) . get_wp_title_rss()); 24 24 ?></title> 25 25 <subtitle type="text"><?php bloginfo_rss('description'); ?></subtitle> 26 26 27 <updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_last commentmodified('GMT')); ?></updated>27 <updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_last_comment_modified('GMT')); ?></updated> 28 28 <?php the_generator( 'atom' ); ?> 29 29 30 30 <?php if ( is_singular() ) { ?> -
wp-includes/query.php
2555 2555 $this->queried_object_id = (int) $this->post->ID; 2556 2556 } else if ($this->is_author) { 2557 2557 $author_id = (int) $this->get('author'); 2558 $author = get_user data($author_id);2558 $author = get_user_data($author_id); 2559 2559 $this->queried_object = $author; 2560 2560 $this->queried_object_id = $author_id; 2561 2561 } … … 2654 2654 2655 2655 $id = (int) $post->ID; 2656 2656 2657 $authordata = get_user data($post->post_author);2657 $authordata = get_user_data($post->post_author); 2658 2658 2659 2659 $day = mysql2date('d.m.y', $post->post_date); 2660 2660 $currentmonth = mysql2date('m', $post->post_date); -
wp-includes/link-template.php
128 128 129 129 $author = ''; 130 130 if ( strpos($permalink, '%author%') !== false ) { 131 $authordata = get_user data($post->post_author);131 $authordata = get_user_data($post->post_author); 132 132 $author = $authordata->user_nicename; 133 133 } 134 134 … … 264 264 } 265 265 266 266 if (! $link ) { 267 $link = get_blog info('url') . "/?attachment_id=$id";267 $link = get_blog_info('url') . "/?attachment_id=$id"; 268 268 } 269 269 270 270 return apply_filters('attachment_link', $link, $id); … … 995 995 $request = preg_replace('|^/+|', '', $request); 996 996 997 997 if ( !$wp_rewrite->using_permalinks() || is_admin() ) { 998 $base = trailingslashit( get_blog info( 'home' ) );998 $base = trailingslashit( get_blog_info( 'home' ) ); 999 999 1000 1000 if ( $pagenum > 1 ) { 1001 1001 $result = add_query_arg( 'paged', $pagenum, $base . $request ); … … 1017 1017 $request = preg_replace( '|^index\.php|', '', $request); 1018 1018 $request = ltrim($request, '/'); 1019 1019 1020 $base = trailingslashit( get_blog info( 'url' ) );1020 $base = trailingslashit( get_blog_info( 'url' ) ); 1021 1021 1022 1022 if ( $wp_rewrite->using_index_permalinks() && ( $pagenum > 1 || '' != $request ) ) 1023 1023 $base .= 'index.php/'; … … 1211 1211 /** 1212 1212 * Retrieve page numbers links. 1213 1213 * 1214 * @since 2. 7.01214 * @since 2.8 1215 1215 * 1216 1216 * @param int $pagenum Optional. Page number. 1217 1217 * @return string 1218 1218 */ 1219 function get_comments_page num_link( $pagenum = 1, $max_page = 0 ) {1219 function get_comments_page_num_link( $pagenum = 1, $max_page = 0 ) { 1220 1220 global $post, $wp_rewrite; 1221 1221 1222 1222 $pagenum = (int) $pagenum; … … 1275 1275 if ( empty($label) ) 1276 1276 $label = __('Newer Comments »'); 1277 1277 1278 return '<a href="' . clean_url( get_comments_page num_link( $nextpage, $max_page ) ) . '" ' . apply_filters( 'next_comments_link_attributes', '' ) . '>'. preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $label) .'</a>';1278 return '<a href="' . clean_url( get_comments_page_num_link( $nextpage, $max_page ) ) . '" ' . apply_filters( 'next_comments_link_attributes', '' ) . '>'. preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $label) .'</a>'; 1279 1279 } 1280 1280 1281 1281 /** … … 1312 1312 if ( empty($label) ) 1313 1313 $label = __('« Older Comments'); 1314 1314 1315 return '<a href="' . clean_url( get_comments_page num_link( $prevpage ) ) . '" ' . apply_filters( 'previous_comments_link_attributes', '' ) . '>' . preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $label) .'</a>';1315 return '<a href="' . clean_url( get_comments_page_num_link( $prevpage ) ) . '" ' . apply_filters( 'previous_comments_link_attributes', '' ) . '>' . preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $label) .'</a>'; 1316 1316 } 1317 1317 1318 1318 /** -
wp-includes/author-template.php
354 354 * 355 355 * @since 1.5 356 356 * @uses $post The current post in the Loop's DB object. 357 * @uses get_user numposts()357 * @uses get_user_num_posts() 358 358 * @return int The number of posts by the author. 359 359 */ 360 360 function get_the_author_posts() { 361 361 global $post; 362 return get_user numposts($post->post_author);362 return get_user_num_posts($post->post_author); 363 363 } 364 364 365 365 /** … … 414 414 $link = $file . '?author=' . $auth_ID; 415 415 } else { 416 416 if ( '' == $author_nicename ) { 417 $user = get_user data($author_id);417 $user = get_user_data($author_id); 418 418 if ( !empty($user->user_nicename) ) 419 419 $author_nicename = $user->user_nicename; 420 420 } … … 435 435 * @return string The author's display name. 436 436 */ 437 437 function get_author_name( $auth_id ) { 438 $authordata = get_user data( $auth_id );438 $authordata = get_user_data( $auth_id ); 439 439 return $authordata->display_name; 440 440 } 441 441 … … 480 480 } 481 481 482 482 foreach ( (array) $authors as $author ) { 483 $author = get_user data( $author->ID );483 $author = get_user_data( $author->ID ); 484 484 $posts = (isset($author_count[$author->ID])) ? $author_count[$author->ID] : 0; 485 485 $name = $author->display_name; 486 486 -
wp-includes/feed-rss2-comments.php
20 20 if ( is_singular() ) 21 21 printf(ent2ncr(__('Comments on: %s')), get_the_title_rss()); 22 22 elseif ( is_search() ) 23 printf(ent2ncr(__('Comments for %s searching on %s')), get_blog info_rss( 'name' ), attribute_escape($wp_query->query_vars['s']));23 printf(ent2ncr(__('Comments for %s searching on %s')), get_blog_info_rss( 'name' ), attribute_escape($wp_query->query_vars['s'])); 24 24 else 25 printf(ent2ncr(__('Comments for %s')), get_blog info_rss( 'name' ) . get_wp_title_rss());25 printf(ent2ncr(__('Comments for %s')), get_blog_info_rss( 'name' ) . get_wp_title_rss()); 26 26 ?></title> 27 27 <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" /> 28 28 <link><?php (is_single()) ? the_permalink_rss() : bloginfo_rss("url") ?></link> -
wp-includes/general-template.php
214 214 /** 215 215 * Display information about the blog. 216 216 * 217 * @see get_blog info() For possible values for the parameter.217 * @see get_blog_info() For possible values for the parameter. 218 218 * @since 0.71 219 219 * 220 220 * @param string $show What to display. 221 221 */ 222 222 function bloginfo($show='') { 223 echo get_blog info($show, 'display');223 echo get_blog_info($show, 'display'); 224 224 } 225 225 226 226 /** … … 246 246 * There are many other options and you should check the function contents: 247 247 * {@source 32 37} 248 248 * 249 * @since 0.71249 * @since 2.8 250 250 * 251 251 * @param string $show Blog info to retrieve. 252 252 * @param string $filter How to filter what is retrieved. 253 253 * @return string Mostly string values, might be empty. 254 254 */ 255 function get_blog info($show = '', $filter = 'raw') {255 function get_blog_info($show = '', $filter = 'raw') { 256 256 257 257 switch($show) { 258 258 case 'url' : … … 407 407 408 408 // If there's an author 409 409 if ( !empty($author) ) { 410 $title = get_user data($author);410 $title = get_user_data($author); 411 411 $title = $title->display_name; 412 412 } 413 413 if ( !empty($author_name) ) { … … 832 832 if ( $arcresult->week != $arc_w_last ) { 833 833 $arc_year = $arcresult->yr; 834 834 $arc_w_last = $arcresult->week; 835 $arc_week = get_week startend($arcresult->yyyymmdd, get_option('start_of_week'));835 $arc_week = get_week_start_end($arcresult->yyyymmdd, get_option('start_of_week')); 836 836 $arc_week_start = date_i18n($archive_week_start_date_format, $arc_week['start']); 837 837 $arc_week_end = date_i18n($archive_week_end_date_format, $arc_week['end']); 838 838 $url = sprintf('%1$s/%2$s%3$sm%4$s%5$s%6$sw%7$s%8$d', get_option('home'), '', '?', '=', $arc_year, '&', '=', $arcresult->week); … … 1375 1375 * @since 2.0.0 1376 1376 */ 1377 1377 function rsd_link() { 1378 echo '<link rel="EditURI" type="application/rsd+xml" title="RSD" href="' . get_blog info('wpurl') . "/xmlrpc.php?rsd\" />\n";1378 echo '<link rel="EditURI" type="application/rsd+xml" title="RSD" href="' . get_blog_info('wpurl') . "/xmlrpc.php?rsd\" />\n"; 1379 1379 } 1380 1380 1381 1381 /** … … 1386 1386 */ 1387 1387 function wlwmanifest_link() { 1388 1388 echo '<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="' 1389 . get_blog info('wpurl') . '/wp-includes/wlwmanifest.xml" /> ' . "\n";1389 . get_blog_info('wpurl') . '/wp-includes/wlwmanifest.xml" /> ' . "\n"; 1390 1390 } 1391 1391 1392 1392 /** … … 1593 1593 $attributes = array(); 1594 1594 $output = ''; 1595 1595 1596 if ( $dir = get_blog info('text_direction') )1596 if ( $dir = get_blog_info('text_direction') ) 1597 1597 $attributes[] = "dir=\"$dir\""; 1598 1598 1599 if ( $lang = get_blog info('language') ) {1599 if ( $lang = get_blog_info('language') ) { 1600 1600 if ( get_option('html_type') == 'text/html' || $doctype == 'html' ) 1601 1601 $attributes[] = "lang=\"$lang\""; 1602 1602 … … 1779 1779 } else { 1780 1780 $_file = admin_url("$file.css"); 1781 1781 } 1782 $_file = add_query_arg( 'version', get_blog info( 'version' ), $_file );1782 $_file = add_query_arg( 'version', get_blog_info( 'version' ), $_file ); 1783 1783 1784 1784 return apply_filters( 'wp_admin_css_uri', $_file, $file ); 1785 1785 } … … 1822 1822 } 1823 1823 1824 1824 echo apply_filters( 'wp_admin_css', "<link rel='stylesheet' href='" . clean_url( wp_admin_css_uri( $file ) ) . "' type='text/css' />\n", $file ); 1825 if ( 'rtl' == get_blog info( 'text_direction' ) )1825 if ( 'rtl' == get_blog_info( 'text_direction' ) ) 1826 1826 echo apply_filters( 'wp_admin_css', "<link rel='stylesheet' href='" . clean_url( wp_admin_css_uri( "$file-rtl" ) ) . "' type='text/css' />\n", "$file-rtl" ); 1827 1827 } 1828 1828 … … 1880 1880 function get_the_generator( $type ) { 1881 1881 switch ($type) { 1882 1882 case 'html': 1883 $gen = '<meta name="generator" content="WordPress ' . get_blog info( 'version' ) . '">' . "\n";1883 $gen = '<meta name="generator" content="WordPress ' . get_blog_info( 'version' ) . '">' . "\n"; 1884 1884 break; 1885 1885 case 'xhtml': 1886 $gen = '<meta name="generator" content="WordPress ' . get_blog info( 'version' ) . '" />' . "\n";1886 $gen = '<meta name="generator" content="WordPress ' . get_blog_info( 'version' ) . '" />' . "\n"; 1887 1887 break; 1888 1888 case 'atom': 1889 $gen = '<generator uri="http://wordpress.org/" version="' . get_blog info_rss( 'version' ) . '">WordPress</generator>';1889 $gen = '<generator uri="http://wordpress.org/" version="' . get_blog_info_rss( 'version' ) . '">WordPress</generator>'; 1890 1890 break; 1891 1891 case 'rss2': 1892 $gen = '<generator>http://wordpress.org/?v=' . get_blog info_rss( 'version' ) . '</generator>';1892 $gen = '<generator>http://wordpress.org/?v=' . get_blog_info_rss( 'version' ) . '</generator>'; 1893 1893 break; 1894 1894 case 'rdf': 1895 $gen = '<admin:generatorAgent rdf:resource="http://wordpress.org/?v=' . get_blog info_rss( 'version' ) . '" />';1895 $gen = '<admin:generatorAgent rdf:resource="http://wordpress.org/?v=' . get_blog_info_rss( 'version' ) . '" />'; 1896 1896 break; 1897 1897 case 'comment': 1898 $gen = '<!-- generator="WordPress/' . get_blog info( 'version' ) . '" -->';1898 $gen = '<!-- generator="WordPress/' . get_blog_info( 'version' ) . '" -->'; 1899 1899 break; 1900 1900 case 'export': 1901 $gen = '<!-- generator="WordPress/' . get_blog info_rss('version') . '" created="'. date('Y-m-d H:i') . '"-->';1901 $gen = '<!-- generator="WordPress/' . get_blog_info_rss('version') . '" created="'. date('Y-m-d H:i') . '"-->'; 1902 1902 break; 1903 1903 } 1904 1904 return apply_filters( "get_the_generator_{$type}", $gen, $type ); -
wp-includes/canonical.php
123 123 if ( $redirect_url = get_category_link(get_query_var('cat')) ) 124 124 $redirect['query'] = remove_query_arg('cat', $redirect['query']); 125 125 } elseif ( is_author() && !empty($_GET['author']) ) { 126 $author = get_user data(get_query_var('author'));126 $author = get_user_data(get_query_var('author')); 127 127 if ( false !== $author && $redirect_url = get_author_posts_url($author->ID, $author->user_nicename) ) 128 128 $redirect['query'] = remove_query_arg('author', $redirect['author']); 129 129 } -
wp-includes/capabilities.php
473 473 } 474 474 475 475 if ( ! empty( $id ) ) 476 $this->data = get_user data( $id );476 $this->data = get_user_data( $id ); 477 477 else 478 $this->data = get_user databylogin( $name );478 $this->data = get_user_data_by_login( $name ); 479 479 480 480 if ( empty( $this->data->ID ) ) 481 481 return; … … 551 551 */ 552 552 function add_role( $role ) { 553 553 $this->caps[$role] = true; 554 update_user meta( $this->ID, $this->cap_key, $this->caps );554 update_user_meta( $this->ID, $this->cap_key, $this->caps ); 555 555 $this->get_role_caps(); 556 556 $this->update_user_level_from_caps(); 557 557 } … … 568 568 if ( empty( $this->roles[$role] ) || ( count( $this->roles ) <= 1 ) ) 569 569 return; 570 570 unset( $this->caps[$role] ); 571 update_user meta( $this->ID, $this->cap_key, $this->caps );571 update_user_meta( $this->ID, $this->cap_key, $this->caps ); 572 572 $this->get_role_caps(); 573 573 } 574 574 … … 593 593 } else { 594 594 $this->roles = false; 595 595 } 596 update_user meta( $this->ID, $this->cap_key, $this->caps );596 update_user_meta( $this->ID, $this->cap_key, $this->caps ); 597 597 $this->get_role_caps(); 598 598 $this->update_user_level_from_caps(); 599 599 } … … 639 639 function update_user_level_from_caps() { 640 640 global $wpdb; 641 641 $this->user_level = array_reduce( array_keys( $this->allcaps ), array( &$this, 'level_reduction' ), 0 ); 642 update_user meta( $this->ID, $wpdb->prefix.'user_level', $this->user_level );642 update_user_meta( $this->ID, $wpdb->prefix.'user_level', $this->user_level ); 643 643 } 644 644 645 645 /** … … 653 653 */ 654 654 function add_cap( $cap, $grant = true ) { 655 655 $this->caps[$cap] = $grant; 656 update_user meta( $this->ID, $this->cap_key, $this->caps );656 update_user_meta( $this->ID, $this->cap_key, $this->caps ); 657 657 } 658 658 659 659 /** … … 667 667 function remove_cap( $cap ) { 668 668 if ( empty( $this->caps[$cap] ) ) return; 669 669 unset( $this->caps[$cap] ); 670 update_user meta( $this->ID, $this->cap_key, $this->caps );670 update_user_meta( $this->ID, $this->cap_key, $this->caps ); 671 671 } 672 672 673 673 /** … … 679 679 function remove_all_caps() { 680 680 global $wpdb; 681 681 $this->caps = array(); 682 update_user meta( $this->ID, $this->cap_key, '' );683 update_user meta( $this->ID, $wpdb->prefix.'user_level', '' );682 update_user_meta( $this->ID, $this->cap_key, '' ); 683 update_user_meta( $this->ID, $wpdb->prefix.'user_level', '' ); 684 684 $this->get_role_caps(); 685 685 } 686 686 … … 761 761 } 762 762 break; 763 763 case 'delete_post': 764 $author_data = get_user data( $user_id );764 $author_data = get_user_data( $user_id ); 765 765 //echo "post ID: {$args[0]}<br />"; 766 766 $post = get_post( $args[0] ); 767 767 if ( 'page' == $post->post_type ) { 768 768 $args = array_merge( array( 'delete_page', $user_id ), $args ); 769 769 return call_user_func_array( 'map_meta_cap', $args ); 770 770 } 771 $post_author_data = get_user data( $post->post_author );771 $post_author_data = get_user_data( $post->post_author ); 772 772 //echo "current user id : $user_id, post author id: " . $post_author_data->ID . "<br />"; 773 773 // If the user is the author... 774 774 if ( $user_id == $post_author_data->ID ) { … … 789 789 } 790 790 break; 791 791 case 'delete_page': 792 $author_data = get_user data( $user_id );792 $author_data = get_user_data( $user_id ); 793 793 //echo "post ID: {$args[0]}<br />"; 794 794 $page = get_page( $args[0] ); 795 $page_author_data = get_user data( $page->post_author );795 $page_author_data = get_user_data( $page->post_author ); 796 796 //echo "current user id : $user_id, page author id: " . $page_author_data->ID . "<br />"; 797 797 // If the user is the author... 798 798 if ( $user_id == $page_author_data->ID ) { … … 815 815 // edit_post breaks down to edit_posts, edit_published_posts, or 816 816 // edit_others_posts 817 817 case 'edit_post': 818 $author_data = get_user data( $user_id );818 $author_data = get_user_data( $user_id ); 819 819 //echo "post ID: {$args[0]}<br />"; 820 820 $post = get_post( $args[0] ); 821 821 if ( 'page' == $post->post_type ) { 822 822 $args = array_merge( array( 'edit_page', $user_id ), $args ); 823 823 return call_user_func_array( 'map_meta_cap', $args ); 824 824 } 825 $post_author_data = get_user data( $post->post_author );825 $post_author_data = get_user_data( $post->post_author ); 826 826 //echo "current user id : $user_id, post author id: " . $post_author_data->ID . "<br />"; 827 827 // If the user is the author... 828 828 if ( $user_id == $post_author_data->ID ) { … … 843 843 } 844 844 break; 845 845 case 'edit_page': 846 $author_data = get_user data( $user_id );846 $author_data = get_user_data( $user_id ); 847 847 //echo "post ID: {$args[0]}<br />"; 848 848 $page = get_page( $args[0] ); 849 $page_author_data = get_user data( $page->post_author );849 $page_author_data = get_user_data( $page->post_author ); 850 850 //echo "current user id : $user_id, page author id: " . $page_author_data->ID . "<br />"; 851 851 // If the user is the author... 852 852 if ( $user_id == $page_author_data->ID ) { … … 878 878 break; 879 879 } 880 880 881 $author_data = get_user data( $user_id );882 $post_author_data = get_user data( $post->post_author );881 $author_data = get_user_data( $user_id ); 882 $post_author_data = get_user_data( $post->post_author ); 883 883 if ( $user_id == $post_author_data->ID ) 884 884 $caps[] = 'read'; 885 885 else … … 893 893 break; 894 894 } 895 895 896 $author_data = get_user data( $user_id );897 $page_author_data = get_user data( $page->post_author );896 $author_data = get_user_data( $user_id ); 897 $page_author_data = get_user_data( $page->post_author ); 898 898 if ( $user_id == $page_author_data->ID ) 899 899 $caps[] = 'read'; 900 900 else -
wp-includes/classes.php
302 302 * @since 2.0.0 303 303 */ 304 304 function send_headers() { 305 @header('X-Pingback: '. get_blog info('pingback_url'));305 @header('X-Pingback: '. get_blog_info('pingback_url')); 306 306 if ( is_user_logged_in() ) 307 307 nocache_headers(); 308 308 if ( !empty($this->query_vars['error']) && '404' == $this->query_vars['error'] ) { … … 325 325 ) 326 326 ) 327 327 ) 328 $wp_last_modified = mysql2date('D, d M Y H:i:s', get_last commentmodified('GMT'), 0).' GMT';328 $wp_last_modified = mysql2date('D, d M Y H:i:s', get_last_comment_modified('GMT'), 0).' GMT'; 329 329 else 330 $wp_last_modified = mysql2date('D, d M Y H:i:s', get_last postmodified('GMT'), 0).' GMT';330 $wp_last_modified = mysql2date('D, d M Y H:i:s', get_last_post_modified('GMT'), 0).' GMT'; 331 331 $wp_etag = '"' . md5($wp_last_modified) . '"'; 332 332 @header("Last-Modified: $wp_last_modified"); 333 333 @header("ETag: $wp_etag");