Skip to content

Commit

Permalink
✨ 优化百度提交响应 #448
Browse files Browse the repository at this point in the history
  • Loading branch information
Licoy committed Oct 25, 2024
1 parent 1dcf0cb commit e4f1a65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/fun/core.php
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ function pk_baidu_submit($post_ID)
$post_url = get_permalink($post_ID);
$api_url = pk_get_option('baidu_submit_url');
$resp = wp_remote_post($api_url, array('body' => $post_url, 'headers' => 'Content-Type: text/plain'));
$res = json_decode($resp['body'], true);
$res = @json_decode($resp['body'], true);
if (isset($res['success'])) {
add_post_meta($post_ID, 'baidu_submit_url_status', 1, true);
}
Expand Down

0 comments on commit e4f1a65

Please sign in to comment.