Skip to content

Commit

Permalink
Adding environment support - #13. Adding 'disallow_file_mods' support -
Browse files Browse the repository at this point in the history
  • Loading branch information
DesignyourCode committed Aug 8, 2017
1 parent 0d7974a commit e9d43ec
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/config/parameters.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ parameters:
db_password: root
db_host: localhost
debug: true
environment:
disallow_file_mods: false
dbi_aws_access_key_id:
dbi_aws_secret_access_key:
19 changes: 19 additions & 0 deletions wp-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,25 @@
define( 'SCRIPT_DEBUG', $var['debug'] );
}

// ========================================
// Environment
// ========================================
if (!file_exists($parameters)) {
define( 'ENVIRONMENT', getenv('ENVIRONMENT') );
} else {
define( 'ENVIRONMENT', $var['ENVIRONMENT'] );
}

// =============================================================
// Disallow File Mods - Stop users being able to install plugins
// For more information: http://bit.ly/2unkVoG
// =============================================================
if (!file_exists($parameters)) {
define( 'DISALLOW_FILE_MODS', getenv('disallow_file_mods') );
} else {
define( 'DISALLOW_FILE_MODS', $var['disallow_file_mods'] );
}

// =======================================
// WordPress SMTP server
// Enable mailing on Heroku using sendgrid
Expand Down

0 comments on commit e9d43ec

Please sign in to comment.