WordPress.org

Make WordPress Core

Ticket #11729: 11729.diff

File 11729.diff, 652 bytes (added by nacin, 4 years ago)

Improving performance is always good

  • wp-settings.php

     
    615615 
    616616do_action('plugins_loaded'); 
    617617 
    618 $default_constants = array( 'WP_POST_REVISIONS' => true ); 
    619 foreach ( $default_constants as $c => $v ) 
    620         @define( $c, $v ); // will fail if the constant is already defined 
    621 unset($default_constants, $c, $v); 
     618/** 
     619 * It is possible to define this in wp-config.php 
     620 * @since 2.6.0 
     621 */ 
     622if ( !defined('WP_POST_REVISIONS') ) 
     623        define('WP_POST_REVISIONS', true); 
    622624 
    623625// If already slashed, strip. 
    624626if ( get_magic_quotes_gpc() ) {