<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="/wp-content/plugins/rss-beauty/pink.xsl"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WP Archives - obaby 𝐢‍𝐧⃝ void</title>
	<atom:link href="https://oba.by/tag/wp/feed/" rel="self" type="application/rss+xml" />
	<link>https://zhongxiaojie.com/tag/wp/</link>
	<description>程序媛 / 独立开发者 / 智商不稳定的女神经</description>
	<lastBuildDate>Thu, 23 Apr 2026 06:28:54 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://oba.by/wp-content/uploads/2026/01/uugai.com-166111691272754-100x100.png</url>
	<title>WP Archives - obaby 𝐢‍𝐧⃝ void</title>
	<link>https://zhongxiaojie.com/tag/wp/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Baby Press &#8212; 前后端分离的WP系统</title>
		<link>https://oba.by/2026/04/933/</link>
					<comments>https://oba.by/2026/04/933/#comments</comments>
		
		<dc:creator><![CDATA[obaby]]></dc:creator>
		<pubDate>Tue, 14 Apr 2026 01:53:19 +0000</pubDate>
				<category><![CDATA[程序媛]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WP]]></category>
		<category><![CDATA[重构]]></category>
		<guid isPermaLink="false">https://zhongxiaojie.cn/?p=933</guid>

					<description><![CDATA[WP的系统怎么说呢，有时候真的感觉一言难尽，庞杂的功能，丰富的插件、主题。几乎能满足所有人的需求，当然，也能满 [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a href="https://zhongxiaojie.cn/wp-content/uploads/2026/04/330A0342-scaled.jpg" data-lbwps-width="1707" data-lbwps-height="2560" data-lbwps-srcsmall="https://zhongxiaojie.cn/wp-content/uploads/2026/04/330A0342-scaled.jpg" data-lightbox="gal[933]"><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-939" src="https://zhongxiaojie.cn/wp-content/uploads/2026/04/330A0342-scaled.jpg" alt="" width="1707" height="2560" srcset="https://oba.by/wp-content/uploads/2026/04/330A0342-scaled.jpg?v=1776068795 1707w, https://oba.by/wp-content/uploads/2026/04/330A0342-200x300.jpg?v=1776068795 200w, https://oba.by/wp-content/uploads/2026/04/330A0342-683x1024.jpg?v=1776068795 683w, https://oba.by/wp-content/uploads/2026/04/330A0342-100x150.jpg?v=1776068795 100w, https://oba.by/wp-content/uploads/2026/04/330A0342-768x1152.jpg?v=1776068795 768w, https://oba.by/wp-content/uploads/2026/04/330A0342-1024x1536.jpg?v=1776068795 1024w, https://oba.by/wp-content/uploads/2026/04/330A0342-1365x2048.jpg?v=1776068795 1365w, https://oba.by/wp-content/uploads/2026/04/330A0342-665x998.jpg?v=1776068795 665w, https://oba.by/wp-content/uploads/2026/04/330A0342-173x260.jpg?v=1776068795 173w" sizes="(max-width: 1707px) 100vw, 1707px" /></a></p>
<p>WP的系统怎么说呢，有时候真的感觉一言难尽，庞杂的功能，丰富的插件、主题。几乎能满足所有人的需求，当然，也能满足我的需求。</p>
<p><span id="more-933"></span></p>
<p>之所以要做这么个东西，最主要的是前几天在杜老师的聊天室收到一条消息：</p>
<p><a href="https://zhongxiaojie.cn/wp-content/uploads/2026/04/Jietu20260413-153059@2x.jpg" data-lbwps-width="2022" data-lbwps-height="172" data-lbwps-srcsmall="https://zhongxiaojie.cn/wp-content/uploads/2026/04/Jietu20260413-153059@2x.jpg" data-lightbox="gal[933]"><img decoding="async" class="alignnone size-full wp-image-935" src="https://zhongxiaojie.cn/wp-content/uploads/2026/04/Jietu20260413-153059@2x.jpg" alt="" width="2022" height="172" srcset="https://oba.by/wp-content/uploads/2026/04/Jietu20260413-153059@2x.jpg?v=1776065571 2022w, https://oba.by/wp-content/uploads/2026/04/Jietu20260413-153059@2x-300x26.jpg?v=1776065571 300w, https://oba.by/wp-content/uploads/2026/04/Jietu20260413-153059@2x-1024x87.jpg?v=1776065571 1024w, https://oba.by/wp-content/uploads/2026/04/Jietu20260413-153059@2x-150x13.jpg?v=1776065571 150w, https://oba.by/wp-content/uploads/2026/04/Jietu20260413-153059@2x-768x65.jpg?v=1776065571 768w, https://oba.by/wp-content/uploads/2026/04/Jietu20260413-153059@2x-1536x131.jpg?v=1776065571 1536w, https://oba.by/wp-content/uploads/2026/04/Jietu20260413-153059@2x-665x57.jpg?v=1776065571 665w" sizes="(max-width: 2022px) 100vw, 2022px" /></a></p>
<p>跟随这条消息我也去了解了一下这个东西，按照官方的说法，其实是这么个东西：</p>
<blockquote><p>Cloudflare 将这款项目命名为 <b><a class="RichContent-EntityWord css-b7erz1" href="https://zhida.zhihu.com/search?content_id=272537863&amp;content_type=Article&amp;match_order=1&amp;q=EmDash&amp;zd_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ6aGlkYV9zZXJ2ZXIiLCJleHAiOjE3NzYyMzg0MzQsInEiOiJFbURhc2giLCJ6aGlkYV9zb3VyY2UiOiJlbnRpdHkiLCJjb250ZW50X2lkIjoyNzI1Mzc4NjMsImNvbnRlbnRfdHlwZSI6IkFydGljbGUiLCJtYXRjaF9vcmRlciI6MSwiemRfdG9rZW4iOm51bGx9.hbNLrLtb-W2woQtKCaeh8T7iKQUwMCCBhwPN3gNKYjo&amp;zhida_source=entity" target="_blank" rel="noopener" data-za-not-track-link="true" data-paste-text="true">EmDash</a></b>，将其定位为 <b>WordPress 的精神继承者</b>，这并不是对 WordPress 简单的复刻，而是<b>用现代化技术栈，重新实现一套面向未来的 CMS</b>，并且重点解决了 WordPress 24 年发展中积累的的架构臃肿、安全隐患与性能瓶颈问题。</p></blockquote>
<p>说是高性能的wp，但是实际上跟wp没有任何的关系，除了所谓的精神继承。刚开始我还以为是基于wp的优化，现在看来其实是完全做了另外一套系统，这<strong>精神继承</strong>，可以说是非常抽象了。</p>
<p>再加上 『爱看』在我没有<del>丢失以前的网站数据</del>的时候，就一直建议可以自己写个系统。重新搭建之后，他又提过几次：</p>
<p><a href="https://zhongxiaojie.cn/wp-content/uploads/2026/04/UserslingPictures截图Jietu20260413-151422@2x-scaled.jpg" data-lbwps-width="2560" data-lbwps-height="494" data-lbwps-srcsmall="https://zhongxiaojie.cn/wp-content/uploads/2026/04/UserslingPictures截图Jietu20260413-151422@2x-scaled.jpg" data-lightbox="gal[933]"><img decoding="async" class="alignnone size-full wp-image-936" src="https://zhongxiaojie.cn/wp-content/uploads/2026/04/UserslingPictures截图Jietu20260413-151422@2x-scaled.jpg" alt="" width="2560" height="494" srcset="https://oba.by/wp-content/uploads/2026/04/UserslingPictures截图Jietu20260413-151422@2x-scaled.jpg?v=1776065812 2560w, https://oba.by/wp-content/uploads/2026/04/UserslingPictures截图Jietu20260413-151422@2x-300x58.jpg?v=1776065812 300w, https://oba.by/wp-content/uploads/2026/04/UserslingPictures截图Jietu20260413-151422@2x-1024x198.jpg?v=1776065812 1024w, https://oba.by/wp-content/uploads/2026/04/UserslingPictures截图Jietu20260413-151422@2x-150x29.jpg?v=1776065812 150w, https://oba.by/wp-content/uploads/2026/04/UserslingPictures截图Jietu20260413-151422@2x-768x148.jpg?v=1776065812 768w, https://oba.by/wp-content/uploads/2026/04/UserslingPictures截图Jietu20260413-151422@2x-1536x296.jpg?v=1776065812 1536w, https://oba.by/wp-content/uploads/2026/04/UserslingPictures截图Jietu20260413-151422@2x-2048x395.jpg?v=1776065812 2048w, https://oba.by/wp-content/uploads/2026/04/UserslingPictures截图Jietu20260413-151422@2x-665x128.jpg?v=1776065812 665w, https://oba.by/wp-content/uploads/2026/04/UserslingPictures截图Jietu20260413-151422@2x-1348x260.jpg?v=1776065812 1348w" sizes="(max-width: 2560px) 100vw, 2560px" /></a></p>
<p>既然 cf可以这么干，那么自己当然也可以这么干。只是，这次自己既不想重写，又不想使用php，于是，我换了最熟悉的django+vue3来实现这个新的系统，至于数据库当然还是用wp原来的。既然设计好这一切，那么声息的就是让ai开始动工了。</p>
<p><a href="https://zhongxiaojie.cn/wp-content/uploads/2026/04/Jietu20260413-162804@2x-scaled.jpg" data-lbwps-width="2560" data-lbwps-height="1615" data-lbwps-srcsmall="https://zhongxiaojie.cn/wp-content/uploads/2026/04/Jietu20260413-162804@2x-scaled.jpg" data-lightbox="gal[933]"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-940" src="https://zhongxiaojie.cn/wp-content/uploads/2026/04/Jietu20260413-162804@2x-scaled.jpg" alt="" width="2560" height="1615" srcset="https://oba.by/wp-content/uploads/2026/04/Jietu20260413-162804@2x-scaled.jpg?v=1776068916 2560w, https://oba.by/wp-content/uploads/2026/04/Jietu20260413-162804@2x-300x189.jpg?v=1776068916 300w, https://oba.by/wp-content/uploads/2026/04/Jietu20260413-162804@2x-1024x646.jpg?v=1776068916 1024w, https://oba.by/wp-content/uploads/2026/04/Jietu20260413-162804@2x-150x95.jpg?v=1776068916 150w, https://oba.by/wp-content/uploads/2026/04/Jietu20260413-162804@2x-768x485.jpg?v=1776068916 768w, https://oba.by/wp-content/uploads/2026/04/Jietu20260413-162804@2x-1536x969.jpg?v=1776068916 1536w, https://oba.by/wp-content/uploads/2026/04/Jietu20260413-162804@2x-2048x1292.jpg?v=1776068916 2048w, https://oba.by/wp-content/uploads/2026/04/Jietu20260413-162804@2x-665x420.jpg?v=1776068916 665w, https://oba.by/wp-content/uploads/2026/04/Jietu20260413-162804@2x-412x260.jpg?v=1776068916 412w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></a></p>
<p>当然在开发过程中，不可避免的要面临一些问题，例如wp的shortcode，主题插件的一些功能：相册、代码高亮等等。不过这些东西都可以重新通过python进行处理和渲染。还有一些php的原生小组件渲染就有些困难了，这些只能通过其他方法进行实现。例如归属地、ua，访客信息等等。暂时尚未完成，为了处理ip归属地查询，目前将插件的归属地查询已经独立成了python服务，开源地址：<a href="https://cnb.cool/oba.by/baby-ip-location" target="_blank" rel="noopener">https://cnb.cool/oba.by/baby-ip-location</a></p>
<p>测试地址：<a href="https://ip.zhongxiaojie.cn" target="_blank" rel="noopener">https://ip.zhongxiaojie.cn</a></p>
<p><a href="https://zhongxiaojie.cn/wp-content/uploads/2026/04/2026-04-13-16.35.48-ip.zhongxiaojie.cn-bd6eded2e665-scaled.jpg" data-lbwps-width="2560" data-lbwps-height="1846" data-lbwps-srcsmall="https://zhongxiaojie.cn/wp-content/uploads/2026/04/2026-04-13-16.35.48-ip.zhongxiaojie.cn-bd6eded2e665-scaled.jpg" data-lightbox="gal[933]"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-941" src="https://zhongxiaojie.cn/wp-content/uploads/2026/04/2026-04-13-16.35.48-ip.zhongxiaojie.cn-bd6eded2e665-scaled.jpg" alt="" width="2560" height="1846" srcset="https://oba.by/wp-content/uploads/2026/04/2026-04-13-16.35.48-ip.zhongxiaojie.cn-bd6eded2e665-scaled.jpg?v=1776069378 2560w, https://oba.by/wp-content/uploads/2026/04/2026-04-13-16.35.48-ip.zhongxiaojie.cn-bd6eded2e665-300x216.jpg?v=1776069378 300w, https://oba.by/wp-content/uploads/2026/04/2026-04-13-16.35.48-ip.zhongxiaojie.cn-bd6eded2e665-1024x739.jpg?v=1776069378 1024w, https://oba.by/wp-content/uploads/2026/04/2026-04-13-16.35.48-ip.zhongxiaojie.cn-bd6eded2e665-150x108.jpg?v=1776069378 150w, https://oba.by/wp-content/uploads/2026/04/2026-04-13-16.35.48-ip.zhongxiaojie.cn-bd6eded2e665-768x554.jpg?v=1776069378 768w, https://oba.by/wp-content/uploads/2026/04/2026-04-13-16.35.48-ip.zhongxiaojie.cn-bd6eded2e665-1536x1108.jpg?v=1776069378 1536w, https://oba.by/wp-content/uploads/2026/04/2026-04-13-16.35.48-ip.zhongxiaojie.cn-bd6eded2e665-2048x1477.jpg?v=1776069378 2048w, https://oba.by/wp-content/uploads/2026/04/2026-04-13-16.35.48-ip.zhongxiaojie.cn-bd6eded2e665-665x480.jpg?v=1776069378 665w, https://oba.by/wp-content/uploads/2026/04/2026-04-13-16.35.48-ip.zhongxiaojie.cn-bd6eded2e665-360x260.jpg?v=1776069378 360w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></a></p>
<p>当前测试页面效果：</p>
<p><a href="https://zhongxiaojie.cn/wp-content/uploads/2026/04/2026-04-14-09.51.23-i.zhongxiaojie.cn-7455ee5b34d3.jpg" data-lbwps-width="3128" data-lbwps-height="16742" data-lbwps-srcsmall="https://zhongxiaojie.cn/wp-content/uploads/2026/04/2026-04-14-09.51.23-i.zhongxiaojie.cn-7455ee5b34d3.jpg" data-lightbox="gal[933]"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-949" src="https://zhongxiaojie.cn/wp-content/uploads/2026/04/2026-04-14-09.51.23-i.zhongxiaojie.cn-7455ee5b34d3.jpg" alt="" width="3128" height="16742" /></a></p>
<p>访问地址：</p>
<p><a href="https://i.zhongxiaojie.cn" target="_blank" rel="noopener">https://i.zhongxiaojie.cn</a></p>
<p>代码暂未开源，还在继续完善。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://oba.by/2026/04/933/feed/</wfw:commentRss>
			<slash:comments>77</slash:comments>
		
		
			</item>
		<item>
		<title>开源项目目录📇</title>
		<link>https://oba.by/2026/03/593/</link>
					<comments>https://oba.by/2026/03/593/#comments</comments>
		
		<dc:creator><![CDATA[obaby]]></dc:creator>
		<pubDate>Sat, 14 Mar 2026 08:14:31 +0000</pubDate>
				<category><![CDATA[程序媛]]></category>
		<category><![CDATA[gitee]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[WP]]></category>
		<category><![CDATA[微信]]></category>
		<category><![CDATA[插件]]></category>
		<guid isPermaLink="false">https://zhongxiaojie.cn/?p=593</guid>

					<description><![CDATA[部分开源项目源码。 PHP8 探针项目（包含WP插件） 专业的服务器监控和管理工具，提供实时系统监控、性能测试 [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a href="https://zhongxiaojie.cn/wp-content/uploads/2026/03/58603a31.jpg" data-lbwps-width="2127" data-lbwps-height="1080" data-lbwps-srcsmall="https://zhongxiaojie.cn/wp-content/uploads/2026/03/58603a31.jpg" data-lightbox="gal[593]"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-597" src="https://zhongxiaojie.cn/wp-content/uploads/2026/03/58603a31.jpg" alt="" width="2127" height="1080" srcset="https://oba.by/wp-content/uploads/2026/03/58603a31.jpg?v=1773476059 2127w, https://oba.by/wp-content/uploads/2026/03/58603a31-300x152.jpg?v=1773476059 300w, https://oba.by/wp-content/uploads/2026/03/58603a31-1024x520.jpg?v=1773476059 1024w, https://oba.by/wp-content/uploads/2026/03/58603a31-150x76.jpg?v=1773476059 150w, https://oba.by/wp-content/uploads/2026/03/58603a31-768x390.jpg?v=1773476059 768w, https://oba.by/wp-content/uploads/2026/03/58603a31-1536x780.jpg?v=1773476059 1536w, https://oba.by/wp-content/uploads/2026/03/58603a31-2048x1040.jpg?v=1773476059 2048w, https://oba.by/wp-content/uploads/2026/03/58603a31-665x338.jpg?v=1773476059 665w, https://oba.by/wp-content/uploads/2026/03/58603a31-512x260.jpg?v=1773476059 512w" sizes="auto, (max-width: 2127px) 100vw, 2127px" /></a></p>
<p>部分开源项目源码。</p>
<p><span id="more-593"></span></p>
<h1>PHP8 探针项目（包含WP插件）</h1>
<p>专业的服务器监控和管理工具，提供实时系统监控、性能测试、数据库检测等功能。本项目包含两个版本：独立PHP探针和WordPress插件版本。</p>
<h2> 项目结构</h2>
<div class="markdown-code-block">
<pre><code class="hljs hljs-">php8-probe/
├── phpprobe.php              # 独立PHP探针（可直接访问）
├── php-probe-widget/         # WordPress插件版本
│   ├── php-probe-widget.php  # 主插件文件
│   ├── includes/             # 小组件类
│   ├── css/                  # 前端样式
│   ├── js/                   # 前端脚本
│   └── README.md             # 插件详细文档
├── LICENSE                   # 许可证
└── README.md                 # 本文件
</code></pre>
<div class="markdown-code-block-copy-btn"></div>
</div>
<h2><a id="user-content--快速开始" class="anchor" href="https://gitee.com/obaby/php8-probe#-%E5%BF%AB%E9%80%9F%E5%BC%80%E5%A7%8B"></a><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f680.png" alt="🚀" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 快速开始</h2>
<h3><a id="user-content-方式一独立php探针" class="anchor" href="https://gitee.com/obaby/php8-probe#%E6%96%B9%E5%BC%8F%E4%B8%80%E7%8B%AC%E7%AB%8Bphp%E6%8E%A2%E9%92%88"></a>方式一：独立PHP探针</h3>
<ol>
<li>将 <code>phpprobe.php</code> 上传到您的Web服务器</li>
<li>通过浏览器访问该文件即可查看服务器信息</li>
<li>支持实时监控、性能测试、数据库检测等功能</li>
</ol>
<p><strong>特点：</strong></p>
<ul>
<li><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 无需安装，直接使用</li>
<li><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 单文件部署，简单方便</li>
<li><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 支持多平台（Linux、Windows、macOS、FreeBSD）</li>
<li><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 实时系统监控</li>
</ul>
<h3><a id="user-content-方式二wordpress插件" class="anchor" href="https://gitee.com/obaby/php8-probe#%E6%96%B9%E5%BC%8F%E4%BA%8Cwordpress%E6%8F%92%E4%BB%B6"></a>方式二：WordPress插件</h3>
<ol>
<li>将 <code>php-probe-widget</code> 文件夹复制到 <code>wp-content/plugins/</code> 目录</li>
<li>在WordPress后台激活&#8221;服务器监控探针&#8221;插件</li>
<li>进入 <strong>外观 &gt; 小组件</strong> 页面</li>
<li>将&#8221;服务器监控探针&#8221;小组件拖拽到侧边栏</li>
<li>配置显示选项和主题设置</li>
</ol>
<p><a href="https://gitee.com/obaby/php8-probe" target="_blank" rel="noopener">https://gitee.com/obaby/php8-probe</a></p>
<hr />
<h1>结巴分词HTTP服务</h1>
<p>基于Flask和jieba的本地HTTP分词服务。</p>
<p><a href="https://gitee.com/obaby/baby-jb-server" target="_blank" rel="noopener">https://gitee.com/obaby/baby-jb-server</a></p>
<hr />
<h1>WordPress 博客数据分析工具</h1>
<p>这是一个用于分析 WordPress 博客数据的 Python 工具，可以通过 WordPress REST API 获取并分析博客的文章和评论数据。</p>
<h2><a id="user-content-功能特性" class="anchor" href="https://gitee.com/obaby/baby-wp-data-analysis-tool#%E5%8A%9F%E8%83%BD%E7%89%B9%E6%80%A7"></a>功能特性</h2>
<ul>
<li><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4dd.png" alt="📝" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 统计指定年份发布的文章数量（按月统计）</li>
<li><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4ac.png" alt="💬" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 统计指定年份的评论数量</li>
<li><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f3c6.png" alt="🏆" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 分析评论用户的评论数排行</li>
<li><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4be.png" alt="💾" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 将分析结果保存为 JSON 文件</li>
</ul>
<p><a href="https://gitee.com/obaby/baby-wp-data-analysis-tool" target="_blank" rel="noopener">https://gitee.com/obaby/baby-wp-data-analysis-tool</a></p>
<hr />
<h1>微信双开脚本 (WeChat Dual Launch Script)</h1>
<p>一个用于 macOS 系统的微信双开自动化脚本，通过复制微信应用并修改 Bundle ID 实现真正的微信双开功能。</p>
<h2><a id="user-content--功能特性" class="anchor" href="https://gitee.com/obaby/baby-wechat#-%E5%8A%9F%E8%83%BD%E7%89%B9%E6%80%A7"></a><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4cb.png" alt="📋" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 功能特性</h2>
<ul>
<li><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <strong>一键双开</strong> &#8211; 自动完成所有设置步骤</li>
<li><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <strong>智能检测</strong> &#8211; 自动检测已存在的 WeChat2.app</li>
<li><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <strong>安全可靠</strong> &#8211; 完善的错误处理和权限检查</li>
<li><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <strong>彩色输出</strong> &#8211; 友好的命令行界面</li>
<li><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <strong>进程管理</strong> &#8211; 查看和管理微信进程</li>
<li><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <strong>自动化设置</strong> &#8211; 无需手动执行复杂命令</li>
</ul>
<p><a href="https://github.com/obaby/baby-wechat" target="_blank" rel="noopener">https://github.com/obaby/baby-wechat</a></p>
<hr />
<div class="markdown-heading" dir="auto">
<h1 class="heading-element" dir="auto" tabindex="-1">Baby 足迹地图</h1>
<p>&nbsp;</p>
</div>
<div class="markdown-heading" dir="auto">
<h2 class="heading-element" dir="auto" tabindex="-1">简介：</h2>
<p>&nbsp;</p>
</div>
<p dir="auto">基于百度地图的足迹地图。<br />
启动服务之后，先去后台 地图 key 设置页面，添加百度地图浏览器端 ak！<br />
启动服务之后，先去后台 地图 key 设置页面，添加百度地图浏览器端 ak！<br />
启动服务之后，先去后台 地图 key 设置页面，添加百度地图浏览器端 ak！</p>
<p dir="auto">为了防止 js 地址解析受限，需要同时添加服务端 ak！<br />
为了防止 js 地址解析受限，需要同时添加服务端 ak！<br />
为了防止 js 地址解析受限，需要同时添加服务端 ak！</p>
<p dir="auto">添加之后，访问： <a href="http://127.0.0.1:10099/api/location/process-my-location/" rel="nofollow">http://127.0.0.1:10099/api/location/process-my-location/</a> 地址刷新数据库的地点坐标信息，后续无需再通过 js 接口进行解析！</p>
<p><a href="https://github.com/obaby/BabyFootprintV2" target="_blank" rel="noopener">https://github.com/obaby/BabyFootprintV2</a></p>
<hr />
<h1 class="heading-element" dir="auto" tabindex="-1">Simple microblogging</h1>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">Add a microblog to your site; display the microposts in a widget or using a shortcode. 
增强版优化页面显示，增加分页功能。wp微博插件。</pre>
<p>&nbsp;</p>
<p><a href="https://github.com/obaby/Simple-microblogging-wordpress-plugin" target="_blank" rel="noopener">https://github.com/obaby/Simple-microblogging-wordpress-plugin</a></p>
<hr />
<div class="markdown-heading" dir="auto">
<h1 class="heading-element" dir="auto" tabindex="-1">Baby WP 评论强化拦截插件</h1>
<p>&nbsp;</p>
</div>
<p dir="auto">一个强大的WordPress评论过滤插件，支持字数限制、中文检测、关键词过滤等功能。</p>
<div class="markdown-heading" dir="auto">
<h2 class="heading-element" dir="auto" tabindex="-1">插件信息</h2>
<p>&nbsp;</p>
</div>
<ul dir="auto">
<li><strong>插件名称</strong>: Baby WP 评论强化拦截插件</li>
<li><strong>版本</strong>: 1.0.5</li>
<li><strong>作者</strong>: obaby</li>
<li><strong>作者网址</strong>: <a href="https://h4ck.org.cn/" rel="nofollow">https://h4ck.org.cn</a></li>
<li><strong>许可证</strong>: GPL v2 or later</li>
</ul>
<div class="markdown-heading" dir="auto">
<h2 class="heading-element" dir="auto" tabindex="-1">功能特性</h2>
<p>&nbsp;</p>
</div>
<div class="markdown-heading" dir="auto">
<h3 class="heading-element" dir="auto" tabindex="-1"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f6e1.png" alt="🛡" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 评论过滤功能</h3>
<p>&nbsp;</p>
</div>
<ul dir="auto">
<li><strong>字数限制</strong>: 设置评论的最少和最多字数</li>
<li><strong>中文检测</strong>: 要求评论必须包含中文字符</li>
<li><strong>关键词过滤</strong>: 支持自定义关键词和WordPress设置的关键词</li>
<li><strong>正则表达式支持</strong>: 支持使用正则表达式进行高级匹配</li>
</ul>
<div class="markdown-heading" dir="auto">
<h3 class="heading-element" dir="auto" tabindex="-1"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2699.png" alt="⚙" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 管理功能</h3>
<p>&nbsp;</p>
</div>
<ul dir="auto">
<li><strong>简单设置界面</strong>: 直观的管理后台设置页面</li>
<li><strong>错误消息自定义</strong>: 可以自定义各种错误提示消息和标题</li>
<li><strong>统计信息</strong>: 记录评论过滤统计信息，支持重置功能</li>
<li><strong>WordPress集成</strong>: 与WordPress讨论设置完美集成，支持实时预览</li>
<li><strong>设置验证</strong>: 完整的输入验证和数据清理机制</li>
</ul>
<div class="markdown-heading" dir="auto">
<h3 class="heading-element" dir="auto" tabindex="-1"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f527.png" alt="🔧" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 技术特性</h3>
<p>&nbsp;</p>
</div>
<ul dir="auto">
<li><strong>简单架构</strong>: 采用简单的面向对象架构，易于维护</li>
<li><strong>性能优化</strong>: 高效的过滤算法，不影响网站性能</li>
<li><strong>兼容性</strong>: 支持WordPress 5.0+版本，PHP 7.4+</li>
<li><strong>多语言</strong>: 支持多语言环境</li>
<li><strong>数据安全</strong>: 完整的输入验证和清理机制</li>
<li><strong>错误处理</strong>: 完善的错误处理和日志记录</li>
</ul>
<p><a href="https://github.com/obaby/baby-wp-comment-filter" target="_blank" rel="noopener">https://github.com/obaby/baby-wp-comment-filter</a></p>
<hr />
<div class="markdown-heading" dir="auto">
<h1 class="heading-element" dir="auto" tabindex="-1">WinRAR-Keygen</h1>
<p>&nbsp;</p>
</div>
<div class="markdown-heading" dir="auto">
<h2 class="heading-element" dir="auto" tabindex="-1">1. What is WinRAR?</h2>
<p>&nbsp;</p>
</div>
<ul dir="auto">
<li>
<p dir="auto">WinRAR is a trialware file archiver utility for Windows, developed by Eugene Roshal of win.rar GmbH.</p>
</li>
<li>
<p dir="auto">It can create and view archives in RAR or ZIP file formats and unpack numerous archive file formats.</p>
</li>
<li>
<p dir="auto">WinRAR is not a free software. If you want to use it, you should pay to <a href="https://rarlab.com/" rel="nofollow"><strong>RARLAB</strong></a> and then you will get a license file named <code>"rarreg.key"</code>.</p>
</li>
<li>
<p dir="auto">This repository will tell you how WinRAR license file <code>"rarreg.key"</code> is generated.</p>
</li>
</ul>
<div class="markdown-heading" dir="auto">
<h2 class="heading-element" dir="auto" tabindex="-1">2. How is &#8220;rarreg.key&#8221; generated?</h2>
<p>&nbsp;</p>
</div>
<ul dir="auto">
<li>
<p dir="auto">WinRAR uses a signature algorithm, which is a variant of Chinese SM2 digital signature algorithm, to process the user&#8217;s name and the license type he/she got. Save the result to &#8220;rarreg.key&#8221; and add some header info, then a license file is generated.</p>
</li>
</ul>
<p><a href="https://github.com/obaby/winrar-keygen" target="_blank" rel="noopener">https://github.com/obaby/winrar-keygen</a></p>
<hr />
<div class="markdown-heading" dir="auto">
<h1 class="heading-element" dir="auto" tabindex="-1">Baby Device Manager</h1>
<p>&nbsp;</p>
</div>
<p dir="auto">一个功能强大的WordPress设备管理系统插件，支持设备分组管理、设备信息管理、自定义排序、状态跟踪等功能。</p>
<div class="markdown-heading" dir="auto">
<h2 class="heading-element" dir="auto" tabindex="-1">功能特点</h2>
<p>&nbsp;</p>
</div>
<ul dir="auto">
<li>设备分组管理
<ul dir="auto">
<li>创建和管理设备分组</li>
<li>自定义分组排序</li>
<li>分组描述信息</li>
</ul>
</li>
<li>设备管理
<ul dir="auto">
<li>添加/编辑/删除设备</li>
<li>设备状态管理（在售、停售、已售出、维修中、已报废）</li>
<li>设备图片和产品链接</li>
<li>自定义设备排序</li>
<li>设备描述信息</li>
</ul>
</li>
<li>前端展示
<ul dir="auto">
<li>响应式布局</li>
<li>按分组分类显示</li>
<li>支持多种排序方式</li>
<li>美观的界面设计</li>
<li>支持自定义每行显示设备数量（1-6个）</li>
</ul>
</li>
<li>其他功能
<ul dir="auto">
<li>图片管理：支持设备图片上传和显示</li>
<li>产品链接：支持添加产品详情页链接</li>
<li>状态跟踪：支持多种设备状态管理</li>
<li>自定义排序：支持设备分组和设备的自定义排序</li>
</ul>
</li>
</ul>
<p><a href="https://github.com/obaby/Baby-Device-Manager" target="_blank" rel="noopener">https://github.com/obaby/Baby-Device-Manager</a></p>
<hr />
<div class="relative cnb-markdown-heading group">
<h1 class="cnb-markdown-heading-com">RSS Beauty</h1>
<p>&nbsp;</p>
</div>
<p>为 WordPress RSS Feed 提供美观的网页展示样式（基于 <a class="cursor-pointer hover:underline" href="https://cnb.cool/110?url=https%3A%2F%2Frss.beauty" target="_blank" rel="noopener">RSS.Beauty</a> 的 Pink 主题）。</p>
<div class="relative cnb-markdown-heading group">
<h2 class="cnb-markdown-heading-com">项目功能</h2>
<p>&nbsp;</p>
</div>
<ul>
<li><strong>RSS 样式化</strong>：在 Feed 中注入 XSL 样式表，浏览器打开 feed 地址时以 HTML 页面形式展示，而非原始 XML。</li>
<li><strong>Feed Content-Type</strong>：将 feed 的 Content-Type 设为 <code>application/xml</code>，使浏览器按 XML 解析并应用 <code>xml-stylesheet</code>。</li>
<li><strong>XSL 地址</strong>：样式表使用插件目录下的静态文件 <code>pink.xsl</code>。需在 OpenResty/Nginx 中为 <code>.xsl</code> 配置正确的 Content-Type（见下方配置说明），否则浏览器可能不按 XSL 解析。</li>
<li><strong>主题</strong>：内置淡粉色（light pink）页面背景与适配的文字颜色。</li>
</ul>
<p><a href="https://cnb.cool/oba.by/rss-beauty" target="_blank" rel="noopener">https://cnb.cool/oba.by/rss-beauty</a></p>
<hr />
<div class="relative cnb-markdown-heading group">
<h1 class="cnb-markdown-heading-com">WP-UserAgent</h1>
<p>&nbsp;</p>
</div>
<p><strong>Contributors:</strong> obaby<br />
<strong>Donate Link:</strong> <a class="cursor-pointer hover:underline" href="https://cnb.cool/110?url=https%3A%2F%2Foba.by" target="_blank" rel="noopener">https://oba.by</a><br />
<strong>Tags:</strong> useragent, user-agent, user agent, web, browser, web browser, operating system, platform, os, mac, apple, windows, win, linux, phone<br />
<strong>Requires at least:</strong> 2.0<br />
<strong>Tested up to:</strong> 6.3<br />
<strong>Stable tag:</strong> 16.06.99</p>
<div class="relative cnb-markdown-heading group">
<h2 class="cnb-markdown-heading-com">IP 查询方式（归属地）</h2>
<p>&nbsp;</p>
</div>
<p>插件支持四种 IP 查询方式，可在 <strong>设置 → WP-UserAgent</strong> 中选择：</p>
<table>
<thead>
<tr>
<th>方式</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>IP2Location</strong></td>
<td>使用 IP2Location 数据库（需将 BIN 文件放入 <code>show-useragent/ip2location_db/db/</code>），依赖 Composer</td>
</tr>
<tr>
<td><strong>CZDB</strong></td>
<td>使用纯真 CZDB 数据库（需授权与 db 文件放入 <code>show-useragent/czdb/db/</code>），依赖 Composer</td>
</tr>
<tr>
<td><strong>ip2region</strong></td>
<td>使用 ip2region xdb（<strong>仅内置 ip2reginapi，不依赖 Composer</strong>）。需将 xdb 文件放入 <code>show-useragent/ip2region_db/</code>，文件名：<code>ip2region_v4.xdb</code>、<code>ip2region_v6.xdb</code></td>
</tr>
<tr>
<td><strong>纯真QQWRY</strong></td>
<td>使用 qqwry_api（qqwry.dat + ipv6wry.db），无需 Composer。数据文件放入 <code>show-useragent/qqwry_api/ipdata/</code></td>
</tr>
</tbody>
</table>
<p>选择 <strong>ip2region</strong> 或 <strong>纯真QQWRY</strong> 时不会加载 <code>vendor/autoload.php</code>。若选择 IP2Location 或 CZDB 时 vendor 加载失败，插件会自动回退为 ip2region 模式，避免站点白屏。</p>
<div class="relative cnb-markdown-heading group">
<h2 class="cnb-markdown-heading-com">Description</h2>
<p>&nbsp;</p>
</div>
<p><strong>WP-UserAgent</strong> is a simple plugin that allows you to display details about a computer&#8217;s <a class="cursor-pointer hover:underline" href="https://cnb.cool/110?url=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FOperating_system" target="_blank" rel="noopener">operating system</a> or <a class="cursor-pointer hover:underline" href="https://cnb.cool/110?url=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FWeb_browser" target="_blank" rel="noopener">web browser</a> that your visitors comment from.</p>
<p>It uses the comment-&gt;agent property to access the <a class="cursor-pointer hover:underline" href="https://cnb.cool/110?url=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FUser_agent" target="_blank" rel="noopener">User-Agent string</a>. Through a series of regular expressions, this plugin is able to detect the operating system and browser which can be integrated in comments or placed in custom places through your template(s).</p>
<p>I&#8217;m adding new web browsers and operating systems frequently, as well as updating and optimizing the source code. Your feedback is very important, new features have been added by request, so if there&#8217;s something you would like to see in <strong>WP-UserAgent</strong>, <a class="cursor-pointer hover:underline" href="https://cnb.cool/110?url=https%3A%2F%2Fwww.kyleabaker.com%2Fgoodies%2Fcoding%2Fwp-useragent%2F" target="_blank" rel="noopener">leave a comment</a>, and I&#8217;ll see what I can do.</p>
<p><strong>WP-UserAgent</strong> was written with Geany &#8211; <a class="cursor-pointer hover:underline" href="https://cnb.cool/110?url=http%3A%2F%2Fwww.geany.org%2F" target="_blank" rel="noopener">http://www.geany.org/</a><br />
Images created with The Gimp &#8211; <a class="cursor-pointer hover:underline" href="https://cnb.cool/110?url=http%3A%2F%2Fwww.gimp.org%2F" target="_blank" rel="noopener">http://www.gimp.org/</a></p>
<blockquote><p><strong>注意：</strong></p>
<ul>
<li>使用 <strong>CZDB</strong> 时：若更新替换纯真数据库，请同步更新 <code>show-useragent/ip2c-text.php</code> 中的 <code>$key = 'n2pf2+PrE1y9I55MjdpLpg==';</code></li>
<li>使用 <strong>ip2region</strong> 时：将 xdb 文件放入 <code>show-useragent/ip2region_db/</code>（<code>ip2region_v4.xdb</code>、<code>ip2region_v6.xdb</code>），无需 Composer。</li>
</ul>
</blockquote>
<p><a href="https://cnb.cool/oba.by/wp-useragent" target="_blank" rel="noopener">https://cnb.cool/oba.by/wp-useragent</a></p>
<p>&nbsp;</p>
<h1>Baby Press</h1>
<p>一个前后端分离的 WordPress 数据读取项目：</p>
<ul>
<li>后端使用 Django + Django REST Framework 提供 API</li>
<li>前端使用 Vue 3 + TypeScript + Vite 展示数据</li>
<li>支持读取现有 WordPress 表，并兼容可配置表前缀（如 <code>wp_</code>、<code>wp123_</code>）</li>
</ul>
<p>当前项目仅是WP系统的外挂插件，目前不能脱离WP系统独立使用！！！</p>
<h3><a id="user-content-项目定位与特点" class="anchor" href="https://gitee.com/obaby/baby-press-public#%E9%A1%B9%E7%9B%AE%E5%AE%9A%E4%BD%8D%E4%B8%8E%E7%89%B9%E7%82%B9"></a>项目定位与特点</h3>
<ul>
<li><strong>定位</strong>：本仓库是 <strong>Baby Press</strong> 的后端部分，以 <strong>Django + Django REST Framework</strong> 提供 <code>/api/</code> 前缀的 REST 接口；数据层 <strong>直连现有 WordPress MySQL 库</strong>（不通过 Django 迁移改写 WP 表结构），并配合 <strong>可配置表前缀</strong> 适配不同站点。</li>
<li><strong>双库架构</strong>：<code>default</code> 使用本地 <strong>SQLite</strong> 存放 Django 管理表与扩展业务表（菜单覆盖、侧边栏编排、社交链接等）；<code>wordpress</code> 连接 <strong>WordPress 业务库</strong>，避免把 Django 迁移写入 WP 库。</li>
<li><strong>与 WP 的边界</strong>：内容、用户登录态、评论主数据等均依赖 WordPress；后端侧重 <strong>只读查询</strong> 与 <strong>评论等少量写操作</strong>，部分能力还需站点侧 <strong>WordPress 插件</strong>（如表情、CREN 退订语义等，详见仓库根目录 <code>README.md</code>）。</li>
<li><strong>管理后台</strong>：使用 <strong>django-simpleui</strong> 维护本地扩展配置；生产环境推荐 <strong>Daphne（ASGI）</strong> 启动，与前后端分离部署方式一致。</li>
</ul>
<h3><a id="user-content-主要功能后端侧" class="anchor" href="https://gitee.com/obaby/baby-press-public#%E4%B8%BB%E8%A6%81%E5%8A%9F%E8%83%BD%E5%90%8E%E7%AB%AF%E4%BE%A7"></a>主要功能（后端侧）</h3>
<ul>
<li><strong>内容</strong>：文章列表与详情、按 <code>slug</code> 读取页面/文章（页面优先、文章回退）。</li>
<li><strong>评论</strong>：读取已审核评论、提交新评论（写入 <code>wp_comments</code>；可选对接反垃圾分类服务、去重与提交频控、遵循 WP「讨论」设置；可选 <strong>Object Cache Pro</strong> 评论缓存失效、<strong>Nginx FastCGI 缓存</strong> 异步清理）。</li>
<li><strong>站点与导航</strong>：站点元信息、多级导航菜单；菜单结果可与 SQLite 中的 <strong>屏蔽规则 / 追加项</strong> 合并输出。</li>
<li><strong>侧栏与社交</strong>：侧边栏聚合（近期文章、评论、分类、标签云、友情链接等）；<strong>小组件顺序与类型</strong>（含自定义 HTML）、<strong>「功能」链接</strong> 由后台配置；<strong>社交账号</strong> 列表供页眉/页脚共用。</li>
<li><strong>其他接口</strong>：<code>GET /api/wp/auth/me/</code> 探测 WordPress 登录 Cookie；<strong>Besties</strong> 列表；站内探测用接口等（见下文「API 一览」）。</li>
</ul>
<p>项目地址：<a href="https://gitee.com/obaby/baby-press-public" target="_blank" rel="noopener">https://gitee.com/obaby/baby-press-public</a></p>
<p>预览地址：<a href="https://i.zhongxiaojie.cn/" target="_blank" rel="noopener">https://i.zhongxiaojie.cn/</a></p>
<div class="relative cnb-markdown-heading group">
<h1 class="cnb-markdown-heading-com">baby-ip-loacation</h1>
<p><a id="self-content-baby-ip-loacation" class="repo-file-markdown-heading-link top-0 h-full flex items-center justify-center absolute pr-1 left-[-20px] max-xl:left-[-18px] opacity-0 group-hover:opacity-100 pb-2" href="https://cnb.cool/oba.by/baby-ip-location#baby-ip-loacation"></a></div>
<p>离线 IP 归属地相关资源与查询服务：包含 WordPress 插件侧 PHP 逻辑（<code>show-useragent</code>），以及独立的 <strong>Python HTTP 查询服务</strong>（<code>ip_lookup_service</code>），数据源与 <code>ip2c-text.php</code> 中的配置一致。</p>
<div class="relative cnb-markdown-heading group">
<pre class="EnlighterJSRAW" data-enlighter-language="generic">目录说明
路径	说明
show-useragent/	PHP / Composer 依赖与 IP 查询插件代码（含 ip2c-text.php）
ip_db/	Python 服务使用的离线库目录（需自行放入数据文件，见下表）
ip_lookup_service/	FastAPI 查询服务与 ip_lookup 包
ip_lookup_service/static/flags_svg/	国旗 SVG 资源（已从 PHP 插件目录迁移）
ip_lookup_service/static/ua_icons/24/net、.../os	浏览器 /操作系统图标（24px PNG，命名与 wp-useragent 的 code 一致）
ip_lookup_service/static/index.html 等	介绍页与测试页（由服务根路径与 /test/* 提供）
venv/	本地虚拟环境（可选，见下文创建方式）</pre>
<div class="relative cnb-markdown-heading group">
<h3 class="cnb-markdown-heading-com"><code>p_db</code> 中应放置的文件</h3>
<p><a id="self-content-ip_db-中应放置的文件" class="repo-file-markdown-heading-link top-0 h-full flex items-center justify-center absolute pr-1 left-[-20px] max-xl:left-[-18px] opacity-0 group-hover:opacity-100" href="https://cnb.cool/oba.by/baby-ip-location#ip_db-%E4%B8%AD%E5%BA%94%E6%94%BE%E7%BD%AE%E7%9A%84%E6%96%87%E4%BB%B6"></a></div>
<p>将现有库从 <code>show-useragent</code> 下复制或软链接到下列路径（文件名需一致）：</p>
</div>
<div>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">子目录	文件
ip_db/ip2location/	IP2LOCATION-LITE-DB11.BIN、IP2LOCATION-LITE-DB11.IPV6.BIN
ip_db/czdb/	cz88_public_v4.czdb、cz88_public_v6.czdb
ip_db/ip2region/	ip2region_v4.xdb、ip2region_v6.xdb
ip_db/qqwry/	qqwry.dat、ipv6wry.db</pre>
<p>项目地址：<a href="https://cnb.cool/oba.by/baby-ip-location" target="_blank" rel="noopener">https://cnb.cool/oba.by/baby-ip-location</a></p>
</div>
<div></div>
<div></div>
]]></content:encoded>
					
					<wfw:commentRss>https://oba.by/2026/03/593/feed/</wfw:commentRss>
			<slash:comments>81</slash:comments>
		
		
			</item>
		<item>
		<title>WP-UserAgent [增强版 16.01.01]</title>
		<link>https://oba.by/2026/01/104/</link>
					<comments>https://oba.by/2026/01/104/#comments</comments>
		
		<dc:creator><![CDATA[obaby]]></dc:creator>
		<pubDate>Sat, 17 Jan 2026 01:35:37 +0000</pubDate>
				<category><![CDATA[程序媛]]></category>
		<category><![CDATA[IP2Location]]></category>
		<category><![CDATA[WP]]></category>
		<category><![CDATA[归属地]]></category>
		<category><![CDATA[纯真]]></category>
		<guid isPermaLink="false">https://zhongxiaojie.cn/?p=104</guid>

					<description><![CDATA[就是为了解决ipv6归属地只显示中国的问题。 集成 IP2Location PHP 模块支持 添加 IP 查询 [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a href="https://zhongxiaojie.cn/wp-content/uploads/2026/01/Screenshot-2026-01-17-092104.png" data-lbwps-width="2332" data-lbwps-height="1594" data-lbwps-srcsmall="https://zhongxiaojie.cn/wp-content/uploads/2026/01/Screenshot-2026-01-17-092104.png" data-lightbox="gal[104]"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-105" src="https://zhongxiaojie.cn/wp-content/uploads/2026/01/Screenshot-2026-01-17-092104.png" alt="" width="2332" height="1594" srcset="https://oba.by/wp-content/uploads/2026/01/Screenshot-2026-01-17-092104.png?v=1768613488 2332w, https://oba.by/wp-content/uploads/2026/01/Screenshot-2026-01-17-092104-300x205.png?v=1768613488 300w, https://oba.by/wp-content/uploads/2026/01/Screenshot-2026-01-17-092104-1024x700.png?v=1768613488 1024w, https://oba.by/wp-content/uploads/2026/01/Screenshot-2026-01-17-092104-150x103.png?v=1768613488 150w, https://oba.by/wp-content/uploads/2026/01/Screenshot-2026-01-17-092104-768x525.png?v=1768613488 768w, https://oba.by/wp-content/uploads/2026/01/Screenshot-2026-01-17-092104-1536x1050.png?v=1768613488 1536w, https://oba.by/wp-content/uploads/2026/01/Screenshot-2026-01-17-092104-2048x1400.png?v=1768613488 2048w, https://oba.by/wp-content/uploads/2026/01/Screenshot-2026-01-17-092104-665x455.png?v=1768613488 665w, https://oba.by/wp-content/uploads/2026/01/Screenshot-2026-01-17-092104-380x260.png?v=1768613488 380w" sizes="auto, (max-width: 2332px) 100vw, 2332px" /></a></p>
<p>就是为了解决ipv6归属地只显示中国的问题。</p>
<p><span id="more-104"></span></p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">集成 IP2Location PHP 模块支持
添加 IP 查询方式选择选项（可在插件设置中选择 IP2Location 或 CZDB）
支持从 WordPress 后台设置页面选择 IP 查询方式
实现自动回退机制：如果 IP2Location 模块未安装，自动使用 CZDB 作为备用
优化 IP 查询代码，支持双语国家名称（中文/英文）
添加 getCountryCodeFromIP() 函数，可直接从 IP 获取国家代码
添加中国省份和城市名称翻译功能：当 IP 地址属于中国时，自动将省份（regionName）和城市（cityName）从英文翻译为中文
包含所有34个省级行政区和200+个主要城市的中英文对照表
更新版本号至 16.01.01</pre>
<p>注意：</p>
<p><strong><span style="color: #ff0000;">代码里带的纯真数据库已经过期，需要下载新的数据库，建议直接使用ip2location！</span></strong></p>
<p><strong><span style="color: #ff0000;">代码里带的纯真数据库已经过期，需要下载新的数据库，建议直接使用ip2location！</span></strong></p>
<p><strong><span style="color: #ff0000;">代码里带的纯真数据库已经过期，需要下载新的数据库，建议直接使用ip2location！</span></strong></p>
<p>第一次知道数据库还能过期，尼码，解决这个异常折腾了半天，发现是数据库过期了，艹！ 如果用纯真，请及时更新数据库！！！(2026.01.29)</p>
<p><a href="https://zhongxiaojie.cn/wp-content/uploads/2026/01/Jietu20260129-105838.jpg" data-lbwps-width="1046" data-lbwps-height="98" data-lbwps-srcsmall="https://zhongxiaojie.cn/wp-content/uploads/2026/01/Jietu20260129-105838.jpg" data-lightbox="gal[104]"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-295" src="https://zhongxiaojie.cn/wp-content/uploads/2026/01/Jietu20260129-105838.jpg" alt="" width="1046" height="98" srcset="https://oba.by/wp-content/uploads/2026/01/Jietu20260129-105838.jpg?v=1769655530 1046w, https://oba.by/wp-content/uploads/2026/01/Jietu20260129-105838-300x28.jpg?v=1769655530 300w, https://oba.by/wp-content/uploads/2026/01/Jietu20260129-105838-1024x96.jpg?v=1769655530 1024w, https://oba.by/wp-content/uploads/2026/01/Jietu20260129-105838-150x14.jpg?v=1769655530 150w, https://oba.by/wp-content/uploads/2026/01/Jietu20260129-105838-768x72.jpg?v=1769655530 768w, https://oba.by/wp-content/uploads/2026/01/Jietu20260129-105838-665x62.jpg?v=1769655530 665w" sizes="auto, (max-width: 1046px) 100vw, 1046px" /></a></p>
<p>代码地址：</p>
<p><a href="https://cnb.cool/oba.by/wp-useragent" target="_blank" rel="noopener">https://cnb.cool/oba.by/wp-useragent</a></p>
<p>插件地址：</p>
<p><a href="https://cnb.cool/oba.by/wp-useragent/-/releases" target="_blank" rel="noopener">https://cnb.cool/oba.by/wp-useragent/-/releases</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://oba.by/2026/01/104/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>警告（禁止）	unserialize(): Error at offset 4351 of 4374 bytes</title>
		<link>https://oba.by/2026/01/73/</link>
					<comments>https://oba.by/2026/01/73/#comments</comments>
		
		<dc:creator><![CDATA[obaby]]></dc:creator>
		<pubDate>Fri, 16 Jan 2026 02:44:15 +0000</pubDate>
				<category><![CDATA[程序媛]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WP]]></category>
		<guid isPermaLink="false">https://zhongxiaojie.cn/?p=73</guid>

					<description><![CDATA[解决数据库替换 url 导致的错误。 警告（禁止） unserialize(): Error at offse [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a href="https://zhongxiaojie.cn/wp-content/uploads/2026/01/微信图片_20260116104025_529_42.jpg" data-lbwps-width="1280" data-lbwps-height="1920" data-lbwps-srcsmall="https://zhongxiaojie.cn/wp-content/uploads/2026/01/微信图片_20260116104025_529_42.jpg" data-lightbox="gal[73]"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-74" src="https://zhongxiaojie.cn/wp-content/uploads/2026/01/微信图片_20260116104025_529_42.jpg" alt="" width="1280" height="1920" srcset="https://oba.by/wp-content/uploads/2026/01/微信图片_20260116104025_529_42.jpg?v=1768531341 1280w, https://oba.by/wp-content/uploads/2026/01/微信图片_20260116104025_529_42-200x300.jpg?v=1768531341 200w, https://oba.by/wp-content/uploads/2026/01/微信图片_20260116104025_529_42-683x1024.jpg?v=1768531341 683w, https://oba.by/wp-content/uploads/2026/01/微信图片_20260116104025_529_42-768x1152.jpg?v=1768531341 768w, https://oba.by/wp-content/uploads/2026/01/微信图片_20260116104025_529_42-1024x1536.jpg?v=1768531341 1024w, https://oba.by/wp-content/uploads/2026/01/微信图片_20260116104025_529_42-665x998.jpg?v=1768531341 665w, https://oba.by/wp-content/uploads/2026/01/微信图片_20260116104025_529_42-173x260.jpg?v=1768531341 173w" sizes="auto, (max-width: 1280px) 100vw, 1280px" /></a></p>
<p>解决数据库替换 url 导致的错误。</p>
<p><span id="more-73"></span></p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">警告（禁止）	unserialize(): Error at offset 4351 of 4374 bytes	
wp-includes/functions.php:655
unserialize()
wp-includes/functions.php:655
maybe_unserialize()
wp-includes/functions.php:655
array_map()
wp-includes/meta.php:692
get_metadata_raw()
wp-includes/meta.php:602
get_metadata()
wp-includes/post.php:2712
get_post_meta()
wp-admin/includes/class-wp-privacy-policy-content.php:69
WP_Privacy_Policy_Content::text_change_check()
wp-includes/class-wp-hook.php:341
do_action('admin_init')
wp-admin/admin.php:180</pre>
<p>修复代码：</p>
<pre class="EnlighterJSRAW" data-enlighter-language="php">&lt;?php
/**
 * WordPress 序列化数据修复脚本
 * 修复因直接 SQL REPLACE 导致的序列化数据损坏问题
 * 
 * 使用方法：
 * 1. 修改下面的数据库连接信息
 * 2. 在命令行运行: php fix-unserialize-error.php
 * 3. 或者通过浏览器访问（需要配置 web 服务器）
 */

// ========== 配置区域 ==========
define('DB_HOST', '127.0.0.1');
define('DB_NAME', 'zxj');
define('DB_USER', 'root');
define('DB_PASS', 'zxj');
define('DB_PREFIX', 'wp_'); // 表前缀

// 旧 URL 和新 URL（用于修复）
define('OLD_URL', 'http://test.h4ck.org.cn:18888');
define('NEW_URL', 'https://zhongxiaojie.cn');

// ========== 主程序 ==========

// 连接数据库
try {
    $pdo = new PDO(
        "mysql:host=" . DB_HOST . ";dbname=" . DB_NAME . ";charset=utf8mb4",
        DB_USER,
        DB_PASS,
        [
            PDO::ATTR_ERRMODE =&gt; PDO::ERRMODE_EXCEPTION,
            PDO::ATTR_DEFAULT_FETCH_MODE =&gt; PDO::FETCH_ASSOC
        ]
    );
} catch (PDOException $e) {
    die("数据库连接失败: " . $e-&gt;getMessage() . "\n");
}

echo "==========================================\n";
echo "WordPress 序列化数据修复工具\n";
echo "==========================================\n\n";

/**
 * 修复序列化字符串中的 URL
 * 正确更新序列化数据中的长度信息
 */
function fix_serialized_url($serialized, $old_url, $new_url) {
    // 如果不是序列化数据，直接替换
    if (!is_serialized($serialized)) {
        return str_replace($old_url, $new_url, $serialized);
    }
    
    // 尝试反序列化
    $data = @unserialize($serialized);
    
    // 如果反序列化失败，尝试修复
    if ($data === false &amp;&amp; $serialized !== serialize(false)) {
        // 尝试修复常见的序列化问题
        $fixed = fix_broken_serialize($serialized, $old_url, $new_url);
        $data = @unserialize($fixed);
        
        if ($data === false &amp;&amp; $fixed !== serialize(false)) {
            return false; // 无法修复
        }
        
        $serialized = $fixed;
        $data = @unserialize($serialized);
    }
    
    // 递归替换数组或对象中的 URL
    if (is_array($data)) {
        $data = array_map(function($value) use ($old_url, $new_url) {
            if (is_string($value)) {
                return str_replace($old_url, $new_url, $value);
            } elseif (is_array($value)) {
                return array_map(function($v) use ($old_url, $new_url) {
                    return is_string($v) ? str_replace($old_url, $new_url, $v) : $v;
                }, $value);
            }
            return $value;
        }, $data);
    } elseif (is_object($data)) {
        foreach ($data as $key =&gt; $value) {
            if (is_string($value)) {
                $data-&gt;$key = str_replace($old_url, $new_url, $value);
            }
        }
    } elseif (is_string($data)) {
        $data = str_replace($old_url, $new_url, $data);
    }
    
    // 重新序列化
    return serialize($data);
}

/**
 * 检查字符串是否是序列化数据
 */
function is_serialized($data) {
    if (!is_string($data)) {
        return false;
    }
    $data = trim($data);
    if ('N;' == $data) {
        return true;
    }
    if (strlen($data) &lt; 4) {
        return false;
    }
    if (':' !== $data[1]) {
        return false;
    }
    $semi = strpos($data, ';');
    if (false === $semi) {
        return false;
    }
    $token = $data[0];
    switch ($token) {
        case 's':
            if ('"' !== $data[$semi - 1]) {
                return false;
            }
        case 'a':
        case 'O':
            return (bool) preg_match("/^{$token}:[0-9]+:/s", $data);
        case 'b':
        case 'i':
        case 'd':
            return (bool) preg_match("/^{$token}:[0-9.E-]+;/", $data);
    }
    return false;
}

/**
 * 尝试修复损坏的序列化数据
 */
function fix_broken_serialize($serialized, $old_url = null, $new_url = null) {
    // 如果包含旧 URL，先替换
    if ($old_url &amp;&amp; $new_url &amp;&amp; strpos($serialized, $old_url) !== false) {
        $serialized = str_replace($old_url, $new_url, $serialized);
    }
    
    // 尝试修复长度信息
    // 匹配字符串长度模式: s:数字:"内容"
    // 注意：需要处理转义字符和嵌套引号
    $pattern = '/s:(\d+):"((?:[^"\\\\]|\\\\.)*)"/';
    $serialized = preg_replace_callback($pattern, function($matches) {
        // 计算实际字符串长度（考虑转义字符）
        $str = $matches[2];
        $length = strlen($str);
        return 's:' . $length . ':"' . $str . '"';
    }, $serialized);
    
    return $serialized;
}

/**
 * 检测并修复损坏的序列化数据
 */
function detect_and_fix_broken_serialize($serialized) {
    // 如果不是序列化数据，直接返回
    if (!is_serialized($serialized)) {
        return ['fixed' =&gt; false, 'data' =&gt; $serialized, 'error' =&gt; null];
    }
    
    // 清除之前的错误
    @error_clear_last();
    
    // 尝试反序列化
    $data = @unserialize($serialized);
    
    // 检查是否有错误
    $error = error_get_last();
    
    // 如果反序列化成功且没有错误，返回原数据
    if ($data !== false &amp;&amp; ($error === null || strpos($error['message'], 'unserialize') === false)) {
        // 特殊处理：false 的序列化结果是 'b:0;'
        if ($serialized === 'b:0;' || $serialized === serialize(false)) {
            return ['fixed' =&gt; false, 'data' =&gt; $serialized, 'error' =&gt; null];
        }
        return ['fixed' =&gt; false, 'data' =&gt; $serialized, 'error' =&gt; null];
    }
    
    // 反序列化失败，记录错误
    $original_error = $error ? $error['message'] : 'Unserialize failed';
    
    // 尝试修复长度信息
    $fixed = fix_broken_serialize($serialized);
    @error_clear_last();
    $test_data = @unserialize($fixed);
    $test_error = error_get_last();
    
    if ($test_data !== false &amp;&amp; ($test_error === null || strpos($test_error['message'], 'unserialize') === false)) {
        return ['fixed' =&gt; true, 'data' =&gt; $fixed, 'error' =&gt; $original_error];
    }
    
    // 如果还是失败，尝试更激进的修复
    // 修复所有字符串长度（更精确的匹配）
    $fixed2 = preg_replace_callback('/s:(\d+):"((?:[^"\\\\]|\\\\.)*)"/', function($m) {
        $str = $m[2];
        $len = strlen($str);
        return 's:' . $len . ':"' . $str . '"';
    }, $serialized);
    
    @error_clear_last();
    $test_data2 = @unserialize($fixed2);
    $test_error2 = error_get_last();
    
    if ($test_data2 !== false &amp;&amp; ($test_error2 === null || strpos($test_error2['message'], 'unserialize') === false)) {
        return ['fixed' =&gt; true, 'data' =&gt; $fixed2, 'error' =&gt; $original_error];
    }
    
    return ['fixed' =&gt; false, 'data' =&gt; $serialized, 'error' =&gt; $original_error];
}

$fixed_count = 0;
$error_count = 0;
$broken_count = 0;

// 修复 wp_postmeta 表
echo "[1/4] 检查 wp_postmeta 表中的序列化数据...\n";

// 首先查找所有序列化数据
$stmt = $pdo-&gt;prepare("SELECT meta_id, post_id, meta_key, meta_value FROM " . DB_PREFIX . "postmeta WHERE meta_value LIKE 'a:%' OR meta_value LIKE 'O:%' OR meta_value LIKE 's:%' OR meta_value LIKE 'i:%' OR meta_value LIKE 'b:%' OR meta_value LIKE 'd:%'");
$stmt-&gt;execute();
$all_serialized = $stmt-&gt;fetchAll();

echo "找到 " . count($all_serialized) . " 条可能的序列化数据记录\n";
echo "开始检测损坏的数据...\n\n";

$update_stmt = $pdo-&gt;prepare("UPDATE " . DB_PREFIX . "postmeta SET meta_value = ? WHERE meta_id = ?");
$broken_records = [];

foreach ($all_serialized as $row) {
    $result = detect_and_fix_broken_serialize($row['meta_value']);
    
    if ($result['fixed']) {
        $broken_count++;
        $broken_records[] = [
            'meta_id' =&gt; $row['meta_id'],
            'post_id' =&gt; $row['post_id'],
            'meta_key' =&gt; $row['meta_key'],
            'error' =&gt; $result['error']
        ];
        
        try {
            $update_stmt-&gt;execute([$result['data'], $row['meta_id']]);
            $fixed_count++;
            if ($fixed_count % 10 == 0) {
                echo "  已修复 {$fixed_count} 条损坏的记录...\n";
            }
        } catch (PDOException $e) {
            echo "  ✗ 更新失败 meta_id={$row['meta_id']}: " . $e-&gt;getMessage() . "\n";
            $error_count++;
        }
    }
}

if ($broken_count &gt; 0) {
    echo "\n发现并修复了 {$broken_count} 条损坏的序列化数据\n";
    if (count($broken_records) &lt;= 20) {
        echo "\n损坏的记录详情：\n";
        foreach ($broken_records as $rec) {
            echo "  - meta_id={$rec['meta_id']}, post_id={$rec['post_id']}, meta_key={$rec['meta_key']}\n";
        }
    }
} else {
    echo "未发现损坏的序列化数据\n";
}

// 也检查包含旧 URL 的记录（即使已经修复了长度问题，URL 可能还需要更新）
echo "\n检查是否还有包含旧 URL 的记录...\n";
$stmt = $pdo-&gt;prepare("SELECT meta_id, post_id, meta_key, meta_value FROM " . DB_PREFIX . "postmeta WHERE meta_value LIKE ?");
$stmt-&gt;execute(['%' . OLD_URL . '%']);
$url_rows = $stmt-&gt;fetchAll();

if (count($url_rows) &gt; 0) {
    echo "找到 " . count($url_rows) . " 条包含旧 URL 的记录，正在修复...\n";
    foreach ($url_rows as $row) {
        $original = $row['meta_value'];
        $fixed = fix_serialized_url($original, OLD_URL, NEW_URL);
        
        if ($fixed !== false &amp;&amp; $fixed !== $original) {
            try {
                $update_stmt-&gt;execute([$fixed, $row['meta_id']]);
                $fixed_count++;
            } catch (PDOException $e) {
                $error_count++;
            }
        }
    }
}

echo "\n[2/4] 检查 wp_options 表中的序列化数据...\n";

// 检查所有序列化数据
$stmt = $pdo-&gt;prepare("SELECT option_id, option_name, option_value FROM " . DB_PREFIX . "options WHERE option_value LIKE 'a:%' OR option_value LIKE 'O:%' OR option_value LIKE 's:%' OR option_value LIKE 'i:%' OR option_value LIKE 'b:%' OR option_value LIKE 'd:%'");
$stmt-&gt;execute();
$all_options = $stmt-&gt;fetchAll();

echo "找到 " . count($all_options) . " 条可能的序列化选项\n";
echo "开始检测损坏的数据...\n\n";

$update_stmt = $pdo-&gt;prepare("UPDATE " . DB_PREFIX . "options SET option_value = ? WHERE option_id = ?");
$broken_options = [];

foreach ($all_options as $row) {
    // 跳过 siteurl 和 home
    if (in_array($row['option_name'], ['siteurl', 'home'])) {
        continue;
    }
    
    $result = detect_and_fix_broken_serialize($row['option_value']);
    
    if ($result['fixed']) {
        $broken_count++;
        $broken_options[] = [
            'option_id' =&gt; $row['option_id'],
            'option_name' =&gt; $row['option_name'],
            'error' =&gt; $result['error']
        ];
        
        try {
            $update_stmt-&gt;execute([$result['data'], $row['option_id']]);
            $fixed_count++;
        } catch (PDOException $e) {
            $error_count++;
        }
    }
}

if (count($broken_options) &gt; 0) {
    echo "发现并修复了 " . count($broken_options) . " 条损坏的选项\n";
    if (count($broken_options) &lt;= 20) {
        echo "\n损坏的选项详情：\n";
        foreach ($broken_options as $opt) {
            echo "  - option_id={$opt['option_id']}, option_name={$opt['option_name']}\n";
        }
    }
}

// 检查包含旧 URL 的选项
echo "\n检查是否还有包含旧 URL 的选项...\n";
$stmt = $pdo-&gt;prepare("SELECT option_id, option_name, option_value FROM " . DB_PREFIX . "options WHERE option_value LIKE ?");
$stmt-&gt;execute(['%' . OLD_URL . '%']);
$url_options = $stmt-&gt;fetchAll();

if (count($url_options) &gt; 0) {
    echo "找到 " . count($url_options) . " 条包含旧 URL 的选项，正在修复...\n";
    foreach ($url_options as $row) {
        if (in_array($row['option_name'], ['siteurl', 'home'])) {
            continue;
        }
        
        $original = $row['option_value'];
        $fixed = fix_serialized_url($original, OLD_URL, NEW_URL);
        
        if ($fixed !== false &amp;&amp; $fixed !== $original) {
            try {
                $update_stmt-&gt;execute([$fixed, $row['option_id']]);
                $fixed_count++;
            } catch (PDOException $e) {
                $error_count++;
            }
        }
    }
}

echo "\n[3/4] 检查其他元数据表...\n";
$tables = [
    DB_PREFIX . 'usermeta' =&gt; ['umeta_id', 'user_id', 'meta_key', 'meta_value'],
    DB_PREFIX . 'commentmeta' =&gt; ['meta_id', 'comment_id', 'meta_key', 'meta_value'],
    DB_PREFIX . 'termmeta' =&gt; ['meta_id', 'term_id', 'meta_key', 'meta_value']
];

foreach ($tables as $table =&gt; $columns) {
    if (!table_exists($pdo, $table)) {
        continue;
    }
    
    echo "检查 {$table}...\n";
    
    // 检查所有序列化数据
    $stmt = $pdo-&gt;prepare("SELECT {$columns[0]}, {$columns[1]}, {$columns[2]}, {$columns[3]} FROM {$table} WHERE {$columns[3]} LIKE 'a:%' OR {$columns[3]} LIKE 'O:%' OR {$columns[3]} LIKE 's:%' OR {$columns[3]} LIKE 'i:%' OR {$columns[3]} LIKE 'b:%' OR {$columns[3]} LIKE 'd:%'");
    $stmt-&gt;execute();
    $all_rows = $stmt-&gt;fetchAll();
    
    if (count($all_rows) &gt; 0) {
        echo "  找到 " . count($all_rows) . " 条序列化数据，检测中...\n";
        $update_stmt = $pdo-&gt;prepare("UPDATE {$table} SET {$columns[3]} = ? WHERE {$columns[0]} = ?");
        
        foreach ($all_rows as $row) {
            $result = detect_and_fix_broken_serialize($row[$columns[3]]);
            
            if ($result['fixed']) {
                $broken_count++;
                try {
                    $update_stmt-&gt;execute([$result['data'], $row[$columns[0]]]);
                    $fixed_count++;
                } catch (PDOException $e) {
                    $error_count++;
                }
            }
        }
    }
    
    // 也检查包含旧 URL 的记录
    $stmt = $pdo-&gt;prepare("SELECT {$columns[0]}, {$columns[1]}, {$columns[2]}, {$columns[3]} FROM {$table} WHERE {$columns[3]} LIKE ?");
    $stmt-&gt;execute(['%' . OLD_URL . '%']);
    $url_rows = $stmt-&gt;fetchAll();
    
    if (count($url_rows) &gt; 0) {
        echo "  找到 " . count($url_rows) . " 条包含旧 URL 的记录，正在修复...\n";
        $update_stmt = $pdo-&gt;prepare("UPDATE {$table} SET {$columns[3]} = ? WHERE {$columns[0]} = ?");
        
        foreach ($url_rows as $row) {
            $original = $row[$columns[3]];
            $fixed = fix_serialized_url($original, OLD_URL, NEW_URL);
            
            if ($fixed !== false &amp;&amp; $fixed !== $original) {
                try {
                    $update_stmt-&gt;execute([$fixed, $row[$columns[0]]]);
                    $fixed_count++;
                } catch (PDOException $e) {
                    $error_count++;
                }
            }
        }
    }
}

echo "\n[4/4] 查找可能导致错误的特定记录...\n";
echo "根据错误信息 'Error at offset 4351 of 4374 bytes'，查找长度接近的记录...\n";

// 查找长度在 4300-4400 字节之间的序列化数据
$stmt = $pdo-&gt;prepare("SELECT meta_id, post_id, meta_key, meta_value, LENGTH(meta_value) as value_length FROM " . DB_PREFIX . "postmeta WHERE (meta_value LIKE 'a:%' OR meta_value LIKE 'O:%' OR meta_value LIKE 's:%') AND LENGTH(meta_value) BETWEEN 4300 AND 4400 ORDER BY value_length");
$stmt-&gt;execute();
$suspicious = $stmt-&gt;fetchAll();

if (count($suspicious) &gt; 0) {
    echo "找到 " . count($suspicious) . " 条可疑记录（长度在 4300-4400 字节之间）\n";
    echo "这些记录可能是导致错误的原因：\n\n";
    
    $update_stmt = $pdo-&gt;prepare("UPDATE " . DB_PREFIX . "postmeta SET meta_value = ? WHERE meta_id = ?");
    
    foreach ($suspicious as $sus) {
        echo "  - meta_id={$sus['meta_id']}, post_id={$sus['post_id']}, meta_key={$sus['meta_key']}, length={$sus['value_length']}\n";
        
        // 直接尝试反序列化完整数据
        @error_clear_last();
        $test_data = @unserialize($sus['meta_value']);
        $test_error = error_get_last();
        
        // 检查是否有 unserialize 错误
        if ($test_error &amp;&amp; strpos($test_error['message'], 'unserialize') !== false) {
            echo "    ✗ 检测到损坏: {$test_error['message']}\n";
            echo "    正在修复...\n";
            
            // 尝试修复
            $fix_result = detect_and_fix_broken_serialize($sus['meta_value']);
            
            if ($fix_result['fixed']) {
                try {
                    $update_stmt-&gt;execute([$fix_result['data'], $sus['meta_id']]);
                    echo "    ✓ 已修复并更新数据库\n";
                    $fixed_count++;
                    $broken_count++;
                } catch (PDOException $e) {
                    echo "    ✗ 更新失败: " . $e-&gt;getMessage() . "\n";
                    $error_count++;
                }
            } else {
                // 如果自动修复失败，尝试手动修复字符串长度
                echo "    尝试手动修复字符串长度...\n";
                $manual_fixed = preg_replace_callback('/s:(\d+):"((?:[^"\\\\]|\\\\.)*)"/', function($m) {
                    $str = $m[2];
                    $len = strlen($str);
                    if ($len != $m[1]) {
                        return 's:' . $len . ':"' . $str . '"';
                    }
                    return $m[0];
                }, $sus['meta_value']);
                
                @error_clear_last();
                $manual_test = @unserialize($manual_fixed);
                $manual_error = error_get_last();
                
                if ($manual_test !== false &amp;&amp; ($manual_error === null || strpos($manual_error['message'], 'unserialize') === false)) {
                    try {
                        $update_stmt-&gt;execute([$manual_fixed, $sus['meta_id']]);
                        echo "    ✓ 手动修复成功并更新数据库\n";
                        $fixed_count++;
                        $broken_count++;
                    } catch (PDOException $e) {
                        echo "    ✗ 更新失败: " . $e-&gt;getMessage() . "\n";
                        $error_count++;
                    }
                } else {
                    echo "    ✗ 无法修复此记录\n";
                    echo "    建议：如果这个 meta_key 不重要，可以考虑删除\n";
                    echo "    DELETE FROM " . DB_PREFIX . "postmeta WHERE meta_id = {$sus['meta_id']};\n";
                    $error_count++;
                }
            }
        } else {
            echo "    ✓ 数据正常（未检测到错误）\n";
        }
        echo "\n";
    }
}

function table_exists($pdo, $table) {
    try {
        $stmt = $pdo-&gt;query("SHOW TABLES LIKE '{$table}'");
        return $stmt-&gt;rowCount() &gt; 0;
    } catch (PDOException $e) {
        return false;
    }
}

echo "\n==========================================\n";
echo "修复完成！\n";
echo "==========================================\n";
echo "成功修复: {$fixed_count} 条记录\n";
echo "发现损坏: {$broken_count} 条记录\n";
echo "修复失败: {$error_count} 条记录\n";
echo "\n";

if ($fixed_count &gt; 0) {
    echo "✓ 已修复 {$fixed_count} 条损坏的序列化数据\n";
    echo "\n建议：\n";
    echo "1. 清除 WordPress 缓存（对象缓存、页面缓存）\n";
    echo "2. 刷新后台页面，检查错误是否消失\n";
    echo "3. 如果仍有问题，请提供新的错误信息\n";
} else {
    echo "<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/26a0.png" alt="⚠" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 未发现损坏的序列化数据\n";
    echo "\n可能的原因：\n";
    echo "1. 错误来自其他表或数据\n";
    echo "2. 错误是动态生成的（不是数据库中的数据）\n";
    echo "3. 需要查看完整的错误堆栈信息\n";
    echo "\n建议：\n";
    echo "1. 启用 WordPress 调试模式（wp-config.php 中设置 WP_DEBUG = true）\n";
    echo "2. 查看错误日志，找到具体的 meta_id 或 option_id\n";
    echo "3. 检查 wp-includes/functions.php:655 附近的代码\n";
}

echo "\n";
</pre>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://oba.by/2026/01/73/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
