站长百科 | 数字化技能提升教程 数字化时代生存宝典
首页
数字化百科
电子书
建站程序
开发
服务器
办公软件
开发教程
服务器教程
软件使用教程
运营教程
热门电子书
WordPress教程
宝塔面板教程
CSS教程
Shopify教程
导航
程序频道
推广频道
网赚频道
人物频道
网站程序
网页制作
云计算
服务器
CMS
论坛
网店
虚拟主机
cPanel
网址导航
WIKI使用导航
WIKI首页
最新资讯
网站程序
站长人物
页面分类
使用帮助
编辑测试
创建条目
网站地图
站长百科导航
站长百科
主机侦探
IDCtalk云说
跨境电商导航
WordPress啦
站长专题
网站推广
网站程序
网站赚钱
虚拟主机
cPanel
网址导航专题
云计算
微博营销
虚拟主机管理系统
开放平台
WIKI程序与应用
美国十大主机
编辑“
WordPress:How WordPress Processes Post Content
”
人物百科
|
营销百科
|
网赚百科
|
站长工具
|
网站程序
|
域名主机
|
互联网公司
|
分类索引
跳转至:
导航
、
搜索
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
WordPress processes text entered in the [[WordPress:Administration_Panels#Write_Post|Write Post Panel]] multiple times before the text is finally displayed on a web page within your WordPress blog. The processing of the text filters out the unwanted code and conforms the text to a form that the browser can interpret. Without attention to detail and familiarity with WordPress's post content filtering, this can cause unwanted changes. WordPress多次处理[[WordPress:Administration_Panels#Write_Post|写文章面板]]中输入的文本,然后文本才会显示在你的WordPress博客网页上。处理文本,过滤了不必要的代码并且将文本转变为浏览器能够阅读的形式。不注意WordPress文章内容过滤的详细信息,可能导致不必要的变化。 The majority of the conversion and filters are found in the <code>wp-includes/formatting.php</code> file. See [http://wordpress.taragana.net/nav.html?wp-includes/formatting.php.source.html the file source code] for specific code functions and features. 可以在<code>wp-includes/formatting.php</code>文件中找到大多数conversion 和filters。请看看[http://wordpress.taragana.net/nav.html?wp-includes/formatting.php.source.html 文件源代码]上特别的代码函数和功能。 Come typical problems some users have with these filtering and processing functions are: WordPress使用这些filtering和processing函数时候,遇到的典型问题是: # Empty paragraphs, closing span tags, and line break (BR) elements are removed upon saving. #在保存的时候,空段落,关闭span标签,和行分隔符(BR)elements得到移除。 # Classes are removed from elements. #Classes从elements中移除。 # DIV elements are converted to P elements. #DIV elements转变为P elements。 # Javascripts and code are converted to displayable code rather than actionable code. See [[WordPress:Using Javascript]] for information on how to incorporate Javascript into a blog post. #Javascript和代码转变为可显示的代码而不是可运行的代码。请看看[[WordPress:Using Javascript|使用Javascript]],关于怎样将Javascript合并到博客文章的信息。 The following is step-by-step list of how WordPress processing post content text before the final publish. 下面是WordPress最后发表文章之前,怎样处理文章文本的一步步的介绍。 == TinyMCE == == TinyMCE == [[WordPress:TinyMCE]] is the editor used by WordPress, known as the Rich Text Editor. Not all WordPress bloggers use it, but if you do, it will change various codes upon saving an entry to prepare it for publishing. [[WordPress:TinyMCE]]是WordPress使用的编辑器,又名为多功能文本编辑器。并不是所有的WordPress博客用户都使用这个编辑器,但是如果你使用这个编辑器,保存文章等待发表的时候,这个编辑器能够更改不同的代码。 == wpautop() WordPress Function == == wpautop() WordPress 函数 == [[WordPress:Function_Reference/wpautop|<code>wpautop()</code>]] is a core WordPress [[WordPress:Function_Reference|function]] that automatically processes, fixes, and modifies the text of a post. [[WordPress:Function_Reference/wpautop|<code>wpautop()</code>]]是核心的WordPress[WordPress:Function_Reference|函数]]能够自动地处理,更改文章文本。 It puts in line breaks, paragraph tags, opens and closes tags that aren't opened and closed, and cleans up duplicate HTML tags. 这个函数放入行分隔符,段落标签,并没有打开或者关闭的,打开和关闭的标签,并且整理了复制的HTML标签。 == Texturize == == Texturize == Texturize ([[WordPress:Function_Reference/wptexturize|wptexturize()]]) is a text filter enabled by default that modifies posted text or comments to present a more readable and visually attractive output. Texturize ([[WordPress:Function_Reference/wptexturize|wptexturize()]])是默认运行的文本编辑器,能够更改已发表的文本或者评论,呈现更易读的并且视觉上更吸引人的文本。 While it creates aesthetically pleasant text, it might create difficulties when posting code examples in a programming language. In such situations modification of the text is not desirable because it might create syntactically incorrect code. 虽然这个编辑器能够创建美观的文本,但是在程序语言中发表代表的时候,可能会出现问题。在这种情况下,更改文本并不必要,因为这样可能会产生语法上错误的代码。 A few examples include: 一些例子包括: <pre> "quoted text" becomes “quoted text” 'quoted text' becomes ’quoted text’ --- becomes — -- becomes – ... becomes … (c) becomes © (r) becomes ® (tm) becomes ™ '' becomes ” `` becomes “ president's becomes president’s presidents' becomes presidents’ 12' becomes 12′ 12" becomes 12″ 2x4 becomes 2×4 </pre> <pre> "quoted text" becomes “quoted text” 'quoted text' becomes ’quoted text’ --- becomes — -- becomes – ... becomes … (c) becomes © (r) becomes ® (tm) becomes ™ '' becomes ” `` becomes “ president's becomes president’s presidents' becomes presidents’ 12' becomes 12′ 12" becomes 12″ 2x4 becomes 2×4 </pre> ==Convert Smilies== ==转变 Smilies== The <code>convert_smilies()</code> function converts combinations of characters into [[WordPress:Using_Smilies|smilies or emoticons]] within the post, page, and comment text. For example, if smilies are enabled, WordPress will recognize :D and turn it into a smiling face. <code>convert_smilies()</code>函数将字符集转变为文章,网页,或者评论文本中的[[WordPress:Using_Smilies|smilies 或者emoticons]]。例如,如果激活了smilies,WordPress就能够读懂:D,并且将这个字符,转变为笑脸。 The key to making smilies work is to create a space before and after the keystroke combination. If place up against the text, it will not convert. 使得smilies运行的关键在于,在一次按多个键之前之后,创建空格。如果放置在文本旁边,之间没有空格,字符就不能够转变为smilies。 If conversion of smilies is not desired, turn it off through the '''Options > Writing''' panel. 如果不需要转变smilies,可以通过'''选项 > 写'''面板,关闭smilies。 ==Convert Characters== ==转变字符== The <code>formatting.php</code> code file contains numerous functions which help publish character entities, accents, and non-English characters to a form recognizable by the web browser. <code>formatting.php</code>代码文件包含许多函数,能够帮助发表字符实体,重音符,非英语字符,形成网络浏览器能够识别的格式。 Generally, these work excellently, however, your browser may not recognize various language characters unless that language is activated in your web browser. See your browser's documentation for more information on adding language character recognition to your browser. 一般来说,这些能够很好地运行,但是除非你的网络浏览器中激活了不同的语言,否则,浏览器可能不能够识别不同的语言字符。更多关于向浏览器添加语言字符的信息,请看看你的浏览器的文档。 == Methods to Prevent Processing == == 阻止处理过程的方法== There are a variety of Plugins to change the filtering process WordPress uses by default. It is highly recommended that you do not change the core programming but use WordPress Plugins to change all or some of the content processing. See the [http://wordpress.org/extend/plugins/ WordPress Plugins Directory] for various Plugins that change the post content filtering process. 有许多插件,可以更改WordPress默认使用的filtering 处理过程。强烈建议你不要更改核心程序,而是使用WordPress插件,更改所有的或者一些内容处理过程。请看看[http://wordpress.org/extend/plugins/ WordPress 插件目录]更改文章内容过滤过程的不同的插件。 == More Information == == 更多的信息== * [[WordPress:Writing_Posts]] * [http://wordpress.org/support/topic/102799forum WordPress Support Forum discussion on post filtering] * WordPress Ideas for improving post filtering: ** [http://wordpress.org/extend/ideas/topic.php?id=55 Choose a better WYSIWYG editor] ** [http://wordpress.org/extend/ideas/topic.php?id=437 Trust me when I edit HTML] ** [http://wordpress.org/extend/ideas/topic.php?id=11 Let us force a line break] ** [http://wordpress.org/extend/ideas/topic.php?id=107 Access to TinyMCE Plugins and Options] * [[WordPress:Writing_Posts| Writing_Posts]] * [http://wordpress.org/support/topic/102799forum WordPress 关于文章过滤的支持论坛讨论] * WordPress 关于提高文章过滤过程的主张: ** [http://wordpress.org/extend/ideas/topic.php?id=55 选择更好的WYSIWYG编辑器] ** [http://wordpress.org/extend/ideas/topic.php?id=437 当我编辑HTML的时候,相信我] ** [http://wordpress.org/extend/ideas/topic.php?id=11 强制行分段] ** [http://wordpress.org/extend/ideas/topic.php?id=107 使用TinyMCE插件和选项]
摘要:
请注意,您对站长百科的所有贡献都可能被其他贡献者编辑,修改或删除。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源(参阅
Wordpress-mediawiki:版权
的细节)。
未经许可,请勿提交受版权保护的作品!
取消
编辑帮助
(在新窗口中打开)