WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

DF_FileConf

With this plugin you can override options from the database by setting them in a configuration file.

This section describes how to install the plugin and get it working.

  1. Place the df_fileconf directory inside the /wp-content/plugins/ directory
  2. Inside the plugin directory copy the sample file file-config.sample.php to file-config.php and make appropriate changes according to the comments at the top of the file.
  3. Activate the plugin through the 'Plugins' menu in WordPress

Your configuration variable $fileconf must be an array/map that should look something like what is described at the top of the file file-config.sample.php.

The array must be of key/value pairs where the key is the name of the option from the database where the value is the value you wish to override the option with. Beaware that options where the value is an array in both the database and this configuration they will be merged together.

To completly replace an array option you need to first remove it completly by adding the option name to the array with the key '__unset'. Se the example below.

There are three options that control the plugin:

  • df_fileconf_debug controls if changes should be printed and then the script dies.
  • df_fileconf_update controls if changes should be wrote back to the database.
  • df_fileconf_active controls if options from the configuration file should override options from the database.

Basicly the configuration should look something like this:

  global $fileconf;
  $fileconf = array(
      // Settings for this plugin
      'df_fileconf_debug'     => false,
      'df_fileconf_update'    => false,
      'df_fileconf_active'    => true,

      'siteurl'       =>  'http://localhost.localdomain',
      'home'          =>  'http://localhost.localdomain',
      '__unset'       =>  array(
                            'unwanted_array',
                          ),
  );

Requires: 2.1 or higher
Compatible up to: 2.1.3
Last Updated: 2007-4-16
Downloads: 534

Ratings

5 stars
5 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.