Move Rest API spam blocking outside of CF7 code block
All checks were successful
Generate Build Info / build-info (push) Successful in 2s

This commit is contained in:
carpentryplus25
2026-03-20 09:34:41 -04:00
parent dfe52042af
commit 3fe651b7d1

View File

@@ -1248,6 +1248,11 @@ if ( class_exists( 'WPCF7' ) ) {
</span>';
return $hp . $form;
}
}
add_filter('rest_pre_dispatch', 'dapper_block_cf7_rest_spam', 10, 3);
function dapper_block_cf7_rest_spam($result, $server, $request) {
@@ -1310,8 +1315,6 @@ if ( class_exists( 'WPCF7' ) ) {
}
function add_campaign_management_page() {
add_submenu_page(