Changeset 41668
- Timestamp:
- 10/02/2017 03:37:29 AM (8 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ms-deprecated.php
r41664 r41668 520 520 return $results; 521 521 } 522 523 /** 524 * Check whether a usermeta key has to do with the current blog. 525 * 526 * @since MU (3.0.0) 527 * @deprecated 4.9.0 528 * 529 * @global wpdb $wpdb WordPress database abstraction object. 530 * 531 * @param string $key 532 * @param int $user_id Optional. Defaults to current user. 533 * @param int $blog_id Optional. Defaults to current blog. 534 * @return bool 535 */ 536 function is_user_option_local( $key, $user_id = 0, $blog_id = 0 ) { 537 global $wpdb; 538 539 _deprecated_function( __FUNCTION__, '4.9.0' ); 540 541 $current_user = wp_get_current_user(); 542 if ( $blog_id == 0 ) { 543 $blog_id = get_current_blog_id(); 544 } 545 $local_key = $wpdb->get_blog_prefix( $blog_id ) . $key; 546 547 return isset( $current_user->$local_key ); 548 } -
trunk/src/wp-includes/ms-functions.php
r41661 r41668 2202 2202 2203 2203 /** 2204 * Check whether a usermeta key has to do with the current blog.2205 *2206 * @since MU (3.0.0)2207 *2208 * @global wpdb $wpdb WordPress database abstraction object.2209 *2210 * @param string $key2211 * @param int $user_id Optional. Defaults to current user.2212 * @param int $blog_id Optional. Defaults to current blog.2213 * @return bool2214 */2215 function is_user_option_local( $key, $user_id = 0, $blog_id = 0 ) {2216 global $wpdb;2217 2218 $current_user = wp_get_current_user();2219 if ( $blog_id == 0 ) {2220 $blog_id = get_current_blog_id();2221 }2222 $local_key = $wpdb->get_blog_prefix( $blog_id ) . $key;2223 2224 return isset( $current_user->$local_key );2225 }2226 2227 /**2228 2204 * Check whether users can self-register, based on Network settings. 2229 2205 *
Note: See TracChangeset
for help on using the changeset viewer.