Changeset 41241 for trunk/src/wp-includes/ms-deprecated.php
- Timestamp:
- 08/12/2017 12:47:38 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ms-deprecated.php
r41200 r41241 421 421 * @global wpdb $wpdb WordPress database abstraction object. 422 422 * 423 * @param string $ sitedomain Optional. Sitedomain.424 * @param string $path Optional. Sitepath.425 * @return array|false The network admins 426 */ 427 function get_admin_users_for_domain( $ sitedomain = '', $path = '' ) {423 * @param string $domain Optional. Network domain. 424 * @param string $path Optional. Network path. 425 * @return array|false The network admins. 426 */ 427 function get_admin_users_for_domain( $domain = '', $path = '' ) { 428 428 _deprecated_function( __FUNCTION__, '4.4.0' ); 429 429 430 430 global $wpdb; 431 431 432 if ( ! $ sitedomain )433 $ site_id = $wpdb->siteid;432 if ( ! $domain ) 433 $network_id = $wpdb->siteid; 434 434 else 435 $ site_id = $wpdb->get_var( $wpdb->prepare( "SELECT id FROM $wpdb->site WHERE domain = %s AND path = %s", $sitedomain, $path ) );436 437 if ( $ site_id )438 return $wpdb->get_results( $wpdb->prepare( "SELECT u.ID, u.user_login, u.user_pass FROM $wpdb->users AS u, $wpdb->sitemeta AS sm WHERE sm.meta_key = 'admin_user_id' AND u.ID = sm.meta_value AND sm.site_id = %d", $ site_id ), ARRAY_A );435 $network_id = $wpdb->get_var( $wpdb->prepare( "SELECT id FROM $wpdb->site WHERE domain = %s AND path = %s", $domain, $path ) ); 436 437 if ( $network_id ) 438 return $wpdb->get_results( $wpdb->prepare( "SELECT u.ID, u.user_login, u.user_pass FROM $wpdb->users AS u, $wpdb->sitemeta AS sm WHERE sm.meta_key = 'admin_user_id' AND u.ID = sm.meta_value AND sm.site_id = %d", $network_id ), ARRAY_A ); 439 439 440 440 return false;
Note: See TracChangeset
for help on using the changeset viewer.