Skip to content

Commit

Permalink
Fixing broken filter callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
iruzevic committed Dec 9, 2024
1 parent 14c84da commit 41f18bc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a CHANGELOG](https://keepachangelog.com/).

## [3.0.10]

### Fixed

- Wrong filter callback for Debug options.

## [3.0.9]

### Changed
Expand Down Expand Up @@ -266,6 +272,7 @@ This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a

- Initial production release.

[3.0.10]: https://github.com/infinum/eightshift-forms-utils/compare/3.0.9...3.0.10
[3.0.9]: https://github.com/infinum/eightshift-forms-utils/compare/3.0.8...3.0.9
[3.0.8]: https://github.com/infinum/eightshift-forms-utils/compare/3.0.7...3.0.8
[3.0.7]: https://github.com/infinum/eightshift-forms-utils/compare/3.0.6...3.0.7
Expand Down
18 changes: 9 additions & 9 deletions src/Helpers/UtilsDeveloperHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ final class UtilsDeveloperHelper
*/
public static function isDeveloperDebuggingActive(): bool
{
return \apply_filters(UtilsConfig::FILTER_SETTINGS_IS_DEBUG_ACTIVE, UtilsConfig::SETTINGS_DEBUG_DEBUGGING_KEY) ?? false;
return \apply_filters(UtilsConfig::FILTER_SETTINGS_IS_DEBUG_ACTIVE, false, UtilsConfig::SETTINGS_DEBUG_DEBUGGING_KEY);
}

/**
Expand All @@ -34,7 +34,7 @@ public static function isDeveloperDebuggingActive(): bool
*/
public static function isDeveloperSkipFormValidationActive(): bool
{
return \apply_filters(UtilsConfig::FILTER_SETTINGS_IS_DEBUG_ACTIVE, UtilsConfig::SETTINGS_DEBUG_SKIP_VALIDATION_KEY) ?? false;
return \apply_filters(UtilsConfig::FILTER_SETTINGS_IS_DEBUG_ACTIVE, false, UtilsConfig::SETTINGS_DEBUG_SKIP_VALIDATION_KEY);
}

/**
Expand All @@ -44,7 +44,7 @@ public static function isDeveloperSkipFormValidationActive(): bool
*/
public static function isDeveloperSkipFormResetActive(): bool
{
return \apply_filters(UtilsConfig::FILTER_SETTINGS_IS_DEBUG_ACTIVE, UtilsConfig::SETTINGS_DEBUG_SKIP_RESET_KEY) ?? false;
return \apply_filters(UtilsConfig::FILTER_SETTINGS_IS_DEBUG_ACTIVE, false, UtilsConfig::SETTINGS_DEBUG_SKIP_RESET_KEY);
}

/**
Expand All @@ -54,7 +54,7 @@ public static function isDeveloperSkipFormResetActive(): bool
*/
public static function isDeveloperSkipCaptchaActive(): bool
{
return \apply_filters(UtilsConfig::FILTER_SETTINGS_IS_DEBUG_ACTIVE, UtilsConfig::SETTINGS_DEBUG_SKIP_CAPTCHA_KEY) ?? false;
return \apply_filters(UtilsConfig::FILTER_SETTINGS_IS_DEBUG_ACTIVE, false, UtilsConfig::SETTINGS_DEBUG_SKIP_CAPTCHA_KEY);
}

/**
Expand All @@ -64,7 +64,7 @@ public static function isDeveloperSkipCaptchaActive(): bool
*/
public static function isDeveloperSkipFormsSyncActive(): bool
{
return \apply_filters(UtilsConfig::FILTER_SETTINGS_IS_DEBUG_ACTIVE, UtilsConfig::SETTINGS_DEBUG_SKIP_FORMS_SYNC_KEY) ?? false;
return \apply_filters(UtilsConfig::FILTER_SETTINGS_IS_DEBUG_ACTIVE, false, UtilsConfig::SETTINGS_DEBUG_SKIP_FORMS_SYNC_KEY);
}

/**
Expand All @@ -74,7 +74,7 @@ public static function isDeveloperSkipFormsSyncActive(): bool
*/
public static function isDeveloperSkipCacheActive(): bool
{
return \apply_filters(UtilsConfig::FILTER_SETTINGS_IS_DEBUG_ACTIVE, UtilsConfig::SETTINGS_DEBUG_SKIP_CACHE_KEY) ?? false;
return \apply_filters(UtilsConfig::FILTER_SETTINGS_IS_DEBUG_ACTIVE, false, UtilsConfig::SETTINGS_DEBUG_SKIP_CACHE_KEY);
}

/**
Expand All @@ -84,7 +84,7 @@ public static function isDeveloperSkipCacheActive(): bool
*/
public static function isDeveloperModeActive(): bool
{
return \apply_filters(UtilsConfig::FILTER_SETTINGS_IS_DEBUG_ACTIVE, UtilsConfig::SETTINGS_DEBUG_DEVELOPER_MODE_KEY) ?? false;
return \apply_filters(UtilsConfig::FILTER_SETTINGS_IS_DEBUG_ACTIVE, false, UtilsConfig::SETTINGS_DEBUG_DEVELOPER_MODE_KEY);
}

/**
Expand All @@ -94,7 +94,7 @@ public static function isDeveloperModeActive(): bool
*/
public static function isDeveloperQMLogActive(): bool
{
return \apply_filters(UtilsConfig::FILTER_SETTINGS_IS_DEBUG_ACTIVE, UtilsConfig::SETTINGS_DEBUG_QM_LOG) ?? false;
return \apply_filters(UtilsConfig::FILTER_SETTINGS_IS_DEBUG_ACTIVE, false, UtilsConfig::SETTINGS_DEBUG_QM_LOG);
}

/**
Expand All @@ -104,7 +104,7 @@ public static function isDeveloperQMLogActive(): bool
*/
public static function isDeveloperForceDisabledFieldsActive(): bool
{
return \apply_filters(UtilsConfig::FILTER_SETTINGS_IS_DEBUG_ACTIVE, UtilsConfig::SETTINGS_DEBUG_FORCE_DISABLED_FIELDS) ?? false;
return \apply_filters(UtilsConfig::FILTER_SETTINGS_IS_DEBUG_ACTIVE, false, UtilsConfig::SETTINGS_DEBUG_FORCE_DISABLED_FIELDS);
}

/**
Expand Down

0 comments on commit 41f18bc

Please sign in to comment.