Changeset 41606 for trunk/src/wp-includes/embed.php
- Timestamp:
- 09/27/2017 08:35:16 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/embed.php
r41600 r41606 1072 1072 */ 1073 1073 function wp_filter_pre_oembed_result( $result, $url, $args ) { 1074 $switched_blog = false; 1075 1074 1076 if ( is_multisite() ) { 1075 1077 $url_parts = wp_parse_args( wp_parse_url( $url ), array( … … 1095 1097 if ( $site && (int) $site->blog_id !== get_current_blog_id() ) { 1096 1098 switch_to_blog( $site->blog_id ); 1099 $switched_blog = true; 1097 1100 } 1098 1101 } … … 1112 1115 $data = _wp_oembed_get_object()->data2html( (object) $data, $url ); 1113 1116 1114 if ( is_multisite() && ms_is_switched()) {1117 if ( $switched_blog ) { 1115 1118 restore_current_blog(); 1116 1119 }
Note: See TracChangeset
for help on using the changeset viewer.