WordPress.org

Ready to get started?Download WordPress

Forums

Configuration file (3 posts)

  1. emixiak
    Member
    Posted 2 years ago #

    Hello everyone..
    Wordpress config file should be a config file not some sort of bootstrap loader:

    require_once(ABSPATH . 'wp-settings.php');

    This line should not be there then it would be possible to just include this file in plugin or some other script and get wordpress database settings without having to include loads of useless files and code!

  2. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    Why would someone need to get the database settings for a plugin?

  3. emixiak
    Member
    Posted 2 years ago #

    For example to use native mysql functions?
    Not to include loads of useless code if part of a plugin works as a service (is independent) and still has to share wordpress options?

    There is a lot of overhead when requiring wp-load.php just to retrieve a single setting from the database.

    Config file should be a config file. To store settings, not to load another files. That kind of dependency should not occur.

Topic Closed

This topic has been closed to new replies.

About this Topic