Multisite: Deprecate `is_user_option_local()`.
`is_user_option_local()` was added during MU development and used for a handful of changesets before the code using it was removed again. It has not been used by MU or core since nor is it widely used elsewhere. Fixes #41697. Props bnap00, jeremyfelt. Built from https://develop.svn.wordpress.org/trunk@41668 git-svn-id: http://core.svn.wordpress.org/trunk@41502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
728e44ab5a
commit
5ccf8eebb7
|
@ -519,3 +519,30 @@ function wp_get_sites( $args = array() ) {
|
||||||
|
|
||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check whether a usermeta key has to do with the current blog.
|
||||||
|
*
|
||||||
|
* @since MU (3.0.0)
|
||||||
|
* @deprecated 4.9.0
|
||||||
|
*
|
||||||
|
* @global wpdb $wpdb WordPress database abstraction object.
|
||||||
|
*
|
||||||
|
* @param string $key
|
||||||
|
* @param int $user_id Optional. Defaults to current user.
|
||||||
|
* @param int $blog_id Optional. Defaults to current blog.
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
function is_user_option_local( $key, $user_id = 0, $blog_id = 0 ) {
|
||||||
|
global $wpdb;
|
||||||
|
|
||||||
|
_deprecated_function( __FUNCTION__, '4.9.0' );
|
||||||
|
|
||||||
|
$current_user = wp_get_current_user();
|
||||||
|
if ( $blog_id == 0 ) {
|
||||||
|
$blog_id = get_current_blog_id();
|
||||||
|
}
|
||||||
|
$local_key = $wpdb->get_blog_prefix( $blog_id ) . $key;
|
||||||
|
|
||||||
|
return isset( $current_user->$local_key );
|
||||||
|
}
|
||||||
|
|
|
@ -2200,30 +2200,6 @@ function update_blog_public( $old_value, $value ) {
|
||||||
update_blog_status( get_current_blog_id(), 'public', (int) $value );
|
update_blog_status( get_current_blog_id(), 'public', (int) $value );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Check whether a usermeta key has to do with the current blog.
|
|
||||||
*
|
|
||||||
* @since MU (3.0.0)
|
|
||||||
*
|
|
||||||
* @global wpdb $wpdb WordPress database abstraction object.
|
|
||||||
*
|
|
||||||
* @param string $key
|
|
||||||
* @param int $user_id Optional. Defaults to current user.
|
|
||||||
* @param int $blog_id Optional. Defaults to current blog.
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
function is_user_option_local( $key, $user_id = 0, $blog_id = 0 ) {
|
|
||||||
global $wpdb;
|
|
||||||
|
|
||||||
$current_user = wp_get_current_user();
|
|
||||||
if ( $blog_id == 0 ) {
|
|
||||||
$blog_id = get_current_blog_id();
|
|
||||||
}
|
|
||||||
$local_key = $wpdb->get_blog_prefix( $blog_id ) . $key;
|
|
||||||
|
|
||||||
return isset( $current_user->$local_key );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check whether users can self-register, based on Network settings.
|
* Check whether users can self-register, based on Network settings.
|
||||||
*
|
*
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.9-alpha-41667';
|
$wp_version = '4.9-alpha-41668';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue