编辑“WordPress:Plugin API/Filter Reference”
该编辑可以被撤销。 请检查下面的对比以核实您想要撤销的内容,然后发布下面的更改以完成撤销。
最后版本 | 您的文本 | ||
第1,118行: | 第1,118行: | ||
;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: 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: | ;found_posts_query: | ||
;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: applied to the list of post authors that the current user is authorized to edit in the <tt>get_editable_authors</tt> function. | ||
;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: 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. | ||
;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> (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_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: 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_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: 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_others_drafts: applied to the query that selects the other users' drafts for display in the admin menus. | ;get_others_drafts: applied to the query that selects the other users' drafts for display in the admin menus. | ||
;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: 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_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: 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_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: 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_users_drafts: applied to the query that selects the users' drafts for display in the admin menus. | ;get_users_drafts: applied to the query that selects the users' drafts for display in the admin menus. | ||
;locale: applied to the locale by the <tt>get_locale</tt> function. | ;locale: applied to the locale by the <tt>get_locale</tt> function. | ||
;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 : 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>.) | ||
;post_limits: applied to the <tt>LIMIT</tt> clause of the query that returns the post array. | ;post_limits: applied to the <tt>LIMIT</tt> clause of the query that returns the post array. | ||
;posts_distinct : allows a plugin to add a <tt>DISTINCTROW</tt> clause to the query that returns the post array. | ;posts_distinct : allows a plugin to add a <tt>DISTINCTROW</tt> clause to the query that returns the post array. | ||
;posts_fields: applied to the field list for the query that returns the post array. | ;posts_fields: applied to the field list for the query that returns the post array. | ||
;posts_groupby: applied to the <tt>GROUP BY</tt> clause of the query that returns the post array (normally empty). | ;posts_groupby: applied to the <tt>GROUP BY</tt> clause of the query that returns the post array (normally empty). | ||
;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 : 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_orderby: applied to the <tt>ORDER BY</tt> clause of the query that returns the post array. | ;posts_orderby: applied to the <tt>ORDER BY</tt> clause of the query that returns the post array. | ||
;posts_request: applied to the entire SQL query that returns the post array, just prior to running the query. | ;posts_request: applied to the entire SQL query that returns the post array, just prior to running the query. | ||
;post_rewrite_rules: applied to the post-related rewrite rules after they are generated. | ;post_rewrite_rules: applied to the post-related rewrite rules after they are generated. | ||
;root_rewrite_rules: applied to the root-level rewrite rules after they are generated. | ;root_rewrite_rules: applied to the root-level rewrite rules after they are generated. | ||
;page_rewrite_rules: applied to the page-related rewrite rules after they are generated. | ;page_rewrite_rules: applied to the page-related rewrite rules after they are generated. | ||
;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: 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_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 : 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_where : applied to the <tt>WHERE</tt> clause of the query that returns the post array. | ;posts_where : applied to the <tt>WHERE</tt> clause of the query that returns the post array. | ||
;query: applied to all queries (at least all queries run after plugins are loaded). | ;query: applied to all queries (at least all queries run after plugins are loaded). | ||
;query_string: deprecated - use <tt>query_vars</tt> or <tt>request</tt> instead. | ;query_string: deprecated - use <tt>query_vars</tt> or <tt>request</tt> instead. | ||
;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: 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. | ||
;request: like <tt>query_vars</tt>, but applied after "extra" and private query variables have been added. | ;request: like <tt>query_vars</tt>, but applied after "extra" and private query variables have been added. | ||
;rewrite_rules_array: applied to the entire rewrite rules array after it is generated. | ;rewrite_rules_array: applied to the entire rewrite rules array after it is generated. | ||
;search_rewrite_rules: applied to the search-related rewrite rules after they are generated. | ;search_rewrite_rules: applied to the search-related rewrite rules after they are generated. | ||
;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 : applied to the list of posts queried from the database after minimal processing for permissions and draft status on single-post pages. | ||
;update_user_query: applied to the update query used to update user information, prior to running the query. | ;update_user_query: applied to the update query used to update user information, prior to running the query. | ||
;uploading_iframe_src: applied to the HTML src tag for the uploading iframe on the post and page editing screens. | ;uploading_iframe_src: applied to the HTML src tag for the uploading iframe on the post and page editing screens. | ||
;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: 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]]). | ||
;xmlrpc_methods : applied to list of defined XMLRPC methods for the XMLRPC server. | ;xmlrpc_methods : applied to list of defined XMLRPC methods for the XMLRPC server. | ||
;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 : 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_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 : 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. | ||
== Further Reading == | == Further Reading == | ||
* [[WordPress:Writing a Plugin]] - description of how to write a plugin | * [[WordPress:Writing a Plugin]] - description of how to write a plugin | ||
第1,286行: | 第1,205行: | ||
* [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://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. | * [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. | ||