File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -582,6 +582,18 @@ protected function validate_search_term( string $search_term ): bool {
582
582
'/\/\*\s*ignore previous\s*\*\//i ' ,
583
583
];
584
584
585
+ /**
586
+ * Filter the attack patterns used in the RAG feature.
587
+ *
588
+ * This filter allows modification of the attack patterns array used by the RAG feature.
589
+ *
590
+ * @since 2.5.0
591
+ * @hook ep_rag_attack_patterns
592
+ * @param {array} $attack_patterns The array of attack patterns.
593
+ * @return {array} The modified array of attack patterns.
594
+ */
595
+ $ attack_patterns = apply_filters ( 'ep_rag_attack_patterns ' , $ attack_patterns );
596
+
585
597
foreach ( $ attack_patterns as $ pattern ) {
586
598
if ( preg_match ( $ pattern , $ search_term ) ) {
587
599
return false ;
You can’t perform that action at this time.
0 commit comments