Skip to content

Commit 79a839f

Browse files
Merge pull request #437 from JLG-WOCFR-DEV/codex/fix-memory-limit-exhaustion-error
Fix surveillance threshold recursion and adjust anime preset contrast
2 parents fcced2d + a5c45fd commit 79a839f

File tree

2 files changed

+31
-18
lines changed

2 files changed

+31
-18
lines changed

liens-morts-detector-jlg/assets/css/blc-admin-styles.css

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2437,10 +2437,10 @@ body.blc-modal-open {
24372437
--blc-admin-surface: #0f172a;
24382438
--blc-admin-surface-subtle: #111c30;
24392439
--blc-admin-surface-muted: #14213d;
2440-
--blc-admin-border: rgba(148, 163, 184, 0.35);
2441-
--blc-admin-border-subtle: rgba(148, 163, 184, 0.25);
2440+
--blc-admin-border: rgba(148, 163, 184, 0.48);
2441+
--blc-admin-border-subtle: rgba(148, 163, 184, 0.32);
24422442
--blc-admin-text: #f8fafc;
2443-
--blc-admin-text-subtle: rgba(226, 232, 240, 0.7);
2443+
--blc-admin-text-subtle: rgba(226, 232, 240, 0.9);
24442444
--blc-admin-accent: #06b6d4;
24452445
--blc-admin-accent-strong: #0891b2;
24462446
--blc-admin-accent-soft: rgba(6, 182, 212, 0.24);
@@ -2471,8 +2471,13 @@ body.blc-modal-open {
24712471

24722472
.wp-admin.blc-preset--anime-motion .blc-admin-card {
24732473
overflow: hidden;
2474-
border: 1px solid rgba(148, 163, 184, 0.35);
2475-
background: linear-gradient(160deg, rgba(15, 23, 42, 0.8) 0%, rgba(14, 165, 233, 0.18) 100%);
2474+
border: 1px solid var(--blc-admin-border);
2475+
background: linear-gradient(160deg, rgba(15, 23, 42, 0.78) 0%, rgba(14, 165, 233, 0.24) 100%);
2476+
}
2477+
2478+
.wp-admin.blc-preset--anime-motion .blc-admin-card,
2479+
.wp-admin.blc-preset--anime-motion .blc-meta {
2480+
color: var(--blc-admin-text);
24762481
}
24772482

24782483
.wp-admin.blc-preset--anime-motion .blc-admin-card::before {

liens-morts-detector-jlg/includes/blc-surveillance.php

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ function blc_save_surveillance_thresholds(array $thresholds) {
6868
* @return array{global:array<int,array<string,mixed>>,taxonomy:array<int,array<string,mixed>>}
6969
*/
7070
function blc_get_surveillance_threshold_definitions() {
71+
static $call_depth = 0;
72+
7173
$defaults = blc_get_surveillance_threshold_defaults();
7274
$stored = array();
7375

@@ -80,21 +82,27 @@ function blc_get_surveillance_threshold_definitions() {
8082

8183
$stored = blc_normalize_surveillance_thresholds($stored);
8284

83-
$definitions = array(
84-
'global' => blc_merge_surveillance_threshold_groups($defaults['global'], $stored['global']),
85-
'taxonomy' => blc_merge_surveillance_threshold_groups($defaults['taxonomy'], $stored['taxonomy']),
86-
);
85+
$call_depth++;
8786

88-
if (function_exists('apply_filters')) {
89-
/**
90-
* Allow plugins to customize the surveillance thresholds before evaluation.
91-
*
92-
* @param array{global:array<int,array<string,mixed>>,taxonomy:array<int,array<string,mixed>>} $definitions Threshold definitions.
93-
*/
94-
$definitions = apply_filters('blc_surveillance_threshold_definitions', $definitions);
95-
}
87+
try {
88+
$definitions = array(
89+
'global' => blc_merge_surveillance_threshold_groups($defaults['global'], $stored['global']),
90+
'taxonomy' => blc_merge_surveillance_threshold_groups($defaults['taxonomy'], $stored['taxonomy']),
91+
);
9692

97-
return blc_normalize_surveillance_thresholds($definitions);
93+
if ($call_depth === 1 && function_exists('apply_filters')) {
94+
/**
95+
* Allow plugins to customize the surveillance thresholds before evaluation.
96+
*
97+
* @param array{global:array<int,array<string,mixed>>,taxonomy:array<int,array<string,mixed>>} $definitions Threshold definitions.
98+
*/
99+
$definitions = apply_filters('blc_surveillance_threshold_definitions', $definitions);
100+
}
101+
102+
return blc_normalize_surveillance_thresholds($definitions);
103+
} finally {
104+
$call_depth--;
105+
}
98106
}
99107
}
100108

0 commit comments

Comments
 (0)