ConstantsEASY_SVG_PRO_CONFIG

EASY_SVG_PRO_CONFIG

Name another path for the Easy SVG Pro configuration file instead of wp-content/easy-svg-pro.json, for example a file outside the web root.

Constant, Easy SVG Pro, Status: Stable

Easy SVG Pro looks for its configuration file at wp-content/easy-svg-pro.json. Define this constant in wp-config.php to read it from somewhere else.

Usage

define( 'EASY_SVG_PRO_CONFIG', '/srv/config/easy-svg-pro.json' );

Read in includes/core/config.php, inside pro_config_path().

When to use it

  • The file should live outside the web root or in a folder your deploy manages.
  • Several installations share one policy file.

Do not use it when:

  • wp-content/easy-svg-pro.json is fine. Without the constant that path is used.

Parameters

body
EASY_SVG_PRO_CONFIGstring

An absolute path to a JSON file. An empty string counts as not set.

Return value

returnnone

A constant has no return value. wp easy-svg config and the ability easy-svg-pro/get-features show the path in use and whether a file was found there.

Default

Not defined: WP_CONTENT_DIR . '/easy-svg-pro.json'.

Examples

// wp-config.php
define( 'EASY_SVG_PRO_CONFIG', dirname( ABSPATH ) . '/config/easy-svg-pro.json' );

How it works

The file is read once per request and site, at most 64 KB. A missing file is no error: nothing is fixed. A file that cannot be read, is larger than 64 KB, is not valid JSON or is not one JSON object is ignored as a whole, and the screens and wp easy-svg config name the reason. The format and the precedence are on the Central configuration page; easy_svg_pro_config has the last word after the file.

Pitfalls

  • A typo in the path is silent. A path that does not exist reads as "no file", so nothing is fixed. Check the path with wp easy-svg config.
  • The web server user must read it. An unreadable file is ignored with the reason unreadable.