Function Reference
出自Wordpress 中文
Template:Copyedit Template:Stub
EDITORS AND CONTRIBUTORS
The layout and structure of this page will follow Template Tags. Please create pages for these functions as subpages of this page. If you create a subpage for a function, please include information and examples of usage of that function, if possible, per the examples found in Template Tags.
For example: [[Function_Reference/wpdb_Class|wpdb_Class]].
WordPress defines many useful functions. Rather than reinventing the wheel, you should take advantage of the core functions whenever possible. Of course, if the slick new plugin you are designing needs a better wheel, you are on your own, but at least you can take inspiration from the following functions.
Please check out the wp-docs mailing list to find out how you can contribute to this section. And it needs your help!.
[编辑] 函数分类
[编辑] 通用函数
|
[编辑] Formatting Functions
|
[编辑] Post Functions
|
[编辑] Comment Functions
|
[编辑] Feed Functions
|
[编辑] Link Functions
|
[编辑] Administration Functions
|
[编辑] Classes[编辑] WordPress classes
[编辑] External classes
|
[编辑] User Functions
|
[编辑] Functions by file
The functions are defined in several PHP files, nearly all residing in the wp-includes directory:
- classes.php, class-IXR.php, class-pop3.php, class-snoopy.php, gettext.php, wp-db.php
- Classes.
- comment-functions.php
- Comment functions.
- feed-functions.php, rss-functions.php
- Feed functions.
- functions-compat.php
- Compatibility functions for those running lower PHP versions.
- functions-formatting.php
- Formatting functions.
- functions.php
- Basic functions.
- functions-post.php
- Post functions.
- links.php
- Link functions.
- pluggable-functions.php
- Pluggable functions (1.5.1+).
- template-functions-*.php
- Template Tags.
- registration-functions.php, wp-admin/admin-functions.php
- Administration functions.
[编辑] DRAFT
The following functions are to be moved into their appropriate categories above.
- add_action
- add_filter
- add_magic_quotes
- add_post_meta
- add_query_arg
- apply_filters
- auth_redirect
- date_i18n
- debug_fclose
- debug_fopen
- delete_post_meta
- do_action
- do_enclose
- generic_ping
- get_404_template
- get_archive_template
- get_approved_comments
- get_author_template
- get_category_template
- get_catname
- get_comments_popup_template
- get_current_theme
- get_date_template
- get_home_template
- get_lastpostdate
- get_lastpostmodified
- get_page_template
- get_page_uri
- get_paged_template
- get_post_meta
- get_postdata
- get_posts
- get_profile
- get_query_template
- get_query_var
- get_search_template
- get_single_template
- get_stylesheet
- get_stylesheet_directory
- get_stylesheet_directory_uri
- get_stylesheet_uri
- get_template
- get_template_directory
- get_template_directory_uri
- get_theme
- get_theme_data
- get_theme_root
- get_theme_root_uri
- get_themes
- get_userdatabylogin
- get_userid
- get_weekstartend
- gzip_compression
- have_posts
- htmlentities2
- is_404
- is_archive
- is_author
- is_category
- is_comments_popup
- is_date
- is_day
- is_home
- is_month
- is_new_day
- is_page
- is_paged
- is_plugn_page
- is_search
- is_single
- is_time
- is_trackback
- is_year
- load_template
- make_url_footnote
- merge_filters
- mysql2date
- query_posts
- remove_action
- remove_filter
- remove_query_arg
- rewind_posts
- setup_postdata
- start_wp
- the_post
- timer_stop
- trackback
- update_category_cache
- update_post_caches
- update_post_meta
- update_user_cache
- url_to_postid
- user_pass_ok
- weblog_ping
- wp_clearcookie
- wp_head
- wp_login
- wp_mail
- wp_setcookie
- xmlrpc_getpostcategory
- xmlrpc_getposttitle
- xmlrpc_removepostdata
