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() {
4040 // Support Webmention delete
4141 add_action ( 'webmention_data_error ' , array ( static ::class, 'delete ' ) );
4242
43+ // Add scheduler for async processing
44+ add_action ( 'webmention_process_schedule ' , array ( static ::class, 'process ' ) );
45+
4346 self ::register_meta ();
4447 }
4548
@@ -317,6 +320,17 @@ public static function post( $request ) {
317320 return new WP_REST_Response ( $ return , 202 );
318321 }
319322
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 ) {
320334 /**
321335 * Filter Comment Data for Webmentions.
322336 *
You can’t perform that action at this time.
0 commit comments