站长百科 | 数字化技能提升教程 数字化时代生存宝典
首页
数字化百科
电子书
▼
建站程序
开发
服务器
办公软件
开发教程
▼
服务器教程
软件使用教程
运营教程
热门电子书
▼
CSS教程
WordPress教程
导航
程序频道
推广频道
网赚频道
人物频道
网站程序
网页制作
云计算
服务器
CMS
论坛
网店
虚拟主机
cPanel
网址导航
WIKI使用导航
WIKI首页
热点词条
最新资讯
网站程序
站长人物
页面分类
使用帮助
编辑测试
创建条目
网站地图
站长百科导航
站长百科
主机侦探
IDCtalk云说
跨境电商导航
WordPress啦
站长专题
网站推广
网站程序
网站赚钱
虚拟主机
cPanel
网址导航专题
云计算
微博营销
虚拟主机管理系统
开放平台
WIKI程序与应用
美国十大主机
编辑“
WordPress:Migrating Plugins and Themes to 2.5
”(章节)
人物百科
|
营销百科
|
网赚百科
|
站长工具
|
网站程序
|
域名主机
|
互联网公司
|
分类索引
跳转至:
导航
、
搜索
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
===TinyMCE 升级到3版本=== The upcoming WordPress version 2.5 includes TinyMCE 3 which is a complete rewrite of the editor. There are many changes in the API and all WordPress plugins that add button(s) to it have to be updated. Good places to start are: 即将发行的2.5版本包括TinyMCE 3,这是编辑器的完全重写。API发生了许多变化,所有向API添加按钮的WordPress插件需要更新。下面是一些推荐开始操作的站点: * http://wiki.moxiecode.com/index.php/TinyMCE:Create_plugin/3.x * http://wiki.moxiecode.com/index.php/TinyMCE:API * http://codex.wordpress.org/TinyMCE_Custom_Buttons * http://wiki.moxiecode.com/index.php/TinyMCE:Create_plugin/3.x * http://wiki.moxiecode.com/index.php/TinyMCE:API * http://codex.wordpress.org/TinyMCE_Custom_Buttons Of course adding a button that will insert some code at the cursor location is still quite easy. The "pagebreak" plugin can be used as an example. 当然,添加按钮,在指针的位置插入一些代码,仍然比较容易。"pagebreak"插件可以用在一个例子。 For loading the plugins there is a new filter $mce_external_plugins that takes an array 'name' => 'url' and inserts it in the zipped TinyMCE. It's best to use absolute url (with or without the host name), as using relative needs some settings in the init array to stay at the default values (that can be changed by a WordPress plugin), so it would be possible to break the loading of external plugins that use relative url. TinyMCE would still not load a plugin from another domain. 载入插件,有个新的 filter $mce_external_plugins,带有数组'name' => 'url'并且将其插入解压后的TinyMCE。最好使用绝对的url(有或者没有主机名),因为使用相对的url,在init数组中需要一些设置,保持默认参数值(可以由WordPress插件更改),因此有可能破坏使用相对的url的外部插件的载入。TinyMCE仍然不会从另一个域名中载入插件。 The gzip compressor has changed too. Now it gathers all parts of TinyMCE and outputs the zipped file all in one step. The action "mce_options" is still supported, but deprecated. The action "tinymce_before_init" is replaced by a filter "tiny_mce_before_init" that is applied to the array with all settings for TinyMCE. Also the zipped file is cached on disk to save some memory/server resources. This cache is invalidated by any change to the init array or by changing the ver=[number] arg when calling tiny_mce_config. The version is filtered by "tiny_mce_version" defined in /wp-includes/script-loader.php, so a plugin can change it. Gzip压缩器也更改了。现在gzip收集了TinyMCE的所有部分,并且一次输出所有压缩文件。action "mce_options"仍然得到支持但是已取消。action "tinymce_before_init"由使用TinyMCE的所有设置应用到数组的filter "tiny_mce_before_init"所取代。同时,压缩的文件储存在磁盘上以节省一些内存/服务器资源。更改了init数组或者调用tiny_mce_config时,更改了ver=[number] arg,都会使得存储无效。版本由定义在/wp-includes/script-loader.php中的"tiny_mce_version"过滤,因此插件可以更改。 There are changes in loading language files too. The language codes are only ISO 639-1, which is just the first 2 letters from WordPress locale, like de, fr, es, etc. TinyMCE will load langs/[lang].js when a plugin is loaded and if the plugin has a popup, it will load langs/[lang]_dlg.js when the popup is opened. 载入语言文件也发生了变化。语言代码只是ISO 639-1,是WordPress本地化语言的前两个字母,如de, fr, es,等等。当载入插件而且插件有弹出窗口的时候,TinyMCE会载入langs/[lang].js,如果弹出窗口是打开的,TinyMCE会载入langs/[lang]_dlg.js。 The loading of the default language strings is different too. Now they all are defined in tinymce/langs/wp-langs.php, so they can be included in the main .pot file and translated to all languages available in WordPress. A plugin can use any of the strings there, check the tinyMCE.i18n js object when TinyMCE is loaded, to see how to reference them. 载入默认语言字符串也不同。现在,这些都定义在tinymce/langs/wp-langs.php,因此可以包含在主要的.pot文件而且翻译为WordPress中的所有语言。插件可以使用那里的任何字符串,载入TinyMCE的时候,检查tinyMCE.i18n js object,看看怎样reference them。
摘要:
请注意,您对站长百科的所有贡献都可能被其他贡献者编辑,修改或删除。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源(参阅
Wordpress-mediawiki:版权
的细节)。
未经许可,请勿提交受版权保护的作品!
取消
编辑帮助
(在新窗口中打开)