站长百科 | 数字化技能提升教程 数字化时代生存宝典
首页
数字化百科
电子书
▼
建站程序
开发
服务器
办公软件
开发教程
▼
服务器教程
软件使用教程
运营教程
热门电子书
▼
CSS教程
WordPress教程
导航
程序频道
推广频道
网赚频道
人物频道
网站程序
网页制作
云计算
服务器
CMS
论坛
网店
虚拟主机
cPanel
网址导航
WIKI使用导航
WIKI首页
热点词条
最新资讯
网站程序
站长人物
页面分类
使用帮助
编辑测试
创建条目
网站地图
站长百科导航
站长百科
主机侦探
IDCtalk云说
跨境电商导航
WordPress啦
站长专题
网站推广
网站程序
网站赚钱
虚拟主机
cPanel
网址导航专题
云计算
微博营销
虚拟主机管理系统
开放平台
WIKI程序与应用
美国十大主机
编辑“
WordPress:Plugin API/Filter Reference
”(章节)
人物百科
|
营销百科
|
网赚百科
|
站长工具
|
网站程序
|
域名主机
|
互联网公司
|
分类索引
跳转至:
导航
、
搜索
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
== 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应该返回一个名称字符串,用在名称中的电子邮件。
摘要:
请注意,您对站长百科的所有贡献都可能被其他贡献者编辑,修改或删除。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源(参阅
Wordpress-mediawiki:版权
的细节)。
未经许可,请勿提交受版权保护的作品!
取消
编辑帮助
(在新窗口中打开)