站长百科 | 数字化技能提升教程 数字化时代生存宝典
首页
数字化百科
电子书
▼
建站程序
开发
服务器
办公软件
开发教程
▼
服务器教程
软件使用教程
运营教程
热门电子书
▼
CSS教程
WordPress教程
导航
程序频道
推广频道
网赚频道
人物频道
网站程序
网页制作
云计算
服务器
CMS
论坛
网店
虚拟主机
cPanel
网址导航
WIKI使用导航
WIKI首页
热点词条
最新资讯
网站程序
站长人物
页面分类
使用帮助
编辑测试
创建条目
网站地图
站长百科导航
站长百科
主机侦探
IDCtalk云说
跨境电商导航
WordPress啦
站长专题
网站推广
网站程序
网站赚钱
虚拟主机
cPanel
网址导航专题
云计算
微博营销
虚拟主机管理系统
开放平台
WIKI程序与应用
美国十大主机
编辑“
WordPress:Hacking WordPress
”
人物百科
|
营销百科
|
网赚百科
|
站长工具
|
网站程序
|
域名主机
|
互联网公司
|
分类索引
Seadragon530
(
讨论
|
贡献
)
2008年5月5日 (一) 15:57的版本
(
差异
)
←上一版本
|
最后版本
(
差异
) |
下一版本→
(
差异
)
跳转至:
导航
、
搜索
警告:您正在编辑的是本页面的旧版本。
如果您发布该更改,该版本后的所有更改都会丢失。
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
In very early versions of WordPress, the only way to modify the behavior of WordPress was through a "hack", i.e. by modifying the core files of WordPress. However, since version 1.5, WordPress has offered both [[WordPress:Plugins|plugin]] and [[WordPress:Using Themes|theme]] capabilities as mechanisms to modify nearly everything that WordPress does, from looks to functionality, so hacks are seldom necessary any more, and certainly not recommended. <span style="color:red"><b>Hacks are not officially supported by WordPress. Use at your own risk.</b></span> 在很早的WordPress版本中,唯一修改WordPress行为的方法就是通过"hack",如,通过修改WordPress核心文件。尽管如此,1.5版之后,WordPress提供了 [[WordPress:Plugins|插件]]和[[WordPress:Using Themes|主题]]这两个方法修改几乎所有WordPress能做的东西,从功能上来看,hack几乎已经不需要了,自然的也就不推荐使用了。 <span style="color:red"><b>Hack并不被 WordPress正式的支持。使用有一定风险。</b></span> ==Using WordPress Hacks== Although hacks are not recommended, and since version 1.5 of WordPress, seldom necessary, for completeness, this article still documents the <tt>my-hacks.php</tt> file, which you can enable and use for "hacks". Basically, you can put PHP functions and variable definitions into this file (which goes into your root WordPress installation directory), and if you activate it, it will be loaded just before plugins when WordPress starts up. ==使用WordPress Hacks== 尽管不推荐使用hack,而且从WordPress1.5版后WordPress很少需要,但是为了完整性,本文提到了<tt>my-hacks.php</tt>文件,你可以激活并且使用"hack"。 基本上,你可以吧PHP函数和变量定义放到这个文件中去 (这个文件在你的WordPress安装目录根目录下),如果你激活它,它将在WordPress启动时在插件之前被载入。 To activate <tt>my-hacks.php</tt>: * In the Administration Panel, choose '''Options > Miscellaneous'''. * At the bottom of the page, click the check box for '''<tt>Use legacy my-hacks.php file support</tt>''' to put a check in it. * Click Update to save the changed option. 要激活 <tt>my-hacks.php</tt>: * 在管理面板中选择'''操作 > Miscellaneous'''. * 在页面底部,点击'''<tt>Use legacy my-hacks.php file support</tt>'''复选框,选中它。 * 点击更新保存更改。
摘要:
请注意,您对站长百科的所有贡献都可能被其他贡献者编辑,修改或删除。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源(参阅
Wordpress-mediawiki:版权
的细节)。
未经许可,请勿提交受版权保护的作品!
取消
编辑帮助
(在新窗口中打开)
本页使用的模板:
模板:WordPress导航
(
查看源代码
)(受保护)