Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
feat: adds Environment::secure()
Browse files Browse the repository at this point in the history
  • Loading branch information
devuri committed Mar 10, 2021
1 parent afff06d commit 8a2f109
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/Environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,23 @@ public static function debug(): void {
ini_set('display_errors', '0');
}

public static function secure(): void {

// Disable Plugin and Theme Editor.
self::define('DISALLOW_FILE_EDIT', true );
self::define('DISALLOW_FILE_MODS', true );

self::define('WP_DEBUG_DISPLAY', false);
self::define('SCRIPT_DEBUG', false);

self::define('WP_CRON_LOCK_TIMEOUT', 120);
self::define('EMPTY_TRASH_DAYS', 10);

self::define( 'WP_DEBUG', false );
self::define('WP_DEBUG_LOG', false );
ini_set('display_errors', '0');

}


}
3 changes: 3 additions & 0 deletions src/Setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ public function debug(): ConfigInterface {
case 'development':
Environment::development();
break;
case 'secure':
Environment::secure();
break;
default:
Environment::production();
}
Expand Down

0 comments on commit 8a2f109

Please sign in to comment.