Don't include functions.php in wp_load_translations_early()

to avoid a parse error in a PHP4 environment (caused by use of
the clone keyword in option.php).

Manually include functions.php in the rare situations where it
is not already included by the time we need to load translations
early.

Remove the functions.php dependency by switching the wp_die() calls
to die(), in wp_check_php_mysql_versions().

props SergeyBiryukov, see #21316, for trunk.




git-svn-id: https://develop.svn.wordpress.org/trunk@21715 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2012-09-04 02:38:37 +00:00
parent be7d33f10d
commit 040d03235d
3 changed files with 10 additions and 7 deletions

View File

@@ -48,8 +48,10 @@ if ( file_exists( ABSPATH . 'wp-config.php') ) {
require_once( ABSPATH . WPINC . '/load.php' );
require_once( ABSPATH . WPINC . '/version.php' );
wp_load_translations_early();
wp_check_php_mysql_versions();
wp_load_translations_early();
require_once( ABSPATH . WPINC . '/functions.php' );
// Die with an error message
$die = __( "There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started." ) . '</p>';