Changes from branches/3.0/wp-includes/ms-load.php at r15369 to trunk/wp-includes/ms-load.php at r16906
- File:
-
- 1 edited
-
trunk/wp-includes/ms-load.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/ms-load.php
r15369 r16906 24 24 25 25 return false; 26 } 27 28 /** 29 * Returns array of network plugin files to be included in global scope. 30 * 31 * The default directory is wp-content/plugins. To change the default directory 32 * manually, define <code>WP_PLUGIN_DIR</code> and <code>WP_PLUGIN_URL</code> 33 * in wp-config.php. 34 * 35 * @access private 36 * @since 3.1.0 37 * @return array Files to include 38 */ 39 function wp_get_active_network_plugins() { 40 $active_plugins = (array) get_site_option( 'active_sitewide_plugins', array() ); 41 if ( empty( $active_plugins ) ) 42 return array(); 43 44 $plugins = array(); 45 $active_plugins = array_keys( $active_plugins ); 46 sort( $active_plugins ); 47 48 foreach ( $active_plugins as $plugin ) { 49 if ( ! validate_file( $plugin ) // $plugin must validate as file 50 && '.php' == substr( $plugin, -4 ) // $plugin must end with '.php' 51 && file_exists( WP_PLUGIN_DIR . '/' . $plugin ) // $plugin must exist 52 ) 53 $plugins[] = WP_PLUGIN_DIR . '/' . $plugin; 54 } 55 return $plugins; 26 56 } 27 57 … … 52 82 53 83 if ( '1' == $current_blog->deleted ) { 54 if ( file_exists( WP_CONTENT_DIR . '/blog-deleted.php' ) ) {84 if ( file_exists( WP_CONTENT_DIR . '/blog-deleted.php' ) ) 55 85 return WP_CONTENT_DIR . '/blog-deleted.php'; 56 } else { 57 header( 'HTTP/1.1 410 Gone' ); 58 wp_die( /*WP_I18N_USER_DELETED_BLOG*/'This user has elected to delete their account and the content is no longer available.'/*/WP_I18N_USER_DELETED_BLOG*/ ); 59 } 86 else 87 wp_die( __( 'This user has elected to delete their account and the content is no longer available.' ), '', array( 'response' => 410 ) ); 60 88 } 61 89 … … 64 92 return WP_CONTENT_DIR . '/blog-inactive.php'; 65 93 else 66 wp_die( sprintf( /*WP_I18N_BLOG_NOT_ACTIVATED*/'This site has not been activated yet. If you are having problems activating your site, please contact <a href="mailto:%1$s">%1$s</a>.'/*/WP_I18N_BLOG_NOT_ACTIVATED*/, str_replace( '@', ' AT ', get_site_option( 'admin_email', "support@{$current_site->domain}" ) ) ) );94 wp_die( sprintf( __( 'This site has not been activated yet. If you are having problems activating your site, please contact <a href="mailto:%1$s">%1$s</a>.' ), str_replace( '@', ' AT ', get_site_option( 'admin_email', "support@{$current_site->domain}" ) ) ) ); 67 95 } 68 96 69 97 if ( $current_blog->archived == '1' || $current_blog->spam == '1' ) { 70 if ( file_exists( WP_CONTENT_DIR . '/blog-suspended.php' ) ) {98 if ( file_exists( WP_CONTENT_DIR . '/blog-suspended.php' ) ) 71 99 return WP_CONTENT_DIR . '/blog-suspended.php'; 72 } else { 73 header( 'HTTP/1.1 410 Gone' ); 74 wp_die( /*WP_I18N_ARCHIVED*/'This site has been archived or suspended.'/*/WP_I18N_ARCHIVED*/ ); 75 } 100 else 101 wp_die( __( 'This site has been archived or suspended.' ), '', array( 'response' => 410 ) ); 76 102 } 77 103 … … 88 114 function get_current_site_name( $current_site ) { 89 115 global $wpdb; 90 $current_site->site_name = wp_cache_get( $current_site->id . ':current_site_name', 'site-options' ); 116 117 $current_site->site_name = wp_cache_get( $current_site->id . ':site_name', 'site-options' ); 91 118 if ( ! $current_site->site_name ) { 92 $current_site->site_name = wp_cache_get( $current_site->id . ':site_name', 'site-options' ); 93 if ( ! $current_site->site_name ) { 94 $current_site->site_name = $wpdb->get_var( $wpdb->prepare( "SELECT meta_value FROM $wpdb->sitemeta WHERE site_id = %d AND meta_key = 'site_name'", $current_site->id ) ); 95 if ( ! $current_site->site_name ) 96 $current_site->site_name = ucfirst( $current_site->domain ); 97 } 98 wp_cache_set( $current_site->id . ':current_site_name', $current_site->site_name, 'site-options' ); 99 } 119 $current_site->site_name = $wpdb->get_var( $wpdb->prepare( "SELECT meta_value FROM $wpdb->sitemeta WHERE site_id = %d AND meta_key = 'site_name'", $current_site->id ) ); 120 if ( ! $current_site->site_name ) 121 $current_site->site_name = ucfirst( $current_site->domain ); 122 } 123 wp_cache_set( $current_site->id . ':site_name', $current_site->site_name, 'site-options' ); 124 100 125 return $current_site; 101 126 }
Note: See TracChangeset
for help on using the changeset viewer.