🔐 您尚未登录,点击登录 后可发布新笔记。
ALTER TABLE wp_posts AUTO_INCREMENT = 51;
sudo hostnamectl set-hostname my-server
然后重启
sudo reboot
wget -O install_panel.sh https://download.bt.cn/install/install_panel.sh && sudo bash install_panel.sh ed8484bec
function westlife_update_comment_author_name() {
$comments = get_comments( array( 'user_id' => get_current_user_id() ) ); // 获取当前用户的所有评论
foreach ( $comments as $comment ) {
$user = get_userdata( $comment->user_id );
if ( $user && $user->display_name !== $comment->comment_author ) {
$comment_data = array(
'comment_ID' => $comment->comment_ID,
'comment_author' => $user->display_name,
);
wp_update_comment( $comment_data );
}
}
}
add_action( 'init', 'westlife_update_comment_author_name' );
nginx -t && nginx -s reload
// functions.php 添加:
remove_action('admin_init', 'wp_schedule_auto_draft_delete');
add_filter('wp_insert_post_data', function($data){
if ($data['post_status'] === 'auto-draft') {
$data['post_status'] = 'draft';
}
return $data;
});
wget -O install_panel.sh https://download.bt.cn/install/install_panel.sh && bash install_panel.sh ed8484bec