WordPress.org

Make WordPress Core

Ticket #11059: wp-config_deprecate_patch.diff

File wp-config_deprecate_patch.diff, 605 bytes (added by strider72, 9 years ago)

Adds "deprecated file" call if wp-config.php is called directly.

  • wp-config-sample.php

     
    6969/* That's all, stop editing! Happy blogging. */
    7070
    7171/** WordPress absolute path to the Wordpress directory. */
    72 if ( !defined('ABSPATH') )
     72if ( ! defined( 'ABSPATH' ) ) {
     73        _deprecated_file( 'Calling wp-config.php directly from a plugin', 0.0, 'wp-load.php' );
    7374        define('ABSPATH', dirname(__FILE__) . '/');
     75}
    7476
    7577/** Sets up WordPress vars and included files. */
    7678require_once(ABSPATH . 'wp-settings.php');