Changes in trunk/wp-includes/load.php [17194:18375]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/load.php
r17194 r18375 2 2 /** 3 3 * These functions are needed to load WordPress. 4 * 5 * @internal This file must be parsable by PHP4. 4 6 * 5 7 * @package WordPress … … 95 97 * 96 98 * Dies if requirements are not met. 99 * 100 * This function must be able to work without a complete environment set up. In wp-load.php, for 101 * example, WP_CONTENT_DIR is defined and version.php is included before this function is called. 97 102 * 98 103 * @access private … … 272 277 } 273 278 } 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 ); 279 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 ); 278 280 } 279 281 } … … 284 286 * To set directory manually, define <code>WP_LANG_DIR</code> in wp-config.php. 285 287 * 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. 288 * If the language directory exists within WP_CONTENT_DIR that is used 289 * Otherwise if the language directory exists within WPINC, that's used 290 * Finally, If neither of the preceeding directories is found, 291 * WP_CONTENT_DIR/languages is used. 288 292 * 289 293 * The WP_LANG_DIR constant was introduced in 2.1.0. … … 294 298 function wp_set_lang_dir() { 295 299 if ( !defined( 'WP_LANG_DIR' ) ) { 296 if ( file_exists( WP_CONTENT_DIR . '/languages' ) && @is_dir( WP_CONTENT_DIR . '/languages' ) ) {300 if ( file_exists( WP_CONTENT_DIR . '/languages' ) && @is_dir( WP_CONTENT_DIR . '/languages' ) || !@is_dir(ABSPATH . WPINC . '/languages') ) { 297 301 define( 'WP_LANG_DIR', WP_CONTENT_DIR . '/languages' ); // no leading slash, no trailing slash, full path, not relative to ABSPATH 298 302 if ( !defined( 'LANGDIR' ) ) { … … 555 559 * Copy an object. 556 560 * 557 * Returns a cloned copy of an object.558 *559 561 * @since 2.7.0 562 * @deprecated 3.2 560 563 * 561 564 * @param object $object The object to clone 562 565 * @return object The cloned object 563 566 */ 567 564 568 function 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; 569 // Use parens for clone to accommodate PHP 4. See #17880 570 return clone( $object ); 570 571 } 571 572
Note: See TracChangeset
for help on using the changeset viewer.