frontity / frontity-embedded

Embedded Mode plugin for Frontity sites

Home Page:https://frontity.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add the possibility to define a constant for the Frontity server URL

SantosGuillamot opened this issue · comments

Sometimes, users will want to define the Frontity server URL in a PHP constant defined in the wp-config.php file, and this should be supported by the future plugin. In these lines of code, we should add something like:

if (getenv("FRONTITY_SERVER")) {
  // Env variable.
  $frontity_server = getenv("FRONTITY_SERVER");
} else if ( defined( "FRONTITY_SERVER" ) ) {
  // PHP Constant.
  $frontity_server = FRONTITY_SERVER;
}