Changeset 41380 for trunk/src/wp-includes/class-wp-network.php
- Timestamp:
- 09/15/2017 11:14:49 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-network.php
r41289 r41380 149 149 return (int) $this->id; 150 150 case 'blog_id': 151 return $this-> blog_id;151 return $this->get_main_site_id(); 152 152 case 'site_id': 153 return (int) $this-> blog_id;153 return (int) $this->get_main_site_id(); 154 154 } 155 155 … … 200 200 $this->$key = $value; 201 201 } 202 } 203 204 /** 205 * Returns the main site ID for the network. 206 * 207 * Internal method used by the magic getter for the 'blog_id' and 'site_id' 208 * properties. 209 * 210 * @since 4.9.0 211 * @see get_main_site_id() 212 * 213 * @return string Main site ID as numeric string, for compatibility reasons. 214 */ 215 private function get_main_site_id() { 216 if ( empty( $this->blog_id ) ) { 217 $this->blog_id = (string) get_main_site_id( $this->id ); 218 } 219 220 return $this->blog_id; 202 221 } 203 222
Note: See TracChangeset
for help on using the changeset viewer.