-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add features 'allowList' & 'blockList'
- Loading branch information
Showing
47 changed files
with
1,092 additions
and
1,465 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
* @package Kirby CMS | ||
* @author S1SYPHOS <[email protected]> | ||
* @link http://twobrain.io | ||
* @version 1.2.3 | ||
* @version 1.3.0 | ||
* @license MIT | ||
*/ | ||
|
||
|
@@ -93,11 +93,22 @@ function clearDJO(): bool | |
'hooks' => [ | ||
'kirbytext:after' => function (string $text): string | ||
{ | ||
# Leave text unmodified if plugin is disabled (default) | ||
# Process text by all means when page template is allowlisted | ||
if (in_array(page()->intendedTemplate(), option('kirby3-dejure.allowList', [])) === true) { | ||
return dejurify($text); | ||
} | ||
|
||
# Leave text unmodified if .. | ||
# (1) .. plugin is disabled (default) | ||
if (!option('kirby3-dejure.enabled', false)) { | ||
return $text; | ||
} | ||
|
||
# (2) .. page template is blocklisted | ||
if (in_array(page()->intendedTemplate(), option('kirby3-dejure.blockList', [])) === true) { | ||
return $text; | ||
} | ||
|
||
return dejurify($text); | ||
}, | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.