File tree Expand file tree Collapse file tree 4 files changed +8
-5
lines changed Expand file tree Collapse file tree 4 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -395,9 +395,9 @@ public function list_table_filters( $filters ) {
395
395
396
396
// add all sites
397
397
foreach ( wp_stream_get_sites () as $ blog ) {
398
- $ blog_data = get_blog_details ( $ blog );
398
+ $ blog_data = get_blog_details ( $ blog-> blog_id );
399
399
400
- $ blogs [ $ blog[ ' blog_id ' ] ] = array (
400
+ $ blogs [ $ blog-> blog_id ] = array (
401
401
'label ' => $ blog_data ->blogname ,
402
402
'disabled ' => '' ,
403
403
);
Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ private function delete_all_options() {
137
137
138
138
// Delete options from each blog on network
139
139
foreach ( wp_stream_get_sites () as $ blog ) {
140
- $ this ->delete_blog_options ( absint ( $ blog[ ' blog_id ' ] ) );
140
+ $ this ->delete_blog_options ( absint ( $ blog-> blog_id ) );
141
141
}
142
142
}
143
143
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ public function get_context_labels() {
66
66
$ blogs = wp_stream_get_sites ();
67
67
68
68
foreach ( $ blogs as $ blog ) {
69
- $ blog_details = get_blog_details ( $ blog[ ' blog_id ' ] );
69
+ $ blog_details = get_blog_details ( $ blog-> blog_id );
70
70
$ key = sanitize_key ( $ blog_details ->blogname );
71
71
$ labels [ $ key ] = $ blog_details ->blogname ;
72
72
}
Original file line number Diff line number Diff line change @@ -95,7 +95,10 @@ function wp_stream_get_sites() {
95
95
if ( function_exists ( 'get_sites ' ) ) {
96
96
$ sites = get_sites ();
97
97
} else {
98
- $ sites = wp_get_sites ();
98
+ $ sites = array ();
99
+ foreach ( wp_get_sites () as $ site ) {
100
+ $ sites = get_site ( $ site ['blog_id ' ] );
101
+ }
99
102
}
100
103
101
104
return $ sites ;
You can’t perform that action at this time.
0 commit comments