File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,9 @@ public static function init() {
40
40
// Support Webmention delete
41
41
add_action ( 'webmention_data_error ' , array ( static ::class, 'delete ' ) );
42
42
43
+ // Add scheduler for async processing
44
+ add_action ( 'webmention_process_schedule ' , array ( static ::class, 'process ' ) );
45
+
43
46
self ::register_meta ();
44
47
}
45
48
@@ -317,6 +320,17 @@ public static function post( $request ) {
317
320
return new WP_REST_Response ( $ return , 202 );
318
321
}
319
322
323
+ return self ::process ( $ commentdata );
324
+ }
325
+
326
+ /**
327
+ * Process the Webmention.
328
+ *
329
+ * @param array $commentdata The comment data.
330
+ *
331
+ * @return WP_REST_Response|WP_Error The response or an error.
332
+ */
333
+ public static function process ( $ commentdata ) {
320
334
/**
321
335
* Filter Comment Data for Webmentions.
322
336
*
You can’t perform that action at this time.
0 commit comments