Skip to content

atmosphere_publish_comment_result

github-actions[bot] edited this page Jul 15, 2026 · 9 revisions

Fires after a comment publish attempt completes, with the final result.

Mirrors atmosphere_publish_post_result. Fires exactly once per publish_comment() invocation regardless of whether the underlying API call or the post-publish bookkeeping was the failure.

Auto-generated Example

/**
 * Fires after a comment publish attempt completes, with the final result.
 * 
 * Mirrors `atmosphere_publish_post_result`. Fires exactly once per
 * `publish_comment()` invocation regardless of whether the underlying
 * API call or the post-publish bookkeeping was the failure.
 *
 * @param WP_Comment      $comment 
 * @param array|\WP_Error $result 
 */
function my_atmosphere_publish_comment_result_callback( WP_Comment $comment, array|\WP_Error $result ) {
    // Your code here.
}
add_action( 'atmosphere_publish_comment_result', 'my_atmosphere_publish_comment_result_callback', 10, 2 );

Parameters

  • WP_Comment $comment The comment that was published.
  • array|\WP_Error $result applyWrites response on success, WP_Error on failure.

Files

\do_action( 'atmosphere_publish_comment_result', $comment, $result )
\do_action( 'atmosphere_publish_comment_result', $comment, $result )

← All Hooks

Clone this wiki locally