Skip to content

Commit

Permalink
Move functionality from module activation into the more generic waf a…
Browse files Browse the repository at this point in the history
…ctivation method
  • Loading branch information
nateweller committed Oct 27, 2024
1 parent bf57d06 commit a69185a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 0 additions & 3 deletions projects/packages/waf/src/class-waf-initializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ public static function init() {
* @return bool|WP_Error True if the WAF activation is successful, WP_Error otherwise.
*/
public static function on_waf_activation() {
update_option( Waf_Runner::MODE_OPTION_NAME, 'normal' );
add_option( Waf_Rules_Manager::AUTOMATIC_RULES_ENABLED_OPTION_NAME, false );

try {
Waf_Runner::activate();
( new Waf_Standalone_Bootstrap() )->generate();
Expand Down
1 change: 1 addition & 0 deletions projects/packages/waf/src/class-waf-runner.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ public static function activate() {
add_option( self::MODE_OPTION_NAME, 'normal' );
}

add_option( Waf_Rules_Manager::AUTOMATIC_RULES_ENABLED_OPTION_NAME, false );
add_option( self::SHARE_DATA_OPTION_NAME, true );

self::initialize_filesystem();
Expand Down

0 comments on commit a69185a

Please sign in to comment.