站长百科 | 数字化技能提升教程 数字化时代生存宝典
首页
数字化百科
电子书
建站程序
开发
服务器
办公软件
开发教程
服务器教程
软件使用教程
运营教程
热门电子书
WordPress教程
宝塔面板教程
CSS教程
Shopify教程
导航
程序频道
推广频道
网赚频道
人物频道
网站程序
网页制作
云计算
服务器
CMS
论坛
网店
虚拟主机
cPanel
网址导航
WIKI使用导航
WIKI首页
最新资讯
网站程序
站长人物
页面分类
使用帮助
编辑测试
创建条目
网站地图
站长百科导航
站长百科
主机侦探
IDCtalk云说
跨境电商导航
WordPress啦
站长专题
网站推广
网站程序
网站赚钱
虚拟主机
cPanel
网址导航专题
云计算
微博营销
虚拟主机管理系统
开放平台
WIKI程序与应用
美国十大主机
编辑“
WordPress:Plugin API/Filter Reference
”
人物百科
|
营销百科
|
网赚百科
|
站长工具
|
网站程序
|
域名主机
|
互联网公司
|
分类索引
跳转至:
导航
、
搜索
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
This article is a (hopefully complete) list of the filter hooks available for use in plugin development in Version 2.1 and above of WordPress. For more information: 这篇文章是WordPress2.1以及更高版本中的插件发展中可以使用的filter hooks的列表(希望全面)。更多的信息: * To learn more about what filter and action hooks are, see [[WordPress:Plugin API]]. *学习更多关于filter和action hooks是什么的内容,请看看[[WordPress:Plugin API|插件API]]。 * To learn about writing plugins in general, see [[WordPress:Writing a Plugin]]. *学习更多编写插件的内容,请看看[[WordPress:Writing a Plugin|编写插件]]。 * For a reference list of action hooks, see [[WordPress:Plugin API/Action Reference]]. *关于action hooks的reference列表,请看看[[WordPress:Plugin API/Filter Reference|插件API/Action Reference]]。 * For information about filter and action hooks in previous versions of WordPress, see [[WordPress:Plugin API/Hooks 2.0.x]]. *关于WordPress早期版本的filter 和 action hooks的信息,请看看[[WordPress:Plugin API/Hooks 2.0.x|插件API/Hooks 2.0.x]] Note: If you want to add to or clarify this documentation, please follow the style of the existing entries. Describe what data the filter is applied to, and if the filter function takes additional arguments, describe the argument list. 注:如果你想要添加或者解释这个文件,请采用当前的文章格式。描述filter应用到什么数据,如果filter函数带有额外的参数,描述参数列表。 == Post, Page, and Attachment (Upload) Filters == == 文章,网页,和Attachment (上传) Filters == See also [[WordPress:#Category Filters]], [[WordPress:#Author and User Filters]], [[WordPress:#Link Filters]], [[WordPress:#Date and Time Filters]], and [[WordPress:#Administrative Filters]] below. 也看看下面的[[WordPress:#Category Filters|类别Filters]], [[WordPress:#Author and User Filters|#作者和用户Filters]], [[WordPress:#Link Filters|#链接Filters]], [[WordPress:#Date and Time Filters|#日期和时间Filters]], 和[[WordPress:#Administrative Filters|#管理Filters]]。 === Database Reads === ===数据库 Reads === Filters in this section are applied to information read from the database, prior to displaying on a page or editing screen. 这个部分的Filters应用到来自数据库的信息,在显示网页或者编辑界面之前。 ;attachment_icon: applied to the icon for an attachment in the <tt>get_attachment_icon</tt> function. Filter function arguments: icon file as an HTML IMG tag, attachment ID. ;attachment_icon:为<tt>get_attachment_icon</tt>函数中的附属使用图标。Filter函数参数:图标文件作为HTML图像标签,附属ID。 ;attachment_innerHTML: applied to the title to be used for an attachment if there is no icon, in the <tt>get_attachment_innerHTML</tt> function. Filter function arguments: inner HTML (defaults to the title), attachment ID. ;attachment_innerHTML:如果<tt>get_attachment_innerHTML</tt>函数中没有图标,应用到attachment中的标题。Filter function arguments:内置HTML(默认为标题),attachment ID。 ;content_edit_pre: applied to post content prior to display for editing. ;content_edit_pre:显示编辑文章内容之前,应用到文章内容。 ;excerpt_edit_pre: applied to post excerpt prior to display for editing. ;excerpt_edit_pre:显示编辑摘录之前,应用到摘录中。 ;get_attached_file: applied to the attached file information retrieved by the <tt>get_attached_file</tt> function. Filter function arguments: file information, attachment ID. ;get_attached_file:应用到<tt>get_attached_file</tt>函数得到的附件信息。Filter function arguments:文件信息, attachment ID。 ;get_enclosed: applied to the enclosures list for a post by the <tt>get_enclosed</tt> function. ;get_enclosed: <tt>get_enclosed</tt>函数将这个filter应用到文章enclosures列表上。 ;get_pages: applied to the list of pages returned by the <tt>get_pages</tt> function. Filter function arguments: list of pages (each item of which contains a page data array), <tt>get_pages</tt> function argument list (telling which pages were requested). ;get_pages:应用到<tt>get_pages</tt>函数返回的网页列表上。Filter function arguments:网页列表(每个网页包含网页数据数组),<tt>get_pages</tt>函数参数列表(告知请求哪个网页)。 ;get_pung: applied to the list of pinged URLs for a post by the <tt>get_pung</tt> function. ;get_pung: <tt>get_pung</tt>函数将这个filter应用到文章pinged URLs列表上。 ;get_the_excerpt: applied to the post's excerpt in the <tt>get_the_excerpt</tt> function. ;get_the_excerpt:应用到<tt>get_the_excerpt</tt>函数中的文章摘录中。 ;get_the_guid: applied to the post's GUID in the <tt>get_the_guid</tt> function. ;get_the_guid:应用到<tt>get_the_guid</tt>函数中的文章GUID中。 ;get_to_ping: applied to the list of URLs to ping for a post by the <tt>get_to_ping</tt> function. ;get_to_ping:应用到URLs列表,<tt>get_to_ping</tt>函数ping文章。 ;icon_dir: applied to the template's image directory in several functions. Basically allows a plugin to specify that icons for MIME types should come from a different location. ;icon_dir:应用到几个函数中的模板的图像目录。一般允许插件规定MIME类型的插件应该来自不同的位置。 ;icon_dir_uri: applied to the template's image directory URI in several functions. Basically allows a plugin to specify that icons for MIME types should come from a different location. ;icon_dir_uri:应用到几个函数中的模板的图像目录URI。一般允许插件规定MIME类型的插件应该来自不同的位置。 ;prepend_attachment: applied to the HTML to be prepended by the <tt>prepend_attachment</tt> function. ;prepend_attachment:应用到HTML,前面附有<tt>prepend_attachment</tt>函数。 ;sanitize_title: applied to a post title by the <tt>sanitize_title</tt> function, after stripping out HTML tags. ;sanitize_title:去除HTML标签后,由<tt>sanitize_title</tt>函数应有到文章标题。 ;single_post_title: applied to the post title when used to create a blog page title by the <tt>wp_title</tt> and <tt>single_post_title</tt> functions. ;single_post_title:由<tt>wp_title</tt>和<tt>single_post_title</tt>函数用来创建博客网页标题的时候,应用到文章标题。 ;the_content : applied to the post content retrieved from the database, prior to printing on the screen (also used in some other operations, such as trackbacks). ;the_content :应用到从数据库中获取的文章内容中,在发表到界面上之前(也用于一些其它的操作,如trackbacks)。 ;the_content_rss: applied to the post content prior to including in an RSS feed. ;the_content_rss:包含在RSS feed之前,应用到文章内容中。 ;the_editor_content: applied to post content before putting it into a rich editor window. ;the_editor_content:放入丰富的编辑器窗口之前,应用到文章内容中。 ;the_excerpt: applied to the post excerpt (or post content, if there is no excerpt) retrieved from the database, prior to printing on the screen (also used in some other operations, such as trackbacks). ;the_excerpt:应用到数据库返回的文章摘录(如果没有摘录,用于文章内容),在这些内容发表到界面上之前应用(也用于一些其它的操作,如trackbacks)。 ;the_excerpt_rss: applied to the post excerpt prior to including in an RSS feed. ;the_excerpt_rss:包含在RSS feed之前,应用到文章摘录。 ;the_tags: applied to the tags retrieved from the database, prior to printing on the screen. ;the_tags:应用到从数据库中返回,还没有出现在界面上的标签上。 ;the_title: applied to the post title retrieved from the database, prior to printing on the screen (also used in some other operations, such as trackbacks). ;the_title:用在从数据库中返回,还没有出现在界面的文章标题上(也用于一些其它的操作,如trackbacks)。 ;the_title_rss: applied to the post title before including in an RSS feed (after first filtering with <tt>the_title</tt>. ;the_title_rss:应用到文章标题,然后包含在RSS feed中(首先filtering with <tt>the_title</tt>。 ;title_edit_pre: applied to post title prior to display for editing. ;title_edit_pre:应用到文章标题,再显示编辑。 ;wp_dropdown_pages: applied to the HTML dropdown list of WordPress pages generated by the <tt>wp_dropdown_pages</tt> function. ;wp_dropdown_pages:应用到<tt>wp_dropdown_pages</tt>函数产生的WordPress网页HTML下拉列表。 ;wp_list_pages: applied to the HTML list generated by the <tt>wp_list_pages</tt> function. ;wp_list_pages:应用到<tt>wp_list_pages</tt>函数产生的HTML列表上。 ;wp_list_pages_excludes: applied to the list of excluded pages (an array of page IDs) in the <tt>wp_list_pages</tt> function. ;wp_list_pages_excludes:应用到<tt>wp_list_pages</tt>函数中删除的网页列表(一组网页IDs)。 ;wp_get_attachment_metadata: applied to the attachment metadata retrieved by the <tt>wp_get_attachment_metadata</tt> function. Filter function arguments: meta data, attachment ID. ;wp_get_attachment_metadata:应用到<tt>wp_get_attachment_metadata</tt>函数返回的attachment metadata。Filter function arguments: meta data, attachment ID。 ;wp_get_attachment_thumb_file: applied to the attachment thumbnail file retrieved by the <tt>wp_get_attachment_thumb_file</tt> function. Filter function arguments: thumbnail file, attachment ID. ;wp_get_attachment_thumb_file:应用到<tt>wp_get_attachment_thumb_file</tt>函数返回的attachment thumbnail文件。Filter function arguments: thumbnail 文件, attachment ID。 ;wp_get_attachment_thumb_url: applied to the attachment thumbnail URL retrieved by the <tt>wp_get_attachment_thumb_URL</tt> function. Filter function arguments: thumbnail URL, attachment ID. ;wp_get_attachment_thumb_url:应用到<tt>wp_get_attachment_thumb_URL</tt>函数返回的attachment thumbnail URL。Filter function arguments: thumbnail URL, attachment ID。 ;wp_get_attachment_url: applied to the attachment URL retrieved by the <tt>wp_get_attachment_url</tt> function. Filter function arguments: URL, attachment ID. ;wp_get_attachment_url:应用到<tt>wp_get_attachment_url</tt>函数返回的attachment URL。Filter function arguments: URL, attachment ID。 ;wp_mime_type_icon: applied to the MIME type icon for an attachment calculated by the <tt>wp_mime_type_icon</tt> function. Filter function arguments: icon URI calculated, MIME type, post ID. ;wp_mime_type_icon:应用到<tt>wp_mime_type_icon</tt>函数计算的attachment的MIME类型图标。Filter function arguments: icon URI calculated, MIME类型, 文章 ID ;wp_title: applied to the blog page title before sending to the browser in the <tt>wp_title</tt> function. ;wp_title:应用到博客网页标题,再发送到<tt>wp_title</tt>函数中的浏览器。 === Database Writes === === Database Writes === Filters in this section are applied to information prior to saving to the database. 这个部分的filters用于还没有保存到数据库的信息。 ;add_ping: applied to the new value of the pinged field on a post when a ping is added, prior to saving the new information in the database. ;add_ping:添加ping时,应用到文章pinged区的新的参数值上,在数据库中保存新的信息之前。 ;attachment_max_dims: applied to the maximum image dimensions before reducing an image size. Filter function input (and return value) is either false (if no maximum dimensions have been specified) or a two-item list (width, height). ;attachment_max_dims:减小图像尺寸之前,应用到最大的图像尺寸。Filter function输入(并且返回值)是错误的(如果没有规定最大的尺寸)或者两项内容的列表(宽度,高度)。 ;category_save_pre : applied to post category comma-separated list prior to saving it in the database (also used for attachments). ;category_save_pre :应用到用逗号分开的文章类别列表上,然后再保存到数据库(也用于attachments)。 ;comment_status_pre : applied to post comment status prior to saving it in the database (also used for attachments). ;comment_status_pre :应用到文章评论级别,然后再保存到数据库(也用于attachments)。 ;content_filtered_save_pre : applied to filtered post content prior to saving it in the database (also used for attachments). ;content_filtered_save_pre :应用到已过滤的文章内容,然后再保存到数据库(也用于attachments)。 ;content_save_pre : applied to post content prior to saving it in the database (also used for attachments). ;content_save_pre : 应用到文章内容,然后再保存到数据库(也用于attachments)。 ;excerpt_save_pre : applied to post excerpt prior to saving it in the database (also used for attachments). ;excerpt_save_pre : 应用到文章摘录,然后再保存到数据库(也用于attachments)。 ;name_save_pre : applied to post name prior to saving it in the database (also used for attachments). ;name_save_pre : 应用到文章名,然后再保存到数据库(也用于attachments)。 ;phone_content : applied to the content of a post submitted by email, before saving. ;phone_content :保存之前,应用到通过电子邮件发表的文章内容。 ;ping_status_pre : applied to post ping status prior to saving it in the database (also used for attachments). ;ping_status_pre : 应用到文章ping状态,然后再保存到数据库(也用于attachments)。 ;post_mime_type_pre: applied to the MIME type for an attachment prior to saving it in the database. ;post_mime_type_pre: 应用到attachment的MIME类型,然后再保存到数据库。 ;status_save_pre : applied to post status prior to saving it in the database. ;status_save_pre : 应用到文章状态,然后再保存到数据库。 ;thumbnail_filename: applied to the file name for the thumbnail when uploading an image. ;thumbnail_filename:上传新的图像的时候,应用到小图像的文件名。 ;wp_thumbnail_creation_size_limit: applied to the size of the thumbnail when uploading an image. Filter function arguments: max file size, attachment ID, attachment file name. ;wp_thumbnail_creation_size_limit: 上传图像的时候,应用到小图像的尺寸。Filter function arguments: 最大的文件尺寸, attachment ID, attachment 文件名。 ;wp_thumbnail_max_side_length: applied to the size of the thumbnail when uploading an image. Filter function arguments: image side max size, attachment ID, attachment file name. ;wp_thumbnail_max_side_length: 上传图像的时候,应用到小图像的尺寸。Filter function arguments:图像边缘最大尺寸,attachment ID, attachment 文件名。 ;title_save_pre : applied to post title prior to saving it in the database (also used for attachments). ;title_save_pre : 应用到文章标题,然后再保存到数据库(也用于attachments)。 ;update_attached_file: applied to the attachment information prior to saving in post metadata in the <tt>update_attached_file</tt> function. Filter function arguments: attachment information, attachment ID. ;update_attached_file:应用到attachment信息,然后再保存到<tt>update_attached_file</tt>函数中的文章metadata。Filter function arguments: attachment信息, attachment ID ;wp_delete_file: applied to an attachment file name just before deleting. ;wp_delete_file:删除之前,应用到attachment文件名。 ;wp_generate_attachment_metadata: applied to the attachment metadata array before saving in the database. ;wp_generate_attachment_metadata:保存到数据库之前,应用到attachment metadata array。 ;wp_update_attachment_metadata: applied to the attachment metadata just before saving in the <tt>wp_update_attachment_metadata</tt> function. Filter function arguments: meta data, attachment ID. ;wp_update_attachment_metadata:保存到<tt>wp_update_attachment_metadata</tt>函数之前,应用到attachment metadata。Filter function arguments: meta data, attachment ID。 == Comment, Trackback, and Ping Filters == == 评论, Trackback, 和 Ping Filters == See also [[WordPress:#Author and User Filters]], [[WordPress:#Link Filters]], [[WordPress:#Date and Time Filters]], and [[WordPress:#Administrative Filters]] below. 也看看下面的[[WordPress:#Author and User Filters|#作者和用户Filters]], [[WordPress:#Link Filters|#链接Filters]], [[WordPress:#Date and Time Filters|#日期和时间Filters]] ,[[WordPress:#Administrative Filters|#管理Filters]]。 === Database Reads === === Database Reads === Filters in this section are applied to information read from the database, prior to displaying on a page or editing screen. 这个部分的Filters适用于来自数据库的,还没有在网页或者编辑界面上显示的信息。 ;comment_excerpt: applied to the comment excerpt by the <tt>comment_excerpt</tt> function. See also <tt>get_comment_excerpt</tt>. ;comment_excerpt:通过<tt>comment_excerpt</tt>函数,应用到评论摘录。也看看<tt>get_comment_excerpt</tt>。 ;comment_flood_filter: applied when someone appears to be flooding your blog with comments. Filter function arguments: already blocked (true/false, whether a previous filtering plugin has already blocked it; set to true and return true to block this comment in a plugin), time of previous comment, time of current comment. ;comment_flood_filter:有人向你的博客滥发评论的时候,可以使用。Filter function arguments: 已经阻止 (正确的/错误的,先前一个过滤插件是否已经阻止;设置为正确的并且返回正确的,阻止插件中的这个评论), 先前评论发表的时间,当前评论发表的时间。 ;comment_post_redirect: applied to the redirect location after someone adds a comment. Filter function arguments: redirect location, comment info array. ;comment_post_redirect:有人添加了评论后,应用到redirect 位置。Filter function arguments: redirect 位置,评论信息数组。 ;comment_text : applied to the comment text before displaying on the screen by the <tt>comment_text</tt> function, and in the admin menus. ;comment_text :使用<tt>comment_text</tt>函数,在管理菜单界面中显示之前,应用到评论文本。 ;comment_text_rss: applied to the comment text prior to including in an RSS feed. ;comment_text_rss:应用到评论文本,然后再包含到RSS feed。 ;comments_array: applied to the array of comments for a post in the <tt>comments_template</tt> function. Filter function arguments: array of comment information structures, post ID. ;comments_array:应用到<tt>comments_template</tt>函数中的文章的评论数组。Filter function arguments:评论信息结构数字,文章ID。 ;comments_number: applied to the formatted text giving the number of comments generated by the <tt>comments_number</tt> function. See also <tt>get_comments_number</tt>. ;comments_number:应用到格式化文本,提供<tt>comments_number</tt>函数产生的评论数目。也看看<tt>get_comments_number</tt>。 ;get_comment_excerpt: applied to the comment excerpt read from the database by the <tt>get_comment_excerpt</tt> function (which is also called by <tt>comment_excerpt</tt>. See also <tt>comment_excerpt</tt>. ;get_comment_excerpt:应用到<tt>get_comment_excerpt</tt>函数从数据库中读出的评论摘录中(也称为<tt>comment_excerpt</tt>。也看看<tt>comment_excerpt</tt>。 ;get_comment_ID: applied to the comment ID read from the global <tt>$comments</tt> variable by the <tt>get_comment_ID</tt> function. ;get_comment_ID:应用到<tt>get_comment_ID</tt>函数从全局 <tt>$comments</tt> 变量中阅读的评论ID中。 ;get_comment_text: applied to the comment text of the current comment in the <tt>get_comment_text</tt> function, which is also called by the <tt>comment_text</tt> function. ;get_comment_text:应用到<tt>get_comment_text</tt>函数的当请评论的评论文本,也由<tt>comment_text</tt>函数调用。 ;get_comment_type: applied to the comment type ("comment", "trackback", or "pingback") by the <tt>get_comment_type</tt> function (which is also called by <tt>comment_type</tt>). ;get_comment_type:应用到<tt>get_comment_type</tt>函数的评论类型("评论", "trackback",或者 "pingback")(也由<tt>comment_type</tt>调用)。 ;get_comments_number: applied to the comment count read from the <tt>$post</tt> global variable by the <tt>get_comments_number</tt> function (which is also called by the <tt>comments_number</tt> function; see also <tt>comments_number</tt> filter). ;get_comments_number:应用到<tt>get_comments_number</tt>函数从<tt>$post</tt>全局变量中读出的评论数目(也由<tt>comments_number</tt>函数调用:也看看<tt>comments_number</tt> filter)。 ;post_comments_feed_link: applied to the feed URL generated for the comments feed by the <tt>comments_rss</tt> function. ;post_comments_feed_link:应用到为<tt>comments_rss</tt>函数评论feed产生的feed URL中。 === Database Writes === === Database Writes === Filters in this section are applied to information prior to saving to the database. 这个部分的filters应用到信息中,然后再保存到数据库。 ;comment_save_pre : applied to the comment data just prior to updating/editing comment data. Function arguments: comment data array, with indices "comment_post_ID", "comment_author", "comment_author_email", "comment_author_url", "comment_content", "comment_type", and "user_ID". ;comment_save_pre :在更新/编辑评论数据之前,应用到评论数据。Function arguments:评论数据数组,拥有索引"comment_post_ID", "comment_author", "comment_author_email", "comment_author_url", "comment_content", "comment_type", 和"user_ID"。 ;pre_comment_approved : applied to the current comment's approval status (true/false) to allow a plugin to override. Return true/false and set first argument to true/false to approve/disapprove the comment, and use global variables such as <tt>$comment_ID</tt> to access information about this comment. ;pre_comment_approved :应用到当前得到批准的评论(正确的/错误的),允许插件代替。返回正确的/错误的并且将第一个参数设置为正确的/错误的批准/拒绝评论,并且使用全局变量,如<tt>$comment_ID</tt>,访问关于这个评论的信息。 ;pre_comment_content : applied to the content of a comment prior to saving the comment in the database. ;pre_comment_content :应用到评论内容,再保存到数据库。 ;preprocess_comment : applied to the comment data prior to any other processing, when saving a new comment in the database. Function arguments: comment data array, with indices "comment_post_ID", "comment_author", "comment_author_email", "comment_author_url", "comment_content", "comment_type", and "user_ID". ;preprocess_comment :在数据库中保存新评论的时候,应用到评论数据,然后再做其它处理。Function arguments: 评论数据数组, 拥有索引 "comment_post_ID", "comment_author", "comment_author_email", "comment_author_url", "comment_content", "comment_type", 和"user_ID"。 == Category Filters == == 类别 Filters == See also [[WordPress:#Administrative Filters]] below. 也看看下面的[[WordPress:#Administrative Filters|#管理Filters]]。 === Database Reads === === Database Reads === Filters in this section are applied to information read from the database, prior to displaying on a page or editing screen. 这个部分的filteres应用到从数据库中读出,但是还没有在网页或者编辑界面上显示的信息。 ;category_description : applied to the "description" field categories by the <tt>category_description</tt> and <tt>wp_list_categories</tt> functions. Filter function arguments: description, category ID when called from <tt>category_description</tt>; description, category information array (all fields from the category table for that particular category) when called from <tt>wp_list_categories</tt> (sorry, but that's how it is). ;category_description :应用到<tt>category_description</tt> 和<tt>wp_list_categories</tt>函数的"描述"栏类别。Filter function arguments:从<tt>category_description</tt>调用时的描述,类别ID;从<tt>wp_list_categories</tt>调用时,描述,类别信息数组(类别表格中关于那个类别的所有栏)(对不起,但就是这样的)。 ;category_feed_link: applied to the feed URL generated for the category feed by the <tt>get_category_rss_link</tt> function. ;category_feed_link:应用到为<tt>get_category_rss_link</tt>函数的类别feed而创建的feed URL。 ;category_link: applied to the URL created for a category by the <tt>get_category_link</tt> function. Filter function arguments: link URL, category ID. ;category_link:应用到<tt>get_category_link</tt>函数的类别的URL。Filter function arguments: 链接 URL, 类别 ID。 ;get_categories : applied to the category list generated by the <tt>get_categories</tt> function (which is in turn used by many other functions). Filter function arguments: category list, <tt>get_categories</tt> options list. ;get_categories :应用到<tt>get_categories</tt>函数产生的类别列表(许多其它函数依次使用)。Filter function arguments:类别列表,<tt>get_categories</tt>选项列表。 ;get_category: applied to the category information that the <tt>get_category</tt> function looks up, which is basically an array of all the fields in WordPress's category table for a particular category ID. ;get_category:应用到<tt>get_category</tt>函数查找的类别信息,基本是WordPress类别表格,关于某个类别ID的所有栏。 ;list_cats : called for two different purposes: ;list_cats :根据两个不同的目的调用: #the <tt>wp_dropdown_categories</tt> function uses it to filter the <tt>show_option_all</tt> and <tt>show_option_none</tt> arguments (which are used to put options "All" and "None" in category drop-down lists). No additional filter function arguments. # <tt>wp_dropdown_categories</tt>函数使用它来过滤<tt>show_option_all</tt> 和 <tt>show_option_none</tt>参数(用来将"所有的" 和"无"选项放到类别下拉列表上)没有额外的filter function arguments。 #the <tt>wp_list_categories</tt> function applies it to the category names. Filter function arguments: category name, category information list (all fields from the category table for that particular category). #<tt>wp_list_categories</tt>函数将其应用到类别名。Filter function arguments:类别名,类别信息列表(类别表格中关于那个类别的所有栏)。 ;list_cats_exclusions: applied to the SQL WHERE statement giving the categories to be excluded by the <tt>get_categories</tt> function. Typically, a plugin would add to this list, in order to exclude certain categories or groups of categories from category lists. Filter function arguments: excluded category WHERE clause, <tt>get_categories</tt> options list. ;list_cats_exclusions:应用到SQL,声明提供由<tt>get_categories</tt>函数删除的类别。一般来说,插件会添加到这个列表,从类别列表中删除某个类别或者某组类别。Filter function arguments: excluded category WHERE clause, <tt>get_categories</tt> 选项列表。 ;single_cat_title: applied to the category name when used to create a blog page title by the <tt>wp_title</tt> and <tt>single_cat_title</tt> functions. ;single_cat_title: <tt>wp_title</tt> 和 <tt>single_cat_title</tt>函数创建博客网页标题的时候,应用到博客名。 ;the_category: applied to the list of categories (an HTML list with links) created by the <tt>get_the_category_list</tt> function. Filter function arguments: generated HTML text, list separator being used (empty string means it is a default LI list), <tt>parents</tt> argument to <tt>get_the_category_list</tt>. ;the_category:应用到类别列表(拥有链接的HTML列表),由<tt>get_the_category_list</tt>函数创建。Filter function arguments:产生的HTML文本,使用的列表分隔符(空字符串,表示是默认LI列表),<tt>parents</tt> argument到<tt>get_the_category_list</tt>。 ;the_category_rss: applied to the category list (a list of category XML elements) for a post by the <tt>get_the_category_rss</tt> function, before including in an RSS feed. Filter function arguments are the list text and the type ("rdf" or "rss" generally). ;the_category_rss: 由<tt>get_the_category_rss</tt>函数应用到文章的类别列表(类别XML元素的列表),然后再包含到RSS feed。Filter function arguments作为列表文本和类型(一般为"rdf" 或者"rss")。 ;wp_dropdown_cats: applied to the drop-down category list (a text string containing HTML option elements) generated by the <tt>wp_dropdown_categories</tt> function. ;wp_dropdown_cats:应用到<tt>wp_dropdown_categories</tt>函数创建的下拉类别列表(包含HTML选项元素的文本字符串) ;wp_list_categories: applied to the category list (an HTML list) generated by the <tt>wp_list_categories</tt> function. ;wp_list_categories:应用到<tt>wp_list_categories</tt>函数创建的类别列表(HTML列表) === Database Writes === === 数据库 Writes === Filters in this section are applied to information prior to saving to the database. 这个部分的Filters应用到还没有保存到数据库的信息中。 ;pre_category_description: applied to the category desription prior to saving in the database. ;pre_category_description:应用到类别描述,然后保存到数据库。 ;pre_category_name: applied to the category name prior to saving in the database. ;pre_category_name:应用到还没有保存到数据库的类别名。 ;pre_category_nicename: applied to the category nice name prior to saving in the database. ;pre_category_nicename: 应用到还没有保存到数据库的类别昵称。 == Link Filters == == 链接 Filters == Note: This section contains filters related to links to posts, pages, archives, feeds, etc. For blogroll links, see the [[WordPress:#Blogroll Filters]] section below. 注:这个部分包含了文章,网页,归档,feed等等的链接相关的filters。关于友情链接,请看看下面的[[WordPress:#Blogroll Filters|#友情链接Filters]]部分。 ;attachment_link: applied to the calculated attachment permalink by the <tt>get_attachment_link</tt> function. Filter function arguments: link URL, attachment ID. ;attachment_link:应用到<tt>get_attachment_link</tt>函数的calculated attachment permalink。Filter function arguments: l链接URL, attachment ID。 ;author_feed_link: applied to the feed URL generated for the author feed by the <tt>get_author_rss_link</tt> function. ;author_feed_link:由<tt>get_author_rss_link</tt>函数应用到,为作者feed创建的feed URL。 ;author_link : applied to the author's archive permalink created by the <tt>get_author_posts_url</tt> function. Filter function arguments: link URL, author's "nice" name, author ID. Note that <tt>get_author_posts_url</tt> is called within functions <tt>wp_list_authors</tt> and <tt>the_author_posts_link</tt>. ;author_link :应用到<tt>get_author_posts_url</tt>函数创建的作者的归档permalink。Filter function arguments:链接URL,作者的"昵称",作者ID。注意<tt>get_author_posts_url</tt>是从函数<tt>wp_list_authors</tt>和<tt>the_author_posts_link</tt>内部调用的。 ;day_link: applied to the link URL for a daily archive by the <tt>get_day_link</tt> function. Filter function arguments: URL, year, month number, day number. ;day_link:应用到<tt>get_day_link</tt>函数每日归档的链接URL。Filter function arguments:URL,年,月,日。 ;feed_link: applied to the link URL for a feed by the <tt>get_feed_link</tt> function. Filter function arguments: URL, type of feed (e.g. "rss2", "atom", etc.). ;feed_link:由<tt>get_feed_link</tt>函数应用到feed的链接URL。Filter function arguments: URL, feed 的类型(例如 "rss2", "atom", 等等)。 ;get_comment_author_link : applied to the HTML generated for the author's link on a comment, in the <tt>get_comment_author_link</tt> function (which is also called by <tt>comment_author_link</tt>. ;get_comment_author_link :应用到评论上作者链接的HTML,在<tt>get_comment_author_link</tt>函数中(也由<tt>comment_author_link</tt>调用。 ;get_comment_author_url_link: applied to the HTML generated for the author's lnik on a comment, in the <tt>get_comment_author_url_link</tt> function (which is also called by <tt>comment_author_link</tt>). ;get_comment_author_url_link:应用到<tt>get_comment_author_url_link</tt>函数中,评论上作者链接的HTML。(也由<tt>comment_author_link</tt>调用)。 ;month_link: applied to the link URL for a monthly archive by the <tt>get_month_link</tt> function. Filter function arguments: URL, year, month number. ;month_link:应用到<tt>get_month_link</tt>函数创建的每月归档的链接URL。Filter function arguments: URL, 年,月。 ;page_link : applied to the calculated page URL by the <tt>get_page_link</tt> function. Filter function arguments: URL, page ID. Note that there is also an internal filter called <tt>_get_page_link</tt> that can be used to filter the URLS of pages that are not designated as the blog's home page (same arguments). ;page_link :应用到<tt>get_page_link</tt>函数计算出的网页URL。Filter function arguments: URL, 网页 ID。注意,也有个称为<tt>_get_page_link</tt>的内部filter,可以用来过滤网页URLS,不指定这些URLS作为博客的主页(同样的参数)。 ;post_link : applied to the calculated post permalink by the <tt>get_permalink</tt> function, which is also called by the <tt>the_permalink</tt>, <tt>post_permalink</tt>, <tt>previous_post_link</tt>, and <tt>next_post_link</tt> functions. Filter function arguments: permalink URL, post data list. ;post_link :应用到<tt>get_permalink</tt>函数计算的文章permalink,也由tt>the_permalink</tt>, <tt>post_permalink</tt>, <tt>previous_post_link</tt>, 和<tt>next_post_link</tt>函数调用。Filter function arguments: permalink URL,文章数据列表。 ;the_permalink: applied to the permalink URL for a post prior to printing by function <tt>the_permalink</tt>. ;the_permalink:应用到文章permalinkURL,再由<tt>the_permalink</tt>函数印出。 ;year_link: applied to the link URL for a yearly archive by the <tt>get_year_link</tt> function. Filter function arguments: URL, year. ;year_link:应用到<tt>get_year_link</tt>函数按年归档的链接URL。Filter function arguments: URL, 年。 == Date and Time Filters == == 日期和时间lters == See also [[WordPress:#Link Filters]] above. 也看看上面的[[WordPress:#Link Filters|#链接Filters]] ;get_comment_date: applied to the formatted comment date generated by the <tt>get_comment_date</tt> function (which is also called by <tt>comment_date</tt>). ;get_comment_date:应用到<tt>get_comment_date</tt>函数创建的格式化评论日期(也由<tt>comment_date</tt>调用)。 ;get_comment_time: applied to the formatted comment time in the <tt>get_comment_time</tt> function (which is also called by <tt>comment_time</tt>). ;get_comment_time:应用到<tt>get_comment_time</tt>函数中的格式化评论时间(也由<tt>comment_time</tt>调用)。 ;get_the_modified_date: applied to the formatted post modification date generated by the <tt>get_the_modified_date</tt> function (which is also called by the <tt>the_modified_date</tt> function). ;get_the_modified_date:应用到<tt>get_the_modified_date</tt>函数创建的格式化文章更改日期。(也由<tt>the_modified_date</tt>函数调用)。 ;get_the_modified_time: applied to the formatted post modification time generated by the <tt>get_the_modified_time</tt> and <tt>get_post_modified_time</tt> functions (which are also called by the <tt>the_modified_time</tt> function). ;get_the_modified_time:应用到<tt>get_the_modified_time</tt>和<tt>get_post_modified_time</tt>函数创建的格式化文章更改时间(也由<tt>the_modified_time</tt>函数调用)。 ;get_the_time: applied to the formatted post time generated by the <tt>get_the_time</tt> and <tt>get_post_time</tt> functions (which are also called by the <tt>the_time</tt> function). ;get_the_time:应用到<tt>get_the_time</tt> 和<tt>get_post_time</tt>函数创建的格式化文章时间(也由<tt>the_time</tt>函数调用)。 ;the_date: applied to the formatted post date generated by the <tt>the_date</tt> function. ;the_date:应用到<tt>the_date</tt>函数创建的格式化文章日期。 ;the_modified_date: applied to the formatted post modification date generated by the <tt>the_modified_date</tt> function. ;the_modified_date:应用到<tt>the_modified_date</tt>函数创建的格式化文章更改日期。 ;the_modified_time: applied to the formatted post modification time generated by the <tt>the_modified_time</tt> function. ;the_modified_time:应用到<tt>the_modified_time</tt>函数创建的格式化文章更改时间。 ;the_time: applied to the formatted post time generated by the <tt>the_time</tt> function. ;the_time:应用到<tt>the_time</tt>函数创建的格式化文章时间。 ;the_weekday: applied to the post date weekday name generated by the <tt>the_weekday</tt> function. ;the_weekday:应用到<tt>the_weekday</tt>函数创建的文章日期星期名。 ;the_weekday_date: applied to the post date weekday name generated by the <tt>the_weekday_date</tt> function. Function arguments are the weekday name, before text, and after text (before text and after text are added to the weekday name if the current post's weekday is different from the previous post's weekday). ;the_weekday_date:应用到<tt>the_weekday_date</tt>函数创建的文章日期星期名。Function arguments是星期名,在文本前后(如果当前文章的星期名与前一篇文章的星期名不同,文本前后添加到星期名。 == Author and User Filters == ==作者和用户Filters == See also [[WordPress:#Link Filters]] and [[WordPress:#Administrative Filters]] sections. 也看看[[WordPress:#Link Filters|#链接Filters]]和[[WordPress:#Administrative Filters|#管理Filters]]部分。 === Database Reads === === 数据库Reads === Filters in this section are applied to information read from the database, prior to displaying on a page or editing screen. 这个部分的Filters应用到从数据库中读出,还没有在网页或者编辑界面上显示的信息。 ;author_email: applied to the comment author's email address retrieved from the database by the <tt>comment_author_email</tt> function. See also <tt>get_comment_author_email</tt>. ;author_email:应用到<tt>comment_author_email</tt>函数,从数据库中返回的评论作者的电子邮件地址。也看看<tt>get_comment_author_email</tt>。 ;comment_author: applied to the comment author's name retrieved from the database by the <tt>comment_author</tt> function. See also <tt>get_comment_author</tt>. ;comment_author:应用到<tt>comment_author</tt>函数从数据库中返回的评论作者姓名。也看看<tt>get_comment_author</tt>。 ;comment_author_rss: applied to the comment author's name prior to including in an RSS feed. ;comment_author_rss:应用到评论作者的姓名,再保存到RSS feed。 ;comment_email: applied to the comment author's email address retrieved from the database by the <tt>comment_author_email_link</tt> function. ;comment_email:应用到<tt>comment_author_email_link</tt>函数从数据库中返回的评论作者的电子邮件地址。 ;comment_url : applied to the comment author's URL retrieved from the database by the <tt>comment_author_url</tt> function (see also <tt>get_comment_author_url</tt>). ;comment_url :应用到<tt>comment_author_url</tt>函数从数据库中返回的评论作者的URL(也看看<tt>get_comment_author_url</tt>)。 ;get_comment_author: applied to the comment author's name retrieved from the database by <tt>get_comment_author</tt>, which is also called by <tt>comment_author</tt>. See also <tt>comment_author</tt>. ;get_comment_author:应用到<tt>get_comment_author</tt>从数据库中返回的评论作者的姓名,也由<tt>comment_author</tt>调用。也看看<tt>comment_author</tt>。 ;get_comment_author_email: applied to the comment author's email address retrieved from the database by <tt>get_comment_author_email</tt>, which is also called by <tt>comment_author_email</tt>. See also <tt>author_email</tt>. ;get_comment_author_email:应用到<tt>get_comment_author_email</tt>从数据库中返回的评论作者的电子邮件地址,也由<tt>comment_author_email</tt>调用。也看看<tt>author_email</tt>。 ;get_comment_author_IP: applied to the comment author's IP address retrieved from the database by the <tt>get_comment_author_IP</tt> function, which is also called by <tt>comment_author_IP</tt>. ;get_comment_author_IP:应用到<tt>get_comment_author_IP</tt>函数从数据库中返回的评论作者的IP地址,也由<tt>comment_author_IP</tt>调用。 ;get_comment_author_url: applied to the comment author's URL retrieved from the database by the <tt>get_comment_author_url</tt> function, which is also called by <tt>comment_author_url</tt>. See also <tt>comment_url</tt>. ;get_comment_author_url:应用到<tt>get_comment_author_url</tt>函数从数据库中返回的评论作者的URL,也由<tt>comment_author_url</tt>调用。也看看<tt>comment_url</tt>。 ;login_errors: applied to the login error message printed on the login screen. ;login_errors:应用到登录界面上的登录错误信息。 ;login_headertitle: applied to the title for the login header URL (Powered by WordPress by default) printed on the login screen. ;login_headertitle:应用到登录界面上的登录标头URL的标题(默认WordPress推动)。 ;login_headerurl: applied to the login header URL (points to wordpress.org by default) printed on the login screen. ;login_headerurl:应用到登录界面上的登录标头URL(默认指向wordpress.org)。 ;login_message: applied to the login message printed on the login screen. ;login_message:应用到登录界面印出的登录信息。 ;role_has_cap: applied to a role's capabilities list in the <tt>WP_Role->has_cap</tt> function. Filter function arguments are the capabilities list to be filtered, the capability being questioned, and the role's name. ;role_has_cap:应用到<tt>WP_Role->has_cap</tt>函数中的功能权限列表。Filter function arguments是需要过滤的权限列表,权限需要查询,以及角色名。 ;sanitize_user: applied to a user name by the <tt>sanitize_user</tt> function. Filter function arguments: user name (after some cleaning up), raw user name, strict (true or false to use strict ASCII or not). ;sanitize_user:由<tt>sanitize_user</tt>函数应用到用户名。Filter function arguments: 用户名(做一些清除后),简略的用户名,严格地 (正确的或者错误的是否使用严格地ASCII)。 ;the_author : applied to a post author's displayed name by the <tt>get_the_author</tt> function, which is also called by the <tt>the_author</tt> function. ;the_author :由<tt>get_the_author</tt>函数应用到文章作者显示名,也由<tt>the_author</tt>函数调用。 ;the_author_email : applied to a post author's email address by the <tt>the_author_email</tt> function. ;the_author_email :由<tt>the_author_email</tt>函数应用到文章作者的电子邮件地址。 === Database Writes === ===数据库Writes === Filters in this section are applied to information prior to saving to the database. 这个部分的filters应用到信息,然后再保存到数据库。 ;pre_comment_author_email : applied to a comment author's email address prior to saving the comment in the database. ;pre_comment_author_email :应用到评论作者的电子邮件地址,然后再将评论保存到数据库。 ;pre_comment_author_name : applied to a comment author's user name prior to saving the comment in the database. ;pre_comment_author_name :应用到评论作者的用户名,然后再将评论保存到数据库。 ;pre_comment_author_url : applied to a comment author's URL prior to saving the comment in the database. ;pre_comment_author_url : 应用到评论作者的URL,然后再将评论保存到数据库。 ;pre_comment_user_agent: applied to the comment author's user agent prior to saving the comment in the database. ;pre_comment_user_agent:应用到评论作者的用户代理,然后再将评论保存到数据库。 ;pre_comment_user_ip: applied to the comment author's IP address prior to saving the comment in the database. ;pre_comment_user_ip: 应用到评论作者的IP地址,然后再将评论保存到数据库。 ;pre_user_id: applied to the comment author's user ID prior to saving the comment in the database. ;pre_user_id: 应用到评论作者的用户ID,然后再将评论保存到数据库。 ;pre_user_description: applied to the user's description prior to saving in the database. ;pre_user_description: 应用到用户的描述,然后再保存到数据库。 ;pre_user_display_name: applied to the user's displayed name prior to saving in the database. ;pre_user_display_name: 应用到用户的用户名,然后再保存到数据库。 ;pre_user_email: applied to the user's email address prior to saving in the database. ;pre_user_email: 应用到用户的电子邮件地址,然后再保存到数据库。 ;pre_user_first_name: applied to the user's first name prior to saving in the database. ;pre_user_first_name: 应用到用户的名字,然后再保存到数据库。 ;pre_user_last_name: applied to the user's last name prior to saving in the database. ;pre_user_last_name: 应用到用户的姓,然后再保存到数据库。 ;pre_user_login: applied to the user's login name prior to saving in the database. ;pre_user_login: 应用到用户的登录名,然后再保存到数据库。 ;pre_user_nicename: applied to the user's "nice name" prior to saving in the database. ;pre_user_nicename: 应用到用户的"昵称",然后再保存到数据库。 ;pre_user_nickname: applied to the user's nickname prior to saving in the database. ;pre_user_nickname: 应用到用户的昵称,然后再保存到数据库。 ;pre_user_url: applied to the user's URL prior to saving in the database. ;pre_user_url: 应用到用户的URL,然后再保存到数据库。 ;registration_errors: applied to the list of registration errors generated while registering a user for a new account. ;registration_errors:应用到为新帐户注册用户时,产生的注册错误列表上。 ;user_registration_email: applied to the user's email address read from the registration page, prior to trying to register the person as a new user. ;user_registration_email:应用到注册网页上列出的用户电子邮件地址,然后再注册新用户。 ;validate_username: applied to the validation result on a new user name. Filter function arguments: valid (true/false), user name being validated. ;validate_username:应用到新的用户名的确认结果中。Filter function arguments:有效的(正确的/错误的),正在确认的用户名。 == Blogroll Filters == == 友情链接 Filters == Note: This section contains filters related to blogroll links. For filters related to links to posts, pages, categories, etc., see section [[WordPress:#Link Filters]] above. 注:这个部分包含了友情链接相关的filters。关于文章,网页,类别等等的链接相关的filters,请看看上面的[[WordPress:#Link Filters|#链接Filters]]部分。 ;get_bookmarks : applied to link/blogroll database query results by the <tt>get_bookmarks</tt> function. Filter function arguments: database query results list, <tt>get_bookmarks</tt> arguments list. ;get_bookmarks :应用到<tt>get_bookmarks</tt>函数的链接/友情链接数据库查询结果。Filter function arguments:数据库查询结果列表,<tt>get_bookmarks</tt>参数列表。 ;link_category: applied to the link category by the <tt>get_links_list</tt> and <tt>wp_list_bookmarks</tt> functions (as of WordPress 2.2). ;link_category:应用到<tt>get_links_list</tt> 和<tt>wp_list_bookmarks</tt>函数的链接类别(从WordPress2.2开始)。 ;link_description : applied to the link description by the <tt>get_links</tt> and <tt>wp_list_bookmarks</tt> functions (as of WordPress 2.2). ;link_description :应用到<tt>get_links</tt>和<tt>wp_list_bookmarks</tt>函数的链接描述(从WordPress2.2开始)。 ;link_rating : applied to the link rating number by the <tt>get_linkrating</tt> function. ;link_rating :应用到<tt>get_linkrating</tt>函数的链接等级级别。 ;link_title: applied to the link title by the <tt>get_links</tt> and <tt>wp_list_bookmarks</tt> functions (as of WordPress 2.2) ;link_title:由<tt>get_links</tt>和 <tt>wp_list_bookmarks</tt>函数,应用到链接标题(从WordPress2.2开始) ;pre_link_description: applied to the link description prior to saving in the database. ;pre_link_description:应用到链接描述,然后保存到数据库。 ;pre_link_image: applied to the link image prior to saving in the database. ;pre_link_image: 应用到链接图像,然后保存到数据库。 ;pre_link_name: applied to the link name prior to saving in the database. ;pre_link_name: 应用到链接名,然后保存到数据库。 ;pre_link_notes: applied to the link notes prior to saving in the database. ;pre_link_notes: 应用到链接注释,然后保存到数据库。 ;pre_link_rel: applied to the link relation information prior to saving in the database. ;pre_link_rel: 应用到链接相关信息,然后保存到数据库。 ;pre_link_rss: applied to the link RSS URL prior to saving in the database. ;pre_link_rss: 应用到链接RSS URL,然后保存到数据库。 ;pre_link_target: applied to the link target information prior to saving in the database. ;pre_link_target: 应用到链接target信息,然后保存到数据库。 ;pre_link_url: applied to the link URL prior to saving in the database. ;pre_link_url: 应用到链接URL,然后保存到数据库。 == Blog Information and Option Filters == == 博客信息和选项 Filters == ;all_options: applied to the option list retrieved from the database by the <tt>get_alloptions</tt> function. ;all_options:应用到<tt>get_alloptions</tt>函数从数据库中返回的选项列表。 ;bloginfo: applied to the blog option information retrieved from the database by the <tt>bloginfo</tt> function, after first retrieving the information with the <tt>get_bloginfo</tt> function. A second argument <tt>$show</tt> gives the name of the bloginfo option that was requested. Note that <tt>bloginfo("url")</tt>, <tt>bloginfo("directory")</tt> and <tt>bloginfo("home")</tt> do ''not'' use this filtering function (see <tt>bloginfo_url</tt>). ;bloginfo:用<tt>get_bloginfo</tt>函数返回信息后,运用到<tt>bloginfo</tt>函数从数据库中返回的博客选项信息。第二个参数<tt>$show</tt>提供了需求的博客信息选项。注意<tt>bloginfo("url")</tt>, <tt>bloginfo("directory")</tt>和<tt>bloginfo("home")</tt>''不''使用这个filtering函数(请看看<tt>bloginfo_url</tt>)。 ;bloginfo_rss: applied to the blog option information by function <tt>get_bloginfo_rss</tt> (which is also called from <tt>bloginfo_rss</tt>), after first retrieving the information with the <tt>get_bloginfo</tt> function, stripping out HTML tags, and converting characters appropriately. A second argument <tt>$show</tt> gives the name of the bloginfo option that was requested. ;bloginfo_rss:使用<tt>get_bloginfo</tt>函数返回信息,去除HTML标签,并且适当地转换了字符后,由<tt>get_bloginfo_rss</tt>函数应用到博客选项信息。第二个参数提供了请求的博客信息选项的名称。 ;bloginfo_url: applied to the the output of <tt>bloginfo("url")</tt>, <tt>bloginfo("directory")</tt> and <tt>bloginfo("home")</tt> before returning the information. ;bloginfo_url:应用到<tt>bloginfo("url")</tt>, <tt>bloginfo("directory")</tt> 和<tt>bloginfo("home")</tt>的输出,然后再返回信息。 ;loginout : applied to the HTML link for logging in and out (generally placed in the sidebar) generated by the <tt>wp_loginout</tt> function. ;loginout :为<tt>wp_loginout</tt>函数创建的登录和退出(一般放置在边栏),应用到HTML链接。 ;option_(option name): applied to the option value retrieved from the database by the <tt>get_option</tt> function, after unserializing (which decodes array-based options). To use this filter, you will need to add filters for specific options names, such as "option_foo" to filter the output of <tt>get_option("foo")</tt>. ;option_(option name): unserializing后(解码了以数组为基础的选项),应用到数据库返回的选项参数值。要使用这个filter,你需要为特别的选项名称添加filters,如"option_foo" filter<tt>get_option("foo")</tt>的输出。 ;pre_option_(option name): applied to the option value retrieved from the database by the <tt>get_alloptions</tt> function, after unserializing (which decodes array-based options). To use this filter, you will need to add filters for specific options names, such as "pre_option_foo" to filter the option "foo". ;pre_option_(选项名):unserializing后(解码了以数组为基础的选项),应用到由<tt>get_alloptions</tt>函数从数据库返回的选项参数值。要使用这个filter,你需要为特别的选项名称添加filters,如"pre_option_foo"过滤选项"foo"。 ;register : applied to the sidebar link created for the user to register (if allowed) or visit the admin panels (if already logged in) by the <tt>wp_register</tt> function. ;register :应用到为用户注册创建的边栏链接(如果允许的话)或者由<tt>wp_register</tt>函数访问管理面板(如果已经登录)。 ;upload_dir: applied to the directory to be used for uploads calculated by the <tt>wp_upload_dir</tt> function. Filter function argument is an array with components "dir" (the upload directory path), "url" (the URL of the upload directory), and "error" (which you can set to true if you want to generate an error). ;upload_dir:用于<tt>wp_upload_dir</tt>函数计算的用于上传的目录。Filter function参数是带有"dir"组成部分的数组(上传目录路径),"url"(上传目录URL),和"错误"(如果你想要创建错误,你可以设置为正确的)。 ;upload_mimes: allows a filter function to return a list of MIME types for uploads, if there is no MIME list input to the <tt>wp_check_filetype</tt> function. Filter function argument is an associated list of MIME types whose component names are file extensions (separated by vertical bars) and values are the corresponding MIME types. ;upload_mimes:如果<tt>wp_check_filetype</tt>函数中没有输入MIME列表,允许filter function返回用于上传的MIME类型。Filter function argument是MIME类型的联合列表,组成名是文章扩展名(由竖线分开)和MIME类型响应的参数值。 == General Text Filters == == 一般的文本Filters== ;attribute_escape: applied to post text and other content by the <tt>attribute_escape</tt> function, which is called in many places in WordPress to change certain characters into HTML attributes before sending to the browser. ;attribute_escape:由<tt>attribute_escape</tt>函数应用到文章文本和其它内容,WordPress在许多时候,都会调用这个函数,将某些字符更改为HTML属性,再发送到浏览器。 ;js_escape: applied to JavaScript code before sending to the browser in the <tt>js_escape</tt> function. ;js_escape:应用到JavaScript代码,在发送到<tt>js_escape</tt>函数中的浏览器。 == Administrative Filters == == 管理 Filters == The filters in this section are related to the administration screens of WordPress, including content editing screens. 这个部分的filters与WordPress管理界面相关,包括内容编辑界面。 ;autosave_interval: applied to the interval for auto-saving posts. ;autosave_interval:应用到自动保存的文章的时间间隔。 ;cat_rows: applied to the category rows HTML generated for managing categories in the admin menus. ;cat_rows:应用到管理菜单管理类别中产生的HTML类别rows。 ;comment_edit_pre : applied to comment content prior to display in the editing screen. ;comment_edit_pre :应用到评论内容,再显示到编辑界面。 ;comment_edit_redirect: applied to the redirect location after someone edits a comment in the admin menus. Filter function arguments: redirect location, comment ID. ;comment_edit_redirect:有人在管理界面中编辑评论之后,应用到redirect位置。Filter function arguments: redirect location, 评论ID。 ;comment_moderation_subject: applied to the mail subject before sending email notifying the administrator of the need to moderate a new comment. Filter function arguments: mail subject, comment ID. Note that this happens inside the default <tt>wp_notify_moderator</tt> function, which is a "pluggable" function, meaning that plugins can override it; see [[WordPress:Plugin API]]). ;comment_moderation_subject:向管理员发送电子邮件,要求审核新评论之前,应用到邮件主题。Filter function arguments:邮件主题,评论ID。注意这在默认<tt>wp_notify_moderator</tt>函数内发生,是个"pluggable"函数,意思是插件可以取代这个函数;请看看[[WordPress:Plugin API|插件API]])。 ;comment_moderation_text: applied to the body of the mail message before sending email notifying the administrator of the need to moderate a new comment. Filter function arguments: mail body text, comment ID. Note that this happens inside the default <tt>wp_notify_moderator</tt> function, which is a "pluggable" function, meaning that plugins can override it; see [[WordPress:Plugin API]]). ;comment_moderation_text:向管理员发送电子邮件,要求审核新评论之前,应用到邮件内容。Filter function arguments:邮件内容文本,评论ID。注意这在默认<tt>wp_notify_moderator</tt>函数内发生,是个"pluggable"函数,意思是插件可以取代这个函数;请看看[[WordPress:Plugin API|插件API]]) ;comment_moderation_text: ;comment_moderation_text: ;comment_notification_headers: applied to the mail headers before sending email notifying the post author of a new comment. Filter function arguments: mail header text, comment ID. Note that this happens inside the default <tt>wp_notify_postauthor</tt> function, which is a "pluggable" function, meaning that plugins can override it; see [[WordPress:Plugin API]]). ;comment_notification_headers: 向管理员发送电子邮件,要求审核新评论之前,应用到邮件标头。Filter function arguments:邮件标头文本,评论ID。注意这在默认<tt>wp_notify_postauthor</tt>函数内发生,是个"pluggable"函数,意思是插件可以取代这个函数;请看看[[WordPress:Plugin API|插件API]]) ;comment_notification_subject: applied to the mail subject before sending email notifying the post author of a new comment. Filter function arguments: mail subject, comment ID. Note that this happens inside the default <tt>wp_notify_postauthor</tt> function, which is a "pluggable" function, meaning that plugins can override it; see [[WordPress:Plugin API]]). ;comment_notification_subject: 向文章作者发送电子邮件,提醒有新评论之前,应用到邮件主题。Filter function arguments:邮件主题,评论ID。注意这在默认<tt>wp_notify_postauthor</tt>函数内发生,是个"pluggable"函数,意思是插件可以取代这个函数;请看看[[WordPress:Plugin API|插件API]])。 ;comment_notification_text: applied to the body of the mail message before sending email notifying the post author of a new comment. Filter function arguments: mail body text, comment ID. Note that this happens inside the default <tt>wp_notify_postauthor</tt> function, which is a "pluggable" function, meaning that plugins can override it; see [[WordPress:Plugin API]]). ;comment_notification_text: 向文章作者发送电子邮件,提醒有新评论之前,应用到邮件信息主体部分。Filter function arguments:邮件主体文本,评论ID。注意这在默认<tt>wp_notify_postauthor</tt>函数内发生,是个"pluggable"函数,意思是插件可以取代这个函数;请看看[[WordPress:Plugin API|插件API]])。 ;cron_schedules: applied to an empty array to allow a plugin to generate cron schedules in the <tt>wp_get_schedules</tt> function. ;cron_schedules:应用到空数组,使得插件能够在<tt>wp_get_schedules</tt>函数中创建cron schedules。 ;default_content: applied to the default post content prior to opening the editor for a new post. ;default_content:应用到默认文章内容,再为新文章打开编辑器。 ;default_excerpt : applied to the default post excerpt prior to opening the editor for a new post. ;default_excerpt : 应用到默认文章摘录,再为新文章打开编辑器。 ;default_title : applied to the default post title prior to opening the editor for a new post. ;default_title : 应用到默认文章标题,再为新文章打开编辑器。 ;format_to_edit : applied to comment content, author name, author email, and author URL by the <tt>format_to_edit</tt> function, which is called by the admin menus to set up a comment for editing. Also applied to when editing posts in the admin menus. ;format_to_edit :由<tt>format_to_edit</tt>函数应用到评论内容,作者名,作者电子邮件和作者URL,函数由管理界面菜单调用,设置评论,用于编辑。在管理菜单中编辑文章的时候,也适用。 ;explain_nonce_(verb)-(noun): allows a filter function to define text to be used to explain a nonce that is otherwise not explained by the WordPress core code. You will need to define specific verb/noun filters to use this. For instance, if your plugin defines a nonce for updating a tag, you would define a filter for "explain_nonce_update-tag". Filter function arguments: text to display (defaults to a generic "Are you sure you want to do this?" message) and extra information from the end of the action URL. In the example here, your function might simply return the string "Are you sure you want to update this tag?". ;explain_nonce_(verb)-(noun): 允许filter function定义文本解释nonce,否则WordPress核心代码就不解释nonce。你需要定义特别的动词/名词使用nonce。例如,如果你的插件定义nonce来更新标签,你就要为"explain_nonce_update-tag"定义filter。Filter function arguments:要显示的文本(默认为一般的"你确定要这样做吗?" 信息)和action URL结尾部分的额外信息。在这里的例子中,你的函数可能只返回字符串"你确定要更新这个标签吗?"。 ;format_to_edit : applied to post content, excerpt, title, and password by the <tt>format_to_edit</tt> function, which is called by the admin menus to set up a post for editing. Also applied to when editing comments in the admin menus. ;format_to_edit : 由<tt>format_to_edit</tt>函数,应用到文章内容,摘录,标题和密码,函数由管理界面调用,设置文章来编辑。在管理菜单中编辑文章的时候,也适用。 ;format_to_post: applied to post content by the <tt>format_to_post</tt> function, which is not used in WordPress by default. ;format_to_post:由<tt>format_to_post</tt>函数应用到文章内容,默认情况下,WordPress不使用这个函数。 ;manage_link_columns: applied to the list of columns to print on the blogroll management screen. Filter function argument/return value is an associative list where the element key is the name of the column, and the value is the header text for that column. See also action <tt>manage_link_custom_column</tt>, which puts the column information into the edit screen. ;manage_link_columns:应用到栏列表,印到友情链接管理界面。Filter function argument/返回值是个相关列表,element key是栏名称,参数值是栏的标头文本。也看看action <tt>manage_link_custom_column</tt>,将栏信息放在了编辑界面。 ;manage_posts_columns: applied to the list of columns to print on the manage posts screen. Filter function argument/return value is an associative array where the element key is the name of the column, and the value is the header text for that column. See also action <tt>manage_posts_custom_column</tt>, which puts the column information into the edit screen. (see [http://scompt.com/archives/2007/10/20/adding-custom-columns-to-the-wordpress-manage-posts-screen Scompt's tutorial] for examples and use.) ;manage_posts_columns: 应用到栏列表,印到管理文章界面。Filter function argument/返回值是个相关列表,element key是栏名称,参数值是栏的标头文本。也看看action <tt>manage_link_custom_column</tt>,将栏信息放在了编辑界面。(看看[http://scompt.com/archives/2007/10/20/adding-custom-columns-to-the-wordpress-manage-posts-screen Scompt's tutorial] 中的例子和用法。) ;manage_pages_columns: applied to the list of columns to print on the manage pages screen. Filter function argument/return value is an associative array where the element key is the name of the column, and the value is the header text for that column. See also action <tt>manage_pages_custom_column</tt>, which puts the column information into the edit screen. ;manage_pages_columns:应用到栏列表,发表到管理网页界面。Filter function argument/返回值是个相关列表,element key是栏名称,参数值是栏的标头文本。也看看action <tt>manage_link_custom_column</tt>,将栏信息放在了编辑界面。 ;postmeta_form_limit: applied to the number of post-meta information items shown on the post edit screen. ;postmeta_form_limit:应用到文章编辑界面上显示的post-meta 信息内容显示的数目。 ;pre_upload_error: applied to allow a plugin to create an XMLRPC error for uploading files. ;pre_upload_error:应用,使得插件能够创建XMLRPC错误,更新文件。 ;preview_page_link: applied to the link on the page editing screen that shows the page preview at the bottom of the screen. ;preview_page_link:应用到在界面的底部显示网页预览的网页编辑界面上的链接上。 ;preview_post_link: applied to the link on the post editing screen that shows the post preview at the bottom of the screen. ;preview_post_link: 应用到在界面的底部显示文章预览的文章编辑界面上的链接上。 ;richedit_pre: applied to post content by the <tt>wp_richedit_pre</tt> function, before displaying in the rich text editor. ;richedit_pre:由<tt>wp_richedit_pre</tt>函数应用到文章内容,再在多功能的文本编辑器上显示。 ;show_password_fields: applied to the true/false variable that controls whether the user is presented with the opportunity to change their password on the user profile screen (true means to show password changing fields; false means don't). ;show_password_fields:应用到正确的/错误的变数,这个变数控制了用户是否有机会更改用户基本资料界面上的密码(正确的,指的是显示密码更改栏;错误的意思是不显示)。 ;the_editor: applied to the HTML DIV created to house the rich text editor, prior to printing it on the screen. ;the_editor:应用到创建的HTML DIV中,用于放入多功能的文本编辑器,然后再在界面上发表。 ;user_can_richedit: applied to the calculation of whether the user's browser has rich editing capabilities, and whether the user wants to use the rich editor, in the <tt>user_can_richedit</tt> function. Filter function argument and return value is true/false if the current user can/cannot use the rich editor. ;user_can_richedit:用来考虑在<tt>user_can_richedit</tt>函数中,用户的浏览器是否有丰富的编辑功能,用户是否想要使用丰富的编辑器。如果当前用户能够/不能够使用多功能编辑器,Filter function argument 和返回参数值是正确的/错误的。 ;user_has_cap: applied to a user's capabilities list in the <tt>WP_User->has_cap</tt> function (which is called by the <tt>current_user_can</tt> function). Filter function arguments are the capabilities list to be filtered, the capability being questioned, and the argument list (which has things such as the post ID if the capability is to edit posts, etc.) ;user_has_cap:应用到<tt>WP_User->has_cap</tt>函数中的用户功能列表(也由<tt>current_user_can</tt>函数调用)。Filter function arguments是需要过滤的功能列表,需要查询的功能,和参数列表(如果功能是要编辑文章,等等,就有如,文章ID) ;wp_handle_upload: applied to the upload information when uploading a file. Filter function argument: array with elements "file" (file name), "url", "type". ;wp_handle_upload:上传文件时,应用到上传信息。Filter function argument:拥有"文件"的数组(文件名),"url", "类型"。 ;wp_upload_tabs: applied to the list of custom tabs to display on the upload management admin screen. Use action <tt>upload_files_(tab)</tt> to display a page for your custom tab (see [[WordPress:Plugin API/Action Reference]]). ;wp_upload_tabs:应用到自定义标签列表,显示在上传管理界面。使用action <tt>upload_files_(tab)</tt>为你自定义的标签显示页面(请看看[[WordPress:Plugin API/Action Reference| Plugin API/Action Reference]])。 == Rich Text Editor Filters == == 多功能文本编辑器Filters == These filters modify the configuration of the rich text editor. 这些filters更改了多功能文本编辑器的配置。 ;mce_spellchecker_languages: applied to the language selection available in the spell checker. ;mce_spellchecker_languages:应用到拼写检查程序中的语言选择中。 ;mce_buttons, mce_buttons_2, mce_buttons_3, mce_buttons_4 : applied to the rows of buttons for the rich editor toolbar (each is an array of button names). ;mce_buttons, mce_buttons_2, mce_buttons_3, mce_buttons_4 :应用到多功能编辑器工具条上的按钮(每个都是一组按钮名)。 ;mce_css: applied to the CSS file URL for the rich text editor. ;mce_css:应用到丰富文本编辑器中的CSS文件的URL上。 ;mce_external_plugins : applied to the array of external plugins to be loaded by the rich text editor. ;mce_external_plugins :应用到多功能文本编辑器载入的外部插件。 ;mce_external_languages : applied to the array of language files loaded by external plugins, allowing them to use the standard translation method (see tinymce/langs/wp-langs.php for reference). ;mce_external_languages :应用到外部插件载入的语言文件,使得这些文件使用标准的翻译方法(请参考tinymce/langs/wp-langs.php)。 ;tiny_mce_before_init : applied to the whole init array for the editor. ;tiny_mce_before_init :应用到编辑器的整个init数组。 == Template Filters == == 模板 Filters == This section contains links related to themes, templates, and style files. 这个部分包含了主题,模板,和样式文件相关的链接。 ;kubrick_header_color: applied to the color for the header of the default theme. ;kubrick_header_color:应用于默认主题标头的颜色。 ;kubrick_header_display: applied to the display option for the header of the default theme. ;kubrick_header_display:应用于默认主题标头的显示选项。 ;kubrick_header_image: applied to the header image file for the default theme. ;kubrick_header_image:应用于默认主题标头图像文件。 ;locale_stylesheet_uri: applied to the locale-specific stylesheet URI returned by the <tt>get_locale_stylesheet_uri</tt> function. Filter function arguments: URI, stylesheet directory URI. ;locale_stylesheet_uri:应用到<tt>get_locale_stylesheet_uri</tt>函数返回的locale-specific样式表URI。Filter function arguments: URI,样式表目录URI。 ;stylesheet: applied to the stylesheet returned by the <tt>get_stylesheet</tt> function. ;stylesheet:应用到<tt>get_stylesheet</tt>函数返回的样式表。 ;stylesheet_directory: applied to the stylesheet directory returned by the <tt>get_stylesheet_directory</tt> function. Filter function arguments: stylesheet directory, stylesheet. ;stylesheet_directory:应用到<tt>get_stylesheet_directory</tt>函数返回的样式表目录。Filter function arguments: 样式表目录,样式表。 ;stylesheet_directory_uri: applied to the stylesheet directory URI returned by the <tt>get_stylesheet_directory_uri</tt> function. Filter function arguments: stylesheet directory URI, stylesheet. ;stylesheet_directory_uri: 应用到<tt>get_stylesheet_directory_uri</tt>函数返回的样式表目录URI。Filter function arguments: 样式表目录URI,样式表。 ;stylesheet_uri: applied to the stylesheet URI returned by the <tt>get_stylesheet_uri</tt> function. Filter function arguments: stylesheet URI, stylesheet. ;stylesheet_uri:应用到<tt>get_stylesheet_uri</tt>函数返回的样式表URI。Filter function arguments:样式表URI,样式表。 ;template: applied to the template returned by the <tt>get_template</tt> function. ;模板:应用到<tt>get_template</tt>函数返回的模板。 ;template_directory: applied to the template directory returned by the <tt>get_template_directory</tt> function. Filter function arguments: template directory, template. ;template_directory:应用到<tt>get_template_directory</tt>函数返回的模板目录。Filter function arguments:模板目录,模板。 ;template_directory_uri: applied to the template directory URI returned by the <tt>get_template_directory_uri</tt> function. Filter function arguments: template directory URI, template. ;template_directory_uri:应用到<tt>get_template_directory_uri</tt>函数返回的模板目录URI。Filter function arguments:模板目录URI,模板。 ;theme_root: applied to the theme root directory (normally wp-content/themes) returned by the <tt>get_theme_root</tt> function. ;theme_root:应用到<tt>get_theme_root</tt>函数返回的主题根目录(一般为wp-content/themes)。 ;theme_root_uri: applied to the theme root directory URI returned by the <tt>get_theme_root_uri</tt> function. Filter function arguments: URI, site URL. ;theme_root_uri:应用到<tt>get_theme_root_uri</tt>函数返回的主题根目录URI。Filter function arguments:URI,站点URL。 You can also replace individual template files from your theme, by using the following filter hooks. See also the <tt>template_redirect</tt> action hook. Each of these filters takes as input the path to the corresponding template file in the current theme. A plugin can modify the file to be used by returning a new path to a template file. 通过使用下面的filter hooks,你也可以取代你的主题中单个的模板文件。也看看<tt>template_redirect</tt> action hook。每个filters都作为当前主题中的模板文件的相应的路径。插件通过返回模板文件的新路径,能够更改使用的文件。 ; 404_template : ; archive_template : ; attachment_template : ; author_template : ; category_template : ; comments_popup_template : ; comments_template: ; date_template : ; home_template : ; page_template : ; paged_template: ; search_template : ; single_template : ; 404_template : ; archive_template : ; attachment_template : ; author_template : ; category_template : ; comments_popup_template : ; comments_template: ; date_template : ; home_template : ; page_template : ; paged_template: ; search_template : ; single_template : == Advanced WordPress Filters == == WordPress高级的Filters == This section contains advanced filters related to the WordPress queries, rewrite rules, internationalization, and other fundamental WordPress functions. 这个部分包含了WordPress查询,rewrite规则,国际化,和其它WordPress基本的函数相关的高级filters。 ;author_rewrite_rules: applied to the author-related rewrite rules after they are generated. ;author_rewrite_rules: 规则创建后创建后,应用到作者相关的rewrite规则。 ;category_rewrite_rules: applied to the category-related rewrite rules after they are generated. ;category_rewrite_rules: 规则创建后,应用到类别相关的rewrite规则。 ;comments_rewrite_rules: applied to the comment-related rewrite rules after they are generated. ;comments_rewrite_rules: 规则创建后,应用到评论相关的rewrite规则。 ;create_user_query: applied to the query used to save a new user's information to the database, just prior to running the query. ;create_user_query:在运行查询前,应用于将新用户信息保存到数据库的查询中。 ;date_rewrite_rules: applied to the date-related rewrite rules after they are generated. ;date_rewrite_rules:创建后,用于日期相关的rewrite规则。 ;found_posts: applied to the list of posts, just after querying from the database. ;found_posts:从数据库中查询后,用于文章列表。 ;found_posts_query: after the list of posts to display is queried from the database, WordPress selects rows in the query results. This filter allows you to do something other than <tt>SELECT FOUND_ROWS()</tt> at that step. ;found_posts_query:显示的文章列表从数据库中查询之后,WordPress从查询结果中选饿几组。这个filter能够使你在这个步骤时,做一些其它事,而不是<tt>SELECT FOUND_ROWS()</tt>。 ;get_editable_authors: applied to the list of post authors that the current user is authorized to edit in the <tt>get_editable_authors</tt> function. ;get_editable_authors:应用到文章作者列表,当前用户能够在<tt>get_editable_authors</tt>函数中编辑。 ;gettext: applied to the translated text by the <tt>__</tt> and <tt>_e</tt> internationalization functions. Filter function arguments: translated text and untranslated text. Only gets applied if internationalization is in effect, and if the text domain has been loaded. ;gettext:由the <tt>__</tt>和 <tt>_e</tt>国际化函数,应有到已翻译的文本。Filter function arguments:已翻译的文本和未翻译的文本。如果国际化有效,而且如果文本网页已经载入,就会得到应用。 ;get_next_post_join: in function <tt>get_next_post</tt> (which finds the post after the currently-displayed post), applied to the SQL JOIN clause (which normally joins to the category table if user is viewing a category archive). Filter function arguments: JOIN clause, stay in same category (true/false), list of excluded categories. ;get_next_post_join: in function <tt>get_next_post</tt>(找到当前显示的文章后面的文章),应用到SQL JOIN clause(如果用户浏览类别归档,一般进入类别表格)。Filter function arguments: JOIN clause,在同一个类别中(正确的/错误的),删除的类别列表。 ;get_next_post_sort: in function <tt>get_next_post</tt> (which finds the post after the currently-displayed post), applied to the SQL ORDER BY clause (which normally orders by post date in ascending order with a limit of 1 post). Filter function arguments: ORDER BY clause. ;get_next_post_sort:在函数<tt>get_next_post</tt>中,(找到当前显示的文章之后的文章),应用到SQL ORDER BY clause(一般限制按一篇文章日期的降序排列)。Filter function arguments: ORDER BY clause。 ;get_next_post_sort: ;get_next_post_sort: ;get_next_post_where: in function <tt>get_next_post</tt> (which finds the post after the currently-displayed post), applied to the SQL WHERE clause (which normally looks for the next dated published post). Filter function arguments: WHERE clause, stay in same category (true/false), list of excluded categories. ;get_next_post_where:在函数<tt>get_next_post</tt>中,(找到当前显示的文章之后的文章),应用到WHERE clause(一般查找下一篇著名发表日期的文章)。Filter function arguments: WHERE clause,位于同一个类别中(正确的/错误的),已删除的类别列表。 ;get_others_drafts: applied to the query that selects the other users' drafts for display in the admin menus. ;get_others_drafts:应用到挑选其他用户的草稿放到管理菜单的查询中。 ;get_previous_post_join: in function <tt>get_previous_post</tt> (which finds the post before the currently-displayed post), applied to the SQL JOIN clause (which normally joins to the category table if user is viewing a category archive). Filter function arguments: join clause, stay in same category (true/false), list of excluded categories. ;get_previous_post_join:在函数<tt>get_previous_post</tt>中(找到当前显示的文章之前的文章),应用到SQL JOIN clause(如果用户正在阅读类别归档,一般会加入类别表格)。Filter function arguments: join clause,位于同一个类别 (正确的/错误的),已删除的类别列表。 ;get_previous_post_sort: in function <tt>get_previous_post</tt> (which finds the post before the currently-displayed post), applied to the SQL ORDER BY clause (which normally orders by post date in descending order with a limit of 1 post). Filter function arguments: ORDER BY clause. ;get_previous_post_sort:在函数<tt>get_previous_post</tt>中(找到当前显示的文章之前的文章),应用到SQL ORDER BY clause(一般限制为一篇文章的降序顺序)。Filter function arguments: ORDER BY clause。 ;get_previous_post_where: in function <tt>get_previous_post</tt> (which finds the post before the currently-displayed post), applied to the SQL WHERE clause (which normally looks for the previous dated published post). Filter function arguments: WHERE clause, stay in same category (true/false), list of excluded categories. ;get_previous_post_where:在函数<tt>get_previous_post</tt>中找到当前显示的文章之前的文章),应用到SQL WHERE clause(一般查找先前已发表的文章)。Filter function arguments: WHERE clause,位于同一个类别(正确的/错误的),已删除的类别列表。 ;get_users_drafts: applied to the query that selects the users' drafts for display in the admin menus. ;get_users_drafts:应用到挑选用户的草稿显示到管理菜单的查询中。 ;locale: applied to the locale by the <tt>get_locale</tt> function. ;locale:由<tt>get_locale</tt>函数应用到locale。 ;mod_rewrite_rules : applied to the list of rewrite rules given to the user to put into their .htaccess file when they change their permalink structure. (Note: replaces deprecated filter <tt>rewrite_rules</tt>.) ;mod_rewrite_rules :应用到用户更改permalink结构时,放入.htaccess文件中的rewrite规则。(注:取代已取消的filter <tt>rewrite_rules</tt>。) ;post_limits: applied to the <tt>LIMIT</tt> clause of the query that returns the post array. ;post_limits:应用到返回文章数组的查询的<tt>LIMIT</tt> clause。 ;posts_distinct : allows a plugin to add a <tt>DISTINCTROW</tt> clause to the query that returns the post array. ;posts_distinct :允许插件将<tt>DISTINCTROW</tt> clause添加到返回文章数组的查询中。 ;posts_fields: applied to the field list for the query that returns the post array. ;posts_fields:应用到返回文章数组的查询的field列表。 ;posts_groupby: applied to the <tt>GROUP BY</tt> clause of the query that returns the post array (normally empty). ;posts_groupby:应用到返回文章数组(一般为空的)的查询的<tt>GROUP BY</tt> clause。 ;posts_join_paged : applied to the <tt>JOIN</tt> clause of the query that returns the post array, after the paging is calculated (though paging does not affect the JOIN, so this is actually equivalent to <tt>posts_join</tt>). ;posts_join_paged :计算好内存分页后(但是内存分页并不影响JOIN,因此这事实上与<tt>posts_join</tt>等同)应用到返回文章数组的查询的<tt>JOIN</tt> clause。 ;posts_orderby: applied to the <tt>ORDER BY</tt> clause of the query that returns the post array. ;posts_orderby:应用到返回文章数组的查询的<tt>ORDER BY</tt> clause。 ;posts_request: applied to the entire SQL query that returns the post array, just prior to running the query. ;posts_request:应用到运行查询之前,返回文章数组的整个SQL 查询。 ;post_rewrite_rules: applied to the post-related rewrite rules after they are generated. ;post_rewrite_rules:应用到规则产生后,与文章相关的rewrite规则。 ;root_rewrite_rules: applied to the root-level rewrite rules after they are generated. ;root_rewrite_rules:应用到根级别的rewrite规则。 ;page_rewrite_rules: applied to the page-related rewrite rules after they are generated. ;page_rewrite_rules: rewrite规则产生后,应用到网页相关的rewrite规则。 ;posts_where_paged: applied to the <tt>WHERE</tt> clause of the query that returns the post array, after the paging is calculated (though paging does not affect the WHERE, so this is actually equivalent to <tt>posts_where</tt>). ;posts_where_paged:内存分页计算好后,应用到返回文章数组的查询的<tt>WHERE</tt> clause(但是内存分页不影响WHERE,因此这事实上与<tt>posts_where</tt>是对等的)。 ;posts_join : applied to the <tt>JOIN</tt> clause of the query that returns the post array. This is typically used to add a table to the <tt>JOIN</tt>, in combination with the <tt>posts_where</tt> filter. ;posts_join :应用到返回文章数组的查询的<tt>JOIN</tt> clause。通常使用这个来给<tt>JOIN</tt>添加表格,与<tt>posts_where</tt> filter结合在一起。 ;posts_where : applied to the <tt>WHERE</tt> clause of the query that returns the post array. ;posts_where :应用到返回文章数组的查询的<tt>WHERE</tt> clause。 ;query: applied to all queries (at least all queries run after plugins are loaded). ;query:应用到所有查询(至少插件载入后,所有查询运行)。 ;query_string: deprecated - use <tt>query_vars</tt> or <tt>request</tt> instead. ;query_string:已取消-使用<tt>query_vars</tt>或者<tt>request</tt>代替。 ;query_vars: applied to the list of public WordPress query variables before the SQL query is formed. Useful for removing extra permalink information the plugin has dealt with in some other manner. ;query_vars:SQL查询形成之前,应用到公共的WordPress查询变数列表上。有利于移除插件使用其它方式处理额外的permalink信息。 ;request: like <tt>query_vars</tt>, but applied after "extra" and private query variables have been added. ;request:像<tt>query_vars</tt>,但是"extra"和保密查询变数添加后,应用。 ;rewrite_rules_array: applied to the entire rewrite rules array after it is generated. ;rewrite_rules_array:创建后,应用到整个rewrite规则。 ;search_rewrite_rules: applied to the search-related rewrite rules after they are generated. ;search_rewrite_rules:创建后,应用到搜索相关的rewrite规则。 ;the_posts : applied to the list of posts queried from the database after minimal processing for permissions and draft status on single-post pages. ;the_posts :在单篇文章网页上处理权限和草稿状态后,应用到数据库中已查询的文章列表。 ;update_user_query: applied to the update query used to update user information, prior to running the query. ;update_user_query:应用到,运行查询之前,用于更新用户信息的更新查询。 ;uploading_iframe_src: applied to the HTML src tag for the uploading iframe on the post and page editing screens. ;uploading_iframe_src:应用到HTML src 标签,文章和网页编辑界面上的更新结构。 ;wp_redirect: applied to a redirect URL by the default <tt>wp_redirect</tt> function. Filter function arguments: URL, HTTP status code. Note that <tt>wp_redierct</tt> is also a "pluggable" function, meaning that plugins can override it; see [[WordPress:Plugin API]]). ;wp_redirect:由默认的<tt>wp_redirect</tt>函数应用到redirect URL。Filter function arguments: URL, HTTP status代码。注意<tt>wp_redierct</tt>也是个"pluggable"函数,指的是插件可以取代这个函数;请看看[[WordPress:Plugin API|插件API]]。) ;xmlrpc_methods : applied to list of defined XMLRPC methods for the XMLRPC server. ;xmlrpc_methods :应用到XMLRPC服务器已定义的XMLRPC methods列表。 ;wp_mail_from : applied before any mail is sent by the wp_mail function. Supplied value is the calculated from address which is wordpress at the current hostname (set by $_SERVER['SERVER_NAME']). The filter should return an email address or name/email combo in the form "user@example.com" or "Name <user@example.com>" (without the quotes!). ;wp_mail_from :在wp_mail函数发送任何邮件之前,应用。支持的参数值,从WordPress当前的主机名中计算(由$_SERVER['SERVER_NAME']设置)。Filter应该以"user@example.com"或者"Name <user@example.com>"形式返回电子邮件地址或者名称/电子邮件combo。(没有引号!)。 ;wp_mail_from_name : applied before any mail is sent by the wp_mail function. The filter should return a name string to be used as the email from name. ;wp_mail_from_name : wp_mail函数发送任何邮件之前,应用。Filter应该返回一个名称字符串,用在名称中的电子邮件。 == Further Reading == == 深入阅读 == * [[WordPress:Writing a Plugin]] - description of how to write a plugin * [[WordPress:Plugin API]] - article on how to use filters and actions * [[WordPress:Plugin API/Action Reference]] - reference list for Action hooks * [[WordPress:Plugin Resources]] - comprehensive list of plugin-related resources * [http://codex.wordpress.org/User:Skippy Skippy's list] of actions and filters * [http://wphooks.flatearth.org WordPress Hooks], a work in progress directory of all of WordPress’ hooks. * [http://adambrown.info/p/wp_hooks WordPress Hooks Database], a database of all WordPress' hooks, showing which version they come from, and linking to the source code spots that use them * [http://blog.taragana.com/index.php/archive/wordpress-2x-hooks-for-action-comprehensive-list-for-plugin-and-theme-developers/ Angsuman's list], a comprehensive listing of WordPress action hooks with documentation and source code location information. It contains all documented and undocumented action hooks in WordPress 2.0. * [[WordPress:Writing a Plugin|编写插件]] – 描述怎样编写插件 * [[WordPress:Plugin API|插件API]] – 关于怎样使用filters和actions的文章 * [[WordPress:Plugin API/Action Reference|插件API/Action Reference]] - Action hooks的reference列表 * [[WordPress:Plugin Resources|插件资源]] – 插件相关的资源的全面列表 * [http://codex.wordpress.org/用户:Skippy Skippy的列表] 关于actions 和 filters * [http://wphooks.flatearth.org WordPress Hooks], 正在进行的工作,所有的WordPress hook的目录。 * [http://adambrown.info/p/wp_hooks WordPress Hooks 数据库], 所有的WordPress hooks的数据库,显示来自哪个版本,链接到使用这些hooks的源代码站点。 * [http://blog.taragana.com/index.php/archive/wordpress-2x-hooks-for-action-comprehensive-list-for-plugin-and-theme-developers/ Angsuman的列表], a comprehensive listing of WordPress action hooks 的完整列表,带有文档和源代码位置信息。包含了WordPress2.0中所有已归档和未归档的action hooks。
摘要:
请注意,您对站长百科的所有贡献都可能被其他贡献者编辑,修改或删除。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源(参阅
Wordpress-mediawiki:版权
的细节)。
未经许可,请勿提交受版权保护的作品!
取消
编辑帮助
(在新窗口中打开)