ms_not_installed [ WordPress Function ]
ms_not_installed ( No parameters )
| Access: |
|
| Defined at: |
|
Benzer Fonksiyonlar: wp_not_installed, is_blog_installed, wp_install, is_subdomain_install, _get_list_table
Displays a failure message.
Used when a blog's tables do not exist. Checks for a missing $wpdb->site table as well.
Source
<?php
function ms_not_installed() {
global $wpdb, $domain, $path;
wp_load_translations_early();
$title = __( 'Error establishing database connection' );
$msg = '<h1>' . $title . '</h1>';
if ( ! is_admin() )
die( $msg );
$msg .= '<p>' . __( 'If your site does not display, please contact the owner of this network.' ) . '';
$msg .= ' ' . __( 'If you are the owner of this network please check that MySQL is running properly and all tables are error free.' ) . '</p>';
if ( false && !$wpdb->get_var( "SHOW TABLES LIKE '$wpdb->site'" ) )
$msg .= '<p>' . sprintf( __( '<strong>Database tables are missing.</strong> This means that MySQL is not running, WordPress was not installed properly, or someone deleted <code>%s</code>. You really should look at your database now.' ), $wpdb->site ) . '</p>';
else
$msg .= '<p>' . sprintf( __( '<strong>Could not find site <code>%1$s</code>.</strong> Searched for table <code>%2$s</code> in database <code>%3$s</code>. Is that right?' ), rtrim( $domain . $path, '/' ), $wpdb->blogs, DB_NAME ) . '</p>';
$msg .= '<p><strong>' . __( 'What do I do now?' ) . '</strong> ';
$msg .= __( 'Read the <a target="_blank" href="http://codex.wordpress.org/Debugging_a_WordPress_Network">bug report</a> page. Some of the guidelines there may help you figure out what went wrong.' );
$msg .= ' ' . __( 'If you’re still stuck with this message, then check that your database contains the following tables:' ) . '</p><ul>';
foreach ( $wpdb->tables('global') as $t => $table ) {
if ( 'sitecategories' == $t )
continue;
$msg .= '<li>' . $table . '</li>';
}
$msg .= '</ul>';
wp_die( $msg, $title );
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- Function Reference/ms not installed « WordPress Codex
Description. Displays a failure message. Used when a blog's tables do not exist. Checks for a missing $wpdb->site table as well.
codex.wordpress.org - WordPress › Support » Tags — ms_not_installed
Forums. Username or Email Address Password (forgot?) Register · WordPress › Support » ms_not_installed. Tag: ms_not_installed Add New » ...
wordpress.org - WordPress › Support » WP Multisite doesn't use custom db-error.php ...
Unfortunately ms_not_installed() does not redirect to db-error.php, and instead dies, returning $title = /*WP_I18N_FATAL_ERROR*/'Error establishing database ...
wordpress.org - ms_not_installed (WordPress Function) - WPSeek.com
WordPress lookup for ms_not_installed, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers and theme authors.
wpseek.com