Skip to content

Commit

Permalink
feat: 开放首条评论 Bark 推送
Browse files Browse the repository at this point in the history
  • Loading branch information
Tokinx authored Nov 13, 2023
1 parent 5582c4a commit 6fe63e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ function bark_push_msg( $comment_id ) {
return false;
}
$comment = get_comment( $comment_id );
if ( (int) $comment->comment_parent <= 0 || $comment->comment_approved === 'spam' ) {
// 如果是垃圾评论,则不推送
if ( $comment->comment_approved === 'spam' ) {
return false;
}
$token = trim( get_theme_mod( 'biji_setting_bark' ) );
Expand Down
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Description: Simple, smooth, data-driven, responsive WordPress theme
Author: Tokin
Author URI: https://biji.io
Version: 0.7.37
Version: 0.7.38
Tested up to: 5.9.3
Requires at least: 5.8
Requires PHP: 7.0
Expand Down

0 comments on commit 6fe63e4

Please sign in to comment.