Changeset 21414 for trunk/wp-includes/class-wp-theme.php
- Timestamp:
- 08/03/2012 05:51:42 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class-wp-theme.php
r21117 r21414 1110 1110 $current = $blog_id == get_current_blog_id(); 1111 1111 1112 if ( $current ) 1112 if ( $current ) { 1113 1113 $allowed_themes[ $blog_id ] = get_option( 'allowedthemes' ); 1114 else 1115 $allowed_themes[ $blog_id ] = get_blog_option( $blog_id, 'allowedthemes' ); 1114 } else { 1115 switch_to_blog( $blog_id ); 1116 $allowed_themes[ $blog_id ] = get_option( 'allowedthemes' ); 1117 restore_current_blog(); 1118 } 1116 1119 1117 1120 // This is all super old MU back compat joy. 1118 1121 // 'allowedthemes' keys things by stylesheet. 'allowed_themes' keyed things by name. 1119 1122 if ( false === $allowed_themes[ $blog_id ] ) { 1120 if ( $current ) 1123 if ( $current ) { 1121 1124 $allowed_themes[ $blog_id ] = get_option( 'allowed_themes' ); 1122 else 1123 $allowed_themes[ $blog_id ] = get_blog_option( $blog_id, 'allowed_themes' ); 1125 } else { 1126 switch_to_blog( $blog_id ); 1127 $allowed_themes[ $blog_id ] = get_option( 'allowed_themes' ); 1128 restore_current_blog(); 1129 } 1124 1130 1125 1131 if ( ! is_array( $allowed_themes[ $blog_id ] ) || empty( $allowed_themes[ $blog_id ] ) ) { … … 1140 1146 delete_option( 'allowed_themes' ); 1141 1147 } else { 1142 update_blog_option( $blog_id, 'allowedthemes', $allowed_themes[ $blog_id ] ); 1143 delete_blog_option( $blog_id, 'allowed_themes' ); 1148 switch_to_blog( $blog_id ); 1149 update_option( 'allowedthemes', $allowed_themes[ $blog_id ] ); 1150 delete_option( 'allowed_themes' ); 1151 restore_current_blog(); 1144 1152 } 1145 1153 }
Note: See TracChangeset
for help on using the changeset viewer.