回收核心
您只需从核心获取小部件代码,重命名类等,并根据需要进行更改。
OR 你可以简单地
extend
核心widget类,只需更改需要更改的内容(覆盖扩展widget类中的方法)。
然后在顶部添加插件注释并激活它。
/**
* Plugin Name: Custom Link Widget
* Description: Altered from WP Core.
* Version: 0.1
* Required: 3.3
* Author: Your Name <[email protected]>
* Author URI: http://example.com
* License: MIT
* License URI: http://www.opensource.org/licenses/mit-license.php
*/

您可以使用的核心小部件find here.