Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/load.php

    r17194 r18293  
    272272        }
    273273    } else {
    274         if ( defined( 'E_RECOVERABLE_ERROR' ) )
    275             error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );
    276         else
    277             error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING );
     274        error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );
    278275    }
    279276}
     
    284281 * To set directory manually, define <code>WP_LANG_DIR</code> in wp-config.php.
    285282 *
    286  * First looks for language folder in WP_CONTENT_DIR and uses that folder if it
    287  * exists. Or it uses the "languages" folder in WPINC.
     283 * If the language directory exists within WP_CONTENT_DIR that is used
     284 * Otherwise if the language directory exists within WPINC, that's used
     285 * Finally, If neither of the preceeding directories is found,
     286 * WP_CONTENT_DIR/languages is used.
    288287 *
    289288 * The WP_LANG_DIR constant was introduced in 2.1.0.
     
    294293function wp_set_lang_dir() {
    295294    if ( !defined( 'WP_LANG_DIR' ) ) {
    296         if ( file_exists( WP_CONTENT_DIR . '/languages' ) && @is_dir( WP_CONTENT_DIR . '/languages' ) ) {
     295        if ( file_exists( WP_CONTENT_DIR . '/languages' ) && @is_dir( WP_CONTENT_DIR . '/languages' ) || !@is_dir(ABSPATH . WPINC . '/languages') ) {
    297296            define( 'WP_LANG_DIR', WP_CONTENT_DIR . '/languages' ); // no leading slash, no trailing slash, full path, not relative to ABSPATH
    298297            if ( !defined( 'LANGDIR' ) ) {
     
    555554 * Copy an object.
    556555 *
    557  * Returns a cloned copy of an object.
    558  *
    559556 * @since 2.7.0
     557 * @deprecated 3.2
    560558 *
    561559 * @param object $object The object to clone
    562560 * @return object The cloned object
    563561 */
     562
    564563function wp_clone( $object ) {
    565     static $can_clone;
    566     if ( !isset( $can_clone ) )
    567         $can_clone = version_compare( phpversion(), '5.0', '>=' );
    568 
    569     return $can_clone ? clone( $object ) : $object;
     564    return clone $object;
    570565}
    571566
Note: See TracChangeset for help on using the changeset viewer.